@bigbinary/neeto-commons-frontend 2.0.28 → 2.0.29

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/utils.cjs.js CHANGED
@@ -39,42 +39,36 @@ function _arrayWithHoles(arr) {
39
39
  }
40
40
 
41
41
  function _iterableToArrayLimit(arr, i) {
42
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
43
-
44
- if (_i == null) return;
45
- var _arr = [];
46
- var _n = true;
47
- var _d = false;
48
-
49
- var _s, _e;
50
-
51
- try {
52
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
53
- _arr.push(_s.value);
54
-
55
- if (i && _arr.length === i) break;
56
- }
57
- } catch (err) {
58
- _d = true;
59
- _e = err;
60
- } finally {
42
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
43
+ if (null != _i) {
44
+ var _s,
45
+ _e,
46
+ _x,
47
+ _r,
48
+ _arr = [],
49
+ _n = !0,
50
+ _d = !1;
61
51
  try {
62
- if (!_n && _i["return"] != null) _i["return"]();
52
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
53
+ if (Object(_i) !== _i) return;
54
+ _n = !1;
55
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
56
+ } catch (err) {
57
+ _d = !0, _e = err;
63
58
  } finally {
64
- if (_d) throw _e;
59
+ try {
60
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
61
+ } finally {
62
+ if (_d) throw _e;
63
+ }
65
64
  }
65
+ return _arr;
66
66
  }
67
-
68
- return _arr;
69
67
  }
70
68
 
71
69
  function _arrayLikeToArray(arr, len) {
72
70
  if (len == null || len > arr.length) len = arr.length;
73
-
74
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
75
- arr2[i] = arr[i];
76
- }
77
-
71
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
78
72
  return arr2;
79
73
  }
80
74
 
@@ -103,35 +97,57 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
103
97
  reject(error);
104
98
  return;
105
99
  }
106
-
107
100
  if (info.done) {
108
101
  resolve(value);
109
102
  } else {
110
103
  Promise.resolve(value).then(_next, _throw);
111
104
  }
112
105
  }
113
-
114
106
  function _asyncToGenerator(fn) {
115
107
  return function () {
116
108
  var self = this,
117
- args = arguments;
109
+ args = arguments;
118
110
  return new Promise(function (resolve, reject) {
119
111
  var gen = fn.apply(self, args);
120
-
121
112
  function _next(value) {
122
113
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
123
114
  }
124
-
125
115
  function _throw(err) {
126
116
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
127
117
  }
128
-
129
118
  _next(undefined);
130
119
  });
131
120
  };
132
121
  }
133
122
 
123
+ function _typeof$1(obj) {
124
+ "@babel/helpers - typeof";
125
+
126
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
127
+ return typeof obj;
128
+ } : function (obj) {
129
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
130
+ }, _typeof$1(obj);
131
+ }
132
+
133
+ function _toPrimitive(input, hint) {
134
+ if (_typeof$1(input) !== "object" || input === null) return input;
135
+ var prim = input[Symbol.toPrimitive];
136
+ if (prim !== undefined) {
137
+ var res = prim.call(input, hint || "default");
138
+ if (_typeof$1(res) !== "object") return res;
139
+ throw new TypeError("@@toPrimitive must return a primitive value.");
140
+ }
141
+ return (hint === "string" ? String : Number)(input);
142
+ }
143
+
144
+ function _toPropertyKey(arg) {
145
+ var key = _toPrimitive(arg, "string");
146
+ return _typeof$1(key) === "symbol" ? key : String(key);
147
+ }
148
+
134
149
  function _defineProperty(obj, key, value) {
150
+ key = _toPropertyKey(key);
135
151
  if (key in obj) {
136
152
  Object.defineProperty(obj, key, {
137
153
  value: value,
@@ -142,13 +158,12 @@ function _defineProperty(obj, key, value) {
142
158
  } else {
143
159
  obj[key] = value;
144
160
  }
145
-
146
161
  return obj;
147
162
  }
148
163
 
149
164
  var regeneratorRuntime$1 = {exports: {}};
150
165
 
151
- var _typeof$1 = {exports: {}};
166
+ var _typeof = {exports: {}};
152
167
 
153
168
  (function (module) {
154
169
  function _typeof(obj) {
@@ -160,27 +175,25 @@ var _typeof$1 = {exports: {}};
160
175
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
161
176
  }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
162
177
  }
163
-
164
178
  module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
165
- } (_typeof$1));
179
+ } (_typeof));
166
180
 
167
181
  (function (module) {
168
- var _typeof = _typeof$1.exports["default"];
169
-
182
+ var _typeof$1 = _typeof.exports["default"];
170
183
  function _regeneratorRuntime() {
171
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
172
-
173
184
  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
174
185
  return exports;
175
186
  }, module.exports.__esModule = true, module.exports["default"] = module.exports;
176
187
  var exports = {},
177
- Op = Object.prototype,
178
- hasOwn = Op.hasOwnProperty,
179
- $Symbol = "function" == typeof Symbol ? Symbol : {},
180
- iteratorSymbol = $Symbol.iterator || "@@iterator",
181
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
182
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
183
-
188
+ Op = Object.prototype,
189
+ hasOwn = Op.hasOwnProperty,
190
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
191
+ obj[key] = desc.value;
192
+ },
193
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
194
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
195
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
196
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
184
197
  function define(obj, key, value) {
185
198
  return Object.defineProperty(obj, key, {
186
199
  value: value,
@@ -189,7 +202,6 @@ var _typeof$1 = {exports: {}};
189
202
  writable: !0
190
203
  }), obj[key];
191
204
  }
192
-
193
205
  try {
194
206
  define({}, "");
195
207
  } catch (err) {
@@ -197,54 +209,14 @@ var _typeof$1 = {exports: {}};
197
209
  return obj[key] = value;
198
210
  };
199
211
  }
200
-
201
212
  function wrap(innerFn, outerFn, self, tryLocsList) {
202
213
  var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
203
- generator = Object.create(protoGenerator.prototype),
204
- context = new Context(tryLocsList || []);
205
- return generator._invoke = function (innerFn, self, context) {
206
- var state = "suspendedStart";
207
- return function (method, arg) {
208
- if ("executing" === state) throw new Error("Generator is already running");
209
-
210
- if ("completed" === state) {
211
- if ("throw" === method) throw arg;
212
- return doneResult();
213
- }
214
-
215
- for (context.method = method, context.arg = arg;;) {
216
- var delegate = context.delegate;
217
-
218
- if (delegate) {
219
- var delegateResult = maybeInvokeDelegate(delegate, context);
220
-
221
- if (delegateResult) {
222
- if (delegateResult === ContinueSentinel) continue;
223
- return delegateResult;
224
- }
225
- }
226
-
227
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
228
- if ("suspendedStart" === state) throw state = "completed", context.arg;
229
- context.dispatchException(context.arg);
230
- } else "return" === context.method && context.abrupt("return", context.arg);
231
- state = "executing";
232
- var record = tryCatch(innerFn, self, context);
233
-
234
- if ("normal" === record.type) {
235
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
236
- return {
237
- value: record.arg,
238
- done: context.done
239
- };
240
- }
241
-
242
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
243
- }
244
- };
245
- }(innerFn, self, context), generator;
214
+ generator = Object.create(protoGenerator.prototype),
215
+ context = new Context(tryLocsList || []);
216
+ return defineProperty(generator, "_invoke", {
217
+ value: makeInvokeMethod(innerFn, self, context)
218
+ }), generator;
246
219
  }
247
-
248
220
  function tryCatch(fn, obj, arg) {
249
221
  try {
250
222
  return {
@@ -258,25 +230,19 @@ var _typeof$1 = {exports: {}};
258
230
  };
259
231
  }
260
232
  }
261
-
262
233
  exports.wrap = wrap;
263
234
  var ContinueSentinel = {};
264
-
265
235
  function Generator() {}
266
-
267
236
  function GeneratorFunction() {}
268
-
269
237
  function GeneratorFunctionPrototype() {}
270
-
271
238
  var IteratorPrototype = {};
272
239
  define(IteratorPrototype, iteratorSymbol, function () {
273
240
  return this;
274
241
  });
275
242
  var getProto = Object.getPrototypeOf,
276
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
243
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
277
244
  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
278
245
  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
279
-
280
246
  function defineIteratorMethods(prototype) {
281
247
  ["next", "throw", "return"].forEach(function (method) {
282
248
  define(prototype, method, function (arg) {
@@ -284,15 +250,13 @@ var _typeof$1 = {exports: {}};
284
250
  });
285
251
  });
286
252
  }
287
-
288
253
  function AsyncIterator(generator, PromiseImpl) {
289
254
  function invoke(method, arg, resolve, reject) {
290
255
  var record = tryCatch(generator[method], generator, arg);
291
-
292
256
  if ("throw" !== record.type) {
293
257
  var result = record.arg,
294
- value = result.value;
295
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
258
+ value = result.value;
259
+ return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
296
260
  invoke("next", value, resolve, reject);
297
261
  }, function (err) {
298
262
  invoke("throw", err, resolve, reject);
@@ -302,92 +266,109 @@ var _typeof$1 = {exports: {}};
302
266
  return invoke("throw", error, resolve, reject);
303
267
  });
304
268
  }
305
-
306
269
  reject(record.arg);
307
270
  }
308
-
309
271
  var previousPromise;
310
-
311
- this._invoke = function (method, arg) {
312
- function callInvokeWithMethodAndArg() {
313
- return new PromiseImpl(function (resolve, reject) {
314
- invoke(method, arg, resolve, reject);
315
- });
272
+ defineProperty(this, "_invoke", {
273
+ value: function value(method, arg) {
274
+ function callInvokeWithMethodAndArg() {
275
+ return new PromiseImpl(function (resolve, reject) {
276
+ invoke(method, arg, resolve, reject);
277
+ });
278
+ }
279
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
280
+ }
281
+ });
282
+ }
283
+ function makeInvokeMethod(innerFn, self, context) {
284
+ var state = "suspendedStart";
285
+ return function (method, arg) {
286
+ if ("executing" === state) throw new Error("Generator is already running");
287
+ if ("completed" === state) {
288
+ if ("throw" === method) throw arg;
289
+ return doneResult();
290
+ }
291
+ for (context.method = method, context.arg = arg;;) {
292
+ var delegate = context.delegate;
293
+ if (delegate) {
294
+ var delegateResult = maybeInvokeDelegate(delegate, context);
295
+ if (delegateResult) {
296
+ if (delegateResult === ContinueSentinel) continue;
297
+ return delegateResult;
298
+ }
299
+ }
300
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
301
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
302
+ context.dispatchException(context.arg);
303
+ } else "return" === context.method && context.abrupt("return", context.arg);
304
+ state = "executing";
305
+ var record = tryCatch(innerFn, self, context);
306
+ if ("normal" === record.type) {
307
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
308
+ return {
309
+ value: record.arg,
310
+ done: context.done
311
+ };
312
+ }
313
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
316
314
  }
317
-
318
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
319
315
  };
320
316
  }
321
-
322
317
  function maybeInvokeDelegate(delegate, context) {
323
- var method = delegate.iterator[context.method];
324
-
325
- if (undefined === method) {
326
- if (context.delegate = null, "throw" === context.method) {
327
- if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
328
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
329
- }
330
-
331
- return ContinueSentinel;
332
- }
333
-
318
+ var methodName = context.method,
319
+ method = delegate.iterator[methodName];
320
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
334
321
  var record = tryCatch(method, delegate.iterator, context.arg);
335
322
  if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
336
323
  var info = record.arg;
337
324
  return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
338
325
  }
339
-
340
326
  function pushTryEntry(locs) {
341
327
  var entry = {
342
328
  tryLoc: locs[0]
343
329
  };
344
330
  1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
345
331
  }
346
-
347
332
  function resetTryEntry(entry) {
348
333
  var record = entry.completion || {};
349
334
  record.type = "normal", delete record.arg, entry.completion = record;
350
335
  }
351
-
352
336
  function Context(tryLocsList) {
353
337
  this.tryEntries = [{
354
338
  tryLoc: "root"
355
339
  }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
356
340
  }
357
-
358
341
  function values(iterable) {
359
342
  if (iterable) {
360
343
  var iteratorMethod = iterable[iteratorSymbol];
361
344
  if (iteratorMethod) return iteratorMethod.call(iterable);
362
345
  if ("function" == typeof iterable.next) return iterable;
363
-
364
346
  if (!isNaN(iterable.length)) {
365
347
  var i = -1,
366
- next = function next() {
367
- for (; ++i < iterable.length;) {
368
- if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
369
- }
370
-
371
- return next.value = undefined, next.done = !0, next;
372
- };
373
-
348
+ next = function next() {
349
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
350
+ return next.value = undefined, next.done = !0, next;
351
+ };
374
352
  return next.next = next;
375
353
  }
376
354
  }
377
-
378
355
  return {
379
356
  next: doneResult
380
357
  };
381
358
  }
382
-
383
359
  function doneResult() {
384
360
  return {
385
361
  value: undefined,
386
362
  done: !0
387
363
  };
388
364
  }
389
-
390
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
365
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
366
+ value: GeneratorFunctionPrototype,
367
+ configurable: !0
368
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
369
+ value: GeneratorFunction,
370
+ configurable: !0
371
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
391
372
  var ctor = "function" == typeof genFun && genFun.constructor;
392
373
  return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
393
374
  }, exports.mark = function (genFun) {
@@ -408,27 +389,21 @@ var _typeof$1 = {exports: {}};
408
389
  return this;
409
390
  }), define(Gp, "toString", function () {
410
391
  return "[object Generator]";
411
- }), exports.keys = function (object) {
412
- var keys = [];
413
-
414
- for (var key in object) {
415
- keys.push(key);
416
- }
417
-
392
+ }), exports.keys = function (val) {
393
+ var object = Object(val),
394
+ keys = [];
395
+ for (var key in object) keys.push(key);
418
396
  return keys.reverse(), function next() {
419
397
  for (; keys.length;) {
420
398
  var key = keys.pop();
421
399
  if (key in object) return next.value = key, next.done = !1, next;
422
400
  }
423
-
424
401
  return next.done = !0, next;
425
402
  };
426
403
  }, exports.values = values, Context.prototype = {
427
404
  constructor: Context,
428
405
  reset: function reset(skipTempReset) {
429
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) {
430
- "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
431
- }
406
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
432
407
  },
433
408
  stop: function stop() {
434
409
  this.done = !0;
@@ -439,20 +414,16 @@ var _typeof$1 = {exports: {}};
439
414
  dispatchException: function dispatchException(exception) {
440
415
  if (this.done) throw exception;
441
416
  var context = this;
442
-
443
417
  function handle(loc, caught) {
444
418
  return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
445
419
  }
446
-
447
420
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
448
421
  var entry = this.tryEntries[i],
449
- record = entry.completion;
422
+ record = entry.completion;
450
423
  if ("root" === entry.tryLoc) return handle("end");
451
-
452
424
  if (entry.tryLoc <= this.prev) {
453
425
  var hasCatch = hasOwn.call(entry, "catchLoc"),
454
- hasFinally = hasOwn.call(entry, "finallyLoc");
455
-
426
+ hasFinally = hasOwn.call(entry, "finallyLoc");
456
427
  if (hasCatch && hasFinally) {
457
428
  if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
458
429
  if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
@@ -468,13 +439,11 @@ var _typeof$1 = {exports: {}};
468
439
  abrupt: function abrupt(type, arg) {
469
440
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
470
441
  var entry = this.tryEntries[i];
471
-
472
442
  if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
473
443
  var finallyEntry = entry;
474
444
  break;
475
445
  }
476
446
  }
477
-
478
447
  finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
479
448
  var record = finallyEntry ? finallyEntry.completion : {};
480
449
  return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
@@ -492,19 +461,15 @@ var _typeof$1 = {exports: {}};
492
461
  "catch": function _catch(tryLoc) {
493
462
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
494
463
  var entry = this.tryEntries[i];
495
-
496
464
  if (entry.tryLoc === tryLoc) {
497
465
  var record = entry.completion;
498
-
499
466
  if ("throw" === record.type) {
500
467
  var thrown = record.arg;
501
468
  resetTryEntry(entry);
502
469
  }
503
-
504
470
  return thrown;
505
471
  }
506
472
  }
507
-
508
473
  throw new Error("illegal catch attempt");
509
474
  },
510
475
  delegateYield: function delegateYield(iterable, resultName, nextLoc) {
@@ -516,7 +481,6 @@ var _typeof$1 = {exports: {}};
516
481
  }
517
482
  }, exports;
518
483
  }
519
-
520
484
  module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
521
485
  } (regeneratorRuntime$1));
522
486
 
@@ -541,12 +505,11 @@ try {
541
505
  * @param {T} func
542
506
  * @returns {T}
543
507
  */
544
-
545
508
  var nullSafe = function nullSafe(func) {
546
- return (// @ts-ignore
509
+ return (
510
+ // @ts-ignore
547
511
  ramda.curryN(func.length, function () {
548
512
  var _ref;
549
-
550
513
  var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
551
514
  return ramda.isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
552
515
  })
@@ -555,7 +518,6 @@ var nullSafe = function nullSafe(func) {
555
518
  var getRandomInt = function getRandomInt() {
556
519
  var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.MAX_SAFE_INTEGER;
557
520
  var b = arguments.length > 1 ? arguments[1] : undefined;
558
-
559
521
  if (b) {
560
522
  a = Math.ceil(a);
561
523
  b = Math.floor(b);
@@ -563,20 +525,9 @@ var getRandomInt = function getRandomInt() {
563
525
  b = a;
564
526
  a = 0;
565
527
  }
566
-
567
528
  return Math.floor(Math.random() * (b - a) + a);
568
529
  };
569
530
 
570
- function _typeof(obj) {
571
- "@babel/helpers - typeof";
572
-
573
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
574
- return typeof obj;
575
- } : function (obj) {
576
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
577
- }, _typeof(obj);
578
- }
579
-
580
531
  var slugify = function slugify(string) {
581
532
  return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
582
533
  .replace(/&/g, "-and-") // Replace & with 'and'
@@ -612,24 +563,20 @@ nullSafe(capitalize);
612
563
 
613
564
  var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
614
565
  var objectPreProcessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
615
-
616
566
  if (objectPreProcessor && typeof objectPreProcessor === "function") {
617
567
  object = objectPreProcessor(object);
618
568
  }
619
-
620
569
  if (Array.isArray(object)) {
621
570
  return object.map(function (obj) {
622
571
  return transformObjectDeep(obj, keyValueTransformer, objectPreProcessor);
623
572
  });
624
- } else if (object === null || _typeof(object) !== "object") {
573
+ } else if (object === null || _typeof$1(object) !== "object") {
625
574
  return object;
626
575
  }
627
-
628
576
  return Object.fromEntries(Object.entries(object).map(function (_ref3) {
629
577
  var _ref4 = _slicedToArray(_ref3, 2),
630
- key = _ref4[0],
631
- value = _ref4[1];
632
-
578
+ key = _ref4[0],
579
+ value = _ref4[1];
633
580
  return keyValueTransformer(key, transformObjectDeep(value, keyValueTransformer, objectPreProcessor));
634
581
  }));
635
582
  };
@@ -643,15 +590,13 @@ var preprocessForSerialization = function preprocessForSerialization(object) {
643
590
  var filterNonNull = function filterNonNull(object) {
644
591
  return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
645
592
  var _ref6 = _slicedToArray(_ref5, 2),
646
- v = _ref6[1];
647
-
593
+ v = _ref6[1];
648
594
  return !ramda.isNil(v);
649
595
  }).map(function (_ref7) {
650
596
  var _ref8 = _slicedToArray(_ref7, 2),
651
- k = _ref8[0],
652
- v = _ref8[1];
653
-
654
- return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
597
+ k = _ref8[0],
598
+ v = _ref8[1];
599
+ return [k, _typeof$1(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
655
600
  }));
656
601
  };
657
602
  nullSafe(filterNonNull);
@@ -830,6 +775,8 @@ var INTRINSICS = {
830
775
  '%AsyncIteratorPrototype%': needsEval,
831
776
  '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
832
777
  '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
778
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
779
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
833
780
  '%Boolean%': Boolean,
834
781
  '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
835
782
  '%Date%': Date,
@@ -885,6 +832,14 @@ var INTRINSICS = {
885
832
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
886
833
  };
887
834
 
835
+ try {
836
+ null.error; // eslint-disable-line no-unused-expressions
837
+ } catch (e) {
838
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
839
+ var errorProto = getProto(getProto(e));
840
+ INTRINSICS['%Error.prototype%'] = errorProto;
841
+ }
842
+
888
843
  var doEval = function doEval(name) {
889
844
  var value;
890
845
  if (name === '%AsyncFunction%') {
@@ -1372,16 +1327,20 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
1372
1327
  }
1373
1328
  if (isMap(obj)) {
1374
1329
  var mapParts = [];
1375
- mapForEach.call(obj, function (value, key) {
1376
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1377
- });
1330
+ if (mapForEach) {
1331
+ mapForEach.call(obj, function (value, key) {
1332
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1333
+ });
1334
+ }
1378
1335
  return collectionOf('Map', mapSize.call(obj), mapParts, indent);
1379
1336
  }
1380
1337
  if (isSet(obj)) {
1381
1338
  var setParts = [];
1382
- setForEach.call(obj, function (value) {
1383
- setParts.push(inspect(value, obj));
1384
- });
1339
+ if (setForEach) {
1340
+ setForEach.call(obj, function (value) {
1341
+ setParts.push(inspect(value, obj));
1342
+ });
1343
+ }
1385
1344
  return collectionOf('Set', setSize.call(obj), setParts, indent);
1386
1345
  }
1387
1346
  if (isWeakMap(obj)) {
@@ -2675,7 +2634,6 @@ var lib = {
2675
2634
  };
2676
2635
 
2677
2636
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2678
-
2679
2637
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2680
2638
  var withEventTargetValue = /*#__PURE__*/ramda.curry(function (func, event) {
2681
2639
  return func(event.target.value);
@@ -2701,62 +2659,51 @@ var simulateApiCall = function simulateApiCall(result, error) {
2701
2659
  var copyToClipboard = /*#__PURE__*/function () {
2702
2660
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(text) {
2703
2661
  var _ref2,
2704
- _ref2$showToastr,
2705
- showToastr,
2706
- _ref2$message,
2707
- message,
2708
- textArea,
2709
- _args = arguments;
2710
-
2662
+ _ref2$showToastr,
2663
+ showToastr,
2664
+ _ref2$message,
2665
+ message,
2666
+ textArea,
2667
+ _args = arguments;
2711
2668
  return regenerator.wrap(function _callee$(_context) {
2712
- while (1) {
2713
- switch (_context.prev = _context.next) {
2714
- case 0:
2715
- _ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref2$showToastr = _ref2.showToastr, showToastr = _ref2$showToastr === void 0 ? true : _ref2$showToastr, _ref2$message = _ref2.message, message = _ref2$message === void 0 ? i18next__default["default"].t("neetoCommons.toastr.success.copiedToClipboard") : _ref2$message;
2716
- _context.prev = 1;
2717
-
2718
- if (!(navigator.clipboard && window.isSecureContext)) {
2719
- _context.next = 7;
2720
- break;
2721
- }
2722
-
2723
- _context.next = 5;
2724
- return navigator.clipboard.writeText(text);
2725
-
2726
- case 5:
2727
- _context.next = 17;
2669
+ while (1) switch (_context.prev = _context.next) {
2670
+ case 0:
2671
+ _ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref2$showToastr = _ref2.showToastr, showToastr = _ref2$showToastr === void 0 ? true : _ref2$showToastr, _ref2$message = _ref2.message, message = _ref2$message === void 0 ? i18next__default["default"].t("neetoCommons.toastr.success.copiedToClipboard") : _ref2$message;
2672
+ _context.prev = 1;
2673
+ if (!(navigator.clipboard && window.isSecureContext)) {
2674
+ _context.next = 7;
2728
2675
  break;
2729
-
2730
- case 7:
2731
- textArea = document.createElement("textarea");
2732
- textArea.value = text;
2733
- textArea.style.top = "0";
2734
- textArea.style.left = "0";
2735
- textArea.style.position = "fixed";
2736
- document.body.appendChild(textArea);
2737
- textArea.focus();
2738
- textArea.select();
2739
- document.execCommand("copy");
2740
- document.body.removeChild(textArea);
2741
-
2742
- case 17:
2743
- showToastr && neetoui.Toastr.success(message);
2744
- _context.next = 23;
2745
- break;
2746
-
2747
- case 20:
2748
- _context.prev = 20;
2749
- _context.t0 = _context["catch"](1);
2750
- neetoui.Toastr.error(_context.t0);
2751
-
2752
- case 23:
2753
- case "end":
2754
- return _context.stop();
2755
- }
2676
+ }
2677
+ _context.next = 5;
2678
+ return navigator.clipboard.writeText(text);
2679
+ case 5:
2680
+ _context.next = 17;
2681
+ break;
2682
+ case 7:
2683
+ textArea = document.createElement("textarea");
2684
+ textArea.value = text;
2685
+ textArea.style.top = "0";
2686
+ textArea.style.left = "0";
2687
+ textArea.style.position = "fixed";
2688
+ document.body.appendChild(textArea);
2689
+ textArea.focus();
2690
+ textArea.select();
2691
+ document.execCommand("copy");
2692
+ document.body.removeChild(textArea);
2693
+ case 17:
2694
+ showToastr && neetoui.Toastr.success(message);
2695
+ _context.next = 23;
2696
+ break;
2697
+ case 20:
2698
+ _context.prev = 20;
2699
+ _context.t0 = _context["catch"](1);
2700
+ neetoui.Toastr.error(_context.t0);
2701
+ case 23:
2702
+ case "end":
2703
+ return _context.stop();
2756
2704
  }
2757
2705
  }, _callee, null, [[1, 20]]);
2758
2706
  }));
2759
-
2760
2707
  return function copyToClipboard(_x) {
2761
2708
  return _ref.apply(this, arguments);
2762
2709
  };
@@ -2765,9 +2712,8 @@ var buildUrl = function buildUrl(route, params) {
2765
2712
  var placeHolders = [];
2766
2713
  ramda.toPairs(params).forEach(function (_ref3) {
2767
2714
  var _ref4 = _slicedToArray(_ref3, 2),
2768
- key = _ref4[0],
2769
- value = _ref4[1];
2770
-
2715
+ key = _ref4[0],
2716
+ value = _ref4[1];
2771
2717
  if (route.includes(":".concat(key))) {
2772
2718
  placeHolders.push(key);
2773
2719
  route = route.replace(":".concat(key), encodeURIComponent(value));
@@ -2778,7 +2724,6 @@ var buildUrl = function buildUrl(route, params) {
2778
2724
  };
2779
2725
  var toLocale = function toLocale(number) {
2780
2726
  var _window$globalProps, _window$globalProps$u;
2781
-
2782
2727
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
2783
2728
  return Number(number).toLocaleString(((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.locale) || navigator.language || navigator.languages[0], options);
2784
2729
  };
@@ -2792,7 +2737,6 @@ var joinHyphenCase = function joinHyphenCase() {
2792
2737
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2793
2738
  args[_key] = arguments[_key];
2794
2739
  }
2795
-
2796
2740
  return args.join(" ").replace(/\s+/g, "-").toLowerCase();
2797
2741
  };
2798
2742