@dereekb/date 12.7.0 → 13.0.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.
package/index.cjs.js CHANGED
@@ -1,2084 +1,23 @@
1
1
  'use strict';
2
2
 
3
+ require('core-js/modules/es.iterator.constructor.js');
4
+ require('core-js/modules/es.iterator.filter.js');
5
+ require('core-js/modules/es.iterator.for-each.js');
3
6
  var util = require('@dereekb/util');
4
7
  var dateFns = require('date-fns');
8
+ require('core-js/modules/es.iterator.map.js');
9
+ require('core-js/modules/es.set.difference.v2.js');
10
+ require('core-js/modules/es.set.symmetric-difference.v2.js');
11
+ require('core-js/modules/es.set.union.v2.js');
5
12
  var classTransformer = require('class-transformer');
6
13
  var classValidator = require('class-validator');
7
14
  var dateFnsTz = require('date-fns-tz');
8
15
  var tzdb = require('@vvo/tzdb');
16
+ require('core-js/modules/es.iterator.find.js');
17
+ require('core-js/modules/es.json.stringify.js');
9
18
  var rxjs = require('rxjs');
10
19
  var rrule = require('rrule');
11
20
 
12
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
13
-
14
- var check = function (it) {
15
- return it && it.Math === Math && it;
16
- };
17
-
18
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
19
- var global$b =
20
- // eslint-disable-next-line es/no-global-this -- safe
21
- check(typeof globalThis == 'object' && globalThis) ||
22
- check(typeof window == 'object' && window) ||
23
- // eslint-disable-next-line no-restricted-globals -- safe
24
- check(typeof self == 'object' && self) ||
25
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
26
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
27
- // eslint-disable-next-line no-new-func -- fallback
28
- (function () { return this; })() || Function('return this')();
29
-
30
- var objectGetOwnPropertyDescriptor = {};
31
-
32
- var fails$c = function (exec) {
33
- try {
34
- return !!exec();
35
- } catch (error) {
36
- return true;
37
- }
38
- };
39
-
40
- var fails$b = fails$c;
41
-
42
- // Detect IE8's incomplete defineProperty implementation
43
- var descriptors = !fails$b(function () {
44
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
45
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
46
- });
47
-
48
- var fails$a = fails$c;
49
-
50
- var functionBindNative = !fails$a(function () {
51
- // eslint-disable-next-line es/no-function-prototype-bind -- safe
52
- var test = (function () { /* empty */ }).bind();
53
- // eslint-disable-next-line no-prototype-builtins -- safe
54
- return typeof test != 'function' || test.hasOwnProperty('prototype');
55
- });
56
-
57
- var NATIVE_BIND$2 = functionBindNative;
58
-
59
- var call$c = Function.prototype.call;
60
-
61
- var functionCall = NATIVE_BIND$2 ? call$c.bind(call$c) : function () {
62
- return call$c.apply(call$c, arguments);
63
- };
64
-
65
- var objectPropertyIsEnumerable = {};
66
-
67
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
68
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
69
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
70
-
71
- // Nashorn ~ JDK8 bug
72
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
73
-
74
- // `Object.prototype.propertyIsEnumerable` method implementation
75
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
76
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
77
- var descriptor = getOwnPropertyDescriptor$1(this, V);
78
- return !!descriptor && descriptor.enumerable;
79
- } : $propertyIsEnumerable;
80
-
81
- var createPropertyDescriptor$3 = function (bitmap, value) {
82
- return {
83
- enumerable: !(bitmap & 1),
84
- configurable: !(bitmap & 2),
85
- writable: !(bitmap & 4),
86
- value: value
87
- };
88
- };
89
-
90
- var NATIVE_BIND$1 = functionBindNative;
91
-
92
- var FunctionPrototype$1 = Function.prototype;
93
- var call$b = FunctionPrototype$1.call;
94
- var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$1.bind.bind(call$b, call$b);
95
-
96
- var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
97
- return function () {
98
- return call$b.apply(fn, arguments);
99
- };
100
- };
101
-
102
- var uncurryThis$d = functionUncurryThis;
103
-
104
- var toString$1 = uncurryThis$d({}.toString);
105
- var stringSlice$1 = uncurryThis$d(''.slice);
106
-
107
- var classofRaw$2 = function (it) {
108
- return stringSlice$1(toString$1(it), 8, -1);
109
- };
110
-
111
- var uncurryThis$c = functionUncurryThis;
112
- var fails$9 = fails$c;
113
- var classof$2 = classofRaw$2;
114
-
115
- var $Object$4 = Object;
116
- var split = uncurryThis$c(''.split);
117
-
118
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
119
- var indexedObject = fails$9(function () {
120
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
121
- // eslint-disable-next-line no-prototype-builtins -- safe
122
- return !$Object$4('z').propertyIsEnumerable(0);
123
- }) ? function (it) {
124
- return classof$2(it) === 'String' ? split(it, '') : $Object$4(it);
125
- } : $Object$4;
126
-
127
- // we can't use just `it == null` since of `document.all` special case
128
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
129
- var isNullOrUndefined$3 = function (it) {
130
- return it === null || it === undefined;
131
- };
132
-
133
- var isNullOrUndefined$2 = isNullOrUndefined$3;
134
-
135
- var $TypeError$a = TypeError;
136
-
137
- // `RequireObjectCoercible` abstract operation
138
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
139
- var requireObjectCoercible$2 = function (it) {
140
- if (isNullOrUndefined$2(it)) throw new $TypeError$a("Can't call method on " + it);
141
- return it;
142
- };
143
-
144
- // toObject with fallback for non-array-like ES3 strings
145
- var IndexedObject = indexedObject;
146
- var requireObjectCoercible$1 = requireObjectCoercible$2;
147
-
148
- var toIndexedObject$4 = function (it) {
149
- return IndexedObject(requireObjectCoercible$1(it));
150
- };
151
-
152
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
153
- var documentAll = typeof document == 'object' && document.all;
154
-
155
- // `IsCallable` abstract operation
156
- // https://tc39.es/ecma262/#sec-iscallable
157
- // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
158
- var isCallable$e = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
159
- return typeof argument == 'function' || argument === documentAll;
160
- } : function (argument) {
161
- return typeof argument == 'function';
162
- };
163
-
164
- var isCallable$d = isCallable$e;
165
-
166
- var isObject$6 = function (it) {
167
- return typeof it == 'object' ? it !== null : isCallable$d(it);
168
- };
169
-
170
- var global$a = global$b;
171
- var isCallable$c = isCallable$e;
172
-
173
- var aFunction = function (argument) {
174
- return isCallable$c(argument) ? argument : undefined;
175
- };
176
-
177
- var getBuiltIn$4 = function (namespace, method) {
178
- return arguments.length < 2 ? aFunction(global$a[namespace]) : global$a[namespace] && global$a[namespace][method];
179
- };
180
-
181
- var uncurryThis$b = functionUncurryThis;
182
-
183
- var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
184
-
185
- var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
186
-
187
- var global$9 = global$b;
188
- var userAgent = engineUserAgent;
189
-
190
- var process = global$9.process;
191
- var Deno = global$9.Deno;
192
- var versions = process && process.versions || Deno && Deno.version;
193
- var v8 = versions && versions.v8;
194
- var match, version;
195
-
196
- if (v8) {
197
- match = v8.split('.');
198
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
199
- // but their correct versions are not interesting for us
200
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
201
- }
202
-
203
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
204
- // so check `userAgent` even if `.v8` exists, but 0
205
- if (!version && userAgent) {
206
- match = userAgent.match(/Edge\/(\d+)/);
207
- if (!match || match[1] >= 74) {
208
- match = userAgent.match(/Chrome\/(\d+)/);
209
- if (match) version = +match[1];
210
- }
211
- }
212
-
213
- var engineV8Version = version;
214
-
215
- /* eslint-disable es/no-symbol -- required for testing */
216
- var V8_VERSION = engineV8Version;
217
- var fails$8 = fails$c;
218
- var global$8 = global$b;
219
-
220
- var $String$3 = global$8.String;
221
-
222
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
223
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(function () {
224
- var symbol = Symbol('symbol detection');
225
- // Chrome 38 Symbol has incorrect toString conversion
226
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
227
- // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
228
- // of course, fail.
229
- return !$String$3(symbol) || !(Object(symbol) instanceof Symbol) ||
230
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
231
- !Symbol.sham && V8_VERSION && V8_VERSION < 41;
232
- });
233
-
234
- /* eslint-disable es/no-symbol -- required for testing */
235
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
236
-
237
- var useSymbolAsUid = NATIVE_SYMBOL$1
238
- && !Symbol.sham
239
- && typeof Symbol.iterator == 'symbol';
240
-
241
- var getBuiltIn$3 = getBuiltIn$4;
242
- var isCallable$b = isCallable$e;
243
- var isPrototypeOf$2 = objectIsPrototypeOf;
244
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
245
-
246
- var $Object$3 = Object;
247
-
248
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
249
- return typeof it == 'symbol';
250
- } : function (it) {
251
- var $Symbol = getBuiltIn$3('Symbol');
252
- return isCallable$b($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$3(it));
253
- };
254
-
255
- var $String$2 = String;
256
-
257
- var tryToString$3 = function (argument) {
258
- try {
259
- return $String$2(argument);
260
- } catch (error) {
261
- return 'Object';
262
- }
263
- };
264
-
265
- var isCallable$a = isCallable$e;
266
- var tryToString$2 = tryToString$3;
267
-
268
- var $TypeError$9 = TypeError;
269
-
270
- // `Assert: IsCallable(argument) is true`
271
- var aCallable$9 = function (argument) {
272
- if (isCallable$a(argument)) return argument;
273
- throw new $TypeError$9(tryToString$2(argument) + ' is not a function');
274
- };
275
-
276
- var aCallable$8 = aCallable$9;
277
- var isNullOrUndefined$1 = isNullOrUndefined$3;
278
-
279
- // `GetMethod` abstract operation
280
- // https://tc39.es/ecma262/#sec-getmethod
281
- var getMethod$4 = function (V, P) {
282
- var func = V[P];
283
- return isNullOrUndefined$1(func) ? undefined : aCallable$8(func);
284
- };
285
-
286
- var call$a = functionCall;
287
- var isCallable$9 = isCallable$e;
288
- var isObject$5 = isObject$6;
289
-
290
- var $TypeError$8 = TypeError;
291
-
292
- // `OrdinaryToPrimitive` abstract operation
293
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
294
- var ordinaryToPrimitive$1 = function (input, pref) {
295
- var fn, val;
296
- if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$a(fn, input))) return val;
297
- if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$a(fn, input))) return val;
298
- if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$a(fn, input))) return val;
299
- throw new $TypeError$8("Can't convert object to primitive value");
300
- };
301
-
302
- var sharedStore = {exports: {}};
303
-
304
- var isPure = false;
305
-
306
- var global$7 = global$b;
307
-
308
- // eslint-disable-next-line es/no-object-defineproperty -- safe
309
- var defineProperty$2 = Object.defineProperty;
310
-
311
- var defineGlobalProperty$3 = function (key, value) {
312
- try {
313
- defineProperty$2(global$7, key, { value: value, configurable: true, writable: true });
314
- } catch (error) {
315
- global$7[key] = value;
316
- } return value;
317
- };
318
-
319
- var globalThis$1 = global$b;
320
- var defineGlobalProperty$2 = defineGlobalProperty$3;
321
-
322
- var SHARED = '__core-js_shared__';
323
- var store$3 = sharedStore.exports = globalThis$1[SHARED] || defineGlobalProperty$2(SHARED, {});
324
-
325
- (store$3.versions || (store$3.versions = [])).push({
326
- version: '3.36.1',
327
- mode: 'global',
328
- copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
329
- license: 'https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE',
330
- source: 'https://github.com/zloirock/core-js'
331
- });
332
-
333
- var sharedStoreExports = sharedStore.exports;
334
-
335
- var store$2 = sharedStoreExports;
336
-
337
- var shared$3 = function (key, value) {
338
- return store$2[key] || (store$2[key] = value || {});
339
- };
340
-
341
- var requireObjectCoercible = requireObjectCoercible$2;
342
-
343
- var $Object$2 = Object;
344
-
345
- // `ToObject` abstract operation
346
- // https://tc39.es/ecma262/#sec-toobject
347
- var toObject$2 = function (argument) {
348
- return $Object$2(requireObjectCoercible(argument));
349
- };
350
-
351
- var uncurryThis$a = functionUncurryThis;
352
- var toObject$1 = toObject$2;
353
-
354
- var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
355
-
356
- // `HasOwnProperty` abstract operation
357
- // https://tc39.es/ecma262/#sec-hasownproperty
358
- // eslint-disable-next-line es/no-object-hasown -- safe
359
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
360
- return hasOwnProperty(toObject$1(it), key);
361
- };
362
-
363
- var uncurryThis$9 = functionUncurryThis;
364
-
365
- var id = 0;
366
- var postfix = Math.random();
367
- var toString = uncurryThis$9(1.0.toString);
368
-
369
- var uid$2 = function (key) {
370
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
371
- };
372
-
373
- var global$6 = global$b;
374
- var shared$2 = shared$3;
375
- var hasOwn$8 = hasOwnProperty_1;
376
- var uid$1 = uid$2;
377
- var NATIVE_SYMBOL = symbolConstructorDetection;
378
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
379
-
380
- var Symbol$1 = global$6.Symbol;
381
- var WellKnownSymbolsStore = shared$2('wks');
382
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
383
-
384
- var wellKnownSymbol$8 = function (name) {
385
- if (!hasOwn$8(WellKnownSymbolsStore, name)) {
386
- WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
387
- ? Symbol$1[name]
388
- : createWellKnownSymbol('Symbol.' + name);
389
- } return WellKnownSymbolsStore[name];
390
- };
391
-
392
- var call$9 = functionCall;
393
- var isObject$4 = isObject$6;
394
- var isSymbol$1 = isSymbol$2;
395
- var getMethod$3 = getMethod$4;
396
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
397
- var wellKnownSymbol$7 = wellKnownSymbol$8;
398
-
399
- var $TypeError$7 = TypeError;
400
- var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
401
-
402
- // `ToPrimitive` abstract operation
403
- // https://tc39.es/ecma262/#sec-toprimitive
404
- var toPrimitive$1 = function (input, pref) {
405
- if (!isObject$4(input) || isSymbol$1(input)) return input;
406
- var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
407
- var result;
408
- if (exoticToPrim) {
409
- if (pref === undefined) pref = 'default';
410
- result = call$9(exoticToPrim, input, pref);
411
- if (!isObject$4(result) || isSymbol$1(result)) return result;
412
- throw new $TypeError$7("Can't convert object to primitive value");
413
- }
414
- if (pref === undefined) pref = 'number';
415
- return ordinaryToPrimitive(input, pref);
416
- };
417
-
418
- var toPrimitive = toPrimitive$1;
419
- var isSymbol = isSymbol$2;
420
-
421
- // `ToPropertyKey` abstract operation
422
- // https://tc39.es/ecma262/#sec-topropertykey
423
- var toPropertyKey$2 = function (argument) {
424
- var key = toPrimitive(argument, 'string');
425
- return isSymbol(key) ? key : key + '';
426
- };
427
-
428
- var global$5 = global$b;
429
- var isObject$3 = isObject$6;
430
-
431
- var document$1 = global$5.document;
432
- // typeof document.createElement is 'object' in old IE
433
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
434
-
435
- var documentCreateElement$1 = function (it) {
436
- return EXISTS$1 ? document$1.createElement(it) : {};
437
- };
438
-
439
- var DESCRIPTORS$9 = descriptors;
440
- var fails$7 = fails$c;
441
- var createElement = documentCreateElement$1;
442
-
443
- // Thanks to IE8 for its funny defineProperty
444
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
445
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
446
- return Object.defineProperty(createElement('div'), 'a', {
447
- get: function () { return 7; }
448
- }).a !== 7;
449
- });
450
-
451
- var DESCRIPTORS$8 = descriptors;
452
- var call$8 = functionCall;
453
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
454
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
455
- var toIndexedObject$3 = toIndexedObject$4;
456
- var toPropertyKey$1 = toPropertyKey$2;
457
- var hasOwn$7 = hasOwnProperty_1;
458
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
459
-
460
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
461
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
462
-
463
- // `Object.getOwnPropertyDescriptor` method
464
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
465
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
466
- O = toIndexedObject$3(O);
467
- P = toPropertyKey$1(P);
468
- if (IE8_DOM_DEFINE$1) try {
469
- return $getOwnPropertyDescriptor$1(O, P);
470
- } catch (error) { /* empty */ }
471
- if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$8(propertyIsEnumerableModule.f, O, P), O[P]);
472
- };
473
-
474
- var objectDefineProperty = {};
475
-
476
- var DESCRIPTORS$7 = descriptors;
477
- var fails$6 = fails$c;
478
-
479
- // V8 ~ Chrome 36-
480
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
481
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
482
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
483
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
484
- value: 42,
485
- writable: false
486
- }).prototype !== 42;
487
- });
488
-
489
- var isObject$2 = isObject$6;
490
-
491
- var $String$1 = String;
492
- var $TypeError$6 = TypeError;
493
-
494
- // `Assert: Type(argument) is Object`
495
- var anObject$e = function (argument) {
496
- if (isObject$2(argument)) return argument;
497
- throw new $TypeError$6($String$1(argument) + ' is not an object');
498
- };
499
-
500
- var DESCRIPTORS$6 = descriptors;
501
- var IE8_DOM_DEFINE = ie8DomDefine;
502
- var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
503
- var anObject$d = anObject$e;
504
- var toPropertyKey = toPropertyKey$2;
505
-
506
- var $TypeError$5 = TypeError;
507
- // eslint-disable-next-line es/no-object-defineproperty -- safe
508
- var $defineProperty = Object.defineProperty;
509
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
510
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
511
- var ENUMERABLE = 'enumerable';
512
- var CONFIGURABLE$1 = 'configurable';
513
- var WRITABLE = 'writable';
514
-
515
- // `Object.defineProperty` method
516
- // https://tc39.es/ecma262/#sec-object.defineproperty
517
- objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
518
- anObject$d(O);
519
- P = toPropertyKey(P);
520
- anObject$d(Attributes);
521
- if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
522
- var current = $getOwnPropertyDescriptor(O, P);
523
- if (current && current[WRITABLE]) {
524
- O[P] = Attributes.value;
525
- Attributes = {
526
- configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
527
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
528
- writable: false
529
- };
530
- }
531
- } return $defineProperty(O, P, Attributes);
532
- } : $defineProperty : function defineProperty(O, P, Attributes) {
533
- anObject$d(O);
534
- P = toPropertyKey(P);
535
- anObject$d(Attributes);
536
- if (IE8_DOM_DEFINE) try {
537
- return $defineProperty(O, P, Attributes);
538
- } catch (error) { /* empty */ }
539
- if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported');
540
- if ('value' in Attributes) O[P] = Attributes.value;
541
- return O;
542
- };
543
-
544
- var DESCRIPTORS$5 = descriptors;
545
- var definePropertyModule$4 = objectDefineProperty;
546
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
547
-
548
- var createNonEnumerableProperty$3 = DESCRIPTORS$5 ? function (object, key, value) {
549
- return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
550
- } : function (object, key, value) {
551
- object[key] = value;
552
- return object;
553
- };
554
-
555
- var makeBuiltIn$3 = {exports: {}};
556
-
557
- var DESCRIPTORS$4 = descriptors;
558
- var hasOwn$6 = hasOwnProperty_1;
559
-
560
- var FunctionPrototype = Function.prototype;
561
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
562
- var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
563
-
564
- var EXISTS = hasOwn$6(FunctionPrototype, 'name');
565
- // additional protection from minified / mangled / dropped function names
566
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
567
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
568
-
569
- var functionName = {
570
- EXISTS: EXISTS,
571
- PROPER: PROPER,
572
- CONFIGURABLE: CONFIGURABLE
573
- };
574
-
575
- var uncurryThis$8 = functionUncurryThis;
576
- var isCallable$8 = isCallable$e;
577
- var store$1 = sharedStoreExports;
578
-
579
- var functionToString = uncurryThis$8(Function.toString);
580
-
581
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
582
- if (!isCallable$8(store$1.inspectSource)) {
583
- store$1.inspectSource = function (it) {
584
- return functionToString(it);
585
- };
586
- }
587
-
588
- var inspectSource$1 = store$1.inspectSource;
589
-
590
- var global$4 = global$b;
591
- var isCallable$7 = isCallable$e;
592
-
593
- var WeakMap$1 = global$4.WeakMap;
594
-
595
- var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
596
-
597
- var shared$1 = shared$3;
598
- var uid = uid$2;
599
-
600
- var keys$1 = shared$1('keys');
601
-
602
- var sharedKey$3 = function (key) {
603
- return keys$1[key] || (keys$1[key] = uid(key));
604
- };
605
-
606
- var hiddenKeys$4 = {};
607
-
608
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
609
- var global$3 = global$b;
610
- var isObject$1 = isObject$6;
611
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
612
- var hasOwn$5 = hasOwnProperty_1;
613
- var shared = sharedStoreExports;
614
- var sharedKey$2 = sharedKey$3;
615
- var hiddenKeys$3 = hiddenKeys$4;
616
-
617
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
618
- var TypeError$1 = global$3.TypeError;
619
- var WeakMap = global$3.WeakMap;
620
- var set, get, has$6;
621
-
622
- var enforce = function (it) {
623
- return has$6(it) ? get(it) : set(it, {});
624
- };
625
-
626
- var getterFor = function (TYPE) {
627
- return function (it) {
628
- var state;
629
- if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
630
- throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
631
- } return state;
632
- };
633
- };
634
-
635
- if (NATIVE_WEAK_MAP || shared.state) {
636
- var store = shared.state || (shared.state = new WeakMap());
637
- /* eslint-disable no-self-assign -- prototype methods protection */
638
- store.get = store.get;
639
- store.has = store.has;
640
- store.set = store.set;
641
- /* eslint-enable no-self-assign -- prototype methods protection */
642
- set = function (it, metadata) {
643
- if (store.has(it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
644
- metadata.facade = it;
645
- store.set(it, metadata);
646
- return metadata;
647
- };
648
- get = function (it) {
649
- return store.get(it) || {};
650
- };
651
- has$6 = function (it) {
652
- return store.has(it);
653
- };
654
- } else {
655
- var STATE = sharedKey$2('state');
656
- hiddenKeys$3[STATE] = true;
657
- set = function (it, metadata) {
658
- if (hasOwn$5(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
659
- metadata.facade = it;
660
- createNonEnumerableProperty$2(it, STATE, metadata);
661
- return metadata;
662
- };
663
- get = function (it) {
664
- return hasOwn$5(it, STATE) ? it[STATE] : {};
665
- };
666
- has$6 = function (it) {
667
- return hasOwn$5(it, STATE);
668
- };
669
- }
670
-
671
- var internalState = {
672
- set: set,
673
- get: get,
674
- has: has$6,
675
- enforce: enforce,
676
- getterFor: getterFor
677
- };
678
-
679
- var uncurryThis$7 = functionUncurryThis;
680
- var fails$5 = fails$c;
681
- var isCallable$6 = isCallable$e;
682
- var hasOwn$4 = hasOwnProperty_1;
683
- var DESCRIPTORS$3 = descriptors;
684
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
685
- var inspectSource = inspectSource$1;
686
- var InternalStateModule$1 = internalState;
687
-
688
- var enforceInternalState = InternalStateModule$1.enforce;
689
- var getInternalState = InternalStateModule$1.get;
690
- var $String = String;
691
- // eslint-disable-next-line es/no-object-defineproperty -- safe
692
- var defineProperty$1 = Object.defineProperty;
693
- var stringSlice = uncurryThis$7(''.slice);
694
- var replace = uncurryThis$7(''.replace);
695
- var join = uncurryThis$7([].join);
696
-
697
- var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
698
- return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
699
- });
700
-
701
- var TEMPLATE = String(String).split('String');
702
-
703
- var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
704
- if (stringSlice($String(name), 0, 7) === 'Symbol(') {
705
- name = '[' + replace($String(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
706
- }
707
- if (options && options.getter) name = 'get ' + name;
708
- if (options && options.setter) name = 'set ' + name;
709
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
710
- if (DESCRIPTORS$3) defineProperty$1(value, 'name', { value: name, configurable: true });
711
- else value.name = name;
712
- }
713
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
714
- defineProperty$1(value, 'length', { value: options.arity });
715
- }
716
- try {
717
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
718
- if (DESCRIPTORS$3) defineProperty$1(value, 'prototype', { writable: false });
719
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
720
- } else if (value.prototype) value.prototype = undefined;
721
- } catch (error) { /* empty */ }
722
- var state = enforceInternalState(value);
723
- if (!hasOwn$4(state, 'source')) {
724
- state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
725
- } return value;
726
- };
727
-
728
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
729
- // eslint-disable-next-line no-extend-native -- required
730
- Function.prototype.toString = makeBuiltIn$2(function toString() {
731
- return isCallable$6(this) && getInternalState(this).source || inspectSource(this);
732
- }, 'toString');
733
-
734
- var makeBuiltInExports = makeBuiltIn$3.exports;
735
-
736
- var isCallable$5 = isCallable$e;
737
- var definePropertyModule$3 = objectDefineProperty;
738
- var makeBuiltIn$1 = makeBuiltInExports;
739
- var defineGlobalProperty$1 = defineGlobalProperty$3;
740
-
741
- var defineBuiltIn$3 = function (O, key, value, options) {
742
- if (!options) options = {};
743
- var simple = options.enumerable;
744
- var name = options.name !== undefined ? options.name : key;
745
- if (isCallable$5(value)) makeBuiltIn$1(value, name, options);
746
- if (options.global) {
747
- if (simple) O[key] = value;
748
- else defineGlobalProperty$1(key, value);
749
- } else {
750
- try {
751
- if (!options.unsafe) delete O[key];
752
- else if (O[key]) simple = true;
753
- } catch (error) { /* empty */ }
754
- if (simple) O[key] = value;
755
- else definePropertyModule$3.f(O, key, {
756
- value: value,
757
- enumerable: false,
758
- configurable: !options.nonConfigurable,
759
- writable: !options.nonWritable
760
- });
761
- } return O;
762
- };
763
-
764
- var objectGetOwnPropertyNames = {};
765
-
766
- var ceil = Math.ceil;
767
- var floor = Math.floor;
768
-
769
- // `Math.trunc` method
770
- // https://tc39.es/ecma262/#sec-math.trunc
771
- // eslint-disable-next-line es/no-math-trunc -- safe
772
- var mathTrunc = Math.trunc || function trunc(x) {
773
- var n = +x;
774
- return (n > 0 ? floor : ceil)(n);
775
- };
776
-
777
- var trunc = mathTrunc;
778
-
779
- // `ToIntegerOrInfinity` abstract operation
780
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
781
- var toIntegerOrInfinity$3 = function (argument) {
782
- var number = +argument;
783
- // eslint-disable-next-line no-self-compare -- NaN check
784
- return number !== number || number === 0 ? 0 : trunc(number);
785
- };
786
-
787
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
788
-
789
- var max$1 = Math.max;
790
- var min$1 = Math.min;
791
-
792
- // Helper for a popular repeating case of the spec:
793
- // Let integer be ? ToInteger(index).
794
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
795
- var toAbsoluteIndex$1 = function (index, length) {
796
- var integer = toIntegerOrInfinity$2(index);
797
- return integer < 0 ? max$1(integer + length, 0) : min$1(integer, length);
798
- };
799
-
800
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
801
-
802
- var min = Math.min;
803
-
804
- // `ToLength` abstract operation
805
- // https://tc39.es/ecma262/#sec-tolength
806
- var toLength$1 = function (argument) {
807
- var len = toIntegerOrInfinity$1(argument);
808
- return len > 0 ? min(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
809
- };
810
-
811
- var toLength = toLength$1;
812
-
813
- // `LengthOfArrayLike` abstract operation
814
- // https://tc39.es/ecma262/#sec-lengthofarraylike
815
- var lengthOfArrayLike$2 = function (obj) {
816
- return toLength(obj.length);
817
- };
818
-
819
- var toIndexedObject$2 = toIndexedObject$4;
820
- var toAbsoluteIndex = toAbsoluteIndex$1;
821
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
822
-
823
- // `Array.prototype.{ indexOf, includes }` methods implementation
824
- var createMethod = function (IS_INCLUDES) {
825
- return function ($this, el, fromIndex) {
826
- var O = toIndexedObject$2($this);
827
- var length = lengthOfArrayLike$1(O);
828
- if (length === 0) return !IS_INCLUDES && -1;
829
- var index = toAbsoluteIndex(fromIndex, length);
830
- var value;
831
- // Array#includes uses SameValueZero equality algorithm
832
- // eslint-disable-next-line no-self-compare -- NaN check
833
- if (IS_INCLUDES && el !== el) while (length > index) {
834
- value = O[index++];
835
- // eslint-disable-next-line no-self-compare -- NaN check
836
- if (value !== value) return true;
837
- // Array#indexOf ignores holes, Array#includes - not
838
- } else for (;length > index; index++) {
839
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
840
- } return !IS_INCLUDES && -1;
841
- };
842
- };
843
-
844
- var arrayIncludes = {
845
- // `Array.prototype.includes` method
846
- // https://tc39.es/ecma262/#sec-array.prototype.includes
847
- includes: createMethod(true),
848
- // `Array.prototype.indexOf` method
849
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
850
- indexOf: createMethod(false)
851
- };
852
-
853
- var uncurryThis$6 = functionUncurryThis;
854
- var hasOwn$3 = hasOwnProperty_1;
855
- var toIndexedObject$1 = toIndexedObject$4;
856
- var indexOf = arrayIncludes.indexOf;
857
- var hiddenKeys$2 = hiddenKeys$4;
858
-
859
- var push = uncurryThis$6([].push);
860
-
861
- var objectKeysInternal = function (object, names) {
862
- var O = toIndexedObject$1(object);
863
- var i = 0;
864
- var result = [];
865
- var key;
866
- for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
867
- // Don't enum bug & hidden keys
868
- while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
869
- ~indexOf(result, key) || push(result, key);
870
- }
871
- return result;
872
- };
873
-
874
- // IE8- don't enum bug keys
875
- var enumBugKeys$3 = [
876
- 'constructor',
877
- 'hasOwnProperty',
878
- 'isPrototypeOf',
879
- 'propertyIsEnumerable',
880
- 'toLocaleString',
881
- 'toString',
882
- 'valueOf'
883
- ];
884
-
885
- var internalObjectKeys$1 = objectKeysInternal;
886
- var enumBugKeys$2 = enumBugKeys$3;
887
-
888
- var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
889
-
890
- // `Object.getOwnPropertyNames` method
891
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
892
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
893
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
894
- return internalObjectKeys$1(O, hiddenKeys$1);
895
- };
896
-
897
- var objectGetOwnPropertySymbols = {};
898
-
899
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
900
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
901
-
902
- var getBuiltIn$2 = getBuiltIn$4;
903
- var uncurryThis$5 = functionUncurryThis;
904
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
905
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
906
- var anObject$c = anObject$e;
907
-
908
- var concat = uncurryThis$5([].concat);
909
-
910
- // all object keys, includes non-enumerable and symbols
911
- var ownKeys$1 = getBuiltIn$2('Reflect', 'ownKeys') || function ownKeys(it) {
912
- var keys = getOwnPropertyNamesModule.f(anObject$c(it));
913
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
914
- return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
915
- };
916
-
917
- var hasOwn$2 = hasOwnProperty_1;
918
- var ownKeys = ownKeys$1;
919
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
920
- var definePropertyModule$2 = objectDefineProperty;
921
-
922
- var copyConstructorProperties$1 = function (target, source, exceptions) {
923
- var keys = ownKeys(source);
924
- var defineProperty = definePropertyModule$2.f;
925
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
926
- for (var i = 0; i < keys.length; i++) {
927
- var key = keys[i];
928
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
929
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
930
- }
931
- }
932
- };
933
-
934
- var fails$4 = fails$c;
935
- var isCallable$4 = isCallable$e;
936
-
937
- var replacement = /#|\.prototype\./;
938
-
939
- var isForced$1 = function (feature, detection) {
940
- var value = data[normalize(feature)];
941
- return value === POLYFILL ? true
942
- : value === NATIVE ? false
943
- : isCallable$4(detection) ? fails$4(detection)
944
- : !!detection;
945
- };
946
-
947
- var normalize = isForced$1.normalize = function (string) {
948
- return String(string).replace(replacement, '.').toLowerCase();
949
- };
950
-
951
- var data = isForced$1.data = {};
952
- var NATIVE = isForced$1.NATIVE = 'N';
953
- var POLYFILL = isForced$1.POLYFILL = 'P';
954
-
955
- var isForced_1 = isForced$1;
956
-
957
- var global$2 = global$b;
958
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
959
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
960
- var defineBuiltIn$2 = defineBuiltIn$3;
961
- var defineGlobalProperty = defineGlobalProperty$3;
962
- var copyConstructorProperties = copyConstructorProperties$1;
963
- var isForced = isForced_1;
964
-
965
- /*
966
- options.target - name of the target object
967
- options.global - target is the global object
968
- options.stat - export as static methods of target
969
- options.proto - export as prototype methods of target
970
- options.real - real prototype method for the `pure` version
971
- options.forced - export even if the native feature is available
972
- options.bind - bind methods to the target, required for the `pure` version
973
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
974
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
975
- options.sham - add a flag to not completely full polyfills
976
- options.enumerable - export as enumerable property
977
- options.dontCallGetSet - prevent calling a getter on target
978
- options.name - the .name of the function if it does not match the key
979
- */
980
- var _export = function (options, source) {
981
- var TARGET = options.target;
982
- var GLOBAL = options.global;
983
- var STATIC = options.stat;
984
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
985
- if (GLOBAL) {
986
- target = global$2;
987
- } else if (STATIC) {
988
- target = global$2[TARGET] || defineGlobalProperty(TARGET, {});
989
- } else {
990
- target = global$2[TARGET] && global$2[TARGET].prototype;
991
- }
992
- if (target) for (key in source) {
993
- sourceProperty = source[key];
994
- if (options.dontCallGetSet) {
995
- descriptor = getOwnPropertyDescriptor(target, key);
996
- targetProperty = descriptor && descriptor.value;
997
- } else targetProperty = target[key];
998
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
999
- // contained in target
1000
- if (!FORCED && targetProperty !== undefined) {
1001
- if (typeof sourceProperty == typeof targetProperty) continue;
1002
- copyConstructorProperties(sourceProperty, targetProperty);
1003
- }
1004
- // add a flag to not completely full polyfills
1005
- if (options.sham || (targetProperty && targetProperty.sham)) {
1006
- createNonEnumerableProperty$1(sourceProperty, 'sham', true);
1007
- }
1008
- defineBuiltIn$2(target, key, sourceProperty, options);
1009
- }
1010
- };
1011
-
1012
- var isPrototypeOf$1 = objectIsPrototypeOf;
1013
-
1014
- var $TypeError$4 = TypeError;
1015
-
1016
- var anInstance$1 = function (it, Prototype) {
1017
- if (isPrototypeOf$1(Prototype, it)) return it;
1018
- throw new $TypeError$4('Incorrect invocation');
1019
- };
1020
-
1021
- var fails$3 = fails$c;
1022
-
1023
- var correctPrototypeGetter = !fails$3(function () {
1024
- function F() { /* empty */ }
1025
- F.prototype.constructor = null;
1026
- // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1027
- return Object.getPrototypeOf(new F()) !== F.prototype;
1028
- });
1029
-
1030
- var hasOwn$1 = hasOwnProperty_1;
1031
- var isCallable$3 = isCallable$e;
1032
- var toObject = toObject$2;
1033
- var sharedKey$1 = sharedKey$3;
1034
- var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1035
-
1036
- var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1037
- var $Object$1 = Object;
1038
- var ObjectPrototype = $Object$1.prototype;
1039
-
1040
- // `Object.getPrototypeOf` method
1041
- // https://tc39.es/ecma262/#sec-object.getprototypeof
1042
- // eslint-disable-next-line es/no-object-getprototypeof -- safe
1043
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1044
- var object = toObject(O);
1045
- if (hasOwn$1(object, IE_PROTO$1)) return object[IE_PROTO$1];
1046
- var constructor = object.constructor;
1047
- if (isCallable$3(constructor) && object instanceof constructor) {
1048
- return constructor.prototype;
1049
- } return object instanceof $Object$1 ? ObjectPrototype : null;
1050
- };
1051
-
1052
- var makeBuiltIn = makeBuiltInExports;
1053
- var defineProperty = objectDefineProperty;
1054
-
1055
- var defineBuiltInAccessor$1 = function (target, name, descriptor) {
1056
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1057
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1058
- return defineProperty.f(target, name, descriptor);
1059
- };
1060
-
1061
- var DESCRIPTORS$2 = descriptors;
1062
- var definePropertyModule$1 = objectDefineProperty;
1063
- var createPropertyDescriptor = createPropertyDescriptor$3;
1064
-
1065
- var createProperty$1 = function (object, key, value) {
1066
- if (DESCRIPTORS$2) definePropertyModule$1.f(object, key, createPropertyDescriptor(0, value));
1067
- else object[key] = value;
1068
- };
1069
-
1070
- var objectDefineProperties = {};
1071
-
1072
- var internalObjectKeys = objectKeysInternal;
1073
- var enumBugKeys$1 = enumBugKeys$3;
1074
-
1075
- // `Object.keys` method
1076
- // https://tc39.es/ecma262/#sec-object.keys
1077
- // eslint-disable-next-line es/no-object-keys -- safe
1078
- var objectKeys$1 = Object.keys || function keys(O) {
1079
- return internalObjectKeys(O, enumBugKeys$1);
1080
- };
1081
-
1082
- var DESCRIPTORS$1 = descriptors;
1083
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1084
- var definePropertyModule = objectDefineProperty;
1085
- var anObject$b = anObject$e;
1086
- var toIndexedObject = toIndexedObject$4;
1087
- var objectKeys = objectKeys$1;
1088
-
1089
- // `Object.defineProperties` method
1090
- // https://tc39.es/ecma262/#sec-object.defineproperties
1091
- // eslint-disable-next-line es/no-object-defineproperties -- safe
1092
- objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1093
- anObject$b(O);
1094
- var props = toIndexedObject(Properties);
1095
- var keys = objectKeys(Properties);
1096
- var length = keys.length;
1097
- var index = 0;
1098
- var key;
1099
- while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1100
- return O;
1101
- };
1102
-
1103
- var getBuiltIn$1 = getBuiltIn$4;
1104
-
1105
- var html$1 = getBuiltIn$1('document', 'documentElement');
1106
-
1107
- /* global ActiveXObject -- old IE, WSH */
1108
- var anObject$a = anObject$e;
1109
- var definePropertiesModule = objectDefineProperties;
1110
- var enumBugKeys = enumBugKeys$3;
1111
- var hiddenKeys = hiddenKeys$4;
1112
- var html = html$1;
1113
- var documentCreateElement = documentCreateElement$1;
1114
- var sharedKey = sharedKey$3;
1115
-
1116
- var GT = '>';
1117
- var LT = '<';
1118
- var PROTOTYPE = 'prototype';
1119
- var SCRIPT = 'script';
1120
- var IE_PROTO = sharedKey('IE_PROTO');
1121
-
1122
- var EmptyConstructor = function () { /* empty */ };
1123
-
1124
- var scriptTag = function (content) {
1125
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1126
- };
1127
-
1128
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1129
- var NullProtoObjectViaActiveX = function (activeXDocument) {
1130
- activeXDocument.write(scriptTag(''));
1131
- activeXDocument.close();
1132
- var temp = activeXDocument.parentWindow.Object;
1133
- activeXDocument = null; // avoid memory leak
1134
- return temp;
1135
- };
1136
-
1137
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
1138
- var NullProtoObjectViaIFrame = function () {
1139
- // Thrash, waste and sodomy: IE GC bug
1140
- var iframe = documentCreateElement('iframe');
1141
- var JS = 'java' + SCRIPT + ':';
1142
- var iframeDocument;
1143
- iframe.style.display = 'none';
1144
- html.appendChild(iframe);
1145
- // https://github.com/zloirock/core-js/issues/475
1146
- iframe.src = String(JS);
1147
- iframeDocument = iframe.contentWindow.document;
1148
- iframeDocument.open();
1149
- iframeDocument.write(scriptTag('document.F=Object'));
1150
- iframeDocument.close();
1151
- return iframeDocument.F;
1152
- };
1153
-
1154
- // Check for document.domain and active x support
1155
- // No need to use active x approach when document.domain is not set
1156
- // see https://github.com/es-shims/es5-shim/issues/150
1157
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1158
- // avoid IE GC bug
1159
- var activeXDocument;
1160
- var NullProtoObject = function () {
1161
- try {
1162
- activeXDocument = new ActiveXObject('htmlfile');
1163
- } catch (error) { /* ignore */ }
1164
- NullProtoObject = typeof document != 'undefined'
1165
- ? document.domain && activeXDocument
1166
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1167
- : NullProtoObjectViaIFrame()
1168
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
1169
- var length = enumBugKeys.length;
1170
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1171
- return NullProtoObject();
1172
- };
1173
-
1174
- hiddenKeys[IE_PROTO] = true;
1175
-
1176
- // `Object.create` method
1177
- // https://tc39.es/ecma262/#sec-object.create
1178
- // eslint-disable-next-line es/no-object-create -- safe
1179
- var objectCreate = Object.create || function create(O, Properties) {
1180
- var result;
1181
- if (O !== null) {
1182
- EmptyConstructor[PROTOTYPE] = anObject$a(O);
1183
- result = new EmptyConstructor();
1184
- EmptyConstructor[PROTOTYPE] = null;
1185
- // add "__proto__" for Object.getPrototypeOf polyfill
1186
- result[IE_PROTO] = O;
1187
- } else result = NullProtoObject();
1188
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1189
- };
1190
-
1191
- var fails$2 = fails$c;
1192
- var isCallable$2 = isCallable$e;
1193
- var isObject = isObject$6;
1194
- var getPrototypeOf$1 = objectGetPrototypeOf;
1195
- var defineBuiltIn$1 = defineBuiltIn$3;
1196
- var wellKnownSymbol$6 = wellKnownSymbol$8;
1197
-
1198
- var ITERATOR$3 = wellKnownSymbol$6('iterator');
1199
- var BUGGY_SAFARI_ITERATORS = false;
1200
-
1201
- // `%IteratorPrototype%` object
1202
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1203
- var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1204
-
1205
- /* eslint-disable es/no-array-prototype-keys -- safe */
1206
- if ([].keys) {
1207
- arrayIterator = [].keys();
1208
- // Safari 8 has buggy iterators w/o `next`
1209
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
1210
- else {
1211
- PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
1212
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
1213
- }
1214
- }
1215
-
1216
- var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$2(function () {
1217
- var test = {};
1218
- // FF44- legacy iterators case
1219
- return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
1220
- });
1221
-
1222
- if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1223
-
1224
- // `%IteratorPrototype%[@@iterator]()` method
1225
- // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1226
- if (!isCallable$2(IteratorPrototype$2[ITERATOR$3])) {
1227
- defineBuiltIn$1(IteratorPrototype$2, ITERATOR$3, function () {
1228
- return this;
1229
- });
1230
- }
1231
-
1232
- var iteratorsCore = {
1233
- IteratorPrototype: IteratorPrototype$2,
1234
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1235
- };
1236
-
1237
- var $$b = _export;
1238
- var global$1 = global$b;
1239
- var anInstance = anInstance$1;
1240
- var anObject$9 = anObject$e;
1241
- var isCallable$1 = isCallable$e;
1242
- var getPrototypeOf = objectGetPrototypeOf;
1243
- var defineBuiltInAccessor = defineBuiltInAccessor$1;
1244
- var createProperty = createProperty$1;
1245
- var fails$1 = fails$c;
1246
- var hasOwn = hasOwnProperty_1;
1247
- var wellKnownSymbol$5 = wellKnownSymbol$8;
1248
- var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
1249
- var DESCRIPTORS = descriptors;
1250
-
1251
- var CONSTRUCTOR = 'constructor';
1252
- var ITERATOR$2 = 'Iterator';
1253
- var TO_STRING_TAG$3 = wellKnownSymbol$5('toStringTag');
1254
-
1255
- var $TypeError$3 = TypeError;
1256
- var NativeIterator = global$1[ITERATOR$2];
1257
-
1258
- // FF56- have non-standard global helper `Iterator`
1259
- var FORCED = !isCallable$1(NativeIterator)
1260
- || NativeIterator.prototype !== IteratorPrototype$1
1261
- // FF44- non-standard `Iterator` passes previous tests
1262
- || !fails$1(function () { NativeIterator({}); });
1263
-
1264
- var IteratorConstructor = function Iterator() {
1265
- anInstance(this, IteratorPrototype$1);
1266
- if (getPrototypeOf(this) === IteratorPrototype$1) throw new $TypeError$3('Abstract class Iterator not directly constructable');
1267
- };
1268
-
1269
- var defineIteratorPrototypeAccessor = function (key, value) {
1270
- if (DESCRIPTORS) {
1271
- defineBuiltInAccessor(IteratorPrototype$1, key, {
1272
- configurable: true,
1273
- get: function () {
1274
- return value;
1275
- },
1276
- set: function (replacement) {
1277
- anObject$9(this);
1278
- if (this === IteratorPrototype$1) throw new $TypeError$3("You can't redefine this property");
1279
- if (hasOwn(this, key)) this[key] = replacement;
1280
- else createProperty(this, key, replacement);
1281
- }
1282
- });
1283
- } else IteratorPrototype$1[key] = value;
1284
- };
1285
-
1286
- if (!hasOwn(IteratorPrototype$1, TO_STRING_TAG$3)) defineIteratorPrototypeAccessor(TO_STRING_TAG$3, ITERATOR$2);
1287
-
1288
- if (FORCED || !hasOwn(IteratorPrototype$1, CONSTRUCTOR) || IteratorPrototype$1[CONSTRUCTOR] === Object) {
1289
- defineIteratorPrototypeAccessor(CONSTRUCTOR, IteratorConstructor);
1290
- }
1291
-
1292
- IteratorConstructor.prototype = IteratorPrototype$1;
1293
-
1294
- // `Iterator` constructor
1295
- // https://github.com/tc39/proposal-iterator-helpers
1296
- $$b({ global: true, constructor: true, forced: FORCED }, {
1297
- Iterator: IteratorConstructor
1298
- });
1299
-
1300
- // `GetIteratorDirect(obj)` abstract operation
1301
- // https://tc39.es/proposal-iterator-helpers/#sec-getiteratordirect
1302
- var getIteratorDirect$5 = function (obj) {
1303
- return {
1304
- iterator: obj,
1305
- next: obj.next,
1306
- done: false
1307
- };
1308
- };
1309
-
1310
- var defineBuiltIn = defineBuiltIn$3;
1311
-
1312
- var defineBuiltIns$1 = function (target, src, options) {
1313
- for (var key in src) defineBuiltIn(target, key, src[key], options);
1314
- return target;
1315
- };
1316
-
1317
- // `CreateIterResultObject` abstract operation
1318
- // https://tc39.es/ecma262/#sec-createiterresultobject
1319
- var createIterResultObject$1 = function (value, done) {
1320
- return { value: value, done: done };
1321
- };
1322
-
1323
- var call$7 = functionCall;
1324
- var anObject$8 = anObject$e;
1325
- var getMethod$2 = getMethod$4;
1326
-
1327
- var iteratorClose$5 = function (iterator, kind, value) {
1328
- var innerResult, innerError;
1329
- anObject$8(iterator);
1330
- try {
1331
- innerResult = getMethod$2(iterator, 'return');
1332
- if (!innerResult) {
1333
- if (kind === 'throw') throw value;
1334
- return value;
1335
- }
1336
- innerResult = call$7(innerResult, iterator);
1337
- } catch (error) {
1338
- innerError = true;
1339
- innerResult = error;
1340
- }
1341
- if (kind === 'throw') throw value;
1342
- if (innerError) throw innerResult;
1343
- anObject$8(innerResult);
1344
- return value;
1345
- };
1346
-
1347
- var call$6 = functionCall;
1348
- var create = objectCreate;
1349
- var createNonEnumerableProperty = createNonEnumerableProperty$3;
1350
- var defineBuiltIns = defineBuiltIns$1;
1351
- var wellKnownSymbol$4 = wellKnownSymbol$8;
1352
- var InternalStateModule = internalState;
1353
- var getMethod$1 = getMethod$4;
1354
- var IteratorPrototype = iteratorsCore.IteratorPrototype;
1355
- var createIterResultObject = createIterResultObject$1;
1356
- var iteratorClose$4 = iteratorClose$5;
1357
-
1358
- var TO_STRING_TAG$2 = wellKnownSymbol$4('toStringTag');
1359
- var ITERATOR_HELPER = 'IteratorHelper';
1360
- var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
1361
- var setInternalState = InternalStateModule.set;
1362
-
1363
- var createIteratorProxyPrototype = function (IS_ITERATOR) {
1364
- var getInternalState = InternalStateModule.getterFor(IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER);
1365
-
1366
- return defineBuiltIns(create(IteratorPrototype), {
1367
- next: function next() {
1368
- var state = getInternalState(this);
1369
- // for simplification:
1370
- // for `%WrapForValidIteratorPrototype%.next` our `nextHandler` returns `IterResultObject`
1371
- // for `%IteratorHelperPrototype%.next` - just a value
1372
- if (IS_ITERATOR) return state.nextHandler();
1373
- try {
1374
- var result = state.done ? undefined : state.nextHandler();
1375
- return createIterResultObject(result, state.done);
1376
- } catch (error) {
1377
- state.done = true;
1378
- throw error;
1379
- }
1380
- },
1381
- 'return': function () {
1382
- var state = getInternalState(this);
1383
- var iterator = state.iterator;
1384
- state.done = true;
1385
- if (IS_ITERATOR) {
1386
- var returnMethod = getMethod$1(iterator, 'return');
1387
- return returnMethod ? call$6(returnMethod, iterator) : createIterResultObject(undefined, true);
1388
- }
1389
- if (state.inner) try {
1390
- iteratorClose$4(state.inner.iterator, 'normal');
1391
- } catch (error) {
1392
- return iteratorClose$4(iterator, 'throw', error);
1393
- }
1394
- iteratorClose$4(iterator, 'normal');
1395
- return createIterResultObject(undefined, true);
1396
- }
1397
- });
1398
- };
1399
-
1400
- var WrapForValidIteratorPrototype = createIteratorProxyPrototype(true);
1401
- var IteratorHelperPrototype = createIteratorProxyPrototype(false);
1402
-
1403
- createNonEnumerableProperty(IteratorHelperPrototype, TO_STRING_TAG$2, 'Iterator Helper');
1404
-
1405
- var iteratorCreateProxy = function (nextHandler, IS_ITERATOR) {
1406
- var IteratorProxy = function Iterator(record, state) {
1407
- if (state) {
1408
- state.iterator = record.iterator;
1409
- state.next = record.next;
1410
- } else state = record;
1411
- state.type = IS_ITERATOR ? WRAP_FOR_VALID_ITERATOR : ITERATOR_HELPER;
1412
- state.nextHandler = nextHandler;
1413
- state.counter = 0;
1414
- state.done = false;
1415
- setInternalState(this, state);
1416
- };
1417
-
1418
- IteratorProxy.prototype = IS_ITERATOR ? WrapForValidIteratorPrototype : IteratorHelperPrototype;
1419
-
1420
- return IteratorProxy;
1421
- };
1422
-
1423
- var anObject$7 = anObject$e;
1424
- var iteratorClose$3 = iteratorClose$5;
1425
-
1426
- // call something on iterator step with safe closing on error
1427
- var callWithSafeIterationClosing$2 = function (iterator, fn, value, ENTRIES) {
1428
- try {
1429
- return ENTRIES ? fn(anObject$7(value)[0], value[1]) : fn(value);
1430
- } catch (error) {
1431
- iteratorClose$3(iterator, 'throw', error);
1432
- }
1433
- };
1434
-
1435
- var $$a = _export;
1436
- var call$5 = functionCall;
1437
- var aCallable$7 = aCallable$9;
1438
- var anObject$6 = anObject$e;
1439
- var getIteratorDirect$4 = getIteratorDirect$5;
1440
- var createIteratorProxy$1 = iteratorCreateProxy;
1441
- var callWithSafeIterationClosing$1 = callWithSafeIterationClosing$2;
1442
- var IS_PURE$1 = isPure;
1443
-
1444
- var IteratorProxy$1 = createIteratorProxy$1(function () {
1445
- var iterator = this.iterator;
1446
- var predicate = this.predicate;
1447
- var next = this.next;
1448
- var result, done, value;
1449
- while (true) {
1450
- result = anObject$6(call$5(next, iterator));
1451
- done = this.done = !!result.done;
1452
- if (done) return;
1453
- value = result.value;
1454
- if (callWithSafeIterationClosing$1(iterator, predicate, [value, this.counter++], true)) return value;
1455
- }
1456
- });
1457
-
1458
- // `Iterator.prototype.filter` method
1459
- // https://github.com/tc39/proposal-iterator-helpers
1460
- $$a({ target: 'Iterator', proto: true, real: true, forced: IS_PURE$1 }, {
1461
- filter: function filter(predicate) {
1462
- anObject$6(this);
1463
- aCallable$7(predicate);
1464
- return new IteratorProxy$1(getIteratorDirect$4(this), {
1465
- predicate: predicate
1466
- });
1467
- }
1468
- });
1469
-
1470
- var classofRaw$1 = classofRaw$2;
1471
- var uncurryThis$4 = functionUncurryThis;
1472
-
1473
- var functionUncurryThisClause = function (fn) {
1474
- // Nashorn bug:
1475
- // https://github.com/zloirock/core-js/issues/1128
1476
- // https://github.com/zloirock/core-js/issues/1130
1477
- if (classofRaw$1(fn) === 'Function') return uncurryThis$4(fn);
1478
- };
1479
-
1480
- var uncurryThis$3 = functionUncurryThisClause;
1481
- var aCallable$6 = aCallable$9;
1482
- var NATIVE_BIND = functionBindNative;
1483
-
1484
- var bind$1 = uncurryThis$3(uncurryThis$3.bind);
1485
-
1486
- // optional / simple context binding
1487
- var functionBindContext = function (fn, that) {
1488
- aCallable$6(fn);
1489
- return that === undefined ? fn : NATIVE_BIND ? bind$1(fn, that) : function (/* ...args */) {
1490
- return fn.apply(that, arguments);
1491
- };
1492
- };
1493
-
1494
- var iterators = {};
1495
-
1496
- var wellKnownSymbol$3 = wellKnownSymbol$8;
1497
- var Iterators$1 = iterators;
1498
-
1499
- var ITERATOR$1 = wellKnownSymbol$3('iterator');
1500
- var ArrayPrototype = Array.prototype;
1501
-
1502
- // check on default Array iterator
1503
- var isArrayIteratorMethod$1 = function (it) {
1504
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$1] === it);
1505
- };
1506
-
1507
- var wellKnownSymbol$2 = wellKnownSymbol$8;
1508
-
1509
- var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
1510
- var test = {};
1511
-
1512
- test[TO_STRING_TAG$1] = 'z';
1513
-
1514
- var toStringTagSupport = String(test) === '[object z]';
1515
-
1516
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1517
- var isCallable = isCallable$e;
1518
- var classofRaw = classofRaw$2;
1519
- var wellKnownSymbol$1 = wellKnownSymbol$8;
1520
-
1521
- var TO_STRING_TAG = wellKnownSymbol$1('toStringTag');
1522
- var $Object = Object;
1523
-
1524
- // ES3 wrong here
1525
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) === 'Arguments';
1526
-
1527
- // fallback for IE11 Script Access Denied error
1528
- var tryGet = function (it, key) {
1529
- try {
1530
- return it[key];
1531
- } catch (error) { /* empty */ }
1532
- };
1533
-
1534
- // getting tag from ES6+ `Object.prototype.toString`
1535
- var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1536
- var O, tag, result;
1537
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1538
- // @@toStringTag case
1539
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1540
- // builtinTag case
1541
- : CORRECT_ARGUMENTS ? classofRaw(O)
1542
- // ES3 arguments fallback
1543
- : (result = classofRaw(O)) === 'Object' && isCallable(O.callee) ? 'Arguments' : result;
1544
- };
1545
-
1546
- var classof = classof$1;
1547
- var getMethod = getMethod$4;
1548
- var isNullOrUndefined = isNullOrUndefined$3;
1549
- var Iterators = iterators;
1550
- var wellKnownSymbol = wellKnownSymbol$8;
1551
-
1552
- var ITERATOR = wellKnownSymbol('iterator');
1553
-
1554
- var getIteratorMethod$2 = function (it) {
1555
- if (!isNullOrUndefined(it)) return getMethod(it, ITERATOR)
1556
- || getMethod(it, '@@iterator')
1557
- || Iterators[classof(it)];
1558
- };
1559
-
1560
- var call$4 = functionCall;
1561
- var aCallable$5 = aCallable$9;
1562
- var anObject$5 = anObject$e;
1563
- var tryToString$1 = tryToString$3;
1564
- var getIteratorMethod$1 = getIteratorMethod$2;
1565
-
1566
- var $TypeError$2 = TypeError;
1567
-
1568
- var getIterator$1 = function (argument, usingIterator) {
1569
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1570
- if (aCallable$5(iteratorMethod)) return anObject$5(call$4(iteratorMethod, argument));
1571
- throw new $TypeError$2(tryToString$1(argument) + ' is not iterable');
1572
- };
1573
-
1574
- var bind = functionBindContext;
1575
- var call$3 = functionCall;
1576
- var anObject$4 = anObject$e;
1577
- var tryToString = tryToString$3;
1578
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
1579
- var lengthOfArrayLike = lengthOfArrayLike$2;
1580
- var isPrototypeOf = objectIsPrototypeOf;
1581
- var getIterator = getIterator$1;
1582
- var getIteratorMethod = getIteratorMethod$2;
1583
- var iteratorClose$2 = iteratorClose$5;
1584
-
1585
- var $TypeError$1 = TypeError;
1586
-
1587
- var Result = function (stopped, result) {
1588
- this.stopped = stopped;
1589
- this.result = result;
1590
- };
1591
-
1592
- var ResultPrototype = Result.prototype;
1593
-
1594
- var iterate$4 = function (iterable, unboundFunction, options) {
1595
- var that = options && options.that;
1596
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1597
- var IS_RECORD = !!(options && options.IS_RECORD);
1598
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1599
- var INTERRUPTED = !!(options && options.INTERRUPTED);
1600
- var fn = bind(unboundFunction, that);
1601
- var iterator, iterFn, index, length, result, next, step;
1602
-
1603
- var stop = function (condition) {
1604
- if (iterator) iteratorClose$2(iterator, 'normal', condition);
1605
- return new Result(true, condition);
1606
- };
1607
-
1608
- var callFn = function (value) {
1609
- if (AS_ENTRIES) {
1610
- anObject$4(value);
1611
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1612
- } return INTERRUPTED ? fn(value, stop) : fn(value);
1613
- };
1614
-
1615
- if (IS_RECORD) {
1616
- iterator = iterable.iterator;
1617
- } else if (IS_ITERATOR) {
1618
- iterator = iterable;
1619
- } else {
1620
- iterFn = getIteratorMethod(iterable);
1621
- if (!iterFn) throw new $TypeError$1(tryToString(iterable) + ' is not iterable');
1622
- // optimisation for array iterators
1623
- if (isArrayIteratorMethod(iterFn)) {
1624
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
1625
- result = callFn(iterable[index]);
1626
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
1627
- } return new Result(false);
1628
- }
1629
- iterator = getIterator(iterable, iterFn);
1630
- }
1631
-
1632
- next = IS_RECORD ? iterable.next : iterator.next;
1633
- while (!(step = call$3(next, iterator)).done) {
1634
- try {
1635
- result = callFn(step.value);
1636
- } catch (error) {
1637
- iteratorClose$2(iterator, 'throw', error);
1638
- }
1639
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
1640
- } return new Result(false);
1641
- };
1642
-
1643
- var $$9 = _export;
1644
- var iterate$3 = iterate$4;
1645
- var aCallable$4 = aCallable$9;
1646
- var anObject$3 = anObject$e;
1647
- var getIteratorDirect$3 = getIteratorDirect$5;
1648
-
1649
- // `Iterator.prototype.forEach` method
1650
- // https://github.com/tc39/proposal-iterator-helpers
1651
- $$9({ target: 'Iterator', proto: true, real: true }, {
1652
- forEach: function forEach(fn) {
1653
- anObject$3(this);
1654
- aCallable$4(fn);
1655
- var record = getIteratorDirect$3(this);
1656
- var counter = 0;
1657
- iterate$3(record, function (value) {
1658
- fn(value, counter++);
1659
- }, { IS_RECORD: true });
1660
- }
1661
- });
1662
-
1663
- var call$2 = functionCall;
1664
- var aCallable$3 = aCallable$9;
1665
- var anObject$2 = anObject$e;
1666
- var getIteratorDirect$2 = getIteratorDirect$5;
1667
- var createIteratorProxy = iteratorCreateProxy;
1668
- var callWithSafeIterationClosing = callWithSafeIterationClosing$2;
1669
-
1670
- var IteratorProxy = createIteratorProxy(function () {
1671
- var iterator = this.iterator;
1672
- var result = anObject$2(call$2(this.next, iterator));
1673
- var done = this.done = !!result.done;
1674
- if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
1675
- });
1676
-
1677
- // `Iterator.prototype.map` method
1678
- // https://github.com/tc39/proposal-iterator-helpers
1679
- var iteratorMap = function map(mapper) {
1680
- anObject$2(this);
1681
- aCallable$3(mapper);
1682
- return new IteratorProxy(getIteratorDirect$2(this), {
1683
- mapper: mapper
1684
- });
1685
- };
1686
-
1687
- var $$8 = _export;
1688
- var map = iteratorMap;
1689
- var IS_PURE = isPure;
1690
-
1691
- // `Iterator.prototype.map` method
1692
- // https://github.com/tc39/proposal-iterator-helpers
1693
- $$8({ target: 'Iterator', proto: true, real: true, forced: IS_PURE }, {
1694
- map: map
1695
- });
1696
-
1697
- var uncurryThis$2 = functionUncurryThis;
1698
-
1699
- // eslint-disable-next-line es/no-set -- safe
1700
- var SetPrototype$1 = Set.prototype;
1701
-
1702
- var setHelpers = {
1703
- // eslint-disable-next-line es/no-set -- safe
1704
- Set: Set,
1705
- add: uncurryThis$2(SetPrototype$1.add),
1706
- has: uncurryThis$2(SetPrototype$1.has),
1707
- remove: uncurryThis$2(SetPrototype$1['delete']),
1708
- proto: SetPrototype$1
1709
- };
1710
-
1711
- var has$5 = setHelpers.has;
1712
-
1713
- // Perform ? RequireInternalSlot(M, [[SetData]])
1714
- var aSet$7 = function (it) {
1715
- has$5(it);
1716
- return it;
1717
- };
1718
-
1719
- var call$1 = functionCall;
1720
-
1721
- var iterateSimple$7 = function (record, fn, ITERATOR_INSTEAD_OF_RECORD) {
1722
- var iterator = ITERATOR_INSTEAD_OF_RECORD ? record : record.iterator;
1723
- var next = record.next;
1724
- var step, result;
1725
- while (!(step = call$1(next, iterator)).done) {
1726
- result = fn(step.value);
1727
- if (result !== undefined) return result;
1728
- }
1729
- };
1730
-
1731
- var uncurryThis$1 = functionUncurryThis;
1732
- var iterateSimple$6 = iterateSimple$7;
1733
- var SetHelpers$5 = setHelpers;
1734
-
1735
- var Set$3 = SetHelpers$5.Set;
1736
- var SetPrototype = SetHelpers$5.proto;
1737
- var forEach = uncurryThis$1(SetPrototype.forEach);
1738
- var keys = uncurryThis$1(SetPrototype.keys);
1739
- var next = keys(new Set$3()).next;
1740
-
1741
- var setIterate = function (set, fn, interruptible) {
1742
- return interruptible ? iterateSimple$6({ iterator: keys(set), next: next }, fn) : forEach(set, fn);
1743
- };
1744
-
1745
- var SetHelpers$4 = setHelpers;
1746
- var iterate$2 = setIterate;
1747
-
1748
- var Set$2 = SetHelpers$4.Set;
1749
- var add$3 = SetHelpers$4.add;
1750
-
1751
- var setClone = function (set) {
1752
- var result = new Set$2();
1753
- iterate$2(set, function (it) {
1754
- add$3(result, it);
1755
- });
1756
- return result;
1757
- };
1758
-
1759
- var uncurryThis = functionUncurryThis;
1760
- var aCallable$2 = aCallable$9;
1761
-
1762
- var functionUncurryThisAccessor = function (object, key, method) {
1763
- try {
1764
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1765
- return uncurryThis(aCallable$2(Object.getOwnPropertyDescriptor(object, key)[method]));
1766
- } catch (error) { /* empty */ }
1767
- };
1768
-
1769
- var uncurryThisAccessor = functionUncurryThisAccessor;
1770
- var SetHelpers$3 = setHelpers;
1771
-
1772
- var setSize = uncurryThisAccessor(SetHelpers$3.proto, 'size', 'get') || function (set) {
1773
- return set.size;
1774
- };
1775
-
1776
- var aCallable$1 = aCallable$9;
1777
- var anObject$1 = anObject$e;
1778
- var call = functionCall;
1779
- var toIntegerOrInfinity = toIntegerOrInfinity$3;
1780
- var getIteratorDirect$1 = getIteratorDirect$5;
1781
-
1782
- var INVALID_SIZE = 'Invalid size';
1783
- var $RangeError = RangeError;
1784
- var $TypeError = TypeError;
1785
- var max = Math.max;
1786
-
1787
- var SetRecord = function (set, intSize) {
1788
- this.set = set;
1789
- this.size = max(intSize, 0);
1790
- this.has = aCallable$1(set.has);
1791
- this.keys = aCallable$1(set.keys);
1792
- };
1793
-
1794
- SetRecord.prototype = {
1795
- getIterator: function () {
1796
- return getIteratorDirect$1(anObject$1(call(this.keys, this.set)));
1797
- },
1798
- includes: function (it) {
1799
- return call(this.has, this.set, it);
1800
- }
1801
- };
1802
-
1803
- // `GetSetRecord` abstract operation
1804
- // https://tc39.es/proposal-set-methods/#sec-getsetrecord
1805
- var getSetRecord$7 = function (obj) {
1806
- anObject$1(obj);
1807
- var numSize = +obj.size;
1808
- // NOTE: If size is undefined, then numSize will be NaN
1809
- // eslint-disable-next-line no-self-compare -- NaN check
1810
- if (numSize !== numSize) throw new $TypeError(INVALID_SIZE);
1811
- var intSize = toIntegerOrInfinity(numSize);
1812
- if (intSize < 0) throw new $RangeError(INVALID_SIZE);
1813
- return new SetRecord(obj, intSize);
1814
- };
1815
-
1816
- var aSet$6 = aSet$7;
1817
- var SetHelpers$2 = setHelpers;
1818
- var clone$2 = setClone;
1819
- var size$4 = setSize;
1820
- var getSetRecord$6 = getSetRecord$7;
1821
- var iterateSet$2 = setIterate;
1822
- var iterateSimple$5 = iterateSimple$7;
1823
-
1824
- var has$4 = SetHelpers$2.has;
1825
- var remove$1 = SetHelpers$2.remove;
1826
-
1827
- // `Set.prototype.difference` method
1828
- // https://github.com/tc39/proposal-set-methods
1829
- var setDifference = function difference(other) {
1830
- var O = aSet$6(this);
1831
- var otherRec = getSetRecord$6(other);
1832
- var result = clone$2(O);
1833
- if (size$4(O) <= otherRec.size) iterateSet$2(O, function (e) {
1834
- if (otherRec.includes(e)) remove$1(result, e);
1835
- });
1836
- else iterateSimple$5(otherRec.getIterator(), function (e) {
1837
- if (has$4(O, e)) remove$1(result, e);
1838
- });
1839
- return result;
1840
- };
1841
-
1842
- var getBuiltIn = getBuiltIn$4;
1843
-
1844
- var createSetLike = function (size) {
1845
- return {
1846
- size: size,
1847
- has: function () {
1848
- return false;
1849
- },
1850
- keys: function () {
1851
- return {
1852
- next: function () {
1853
- return { done: true };
1854
- }
1855
- };
1856
- }
1857
- };
1858
- };
1859
-
1860
- var setMethodAcceptSetLike$7 = function (name) {
1861
- var Set = getBuiltIn('Set');
1862
- try {
1863
- new Set()[name](createSetLike(0));
1864
- try {
1865
- // late spec change, early WebKit ~ Safari 17.0 beta implementation does not pass it
1866
- // https://github.com/tc39/proposal-set-methods/pull/88
1867
- new Set()[name](createSetLike(-1));
1868
- return false;
1869
- } catch (error2) {
1870
- return true;
1871
- }
1872
- } catch (error) {
1873
- return false;
1874
- }
1875
- };
1876
-
1877
- var $$7 = _export;
1878
- var difference = setDifference;
1879
- var setMethodAcceptSetLike$6 = setMethodAcceptSetLike$7;
1880
-
1881
- // `Set.prototype.difference` method
1882
- // https://github.com/tc39/proposal-set-methods
1883
- $$7({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$6('difference') }, {
1884
- difference: difference
1885
- });
1886
-
1887
- var aSet$5 = aSet$7;
1888
- var SetHelpers$1 = setHelpers;
1889
- var size$3 = setSize;
1890
- var getSetRecord$5 = getSetRecord$7;
1891
- var iterateSet$1 = setIterate;
1892
- var iterateSimple$4 = iterateSimple$7;
1893
-
1894
- var Set$1 = SetHelpers$1.Set;
1895
- var add$2 = SetHelpers$1.add;
1896
- var has$3 = SetHelpers$1.has;
1897
-
1898
- // `Set.prototype.intersection` method
1899
- // https://github.com/tc39/proposal-set-methods
1900
- var setIntersection = function intersection(other) {
1901
- var O = aSet$5(this);
1902
- var otherRec = getSetRecord$5(other);
1903
- var result = new Set$1();
1904
-
1905
- if (size$3(O) > otherRec.size) {
1906
- iterateSimple$4(otherRec.getIterator(), function (e) {
1907
- if (has$3(O, e)) add$2(result, e);
1908
- });
1909
- } else {
1910
- iterateSet$1(O, function (e) {
1911
- if (otherRec.includes(e)) add$2(result, e);
1912
- });
1913
- }
1914
-
1915
- return result;
1916
- };
1917
-
1918
- var $$6 = _export;
1919
- var fails = fails$c;
1920
- var intersection = setIntersection;
1921
- var setMethodAcceptSetLike$5 = setMethodAcceptSetLike$7;
1922
-
1923
- var INCORRECT = !setMethodAcceptSetLike$5('intersection') || fails(function () {
1924
- // eslint-disable-next-line es/no-array-from, es/no-set -- testing
1925
- return String(Array.from(new Set([1, 2, 3]).intersection(new Set([3, 2])))) !== '3,2';
1926
- });
1927
-
1928
- // `Set.prototype.intersection` method
1929
- // https://github.com/tc39/proposal-set-methods
1930
- $$6({ target: 'Set', proto: true, real: true, forced: INCORRECT }, {
1931
- intersection: intersection
1932
- });
1933
-
1934
- var aSet$4 = aSet$7;
1935
- var has$2 = setHelpers.has;
1936
- var size$2 = setSize;
1937
- var getSetRecord$4 = getSetRecord$7;
1938
- var iterateSet = setIterate;
1939
- var iterateSimple$3 = iterateSimple$7;
1940
- var iteratorClose$1 = iteratorClose$5;
1941
-
1942
- // `Set.prototype.isDisjointFrom` method
1943
- // https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
1944
- var setIsDisjointFrom = function isDisjointFrom(other) {
1945
- var O = aSet$4(this);
1946
- var otherRec = getSetRecord$4(other);
1947
- if (size$2(O) <= otherRec.size) return iterateSet(O, function (e) {
1948
- if (otherRec.includes(e)) return false;
1949
- }, true) !== false;
1950
- var iterator = otherRec.getIterator();
1951
- return iterateSimple$3(iterator, function (e) {
1952
- if (has$2(O, e)) return iteratorClose$1(iterator, 'normal', false);
1953
- }) !== false;
1954
- };
1955
-
1956
- var $$5 = _export;
1957
- var isDisjointFrom = setIsDisjointFrom;
1958
- var setMethodAcceptSetLike$4 = setMethodAcceptSetLike$7;
1959
-
1960
- // `Set.prototype.isDisjointFrom` method
1961
- // https://github.com/tc39/proposal-set-methods
1962
- $$5({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$4('isDisjointFrom') }, {
1963
- isDisjointFrom: isDisjointFrom
1964
- });
1965
-
1966
- var aSet$3 = aSet$7;
1967
- var size$1 = setSize;
1968
- var iterate$1 = setIterate;
1969
- var getSetRecord$3 = getSetRecord$7;
1970
-
1971
- // `Set.prototype.isSubsetOf` method
1972
- // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
1973
- var setIsSubsetOf = function isSubsetOf(other) {
1974
- var O = aSet$3(this);
1975
- var otherRec = getSetRecord$3(other);
1976
- if (size$1(O) > otherRec.size) return false;
1977
- return iterate$1(O, function (e) {
1978
- if (!otherRec.includes(e)) return false;
1979
- }, true) !== false;
1980
- };
1981
-
1982
- var $$4 = _export;
1983
- var isSubsetOf = setIsSubsetOf;
1984
- var setMethodAcceptSetLike$3 = setMethodAcceptSetLike$7;
1985
-
1986
- // `Set.prototype.isSubsetOf` method
1987
- // https://github.com/tc39/proposal-set-methods
1988
- $$4({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$3('isSubsetOf') }, {
1989
- isSubsetOf: isSubsetOf
1990
- });
1991
-
1992
- var aSet$2 = aSet$7;
1993
- var has$1 = setHelpers.has;
1994
- var size = setSize;
1995
- var getSetRecord$2 = getSetRecord$7;
1996
- var iterateSimple$2 = iterateSimple$7;
1997
- var iteratorClose = iteratorClose$5;
1998
-
1999
- // `Set.prototype.isSupersetOf` method
2000
- // https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
2001
- var setIsSupersetOf = function isSupersetOf(other) {
2002
- var O = aSet$2(this);
2003
- var otherRec = getSetRecord$2(other);
2004
- if (size(O) < otherRec.size) return false;
2005
- var iterator = otherRec.getIterator();
2006
- return iterateSimple$2(iterator, function (e) {
2007
- if (!has$1(O, e)) return iteratorClose(iterator, 'normal', false);
2008
- }) !== false;
2009
- };
2010
-
2011
- var $$3 = _export;
2012
- var isSupersetOf = setIsSupersetOf;
2013
- var setMethodAcceptSetLike$2 = setMethodAcceptSetLike$7;
2014
-
2015
- // `Set.prototype.isSupersetOf` method
2016
- // https://github.com/tc39/proposal-set-methods
2017
- $$3({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$2('isSupersetOf') }, {
2018
- isSupersetOf: isSupersetOf
2019
- });
2020
-
2021
- var aSet$1 = aSet$7;
2022
- var SetHelpers = setHelpers;
2023
- var clone$1 = setClone;
2024
- var getSetRecord$1 = getSetRecord$7;
2025
- var iterateSimple$1 = iterateSimple$7;
2026
-
2027
- var add$1 = SetHelpers.add;
2028
- var has = SetHelpers.has;
2029
- var remove = SetHelpers.remove;
2030
-
2031
- // `Set.prototype.symmetricDifference` method
2032
- // https://github.com/tc39/proposal-set-methods
2033
- var setSymmetricDifference = function symmetricDifference(other) {
2034
- var O = aSet$1(this);
2035
- var keysIter = getSetRecord$1(other).getIterator();
2036
- var result = clone$1(O);
2037
- iterateSimple$1(keysIter, function (e) {
2038
- if (has(O, e)) remove(result, e);
2039
- else add$1(result, e);
2040
- });
2041
- return result;
2042
- };
2043
-
2044
- var $$2 = _export;
2045
- var symmetricDifference = setSymmetricDifference;
2046
- var setMethodAcceptSetLike$1 = setMethodAcceptSetLike$7;
2047
-
2048
- // `Set.prototype.symmetricDifference` method
2049
- // https://github.com/tc39/proposal-set-methods
2050
- $$2({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike$1('symmetricDifference') }, {
2051
- symmetricDifference: symmetricDifference
2052
- });
2053
-
2054
- var aSet = aSet$7;
2055
- var add = setHelpers.add;
2056
- var clone = setClone;
2057
- var getSetRecord = getSetRecord$7;
2058
- var iterateSimple = iterateSimple$7;
2059
-
2060
- // `Set.prototype.union` method
2061
- // https://github.com/tc39/proposal-set-methods
2062
- var setUnion = function union(other) {
2063
- var O = aSet(this);
2064
- var keysIter = getSetRecord(other).getIterator();
2065
- var result = clone(O);
2066
- iterateSimple(keysIter, function (it) {
2067
- add(result, it);
2068
- });
2069
- return result;
2070
- };
2071
-
2072
- var $$1 = _export;
2073
- var union = setUnion;
2074
- var setMethodAcceptSetLike = setMethodAcceptSetLike$7;
2075
-
2076
- // `Set.prototype.union` method
2077
- // https://github.com/tc39/proposal-set-methods
2078
- $$1({ target: 'Set', proto: true, real: true, forced: !setMethodAcceptSetLike('union') }, {
2079
- union: union
2080
- });
2081
-
2082
21
  const MAX_FUTURE_DATE = new Date(Date.UTC(9999, 0));
2083
22
  /**
2084
23
  * Returns true if the input is a date.
@@ -2188,50 +127,6 @@ function isSameDateDay(a, b, defaultValue = null) {
2188
127
  function utcDayForDate(date) {
2189
128
  return new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
2190
129
  }
2191
- /**
2192
- * Takes the next occuring time of the input date's hours/minutes.
2193
- *
2194
- * For example, if it is currently 9PM:
2195
- * - if 10PM on any day is passed then 9PM the next day will be returned.
2196
- * - if 11PM on any day is passed, 11PM today will be returned.
2197
- *
2198
- * @deprecated Fails in the rare case where it is the first two hours of a day in a daylight savings zone when daylight savings changes.
2199
- */
2200
- function takeNextUpcomingTime(date, roundDownToMinute) {
2201
- date = copyHoursAndMinutesFromDateToToday(date, roundDownToMinute);
2202
- if (dateFns.isPast(date)) {
2203
- date = dateFns.addDays(date, 1);
2204
- }
2205
- return date;
2206
- }
2207
- /**
2208
- * Creates a new date and copies the hours/minutes from the previous date and applies them to a date for today.
2209
- *
2210
- * @deprecated Fails in the rare case where it is the first two hours of a day in a daylight savings zone when daylight savings changes.
2211
- */
2212
- function copyHoursAndMinutesFromDateToToday(fromDate, roundDownToMinute) {
2213
- return copyHoursAndMinutesFromDate(new Date(), fromDate, roundDownToMinute);
2214
- }
2215
- /**
2216
- * Copies the hours/minutes from now to the target date.
2217
- *
2218
- * @deprecated Fails in the rare case where it is the first two hours of a day in a daylight savings zone when daylight savings changes.
2219
- */
2220
- function copyHoursAndMinutesFromNow(target, roundDownToMinute) {
2221
- return copyHoursAndMinutesFromDate(target, new Date(), roundDownToMinute);
2222
- }
2223
- /**
2224
- * Creates a new date and copies the hours/minutes from the input date to the target date.
2225
- *
2226
- * @deprecated Fails in the rare case where it is the first two hours of a day in a daylight savings zone when daylight savings changes.
2227
- */
2228
- function copyHoursAndMinutesFromDate(target, fromDate, roundDownToMinute) {
2229
- return copyHoursAndMinutesToDate({
2230
- hours: fromDate.getHours(),
2231
- minutes: fromDate.getMinutes(),
2232
- roundDownToMinute
2233
- }, target);
2234
- }
2235
130
  /**
2236
131
  * Creates a new date using UTC and copies the hours/minutes from the input date using the UTC values to the target date.
2237
132
  */
@@ -4139,19 +2034,6 @@ function parseISO8601DayStringToDate(dayString) {
4139
2034
  const result = dateFns.parse(dayString, format, new Date());
4140
2035
  return dateFns.startOfDay(result);
4141
2036
  }
4142
- // MARK: Compat
4143
- /**
4144
- * @deprecated use toISO8601DayStringForSystem instead for clarity. Will be removed in the future.
4145
- */
4146
- const toISO8601DayString = toISO8601DayStringForSystem;
4147
- /**
4148
- * @deprecated use formatToISO8601DayStringForSystem instead for clarity. Will be removed in the future.
4149
- */
4150
- const formatToISO8601DayString = formatToISO8601DayStringForSystem;
4151
- /**
4152
- * @deprecated use formatToMonthDaySlashDate instead for clarity. Will be removed in the future.
4153
- */
4154
- const dateShortDateStringFormat = monthDaySlashDateStringFormat;
4155
2037
 
4156
2038
  /**
4157
2039
  * Returns true if the index is a non-negative integer.
@@ -4798,26 +2680,6 @@ function isValidFullDateCellTiming(timing) {
4798
2680
  return isValid;
4799
2681
  }
4800
2682
 
4801
- var $ = _export;
4802
- var iterate = iterate$4;
4803
- var aCallable = aCallable$9;
4804
- var anObject = anObject$e;
4805
- var getIteratorDirect = getIteratorDirect$5;
4806
-
4807
- // `Iterator.prototype.find` method
4808
- // https://github.com/tc39/proposal-iterator-helpers
4809
- $({ target: 'Iterator', proto: true, real: true }, {
4810
- find: function find(predicate) {
4811
- anObject(this);
4812
- aCallable(predicate);
4813
- var record = getIteratorDirect(this);
4814
- var counter = 0;
4815
- return iterate(record, function (value, stop) {
4816
- if (predicate(value, counter++)) return stop(value);
4817
- }, { IS_RECORD: true, INTERRUPTED: true }).result;
4818
- }
4819
- });
4820
-
4821
2683
  class DateCellRange extends DateCell {
4822
2684
  constructor(template) {
4823
2685
  super(template);
@@ -6403,8 +4265,8 @@ function yearWeekCodeForDateRangeFactory(factory = yearWeekCodeFactory()) {
6403
4265
  const weeks = [];
6404
4266
  let current = dateFns.startOfWeek(start);
6405
4267
  while (!dateFns.isAfter(current, end)) {
6406
- const week = factory(current);
6407
- weeks.push(week);
4268
+ // use yearWeekCodePairFromDate directly since current is already in target timezone form after systemDateToTargetDate
4269
+ weeks.push(yearWeekCodeFromPair(yearWeekCodePairFromDate(current)));
6408
4270
  current = dateFns.addWeeks(current, 1);
6409
4271
  }
6410
4272
  // TODO: Add test for {"start":"2023-09-24T03:21:24.127Z","end":"2023-09-30T04:59:59.999Z"}
@@ -6892,7 +4754,9 @@ function dateCellScheduleDateRange(input) {
6892
4754
  start = normalInstance.startOfDayInTargetTimezone(startInSystemTimezone); // ensure the start of the day is set/matches the timezone.
6893
4755
  } else {
6894
4756
  if (inputStartsAt != null) {
6895
- start = normalInstance.startOfDayInTargetTimezone(inputStartsAt);
4757
+ // use ISO day string path to avoid system-timezone-dependent startOfDay; matches dateCellTiming behavior
4758
+ const startsAtInTarget = normalInstance.baseDateToTargetDate(inputStartsAt);
4759
+ start = normalInstance.startOfDayInTargetTimezone(formatToISO8601DayStringForUTC(startsAtInTarget));
6896
4760
  } else if (inputEnd != null) {
6897
4761
  start = normalInstance.startOfDayInTargetTimezone(inputEnd); // start on the same day as the end date
6898
4762
  } else {
@@ -7614,7 +5478,17 @@ class LimitDateTimeInstance {
7614
5478
  const dateRange = this.dateRange();
7615
5479
  result = clampDateToDateRange(date, dateRange);
7616
5480
  if (this._config.takeNextUpcomingTime) {
7617
- result = takeNextUpcomingTime(result, this._config.roundDownToMinute ?? false);
5481
+ // Inline implementation of deprecated takeNextUpcomingTime
5482
+ // Copy hours/minutes from result to today, then add a day if it's in the past
5483
+ const roundDownToMinute = this._config.roundDownToMinute ?? false;
5484
+ result = copyHoursAndMinutesToDate({
5485
+ hours: result.getHours(),
5486
+ minutes: result.getMinutes(),
5487
+ roundDownToMinute
5488
+ }, new Date());
5489
+ if (dateFns.isPast(result)) {
5490
+ result = dateFns.addDays(result, 1);
5491
+ }
7618
5492
  } else if (this._config.roundDownToMinute) {
7619
5493
  result = roundDownToMinute(result);
7620
5494
  }
@@ -8117,138 +5991,6 @@ function limitDateTime(config) {
8117
5991
  return new LimitDateTimeInstance(config);
8118
5992
  }
8119
5993
 
8120
- // MARK: Compat
8121
- /**
8122
- * Returns true if any of the input items have expired.
8123
- *
8124
- * If the list is empty, returns false.
8125
- *
8126
- * @deprecated Use ExpirationDetails and checkAtleastOneNotExpired() instead.
8127
- */
8128
- function atleastOneNotExpired(expires) {
8129
- for (const expire of expires) {
8130
- if (!hasExpired(expire)) {
8131
- return true;
8132
- }
8133
- }
8134
- return false;
8135
- }
8136
- /**
8137
- * Returns true if any of the input items has expired.
8138
- *
8139
- * If the list is empty, returns the second argument, or true by default.
8140
- *
8141
- * @deprecated Use ExpirationDetails and checkAnyHaveExpired() instead.
8142
- */
8143
- function anyHaveExpired(expires, expireIfEmpty = true) {
8144
- if (expires.length === 0) {
8145
- return expireIfEmpty;
8146
- }
8147
- for (const expire of expires) {
8148
- if (hasExpired(expire)) {
8149
- return true;
8150
- }
8151
- }
8152
- return false;
8153
- }
8154
- /**
8155
- * Convenience function for checking if the input time has expired.
8156
- *
8157
- * @param timeNumber
8158
- * @param expiresIn
8159
- * @returns
8160
- *
8161
- * @deprecated Use isThrottled() or expirationDetails({ expiresFromDate: time, expiresIn }).hasExpired() instead.
8162
- */
8163
- function timeHasExpired(time, expiresIn) {
8164
- return hasExpired(toExpires(time, expiresIn));
8165
- }
8166
- /**
8167
- * Creates an Expires object from the input date or time number.
8168
- *
8169
- * @deprecated Use ExpirationDetails instead.
8170
- *
8171
- * @param timeNumber Number to convert to a date.
8172
- * @param expiresIn If the input number is the initial date, and not the expiration date, this is used to find the expiresAt time.
8173
- */
8174
- function toExpires(time, expiresIn) {
8175
- let expiresAt = util.dateFromDateOrTimeMillisecondsNumber(time);
8176
- if (expiresAt && expiresIn != null) {
8177
- expiresAt = dateFns.addMilliseconds(expiresAt, expiresIn);
8178
- }
8179
- return {
8180
- expiresAt
8181
- };
8182
- }
8183
- /**
8184
- * Checks whether or not the item has expired. If no expiration date is set, it is considered expired.
8185
- *
8186
- * @deprecated Use ExpirationDetails instead.
8187
- */
8188
- function hasExpired(expires) {
8189
- const expiresAt = getExpiration(expires);
8190
- return dateFns.isPast(expiresAt);
8191
- }
8192
- /**
8193
- * Returns the expiration date, or a date 1 minute in the past if not defined.
8194
- *
8195
- * @deprecated Use ExpirationDetails instead.
8196
- */
8197
- function getExpiration(expires) {
8198
- return expires?.expiresAt ?? dateFns.addMinutes(new Date(), -1);
8199
- }
8200
-
8201
- // TODO: Deprecate and move to @dereekb/rxjs
8202
- /**
8203
- * Creates a new Expires object at the current time on emission that will expire in the set amount of time.
8204
- *
8205
- * @param expiresIn
8206
- * @returns
8207
- */
8208
- function toExpiration(expiresIn) {
8209
- return rxjs.map(() => toExpires(new Date(), expiresIn));
8210
- }
8211
- /**
8212
- * Filters further emissions once the input is expired.
8213
- */
8214
- function skipExpired() {
8215
- return rxjs.filter(expires => !hasExpired(expires));
8216
- }
8217
- /**
8218
- * Skips the input date or timenumber until expiration occurs.
8219
- */
8220
- function skipUntilExpiration(expiresIn) {
8221
- return rxjs.filter(x => timeHasExpired(x, expiresIn));
8222
- }
8223
- /**
8224
- * Skips the input date or timenumber after expiration occurs.
8225
- */
8226
- function skipAfterExpiration(expiresIn) {
8227
- return rxjs.filter(x => !timeHasExpired(x, expiresIn));
8228
- }
8229
- /**
8230
- * Skips emissions until time since the last emission from the watch observable has elapsed.
8231
- */
8232
- function skipUntilTimeElapsedAfterLastEmission(watch, takeFor) {
8233
- return observable => {
8234
- return watch.pipe(rxjs.switchMap(() => {
8235
- const expires = toExpires(new Date(), takeFor);
8236
- return observable.pipe(rxjs.takeWhile(() => !hasExpired(expires)));
8237
- }));
8238
- };
8239
- }
8240
- /**
8241
- * Takes emissions until time since the last emission from the watch observable has elapsed.
8242
- */
8243
- function takeAfterTimeElapsedSinceLastEmission(watch, skipFor) {
8244
- return observable => {
8245
- return watch.pipe(rxjs.switchMap(() => {
8246
- const expires = toExpires(new Date(), skipFor);
8247
- return observable.pipe(rxjs.skipWhile(() => !hasExpired(expires)));
8248
- }));
8249
- };
8250
- }
8251
-
8252
5994
  function makeDateQueryForOccuringFilter(find) {
8253
5995
  const result = {};
8254
5996
  result.timezone = find.timezone;
@@ -8953,28 +6695,24 @@ class ModelRecurrenceInfoUtility {
8953
6695
  }
8954
6696
 
8955
6697
  Object.defineProperty(exports, "dateFromDateOrTimeMillisecondsNumber", {
8956
- enumerable: true,
8957
- get: function () { return util.dateFromDateOrTimeMillisecondsNumber; }
8958
- });
8959
- Object.defineProperty(exports, "dateFromDateOrTimeNumber", {
8960
- enumerable: true,
8961
- get: function () { return util.dateFromDateOrTimeNumber; }
6698
+ enumerable: true,
6699
+ get: function () { return util.dateFromDateOrTimeMillisecondsNumber; }
8962
6700
  });
8963
6701
  Object.defineProperty(exports, "unixDateTimeSecondsNumberForNow", {
8964
- enumerable: true,
8965
- get: function () { return util.unixDateTimeSecondsNumberForNow; }
6702
+ enumerable: true,
6703
+ get: function () { return util.unixDateTimeSecondsNumberForNow; }
8966
6704
  });
8967
6705
  Object.defineProperty(exports, "unixDateTimeSecondsNumberFromDate", {
8968
- enumerable: true,
8969
- get: function () { return util.unixDateTimeSecondsNumberFromDate; }
6706
+ enumerable: true,
6707
+ get: function () { return util.unixDateTimeSecondsNumberFromDate; }
8970
6708
  });
8971
6709
  Object.defineProperty(exports, "unixDateTimeSecondsNumberFromDateOrTimeNumber", {
8972
- enumerable: true,
8973
- get: function () { return util.unixDateTimeSecondsNumberFromDateOrTimeNumber; }
6710
+ enumerable: true,
6711
+ get: function () { return util.unixDateTimeSecondsNumberFromDateOrTimeNumber; }
8974
6712
  });
8975
6713
  Object.defineProperty(exports, "unixDateTimeSecondsNumberToDate", {
8976
- enumerable: true,
8977
- get: function () { return util.unixDateTimeSecondsNumberToDate; }
6714
+ enumerable: true,
6715
+ get: function () { return util.unixDateTimeSecondsNumberToDate; }
8978
6716
  });
8979
6717
  exports.AnyIterResult = AnyIterResult;
8980
6718
  exports.CalendarDate = CalendarDate;
@@ -9022,8 +6760,6 @@ exports.allIndexesInDateCellRangesToArray = allIndexesInDateCellRangesToArray;
9022
6760
  exports.allKnownTimezoneStrings = allKnownTimezoneStrings;
9023
6761
  exports.allTimezoneInfos = allTimezoneInfos;
9024
6762
  exports.allTimezoneStrings = allTimezoneStrings;
9025
- exports.anyHaveExpired = anyHaveExpired;
9026
- exports.atleastOneNotExpired = atleastOneNotExpired;
9027
6763
  exports.baseDateToTargetDate = baseDateToTargetDate;
9028
6764
  exports.calculateAllConversions = calculateAllConversions;
9029
6765
  exports.calculateExpectedDateCellTimingDuration = calculateExpectedDateCellTimingDuration;
@@ -9039,10 +6775,7 @@ exports.clampDateRangeFunction = clampDateRangeFunction;
9039
6775
  exports.clampDateRangeToDateRange = clampDateRangeToDateRange;
9040
6776
  exports.clampDateToDateRange = clampDateToDateRange;
9041
6777
  exports.copyDateCellScheduleDateFilterConfig = copyDateCellScheduleDateFilterConfig;
9042
- exports.copyHoursAndMinutesFromDate = copyHoursAndMinutesFromDate;
9043
- exports.copyHoursAndMinutesFromDateToToday = copyHoursAndMinutesFromDateToToday;
9044
6778
  exports.copyHoursAndMinutesFromDateWithTimezoneNormal = copyHoursAndMinutesFromDateWithTimezoneNormal;
9045
- exports.copyHoursAndMinutesFromNow = copyHoursAndMinutesFromNow;
9046
6779
  exports.copyHoursAndMinutesFromNowWithTimezoneNormal = copyHoursAndMinutesFromNowWithTimezoneNormal;
9047
6780
  exports.copyHoursAndMinutesFromUTCDate = copyHoursAndMinutesFromUTCDate;
9048
6781
  exports.copyHoursAndMinutesToDate = copyHoursAndMinutesToDate;
@@ -9115,7 +6848,6 @@ exports.dateRangeOverlapsDateRangeFunction = dateRangeOverlapsDateRangeFunction;
9115
6848
  exports.dateRangeRelativeState = dateRangeRelativeState;
9116
6849
  exports.dateRelativeStateForDateCellRangeComparedToIndex = dateRelativeStateForDateCellRangeComparedToIndex;
9117
6850
  exports.dateShortDateAndTimeStringFormat = dateShortDateAndTimeStringFormat;
9118
- exports.dateShortDateStringFormat = dateShortDateStringFormat;
9119
6851
  exports.dateTimeInstance = dateTimeInstance;
9120
6852
  exports.dateTimeInstanceUtc = dateTimeInstanceUtc;
9121
6853
  exports.dateTimeMinuteDecisionFunction = dateTimeMinuteDecisionFunction;
@@ -9160,7 +6892,6 @@ exports.formatToDateString = formatToDateString;
9160
6892
  exports.formatToDayRangeString = formatToDayRangeString;
9161
6893
  exports.formatToDayTimeRangeString = formatToDayTimeRangeString;
9162
6894
  exports.formatToISO8601DateString = formatToISO8601DateString;
9163
- exports.formatToISO8601DayString = formatToISO8601DayString;
9164
6895
  exports.formatToISO8601DayStringForSystem = formatToISO8601DayStringForSystem;
9165
6896
  exports.formatToISO8601DayStringForUTC = formatToISO8601DayStringForUTC;
9166
6897
  exports.formatToMonthDaySlashDate = formatToMonthDaySlashDate;
@@ -9181,7 +6912,6 @@ exports.getCurrentSystemOffsetInMs = getCurrentSystemOffsetInMs;
9181
6912
  exports.getDateCellTimingFirstEventDateRange = getDateCellTimingFirstEventDateRange;
9182
6913
  exports.getDateCellTimingHoursInEvent = getDateCellTimingHoursInEvent;
9183
6914
  exports.getDaysOfWeekInDateRange = getDaysOfWeekInDateRange;
9184
- exports.getExpiration = getExpiration;
9185
6915
  exports.getGreatestDateCellIndexInDateCellRanges = getGreatestDateCellIndexInDateCellRanges;
9186
6916
  exports.getLeastAndGreatestDateCellIndexInDateCellRanges = getLeastAndGreatestDateCellIndexInDateCellRanges;
9187
6917
  exports.getLeastDateCellIndexInDateCellRanges = getLeastDateCellIndexInDateCellRanges;
@@ -9195,7 +6925,6 @@ exports.groupDateRangesByDateRelativeState = groupDateRangesByDateRelativeState;
9195
6925
  exports.groupToDateCellRanges = groupToDateCellRanges;
9196
6926
  exports.groupUniqueDateCells = groupUniqueDateCells;
9197
6927
  exports.guessCurrentTimezone = guessCurrentTimezone;
9198
- exports.hasExpired = hasExpired;
9199
6928
  exports.hoursToMs = hoursToMs;
9200
6929
  exports.inverseDateTimezoneUtcNormalInstanceTransformType = inverseDateTimezoneUtcNormalInstanceTransformType;
9201
6930
  exports.isAfter = isAfter;
@@ -9302,10 +7031,6 @@ exports.shiftDateCellTimingToTimezone = shiftDateCellTimingToTimezone;
9302
7031
  exports.shiftDateCellTimingToTimezoneFunction = shiftDateCellTimingToTimezoneFunction;
9303
7032
  exports.shiftDateCellTimingToUTCTimezone = shiftDateCellTimingToUTCTimezone;
9304
7033
  exports.simplifyDateCellScheduleDayCodes = simplifyDateCellScheduleDayCodes;
9305
- exports.skipAfterExpiration = skipAfterExpiration;
9306
- exports.skipExpired = skipExpired;
9307
- exports.skipUntilExpiration = skipUntilExpiration;
9308
- exports.skipUntilTimeElapsedAfterLastEmission = skipUntilTimeElapsedAfterLastEmission;
9309
7034
  exports.sortByDateFunction = sortByDateFunction;
9310
7035
  exports.sortByISO8601DateStringFunction = sortByISO8601DateStringFunction;
9311
7036
  exports.sortByISO8601DateStrings = sortByISO8601DateStrings;
@@ -9321,16 +7046,10 @@ exports.systemDateTimezoneUtcNormal = systemDateTimezoneUtcNormal;
9321
7046
  exports.systemExperiencesDaylightSavings = systemExperiencesDaylightSavings;
9322
7047
  exports.systemNormalDateToBaseDate = systemNormalDateToBaseDate;
9323
7048
  exports.systemNormalDateToBaseDateOffset = systemNormalDateToBaseDateOffset;
9324
- exports.takeAfterTimeElapsedSinceLastEmission = takeAfterTimeElapsedSinceLastEmission;
9325
- exports.takeNextUpcomingTime = takeNextUpcomingTime;
9326
7049
  exports.targetDateToBaseDate = targetDateToBaseDate;
9327
- exports.timeHasExpired = timeHasExpired;
9328
7050
  exports.timezoneInfoForSystem = timezoneInfoForSystem;
9329
7051
  exports.timezoneStringToSearchableString = timezoneStringToSearchableString;
9330
7052
  exports.timezoneStringToTimezoneInfo = timezoneStringToTimezoneInfo;
9331
- exports.toExpiration = toExpiration;
9332
- exports.toExpires = toExpires;
9333
- exports.toISO8601DayString = toISO8601DayString;
9334
7053
  exports.toISO8601DayStringForSystem = toISO8601DayStringForSystem;
9335
7054
  exports.toISO8601DayStringForUTC = toISO8601DayStringForUTC;
9336
7055
  exports.toISODateString = toISODateString;