@bigbinary/neeto-fields-frontend 1.3.20 → 1.3.22
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.
- package/README.md +2 -0
- package/dist/index.cjs.js +2534 -449
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +2520 -436
- package/dist/index.js.map +1 -1
- package/package.json +85 -79
package/dist/index.cjs.js
CHANGED
|
@@ -11,7 +11,7 @@ var formik = require('formik');
|
|
|
11
11
|
var i18next = require('i18next');
|
|
12
12
|
var yup = require('yup');
|
|
13
13
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
14
|
-
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
14
|
+
var utils$3 = require('@bigbinary/neeto-commons-frontend/utils');
|
|
15
15
|
var neetoIcons = require('@bigbinary/neeto-icons');
|
|
16
16
|
var reactI18next = require('react-i18next');
|
|
17
17
|
var constants = require('@bigbinary/neeto-commons-frontend/constants');
|
|
@@ -19,7 +19,9 @@ var Container = require('@bigbinary/neeto-molecules/Container');
|
|
|
19
19
|
var PageLoader = require('@bigbinary/neeto-molecules/PageLoader');
|
|
20
20
|
var reactQuery = require('react-query');
|
|
21
21
|
var axios = require('axios');
|
|
22
|
+
var require$$0 = require('util');
|
|
22
23
|
var uuid = require('uuid');
|
|
24
|
+
var neetoFiltersFrontend = require('@bigbinary/neeto-filters-frontend');
|
|
23
25
|
var reactRouterDom = require('react-router-dom');
|
|
24
26
|
var MenuBar = require('@bigbinary/neeto-molecules/MenuBar');
|
|
25
27
|
var MoreDropdown = require('@bigbinary/neeto-molecules/MoreDropdown');
|
|
@@ -54,6 +56,7 @@ var yup__namespace = /*#__PURE__*/_interopNamespace(yup);
|
|
|
54
56
|
var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container);
|
|
55
57
|
var PageLoader__default = /*#__PURE__*/_interopDefaultLegacy(PageLoader);
|
|
56
58
|
var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
|
|
59
|
+
var require$$0__default = /*#__PURE__*/_interopDefaultLegacy(require$$0);
|
|
57
60
|
var MenuBar__default = /*#__PURE__*/_interopDefaultLegacy(MenuBar);
|
|
58
61
|
var MoreDropdown__default = /*#__PURE__*/_interopDefaultLegacy(MoreDropdown);
|
|
59
62
|
var TableWrapper__default = /*#__PURE__*/_interopDefaultLegacy(TableWrapper);
|
|
@@ -76,14 +79,14 @@ function _extends() {
|
|
|
76
79
|
return _extends.apply(this, arguments);
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
function _typeof$1(
|
|
82
|
+
function _typeof$1(o) {
|
|
80
83
|
"@babel/helpers - typeof";
|
|
81
84
|
|
|
82
|
-
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
83
|
-
return typeof
|
|
84
|
-
} : function (
|
|
85
|
-
return
|
|
86
|
-
}, _typeof$1(
|
|
85
|
+
return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
86
|
+
return typeof o;
|
|
87
|
+
} : function (o) {
|
|
88
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
89
|
+
}, _typeof$1(o);
|
|
87
90
|
}
|
|
88
91
|
|
|
89
92
|
function _toPrimitive(input, hint) {
|
|
@@ -183,31 +186,31 @@ function _arrayWithHoles(arr) {
|
|
|
183
186
|
if (Array.isArray(arr)) return arr;
|
|
184
187
|
}
|
|
185
188
|
|
|
186
|
-
function _iterableToArrayLimit(
|
|
187
|
-
var
|
|
188
|
-
if (null !=
|
|
189
|
-
var
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
function _iterableToArrayLimit(r, l) {
|
|
190
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
191
|
+
if (null != t) {
|
|
192
|
+
var e,
|
|
193
|
+
n,
|
|
194
|
+
i,
|
|
195
|
+
u,
|
|
196
|
+
a = [],
|
|
197
|
+
f = !0,
|
|
198
|
+
o = !1;
|
|
196
199
|
try {
|
|
197
|
-
if (
|
|
198
|
-
if (Object(
|
|
199
|
-
|
|
200
|
-
} else for (; !(
|
|
201
|
-
} catch (
|
|
202
|
-
|
|
200
|
+
if (i = (t = t.call(r)).next, 0 === l) {
|
|
201
|
+
if (Object(t) !== t) return;
|
|
202
|
+
f = !1;
|
|
203
|
+
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
204
|
+
} catch (r) {
|
|
205
|
+
o = !0, n = r;
|
|
203
206
|
} finally {
|
|
204
207
|
try {
|
|
205
|
-
if (!
|
|
208
|
+
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
206
209
|
} finally {
|
|
207
|
-
if (
|
|
210
|
+
if (o) throw n;
|
|
208
211
|
}
|
|
209
212
|
}
|
|
210
|
-
return
|
|
213
|
+
return a;
|
|
211
214
|
}
|
|
212
215
|
}
|
|
213
216
|
|
|
@@ -261,14 +264,14 @@ var _typeof = {exports: {}};
|
|
|
261
264
|
_typeof.exports;
|
|
262
265
|
|
|
263
266
|
(function (module) {
|
|
264
|
-
function _typeof(
|
|
267
|
+
function _typeof(o) {
|
|
265
268
|
"@babel/helpers - typeof";
|
|
266
269
|
|
|
267
|
-
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (
|
|
268
|
-
return typeof
|
|
269
|
-
} : function (
|
|
270
|
-
return
|
|
271
|
-
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(
|
|
270
|
+
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
271
|
+
return typeof o;
|
|
272
|
+
} : function (o) {
|
|
273
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
274
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
|
|
272
275
|
}
|
|
273
276
|
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
274
277
|
} (_typeof));
|
|
@@ -281,304 +284,304 @@ regeneratorRuntime$1.exports;
|
|
|
281
284
|
var _typeof = _typeofExports["default"];
|
|
282
285
|
function _regeneratorRuntime() {
|
|
283
286
|
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
|
|
284
|
-
return
|
|
287
|
+
return e;
|
|
285
288
|
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
286
|
-
var
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
var t,
|
|
290
|
+
e = {},
|
|
291
|
+
r = Object.prototype,
|
|
292
|
+
n = r.hasOwnProperty,
|
|
293
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
294
|
+
t[e] = r.value;
|
|
291
295
|
},
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
function define(
|
|
297
|
-
return Object.defineProperty(
|
|
298
|
-
value:
|
|
296
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
297
|
+
a = i.iterator || "@@iterator",
|
|
298
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
299
|
+
u = i.toStringTag || "@@toStringTag";
|
|
300
|
+
function define(t, e, r) {
|
|
301
|
+
return Object.defineProperty(t, e, {
|
|
302
|
+
value: r,
|
|
299
303
|
enumerable: !0,
|
|
300
304
|
configurable: !0,
|
|
301
305
|
writable: !0
|
|
302
|
-
}),
|
|
306
|
+
}), t[e];
|
|
303
307
|
}
|
|
304
308
|
try {
|
|
305
309
|
define({}, "");
|
|
306
|
-
} catch (
|
|
307
|
-
define = function define(
|
|
308
|
-
return
|
|
310
|
+
} catch (t) {
|
|
311
|
+
define = function define(t, e, r) {
|
|
312
|
+
return t[e] = r;
|
|
309
313
|
};
|
|
310
314
|
}
|
|
311
|
-
function wrap(
|
|
312
|
-
var
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
return
|
|
316
|
-
value: makeInvokeMethod(
|
|
317
|
-
}),
|
|
315
|
+
function wrap(t, e, r, n) {
|
|
316
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
317
|
+
a = Object.create(i.prototype),
|
|
318
|
+
c = new Context(n || []);
|
|
319
|
+
return o(a, "_invoke", {
|
|
320
|
+
value: makeInvokeMethod(t, r, c)
|
|
321
|
+
}), a;
|
|
318
322
|
}
|
|
319
|
-
function tryCatch(
|
|
323
|
+
function tryCatch(t, e, r) {
|
|
320
324
|
try {
|
|
321
325
|
return {
|
|
322
326
|
type: "normal",
|
|
323
|
-
arg:
|
|
327
|
+
arg: t.call(e, r)
|
|
324
328
|
};
|
|
325
|
-
} catch (
|
|
329
|
+
} catch (t) {
|
|
326
330
|
return {
|
|
327
331
|
type: "throw",
|
|
328
|
-
arg:
|
|
332
|
+
arg: t
|
|
329
333
|
};
|
|
330
334
|
}
|
|
331
335
|
}
|
|
332
|
-
|
|
333
|
-
var
|
|
336
|
+
e.wrap = wrap;
|
|
337
|
+
var h = "suspendedStart",
|
|
338
|
+
l = "suspendedYield",
|
|
339
|
+
f = "executing",
|
|
340
|
+
s = "completed",
|
|
341
|
+
y = {};
|
|
334
342
|
function Generator() {}
|
|
335
343
|
function GeneratorFunction() {}
|
|
336
344
|
function GeneratorFunctionPrototype() {}
|
|
337
|
-
var
|
|
338
|
-
define(
|
|
345
|
+
var p = {};
|
|
346
|
+
define(p, a, function () {
|
|
339
347
|
return this;
|
|
340
348
|
});
|
|
341
|
-
var
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
var
|
|
345
|
-
function defineIteratorMethods(
|
|
346
|
-
["next", "throw", "return"].forEach(function (
|
|
347
|
-
define(
|
|
348
|
-
return this._invoke(
|
|
349
|
+
var d = Object.getPrototypeOf,
|
|
350
|
+
v = d && d(d(values([])));
|
|
351
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
352
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
353
|
+
function defineIteratorMethods(t) {
|
|
354
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
355
|
+
define(t, e, function (t) {
|
|
356
|
+
return this._invoke(e, t);
|
|
349
357
|
});
|
|
350
358
|
});
|
|
351
359
|
}
|
|
352
|
-
function AsyncIterator(
|
|
353
|
-
function invoke(
|
|
354
|
-
var
|
|
355
|
-
if ("throw" !==
|
|
356
|
-
var
|
|
357
|
-
|
|
358
|
-
return
|
|
359
|
-
invoke("next",
|
|
360
|
-
}, function (
|
|
361
|
-
invoke("throw",
|
|
362
|
-
}) :
|
|
363
|
-
|
|
364
|
-
}, function (
|
|
365
|
-
return invoke("throw",
|
|
360
|
+
function AsyncIterator(t, e) {
|
|
361
|
+
function invoke(r, o, i, a) {
|
|
362
|
+
var c = tryCatch(t[r], t, o);
|
|
363
|
+
if ("throw" !== c.type) {
|
|
364
|
+
var u = c.arg,
|
|
365
|
+
h = u.value;
|
|
366
|
+
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
367
|
+
invoke("next", t, i, a);
|
|
368
|
+
}, function (t) {
|
|
369
|
+
invoke("throw", t, i, a);
|
|
370
|
+
}) : e.resolve(h).then(function (t) {
|
|
371
|
+
u.value = t, i(u);
|
|
372
|
+
}, function (t) {
|
|
373
|
+
return invoke("throw", t, i, a);
|
|
366
374
|
});
|
|
367
375
|
}
|
|
368
|
-
|
|
376
|
+
a(c.arg);
|
|
369
377
|
}
|
|
370
|
-
var
|
|
371
|
-
|
|
372
|
-
value: function value(
|
|
378
|
+
var r;
|
|
379
|
+
o(this, "_invoke", {
|
|
380
|
+
value: function value(t, n) {
|
|
373
381
|
function callInvokeWithMethodAndArg() {
|
|
374
|
-
return new
|
|
375
|
-
invoke(
|
|
382
|
+
return new e(function (e, r) {
|
|
383
|
+
invoke(t, n, e, r);
|
|
376
384
|
});
|
|
377
385
|
}
|
|
378
|
-
return
|
|
386
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
379
387
|
}
|
|
380
388
|
});
|
|
381
389
|
}
|
|
382
|
-
function makeInvokeMethod(
|
|
383
|
-
var
|
|
384
|
-
return function (
|
|
385
|
-
if (
|
|
386
|
-
if (
|
|
387
|
-
if ("throw" ===
|
|
388
|
-
return
|
|
390
|
+
function makeInvokeMethod(e, r, n) {
|
|
391
|
+
var o = h;
|
|
392
|
+
return function (i, a) {
|
|
393
|
+
if (o === f) throw new Error("Generator is already running");
|
|
394
|
+
if (o === s) {
|
|
395
|
+
if ("throw" === i) throw a;
|
|
396
|
+
return {
|
|
397
|
+
value: t,
|
|
398
|
+
done: !0
|
|
399
|
+
};
|
|
389
400
|
}
|
|
390
|
-
for (
|
|
391
|
-
var
|
|
392
|
-
if (
|
|
393
|
-
var
|
|
394
|
-
if (
|
|
395
|
-
if (
|
|
396
|
-
return
|
|
401
|
+
for (n.method = i, n.arg = a;;) {
|
|
402
|
+
var c = n.delegate;
|
|
403
|
+
if (c) {
|
|
404
|
+
var u = maybeInvokeDelegate(c, n);
|
|
405
|
+
if (u) {
|
|
406
|
+
if (u === y) continue;
|
|
407
|
+
return u;
|
|
397
408
|
}
|
|
398
409
|
}
|
|
399
|
-
if ("next" ===
|
|
400
|
-
if (
|
|
401
|
-
|
|
402
|
-
} else "return" ===
|
|
403
|
-
|
|
404
|
-
var
|
|
405
|
-
if ("normal" ===
|
|
406
|
-
if (
|
|
410
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
411
|
+
if (o === h) throw o = s, n.arg;
|
|
412
|
+
n.dispatchException(n.arg);
|
|
413
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
414
|
+
o = f;
|
|
415
|
+
var p = tryCatch(e, r, n);
|
|
416
|
+
if ("normal" === p.type) {
|
|
417
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
407
418
|
return {
|
|
408
|
-
value:
|
|
409
|
-
done:
|
|
419
|
+
value: p.arg,
|
|
420
|
+
done: n.done
|
|
410
421
|
};
|
|
411
422
|
}
|
|
412
|
-
"throw" ===
|
|
423
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
413
424
|
}
|
|
414
425
|
};
|
|
415
426
|
}
|
|
416
|
-
function maybeInvokeDelegate(
|
|
417
|
-
var
|
|
418
|
-
|
|
419
|
-
if (
|
|
420
|
-
var
|
|
421
|
-
if ("throw" ===
|
|
422
|
-
var
|
|
423
|
-
return
|
|
427
|
+
function maybeInvokeDelegate(e, r) {
|
|
428
|
+
var n = r.method,
|
|
429
|
+
o = e.iterator[n];
|
|
430
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
431
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
432
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
433
|
+
var a = i.arg;
|
|
434
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
424
435
|
}
|
|
425
|
-
function pushTryEntry(
|
|
426
|
-
var
|
|
427
|
-
tryLoc:
|
|
436
|
+
function pushTryEntry(t) {
|
|
437
|
+
var e = {
|
|
438
|
+
tryLoc: t[0]
|
|
428
439
|
};
|
|
429
|
-
1 in
|
|
440
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
430
441
|
}
|
|
431
|
-
function resetTryEntry(
|
|
432
|
-
var
|
|
433
|
-
|
|
442
|
+
function resetTryEntry(t) {
|
|
443
|
+
var e = t.completion || {};
|
|
444
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
434
445
|
}
|
|
435
|
-
function Context(
|
|
446
|
+
function Context(t) {
|
|
436
447
|
this.tryEntries = [{
|
|
437
448
|
tryLoc: "root"
|
|
438
|
-
}],
|
|
449
|
+
}], t.forEach(pushTryEntry, this), this.reset(!0);
|
|
439
450
|
}
|
|
440
|
-
function values(
|
|
441
|
-
if (
|
|
442
|
-
var
|
|
443
|
-
if (
|
|
444
|
-
if ("function" == typeof
|
|
445
|
-
if (!isNaN(
|
|
446
|
-
var
|
|
447
|
-
|
|
448
|
-
for (; ++
|
|
449
|
-
return next.value =
|
|
451
|
+
function values(e) {
|
|
452
|
+
if (e || "" === e) {
|
|
453
|
+
var r = e[a];
|
|
454
|
+
if (r) return r.call(e);
|
|
455
|
+
if ("function" == typeof e.next) return e;
|
|
456
|
+
if (!isNaN(e.length)) {
|
|
457
|
+
var o = -1,
|
|
458
|
+
i = function next() {
|
|
459
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
|
|
460
|
+
return next.value = t, next.done = !0, next;
|
|
450
461
|
};
|
|
451
|
-
return
|
|
462
|
+
return i.next = i;
|
|
452
463
|
}
|
|
453
464
|
}
|
|
454
|
-
|
|
455
|
-
next: doneResult
|
|
456
|
-
};
|
|
457
|
-
}
|
|
458
|
-
function doneResult() {
|
|
459
|
-
return {
|
|
460
|
-
value: undefined,
|
|
461
|
-
done: !0
|
|
462
|
-
};
|
|
465
|
+
throw new TypeError(_typeof(e) + " is not iterable");
|
|
463
466
|
}
|
|
464
|
-
return GeneratorFunction.prototype = GeneratorFunctionPrototype,
|
|
467
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
465
468
|
value: GeneratorFunctionPrototype,
|
|
466
469
|
configurable: !0
|
|
467
|
-
}),
|
|
470
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
468
471
|
value: GeneratorFunction,
|
|
469
472
|
configurable: !0
|
|
470
|
-
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype,
|
|
471
|
-
var
|
|
472
|
-
return !!
|
|
473
|
-
},
|
|
474
|
-
return Object.setPrototypeOf ? Object.setPrototypeOf(
|
|
475
|
-
},
|
|
473
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
474
|
+
var e = "function" == typeof t && t.constructor;
|
|
475
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
476
|
+
}, e.mark = function (t) {
|
|
477
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
478
|
+
}, e.awrap = function (t) {
|
|
476
479
|
return {
|
|
477
|
-
__await:
|
|
480
|
+
__await: t
|
|
478
481
|
};
|
|
479
|
-
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype,
|
|
482
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
480
483
|
return this;
|
|
481
|
-
}),
|
|
482
|
-
void 0 ===
|
|
483
|
-
var
|
|
484
|
-
return
|
|
485
|
-
return
|
|
484
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
485
|
+
void 0 === i && (i = Promise);
|
|
486
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
487
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
488
|
+
return t.done ? t.value : a.next();
|
|
486
489
|
});
|
|
487
|
-
}, defineIteratorMethods(
|
|
490
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
488
491
|
return this;
|
|
489
|
-
}), define(
|
|
492
|
+
}), define(g, "toString", function () {
|
|
490
493
|
return "[object Generator]";
|
|
491
|
-
}),
|
|
492
|
-
var
|
|
493
|
-
|
|
494
|
-
for (var
|
|
495
|
-
return
|
|
496
|
-
for (;
|
|
497
|
-
var
|
|
498
|
-
if (
|
|
494
|
+
}), e.keys = function (t) {
|
|
495
|
+
var e = Object(t),
|
|
496
|
+
r = [];
|
|
497
|
+
for (var n in e) r.push(n);
|
|
498
|
+
return r.reverse(), function next() {
|
|
499
|
+
for (; r.length;) {
|
|
500
|
+
var t = r.pop();
|
|
501
|
+
if (t in e) return next.value = t, next.done = !1, next;
|
|
499
502
|
}
|
|
500
503
|
return next.done = !0, next;
|
|
501
504
|
};
|
|
502
|
-
},
|
|
505
|
+
}, e.values = values, Context.prototype = {
|
|
503
506
|
constructor: Context,
|
|
504
|
-
reset: function reset(
|
|
505
|
-
if (this.prev = 0, this.next = 0, this.sent = this._sent =
|
|
507
|
+
reset: function reset(e) {
|
|
508
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
506
509
|
},
|
|
507
510
|
stop: function stop() {
|
|
508
511
|
this.done = !0;
|
|
509
|
-
var
|
|
510
|
-
if ("throw" ===
|
|
512
|
+
var t = this.tryEntries[0].completion;
|
|
513
|
+
if ("throw" === t.type) throw t.arg;
|
|
511
514
|
return this.rval;
|
|
512
515
|
},
|
|
513
|
-
dispatchException: function dispatchException(
|
|
514
|
-
if (this.done) throw
|
|
515
|
-
var
|
|
516
|
-
function handle(
|
|
517
|
-
return
|
|
516
|
+
dispatchException: function dispatchException(e) {
|
|
517
|
+
if (this.done) throw e;
|
|
518
|
+
var r = this;
|
|
519
|
+
function handle(n, o) {
|
|
520
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
518
521
|
}
|
|
519
|
-
for (var
|
|
520
|
-
var
|
|
521
|
-
|
|
522
|
-
if ("root" ===
|
|
523
|
-
if (
|
|
524
|
-
var
|
|
525
|
-
|
|
526
|
-
if (
|
|
527
|
-
if (this.prev <
|
|
528
|
-
if (this.prev <
|
|
529
|
-
} else if (
|
|
530
|
-
if (this.prev <
|
|
522
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
523
|
+
var i = this.tryEntries[o],
|
|
524
|
+
a = i.completion;
|
|
525
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
526
|
+
if (i.tryLoc <= this.prev) {
|
|
527
|
+
var c = n.call(i, "catchLoc"),
|
|
528
|
+
u = n.call(i, "finallyLoc");
|
|
529
|
+
if (c && u) {
|
|
530
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
531
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
532
|
+
} else if (c) {
|
|
533
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
|
|
531
534
|
} else {
|
|
532
|
-
if (!
|
|
533
|
-
if (this.prev <
|
|
535
|
+
if (!u) throw new Error("try statement without catch or finally");
|
|
536
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
534
537
|
}
|
|
535
538
|
}
|
|
536
539
|
}
|
|
537
540
|
},
|
|
538
|
-
abrupt: function abrupt(
|
|
539
|
-
for (var
|
|
540
|
-
var
|
|
541
|
-
if (
|
|
542
|
-
var
|
|
541
|
+
abrupt: function abrupt(t, e) {
|
|
542
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
543
|
+
var o = this.tryEntries[r];
|
|
544
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
545
|
+
var i = o;
|
|
543
546
|
break;
|
|
544
547
|
}
|
|
545
548
|
}
|
|
546
|
-
|
|
547
|
-
var
|
|
548
|
-
return
|
|
549
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
550
|
+
var a = i ? i.completion : {};
|
|
551
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
549
552
|
},
|
|
550
|
-
complete: function complete(
|
|
551
|
-
if ("throw" ===
|
|
552
|
-
return "break" ===
|
|
553
|
+
complete: function complete(t, e) {
|
|
554
|
+
if ("throw" === t.type) throw t.arg;
|
|
555
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
553
556
|
},
|
|
554
|
-
finish: function finish(
|
|
555
|
-
for (var
|
|
556
|
-
var
|
|
557
|
-
if (
|
|
557
|
+
finish: function finish(t) {
|
|
558
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
559
|
+
var r = this.tryEntries[e];
|
|
560
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
558
561
|
}
|
|
559
562
|
},
|
|
560
|
-
"catch": function _catch(
|
|
561
|
-
for (var
|
|
562
|
-
var
|
|
563
|
-
if (
|
|
564
|
-
var
|
|
565
|
-
if ("throw" ===
|
|
566
|
-
var
|
|
567
|
-
resetTryEntry(
|
|
563
|
+
"catch": function _catch(t) {
|
|
564
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
565
|
+
var r = this.tryEntries[e];
|
|
566
|
+
if (r.tryLoc === t) {
|
|
567
|
+
var n = r.completion;
|
|
568
|
+
if ("throw" === n.type) {
|
|
569
|
+
var o = n.arg;
|
|
570
|
+
resetTryEntry(r);
|
|
568
571
|
}
|
|
569
|
-
return
|
|
572
|
+
return o;
|
|
570
573
|
}
|
|
571
574
|
}
|
|
572
575
|
throw new Error("illegal catch attempt");
|
|
573
576
|
},
|
|
574
|
-
delegateYield: function delegateYield(
|
|
577
|
+
delegateYield: function delegateYield(e, r, n) {
|
|
575
578
|
return this.delegate = {
|
|
576
|
-
iterator: values(
|
|
577
|
-
resultName:
|
|
578
|
-
nextLoc:
|
|
579
|
-
}, "next" === this.method && (this.arg =
|
|
579
|
+
iterator: values(e),
|
|
580
|
+
resultName: r,
|
|
581
|
+
nextLoc: n
|
|
582
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
580
583
|
}
|
|
581
|
-
},
|
|
584
|
+
}, e;
|
|
582
585
|
}
|
|
583
586
|
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
584
587
|
} (regeneratorRuntime$1));
|
|
@@ -824,8 +827,8 @@ var getValueFromBool = function getValueFromBool(value) {
|
|
|
824
827
|
};
|
|
825
828
|
|
|
826
829
|
var _excluded$6 = ["name", "id", "kind", "data", "individualSubmit", "formRef", "formRefs", "disabled", "isRequiredColumnName", "isInline", "onBlur"];
|
|
827
|
-
function ownKeys$g(
|
|
828
|
-
function _objectSpread$g(
|
|
830
|
+
function ownKeys$g(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
831
|
+
function _objectSpread$g(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$g(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$g(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
829
832
|
var useFormikFields = function useFormikFields(_ref) {
|
|
830
833
|
var name = _ref.name,
|
|
831
834
|
fieldId = _ref.id,
|
|
@@ -1015,7 +1018,7 @@ var Number$1 = function Number(props) {
|
|
|
1015
1018
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Input, _extends({}, fieldProps, {
|
|
1016
1019
|
type: "number",
|
|
1017
1020
|
suffix: showSubmitButton && /*#__PURE__*/React__default["default"].createElement(formik$1.Button, {
|
|
1018
|
-
"data-cy": utils.joinHyphenCase(fieldProps.label, "check-button"),
|
|
1021
|
+
"data-cy": utils$3.joinHyphenCase(fieldProps.label, "check-button"),
|
|
1019
1022
|
icon: neetoIcons.Check,
|
|
1020
1023
|
style: "text",
|
|
1021
1024
|
onClick: function onClick() {
|
|
@@ -1101,7 +1104,7 @@ var Text = function Text(props) {
|
|
|
1101
1104
|
var showSubmitButton = !isInline && individualSubmit && dirty;
|
|
1102
1105
|
return /*#__PURE__*/React__default["default"].createElement(neetoui.Input, _extends({}, fieldProps, {
|
|
1103
1106
|
suffix: showSubmitButton && /*#__PURE__*/React__default["default"].createElement(formik$1.Button, {
|
|
1104
|
-
"data-cy": utils.joinHyphenCase(fieldProps.label, "check-button"),
|
|
1107
|
+
"data-cy": utils$3.joinHyphenCase(fieldProps.label, "check-button"),
|
|
1105
1108
|
icon: neetoIcons.Check,
|
|
1106
1109
|
style: "text",
|
|
1107
1110
|
onClick: function onClick() {
|
|
@@ -1131,151 +1134,2199 @@ var TextArea = function TextArea(props) {
|
|
|
1131
1134
|
}));
|
|
1132
1135
|
};
|
|
1133
1136
|
|
|
1134
|
-
function ownKeys$f(
|
|
1135
|
-
function _objectSpread$f(
|
|
1136
|
-
var standardComponents = {
|
|
1137
|
-
text: Text,
|
|
1138
|
-
regex: Text,
|
|
1139
|
-
textarea: TextArea,
|
|
1140
|
-
text_area: TextArea,
|
|
1141
|
-
// TODO: Remove text-area after integration in all hosts.
|
|
1142
|
-
number: Number$1,
|
|
1143
|
-
monetary: Number$1,
|
|
1144
|
-
integer: Number$1,
|
|
1145
|
-
decimal: Number$1,
|
|
1146
|
-
date: DateOrTime,
|
|
1147
|
-
time: DateOrTime,
|
|
1148
|
-
datetime: DateOrTime,
|
|
1149
|
-
single_option: SingleOption,
|
|
1150
|
-
multi_option: MultiOption,
|
|
1151
|
-
date_range: RangePicker,
|
|
1152
|
-
time_range: RangePicker,
|
|
1153
|
-
checkbox: Checkbox
|
|
1154
|
-
};
|
|
1155
|
-
var getFieldInput = function getFieldInput(_ref) {
|
|
1156
|
-
var field = _ref.field,
|
|
1157
|
-
_ref$customComponents = _ref.customComponents,
|
|
1158
|
-
customComponents = _ref$customComponents === void 0 ? {} : _ref$customComponents;
|
|
1159
|
-
var Component = customComponents[field.kind] || standardComponents[field.kind];
|
|
1160
|
-
if (Component) {
|
|
1161
|
-
return Component;
|
|
1162
|
-
}
|
|
1163
|
-
return null;
|
|
1164
|
-
};
|
|
1165
|
-
var removeItemsWithNullData = function removeItemsWithNullData(fieldValues) {
|
|
1166
|
-
return fieldValues.filter(function (item) {
|
|
1167
|
-
return !ramda.isNil(ramda.prop("data", item));
|
|
1168
|
-
});
|
|
1169
|
-
};
|
|
1170
|
-
var removeNoiseFromValues = function removeNoiseFromValues(fieldValues) {
|
|
1171
|
-
return ramda.map(ramda.pick(["id", "fieldId", "data"]), fieldValues);
|
|
1137
|
+
function ownKeys$f(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1138
|
+
function _objectSpread$f(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$f(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$f(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1139
|
+
var standardComponents = {
|
|
1140
|
+
text: Text,
|
|
1141
|
+
regex: Text,
|
|
1142
|
+
textarea: TextArea,
|
|
1143
|
+
text_area: TextArea,
|
|
1144
|
+
// TODO: Remove text-area after integration in all hosts.
|
|
1145
|
+
number: Number$1,
|
|
1146
|
+
monetary: Number$1,
|
|
1147
|
+
integer: Number$1,
|
|
1148
|
+
decimal: Number$1,
|
|
1149
|
+
date: DateOrTime,
|
|
1150
|
+
time: DateOrTime,
|
|
1151
|
+
datetime: DateOrTime,
|
|
1152
|
+
single_option: SingleOption,
|
|
1153
|
+
multi_option: MultiOption,
|
|
1154
|
+
date_range: RangePicker,
|
|
1155
|
+
time_range: RangePicker,
|
|
1156
|
+
checkbox: Checkbox
|
|
1157
|
+
};
|
|
1158
|
+
var getFieldInput = function getFieldInput(_ref) {
|
|
1159
|
+
var field = _ref.field,
|
|
1160
|
+
_ref$customComponents = _ref.customComponents,
|
|
1161
|
+
customComponents = _ref$customComponents === void 0 ? {} : _ref$customComponents;
|
|
1162
|
+
var Component = customComponents[field.kind] || standardComponents[field.kind];
|
|
1163
|
+
if (Component) {
|
|
1164
|
+
return Component;
|
|
1165
|
+
}
|
|
1166
|
+
return null;
|
|
1167
|
+
};
|
|
1168
|
+
var removeItemsWithNullData = function removeItemsWithNullData(fieldValues) {
|
|
1169
|
+
return fieldValues.filter(function (item) {
|
|
1170
|
+
return !ramda.isNil(ramda.prop("data", item));
|
|
1171
|
+
});
|
|
1172
|
+
};
|
|
1173
|
+
var removeNoiseFromValues = function removeNoiseFromValues(fieldValues) {
|
|
1174
|
+
return ramda.map(ramda.pick(["id", "fieldId", "data"]), fieldValues);
|
|
1175
|
+
};
|
|
1176
|
+
var transformValues = function transformValues(_ref2) {
|
|
1177
|
+
var formikValues = _ref2.values,
|
|
1178
|
+
fields = _ref2.fields;
|
|
1179
|
+
var allFieldValues = ramda.clone(formikValues);
|
|
1180
|
+
var neetoFieldValues = [];
|
|
1181
|
+
fields.forEach(function (_ref3) {
|
|
1182
|
+
var id = _ref3.id,
|
|
1183
|
+
name = _ref3.name;
|
|
1184
|
+
var fieldPath = escapeString("".concat(name, "-").concat(id));
|
|
1185
|
+
neetoFieldValues.push(allFieldValues[fieldPath]);
|
|
1186
|
+
delete allFieldValues[fieldPath];
|
|
1187
|
+
});
|
|
1188
|
+
var cleanedFieldValues = ramda.pipe(removeItemsWithNullData, removeNoiseFromValues)(neetoFieldValues);
|
|
1189
|
+
return _objectSpread$f(_objectSpread$f({}, allFieldValues), {}, {
|
|
1190
|
+
fieldValuesAttributes: cleanedFieldValues
|
|
1191
|
+
});
|
|
1192
|
+
};
|
|
1193
|
+
var getDefaultInitialValue = function getDefaultInitialValue(kind) {
|
|
1194
|
+
switch (kind) {
|
|
1195
|
+
case KINDS.checkbox:
|
|
1196
|
+
return false;
|
|
1197
|
+
case KINDS.multiOption:
|
|
1198
|
+
case KINDS.dateRange:
|
|
1199
|
+
case KINDS.timeRange:
|
|
1200
|
+
return [];
|
|
1201
|
+
default:
|
|
1202
|
+
return "";
|
|
1203
|
+
}
|
|
1204
|
+
};
|
|
1205
|
+
var getInitialFieldValue = function getInitialFieldValue(_ref4) {
|
|
1206
|
+
var field = _ref4.field,
|
|
1207
|
+
_ref4$fieldValues = _ref4.fieldValues,
|
|
1208
|
+
fieldValues = _ref4$fieldValues === void 0 ? [] : _ref4$fieldValues,
|
|
1209
|
+
_ref4$isIndividualFie = _ref4.isIndividualFieldForm,
|
|
1210
|
+
isIndividualFieldForm = _ref4$isIndividualFie === void 0 ? false : _ref4$isIndividualFie;
|
|
1211
|
+
var existingFieldValueData = neetoCist.findBy({
|
|
1212
|
+
fieldId: field.id
|
|
1213
|
+
}, fieldValues);
|
|
1214
|
+
var keyInData = field.kind === KINDS.multiOption ? "values" : "value";
|
|
1215
|
+
var newFieldValueData = {
|
|
1216
|
+
fieldId: field.id,
|
|
1217
|
+
data: isIndividualFieldForm ? _defineProperty({}, keyInData, getDefaultInitialValue(field.kind)) : null
|
|
1218
|
+
};
|
|
1219
|
+
return _defineProperty({}, escapeString("".concat(field.name, "-").concat(field.id)), existingFieldValueData || newFieldValueData);
|
|
1220
|
+
};
|
|
1221
|
+
var getAllInitialFieldValues = function getAllInitialFieldValues(fields) {
|
|
1222
|
+
var fieldValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
1223
|
+
return getNonSystemFields(fields).map(function (field) {
|
|
1224
|
+
return getInitialFieldValue({
|
|
1225
|
+
field: field,
|
|
1226
|
+
fieldValues: fieldValues
|
|
1227
|
+
});
|
|
1228
|
+
});
|
|
1229
|
+
};
|
|
1230
|
+
var mergeInitialValues = function mergeInitialValues(_ref7) {
|
|
1231
|
+
var initialValues = _ref7.initialValues,
|
|
1232
|
+
fields = _ref7.fields;
|
|
1233
|
+
var initialValue = ramda.mergeAll([initialValues].concat(_toConsumableArray(getAllInitialFieldValues(fields, initialValues === null || initialValues === void 0 ? void 0 : initialValues.fieldValues))));
|
|
1234
|
+
return ramda.omit(["fieldValues"], initialValue);
|
|
1235
|
+
};
|
|
1236
|
+
var getNonSystemFields = function getNonSystemFields(fields) {
|
|
1237
|
+
return neetoCist.filterBy({
|
|
1238
|
+
isSystem: false
|
|
1239
|
+
}, fields);
|
|
1240
|
+
};
|
|
1241
|
+
var escapeString = function escapeString(string) {
|
|
1242
|
+
return string.replace(/[^a-zA-Z0-9_]/g, function (match) {
|
|
1243
|
+
var charCode = match.charCodeAt(0);
|
|
1244
|
+
return "_".concat(charCode, "_");
|
|
1245
|
+
});
|
|
1246
|
+
};
|
|
1247
|
+
var neetoFieldsUtils = {
|
|
1248
|
+
mergeInitialValues: mergeInitialValues,
|
|
1249
|
+
transformValues: transformValues
|
|
1250
|
+
};
|
|
1251
|
+
|
|
1252
|
+
function ownKeys$e(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1253
|
+
function _objectSpread$e(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$e(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$e(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1254
|
+
var FieldInputs = reactUtils.withT(function (_ref) {
|
|
1255
|
+
var t = _ref.t,
|
|
1256
|
+
_ref$customComponents = _ref.customComponents,
|
|
1257
|
+
customComponents = _ref$customComponents === void 0 ? {} : _ref$customComponents,
|
|
1258
|
+
fields = _ref.fields,
|
|
1259
|
+
formRef = _ref.formRef,
|
|
1260
|
+
disabled = _ref.disabled,
|
|
1261
|
+
isRequiredColumnName = _ref.isRequiredColumnName;
|
|
1262
|
+
return getNonSystemFields(fields).map(function (field) {
|
|
1263
|
+
var Field = getFieldInput({
|
|
1264
|
+
field: field,
|
|
1265
|
+
customComponents: customComponents
|
|
1266
|
+
});
|
|
1267
|
+
if (Field) {
|
|
1268
|
+
return /*#__PURE__*/React__default["default"].createElement(Field, _extends({
|
|
1269
|
+
key: field.id
|
|
1270
|
+
}, _objectSpread$e(_objectSpread$e({}, field), {}, {
|
|
1271
|
+
disabled: disabled,
|
|
1272
|
+
formRef: formRef,
|
|
1273
|
+
isRequiredColumnName: isRequiredColumnName
|
|
1274
|
+
})));
|
|
1275
|
+
}
|
|
1276
|
+
return /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
1277
|
+
key: field.id,
|
|
1278
|
+
style: "body2"
|
|
1279
|
+
}, t("neetoFields.messages.invalidKind"));
|
|
1280
|
+
});
|
|
1281
|
+
});
|
|
1282
|
+
|
|
1283
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
1284
|
+
var shams = function hasSymbols() {
|
|
1285
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
1286
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
1287
|
+
|
|
1288
|
+
var obj = {};
|
|
1289
|
+
var sym = Symbol('test');
|
|
1290
|
+
var symObj = Object(sym);
|
|
1291
|
+
if (typeof sym === 'string') { return false; }
|
|
1292
|
+
|
|
1293
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
1294
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
1295
|
+
|
|
1296
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
1297
|
+
// if (sym instanceof Symbol) { return false; }
|
|
1298
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
1299
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
1300
|
+
|
|
1301
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
1302
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
1303
|
+
|
|
1304
|
+
var symVal = 42;
|
|
1305
|
+
obj[sym] = symVal;
|
|
1306
|
+
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
1307
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
1308
|
+
|
|
1309
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
1310
|
+
|
|
1311
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
1312
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
1313
|
+
|
|
1314
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
1315
|
+
|
|
1316
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
1317
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
1318
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
return true;
|
|
1322
|
+
};
|
|
1323
|
+
|
|
1324
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
1325
|
+
var hasSymbolSham = shams;
|
|
1326
|
+
|
|
1327
|
+
var hasSymbols$1 = function hasNativeSymbols() {
|
|
1328
|
+
if (typeof origSymbol !== 'function') { return false; }
|
|
1329
|
+
if (typeof Symbol !== 'function') { return false; }
|
|
1330
|
+
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
1331
|
+
if (typeof Symbol('bar') !== 'symbol') { return false; }
|
|
1332
|
+
|
|
1333
|
+
return hasSymbolSham();
|
|
1334
|
+
};
|
|
1335
|
+
|
|
1336
|
+
var test = {
|
|
1337
|
+
foo: {}
|
|
1338
|
+
};
|
|
1339
|
+
|
|
1340
|
+
var $Object = Object;
|
|
1341
|
+
|
|
1342
|
+
var hasProto$1 = function hasProto() {
|
|
1343
|
+
return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
|
|
1344
|
+
};
|
|
1345
|
+
|
|
1346
|
+
/* eslint no-invalid-this: 1 */
|
|
1347
|
+
|
|
1348
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
1349
|
+
var slice = Array.prototype.slice;
|
|
1350
|
+
var toStr$1 = Object.prototype.toString;
|
|
1351
|
+
var funcType = '[object Function]';
|
|
1352
|
+
|
|
1353
|
+
var implementation$1 = function bind(that) {
|
|
1354
|
+
var target = this;
|
|
1355
|
+
if (typeof target !== 'function' || toStr$1.call(target) !== funcType) {
|
|
1356
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
1357
|
+
}
|
|
1358
|
+
var args = slice.call(arguments, 1);
|
|
1359
|
+
|
|
1360
|
+
var bound;
|
|
1361
|
+
var binder = function () {
|
|
1362
|
+
if (this instanceof bound) {
|
|
1363
|
+
var result = target.apply(
|
|
1364
|
+
this,
|
|
1365
|
+
args.concat(slice.call(arguments))
|
|
1366
|
+
);
|
|
1367
|
+
if (Object(result) === result) {
|
|
1368
|
+
return result;
|
|
1369
|
+
}
|
|
1370
|
+
return this;
|
|
1371
|
+
} else {
|
|
1372
|
+
return target.apply(
|
|
1373
|
+
that,
|
|
1374
|
+
args.concat(slice.call(arguments))
|
|
1375
|
+
);
|
|
1376
|
+
}
|
|
1377
|
+
};
|
|
1378
|
+
|
|
1379
|
+
var boundLength = Math.max(0, target.length - args.length);
|
|
1380
|
+
var boundArgs = [];
|
|
1381
|
+
for (var i = 0; i < boundLength; i++) {
|
|
1382
|
+
boundArgs.push('$' + i);
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
1386
|
+
|
|
1387
|
+
if (target.prototype) {
|
|
1388
|
+
var Empty = function Empty() {};
|
|
1389
|
+
Empty.prototype = target.prototype;
|
|
1390
|
+
bound.prototype = new Empty();
|
|
1391
|
+
Empty.prototype = null;
|
|
1392
|
+
}
|
|
1393
|
+
|
|
1394
|
+
return bound;
|
|
1395
|
+
};
|
|
1396
|
+
|
|
1397
|
+
var implementation = implementation$1;
|
|
1398
|
+
|
|
1399
|
+
var functionBind = Function.prototype.bind || implementation;
|
|
1400
|
+
|
|
1401
|
+
var bind$1 = functionBind;
|
|
1402
|
+
|
|
1403
|
+
var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
|
|
1404
|
+
|
|
1405
|
+
var undefined$1;
|
|
1406
|
+
|
|
1407
|
+
var $SyntaxError = SyntaxError;
|
|
1408
|
+
var $Function = Function;
|
|
1409
|
+
var $TypeError$1 = TypeError;
|
|
1410
|
+
|
|
1411
|
+
// eslint-disable-next-line consistent-return
|
|
1412
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
1413
|
+
try {
|
|
1414
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
1415
|
+
} catch (e) {}
|
|
1416
|
+
};
|
|
1417
|
+
|
|
1418
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
1419
|
+
if ($gOPD) {
|
|
1420
|
+
try {
|
|
1421
|
+
$gOPD({}, '');
|
|
1422
|
+
} catch (e) {
|
|
1423
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
var throwTypeError = function () {
|
|
1428
|
+
throw new $TypeError$1();
|
|
1429
|
+
};
|
|
1430
|
+
var ThrowTypeError = $gOPD
|
|
1431
|
+
? (function () {
|
|
1432
|
+
try {
|
|
1433
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
1434
|
+
arguments.callee; // IE 8 does not throw here
|
|
1435
|
+
return throwTypeError;
|
|
1436
|
+
} catch (calleeThrows) {
|
|
1437
|
+
try {
|
|
1438
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
1439
|
+
return $gOPD(arguments, 'callee').get;
|
|
1440
|
+
} catch (gOPDthrows) {
|
|
1441
|
+
return throwTypeError;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
}())
|
|
1445
|
+
: throwTypeError;
|
|
1446
|
+
|
|
1447
|
+
var hasSymbols = hasSymbols$1();
|
|
1448
|
+
var hasProto = hasProto$1();
|
|
1449
|
+
|
|
1450
|
+
var getProto = Object.getPrototypeOf || (
|
|
1451
|
+
hasProto
|
|
1452
|
+
? function (x) { return x.__proto__; } // eslint-disable-line no-proto
|
|
1453
|
+
: null
|
|
1454
|
+
);
|
|
1455
|
+
|
|
1456
|
+
var needsEval = {};
|
|
1457
|
+
|
|
1458
|
+
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
1459
|
+
|
|
1460
|
+
var INTRINSICS = {
|
|
1461
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
1462
|
+
'%Array%': Array,
|
|
1463
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
1464
|
+
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
1465
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
1466
|
+
'%AsyncFunction%': needsEval,
|
|
1467
|
+
'%AsyncGenerator%': needsEval,
|
|
1468
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
1469
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
1470
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
1471
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
1472
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
1473
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
1474
|
+
'%Boolean%': Boolean,
|
|
1475
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
1476
|
+
'%Date%': Date,
|
|
1477
|
+
'%decodeURI%': decodeURI,
|
|
1478
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
1479
|
+
'%encodeURI%': encodeURI,
|
|
1480
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
1481
|
+
'%Error%': Error,
|
|
1482
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
1483
|
+
'%EvalError%': EvalError,
|
|
1484
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
1485
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
1486
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
1487
|
+
'%Function%': $Function,
|
|
1488
|
+
'%GeneratorFunction%': needsEval,
|
|
1489
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
1490
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
1491
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
1492
|
+
'%isFinite%': isFinite,
|
|
1493
|
+
'%isNaN%': isNaN,
|
|
1494
|
+
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
1495
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
1496
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
1497
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
1498
|
+
'%Math%': Math,
|
|
1499
|
+
'%Number%': Number,
|
|
1500
|
+
'%Object%': Object,
|
|
1501
|
+
'%parseFloat%': parseFloat,
|
|
1502
|
+
'%parseInt%': parseInt,
|
|
1503
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
1504
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
1505
|
+
'%RangeError%': RangeError,
|
|
1506
|
+
'%ReferenceError%': ReferenceError,
|
|
1507
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
1508
|
+
'%RegExp%': RegExp,
|
|
1509
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
1510
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
1511
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
1512
|
+
'%String%': String,
|
|
1513
|
+
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
1514
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
1515
|
+
'%SyntaxError%': $SyntaxError,
|
|
1516
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
1517
|
+
'%TypedArray%': TypedArray,
|
|
1518
|
+
'%TypeError%': $TypeError$1,
|
|
1519
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
1520
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
1521
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
1522
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
1523
|
+
'%URIError%': URIError,
|
|
1524
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
1525
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
1526
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
1527
|
+
};
|
|
1528
|
+
|
|
1529
|
+
if (getProto) {
|
|
1530
|
+
try {
|
|
1531
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
1532
|
+
} catch (e) {
|
|
1533
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
1534
|
+
var errorProto = getProto(getProto(e));
|
|
1535
|
+
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
var doEval = function doEval(name) {
|
|
1540
|
+
var value;
|
|
1541
|
+
if (name === '%AsyncFunction%') {
|
|
1542
|
+
value = getEvalledConstructor('async function () {}');
|
|
1543
|
+
} else if (name === '%GeneratorFunction%') {
|
|
1544
|
+
value = getEvalledConstructor('function* () {}');
|
|
1545
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
1546
|
+
value = getEvalledConstructor('async function* () {}');
|
|
1547
|
+
} else if (name === '%AsyncGenerator%') {
|
|
1548
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
1549
|
+
if (fn) {
|
|
1550
|
+
value = fn.prototype;
|
|
1551
|
+
}
|
|
1552
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
1553
|
+
var gen = doEval('%AsyncGenerator%');
|
|
1554
|
+
if (gen && getProto) {
|
|
1555
|
+
value = getProto(gen.prototype);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
|
|
1559
|
+
INTRINSICS[name] = value;
|
|
1560
|
+
|
|
1561
|
+
return value;
|
|
1562
|
+
};
|
|
1563
|
+
|
|
1564
|
+
var LEGACY_ALIASES = {
|
|
1565
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
1566
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
1567
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
1568
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
1569
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
1570
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
1571
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
1572
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
1573
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
1574
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
1575
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
1576
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
1577
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
1578
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
1579
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
1580
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
1581
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
1582
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
1583
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
1584
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
1585
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
1586
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
1587
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
1588
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
1589
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
1590
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
1591
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
1592
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
1593
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
1594
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
1595
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
1596
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
1597
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
1598
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
1599
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
1600
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
1601
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
1602
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
1603
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
1604
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
1605
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
1606
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
1607
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
1608
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
1609
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
1610
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
1611
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
1612
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
1613
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
1614
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
1615
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
var bind = functionBind;
|
|
1619
|
+
var hasOwn$1 = src;
|
|
1620
|
+
var $concat$1 = bind.call(Function.call, Array.prototype.concat);
|
|
1621
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
1622
|
+
var $replace$1 = bind.call(Function.call, String.prototype.replace);
|
|
1623
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
1624
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
1625
|
+
|
|
1626
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
1627
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1628
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
1629
|
+
var stringToPath = function stringToPath(string) {
|
|
1630
|
+
var first = $strSlice(string, 0, 1);
|
|
1631
|
+
var last = $strSlice(string, -1);
|
|
1632
|
+
if (first === '%' && last !== '%') {
|
|
1633
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
1634
|
+
} else if (last === '%' && first !== '%') {
|
|
1635
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
1636
|
+
}
|
|
1637
|
+
var result = [];
|
|
1638
|
+
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
1639
|
+
result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
|
|
1640
|
+
});
|
|
1641
|
+
return result;
|
|
1642
|
+
};
|
|
1643
|
+
/* end adaptation */
|
|
1644
|
+
|
|
1645
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1646
|
+
var intrinsicName = name;
|
|
1647
|
+
var alias;
|
|
1648
|
+
if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
|
|
1649
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1650
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
if (hasOwn$1(INTRINSICS, intrinsicName)) {
|
|
1654
|
+
var value = INTRINSICS[intrinsicName];
|
|
1655
|
+
if (value === needsEval) {
|
|
1656
|
+
value = doEval(intrinsicName);
|
|
1657
|
+
}
|
|
1658
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
1659
|
+
throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
return {
|
|
1663
|
+
alias: alias,
|
|
1664
|
+
name: intrinsicName,
|
|
1665
|
+
value: value
|
|
1666
|
+
};
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
1670
|
+
};
|
|
1671
|
+
|
|
1672
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
1673
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
1674
|
+
throw new $TypeError$1('intrinsic name must be a non-empty string');
|
|
1675
|
+
}
|
|
1676
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
1677
|
+
throw new $TypeError$1('"allowMissing" argument must be a boolean');
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1681
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
1682
|
+
}
|
|
1683
|
+
var parts = stringToPath(name);
|
|
1684
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1685
|
+
|
|
1686
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
1687
|
+
var intrinsicRealName = intrinsic.name;
|
|
1688
|
+
var value = intrinsic.value;
|
|
1689
|
+
var skipFurtherCaching = false;
|
|
1690
|
+
|
|
1691
|
+
var alias = intrinsic.alias;
|
|
1692
|
+
if (alias) {
|
|
1693
|
+
intrinsicBaseName = alias[0];
|
|
1694
|
+
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1698
|
+
var part = parts[i];
|
|
1699
|
+
var first = $strSlice(part, 0, 1);
|
|
1700
|
+
var last = $strSlice(part, -1);
|
|
1701
|
+
if (
|
|
1702
|
+
(
|
|
1703
|
+
(first === '"' || first === "'" || first === '`')
|
|
1704
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
1705
|
+
)
|
|
1706
|
+
&& first !== last
|
|
1707
|
+
) {
|
|
1708
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
1709
|
+
}
|
|
1710
|
+
if (part === 'constructor' || !isOwn) {
|
|
1711
|
+
skipFurtherCaching = true;
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
intrinsicBaseName += '.' + part;
|
|
1715
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
1716
|
+
|
|
1717
|
+
if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
|
|
1718
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1719
|
+
} else if (value != null) {
|
|
1720
|
+
if (!(part in value)) {
|
|
1721
|
+
if (!allowMissing) {
|
|
1722
|
+
throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1723
|
+
}
|
|
1724
|
+
return void undefined$1;
|
|
1725
|
+
}
|
|
1726
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
1727
|
+
var desc = $gOPD(value, part);
|
|
1728
|
+
isOwn = !!desc;
|
|
1729
|
+
|
|
1730
|
+
// By convention, when a data property is converted to an accessor
|
|
1731
|
+
// property to emulate a data property that does not suffer from
|
|
1732
|
+
// the override mistake, that accessor's getter is marked with
|
|
1733
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
1734
|
+
// uphold the illusion by pretending to see that original data
|
|
1735
|
+
// property, i.e., returning the value rather than the getter
|
|
1736
|
+
// itself.
|
|
1737
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1738
|
+
value = desc.get;
|
|
1739
|
+
} else {
|
|
1740
|
+
value = value[part];
|
|
1741
|
+
}
|
|
1742
|
+
} else {
|
|
1743
|
+
isOwn = hasOwn$1(value, part);
|
|
1744
|
+
value = value[part];
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1748
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
return value;
|
|
1753
|
+
};
|
|
1754
|
+
|
|
1755
|
+
var callBind$1 = {exports: {}};
|
|
1756
|
+
|
|
1757
|
+
callBind$1.exports;
|
|
1758
|
+
|
|
1759
|
+
(function (module) {
|
|
1760
|
+
|
|
1761
|
+
var bind = functionBind;
|
|
1762
|
+
var GetIntrinsic = getIntrinsic;
|
|
1763
|
+
|
|
1764
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
1765
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
1766
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
1767
|
+
|
|
1768
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
1769
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
1770
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
1771
|
+
|
|
1772
|
+
if ($defineProperty) {
|
|
1773
|
+
try {
|
|
1774
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
1775
|
+
} catch (e) {
|
|
1776
|
+
// IE 8 has a broken defineProperty
|
|
1777
|
+
$defineProperty = null;
|
|
1778
|
+
}
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
module.exports = function callBind(originalFunction) {
|
|
1782
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
1783
|
+
if ($gOPD && $defineProperty) {
|
|
1784
|
+
var desc = $gOPD(func, 'length');
|
|
1785
|
+
if (desc.configurable) {
|
|
1786
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
1787
|
+
$defineProperty(
|
|
1788
|
+
func,
|
|
1789
|
+
'length',
|
|
1790
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
1791
|
+
);
|
|
1792
|
+
}
|
|
1793
|
+
}
|
|
1794
|
+
return func;
|
|
1795
|
+
};
|
|
1796
|
+
|
|
1797
|
+
var applyBind = function applyBind() {
|
|
1798
|
+
return $reflectApply(bind, $apply, arguments);
|
|
1799
|
+
};
|
|
1800
|
+
|
|
1801
|
+
if ($defineProperty) {
|
|
1802
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
1803
|
+
} else {
|
|
1804
|
+
module.exports.apply = applyBind;
|
|
1805
|
+
}
|
|
1806
|
+
} (callBind$1));
|
|
1807
|
+
|
|
1808
|
+
var callBindExports = callBind$1.exports;
|
|
1809
|
+
|
|
1810
|
+
var GetIntrinsic$1 = getIntrinsic;
|
|
1811
|
+
|
|
1812
|
+
var callBind = callBindExports;
|
|
1813
|
+
|
|
1814
|
+
var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
|
|
1815
|
+
|
|
1816
|
+
var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
|
|
1817
|
+
var intrinsic = GetIntrinsic$1(name, !!allowMissing);
|
|
1818
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
1819
|
+
return callBind(intrinsic);
|
|
1820
|
+
}
|
|
1821
|
+
return intrinsic;
|
|
1822
|
+
};
|
|
1823
|
+
|
|
1824
|
+
var util_inspect = require$$0__default["default"].inspect;
|
|
1825
|
+
|
|
1826
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
1827
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
1828
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
1829
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
1830
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
1831
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
1832
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
1833
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
1834
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
1835
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
1836
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
1837
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
1838
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
1839
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
1840
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
1841
|
+
var objectToString = Object.prototype.toString;
|
|
1842
|
+
var functionToString = Function.prototype.toString;
|
|
1843
|
+
var $match = String.prototype.match;
|
|
1844
|
+
var $slice = String.prototype.slice;
|
|
1845
|
+
var $replace = String.prototype.replace;
|
|
1846
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
1847
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
1848
|
+
var $test = RegExp.prototype.test;
|
|
1849
|
+
var $concat = Array.prototype.concat;
|
|
1850
|
+
var $join = Array.prototype.join;
|
|
1851
|
+
var $arrSlice = Array.prototype.slice;
|
|
1852
|
+
var $floor = Math.floor;
|
|
1853
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
1854
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
1855
|
+
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
|
|
1856
|
+
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
|
|
1857
|
+
// ie, `has-tostringtag/shams
|
|
1858
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
|
|
1859
|
+
? Symbol.toStringTag
|
|
1860
|
+
: null;
|
|
1861
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1862
|
+
|
|
1863
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
|
|
1864
|
+
[].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
1865
|
+
? function (O) {
|
|
1866
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
1867
|
+
}
|
|
1868
|
+
: null
|
|
1869
|
+
);
|
|
1870
|
+
|
|
1871
|
+
function addNumericSeparator(num, str) {
|
|
1872
|
+
if (
|
|
1873
|
+
num === Infinity
|
|
1874
|
+
|| num === -Infinity
|
|
1875
|
+
|| num !== num
|
|
1876
|
+
|| (num && num > -1000 && num < 1000)
|
|
1877
|
+
|| $test.call(/e/, str)
|
|
1878
|
+
) {
|
|
1879
|
+
return str;
|
|
1880
|
+
}
|
|
1881
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
1882
|
+
if (typeof num === 'number') {
|
|
1883
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
1884
|
+
if (int !== num) {
|
|
1885
|
+
var intStr = String(int);
|
|
1886
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
1887
|
+
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
return $replace.call(str, sepRegex, '$&_');
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
var utilInspect = util_inspect;
|
|
1894
|
+
var inspectCustom = utilInspect.custom;
|
|
1895
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
1896
|
+
|
|
1897
|
+
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
1898
|
+
var opts = options || {};
|
|
1899
|
+
|
|
1900
|
+
if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
|
|
1901
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
1902
|
+
}
|
|
1903
|
+
if (
|
|
1904
|
+
has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
|
|
1905
|
+
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
|
|
1906
|
+
: opts.maxStringLength !== null
|
|
1907
|
+
)
|
|
1908
|
+
) {
|
|
1909
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
1910
|
+
}
|
|
1911
|
+
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
1912
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
1913
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
if (
|
|
1917
|
+
has$3(opts, 'indent')
|
|
1918
|
+
&& opts.indent !== null
|
|
1919
|
+
&& opts.indent !== '\t'
|
|
1920
|
+
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
|
|
1921
|
+
) {
|
|
1922
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
1923
|
+
}
|
|
1924
|
+
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
1925
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
1926
|
+
}
|
|
1927
|
+
var numericSeparator = opts.numericSeparator;
|
|
1928
|
+
|
|
1929
|
+
if (typeof obj === 'undefined') {
|
|
1930
|
+
return 'undefined';
|
|
1931
|
+
}
|
|
1932
|
+
if (obj === null) {
|
|
1933
|
+
return 'null';
|
|
1934
|
+
}
|
|
1935
|
+
if (typeof obj === 'boolean') {
|
|
1936
|
+
return obj ? 'true' : 'false';
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
if (typeof obj === 'string') {
|
|
1940
|
+
return inspectString(obj, opts);
|
|
1941
|
+
}
|
|
1942
|
+
if (typeof obj === 'number') {
|
|
1943
|
+
if (obj === 0) {
|
|
1944
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
1945
|
+
}
|
|
1946
|
+
var str = String(obj);
|
|
1947
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
1948
|
+
}
|
|
1949
|
+
if (typeof obj === 'bigint') {
|
|
1950
|
+
var bigIntStr = String(obj) + 'n';
|
|
1951
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
1955
|
+
if (typeof depth === 'undefined') { depth = 0; }
|
|
1956
|
+
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
|
|
1957
|
+
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
1958
|
+
}
|
|
1959
|
+
|
|
1960
|
+
var indent = getIndent(opts, depth);
|
|
1961
|
+
|
|
1962
|
+
if (typeof seen === 'undefined') {
|
|
1963
|
+
seen = [];
|
|
1964
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
1965
|
+
return '[Circular]';
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1968
|
+
function inspect(value, from, noIndent) {
|
|
1969
|
+
if (from) {
|
|
1970
|
+
seen = $arrSlice.call(seen);
|
|
1971
|
+
seen.push(from);
|
|
1972
|
+
}
|
|
1973
|
+
if (noIndent) {
|
|
1974
|
+
var newOpts = {
|
|
1975
|
+
depth: opts.depth
|
|
1976
|
+
};
|
|
1977
|
+
if (has$3(opts, 'quoteStyle')) {
|
|
1978
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
1979
|
+
}
|
|
1980
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
1981
|
+
}
|
|
1982
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
|
|
1986
|
+
var name = nameOf(obj);
|
|
1987
|
+
var keys = arrObjKeys(obj, inspect);
|
|
1988
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
1989
|
+
}
|
|
1990
|
+
if (isSymbol(obj)) {
|
|
1991
|
+
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
1992
|
+
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
1993
|
+
}
|
|
1994
|
+
if (isElement(obj)) {
|
|
1995
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
1996
|
+
var attrs = obj.attributes || [];
|
|
1997
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
1998
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
1999
|
+
}
|
|
2000
|
+
s += '>';
|
|
2001
|
+
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
|
|
2002
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
2003
|
+
return s;
|
|
2004
|
+
}
|
|
2005
|
+
if (isArray$3(obj)) {
|
|
2006
|
+
if (obj.length === 0) { return '[]'; }
|
|
2007
|
+
var xs = arrObjKeys(obj, inspect);
|
|
2008
|
+
if (indent && !singleLineValues(xs)) {
|
|
2009
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
2010
|
+
}
|
|
2011
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
2012
|
+
}
|
|
2013
|
+
if (isError(obj)) {
|
|
2014
|
+
var parts = arrObjKeys(obj, inspect);
|
|
2015
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
2016
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
2017
|
+
}
|
|
2018
|
+
if (parts.length === 0) { return '[' + String(obj) + ']'; }
|
|
2019
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
2020
|
+
}
|
|
2021
|
+
if (typeof obj === 'object' && customInspect) {
|
|
2022
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
2023
|
+
return utilInspect(obj, { depth: maxDepth - depth });
|
|
2024
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
2025
|
+
return obj.inspect();
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
if (isMap(obj)) {
|
|
2029
|
+
var mapParts = [];
|
|
2030
|
+
if (mapForEach) {
|
|
2031
|
+
mapForEach.call(obj, function (value, key) {
|
|
2032
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
2033
|
+
});
|
|
2034
|
+
}
|
|
2035
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
2036
|
+
}
|
|
2037
|
+
if (isSet(obj)) {
|
|
2038
|
+
var setParts = [];
|
|
2039
|
+
if (setForEach) {
|
|
2040
|
+
setForEach.call(obj, function (value) {
|
|
2041
|
+
setParts.push(inspect(value, obj));
|
|
2042
|
+
});
|
|
2043
|
+
}
|
|
2044
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
2045
|
+
}
|
|
2046
|
+
if (isWeakMap(obj)) {
|
|
2047
|
+
return weakCollectionOf('WeakMap');
|
|
2048
|
+
}
|
|
2049
|
+
if (isWeakSet(obj)) {
|
|
2050
|
+
return weakCollectionOf('WeakSet');
|
|
2051
|
+
}
|
|
2052
|
+
if (isWeakRef(obj)) {
|
|
2053
|
+
return weakCollectionOf('WeakRef');
|
|
2054
|
+
}
|
|
2055
|
+
if (isNumber(obj)) {
|
|
2056
|
+
return markBoxed(inspect(Number(obj)));
|
|
2057
|
+
}
|
|
2058
|
+
if (isBigInt(obj)) {
|
|
2059
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
2060
|
+
}
|
|
2061
|
+
if (isBoolean(obj)) {
|
|
2062
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
2063
|
+
}
|
|
2064
|
+
if (isString(obj)) {
|
|
2065
|
+
return markBoxed(inspect(String(obj)));
|
|
2066
|
+
}
|
|
2067
|
+
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
2068
|
+
var ys = arrObjKeys(obj, inspect);
|
|
2069
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
2070
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
2071
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
2072
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
2073
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
2074
|
+
if (ys.length === 0) { return tag + '{}'; }
|
|
2075
|
+
if (indent) {
|
|
2076
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
2077
|
+
}
|
|
2078
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
2079
|
+
}
|
|
2080
|
+
return String(obj);
|
|
2081
|
+
};
|
|
2082
|
+
|
|
2083
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
2084
|
+
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
|
|
2085
|
+
return quoteChar + s + quoteChar;
|
|
2086
|
+
}
|
|
2087
|
+
|
|
2088
|
+
function quote(s) {
|
|
2089
|
+
return $replace.call(String(s), /"/g, '"');
|
|
2090
|
+
}
|
|
2091
|
+
|
|
2092
|
+
function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2093
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2094
|
+
function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2095
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2096
|
+
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2097
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2098
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
|
|
2099
|
+
|
|
2100
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
2101
|
+
function isSymbol(obj) {
|
|
2102
|
+
if (hasShammedSymbols) {
|
|
2103
|
+
return obj && typeof obj === 'object' && obj instanceof Symbol;
|
|
2104
|
+
}
|
|
2105
|
+
if (typeof obj === 'symbol') {
|
|
2106
|
+
return true;
|
|
2107
|
+
}
|
|
2108
|
+
if (!obj || typeof obj !== 'object' || !symToString) {
|
|
2109
|
+
return false;
|
|
2110
|
+
}
|
|
2111
|
+
try {
|
|
2112
|
+
symToString.call(obj);
|
|
2113
|
+
return true;
|
|
2114
|
+
} catch (e) {}
|
|
2115
|
+
return false;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
function isBigInt(obj) {
|
|
2119
|
+
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
|
|
2120
|
+
return false;
|
|
2121
|
+
}
|
|
2122
|
+
try {
|
|
2123
|
+
bigIntValueOf.call(obj);
|
|
2124
|
+
return true;
|
|
2125
|
+
} catch (e) {}
|
|
2126
|
+
return false;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
|
|
2130
|
+
function has$3(obj, key) {
|
|
2131
|
+
return hasOwn.call(obj, key);
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
function toStr(obj) {
|
|
2135
|
+
return objectToString.call(obj);
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
function nameOf(f) {
|
|
2139
|
+
if (f.name) { return f.name; }
|
|
2140
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
2141
|
+
if (m) { return m[1]; }
|
|
2142
|
+
return null;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
function indexOf(xs, x) {
|
|
2146
|
+
if (xs.indexOf) { return xs.indexOf(x); }
|
|
2147
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
2148
|
+
if (xs[i] === x) { return i; }
|
|
2149
|
+
}
|
|
2150
|
+
return -1;
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2153
|
+
function isMap(x) {
|
|
2154
|
+
if (!mapSize || !x || typeof x !== 'object') {
|
|
2155
|
+
return false;
|
|
2156
|
+
}
|
|
2157
|
+
try {
|
|
2158
|
+
mapSize.call(x);
|
|
2159
|
+
try {
|
|
2160
|
+
setSize.call(x);
|
|
2161
|
+
} catch (s) {
|
|
2162
|
+
return true;
|
|
2163
|
+
}
|
|
2164
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
2165
|
+
} catch (e) {}
|
|
2166
|
+
return false;
|
|
2167
|
+
}
|
|
2168
|
+
|
|
2169
|
+
function isWeakMap(x) {
|
|
2170
|
+
if (!weakMapHas || !x || typeof x !== 'object') {
|
|
2171
|
+
return false;
|
|
2172
|
+
}
|
|
2173
|
+
try {
|
|
2174
|
+
weakMapHas.call(x, weakMapHas);
|
|
2175
|
+
try {
|
|
2176
|
+
weakSetHas.call(x, weakSetHas);
|
|
2177
|
+
} catch (s) {
|
|
2178
|
+
return true;
|
|
2179
|
+
}
|
|
2180
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
2181
|
+
} catch (e) {}
|
|
2182
|
+
return false;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
function isWeakRef(x) {
|
|
2186
|
+
if (!weakRefDeref || !x || typeof x !== 'object') {
|
|
2187
|
+
return false;
|
|
2188
|
+
}
|
|
2189
|
+
try {
|
|
2190
|
+
weakRefDeref.call(x);
|
|
2191
|
+
return true;
|
|
2192
|
+
} catch (e) {}
|
|
2193
|
+
return false;
|
|
2194
|
+
}
|
|
2195
|
+
|
|
2196
|
+
function isSet(x) {
|
|
2197
|
+
if (!setSize || !x || typeof x !== 'object') {
|
|
2198
|
+
return false;
|
|
2199
|
+
}
|
|
2200
|
+
try {
|
|
2201
|
+
setSize.call(x);
|
|
2202
|
+
try {
|
|
2203
|
+
mapSize.call(x);
|
|
2204
|
+
} catch (m) {
|
|
2205
|
+
return true;
|
|
2206
|
+
}
|
|
2207
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
2208
|
+
} catch (e) {}
|
|
2209
|
+
return false;
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
function isWeakSet(x) {
|
|
2213
|
+
if (!weakSetHas || !x || typeof x !== 'object') {
|
|
2214
|
+
return false;
|
|
2215
|
+
}
|
|
2216
|
+
try {
|
|
2217
|
+
weakSetHas.call(x, weakSetHas);
|
|
2218
|
+
try {
|
|
2219
|
+
weakMapHas.call(x, weakMapHas);
|
|
2220
|
+
} catch (s) {
|
|
2221
|
+
return true;
|
|
2222
|
+
}
|
|
2223
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
2224
|
+
} catch (e) {}
|
|
2225
|
+
return false;
|
|
2226
|
+
}
|
|
2227
|
+
|
|
2228
|
+
function isElement(x) {
|
|
2229
|
+
if (!x || typeof x !== 'object') { return false; }
|
|
2230
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
2231
|
+
return true;
|
|
2232
|
+
}
|
|
2233
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
function inspectString(str, opts) {
|
|
2237
|
+
if (str.length > opts.maxStringLength) {
|
|
2238
|
+
var remaining = str.length - opts.maxStringLength;
|
|
2239
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
2240
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
2241
|
+
}
|
|
2242
|
+
// eslint-disable-next-line no-control-regex
|
|
2243
|
+
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
2244
|
+
return wrapQuotes(s, 'single', opts);
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
function lowbyte(c) {
|
|
2248
|
+
var n = c.charCodeAt(0);
|
|
2249
|
+
var x = {
|
|
2250
|
+
8: 'b',
|
|
2251
|
+
9: 't',
|
|
2252
|
+
10: 'n',
|
|
2253
|
+
12: 'f',
|
|
2254
|
+
13: 'r'
|
|
2255
|
+
}[n];
|
|
2256
|
+
if (x) { return '\\' + x; }
|
|
2257
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
2258
|
+
}
|
|
2259
|
+
|
|
2260
|
+
function markBoxed(str) {
|
|
2261
|
+
return 'Object(' + str + ')';
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
function weakCollectionOf(type) {
|
|
2265
|
+
return type + ' { ? }';
|
|
2266
|
+
}
|
|
2267
|
+
|
|
2268
|
+
function collectionOf(type, size, entries, indent) {
|
|
2269
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
2270
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
function singleLineValues(xs) {
|
|
2274
|
+
for (var i = 0; i < xs.length; i++) {
|
|
2275
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
2276
|
+
return false;
|
|
2277
|
+
}
|
|
2278
|
+
}
|
|
2279
|
+
return true;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
function getIndent(opts, depth) {
|
|
2283
|
+
var baseIndent;
|
|
2284
|
+
if (opts.indent === '\t') {
|
|
2285
|
+
baseIndent = '\t';
|
|
2286
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
2287
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
2288
|
+
} else {
|
|
2289
|
+
return null;
|
|
2290
|
+
}
|
|
2291
|
+
return {
|
|
2292
|
+
base: baseIndent,
|
|
2293
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
function indentedJoin(xs, indent) {
|
|
2298
|
+
if (xs.length === 0) { return ''; }
|
|
2299
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
2300
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
function arrObjKeys(obj, inspect) {
|
|
2304
|
+
var isArr = isArray$3(obj);
|
|
2305
|
+
var xs = [];
|
|
2306
|
+
if (isArr) {
|
|
2307
|
+
xs.length = obj.length;
|
|
2308
|
+
for (var i = 0; i < obj.length; i++) {
|
|
2309
|
+
xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
2313
|
+
var symMap;
|
|
2314
|
+
if (hasShammedSymbols) {
|
|
2315
|
+
symMap = {};
|
|
2316
|
+
for (var k = 0; k < syms.length; k++) {
|
|
2317
|
+
symMap['$' + syms[k]] = syms[k];
|
|
2318
|
+
}
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
for (var key in obj) { // eslint-disable-line no-restricted-syntax
|
|
2322
|
+
if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
2323
|
+
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
|
|
2324
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
2325
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
2326
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
2327
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
2328
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
2329
|
+
} else {
|
|
2330
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
2331
|
+
}
|
|
2332
|
+
}
|
|
2333
|
+
if (typeof gOPS === 'function') {
|
|
2334
|
+
for (var j = 0; j < syms.length; j++) {
|
|
2335
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
2336
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
}
|
|
2340
|
+
return xs;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
var GetIntrinsic = getIntrinsic;
|
|
2344
|
+
var callBound = callBound$1;
|
|
2345
|
+
var inspect = objectInspect;
|
|
2346
|
+
|
|
2347
|
+
var $TypeError = GetIntrinsic('%TypeError%');
|
|
2348
|
+
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
2349
|
+
var $Map = GetIntrinsic('%Map%', true);
|
|
2350
|
+
|
|
2351
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
2352
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
2353
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
2354
|
+
var $mapGet = callBound('Map.prototype.get', true);
|
|
2355
|
+
var $mapSet = callBound('Map.prototype.set', true);
|
|
2356
|
+
var $mapHas = callBound('Map.prototype.has', true);
|
|
2357
|
+
|
|
2358
|
+
/*
|
|
2359
|
+
* This function traverses the list returning the node corresponding to the
|
|
2360
|
+
* given key.
|
|
2361
|
+
*
|
|
2362
|
+
* That node is also moved to the head of the list, so that if it's accessed
|
|
2363
|
+
* again we don't need to traverse the whole list. By doing so, all the recently
|
|
2364
|
+
* used nodes can be accessed relatively quickly.
|
|
2365
|
+
*/
|
|
2366
|
+
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
2367
|
+
for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
|
|
2368
|
+
if (curr.key === key) {
|
|
2369
|
+
prev.next = curr.next;
|
|
2370
|
+
curr.next = list.next;
|
|
2371
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
2372
|
+
return curr;
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
};
|
|
2376
|
+
|
|
2377
|
+
var listGet = function (objects, key) {
|
|
2378
|
+
var node = listGetNode(objects, key);
|
|
2379
|
+
return node && node.value;
|
|
2380
|
+
};
|
|
2381
|
+
var listSet = function (objects, key, value) {
|
|
2382
|
+
var node = listGetNode(objects, key);
|
|
2383
|
+
if (node) {
|
|
2384
|
+
node.value = value;
|
|
2385
|
+
} else {
|
|
2386
|
+
// Prepend the new node to the beginning of the list
|
|
2387
|
+
objects.next = { // eslint-disable-line no-param-reassign
|
|
2388
|
+
key: key,
|
|
2389
|
+
next: objects.next,
|
|
2390
|
+
value: value
|
|
2391
|
+
};
|
|
2392
|
+
}
|
|
2393
|
+
};
|
|
2394
|
+
var listHas = function (objects, key) {
|
|
2395
|
+
return !!listGetNode(objects, key);
|
|
2396
|
+
};
|
|
2397
|
+
|
|
2398
|
+
var sideChannel = function getSideChannel() {
|
|
2399
|
+
var $wm;
|
|
2400
|
+
var $m;
|
|
2401
|
+
var $o;
|
|
2402
|
+
var channel = {
|
|
2403
|
+
assert: function (key) {
|
|
2404
|
+
if (!channel.has(key)) {
|
|
2405
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
2406
|
+
}
|
|
2407
|
+
},
|
|
2408
|
+
get: function (key) { // eslint-disable-line consistent-return
|
|
2409
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2410
|
+
if ($wm) {
|
|
2411
|
+
return $weakMapGet($wm, key);
|
|
2412
|
+
}
|
|
2413
|
+
} else if ($Map) {
|
|
2414
|
+
if ($m) {
|
|
2415
|
+
return $mapGet($m, key);
|
|
2416
|
+
}
|
|
2417
|
+
} else {
|
|
2418
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
2419
|
+
return listGet($o, key);
|
|
2420
|
+
}
|
|
2421
|
+
}
|
|
2422
|
+
},
|
|
2423
|
+
has: function (key) {
|
|
2424
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2425
|
+
if ($wm) {
|
|
2426
|
+
return $weakMapHas($wm, key);
|
|
2427
|
+
}
|
|
2428
|
+
} else if ($Map) {
|
|
2429
|
+
if ($m) {
|
|
2430
|
+
return $mapHas($m, key);
|
|
2431
|
+
}
|
|
2432
|
+
} else {
|
|
2433
|
+
if ($o) { // eslint-disable-line no-lonely-if
|
|
2434
|
+
return listHas($o, key);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
return false;
|
|
2438
|
+
},
|
|
2439
|
+
set: function (key, value) {
|
|
2440
|
+
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
|
|
2441
|
+
if (!$wm) {
|
|
2442
|
+
$wm = new $WeakMap();
|
|
2443
|
+
}
|
|
2444
|
+
$weakMapSet($wm, key, value);
|
|
2445
|
+
} else if ($Map) {
|
|
2446
|
+
if (!$m) {
|
|
2447
|
+
$m = new $Map();
|
|
2448
|
+
}
|
|
2449
|
+
$mapSet($m, key, value);
|
|
2450
|
+
} else {
|
|
2451
|
+
if (!$o) {
|
|
2452
|
+
/*
|
|
2453
|
+
* Initialize the linked list as an empty node, so that we don't have
|
|
2454
|
+
* to special-case handling of the first node: we can always refer to
|
|
2455
|
+
* it as (previous node).next, instead of something like (list).head
|
|
2456
|
+
*/
|
|
2457
|
+
$o = { key: {}, next: null };
|
|
2458
|
+
}
|
|
2459
|
+
listSet($o, key, value);
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
};
|
|
2463
|
+
return channel;
|
|
2464
|
+
};
|
|
2465
|
+
|
|
2466
|
+
var replace = String.prototype.replace;
|
|
2467
|
+
var percentTwenties = /%20/g;
|
|
2468
|
+
|
|
2469
|
+
var Format = {
|
|
2470
|
+
RFC1738: 'RFC1738',
|
|
2471
|
+
RFC3986: 'RFC3986'
|
|
2472
|
+
};
|
|
2473
|
+
|
|
2474
|
+
var formats$3 = {
|
|
2475
|
+
'default': Format.RFC3986,
|
|
2476
|
+
formatters: {
|
|
2477
|
+
RFC1738: function (value) {
|
|
2478
|
+
return replace.call(value, percentTwenties, '+');
|
|
2479
|
+
},
|
|
2480
|
+
RFC3986: function (value) {
|
|
2481
|
+
return String(value);
|
|
2482
|
+
}
|
|
2483
|
+
},
|
|
2484
|
+
RFC1738: Format.RFC1738,
|
|
2485
|
+
RFC3986: Format.RFC3986
|
|
2486
|
+
};
|
|
2487
|
+
|
|
2488
|
+
var formats$2 = formats$3;
|
|
2489
|
+
|
|
2490
|
+
var has$2 = Object.prototype.hasOwnProperty;
|
|
2491
|
+
var isArray$2 = Array.isArray;
|
|
2492
|
+
|
|
2493
|
+
var hexTable = (function () {
|
|
2494
|
+
var array = [];
|
|
2495
|
+
for (var i = 0; i < 256; ++i) {
|
|
2496
|
+
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
|
|
2497
|
+
}
|
|
2498
|
+
|
|
2499
|
+
return array;
|
|
2500
|
+
}());
|
|
2501
|
+
|
|
2502
|
+
var compactQueue = function compactQueue(queue) {
|
|
2503
|
+
while (queue.length > 1) {
|
|
2504
|
+
var item = queue.pop();
|
|
2505
|
+
var obj = item.obj[item.prop];
|
|
2506
|
+
|
|
2507
|
+
if (isArray$2(obj)) {
|
|
2508
|
+
var compacted = [];
|
|
2509
|
+
|
|
2510
|
+
for (var j = 0; j < obj.length; ++j) {
|
|
2511
|
+
if (typeof obj[j] !== 'undefined') {
|
|
2512
|
+
compacted.push(obj[j]);
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2515
|
+
|
|
2516
|
+
item.obj[item.prop] = compacted;
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
};
|
|
2520
|
+
|
|
2521
|
+
var arrayToObject = function arrayToObject(source, options) {
|
|
2522
|
+
var obj = options && options.plainObjects ? Object.create(null) : {};
|
|
2523
|
+
for (var i = 0; i < source.length; ++i) {
|
|
2524
|
+
if (typeof source[i] !== 'undefined') {
|
|
2525
|
+
obj[i] = source[i];
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
return obj;
|
|
2530
|
+
};
|
|
2531
|
+
|
|
2532
|
+
var merge = function merge(target, source, options) {
|
|
2533
|
+
/* eslint no-param-reassign: 0 */
|
|
2534
|
+
if (!source) {
|
|
2535
|
+
return target;
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
if (typeof source !== 'object') {
|
|
2539
|
+
if (isArray$2(target)) {
|
|
2540
|
+
target.push(source);
|
|
2541
|
+
} else if (target && typeof target === 'object') {
|
|
2542
|
+
if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
|
|
2543
|
+
target[source] = true;
|
|
2544
|
+
}
|
|
2545
|
+
} else {
|
|
2546
|
+
return [target, source];
|
|
2547
|
+
}
|
|
2548
|
+
|
|
2549
|
+
return target;
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
if (!target || typeof target !== 'object') {
|
|
2553
|
+
return [target].concat(source);
|
|
2554
|
+
}
|
|
2555
|
+
|
|
2556
|
+
var mergeTarget = target;
|
|
2557
|
+
if (isArray$2(target) && !isArray$2(source)) {
|
|
2558
|
+
mergeTarget = arrayToObject(target, options);
|
|
2559
|
+
}
|
|
2560
|
+
|
|
2561
|
+
if (isArray$2(target) && isArray$2(source)) {
|
|
2562
|
+
source.forEach(function (item, i) {
|
|
2563
|
+
if (has$2.call(target, i)) {
|
|
2564
|
+
var targetItem = target[i];
|
|
2565
|
+
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
|
|
2566
|
+
target[i] = merge(targetItem, item, options);
|
|
2567
|
+
} else {
|
|
2568
|
+
target.push(item);
|
|
2569
|
+
}
|
|
2570
|
+
} else {
|
|
2571
|
+
target[i] = item;
|
|
2572
|
+
}
|
|
2573
|
+
});
|
|
2574
|
+
return target;
|
|
2575
|
+
}
|
|
2576
|
+
|
|
2577
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
2578
|
+
var value = source[key];
|
|
2579
|
+
|
|
2580
|
+
if (has$2.call(acc, key)) {
|
|
2581
|
+
acc[key] = merge(acc[key], value, options);
|
|
2582
|
+
} else {
|
|
2583
|
+
acc[key] = value;
|
|
2584
|
+
}
|
|
2585
|
+
return acc;
|
|
2586
|
+
}, mergeTarget);
|
|
2587
|
+
};
|
|
2588
|
+
|
|
2589
|
+
var assign = function assignSingleSource(target, source) {
|
|
2590
|
+
return Object.keys(source).reduce(function (acc, key) {
|
|
2591
|
+
acc[key] = source[key];
|
|
2592
|
+
return acc;
|
|
2593
|
+
}, target);
|
|
2594
|
+
};
|
|
2595
|
+
|
|
2596
|
+
var decode = function (str, decoder, charset) {
|
|
2597
|
+
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
2598
|
+
if (charset === 'iso-8859-1') {
|
|
2599
|
+
// unescape never throws, no try...catch needed:
|
|
2600
|
+
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
|
|
2601
|
+
}
|
|
2602
|
+
// utf-8
|
|
2603
|
+
try {
|
|
2604
|
+
return decodeURIComponent(strWithoutPlus);
|
|
2605
|
+
} catch (e) {
|
|
2606
|
+
return strWithoutPlus;
|
|
2607
|
+
}
|
|
2608
|
+
};
|
|
2609
|
+
|
|
2610
|
+
var encode = function encode(str, defaultEncoder, charset, kind, format) {
|
|
2611
|
+
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
|
|
2612
|
+
// It has been adapted here for stricter adherence to RFC 3986
|
|
2613
|
+
if (str.length === 0) {
|
|
2614
|
+
return str;
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
var string = str;
|
|
2618
|
+
if (typeof str === 'symbol') {
|
|
2619
|
+
string = Symbol.prototype.toString.call(str);
|
|
2620
|
+
} else if (typeof str !== 'string') {
|
|
2621
|
+
string = String(str);
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
if (charset === 'iso-8859-1') {
|
|
2625
|
+
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
|
|
2626
|
+
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
|
|
2627
|
+
});
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
var out = '';
|
|
2631
|
+
for (var i = 0; i < string.length; ++i) {
|
|
2632
|
+
var c = string.charCodeAt(i);
|
|
2633
|
+
|
|
2634
|
+
if (
|
|
2635
|
+
c === 0x2D // -
|
|
2636
|
+
|| c === 0x2E // .
|
|
2637
|
+
|| c === 0x5F // _
|
|
2638
|
+
|| c === 0x7E // ~
|
|
2639
|
+
|| (c >= 0x30 && c <= 0x39) // 0-9
|
|
2640
|
+
|| (c >= 0x41 && c <= 0x5A) // a-z
|
|
2641
|
+
|| (c >= 0x61 && c <= 0x7A) // A-Z
|
|
2642
|
+
|| (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
|
|
2643
|
+
) {
|
|
2644
|
+
out += string.charAt(i);
|
|
2645
|
+
continue;
|
|
2646
|
+
}
|
|
2647
|
+
|
|
2648
|
+
if (c < 0x80) {
|
|
2649
|
+
out = out + hexTable[c];
|
|
2650
|
+
continue;
|
|
2651
|
+
}
|
|
2652
|
+
|
|
2653
|
+
if (c < 0x800) {
|
|
2654
|
+
out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
|
|
2655
|
+
continue;
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2658
|
+
if (c < 0xD800 || c >= 0xE000) {
|
|
2659
|
+
out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
|
|
2660
|
+
continue;
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
i += 1;
|
|
2664
|
+
c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
|
|
2665
|
+
/* eslint operator-linebreak: [2, "before"] */
|
|
2666
|
+
out += hexTable[0xF0 | (c >> 18)]
|
|
2667
|
+
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
|
|
2668
|
+
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
|
|
2669
|
+
+ hexTable[0x80 | (c & 0x3F)];
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
return out;
|
|
2673
|
+
};
|
|
2674
|
+
|
|
2675
|
+
var compact = function compact(value) {
|
|
2676
|
+
var queue = [{ obj: { o: value }, prop: 'o' }];
|
|
2677
|
+
var refs = [];
|
|
2678
|
+
|
|
2679
|
+
for (var i = 0; i < queue.length; ++i) {
|
|
2680
|
+
var item = queue[i];
|
|
2681
|
+
var obj = item.obj[item.prop];
|
|
2682
|
+
|
|
2683
|
+
var keys = Object.keys(obj);
|
|
2684
|
+
for (var j = 0; j < keys.length; ++j) {
|
|
2685
|
+
var key = keys[j];
|
|
2686
|
+
var val = obj[key];
|
|
2687
|
+
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
|
|
2688
|
+
queue.push({ obj: obj, prop: key });
|
|
2689
|
+
refs.push(val);
|
|
2690
|
+
}
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2693
|
+
|
|
2694
|
+
compactQueue(queue);
|
|
2695
|
+
|
|
2696
|
+
return value;
|
|
2697
|
+
};
|
|
2698
|
+
|
|
2699
|
+
var isRegExp = function isRegExp(obj) {
|
|
2700
|
+
return Object.prototype.toString.call(obj) === '[object RegExp]';
|
|
2701
|
+
};
|
|
2702
|
+
|
|
2703
|
+
var isBuffer = function isBuffer(obj) {
|
|
2704
|
+
if (!obj || typeof obj !== 'object') {
|
|
2705
|
+
return false;
|
|
2706
|
+
}
|
|
2707
|
+
|
|
2708
|
+
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
2709
|
+
};
|
|
2710
|
+
|
|
2711
|
+
var combine = function combine(a, b) {
|
|
2712
|
+
return [].concat(a, b);
|
|
2713
|
+
};
|
|
2714
|
+
|
|
2715
|
+
var maybeMap = function maybeMap(val, fn) {
|
|
2716
|
+
if (isArray$2(val)) {
|
|
2717
|
+
var mapped = [];
|
|
2718
|
+
for (var i = 0; i < val.length; i += 1) {
|
|
2719
|
+
mapped.push(fn(val[i]));
|
|
2720
|
+
}
|
|
2721
|
+
return mapped;
|
|
2722
|
+
}
|
|
2723
|
+
return fn(val);
|
|
2724
|
+
};
|
|
2725
|
+
|
|
2726
|
+
var utils$2 = {
|
|
2727
|
+
arrayToObject: arrayToObject,
|
|
2728
|
+
assign: assign,
|
|
2729
|
+
combine: combine,
|
|
2730
|
+
compact: compact,
|
|
2731
|
+
decode: decode,
|
|
2732
|
+
encode: encode,
|
|
2733
|
+
isBuffer: isBuffer,
|
|
2734
|
+
isRegExp: isRegExp,
|
|
2735
|
+
maybeMap: maybeMap,
|
|
2736
|
+
merge: merge
|
|
2737
|
+
};
|
|
2738
|
+
|
|
2739
|
+
var getSideChannel = sideChannel;
|
|
2740
|
+
var utils$1 = utils$2;
|
|
2741
|
+
var formats$1 = formats$3;
|
|
2742
|
+
var has$1 = Object.prototype.hasOwnProperty;
|
|
2743
|
+
|
|
2744
|
+
var arrayPrefixGenerators = {
|
|
2745
|
+
brackets: function brackets(prefix) {
|
|
2746
|
+
return prefix + '[]';
|
|
2747
|
+
},
|
|
2748
|
+
comma: 'comma',
|
|
2749
|
+
indices: function indices(prefix, key) {
|
|
2750
|
+
return prefix + '[' + key + ']';
|
|
2751
|
+
},
|
|
2752
|
+
repeat: function repeat(prefix) {
|
|
2753
|
+
return prefix;
|
|
2754
|
+
}
|
|
2755
|
+
};
|
|
2756
|
+
|
|
2757
|
+
var isArray$1 = Array.isArray;
|
|
2758
|
+
var push = Array.prototype.push;
|
|
2759
|
+
var pushToArray = function (arr, valueOrArray) {
|
|
2760
|
+
push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
|
|
2761
|
+
};
|
|
2762
|
+
|
|
2763
|
+
var toISO = Date.prototype.toISOString;
|
|
2764
|
+
|
|
2765
|
+
var defaultFormat = formats$1['default'];
|
|
2766
|
+
var defaults$1 = {
|
|
2767
|
+
addQueryPrefix: false,
|
|
2768
|
+
allowDots: false,
|
|
2769
|
+
charset: 'utf-8',
|
|
2770
|
+
charsetSentinel: false,
|
|
2771
|
+
delimiter: '&',
|
|
2772
|
+
encode: true,
|
|
2773
|
+
encoder: utils$1.encode,
|
|
2774
|
+
encodeValuesOnly: false,
|
|
2775
|
+
format: defaultFormat,
|
|
2776
|
+
formatter: formats$1.formatters[defaultFormat],
|
|
2777
|
+
// deprecated
|
|
2778
|
+
indices: false,
|
|
2779
|
+
serializeDate: function serializeDate(date) {
|
|
2780
|
+
return toISO.call(date);
|
|
2781
|
+
},
|
|
2782
|
+
skipNulls: false,
|
|
2783
|
+
strictNullHandling: false
|
|
2784
|
+
};
|
|
2785
|
+
|
|
2786
|
+
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
|
|
2787
|
+
return typeof v === 'string'
|
|
2788
|
+
|| typeof v === 'number'
|
|
2789
|
+
|| typeof v === 'boolean'
|
|
2790
|
+
|| typeof v === 'symbol'
|
|
2791
|
+
|| typeof v === 'bigint';
|
|
2792
|
+
};
|
|
2793
|
+
|
|
2794
|
+
var sentinel = {};
|
|
2795
|
+
|
|
2796
|
+
var stringify$1 = function stringify(
|
|
2797
|
+
object,
|
|
2798
|
+
prefix,
|
|
2799
|
+
generateArrayPrefix,
|
|
2800
|
+
commaRoundTrip,
|
|
2801
|
+
strictNullHandling,
|
|
2802
|
+
skipNulls,
|
|
2803
|
+
encoder,
|
|
2804
|
+
filter,
|
|
2805
|
+
sort,
|
|
2806
|
+
allowDots,
|
|
2807
|
+
serializeDate,
|
|
2808
|
+
format,
|
|
2809
|
+
formatter,
|
|
2810
|
+
encodeValuesOnly,
|
|
2811
|
+
charset,
|
|
2812
|
+
sideChannel
|
|
2813
|
+
) {
|
|
2814
|
+
var obj = object;
|
|
2815
|
+
|
|
2816
|
+
var tmpSc = sideChannel;
|
|
2817
|
+
var step = 0;
|
|
2818
|
+
var findFlag = false;
|
|
2819
|
+
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
|
|
2820
|
+
// Where object last appeared in the ref tree
|
|
2821
|
+
var pos = tmpSc.get(object);
|
|
2822
|
+
step += 1;
|
|
2823
|
+
if (typeof pos !== 'undefined') {
|
|
2824
|
+
if (pos === step) {
|
|
2825
|
+
throw new RangeError('Cyclic object value');
|
|
2826
|
+
} else {
|
|
2827
|
+
findFlag = true; // Break while
|
|
2828
|
+
}
|
|
2829
|
+
}
|
|
2830
|
+
if (typeof tmpSc.get(sentinel) === 'undefined') {
|
|
2831
|
+
step = 0;
|
|
2832
|
+
}
|
|
2833
|
+
}
|
|
2834
|
+
|
|
2835
|
+
if (typeof filter === 'function') {
|
|
2836
|
+
obj = filter(prefix, obj);
|
|
2837
|
+
} else if (obj instanceof Date) {
|
|
2838
|
+
obj = serializeDate(obj);
|
|
2839
|
+
} else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
2840
|
+
obj = utils$1.maybeMap(obj, function (value) {
|
|
2841
|
+
if (value instanceof Date) {
|
|
2842
|
+
return serializeDate(value);
|
|
2843
|
+
}
|
|
2844
|
+
return value;
|
|
2845
|
+
});
|
|
2846
|
+
}
|
|
2847
|
+
|
|
2848
|
+
if (obj === null) {
|
|
2849
|
+
if (strictNullHandling) {
|
|
2850
|
+
return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
|
|
2851
|
+
}
|
|
2852
|
+
|
|
2853
|
+
obj = '';
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
|
|
2857
|
+
if (encoder) {
|
|
2858
|
+
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
|
|
2859
|
+
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
|
|
2860
|
+
}
|
|
2861
|
+
return [formatter(prefix) + '=' + formatter(String(obj))];
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
var values = [];
|
|
2865
|
+
|
|
2866
|
+
if (typeof obj === 'undefined') {
|
|
2867
|
+
return values;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
var objKeys;
|
|
2871
|
+
if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
|
|
2872
|
+
// we need to join elements in
|
|
2873
|
+
if (encodeValuesOnly && encoder) {
|
|
2874
|
+
obj = utils$1.maybeMap(obj, encoder);
|
|
2875
|
+
}
|
|
2876
|
+
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
|
|
2877
|
+
} else if (isArray$1(filter)) {
|
|
2878
|
+
objKeys = filter;
|
|
2879
|
+
} else {
|
|
2880
|
+
var keys = Object.keys(obj);
|
|
2881
|
+
objKeys = sort ? keys.sort(sort) : keys;
|
|
2882
|
+
}
|
|
2883
|
+
|
|
2884
|
+
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
|
|
2885
|
+
|
|
2886
|
+
for (var j = 0; j < objKeys.length; ++j) {
|
|
2887
|
+
var key = objKeys[j];
|
|
2888
|
+
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
2889
|
+
|
|
2890
|
+
if (skipNulls && value === null) {
|
|
2891
|
+
continue;
|
|
2892
|
+
}
|
|
2893
|
+
|
|
2894
|
+
var keyPrefix = isArray$1(obj)
|
|
2895
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
|
|
2896
|
+
: adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
2897
|
+
|
|
2898
|
+
sideChannel.set(object, step);
|
|
2899
|
+
var valueSideChannel = getSideChannel();
|
|
2900
|
+
valueSideChannel.set(sentinel, sideChannel);
|
|
2901
|
+
pushToArray(values, stringify(
|
|
2902
|
+
value,
|
|
2903
|
+
keyPrefix,
|
|
2904
|
+
generateArrayPrefix,
|
|
2905
|
+
commaRoundTrip,
|
|
2906
|
+
strictNullHandling,
|
|
2907
|
+
skipNulls,
|
|
2908
|
+
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
|
|
2909
|
+
filter,
|
|
2910
|
+
sort,
|
|
2911
|
+
allowDots,
|
|
2912
|
+
serializeDate,
|
|
2913
|
+
format,
|
|
2914
|
+
formatter,
|
|
2915
|
+
encodeValuesOnly,
|
|
2916
|
+
charset,
|
|
2917
|
+
valueSideChannel
|
|
2918
|
+
));
|
|
2919
|
+
}
|
|
2920
|
+
|
|
2921
|
+
return values;
|
|
1172
2922
|
};
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
2923
|
+
|
|
2924
|
+
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
2925
|
+
if (!opts) {
|
|
2926
|
+
return defaults$1;
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
2930
|
+
throw new TypeError('Encoder has to be a function.');
|
|
2931
|
+
}
|
|
2932
|
+
|
|
2933
|
+
var charset = opts.charset || defaults$1.charset;
|
|
2934
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
2935
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
var format = formats$1['default'];
|
|
2939
|
+
if (typeof opts.format !== 'undefined') {
|
|
2940
|
+
if (!has$1.call(formats$1.formatters, opts.format)) {
|
|
2941
|
+
throw new TypeError('Unknown format option provided.');
|
|
2942
|
+
}
|
|
2943
|
+
format = opts.format;
|
|
2944
|
+
}
|
|
2945
|
+
var formatter = formats$1.formatters[format];
|
|
2946
|
+
|
|
2947
|
+
var filter = defaults$1.filter;
|
|
2948
|
+
if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
|
|
2949
|
+
filter = opts.filter;
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
return {
|
|
2953
|
+
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
|
|
2954
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
|
|
2955
|
+
charset: charset,
|
|
2956
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
2957
|
+
delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
|
|
2958
|
+
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
|
|
2959
|
+
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
|
|
2960
|
+
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
|
|
2961
|
+
filter: filter,
|
|
2962
|
+
format: format,
|
|
2963
|
+
formatter: formatter,
|
|
2964
|
+
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
|
|
2965
|
+
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
|
|
2966
|
+
sort: typeof opts.sort === 'function' ? opts.sort : null,
|
|
2967
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
|
|
2968
|
+
};
|
|
1189
2969
|
};
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
2970
|
+
|
|
2971
|
+
var stringify_1 = function (object, opts) {
|
|
2972
|
+
var obj = object;
|
|
2973
|
+
var options = normalizeStringifyOptions(opts);
|
|
2974
|
+
|
|
2975
|
+
var objKeys;
|
|
2976
|
+
var filter;
|
|
2977
|
+
|
|
2978
|
+
if (typeof options.filter === 'function') {
|
|
2979
|
+
filter = options.filter;
|
|
2980
|
+
obj = filter('', obj);
|
|
2981
|
+
} else if (isArray$1(options.filter)) {
|
|
2982
|
+
filter = options.filter;
|
|
2983
|
+
objKeys = filter;
|
|
2984
|
+
}
|
|
2985
|
+
|
|
2986
|
+
var keys = [];
|
|
2987
|
+
|
|
2988
|
+
if (typeof obj !== 'object' || obj === null) {
|
|
2989
|
+
return '';
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
var arrayFormat;
|
|
2993
|
+
if (opts && opts.arrayFormat in arrayPrefixGenerators) {
|
|
2994
|
+
arrayFormat = opts.arrayFormat;
|
|
2995
|
+
} else if (opts && 'indices' in opts) {
|
|
2996
|
+
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
2997
|
+
} else {
|
|
2998
|
+
arrayFormat = 'indices';
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
3002
|
+
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
3003
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
3004
|
+
}
|
|
3005
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
3006
|
+
|
|
3007
|
+
if (!objKeys) {
|
|
3008
|
+
objKeys = Object.keys(obj);
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
if (options.sort) {
|
|
3012
|
+
objKeys.sort(options.sort);
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
var sideChannel = getSideChannel();
|
|
3016
|
+
for (var i = 0; i < objKeys.length; ++i) {
|
|
3017
|
+
var key = objKeys[i];
|
|
3018
|
+
|
|
3019
|
+
if (options.skipNulls && obj[key] === null) {
|
|
3020
|
+
continue;
|
|
3021
|
+
}
|
|
3022
|
+
pushToArray(keys, stringify$1(
|
|
3023
|
+
obj[key],
|
|
3024
|
+
key,
|
|
3025
|
+
generateArrayPrefix,
|
|
3026
|
+
commaRoundTrip,
|
|
3027
|
+
options.strictNullHandling,
|
|
3028
|
+
options.skipNulls,
|
|
3029
|
+
options.encode ? options.encoder : null,
|
|
3030
|
+
options.filter,
|
|
3031
|
+
options.sort,
|
|
3032
|
+
options.allowDots,
|
|
3033
|
+
options.serializeDate,
|
|
3034
|
+
options.format,
|
|
3035
|
+
options.formatter,
|
|
3036
|
+
options.encodeValuesOnly,
|
|
3037
|
+
options.charset,
|
|
3038
|
+
sideChannel
|
|
3039
|
+
));
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
var joined = keys.join(options.delimiter);
|
|
3043
|
+
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
3044
|
+
|
|
3045
|
+
if (options.charsetSentinel) {
|
|
3046
|
+
if (options.charset === 'iso-8859-1') {
|
|
3047
|
+
// encodeURIComponent('✓'), the "numeric entity" representation of a checkmark
|
|
3048
|
+
prefix += 'utf8=%26%2310003%3B&';
|
|
3049
|
+
} else {
|
|
3050
|
+
// encodeURIComponent('✓')
|
|
3051
|
+
prefix += 'utf8=%E2%9C%93&';
|
|
3052
|
+
}
|
|
3053
|
+
}
|
|
3054
|
+
|
|
3055
|
+
return joined.length > 0 ? prefix + joined : '';
|
|
1201
3056
|
};
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
3057
|
+
|
|
3058
|
+
var utils = utils$2;
|
|
3059
|
+
|
|
3060
|
+
var has = Object.prototype.hasOwnProperty;
|
|
3061
|
+
var isArray = Array.isArray;
|
|
3062
|
+
|
|
3063
|
+
var defaults = {
|
|
3064
|
+
allowDots: false,
|
|
3065
|
+
allowPrototypes: false,
|
|
3066
|
+
allowSparse: false,
|
|
3067
|
+
arrayLimit: 20,
|
|
3068
|
+
charset: 'utf-8',
|
|
3069
|
+
charsetSentinel: false,
|
|
3070
|
+
comma: false,
|
|
3071
|
+
decoder: utils.decode,
|
|
3072
|
+
delimiter: '&',
|
|
3073
|
+
depth: 5,
|
|
3074
|
+
ignoreQueryPrefix: false,
|
|
3075
|
+
interpretNumericEntities: false,
|
|
3076
|
+
parameterLimit: 1000,
|
|
3077
|
+
parseArrays: true,
|
|
3078
|
+
plainObjects: false,
|
|
3079
|
+
strictNullHandling: false
|
|
1217
3080
|
};
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
field: field,
|
|
1223
|
-
fieldValues: fieldValues
|
|
3081
|
+
|
|
3082
|
+
var interpretNumericEntities = function (str) {
|
|
3083
|
+
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
|
3084
|
+
return String.fromCharCode(parseInt(numberStr, 10));
|
|
1224
3085
|
});
|
|
1225
|
-
});
|
|
1226
3086
|
};
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
3087
|
+
|
|
3088
|
+
var parseArrayValue = function (val, options) {
|
|
3089
|
+
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
3090
|
+
return val.split(',');
|
|
3091
|
+
}
|
|
3092
|
+
|
|
3093
|
+
return val;
|
|
1232
3094
|
};
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
3095
|
+
|
|
3096
|
+
// This is what browsers will submit when the ✓ character occurs in an
|
|
3097
|
+
// application/x-www-form-urlencoded body and the encoding of the page containing
|
|
3098
|
+
// the form is iso-8859-1, or when the submitted form has an accept-charset
|
|
3099
|
+
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
|
|
3100
|
+
// the ✓ character, such as us-ascii.
|
|
3101
|
+
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')
|
|
3102
|
+
|
|
3103
|
+
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
|
|
3104
|
+
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
|
|
3105
|
+
|
|
3106
|
+
var parseValues = function parseQueryStringValues(str, options) {
|
|
3107
|
+
var obj = { __proto__: null };
|
|
3108
|
+
|
|
3109
|
+
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
3110
|
+
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
3111
|
+
var parts = cleanStr.split(options.delimiter, limit);
|
|
3112
|
+
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
3113
|
+
var i;
|
|
3114
|
+
|
|
3115
|
+
var charset = options.charset;
|
|
3116
|
+
if (options.charsetSentinel) {
|
|
3117
|
+
for (i = 0; i < parts.length; ++i) {
|
|
3118
|
+
if (parts[i].indexOf('utf8=') === 0) {
|
|
3119
|
+
if (parts[i] === charsetSentinel) {
|
|
3120
|
+
charset = 'utf-8';
|
|
3121
|
+
} else if (parts[i] === isoSentinel) {
|
|
3122
|
+
charset = 'iso-8859-1';
|
|
3123
|
+
}
|
|
3124
|
+
skipIndex = i;
|
|
3125
|
+
i = parts.length; // The eslint settings do not allow break;
|
|
3126
|
+
}
|
|
3127
|
+
}
|
|
3128
|
+
}
|
|
3129
|
+
|
|
3130
|
+
for (i = 0; i < parts.length; ++i) {
|
|
3131
|
+
if (i === skipIndex) {
|
|
3132
|
+
continue;
|
|
3133
|
+
}
|
|
3134
|
+
var part = parts[i];
|
|
3135
|
+
|
|
3136
|
+
var bracketEqualsPos = part.indexOf(']=');
|
|
3137
|
+
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
3138
|
+
|
|
3139
|
+
var key, val;
|
|
3140
|
+
if (pos === -1) {
|
|
3141
|
+
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
3142
|
+
val = options.strictNullHandling ? null : '';
|
|
3143
|
+
} else {
|
|
3144
|
+
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
3145
|
+
val = utils.maybeMap(
|
|
3146
|
+
parseArrayValue(part.slice(pos + 1), options),
|
|
3147
|
+
function (encodedVal) {
|
|
3148
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
3149
|
+
}
|
|
3150
|
+
);
|
|
3151
|
+
}
|
|
3152
|
+
|
|
3153
|
+
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
3154
|
+
val = interpretNumericEntities(val);
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
if (part.indexOf('[]=') > -1) {
|
|
3158
|
+
val = isArray(val) ? [val] : val;
|
|
3159
|
+
}
|
|
3160
|
+
|
|
3161
|
+
if (has.call(obj, key)) {
|
|
3162
|
+
obj[key] = utils.combine(obj[key], val);
|
|
3163
|
+
} else {
|
|
3164
|
+
obj[key] = val;
|
|
3165
|
+
}
|
|
3166
|
+
}
|
|
3167
|
+
|
|
3168
|
+
return obj;
|
|
3169
|
+
};
|
|
3170
|
+
|
|
3171
|
+
var parseObject = function (chain, val, options, valuesParsed) {
|
|
3172
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options);
|
|
3173
|
+
|
|
3174
|
+
for (var i = chain.length - 1; i >= 0; --i) {
|
|
3175
|
+
var obj;
|
|
3176
|
+
var root = chain[i];
|
|
3177
|
+
|
|
3178
|
+
if (root === '[]' && options.parseArrays) {
|
|
3179
|
+
obj = [].concat(leaf);
|
|
3180
|
+
} else {
|
|
3181
|
+
obj = options.plainObjects ? Object.create(null) : {};
|
|
3182
|
+
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
3183
|
+
var index = parseInt(cleanRoot, 10);
|
|
3184
|
+
if (!options.parseArrays && cleanRoot === '') {
|
|
3185
|
+
obj = { 0: leaf };
|
|
3186
|
+
} else if (
|
|
3187
|
+
!isNaN(index)
|
|
3188
|
+
&& root !== cleanRoot
|
|
3189
|
+
&& String(index) === cleanRoot
|
|
3190
|
+
&& index >= 0
|
|
3191
|
+
&& (options.parseArrays && index <= options.arrayLimit)
|
|
3192
|
+
) {
|
|
3193
|
+
obj = [];
|
|
3194
|
+
obj[index] = leaf;
|
|
3195
|
+
} else if (cleanRoot !== '__proto__') {
|
|
3196
|
+
obj[cleanRoot] = leaf;
|
|
3197
|
+
}
|
|
3198
|
+
}
|
|
3199
|
+
|
|
3200
|
+
leaf = obj;
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
return leaf;
|
|
1237
3204
|
};
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
3205
|
+
|
|
3206
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
3207
|
+
if (!givenKey) {
|
|
3208
|
+
return;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
// Transform dot notation to bracket notation
|
|
3212
|
+
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
3213
|
+
|
|
3214
|
+
// The regex chunks
|
|
3215
|
+
|
|
3216
|
+
var brackets = /(\[[^[\]]*])/;
|
|
3217
|
+
var child = /(\[[^[\]]*])/g;
|
|
3218
|
+
|
|
3219
|
+
// Get the parent
|
|
3220
|
+
|
|
3221
|
+
var segment = options.depth > 0 && brackets.exec(key);
|
|
3222
|
+
var parent = segment ? key.slice(0, segment.index) : key;
|
|
3223
|
+
|
|
3224
|
+
// Stash the parent if it exists
|
|
3225
|
+
|
|
3226
|
+
var keys = [];
|
|
3227
|
+
if (parent) {
|
|
3228
|
+
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
3229
|
+
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
3230
|
+
if (!options.allowPrototypes) {
|
|
3231
|
+
return;
|
|
3232
|
+
}
|
|
3233
|
+
}
|
|
3234
|
+
|
|
3235
|
+
keys.push(parent);
|
|
3236
|
+
}
|
|
3237
|
+
|
|
3238
|
+
// Loop through children appending to the array until we hit depth
|
|
3239
|
+
|
|
3240
|
+
var i = 0;
|
|
3241
|
+
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
|
|
3242
|
+
i += 1;
|
|
3243
|
+
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
|
|
3244
|
+
if (!options.allowPrototypes) {
|
|
3245
|
+
return;
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
keys.push(segment[1]);
|
|
3249
|
+
}
|
|
3250
|
+
|
|
3251
|
+
// If there's a remainder, just add whatever is left
|
|
3252
|
+
|
|
3253
|
+
if (segment) {
|
|
3254
|
+
keys.push('[' + key.slice(segment.index) + ']');
|
|
3255
|
+
}
|
|
3256
|
+
|
|
3257
|
+
return parseObject(keys, val, options, valuesParsed);
|
|
1243
3258
|
};
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
3259
|
+
|
|
3260
|
+
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
3261
|
+
if (!opts) {
|
|
3262
|
+
return defaults;
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
|
|
3266
|
+
throw new TypeError('Decoder has to be a function.');
|
|
3267
|
+
}
|
|
3268
|
+
|
|
3269
|
+
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
3270
|
+
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
3271
|
+
}
|
|
3272
|
+
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
3273
|
+
|
|
3274
|
+
return {
|
|
3275
|
+
allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
|
|
3276
|
+
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
|
|
3277
|
+
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
|
|
3278
|
+
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
|
|
3279
|
+
charset: charset,
|
|
3280
|
+
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
|
|
3281
|
+
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
|
|
3282
|
+
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
|
|
3283
|
+
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
|
|
3284
|
+
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
3285
|
+
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
|
|
3286
|
+
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
3287
|
+
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
|
|
3288
|
+
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
|
|
3289
|
+
parseArrays: opts.parseArrays !== false,
|
|
3290
|
+
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
3291
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
3292
|
+
};
|
|
1247
3293
|
};
|
|
1248
3294
|
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
customComponents = _ref$customComponents === void 0 ? {} : _ref$customComponents,
|
|
1255
|
-
fields = _ref.fields,
|
|
1256
|
-
formRef = _ref.formRef,
|
|
1257
|
-
disabled = _ref.disabled,
|
|
1258
|
-
isRequiredColumnName = _ref.isRequiredColumnName;
|
|
1259
|
-
return getNonSystemFields(fields).map(function (field) {
|
|
1260
|
-
var Field = getFieldInput({
|
|
1261
|
-
field: field,
|
|
1262
|
-
customComponents: customComponents
|
|
1263
|
-
});
|
|
1264
|
-
if (Field) {
|
|
1265
|
-
return /*#__PURE__*/React__default["default"].createElement(Field, _extends({
|
|
1266
|
-
key: field.id
|
|
1267
|
-
}, _objectSpread$e(_objectSpread$e({}, field), {}, {
|
|
1268
|
-
disabled: disabled,
|
|
1269
|
-
formRef: formRef,
|
|
1270
|
-
isRequiredColumnName: isRequiredColumnName
|
|
1271
|
-
})));
|
|
3295
|
+
var parse$1 = function (str, opts) {
|
|
3296
|
+
var options = normalizeParseOptions(opts);
|
|
3297
|
+
|
|
3298
|
+
if (str === '' || str === null || typeof str === 'undefined') {
|
|
3299
|
+
return options.plainObjects ? Object.create(null) : {};
|
|
1272
3300
|
}
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
3301
|
+
|
|
3302
|
+
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
3303
|
+
var obj = options.plainObjects ? Object.create(null) : {};
|
|
3304
|
+
|
|
3305
|
+
// Iterate over the keys and setup the new object
|
|
3306
|
+
|
|
3307
|
+
var keys = Object.keys(tempObj);
|
|
3308
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
3309
|
+
var key = keys[i];
|
|
3310
|
+
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
|
|
3311
|
+
obj = utils.merge(obj, newObj, options);
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
if (options.allowSparse === true) {
|
|
3315
|
+
return obj;
|
|
3316
|
+
}
|
|
3317
|
+
|
|
3318
|
+
return utils.compact(obj);
|
|
3319
|
+
};
|
|
3320
|
+
|
|
3321
|
+
var stringify = stringify_1;
|
|
3322
|
+
var parse = parse$1;
|
|
3323
|
+
var formats = formats$3;
|
|
3324
|
+
|
|
3325
|
+
var lib = {
|
|
3326
|
+
formats: formats,
|
|
3327
|
+
parse: parse,
|
|
3328
|
+
stringify: stringify
|
|
3329
|
+
};
|
|
1279
3330
|
|
|
1280
3331
|
var NEETO_FIELDS_URL = "/neeto_fields_engine/api/v1";
|
|
1281
3332
|
var FIELDS_URL = "".concat(NEETO_FIELDS_URL, "/fields");
|
|
@@ -1287,15 +3338,15 @@ var FIELDS_REORDER_URL = "".concat(FIELDS_URL, "/reorder");
|
|
|
1287
3338
|
var CONFIGS_URL = "".concat(NEETO_FIELDS_URL, "/configs");
|
|
1288
3339
|
var INFO_ICON_SIZE = 16;
|
|
1289
3340
|
|
|
1290
|
-
function ownKeys$d(
|
|
1291
|
-
function _objectSpread$d(
|
|
3341
|
+
function ownKeys$d(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3342
|
+
function _objectSpread$d(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$d(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$d(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1292
3343
|
var fieldUrl = function fieldUrl(fieldId) {
|
|
1293
|
-
return utils.buildUrl(FIELD_URL, {
|
|
3344
|
+
return utils$3.buildUrl(FIELD_URL, {
|
|
1294
3345
|
fieldId: fieldId
|
|
1295
3346
|
});
|
|
1296
3347
|
};
|
|
1297
3348
|
var dependenciesUrl = function dependenciesUrl(fieldId) {
|
|
1298
|
-
return utils.buildUrl(DEPENDENCIES_URL, {
|
|
3349
|
+
return utils$3.buildUrl(DEPENDENCIES_URL, {
|
|
1299
3350
|
fieldId: fieldId
|
|
1300
3351
|
});
|
|
1301
3352
|
};
|
|
@@ -1303,7 +3354,7 @@ var fetch$1 = function fetch(_ref) {
|
|
|
1303
3354
|
var resourceType = _ref.resourceType,
|
|
1304
3355
|
ownerId = _ref.ownerId,
|
|
1305
3356
|
state = _ref.state,
|
|
1306
|
-
|
|
3357
|
+
filters = _ref.filters,
|
|
1307
3358
|
_ref$pageProps = _ref.pageProps,
|
|
1308
3359
|
pageProps = _ref$pageProps === void 0 ? {} : _ref$pageProps;
|
|
1309
3360
|
return axios__default["default"].get(FIELDS_URL, {
|
|
@@ -1311,8 +3362,13 @@ var fetch$1 = function fetch(_ref) {
|
|
|
1311
3362
|
resourceType: resourceType,
|
|
1312
3363
|
ownerId: ownerId,
|
|
1313
3364
|
state: state,
|
|
1314
|
-
|
|
1315
|
-
}, pageProps)
|
|
3365
|
+
filters: filters
|
|
3366
|
+
}, pageProps),
|
|
3367
|
+
paramsSerializer: function paramsSerializer(params) {
|
|
3368
|
+
return lib.stringify(params, {
|
|
3369
|
+
arrayFormat: "brackets"
|
|
3370
|
+
});
|
|
3371
|
+
}
|
|
1316
3372
|
});
|
|
1317
3373
|
};
|
|
1318
3374
|
var create$1 = function create(payload) {
|
|
@@ -1372,8 +3428,8 @@ var QUERY_KEYS = {
|
|
|
1372
3428
|
var DEFAULT_STALE_TIME = 3600000; // 1 hour
|
|
1373
3429
|
|
|
1374
3430
|
var _excluded$4 = ["prefixQueryKeys"];
|
|
1375
|
-
function ownKeys$c(
|
|
1376
|
-
function _objectSpread$c(
|
|
3431
|
+
function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3432
|
+
function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1377
3433
|
var FIELDS = QUERY_KEYS.FIELDS,
|
|
1378
3434
|
DEPENDENCIES = QUERY_KEYS.DEPENDENCIES;
|
|
1379
3435
|
var useFetchFields = function useFetchFields(_ref, options) {
|
|
@@ -1428,8 +3484,8 @@ var useReorderFields = function useReorderFields() {
|
|
|
1428
3484
|
});
|
|
1429
3485
|
};
|
|
1430
3486
|
|
|
1431
|
-
function ownKeys$b(
|
|
1432
|
-
function _objectSpread$b(
|
|
3487
|
+
function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3488
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1433
3489
|
var arrangeOptionsDisplayOrder = function arrangeOptionsDisplayOrder(options) {
|
|
1434
3490
|
return options.map(function (option, index) {
|
|
1435
3491
|
return _objectSpread$b(_objectSpread$b({}, option), {}, {
|
|
@@ -1665,12 +3721,23 @@ var AdditionalInputs = function AdditionalInputs() {
|
|
|
1665
3721
|
var addOption = function addOption(arrayHelpers) {
|
|
1666
3722
|
return arrayHelpers.push(getDefaultOption());
|
|
1667
3723
|
};
|
|
3724
|
+
var handleKeyDown = function handleKeyDown(event, arrayHelpers) {
|
|
3725
|
+
var _inputs;
|
|
3726
|
+
if (event.key !== "Enter" || reactUtils.isMetaKeyPressed(event)) return;
|
|
3727
|
+
var form = event.target.form;
|
|
3728
|
+
var inputs = _toConsumableArray(form.querySelectorAll("#neeto-fields-dropdown-options-wrapper input"));
|
|
3729
|
+
var currentIndex = inputs.indexOf(event.target);
|
|
3730
|
+
currentIndex >= inputs.length - 1 ? addOption(arrayHelpers) : (_inputs = inputs[currentIndex + 1]) === null || _inputs === void 0 ? void 0 : _inputs.focus();
|
|
3731
|
+
event.preventDefault();
|
|
3732
|
+
event.stopPropagation();
|
|
3733
|
+
};
|
|
1668
3734
|
if (isDropdown(kind.value)) {
|
|
1669
3735
|
return /*#__PURE__*/React__default["default"].createElement(formik.FieldArray, {
|
|
1670
3736
|
name: "data"
|
|
1671
3737
|
}, function (arrayHelpers) {
|
|
1672
3738
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1673
|
-
className: "flex w-full flex-col gap-y-4"
|
|
3739
|
+
className: "flex w-full flex-col gap-y-4",
|
|
3740
|
+
id: "neeto-fields-dropdown-options-wrapper"
|
|
1674
3741
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, {
|
|
1675
3742
|
required: true
|
|
1676
3743
|
}, t("neetoFields.titles.dropdownOptions")), neetoCist.isNotEmpty(options) && Array.isArray(options) && options.map(function (_, index) {
|
|
@@ -1690,7 +3757,10 @@ var AdditionalInputs = function AdditionalInputs() {
|
|
|
1690
3757
|
onClick: function onClick() {
|
|
1691
3758
|
return removeOption(arrayHelpers, index);
|
|
1692
3759
|
}
|
|
1693
|
-
})
|
|
3760
|
+
}),
|
|
3761
|
+
onKeyDown: function onKeyDown(event) {
|
|
3762
|
+
return handleKeyDown(event, arrayHelpers);
|
|
3763
|
+
}
|
|
1694
3764
|
})));
|
|
1695
3765
|
}), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, {
|
|
1696
3766
|
fullWidth: true,
|
|
@@ -1780,8 +3850,8 @@ var FieldForm = function FieldForm(_ref) {
|
|
|
1780
3850
|
};
|
|
1781
3851
|
|
|
1782
3852
|
var _excluded$3 = ["resourceType", "allowedKinds", "ownerId", "additionalValidations", "initialValues", "onClose", "onMutationSuccess"];
|
|
1783
|
-
function ownKeys$a(
|
|
1784
|
-
function _objectSpread$a(
|
|
3853
|
+
function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3854
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1785
3855
|
|
|
1786
3856
|
/** @type {React.FC<import("types").AddProps>} */
|
|
1787
3857
|
|
|
@@ -1837,8 +3907,8 @@ var Add = function Add(_ref) {
|
|
|
1837
3907
|
};
|
|
1838
3908
|
|
|
1839
3909
|
var _excluded$2 = ["fieldId", "allowedKinds", "ownerId", "additionalValidations", "initialValues", "onClose", "onMutationSuccess"];
|
|
1840
|
-
function ownKeys$9(
|
|
1841
|
-
function _objectSpread$9(
|
|
3910
|
+
function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3911
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1842
3912
|
|
|
1843
3913
|
/** @type {React.FC<import("types").EditProps>} */
|
|
1844
3914
|
|
|
@@ -1870,7 +3940,7 @@ var Edit = function Edit(_ref) {
|
|
|
1870
3940
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1871
3941
|
args[_key] = arguments[_key];
|
|
1872
3942
|
}
|
|
1873
|
-
onMutationSuccess === null || onMutationSuccess === void 0
|
|
3943
|
+
onMutationSuccess === null || onMutationSuccess === void 0 || onMutationSuccess.apply(void 0, args);
|
|
1874
3944
|
onClose();
|
|
1875
3945
|
}
|
|
1876
3946
|
}),
|
|
@@ -1916,8 +3986,8 @@ var Edit = function Edit(_ref) {
|
|
|
1916
3986
|
};
|
|
1917
3987
|
|
|
1918
3988
|
var _excluded$1 = ["isOpen", "selectedField"];
|
|
1919
|
-
function ownKeys$8(
|
|
1920
|
-
function _objectSpread$8(
|
|
3989
|
+
function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3990
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1921
3991
|
|
|
1922
3992
|
/** @type {React.FC<import("types").FieldsPaneProps>} */
|
|
1923
3993
|
|
|
@@ -2479,7 +4549,7 @@ var buildDefaultColumns = function buildDefaultColumns(_ref2) {
|
|
|
2479
4549
|
key: "name",
|
|
2480
4550
|
dataIndex: "name",
|
|
2481
4551
|
title: i18next.t("neetoFields.titles.fieldName"),
|
|
2482
|
-
width: "
|
|
4552
|
+
width: "300px",
|
|
2483
4553
|
render: function render(name, field) {
|
|
2484
4554
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
2485
4555
|
className: "flex items-center justify-between gap-x-3"
|
|
@@ -2507,11 +4577,12 @@ var buildDefaultColumns = function buildDefaultColumns(_ref2) {
|
|
|
2507
4577
|
render: function render(kind) {
|
|
2508
4578
|
return DISPLAY_KINDS[kind];
|
|
2509
4579
|
},
|
|
2510
|
-
width: "
|
|
4580
|
+
width: "300px"
|
|
2511
4581
|
}, {
|
|
2512
4582
|
key: "isRequired",
|
|
2513
4583
|
dataIndex: "isRequired",
|
|
2514
4584
|
title: i18next.t("neetoFields.titles.required"),
|
|
4585
|
+
width: "300px",
|
|
2515
4586
|
render: function render(boolVal) {
|
|
2516
4587
|
return boolVal ? i18next.t("neetoFields.common.yes") : i18next.t("neetoFields.common.no");
|
|
2517
4588
|
}
|
|
@@ -2534,7 +4605,7 @@ var renderMenuBarItems = function renderMenuBarItems(_ref3) {
|
|
|
2534
4605
|
label: neetoCist.humanize(item.name),
|
|
2535
4606
|
description: i18next.t("neetoFields.messages.manageTitleForResource", {
|
|
2536
4607
|
title: title,
|
|
2537
|
-
resource: neetoCist.humanize(item.name)
|
|
4608
|
+
resource: neetoCist.humanize(item.name)
|
|
2538
4609
|
}),
|
|
2539
4610
|
onClick: handleBlockClick({
|
|
2540
4611
|
resource: item.id
|
|
@@ -2553,7 +4624,7 @@ var renderMenuBarItems = function renderMenuBarItems(_ref3) {
|
|
|
2553
4624
|
label: itemLabel,
|
|
2554
4625
|
description: i18next.t("neetoFields.messages.manageTitleForResource", {
|
|
2555
4626
|
title: title,
|
|
2556
|
-
resource: itemLabel
|
|
4627
|
+
resource: itemLabel
|
|
2557
4628
|
}),
|
|
2558
4629
|
onClick: handleBlockClick({
|
|
2559
4630
|
resource: value
|
|
@@ -2654,16 +4725,16 @@ var configsApi = {
|
|
|
2654
4725
|
fetchConfigs: fetchConfigs
|
|
2655
4726
|
};
|
|
2656
4727
|
|
|
2657
|
-
function ownKeys$7(
|
|
2658
|
-
function _objectSpread$7(
|
|
4728
|
+
function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4729
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2659
4730
|
var useFetchConfigs = function useFetchConfigs(options) {
|
|
2660
4731
|
return reactQuery.useQuery([QUERY_KEYS.CONFIGS], configsApi.fetchConfigs, _objectSpread$7({
|
|
2661
4732
|
staleTime: DEFAULT_STALE_TIME
|
|
2662
4733
|
}, options));
|
|
2663
4734
|
};
|
|
2664
4735
|
|
|
2665
|
-
function ownKeys$6(
|
|
2666
|
-
function _objectSpread$6(
|
|
4736
|
+
function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4737
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2667
4738
|
var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
2668
4739
|
var buildColumnData = _ref.buildColumnData,
|
|
2669
4740
|
isOwnerBased = _ref.isOwnerBased,
|
|
@@ -2696,13 +4767,17 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2696
4767
|
pageProps = _useState10[0],
|
|
2697
4768
|
setPageProps = _useState10[1];
|
|
2698
4769
|
var _useQueryParams = reactUtils.useQueryParams(),
|
|
2699
|
-
searchTerm = _useQueryParams.
|
|
4770
|
+
searchTerm = _useQueryParams.searchTerm,
|
|
4771
|
+
resource = _useQueryParams.resource,
|
|
4772
|
+
state = _useQueryParams.state;
|
|
2700
4773
|
var history = reactRouterDom.useHistory();
|
|
2701
4774
|
var _useTranslation = reactI18next.useTranslation(),
|
|
2702
4775
|
t = _useTranslation.t;
|
|
2703
|
-
var
|
|
2704
|
-
|
|
2705
|
-
|
|
4776
|
+
var searchKeywordProps = {
|
|
4777
|
+
key: "search_term",
|
|
4778
|
+
node: "name",
|
|
4779
|
+
value: searchTerm
|
|
4780
|
+
};
|
|
2706
4781
|
var ownerId = isOwnerBased ? resource : undefined;
|
|
2707
4782
|
var _useFetchConfigs = useFetchConfigs({
|
|
2708
4783
|
enabled: !resources
|
|
@@ -2714,12 +4789,15 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2714
4789
|
_useFetchConfigs$data4 = _useFetchConfigs$data2.resourceTypes,
|
|
2715
4790
|
resourceTypes = _useFetchConfigs$data4 === void 0 ? [] : _useFetchConfigs$data4,
|
|
2716
4791
|
isConfigsLoading = _useFetchConfigs.isLoading;
|
|
4792
|
+
var filters = React.useMemo(function () {
|
|
4793
|
+
return neetoFiltersFrontend.buildFiltersFromURL([searchKeywordProps]);
|
|
4794
|
+
}, [searchTerm]);
|
|
2717
4795
|
var fieldParams = {
|
|
2718
4796
|
resourceType: !isOwnerBased ? resource : undefined,
|
|
2719
4797
|
ownerId: ownerId,
|
|
2720
4798
|
state: state || FIELD_STATES.active,
|
|
2721
|
-
|
|
2722
|
-
|
|
4799
|
+
pageProps: pageProps,
|
|
4800
|
+
filters: filters
|
|
2723
4801
|
};
|
|
2724
4802
|
var _useFetchFields = useFetchFields(fieldParams, {
|
|
2725
4803
|
enabled: !!resource,
|
|
@@ -2779,7 +4857,7 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2779
4857
|
defaultColumns: defaultColumns
|
|
2780
4858
|
});
|
|
2781
4859
|
var handleBlockClick = function handleBlockClick(params) {
|
|
2782
|
-
return reactUtils.handleMetaClick(history, utils.buildUrl("", _objectSpread$6({
|
|
4860
|
+
return reactUtils.handleMetaClick(history, utils$3.buildUrl("", _objectSpread$6({
|
|
2783
4861
|
resource: resource,
|
|
2784
4862
|
state: state
|
|
2785
4863
|
}, params)));
|
|
@@ -2792,18 +4870,18 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2792
4870
|
};
|
|
2793
4871
|
if (!isConfigsLoading && ramda.isNil(resource)) {
|
|
2794
4872
|
var _menuItems$, _menuItems$2;
|
|
2795
|
-
queryParams.resource = isOwnerBased ? menuItems === null || menuItems === void 0
|
|
4873
|
+
queryParams.resource = isOwnerBased ? menuItems === null || menuItems === void 0 || (_menuItems$ = menuItems[0]) === null || _menuItems$ === void 0 ? void 0 : _menuItems$.id : menuItems === null || menuItems === void 0 || (_menuItems$2 = menuItems[0]) === null || _menuItems$2 === void 0 ? void 0 : _menuItems$2.value;
|
|
2796
4874
|
}
|
|
2797
4875
|
if (!isConfigsLoading && ramda.isNil(state)) {
|
|
2798
4876
|
queryParams.state = FIELD_STATES.active;
|
|
2799
4877
|
}
|
|
2800
4878
|
if (!isConfigsLoading && ramda.any(ramda.isNil)([resource, state])) {
|
|
2801
|
-
history.replace(utils.buildUrl("", queryParams));
|
|
4879
|
+
history.replace(utils$3.buildUrl("", queryParams));
|
|
2802
4880
|
}
|
|
2803
4881
|
};
|
|
2804
4882
|
var isScreenLoading = isFieldsLoading || isConfigsLoading;
|
|
2805
4883
|
var showCountSubheader = count > 0 && !showStateFilter;
|
|
2806
|
-
var
|
|
4884
|
+
var searchInputProps = {
|
|
2807
4885
|
placeholder: t("neetoFields.placeholders.searchFields"),
|
|
2808
4886
|
className: "w-44"
|
|
2809
4887
|
};
|
|
@@ -2875,7 +4953,8 @@ var useFieldsDashboard = function useFieldsDashboard(_ref) {
|
|
|
2875
4953
|
handleAlertClose: handleAlertClose,
|
|
2876
4954
|
handleClosePane: handleClosePane,
|
|
2877
4955
|
handleReorderPaneClose: handleReorderPaneClose,
|
|
2878
|
-
|
|
4956
|
+
searchInputProps: searchInputProps,
|
|
4957
|
+
searchKeywordProps: searchKeywordProps,
|
|
2879
4958
|
stateFilterTabs: stateFilterTabs,
|
|
2880
4959
|
menuBarItems: menuBarItems,
|
|
2881
4960
|
reorderable: reorderable,
|
|
@@ -2920,8 +4999,8 @@ var DeleteAlert = function DeleteAlert(_ref) {
|
|
|
2920
4999
|
});
|
|
2921
5000
|
};
|
|
2922
5001
|
|
|
2923
|
-
function ownKeys$5(
|
|
2924
|
-
function _objectSpread$5(
|
|
5002
|
+
function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5003
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2925
5004
|
var FieldsTable = function FieldsTable(_ref) {
|
|
2926
5005
|
var totalCount = _ref.totalCount,
|
|
2927
5006
|
isFetched = _ref.isFetched,
|
|
@@ -2937,7 +5016,7 @@ var FieldsTable = function FieldsTable(_ref) {
|
|
|
2937
5016
|
var _useTranslation = reactI18next.useTranslation(),
|
|
2938
5017
|
t = _useTranslation.t;
|
|
2939
5018
|
var showNoDataScreen = isFetched && ramda.isEmpty(rowData);
|
|
2940
|
-
var _getQueryParams = utils.getQueryParams(),
|
|
5019
|
+
var _getQueryParams = utils$3.getQueryParams(),
|
|
2941
5020
|
state = _getQueryParams.state;
|
|
2942
5021
|
title = title.toLocaleLowerCase();
|
|
2943
5022
|
var page = pageProps.page,
|
|
@@ -3023,21 +5102,21 @@ var ActionBlock = function ActionBlock(_ref) {
|
|
|
3023
5102
|
}));
|
|
3024
5103
|
};
|
|
3025
5104
|
|
|
3026
|
-
var _excluded = ["
|
|
5105
|
+
var _excluded = ["searchInputProps", "breadcrumbs", "title", "helpDocUrl"];
|
|
3027
5106
|
var Header = function Header(_ref) {
|
|
3028
|
-
var
|
|
5107
|
+
var searchInputProps = _ref.searchInputProps,
|
|
3029
5108
|
breadcrumbs = _ref.breadcrumbs,
|
|
3030
5109
|
title = _ref.title,
|
|
3031
5110
|
helpDocUrl = _ref.helpDocUrl,
|
|
3032
5111
|
actionBlockProps = _objectWithoutProperties(_ref, _excluded);
|
|
3033
5112
|
return /*#__PURE__*/React__default["default"].createElement(NeetoUIHeader__default["default"], {
|
|
3034
|
-
size: "small",
|
|
3035
5113
|
breadcrumbs: breadcrumbs,
|
|
3036
|
-
searchProps: searchProps,
|
|
3037
5114
|
actionBlock: /*#__PURE__*/React__default["default"].createElement(ActionBlock, actionBlockProps),
|
|
5115
|
+
searchProps: searchInputProps,
|
|
5116
|
+
size: "small",
|
|
3038
5117
|
title: /*#__PURE__*/React__default["default"].createElement(TitleWithHelpLink, {
|
|
3039
|
-
|
|
3040
|
-
|
|
5118
|
+
title: title,
|
|
5119
|
+
helpUrl: helpDocUrl
|
|
3041
5120
|
})
|
|
3042
5121
|
});
|
|
3043
5122
|
};
|
|
@@ -7285,8 +9364,8 @@ function normalizeLocalDisabled(localDisabled, globalDisabled) {
|
|
|
7285
9364
|
|
|
7286
9365
|
[KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];
|
|
7287
9366
|
|
|
7288
|
-
function ownKeys$4(
|
|
7289
|
-
function _objectSpread$4(
|
|
9367
|
+
function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9368
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7290
9369
|
var FieldBlock = function FieldBlock(_ref) {
|
|
7291
9370
|
var field = _ref.field,
|
|
7292
9371
|
index = _ref.index,
|
|
@@ -7312,12 +9391,12 @@ var FieldBlock = function FieldBlock(_ref) {
|
|
|
7312
9391
|
}, _objectSpread$4(_objectSpread$4({
|
|
7313
9392
|
style: style
|
|
7314
9393
|
}, attributes), listeners), {
|
|
7315
|
-
className: "neeto-ui-text-gray-800 mb-3 flex items-center space-x-4 font-medium",
|
|
9394
|
+
className: "neeto-ui-text-gray-800 mb-3 flex w-full items-center space-x-4 font-medium",
|
|
7316
9395
|
"data-cy": "reorder-field-block"
|
|
7317
9396
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7318
9397
|
className: "neeto-ui-bg-gray-100 neeto-ui-text-gray-700 neeto-ui-rounded-sm flex h-6 w-6 flex-shrink-0 items-center justify-center p-1"
|
|
7319
9398
|
}, index - systemFieldsCount + 1), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7320
|
-
className: "neeto-ui-border-gray-400 neeto-ui-bg-white neeto-ui-rounded neeto-ui-shadow-xs flex
|
|
9399
|
+
className: "neeto-ui-border-gray-400 neeto-ui-bg-white neeto-ui-rounded neeto-ui-shadow-xs flex flex-grow items-center space-x-4 border border-solid p-3"
|
|
7321
9400
|
}, /*#__PURE__*/React__default["default"].createElement(neetoIcons.Reorder, null), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7322
9401
|
"data-cy": "reorder-field-block-name"
|
|
7323
9402
|
}, field.name)));
|
|
@@ -7335,7 +9414,7 @@ var ReorderPane = function ReorderPane(_ref) {
|
|
|
7335
9414
|
var initialStateRef = React.useRef([]);
|
|
7336
9415
|
var _useTranslation = reactI18next.useTranslation(),
|
|
7337
9416
|
t = _useTranslation.t;
|
|
7338
|
-
var _getQueryParams = utils.getQueryParams(),
|
|
9417
|
+
var _getQueryParams = utils$3.getQueryParams(),
|
|
7339
9418
|
resource = _getQueryParams.resource;
|
|
7340
9419
|
var _useReorderFields = useReorderFields(),
|
|
7341
9420
|
reorderField = _useReorderFields.mutate,
|
|
@@ -7394,7 +9473,7 @@ var ReorderPane = function ReorderPane(_ref) {
|
|
|
7394
9473
|
"data-cy": "reorder-pane-message",
|
|
7395
9474
|
style: "body2"
|
|
7396
9475
|
}, t("neetoFields.messages.reorderFields")), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7397
|
-
className: "flex flex-col items-center"
|
|
9476
|
+
className: "flex w-full flex-col items-center"
|
|
7398
9477
|
}, /*#__PURE__*/React__default["default"].createElement(DndContext, {
|
|
7399
9478
|
collisionDetection: closestCenter,
|
|
7400
9479
|
onDragEnd: handleDragEnd
|
|
@@ -7427,16 +9506,19 @@ var ReorderPane = function ReorderPane(_ref) {
|
|
|
7427
9506
|
|
|
7428
9507
|
// eslint-disable-next-line @bigbinary/neeto/no-dumb-components-with-use-translation
|
|
7429
9508
|
var Subheader = function Subheader(_ref) {
|
|
7430
|
-
var count = _ref.count
|
|
9509
|
+
var count = _ref.count,
|
|
9510
|
+
searchKeywordProps = _ref.searchKeywordProps;
|
|
7431
9511
|
var _useTranslation = reactI18next.useTranslation(),
|
|
7432
9512
|
t = _useTranslation.t;
|
|
7433
9513
|
return /*#__PURE__*/React__default["default"].createElement(NeetoUISubHeader__default["default"], {
|
|
7434
|
-
leftActionBlock: /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
9514
|
+
leftActionBlock: /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Typography, {
|
|
7435
9515
|
className: "neeto-ui-gray-800 mr-4 font-semibold",
|
|
7436
9516
|
"data-cy": "neeto-fields-subheader-text",
|
|
7437
9517
|
style: "h4"
|
|
7438
9518
|
}, t("neetoFields.titles.fieldWithCount", {
|
|
7439
9519
|
count: count
|
|
9520
|
+
})), /*#__PURE__*/React__default["default"].createElement(neetoFiltersFrontend.Bar, {
|
|
9521
|
+
keyword: searchKeywordProps
|
|
7440
9522
|
}))
|
|
7441
9523
|
});
|
|
7442
9524
|
};
|
|
@@ -7503,7 +9585,8 @@ var FieldsDashboard = function FieldsDashboard(_ref) {
|
|
|
7503
9585
|
handleAlertClose = _useFieldsDashboard.handleAlertClose,
|
|
7504
9586
|
handleClosePane = _useFieldsDashboard.handleClosePane,
|
|
7505
9587
|
handleReorderPaneClose = _useFieldsDashboard.handleReorderPaneClose,
|
|
7506
|
-
|
|
9588
|
+
searchInputProps = _useFieldsDashboard.searchInputProps,
|
|
9589
|
+
searchKeywordProps = _useFieldsDashboard.searchKeywordProps,
|
|
7507
9590
|
stateFilterTabs = _useFieldsDashboard.stateFilterTabs,
|
|
7508
9591
|
menuBarItems = _useFieldsDashboard.menuBarItems,
|
|
7509
9592
|
reorderable = _useFieldsDashboard.reorderable,
|
|
@@ -7514,17 +9597,19 @@ var FieldsDashboard = function FieldsDashboard(_ref) {
|
|
|
7514
9597
|
reorderable: reorderable,
|
|
7515
9598
|
breadcrumbs: breadcrumbs,
|
|
7516
9599
|
helpDocUrl: helpDocUrl,
|
|
7517
|
-
|
|
9600
|
+
searchInputProps: searchInputProps,
|
|
7518
9601
|
setIsPaneOpen: setIsPaneOpen,
|
|
7519
9602
|
setIsReorderPaneOpen: setIsReorderPaneOpen,
|
|
7520
9603
|
title: headerDisplayTitle
|
|
7521
9604
|
};
|
|
9605
|
+
var showSubheader = showCountSubheader || neetoCist.isPresent(searchKeywordProps.value);
|
|
7522
9606
|
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, isMenuBarNeeded && /*#__PURE__*/React__default["default"].createElement(Menubar, {
|
|
7523
9607
|
menuBarItems: menuBarItems,
|
|
7524
9608
|
title: title
|
|
7525
|
-
}), /*#__PURE__*/React__default["default"].createElement(Container__default["default"], null, /*#__PURE__*/React__default["default"].createElement(Header, headerProps),
|
|
7526
|
-
count: count
|
|
7527
|
-
|
|
9609
|
+
}), /*#__PURE__*/React__default["default"].createElement(Container__default["default"], null, /*#__PURE__*/React__default["default"].createElement(Header, headerProps), showSubheader && /*#__PURE__*/React__default["default"].createElement(Subheader, {
|
|
9610
|
+
count: count,
|
|
9611
|
+
searchKeywordProps: searchKeywordProps
|
|
9612
|
+
}), showStateFilter && stateFilterTabs, isScreenLoading ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7528
9613
|
className: "flex h-screen w-full flex-grow items-center justify-center"
|
|
7529
9614
|
}, /*#__PURE__*/React__default["default"].createElement(PageLoader__default["default"], null)) : /*#__PURE__*/React__default["default"].createElement(FieldsTable, {
|
|
7530
9615
|
columnData: columnData,
|
|
@@ -7573,7 +9658,7 @@ var isFieldValueEmpty = function isFieldValueEmpty(fieldKind, fieldValueData) {
|
|
|
7573
9658
|
};
|
|
7574
9659
|
|
|
7575
9660
|
var fieldValueUrl = function fieldValueUrl(fieldValueId) {
|
|
7576
|
-
return utils.buildUrl(FIELD_VALUE_URL, {
|
|
9661
|
+
return utils$3.buildUrl(FIELD_VALUE_URL, {
|
|
7577
9662
|
fieldValueId: fieldValueId
|
|
7578
9663
|
});
|
|
7579
9664
|
};
|
|
@@ -7602,8 +9687,8 @@ var fieldValuesApi = {
|
|
|
7602
9687
|
update: update
|
|
7603
9688
|
};
|
|
7604
9689
|
|
|
7605
|
-
function ownKeys$3(
|
|
7606
|
-
function _objectSpread$3(
|
|
9690
|
+
function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9691
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7607
9692
|
var useCreateFieldValue = function useCreateFieldValue(options) {
|
|
7608
9693
|
return reactUtils.useMutationWithInvalidation(fieldValuesApi.create, _objectSpread$3({
|
|
7609
9694
|
keysToInvalidate: [[QUERY_KEYS.FIELD_VALUES]]
|
|
@@ -7713,8 +9798,8 @@ var DEAFULT_BLOCK_NAVIGATION_ALERT_PROPS = {
|
|
|
7713
9798
|
cancelButtonLabel: i18next.t("neetoFields.messages.blockNavigationAlert.cancelButtonLabel")
|
|
7714
9799
|
};
|
|
7715
9800
|
|
|
7716
|
-
function ownKeys$2(
|
|
7717
|
-
function _objectSpread$2(
|
|
9801
|
+
function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9802
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7718
9803
|
var BlockNavigation = function BlockNavigation(_ref) {
|
|
7719
9804
|
var blockNavigation = _ref.blockNavigation,
|
|
7720
9805
|
blockNavigationAlertProps = _ref.blockNavigationAlertProps;
|
|
@@ -7760,8 +9845,8 @@ var FieldValueInputWrapper = function FieldValueInputWrapper(_ref) {
|
|
|
7760
9845
|
}, children);
|
|
7761
9846
|
};
|
|
7762
9847
|
|
|
7763
|
-
function ownKeys$1(
|
|
7764
|
-
function _objectSpread$1(
|
|
9848
|
+
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9849
|
+
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7765
9850
|
var FieldValuesContainer = function FieldValuesContainer(_ref) {
|
|
7766
9851
|
var _ref$resourceType = _ref.resourceType,
|
|
7767
9852
|
resourceType = _ref$resourceType === void 0 ? "" : _ref$resourceType,
|
|
@@ -7855,21 +9940,21 @@ var FieldValuesContainer = function FieldValuesContainer(_ref) {
|
|
|
7855
9940
|
};
|
|
7856
9941
|
|
|
7857
9942
|
var renderDataAsText = function renderDataAsText(field, fieldValues) {
|
|
7858
|
-
var _findBy,
|
|
9943
|
+
var _findBy, _findBy2, _findBy3;
|
|
7859
9944
|
var fieldValueData = (_findBy = neetoCist.findBy({
|
|
7860
9945
|
fieldId: field.id
|
|
7861
|
-
}, fieldValues)) === null || _findBy === void 0
|
|
9946
|
+
}, fieldValues)) === null || _findBy === void 0 || (_findBy = _findBy.data) === null || _findBy === void 0 ? void 0 : _findBy.value;
|
|
7862
9947
|
switch (field.kind) {
|
|
7863
9948
|
case KINDS.date:
|
|
7864
|
-
return fieldValueData && utils.dateFormat.date(fieldValueData);
|
|
9949
|
+
return fieldValueData && utils$3.dateFormat.date(fieldValueData);
|
|
7865
9950
|
case KINDS.time:
|
|
7866
|
-
return fieldValueData && utils.dateFormat.time(fieldValueData);
|
|
9951
|
+
return fieldValueData && utils$3.dateFormat.time(fieldValueData);
|
|
7867
9952
|
case KINDS.datetime:
|
|
7868
|
-
return fieldValueData && utils.dateFormat.dateTime(fieldValueData);
|
|
9953
|
+
return fieldValueData && utils$3.dateFormat.dateTime(fieldValueData);
|
|
7869
9954
|
case KINDS.dateRange:
|
|
7870
|
-
return fieldValueData && neetoCist.isNotEmpty(fieldValueData) && "".concat(utils.dateFormat.date(fieldValueData[0]), " - ").concat(utils.dateFormat.date(fieldValueData[1]));
|
|
9955
|
+
return fieldValueData && neetoCist.isNotEmpty(fieldValueData) && "".concat(utils$3.dateFormat.date(fieldValueData[0]), " - ").concat(utils$3.dateFormat.date(fieldValueData[1]));
|
|
7871
9956
|
case KINDS.timeRange:
|
|
7872
|
-
return fieldValueData && "".concat(utils.dateFormat.time(fieldValueData[0]), " - ").concat(utils.dateFormat.time(fieldValueData[1]));
|
|
9957
|
+
return fieldValueData && "".concat(utils$3.dateFormat.time(fieldValueData[0]), " - ").concat(utils$3.dateFormat.time(fieldValueData[1]));
|
|
7873
9958
|
case KINDS.singleOption:
|
|
7874
9959
|
return (_findBy2 = neetoCist.findBy({
|
|
7875
9960
|
id: fieldValueData
|
|
@@ -7877,7 +9962,7 @@ var renderDataAsText = function renderDataAsText(field, fieldValues) {
|
|
|
7877
9962
|
case KINDS.multiOption:
|
|
7878
9963
|
fieldValueData = (_findBy3 = neetoCist.findBy({
|
|
7879
9964
|
fieldId: field.id
|
|
7880
|
-
}, fieldValues)) === null || _findBy3 === void 0
|
|
9965
|
+
}, fieldValues)) === null || _findBy3 === void 0 || (_findBy3 = _findBy3.data) === null || _findBy3 === void 0 ? void 0 : _findBy3.values;
|
|
7881
9966
|
return fieldValueData && fieldValueData.map(function (optionId) {
|
|
7882
9967
|
var _findBy4;
|
|
7883
9968
|
return (_findBy4 = neetoCist.findBy({
|
|
@@ -7891,8 +9976,8 @@ var renderDataAsText = function renderDataAsText(field, fieldValues) {
|
|
|
7891
9976
|
}
|
|
7892
9977
|
};
|
|
7893
9978
|
|
|
7894
|
-
function ownKeys(
|
|
7895
|
-
function _objectSpread(
|
|
9979
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9980
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7896
9981
|
var InlineFieldValueInput = function InlineFieldValueInput(_ref) {
|
|
7897
9982
|
var field = _ref.field,
|
|
7898
9983
|
fieldValues = _ref.fieldValues,
|