@kokimoki/app 1.5.0 → 1.6.0

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.
@@ -639,7 +639,7 @@ function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
639
639
  var eventsExports = events.exports;
640
640
  var EventEmitter$1 = /*@__PURE__*/getDefaultExportFromCjs(eventsExports);
641
641
 
642
- const KOKIMOKI_APP_VERSION = "1.5.0";
642
+ const KOKIMOKI_APP_VERSION = "1.6.0";
643
643
 
644
644
  /**
645
645
  * Utility module to work with key-value stores.
@@ -867,8 +867,8 @@ class Observable {
867
867
  * @module math
868
868
  */
869
869
 
870
- const floor = Math.floor;
871
- const abs = Math.abs;
870
+ const floor$2 = Math.floor;
871
+ const abs$2 = Math.abs;
872
872
 
873
873
  /**
874
874
  * @function
@@ -876,7 +876,7 @@ const abs = Math.abs;
876
876
  * @param {number} b
877
877
  * @return {number} The smaller element of a and b
878
878
  */
879
- const min = (a, b) => a < b ? a : b;
879
+ const min$2 = (a, b) => a < b ? a : b;
880
880
 
881
881
  /**
882
882
  * @function
@@ -884,7 +884,7 @@ const min = (a, b) => a < b ? a : b;
884
884
  * @param {number} b
885
885
  * @return {number} The bigger element of a and b
886
886
  */
887
- const max = (a, b) => a > b ? a : b;
887
+ const max$3 = (a, b) => a > b ? a : b;
888
888
 
889
889
  /**
890
890
  * @param {number} n
@@ -1283,7 +1283,7 @@ const BITS31 = 0x7FFFFFFF;
1283
1283
  const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER;
1284
1284
 
1285
1285
  /* c8 ignore next */
1286
- const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && floor(num) === num);
1286
+ const isInteger = Number.isInteger || (num => typeof num === 'number' && isFinite(num) && floor$2(num) === num);
1287
1287
 
1288
1288
  /**
1289
1289
  * Error helpers.
@@ -1707,7 +1707,7 @@ class IntDiffOptRleDecoder extends Decoder {
1707
1707
  const diff = readVarInt(this);
1708
1708
  // if the first bit is set, we read more data
1709
1709
  const hasCount = diff & 1;
1710
- this.diff = floor(diff / 2); // shift >> 1
1710
+ this.diff = floor$2(diff / 2); // shift >> 1
1711
1711
  this.count = 1;
1712
1712
  if (hasCount) {
1713
1713
  this.count = readVarUint(this) + 2;
@@ -1870,7 +1870,7 @@ const verifyLen = (encoder, len) => {
1870
1870
  const bufferLen = encoder.cbuf.length;
1871
1871
  if (bufferLen - encoder.cpos < len) {
1872
1872
  encoder.bufs.push(createUint8ArrayViewFromArrayBuffer(encoder.cbuf.buffer, 0, encoder.cpos));
1873
- encoder.cbuf = new Uint8Array(max(bufferLen, len) * 2);
1873
+ encoder.cbuf = new Uint8Array(max$3(bufferLen, len) * 2);
1874
1874
  encoder.cpos = 0;
1875
1875
  }
1876
1876
  };
@@ -1911,7 +1911,7 @@ const writeUint8 = write;
1911
1911
  const writeVarUint = (encoder, num) => {
1912
1912
  while (num > BITS7) {
1913
1913
  write(encoder, BIT8 | (BITS7 & num));
1914
- num = floor(num / 128); // shift >>> 7
1914
+ num = floor$2(num / 128); // shift >>> 7
1915
1915
  }
1916
1916
  write(encoder, BITS7 & num);
1917
1917
  };
@@ -1932,12 +1932,12 @@ const writeVarInt = (encoder, num) => {
1932
1932
  }
1933
1933
  // |- whether to continue reading |- whether is negative |- number
1934
1934
  write(encoder, (num > BITS6 ? BIT8 : 0) | (isNegative ? BIT7 : 0) | (BITS6 & num));
1935
- num = floor(num / 64); // shift >>> 6
1935
+ num = floor$2(num / 64); // shift >>> 6
1936
1936
  // We don't need to consider the case of num === 0 so we can use a different
1937
1937
  // pattern here than above.
1938
1938
  while (num > 0) {
1939
1939
  write(encoder, (num > BITS7 ? BIT8 : 0) | (BITS7 & num));
1940
- num = floor(num / 128); // shift >>> 7
1940
+ num = floor$2(num / 128); // shift >>> 7
1941
1941
  }
1942
1942
  };
1943
1943
 
@@ -2004,7 +2004,7 @@ const writeVarString = (utf8TextEncoder && /** @type {any} */ (utf8TextEncoder).
2004
2004
  const writeUint8Array = (encoder, uint8Array) => {
2005
2005
  const bufferLen = encoder.cbuf.length;
2006
2006
  const cpos = encoder.cpos;
2007
- const leftCopyLen = min(bufferLen - cpos, uint8Array.length);
2007
+ const leftCopyLen = min$2(bufferLen - cpos, uint8Array.length);
2008
2008
  const rightCopyLen = uint8Array.length - leftCopyLen;
2009
2009
  encoder.cbuf.set(uint8Array.subarray(0, leftCopyLen), cpos);
2010
2010
  encoder.cpos += leftCopyLen;
@@ -2013,7 +2013,7 @@ const writeUint8Array = (encoder, uint8Array) => {
2013
2013
  // Append new buffer
2014
2014
  encoder.bufs.push(encoder.cbuf);
2015
2015
  // must have at least size of remaining buffer
2016
- encoder.cbuf = new Uint8Array(max(bufferLen * 2, rightCopyLen));
2016
+ encoder.cbuf = new Uint8Array(max$3(bufferLen * 2, rightCopyLen));
2017
2017
  // copy array
2018
2018
  encoder.cbuf.set(uint8Array.subarray(leftCopyLen));
2019
2019
  encoder.cpos = rightCopyLen;
@@ -2131,7 +2131,7 @@ const writeAny = (encoder, data) => {
2131
2131
  writeVarString(encoder, data);
2132
2132
  break
2133
2133
  case 'number':
2134
- if (isInteger(data) && abs(data) <= BITS31) {
2134
+ if (isInteger(data) && abs$2(data) <= BITS31) {
2135
2135
  // TYPE 125: INTEGER
2136
2136
  write(encoder, 125);
2137
2137
  writeVarInt(encoder, data);
@@ -2722,7 +2722,7 @@ const findIndexDS = (dis, clock) => {
2722
2722
  let left = 0;
2723
2723
  let right = dis.length - 1;
2724
2724
  while (left <= right) {
2725
- const midindex = floor((left + right) / 2);
2725
+ const midindex = floor$2((left + right) / 2);
2726
2726
  const mid = dis[midindex];
2727
2727
  const midclock = mid.clock;
2728
2728
  if (midclock <= clock) {
@@ -2768,7 +2768,7 @@ const sortAndMergeDeleteSet = ds => {
2768
2768
  const left = dels[j - 1];
2769
2769
  const right = dels[i];
2770
2770
  if (left.clock + left.len >= right.clock) {
2771
- left.len = max(left.len, right.clock + right.len - left.clock);
2771
+ left.len = max$3(left.len, right.clock + right.len - left.clock);
2772
2772
  } else {
2773
2773
  if (j < i) {
2774
2774
  dels[j] = right;
@@ -3894,7 +3894,7 @@ class UpdateEncoderV2 extends DSEncoderV2 {
3894
3894
  */
3895
3895
  const writeStructs = (encoder, structs, client, clock) => {
3896
3896
  // write first id
3897
- clock = max(clock, structs[0].id.clock); // make sure the first id exists
3897
+ clock = max$3(clock, structs[0].id.clock); // make sure the first id exists
3898
3898
  const startNewStructs = findIndexSS(structs, clock);
3899
3899
  // write # encoded structs
3900
3900
  writeVarUint(encoder.restEncoder, structs.length - startNewStructs);
@@ -4674,7 +4674,7 @@ const findIndexSS = (structs, clock) => {
4674
4674
  // @todo does it even make sense to pivot the search?
4675
4675
  // If a good split misses, it might actually increase the time to find the correct item.
4676
4676
  // Currently, the only advantage is that search with pivoting might find the item on the first try.
4677
- let midindex = floor((clock / (midclock + mid.length - 1)) * right); // pivoting the search
4677
+ let midindex = floor$2((clock / (midclock + mid.length - 1)) * right); // pivoting the search
4678
4678
  while (left <= right) {
4679
4679
  mid = structs[midindex];
4680
4680
  midclock = mid.id.clock;
@@ -4686,7 +4686,7 @@ const findIndexSS = (structs, clock) => {
4686
4686
  } else {
4687
4687
  right = midindex - 1;
4688
4688
  }
4689
- midindex = floor((left + right) / 2);
4689
+ midindex = floor$2((left + right) / 2);
4690
4690
  }
4691
4691
  // Always check state before looking for a struct in StructStore
4692
4692
  // Therefore the case of not finding a struct is unexpected
@@ -5014,7 +5014,7 @@ const tryMergeDeleteSet = (ds, store) => {
5014
5014
  for (let di = deleteItems.length - 1; di >= 0; di--) {
5015
5015
  const deleteItem = deleteItems[di];
5016
5016
  // start with merging the item next to the last deleted item
5017
- const mostRightIndexToCheck = min(structs.length - 1, 1 + findIndexSS(structs, deleteItem.clock + deleteItem.len - 1));
5017
+ const mostRightIndexToCheck = min$2(structs.length - 1, 1 + findIndexSS(structs, deleteItem.clock + deleteItem.len - 1));
5018
5018
  for (
5019
5019
  let si = mostRightIndexToCheck, struct = structs[si];
5020
5020
  si > 0 && struct.id.clock >= deleteItem.clock;
@@ -5101,7 +5101,7 @@ const cleanupTransactions = (transactionCleanups, i) => {
5101
5101
  if (beforeClock !== clock) {
5102
5102
  const structs = /** @type {Array<GC|Item>} */ (store.clients.get(client));
5103
5103
  // we iterate from right to left so we can safely remove entries
5104
- const firstChangePos = max(findIndexSS(structs, beforeClock), 1);
5104
+ const firstChangePos = max$3(findIndexSS(structs, beforeClock), 1);
5105
5105
  for (let i = structs.length - 1; i >= firstChangePos;) {
5106
5106
  i -= 1 + tryToMergeWithLefts(structs, i);
5107
5107
  }
@@ -5507,7 +5507,7 @@ const diffUpdateV2 = (update, sv, YDecoder = UpdateDecoderV2, YEncoder = UpdateE
5507
5507
  continue
5508
5508
  }
5509
5509
  if (curr.id.clock + curr.length > svClock) {
5510
- writeStructToLazyStructWriter(lazyStructWriter, curr, max(svClock - curr.id.clock, 0));
5510
+ writeStructToLazyStructWriter(lazyStructWriter, curr, max$3(svClock - curr.id.clock, 0));
5511
5511
  reader.next();
5512
5512
  while (reader.curr && reader.curr.id.client === currClient) {
5513
5513
  writeStructToLazyStructWriter(lazyStructWriter, reader.curr, 0);
@@ -5964,7 +5964,7 @@ const findMarker = (yarray, index) => {
5964
5964
  if (yarray._start === null || index === 0 || yarray._searchMarker === null) {
5965
5965
  return null
5966
5966
  }
5967
- const marker = yarray._searchMarker.length === 0 ? null : yarray._searchMarker.reduce((a, b) => abs(index - a.index) < abs(index - b.index) ? a : b);
5967
+ const marker = yarray._searchMarker.length === 0 ? null : yarray._searchMarker.reduce((a, b) => abs$2(index - a.index) < abs$2(index - b.index) ? a : b);
5968
5968
  let p = yarray._start;
5969
5969
  let pindex = 0;
5970
5970
  if (marker !== null) {
@@ -6023,7 +6023,7 @@ const findMarker = (yarray, index) => {
6023
6023
  // window.lengthes.push(marker.index - pindex)
6024
6024
  // console.log('distance', marker.index - pindex, 'len', p && p.parent.length)
6025
6025
  // }
6026
- if (marker !== null && abs(marker.index - pindex) < /** @type {YText|YArray<any>} */ (p.parent).length / maxSearchMarker) {
6026
+ if (marker !== null && abs$2(marker.index - pindex) < /** @type {YText|YArray<any>} */ (p.parent).length / maxSearchMarker) {
6027
6027
  // adjust existing marker
6028
6028
  overwriteMarker(marker, p, pindex);
6029
6029
  return marker
@@ -6070,7 +6070,7 @@ const updateMarkerChanges = (searchMarker, index, len) => {
6070
6070
  p.marker = true;
6071
6071
  }
6072
6072
  if (index < m.index || (len > 0 && index === m.index)) { // a simple index <= m.index check would actually suffice
6073
- m.index = max(index, m.index + len);
6073
+ m.index = max$3(index, m.index + len);
6074
6074
  }
6075
6075
  }
6076
6076
  };
@@ -12234,11 +12234,13 @@ var util = {};
12234
12234
 
12235
12235
  var types = {};
12236
12236
 
12237
+ /** @type {import('./shams')} */
12237
12238
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
12238
12239
  var shams$1 = function hasSymbols() {
12239
12240
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
12240
12241
  if (typeof Symbol.iterator === 'symbol') { return true; }
12241
12242
 
12243
+ /** @type {{ [k in symbol]?: unknown }} */
12242
12244
  var obj = {};
12243
12245
  var sym = Symbol('test');
12244
12246
  var symObj = Object(sym);
@@ -12257,7 +12259,7 @@ var shams$1 = function hasSymbols() {
12257
12259
 
12258
12260
  var symVal = 42;
12259
12261
  obj[sym] = symVal;
12260
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
12262
+ for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
12261
12263
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
12262
12264
 
12263
12265
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
@@ -12268,7 +12270,8 @@ var shams$1 = function hasSymbols() {
12268
12270
  if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
12269
12271
 
12270
12272
  if (typeof Object.getOwnPropertyDescriptor === 'function') {
12271
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
12273
+ // eslint-disable-next-line no-extra-parens
12274
+ var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
12272
12275
  if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
12273
12276
  }
12274
12277
 
@@ -12281,68 +12284,169 @@ var shams = function hasToStringTagShams() {
12281
12284
  return hasSymbols$2() && !!Symbol.toStringTag;
12282
12285
  };
12283
12286
 
12284
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
12285
- var hasSymbolSham = shams$1;
12287
+ /** @type {import('.')} */
12288
+ var esObjectAtoms = Object;
12286
12289
 
12287
- var hasSymbols$1 = function hasNativeSymbols() {
12288
- if (typeof origSymbol !== 'function') { return false; }
12289
- if (typeof Symbol !== 'function') { return false; }
12290
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
12291
- if (typeof Symbol('bar') !== 'symbol') { return false; }
12290
+ /** @type {import('.')} */
12291
+ var esErrors = Error;
12292
12292
 
12293
- return hasSymbolSham();
12294
- };
12293
+ /** @type {import('./eval')} */
12294
+ var _eval = EvalError;
12295
12295
 
12296
- var test = {
12297
- foo: {}
12298
- };
12296
+ /** @type {import('./range')} */
12297
+ var range = RangeError;
12299
12298
 
12300
- var $Object = Object;
12299
+ /** @type {import('./ref')} */
12300
+ var ref = ReferenceError;
12301
12301
 
12302
- var hasProto$1 = function hasProto() {
12303
- return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
12304
- };
12302
+ /** @type {import('./syntax')} */
12303
+ var syntax = SyntaxError;
12304
+
12305
+ /** @type {import('./type')} */
12306
+ var type = TypeError;
12307
+
12308
+ /** @type {import('./uri')} */
12309
+ var uri = URIError;
12310
+
12311
+ /** @type {import('./abs')} */
12312
+ var abs$1 = Math.abs;
12313
+
12314
+ /** @type {import('./floor')} */
12315
+ var floor$1 = Math.floor;
12316
+
12317
+ /** @type {import('./max')} */
12318
+ var max$2 = Math.max;
12319
+
12320
+ /** @type {import('./min')} */
12321
+ var min$1 = Math.min;
12322
+
12323
+ /** @type {import('./pow')} */
12324
+ var pow$1 = Math.pow;
12325
+
12326
+ /** @type {import('./gOPD')} */
12327
+ var gOPD$1 = Object.getOwnPropertyDescriptor;
12328
+
12329
+ /** @type {import('.')} */
12330
+ var $gOPD$1 = gOPD$1;
12331
+
12332
+ if ($gOPD$1) {
12333
+ try {
12334
+ $gOPD$1([], 'length');
12335
+ } catch (e) {
12336
+ // IE 8 has a broken gOPD
12337
+ $gOPD$1 = null;
12338
+ }
12339
+ }
12340
+
12341
+ var gopd = $gOPD$1;
12342
+
12343
+ /** @type {import('.')} */
12344
+ var $defineProperty$1 = Object.defineProperty || false;
12345
+ if ($defineProperty$1) {
12346
+ try {
12347
+ $defineProperty$1({}, 'a', { value: 1 });
12348
+ } catch (e) {
12349
+ // IE 8 has a broken defineProperty
12350
+ $defineProperty$1 = false;
12351
+ }
12352
+ }
12353
+
12354
+ var esDefineProperty = $defineProperty$1;
12355
+
12356
+ var hasSymbols$1;
12357
+ var hasRequiredHasSymbols;
12358
+
12359
+ function requireHasSymbols () {
12360
+ if (hasRequiredHasSymbols) return hasSymbols$1;
12361
+ hasRequiredHasSymbols = 1;
12362
+
12363
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
12364
+ var hasSymbolSham = shams$1;
12365
+
12366
+ /** @type {import('.')} */
12367
+ hasSymbols$1 = function hasNativeSymbols() {
12368
+ if (typeof origSymbol !== 'function') { return false; }
12369
+ if (typeof Symbol !== 'function') { return false; }
12370
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
12371
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
12372
+
12373
+ return hasSymbolSham();
12374
+ };
12375
+ return hasSymbols$1;
12376
+ }
12305
12377
 
12306
12378
  /* eslint no-invalid-this: 1 */
12307
12379
 
12308
12380
  var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
12309
- var slice = Array.prototype.slice;
12310
12381
  var toStr$3 = Object.prototype.toString;
12382
+ var max$1 = Math.max;
12311
12383
  var funcType = '[object Function]';
12312
12384
 
12385
+ var concatty = function concatty(a, b) {
12386
+ var arr = [];
12387
+
12388
+ for (var i = 0; i < a.length; i += 1) {
12389
+ arr[i] = a[i];
12390
+ }
12391
+ for (var j = 0; j < b.length; j += 1) {
12392
+ arr[j + a.length] = b[j];
12393
+ }
12394
+
12395
+ return arr;
12396
+ };
12397
+
12398
+ var slicy = function slicy(arrLike, offset) {
12399
+ var arr = [];
12400
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
12401
+ arr[j] = arrLike[i];
12402
+ }
12403
+ return arr;
12404
+ };
12405
+
12406
+ var joiny = function (arr, joiner) {
12407
+ var str = '';
12408
+ for (var i = 0; i < arr.length; i += 1) {
12409
+ str += arr[i];
12410
+ if (i + 1 < arr.length) {
12411
+ str += joiner;
12412
+ }
12413
+ }
12414
+ return str;
12415
+ };
12416
+
12313
12417
  var implementation$1 = function bind(that) {
12314
12418
  var target = this;
12315
- if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
12419
+ if (typeof target !== 'function' || toStr$3.apply(target) !== funcType) {
12316
12420
  throw new TypeError(ERROR_MESSAGE + target);
12317
12421
  }
12318
- var args = slice.call(arguments, 1);
12422
+ var args = slicy(arguments, 1);
12319
12423
 
12320
12424
  var bound;
12321
12425
  var binder = function () {
12322
12426
  if (this instanceof bound) {
12323
12427
  var result = target.apply(
12324
12428
  this,
12325
- args.concat(slice.call(arguments))
12429
+ concatty(args, arguments)
12326
12430
  );
12327
12431
  if (Object(result) === result) {
12328
12432
  return result;
12329
12433
  }
12330
12434
  return this;
12331
- } else {
12332
- return target.apply(
12333
- that,
12334
- args.concat(slice.call(arguments))
12335
- );
12336
12435
  }
12436
+ return target.apply(
12437
+ that,
12438
+ concatty(args, arguments)
12439
+ );
12440
+
12337
12441
  };
12338
12442
 
12339
- var boundLength = Math.max(0, target.length - args.length);
12443
+ var boundLength = max$1(0, target.length - args.length);
12340
12444
  var boundArgs = [];
12341
12445
  for (var i = 0; i < boundLength; i++) {
12342
- boundArgs.push('$' + i);
12446
+ boundArgs[i] = '$' + i;
12343
12447
  }
12344
12448
 
12345
- bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
12449
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
12346
12450
 
12347
12451
  if (target.prototype) {
12348
12452
  var Empty = function Empty() {};
@@ -12358,15 +12462,156 @@ var implementation = implementation$1;
12358
12462
 
12359
12463
  var functionBind = Function.prototype.bind || implementation;
12360
12464
 
12361
- var bind$1 = functionBind;
12465
+ var functionCall;
12466
+ var hasRequiredFunctionCall;
12467
+
12468
+ function requireFunctionCall () {
12469
+ if (hasRequiredFunctionCall) return functionCall;
12470
+ hasRequiredFunctionCall = 1;
12471
+
12472
+ /** @type {import('./functionCall')} */
12473
+ functionCall = Function.prototype.call;
12474
+ return functionCall;
12475
+ }
12476
+
12477
+ var functionApply;
12478
+ var hasRequiredFunctionApply;
12362
12479
 
12363
- var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
12480
+ function requireFunctionApply () {
12481
+ if (hasRequiredFunctionApply) return functionApply;
12482
+ hasRequiredFunctionApply = 1;
12483
+
12484
+ /** @type {import('./functionApply')} */
12485
+ functionApply = Function.prototype.apply;
12486
+ return functionApply;
12487
+ }
12488
+
12489
+ var reflectApply$1;
12490
+ var hasRequiredReflectApply;
12491
+
12492
+ function requireReflectApply () {
12493
+ if (hasRequiredReflectApply) return reflectApply$1;
12494
+ hasRequiredReflectApply = 1;
12495
+
12496
+ /** @type {import('./reflectApply')} */
12497
+ reflectApply$1 = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
12498
+ return reflectApply$1;
12499
+ }
12500
+
12501
+ var actualApply;
12502
+ var hasRequiredActualApply;
12503
+
12504
+ function requireActualApply () {
12505
+ if (hasRequiredActualApply) return actualApply;
12506
+ hasRequiredActualApply = 1;
12507
+
12508
+ var bind = functionBind;
12509
+
12510
+ var $apply = requireFunctionApply();
12511
+ var $call = requireFunctionCall();
12512
+ var $reflectApply = requireReflectApply();
12513
+
12514
+ /** @type {import('./actualApply')} */
12515
+ actualApply = $reflectApply || bind.call($call, $apply);
12516
+ return actualApply;
12517
+ }
12518
+
12519
+ var callBindApplyHelpers;
12520
+ var hasRequiredCallBindApplyHelpers;
12521
+
12522
+ function requireCallBindApplyHelpers () {
12523
+ if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
12524
+ hasRequiredCallBindApplyHelpers = 1;
12525
+
12526
+ var bind = functionBind;
12527
+ var $TypeError = type;
12528
+
12529
+ var $call = requireFunctionCall();
12530
+ var $actualApply = requireActualApply();
12531
+
12532
+ /** @type {import('.')} */
12533
+ callBindApplyHelpers = function callBindBasic(args) {
12534
+ if (args.length < 1 || typeof args[0] !== 'function') {
12535
+ throw new $TypeError('a function is required');
12536
+ }
12537
+ return $actualApply(bind, $call, args);
12538
+ };
12539
+ return callBindApplyHelpers;
12540
+ }
12541
+
12542
+ var get;
12543
+ var hasRequiredGet;
12544
+
12545
+ function requireGet () {
12546
+ if (hasRequiredGet) return get;
12547
+ hasRequiredGet = 1;
12548
+
12549
+ var callBind = requireCallBindApplyHelpers();
12550
+ var gOPD = gopd;
12551
+
12552
+ var hasProtoAccessor;
12553
+ try {
12554
+ // eslint-disable-next-line no-extra-parens, no-proto
12555
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
12556
+ } catch (e) {
12557
+ if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
12558
+ throw e;
12559
+ }
12560
+ }
12561
+
12562
+ // eslint-disable-next-line no-extra-parens
12563
+ var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
12564
+
12565
+ var $Object = Object;
12566
+ var $getPrototypeOf = $Object.getPrototypeOf;
12567
+
12568
+ /** @type {import('./get')} */
12569
+ get = desc && typeof desc.get === 'function'
12570
+ ? callBind([desc.get])
12571
+ : typeof $getPrototypeOf === 'function'
12572
+ ? /** @type {import('./get')} */ function getDunder(value) {
12573
+ // eslint-disable-next-line eqeqeq
12574
+ return $getPrototypeOf(value == null ? value : $Object(value));
12575
+ }
12576
+ : false;
12577
+ return get;
12578
+ }
12579
+
12580
+ var hasown;
12581
+ var hasRequiredHasown;
12582
+
12583
+ function requireHasown () {
12584
+ if (hasRequiredHasown) return hasown;
12585
+ hasRequiredHasown = 1;
12586
+
12587
+ var call = Function.prototype.call;
12588
+ var $hasOwn = Object.prototype.hasOwnProperty;
12589
+ var bind = functionBind;
12590
+
12591
+ /** @type {import('.')} */
12592
+ hasown = bind.call(call, $hasOwn);
12593
+ return hasown;
12594
+ }
12364
12595
 
12365
12596
  var undefined$1;
12366
12597
 
12367
- var $SyntaxError = SyntaxError;
12598
+ var $Object = esObjectAtoms;
12599
+
12600
+ var $Error = esErrors;
12601
+ var $EvalError = _eval;
12602
+ var $RangeError = range;
12603
+ var $ReferenceError = ref;
12604
+ var $SyntaxError = syntax;
12605
+ var $TypeError = type;
12606
+ var $URIError = uri;
12607
+
12608
+ var abs = abs$1;
12609
+ var floor = floor$1;
12610
+ var max = max$2;
12611
+ var min = min$1;
12612
+ var pow = pow$1;
12613
+
12368
12614
  var $Function = Function;
12369
- var $TypeError = TypeError;
12370
12615
 
12371
12616
  // eslint-disable-next-line consistent-return
12372
12617
  var getEvalledConstructor = function (expressionSyntax) {
@@ -12375,19 +12620,13 @@ var getEvalledConstructor = function (expressionSyntax) {
12375
12620
  } catch (e) {}
12376
12621
  };
12377
12622
 
12378
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
12379
- if ($gOPD$1) {
12380
- try {
12381
- $gOPD$1({}, '');
12382
- } catch (e) {
12383
- $gOPD$1 = null; // this is IE 8, which has a broken gOPD
12384
- }
12385
- }
12623
+ var $gOPD = gopd;
12624
+ var $defineProperty = esDefineProperty;
12386
12625
 
12387
12626
  var throwTypeError = function () {
12388
12627
  throw new $TypeError();
12389
12628
  };
12390
- var ThrowTypeError = $gOPD$1
12629
+ var ThrowTypeError = $gOPD
12391
12630
  ? (function () {
12392
12631
  try {
12393
12632
  // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
@@ -12396,7 +12635,7 @@ var ThrowTypeError = $gOPD$1
12396
12635
  } catch (calleeThrows) {
12397
12636
  try {
12398
12637
  // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
12399
- return $gOPD$1(arguments, 'callee').get;
12638
+ return $gOPD(arguments, 'callee').get;
12400
12639
  } catch (gOPDthrows) {
12401
12640
  return throwTypeError;
12402
12641
  }
@@ -12404,20 +12643,22 @@ var ThrowTypeError = $gOPD$1
12404
12643
  }())
12405
12644
  : throwTypeError;
12406
12645
 
12407
- var hasSymbols = hasSymbols$1();
12408
- var hasProto = hasProto$1();
12646
+ var hasSymbols = requireHasSymbols()();
12647
+ var getDunderProto = requireGet();
12409
12648
 
12410
- var getProto$1 = Object.getPrototypeOf || (
12411
- hasProto
12412
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
12413
- : null
12414
- );
12649
+ var getProto$1 = (typeof Reflect === 'function' && Reflect.getPrototypeOf)
12650
+ || $Object.getPrototypeOf
12651
+ || getDunderProto;
12652
+
12653
+ var $apply = requireFunctionApply();
12654
+ var $call = requireFunctionCall();
12415
12655
 
12416
12656
  var needsEval = {};
12417
12657
 
12418
12658
  var TypedArray = typeof Uint8Array === 'undefined' || !getProto$1 ? undefined$1 : getProto$1(Uint8Array);
12419
12659
 
12420
12660
  var INTRINSICS = {
12661
+ __proto__: null,
12421
12662
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
12422
12663
  '%Array%': Array,
12423
12664
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
@@ -12438,9 +12679,9 @@ var INTRINSICS = {
12438
12679
  '%decodeURIComponent%': decodeURIComponent,
12439
12680
  '%encodeURI%': encodeURI,
12440
12681
  '%encodeURIComponent%': encodeURIComponent,
12441
- '%Error%': Error,
12682
+ '%Error%': $Error,
12442
12683
  '%eval%': eval, // eslint-disable-line no-eval
12443
- '%EvalError%': EvalError,
12684
+ '%EvalError%': $EvalError,
12444
12685
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
12445
12686
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
12446
12687
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
@@ -12457,13 +12698,14 @@ var INTRINSICS = {
12457
12698
  '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto$1 ? undefined$1 : getProto$1(new Map()[Symbol.iterator]()),
12458
12699
  '%Math%': Math,
12459
12700
  '%Number%': Number,
12460
- '%Object%': Object,
12701
+ '%Object%': $Object,
12702
+ '%Object.getOwnPropertyDescriptor%': $gOPD,
12461
12703
  '%parseFloat%': parseFloat,
12462
12704
  '%parseInt%': parseInt,
12463
12705
  '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
12464
12706
  '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
12465
- '%RangeError%': RangeError,
12466
- '%ReferenceError%': ReferenceError,
12707
+ '%RangeError%': $RangeError,
12708
+ '%ReferenceError%': $ReferenceError,
12467
12709
  '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
12468
12710
  '%RegExp%': RegExp,
12469
12711
  '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
@@ -12480,10 +12722,19 @@ var INTRINSICS = {
12480
12722
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
12481
12723
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
12482
12724
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
12483
- '%URIError%': URIError,
12725
+ '%URIError%': $URIError,
12484
12726
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
12485
12727
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
12486
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
12728
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
12729
+
12730
+ '%Function.prototype.call%': $call,
12731
+ '%Function.prototype.apply%': $apply,
12732
+ '%Object.defineProperty%': $defineProperty,
12733
+ '%Math.abs%': abs,
12734
+ '%Math.floor%': floor,
12735
+ '%Math.max%': max,
12736
+ '%Math.min%': min,
12737
+ '%Math.pow%': pow
12487
12738
  };
12488
12739
 
12489
12740
  if (getProto$1) {
@@ -12522,6 +12773,7 @@ var doEval = function doEval(name) {
12522
12773
  };
12523
12774
 
12524
12775
  var LEGACY_ALIASES = {
12776
+ __proto__: null,
12525
12777
  '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
12526
12778
  '%ArrayPrototype%': ['Array', 'prototype'],
12527
12779
  '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
@@ -12576,12 +12828,12 @@ var LEGACY_ALIASES = {
12576
12828
  };
12577
12829
 
12578
12830
  var bind = functionBind;
12579
- var hasOwn = src;
12580
- var $concat = bind.call(Function.call, Array.prototype.concat);
12581
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
12582
- var $replace = bind.call(Function.call, String.prototype.replace);
12583
- var $strSlice = bind.call(Function.call, String.prototype.slice);
12584
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
12831
+ var hasOwn = requireHasown();
12832
+ var $concat = bind.call($call, Array.prototype.concat);
12833
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
12834
+ var $replace = bind.call($call, String.prototype.replace);
12835
+ var $strSlice = bind.call($call, String.prototype.slice);
12836
+ var $exec = bind.call($call, RegExp.prototype.exec);
12585
12837
 
12586
12838
  /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
12587
12839
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
@@ -12683,8 +12935,8 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
12683
12935
  }
12684
12936
  return void undefined$1;
12685
12937
  }
12686
- if ($gOPD$1 && (i + 1) >= parts.length) {
12687
- var desc = $gOPD$1(value, part);
12938
+ if ($gOPD && (i + 1) >= parts.length) {
12939
+ var desc = $gOPD(value, part);
12688
12940
  isOwn = !!desc;
12689
12941
 
12690
12942
  // By convention, when a data property is converted to an accessor
@@ -12765,14 +13017,14 @@ var callBind$2 = {exports: {}};
12765
13017
 
12766
13018
  var callBindExports = callBind$2.exports;
12767
13019
 
12768
- var GetIntrinsic$1 = getIntrinsic;
13020
+ var GetIntrinsic = getIntrinsic;
12769
13021
 
12770
13022
  var callBind$1 = callBindExports;
12771
13023
 
12772
- var $indexOf$1 = callBind$1(GetIntrinsic$1('String.prototype.indexOf'));
13024
+ var $indexOf$1 = callBind$1(GetIntrinsic('String.prototype.indexOf'));
12773
13025
 
12774
13026
  var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
12775
- var intrinsic = GetIntrinsic$1(name, !!allowMissing);
13027
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
12776
13028
  if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
12777
13029
  return callBind$1(intrinsic);
12778
13030
  }
@@ -13035,21 +13287,6 @@ var availableTypedArrays$1 = function availableTypedArrays() {
13035
13287
  return out;
13036
13288
  };
13037
13289
 
13038
- var GetIntrinsic = getIntrinsic;
13039
-
13040
- var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
13041
-
13042
- if ($gOPD) {
13043
- try {
13044
- $gOPD([], 'length');
13045
- } catch (e) {
13046
- // IE 8 has a broken gOPD
13047
- $gOPD = null;
13048
- }
13049
- }
13050
-
13051
- var gopd = $gOPD;
13052
-
13053
13290
  var forEach = forEach_1;
13054
13291
  var availableTypedArrays = availableTypedArrays$1;
13055
13292
  var callBind = callBindExports;