@hebcal/core 3.38.0 → 3.39.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/dist/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @hebcal/core v3.38.0 */
1
+ /*! @hebcal/core v3.39.0 */
2
2
  var hebcal = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -71,18 +71,17 @@ function _inherits(subClass, superClass) {
71
71
  }
72
72
 
73
73
  function _getPrototypeOf(o) {
74
- _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
74
+ _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
75
75
  return o.__proto__ || Object.getPrototypeOf(o);
76
76
  };
77
77
  return _getPrototypeOf(o);
78
78
  }
79
79
 
80
80
  function _setPrototypeOf(o, p) {
81
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
81
+ _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
82
82
  o.__proto__ = p;
83
83
  return o;
84
84
  };
85
-
86
85
  return _setPrototypeOf(o, p);
87
86
  }
88
87
 
@@ -217,7 +216,7 @@ var check = function (it) {
217
216
  };
218
217
 
219
218
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
220
- var global$s =
219
+ var global$a =
221
220
  // eslint-disable-next-line es-x/no-global-this -- safe
222
221
  check(typeof globalThis == 'object' && globalThis) ||
223
222
  check(typeof window == 'object' && window) ||
@@ -311,31 +310,28 @@ var classofRaw$1 = function (it) {
311
310
  return stringSlice(toString$4(it), 8, -1);
312
311
  };
313
312
 
314
- var global$r = global$s;
315
313
  var uncurryThis$d = functionUncurryThis;
316
314
  var fails$a = fails$d;
317
315
  var classof$5 = classofRaw$1;
318
316
 
319
- var Object$4 = global$r.Object;
317
+ var $Object$3 = Object;
320
318
  var split = uncurryThis$d(''.split);
321
319
 
322
320
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
323
321
  var indexedObject = fails$a(function () {
324
322
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
325
323
  // eslint-disable-next-line no-prototype-builtins -- safe
326
- return !Object$4('z').propertyIsEnumerable(0);
324
+ return !$Object$3('z').propertyIsEnumerable(0);
327
325
  }) ? function (it) {
328
- return classof$5(it) == 'String' ? split(it, '') : Object$4(it);
329
- } : Object$4;
330
-
331
- var global$q = global$s;
326
+ return classof$5(it) == 'String' ? split(it, '') : $Object$3(it);
327
+ } : $Object$3;
332
328
 
333
- var TypeError$8 = global$q.TypeError;
329
+ var $TypeError$7 = TypeError;
334
330
 
335
331
  // `RequireObjectCoercible` abstract operation
336
332
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
337
333
  var requireObjectCoercible$3 = function (it) {
338
- if (it == undefined) throw TypeError$8("Can't call method on " + it);
334
+ if (it == undefined) throw $TypeError$7("Can't call method on " + it);
339
335
  return it;
340
336
  };
341
337
 
@@ -359,7 +355,7 @@ var isObject$6 = function (it) {
359
355
  return typeof it == 'object' ? it !== null : isCallable$b(it);
360
356
  };
361
357
 
362
- var global$p = global$s;
358
+ var global$9 = global$a;
363
359
  var isCallable$a = isCallable$c;
364
360
 
365
361
  var aFunction = function (argument) {
@@ -367,7 +363,7 @@ var aFunction = function (argument) {
367
363
  };
368
364
 
369
365
  var getBuiltIn$4 = function (namespace, method) {
370
- return arguments.length < 2 ? aFunction(global$p[namespace]) : global$p[namespace] && global$p[namespace][method];
366
+ return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
371
367
  };
372
368
 
373
369
  var uncurryThis$c = functionUncurryThis;
@@ -378,11 +374,11 @@ var getBuiltIn$3 = getBuiltIn$4;
378
374
 
379
375
  var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
380
376
 
381
- var global$o = global$s;
377
+ var global$8 = global$a;
382
378
  var userAgent$2 = engineUserAgent;
383
379
 
384
- var process = global$o.process;
385
- var Deno = global$o.Deno;
380
+ var process = global$8.process;
381
+ var Deno = global$8.Deno;
386
382
  var versions = process && process.versions || Deno && Deno.version;
387
383
  var v8 = versions && versions.v8;
388
384
  var match, version$1;
@@ -429,43 +425,39 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
429
425
  && !Symbol.sham
430
426
  && typeof Symbol.iterator == 'symbol';
431
427
 
432
- var global$n = global$s;
433
428
  var getBuiltIn$2 = getBuiltIn$4;
434
429
  var isCallable$9 = isCallable$c;
435
430
  var isPrototypeOf = objectIsPrototypeOf;
436
431
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
437
432
 
438
- var Object$3 = global$n.Object;
433
+ var $Object$2 = Object;
439
434
 
440
435
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
441
436
  return typeof it == 'symbol';
442
437
  } : function (it) {
443
438
  var $Symbol = getBuiltIn$2('Symbol');
444
- return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
439
+ return isCallable$9($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
445
440
  };
446
441
 
447
- var global$m = global$s;
448
-
449
- var String$3 = global$m.String;
442
+ var $String$2 = String;
450
443
 
451
- var tryToString$2 = function (argument) {
444
+ var tryToString$3 = function (argument) {
452
445
  try {
453
- return String$3(argument);
446
+ return $String$2(argument);
454
447
  } catch (error) {
455
448
  return 'Object';
456
449
  }
457
450
  };
458
451
 
459
- var global$l = global$s;
460
452
  var isCallable$8 = isCallable$c;
461
- var tryToString$1 = tryToString$2;
453
+ var tryToString$2 = tryToString$3;
462
454
 
463
- var TypeError$7 = global$l.TypeError;
455
+ var $TypeError$6 = TypeError;
464
456
 
465
457
  // `Assert: IsCallable(argument) is true`
466
458
  var aCallable$4 = function (argument) {
467
459
  if (isCallable$8(argument)) return argument;
468
- throw TypeError$7(tryToString$1(argument) + ' is not a function');
460
+ throw $TypeError$6(tryToString$2(argument) + ' is not a function');
469
461
  };
470
462
 
471
463
  var aCallable$3 = aCallable$4;
@@ -477,12 +469,11 @@ var getMethod$3 = function (V, P) {
477
469
  return func == null ? undefined : aCallable$3(func);
478
470
  };
479
471
 
480
- var global$k = global$s;
481
472
  var call$5 = functionCall;
482
473
  var isCallable$7 = isCallable$c;
483
474
  var isObject$5 = isObject$6;
484
475
 
485
- var TypeError$6 = global$k.TypeError;
476
+ var $TypeError$5 = TypeError;
486
477
 
487
478
  // `OrdinaryToPrimitive` abstract operation
488
479
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
@@ -491,29 +482,29 @@ var ordinaryToPrimitive$1 = function (input, pref) {
491
482
  if (pref === 'string' && isCallable$7(fn = input.toString) && !isObject$5(val = call$5(fn, input))) return val;
492
483
  if (isCallable$7(fn = input.valueOf) && !isObject$5(val = call$5(fn, input))) return val;
493
484
  if (pref !== 'string' && isCallable$7(fn = input.toString) && !isObject$5(val = call$5(fn, input))) return val;
494
- throw TypeError$6("Can't convert object to primitive value");
485
+ throw $TypeError$5("Can't convert object to primitive value");
495
486
  };
496
487
 
497
488
  var shared$3 = {exports: {}};
498
489
 
499
- var global$j = global$s;
490
+ var global$7 = global$a;
500
491
 
501
492
  // eslint-disable-next-line es-x/no-object-defineproperty -- safe
502
493
  var defineProperty$1 = Object.defineProperty;
503
494
 
504
- var setGlobal$3 = function (key, value) {
495
+ var defineGlobalProperty$3 = function (key, value) {
505
496
  try {
506
- defineProperty$1(global$j, key, { value: value, configurable: true, writable: true });
497
+ defineProperty$1(global$7, key, { value: value, configurable: true, writable: true });
507
498
  } catch (error) {
508
- global$j[key] = value;
499
+ global$7[key] = value;
509
500
  } return value;
510
501
  };
511
502
 
512
- var global$i = global$s;
513
- var setGlobal$2 = setGlobal$3;
503
+ var global$6 = global$a;
504
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
514
505
 
515
506
  var SHARED = '__core-js_shared__';
516
- var store$3 = global$i[SHARED] || setGlobal$2(SHARED, {});
507
+ var store$3 = global$6[SHARED] || defineGlobalProperty$2(SHARED, {});
517
508
 
518
509
  var sharedStore = store$3;
519
510
 
@@ -522,22 +513,21 @@ var store$2 = sharedStore;
522
513
  (shared$3.exports = function (key, value) {
523
514
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
524
515
  })('versions', []).push({
525
- version: '3.22.5',
516
+ version: '3.23.1',
526
517
  mode: 'global',
527
518
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
528
- license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
519
+ license: 'https://github.com/zloirock/core-js/blob/v3.23.1/LICENSE',
529
520
  source: 'https://github.com/zloirock/core-js'
530
521
  });
531
522
 
532
- var global$h = global$s;
533
523
  var requireObjectCoercible$1 = requireObjectCoercible$3;
534
524
 
535
- var Object$2 = global$h.Object;
525
+ var $Object$1 = Object;
536
526
 
537
527
  // `ToObject` abstract operation
538
528
  // https://tc39.es/ecma262/#sec-toobject
539
529
  var toObject$3 = function (argument) {
540
- return Object$2(requireObjectCoercible$1(argument));
530
+ return $Object$1(requireObjectCoercible$1(argument));
541
531
  };
542
532
 
543
533
  var uncurryThis$b = functionUncurryThis;
@@ -562,7 +552,7 @@ var uid$2 = function (key) {
562
552
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id$1 + postfix, 36);
563
553
  };
564
554
 
565
- var global$g = global$s;
555
+ var global$5 = global$a;
566
556
  var shared$2 = shared$3.exports;
567
557
  var hasOwn$6 = hasOwnProperty_1;
568
558
  var uid$1 = uid$2;
@@ -570,7 +560,7 @@ var NATIVE_SYMBOL = nativeSymbol;
570
560
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
571
561
 
572
562
  var WellKnownSymbolsStore = shared$2('wks');
573
- var Symbol$1 = global$g.Symbol;
563
+ var Symbol$1 = global$5.Symbol;
574
564
  var symbolFor = Symbol$1 && Symbol$1['for'];
575
565
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
576
566
 
@@ -587,7 +577,6 @@ var wellKnownSymbol$8 = function (name) {
587
577
  } return WellKnownSymbolsStore[name];
588
578
  };
589
579
 
590
- var global$f = global$s;
591
580
  var call$4 = functionCall;
592
581
  var isObject$4 = isObject$6;
593
582
  var isSymbol$1 = isSymbol$2;
@@ -595,7 +584,7 @@ var getMethod$2 = getMethod$3;
595
584
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
596
585
  var wellKnownSymbol$7 = wellKnownSymbol$8;
597
586
 
598
- var TypeError$5 = global$f.TypeError;
587
+ var $TypeError$4 = TypeError;
599
588
  var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
600
589
 
601
590
  // `ToPrimitive` abstract operation
@@ -608,7 +597,7 @@ var toPrimitive$1 = function (input, pref) {
608
597
  if (pref === undefined) pref = 'default';
609
598
  result = call$4(exoticToPrim, input, pref);
610
599
  if (!isObject$4(result) || isSymbol$1(result)) return result;
611
- throw TypeError$5("Can't convert object to primitive value");
600
+ throw $TypeError$4("Can't convert object to primitive value");
612
601
  }
613
602
  if (pref === undefined) pref = 'number';
614
603
  return ordinaryToPrimitive(input, pref);
@@ -624,10 +613,10 @@ var toPropertyKey$3 = function (argument) {
624
613
  return isSymbol(key) ? key : key + '';
625
614
  };
626
615
 
627
- var global$e = global$s;
616
+ var global$4 = global$a;
628
617
  var isObject$3 = isObject$6;
629
618
 
630
- var document = global$e.document;
619
+ var document = global$4.document;
631
620
  // typeof document.createElement is 'object' in old IE
632
621
  var EXISTS$1 = isObject$3(document) && isObject$3(document.createElement);
633
622
 
@@ -685,26 +674,24 @@ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$7(function () {
685
674
  }).prototype != 42;
686
675
  });
687
676
 
688
- var global$d = global$s;
689
677
  var isObject$2 = isObject$6;
690
678
 
691
- var String$2 = global$d.String;
692
- var TypeError$4 = global$d.TypeError;
679
+ var $String$1 = String;
680
+ var $TypeError$3 = TypeError;
693
681
 
694
682
  // `Assert: Type(argument) is Object`
695
683
  var anObject$5 = function (argument) {
696
684
  if (isObject$2(argument)) return argument;
697
- throw TypeError$4(String$2(argument) + ' is not an object');
685
+ throw $TypeError$3($String$1(argument) + ' is not an object');
698
686
  };
699
687
 
700
- var global$c = global$s;
701
688
  var DESCRIPTORS$3 = descriptors;
702
689
  var IE8_DOM_DEFINE = ie8DomDefine;
703
690
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
704
691
  var anObject$4 = anObject$5;
705
692
  var toPropertyKey$1 = toPropertyKey$3;
706
693
 
707
- var TypeError$3 = global$c.TypeError;
694
+ var $TypeError$2 = TypeError;
708
695
  // eslint-disable-next-line es-x/no-object-defineproperty -- safe
709
696
  var $defineProperty = Object.defineProperty;
710
697
  // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
@@ -737,17 +724,17 @@ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defi
737
724
  if (IE8_DOM_DEFINE) try {
738
725
  return $defineProperty(O, P, Attributes);
739
726
  } catch (error) { /* empty */ }
740
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$3('Accessors not supported');
727
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$2('Accessors not supported');
741
728
  if ('value' in Attributes) O[P] = Attributes.value;
742
729
  return O;
743
730
  };
744
731
 
745
732
  var DESCRIPTORS$2 = descriptors;
746
- var definePropertyModule$2 = objectDefineProperty;
733
+ var definePropertyModule$3 = objectDefineProperty;
747
734
  var createPropertyDescriptor$1 = createPropertyDescriptor$3;
748
735
 
749
- var createNonEnumerableProperty$3 = DESCRIPTORS$2 ? function (object, key, value) {
750
- return definePropertyModule$2.f(object, key, createPropertyDescriptor$1(1, value));
736
+ var createNonEnumerableProperty$2 = DESCRIPTORS$2 ? function (object, key, value) {
737
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
751
738
  } : function (object, key, value) {
752
739
  object[key] = value;
753
740
  return object;
@@ -788,11 +775,11 @@ if (!isCallable$6(store$1.inspectSource)) {
788
775
 
789
776
  var inspectSource$3 = store$1.inspectSource;
790
777
 
791
- var global$b = global$s;
778
+ var global$3 = global$a;
792
779
  var isCallable$5 = isCallable$c;
793
780
  var inspectSource$2 = inspectSource$3;
794
781
 
795
- var WeakMap$1 = global$b.WeakMap;
782
+ var WeakMap$1 = global$3.WeakMap;
796
783
 
797
784
  var nativeWeakMap = isCallable$5(WeakMap$1) && /native code/.test(inspectSource$2(WeakMap$1));
798
785
 
@@ -808,18 +795,18 @@ var sharedKey$1 = function (key) {
808
795
  var hiddenKeys$3 = {};
809
796
 
810
797
  var NATIVE_WEAK_MAP = nativeWeakMap;
811
- var global$a = global$s;
798
+ var global$2 = global$a;
812
799
  var uncurryThis$8 = functionUncurryThis;
813
800
  var isObject$1 = isObject$6;
814
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
801
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
815
802
  var hasOwn$3 = hasOwnProperty_1;
816
803
  var shared = sharedStore;
817
804
  var sharedKey = sharedKey$1;
818
805
  var hiddenKeys$2 = hiddenKeys$3;
819
806
 
820
807
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
821
- var TypeError$2 = global$a.TypeError;
822
- var WeakMap = global$a.WeakMap;
808
+ var TypeError$1 = global$2.TypeError;
809
+ var WeakMap = global$2.WeakMap;
823
810
  var set, get, has;
824
811
 
825
812
  var enforce = function (it) {
@@ -830,7 +817,7 @@ var getterFor = function (TYPE) {
830
817
  return function (it) {
831
818
  var state;
832
819
  if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
833
- throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
820
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
834
821
  } return state;
835
822
  };
836
823
  };
@@ -841,7 +828,7 @@ if (NATIVE_WEAK_MAP || shared.state) {
841
828
  var wmhas = uncurryThis$8(store.has);
842
829
  var wmset = uncurryThis$8(store.set);
843
830
  set = function (it, metadata) {
844
- if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
831
+ if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
845
832
  metadata.facade = it;
846
833
  wmset(store, it, metadata);
847
834
  return metadata;
@@ -856,9 +843,9 @@ if (NATIVE_WEAK_MAP || shared.state) {
856
843
  var STATE = sharedKey('state');
857
844
  hiddenKeys$2[STATE] = true;
858
845
  set = function (it, metadata) {
859
- if (hasOwn$3(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
846
+ if (hasOwn$3(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
860
847
  metadata.facade = it;
861
- createNonEnumerableProperty$2(it, STATE, metadata);
848
+ createNonEnumerableProperty$1(it, STATE, metadata);
862
849
  return metadata;
863
850
  };
864
851
  get = function (it) {
@@ -908,11 +895,12 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
908
895
  if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
909
896
  defineProperty(value, 'length', { value: options.arity });
910
897
  }
911
- if (options && hasOwn$2(options, 'constructor') && options.constructor) {
912
- if (DESCRIPTORS) try {
913
- defineProperty(value, 'prototype', { writable: false });
914
- } catch (error) { /* empty */ }
915
- } else value.prototype = undefined;
898
+ try {
899
+ if (options && hasOwn$2(options, 'constructor') && options.constructor) {
900
+ if (DESCRIPTORS) defineProperty(value, 'prototype', { writable: false });
901
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
902
+ } else if (value.prototype) value.prototype = undefined;
903
+ } catch (error) { /* empty */ }
916
904
  var state = enforceInternalState(value);
917
905
  if (!hasOwn$2(state, 'source')) {
918
906
  state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
@@ -925,30 +913,30 @@ Function.prototype.toString = makeBuiltIn$1(function toString() {
925
913
  return isCallable$4(this) && getInternalState(this).source || inspectSource$1(this);
926
914
  }, 'toString');
927
915
 
928
- var global$9 = global$s;
929
916
  var isCallable$3 = isCallable$c;
930
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
917
+ var definePropertyModule$2 = objectDefineProperty;
931
918
  var makeBuiltIn = makeBuiltIn$2.exports;
932
- var setGlobal$1 = setGlobal$3;
919
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
933
920
 
934
921
  var defineBuiltIn$1 = function (O, key, value, options) {
935
- var unsafe = options ? !!options.unsafe : false;
936
- var simple = options ? !!options.enumerable : false;
937
- var noTargetGet = options ? !!options.noTargetGet : false;
938
- var name = options && options.name !== undefined ? options.name : key;
922
+ if (!options) options = {};
923
+ var simple = options.enumerable;
924
+ var name = options.name !== undefined ? options.name : key;
939
925
  if (isCallable$3(value)) makeBuiltIn(value, name, options);
940
- if (O === global$9) {
926
+ if (options.global) {
941
927
  if (simple) O[key] = value;
942
- else setGlobal$1(key, value);
943
- return O;
944
- } else if (!unsafe) {
945
- delete O[key];
946
- } else if (!noTargetGet && O[key]) {
947
- simple = true;
948
- }
949
- if (simple) O[key] = value;
950
- else createNonEnumerableProperty$1(O, key, value);
951
- return O;
928
+ else defineGlobalProperty$1(key, value);
929
+ } else {
930
+ if (!options.unsafe) delete O[key];
931
+ else if (O[key]) simple = true;
932
+ if (simple) O[key] = value;
933
+ else definePropertyModule$2.f(O, key, {
934
+ value: value,
935
+ enumerable: false,
936
+ configurable: !options.nonConfigurable,
937
+ writable: !options.nonWritable
938
+ });
939
+ } return O;
952
940
  };
953
941
 
954
942
  var objectGetOwnPropertyNames = {};
@@ -956,12 +944,22 @@ var objectGetOwnPropertyNames = {};
956
944
  var ceil = Math.ceil;
957
945
  var floor$1 = Math.floor;
958
946
 
947
+ // `Math.trunc` method
948
+ // https://tc39.es/ecma262/#sec-math.trunc
949
+ // eslint-disable-next-line es-x/no-math-trunc -- safe
950
+ var mathTrunc = Math.trunc || function trunc(x) {
951
+ var n = +x;
952
+ return (n > 0 ? floor$1 : ceil)(n);
953
+ };
954
+
955
+ var trunc = mathTrunc;
956
+
959
957
  // `ToIntegerOrInfinity` abstract operation
960
958
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
961
959
  var toIntegerOrInfinity$2 = function (argument) {
962
960
  var number = +argument;
963
- // eslint-disable-next-line no-self-compare -- safe
964
- return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
961
+ // eslint-disable-next-line no-self-compare -- NaN check
962
+ return number !== number || number === 0 ? 0 : trunc(number);
965
963
  };
966
964
 
967
965
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
@@ -1132,28 +1130,28 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
1132
1130
 
1133
1131
  var isForced_1 = isForced$1;
1134
1132
 
1135
- var global$8 = global$s;
1133
+ var global$1 = global$a;
1136
1134
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1137
- var createNonEnumerableProperty = createNonEnumerableProperty$3;
1135
+ var createNonEnumerableProperty = createNonEnumerableProperty$2;
1138
1136
  var defineBuiltIn = defineBuiltIn$1;
1139
- var setGlobal = setGlobal$3;
1137
+ var defineGlobalProperty = defineGlobalProperty$3;
1140
1138
  var copyConstructorProperties = copyConstructorProperties$1;
1141
1139
  var isForced = isForced_1;
1142
1140
 
1143
1141
  /*
1144
- options.target - name of the target object
1145
- options.global - target is the global object
1146
- options.stat - export as static methods of target
1147
- options.proto - export as prototype methods of target
1148
- options.real - real prototype method for the `pure` version
1149
- options.forced - export even if the native feature is available
1150
- options.bind - bind methods to the target, required for the `pure` version
1151
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1152
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
1153
- options.sham - add a flag to not completely full polyfills
1154
- options.enumerable - export as enumerable property
1155
- options.noTargetGet - prevent calling a getter on target
1156
- options.name - the .name of the function if it does not match the key
1142
+ options.target - name of the target object
1143
+ options.global - target is the global object
1144
+ options.stat - export as static methods of target
1145
+ options.proto - export as prototype methods of target
1146
+ options.real - real prototype method for the `pure` version
1147
+ options.forced - export even if the native feature is available
1148
+ options.bind - bind methods to the target, required for the `pure` version
1149
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1150
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
1151
+ options.sham - add a flag to not completely full polyfills
1152
+ options.enumerable - export as enumerable property
1153
+ options.dontCallGetSet - prevent calling a getter on target
1154
+ options.name - the .name of the function if it does not match the key
1157
1155
  */
1158
1156
  var _export = function (options, source) {
1159
1157
  var TARGET = options.target;
@@ -1161,15 +1159,15 @@ var _export = function (options, source) {
1161
1159
  var STATIC = options.stat;
1162
1160
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1163
1161
  if (GLOBAL) {
1164
- target = global$8;
1162
+ target = global$1;
1165
1163
  } else if (STATIC) {
1166
- target = global$8[TARGET] || setGlobal(TARGET, {});
1164
+ target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
1167
1165
  } else {
1168
- target = (global$8[TARGET] || {}).prototype;
1166
+ target = (global$1[TARGET] || {}).prototype;
1169
1167
  }
1170
1168
  if (target) for (key in source) {
1171
1169
  sourceProperty = source[key];
1172
- if (options.noTargetGet) {
1170
+ if (options.dontCallGetSet) {
1173
1171
  descriptor = getOwnPropertyDescriptor(target, key);
1174
1172
  targetProperty = descriptor && descriptor.value;
1175
1173
  } else targetProperty = target[key];
@@ -1205,14 +1203,13 @@ test$1[TO_STRING_TAG$1] = 'z';
1205
1203
 
1206
1204
  var toStringTagSupport = String(test$1) === '[object z]';
1207
1205
 
1208
- var global$7 = global$s;
1209
1206
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1210
1207
  var isCallable$1 = isCallable$c;
1211
1208
  var classofRaw = classofRaw$1;
1212
1209
  var wellKnownSymbol$5 = wellKnownSymbol$8;
1213
1210
 
1214
1211
  var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
1215
- var Object$1 = global$7.Object;
1212
+ var $Object = Object;
1216
1213
 
1217
1214
  // ES3 wrong here
1218
1215
  var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
@@ -1229,7 +1226,7 @@ var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1229
1226
  var O, tag, result;
1230
1227
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1231
1228
  // @@toStringTag case
1232
- : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
1229
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1233
1230
  // builtinTag case
1234
1231
  : CORRECT_ARGUMENTS ? classofRaw(O)
1235
1232
  // ES3 arguments fallback
@@ -1324,7 +1321,6 @@ var uncurryThis$4 = functionUncurryThis;
1324
1321
  var arraySlice$1 = uncurryThis$4([].slice);
1325
1322
 
1326
1323
  var $$4 = _export;
1327
- var global$6 = global$s;
1328
1324
  var isArray = isArray$1;
1329
1325
  var isConstructor$1 = isConstructor$2;
1330
1326
  var isObject = isObject$6;
@@ -1339,7 +1335,7 @@ var un$Slice = arraySlice$1;
1339
1335
  var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
1340
1336
 
1341
1337
  var SPECIES = wellKnownSymbol$3('species');
1342
- var Array$3 = global$6.Array;
1338
+ var $Array$2 = Array;
1343
1339
  var max$1 = Math.max;
1344
1340
 
1345
1341
  // `Array.prototype.slice` method
@@ -1356,27 +1352,31 @@ $$4({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
1356
1352
  if (isArray(O)) {
1357
1353
  Constructor = O.constructor;
1358
1354
  // cross-realm fallback
1359
- if (isConstructor$1(Constructor) && (Constructor === Array$3 || isArray(Constructor.prototype))) {
1355
+ if (isConstructor$1(Constructor) && (Constructor === $Array$2 || isArray(Constructor.prototype))) {
1360
1356
  Constructor = undefined;
1361
1357
  } else if (isObject(Constructor)) {
1362
1358
  Constructor = Constructor[SPECIES];
1363
1359
  if (Constructor === null) Constructor = undefined;
1364
1360
  }
1365
- if (Constructor === Array$3 || Constructor === undefined) {
1361
+ if (Constructor === $Array$2 || Constructor === undefined) {
1366
1362
  return un$Slice(O, k, fin);
1367
1363
  }
1368
1364
  }
1369
- result = new (Constructor === undefined ? Array$3 : Constructor)(max$1(fin - k, 0));
1365
+ result = new (Constructor === undefined ? $Array$2 : Constructor)(max$1(fin - k, 0));
1370
1366
  for (n = 0; k < fin; k++, n++) if (k in O) createProperty$2(result, n, O[k]);
1371
1367
  result.length = n;
1372
1368
  return result;
1373
1369
  }
1374
1370
  });
1375
1371
 
1376
- /**
1372
+ /*
1377
1373
  * More minimal greg routines
1378
1374
  */
1375
+
1376
+ /** @private */
1379
1377
  var lengths = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
1378
+ /** @private */
1379
+
1380
1380
  var monthLengths = [lengths, lengths.slice()];
1381
1381
  monthLengths[1][2] = 29;
1382
1382
  /**
@@ -1441,7 +1441,7 @@ function isDate(obj) {
1441
1441
 
1442
1442
  function dayOfYear(date) {
1443
1443
  if (!isDate(date)) {
1444
- throw new TypeError('Argument to greg.dayOfYear not a Date');
1444
+ throw new TypeError("Argument not a Date: ".concat(date));
1445
1445
  }
1446
1446
 
1447
1447
  var doy = date.getDate() + 31 * date.getMonth();
@@ -1466,7 +1466,7 @@ function dayOfYear(date) {
1466
1466
 
1467
1467
  function greg2abs(date) {
1468
1468
  if (!isDate(date)) {
1469
- throw new TypeError('Argument to greg.greg2abs not a Date');
1469
+ throw new TypeError("Argument not a Date: ".concat(date));
1470
1470
  }
1471
1471
 
1472
1472
  var year = date.getFullYear() - 1;
@@ -1521,7 +1521,7 @@ function toFixed(year, month, day) {
1521
1521
 
1522
1522
  function abs2greg(abs) {
1523
1523
  if (typeof abs !== 'number') {
1524
- throw new TypeError('Argument to greg.abs2greg not a Number');
1524
+ throw new TypeError("Argument not a Number: ".concat(abs));
1525
1525
  }
1526
1526
 
1527
1527
  abs = Math.trunc(abs);
@@ -1797,29 +1797,35 @@ function gematriya(number) {
1797
1797
  return str;
1798
1798
  }
1799
1799
 
1800
- var global$5 = global$s;
1800
+ var tryToString$1 = tryToString$3;
1801
+
1802
+ var $TypeError$1 = TypeError;
1803
+
1804
+ var deletePropertyOrThrow$1 = function (O, P) {
1805
+ if (!delete O[P]) throw $TypeError$1('Cannot delete property ' + tryToString$1(P) + ' of ' + tryToString$1(O));
1806
+ };
1807
+
1801
1808
  var classof$1 = classof$3;
1802
1809
 
1803
- var String$1 = global$5.String;
1810
+ var $String = String;
1804
1811
 
1805
1812
  var toString$2 = function (argument) {
1806
1813
  if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1807
- return String$1(argument);
1814
+ return $String(argument);
1808
1815
  };
1809
1816
 
1810
- var global$4 = global$s;
1811
1817
  var toAbsoluteIndex$1 = toAbsoluteIndex$4;
1812
1818
  var lengthOfArrayLike$2 = lengthOfArrayLike$5;
1813
1819
  var createProperty$1 = createProperty$3;
1814
1820
 
1815
- var Array$2 = global$4.Array;
1821
+ var $Array$1 = Array;
1816
1822
  var max = Math.max;
1817
1823
 
1818
1824
  var arraySliceSimple = function (O, start, end) {
1819
1825
  var length = lengthOfArrayLike$2(O);
1820
1826
  var k = toAbsoluteIndex$1(start, length);
1821
1827
  var fin = toAbsoluteIndex$1(end === undefined ? length : end, length);
1822
- var result = Array$2(max(fin - k, 0));
1828
+ var result = $Array$1(max(fin - k, 0));
1823
1829
  for (var n = 0; k < fin; k++, n++) createProperty$1(result, n, O[k]);
1824
1830
  result.length = n;
1825
1831
  return result;
@@ -1901,6 +1907,7 @@ var uncurryThis$3 = functionUncurryThis;
1901
1907
  var aCallable$2 = aCallable$4;
1902
1908
  var toObject$1 = toObject$3;
1903
1909
  var lengthOfArrayLike$1 = lengthOfArrayLike$5;
1910
+ var deletePropertyOrThrow = deletePropertyOrThrow$1;
1904
1911
  var toString$1 = toString$2;
1905
1912
  var fails$1 = fails$d;
1906
1913
  var internalSort = arraySort;
@@ -1995,7 +2002,7 @@ $$3({ target: 'Array', proto: true, forced: FORCED }, {
1995
2002
  index = 0;
1996
2003
 
1997
2004
  while (index < itemsLength) array[index] = items[index++];
1998
- while (index < arrayLength) delete array[index++];
2005
+ while (index < arrayLength) deletePropertyOrThrow(array, index++);
1999
2006
 
2000
2007
  return array;
2001
2008
  }
@@ -2209,7 +2216,7 @@ Locale.addLocale('s', noopLocale);
2209
2216
  Locale.addLocale('', noopLocale);
2210
2217
  Locale.useLocale('en');
2211
2218
 
2212
- /**
2219
+ /*
2213
2220
  * More minimal HDate
2214
2221
  */
2215
2222
  var NISAN$3 = 1;
@@ -2287,6 +2294,7 @@ var AVG_HEBYEAR_DAYS = 365.24682220597794;
2287
2294
  * Converts Hebrew date to R.D. (Rata Die) fixed days.
2288
2295
  * R.D. 1 is the imaginary date Monday, January 1, 1 on the Gregorian
2289
2296
  * Calendar.
2297
+ * @private
2290
2298
  * @param {number} year Hebrew year
2291
2299
  * @param {number} month Hebrew month
2292
2300
  * @param {number} day Hebrew date (1-30)
@@ -2319,25 +2327,7 @@ function hebrew2abs(year, month, day) {
2319
2327
  */
2320
2328
 
2321
2329
  function newYear(year) {
2322
- return EPOCH + elapsedDays(year) + newYearDelay(year);
2323
- }
2324
- /**
2325
- * @private
2326
- * @param {number} year
2327
- * @return {number}
2328
- */
2329
-
2330
-
2331
- function newYearDelay(year) {
2332
- var ny1 = elapsedDays(year);
2333
- var ny2 = elapsedDays(year + 1);
2334
-
2335
- if (ny2 - ny1 === 356) {
2336
- return 2;
2337
- } else {
2338
- var ny0 = elapsedDays(year - 1);
2339
- return ny1 - ny0 === 382 ? 1 : 0;
2340
- }
2330
+ return EPOCH + elapsedDays(year);
2341
2331
  }
2342
2332
  /**
2343
2333
  * Converts absolute R.D. days to Hebrew date
@@ -2376,6 +2366,7 @@ function abs2hebrew(abs) {
2376
2366
  }
2377
2367
  /**
2378
2368
  * Returns true if Hebrew year is a leap year
2369
+ * @private
2379
2370
  * @param {number} year Hebrew year
2380
2371
  * @return {boolean}
2381
2372
  */
@@ -2385,6 +2376,7 @@ function isLeapYear(year) {
2385
2376
  }
2386
2377
  /**
2387
2378
  * Number of months in this Hebrew year (either 12 or 13 depending on leap year)
2379
+ * @private
2388
2380
  * @param {number} year Hebrew year
2389
2381
  * @return {number}
2390
2382
  */
@@ -2394,6 +2386,7 @@ function monthsInYear(year) {
2394
2386
  }
2395
2387
  /**
2396
2388
  * Number of days in Hebrew month in a given year (29 or 30)
2389
+ * @private
2397
2390
  * @param {number} month Hebrew month (e.g. months.TISHREI)
2398
2391
  * @param {number} year Hebrew year
2399
2392
  * @return {number}
@@ -2418,13 +2411,14 @@ function daysInMonth(month, year) {
2418
2411
  /**
2419
2412
  * Returns a transliterated string name of Hebrew month in year,
2420
2413
  * for example 'Elul' or 'Cheshvan'.
2414
+ * @private
2421
2415
  * @param {number} month Hebrew month (e.g. months.TISHREI)
2422
2416
  * @param {number} year Hebrew year
2423
2417
  * @return {string}
2424
2418
  */
2425
2419
 
2426
2420
  function getMonthName(month, year) {
2427
- if (typeof month !== 'number' || month < 1 || month > 14) {
2421
+ if (typeof month !== 'number' || isNaN(month) || month < 1 || month > 14) {
2428
2422
  throw new TypeError("bad month argument ".concat(month));
2429
2423
  }
2430
2424
 
@@ -2433,6 +2427,7 @@ function getMonthName(month, year) {
2433
2427
  /**
2434
2428
  * Days from sunday prior to start of Hebrew calendar to mean
2435
2429
  * conjunction of Tishrei in Hebrew YEAR
2430
+ * @private
2436
2431
  * @param {number} year Hebrew year
2437
2432
  * @return {number}
2438
2433
  */
@@ -2463,7 +2458,10 @@ function elapsedDays0(year) {
2463
2458
  return altDay + (altDay % 7 === 0 || altDay % 7 === 3 || altDay % 7 === 5);
2464
2459
  }
2465
2460
  /**
2466
- * Number of days in the hebrew YEAR
2461
+ * Number of days in the hebrew YEAR.
2462
+ * A common Hebrew calendar year can have a length of 353, 354 or 355 days
2463
+ * A leap Hebrew calendar year can have a length of 383, 384 or 385 days
2464
+ * @private
2467
2465
  * @param {number} year Hebrew year
2468
2466
  * @return {number}
2469
2467
  */
@@ -2474,6 +2472,7 @@ function daysInYear(year) {
2474
2472
  }
2475
2473
  /**
2476
2474
  * true if Cheshvan is long in Hebrew year
2475
+ * @private
2477
2476
  * @param {number} year Hebrew year
2478
2477
  * @return {boolean}
2479
2478
  */
@@ -2483,6 +2482,7 @@ function longCheshvan(year) {
2483
2482
  }
2484
2483
  /**
2485
2484
  * true if Kislev is short in Hebrew year
2485
+ * @private
2486
2486
  * @param {number} year Hebrew year
2487
2487
  * @return {boolean}
2488
2488
  */
@@ -2573,19 +2573,22 @@ var HDate = /*#__PURE__*/function () {
2573
2573
  * @type {number}
2574
2574
  */
2575
2575
 
2576
- this.year = +year;
2576
+ year = parseInt(year, 10);
2577
2577
 
2578
- if (isNaN(this.year)) {
2578
+ if (isNaN(year)) {
2579
2579
  throw new TypeError("HDate called with bad year argument: ".concat(year));
2580
2580
  }
2581
2581
 
2582
+ this.year = year;
2582
2583
  this.setMonth(month); // will throw if we can't parse
2583
2584
 
2584
- this.setDate(+day);
2585
+ day = parseInt(day, 10);
2585
2586
 
2586
- if (isNaN(this.day)) {
2587
+ if (isNaN(day)) {
2587
2588
  throw new TypeError("HDate called with bad day argument: ".concat(day));
2588
2589
  }
2590
+
2591
+ this.setDate(day);
2589
2592
  } else {
2590
2593
  // 0 arguments
2591
2594
  if (typeof day === 'undefined') {
@@ -2593,7 +2596,7 @@ var HDate = /*#__PURE__*/function () {
2593
2596
  } // 1 argument
2594
2597
 
2595
2598
 
2596
- var abs0 = typeof day === 'number' && !isNaN(day) ? day : greg.isDate(day) ? greg.greg2abs(day) : HDate.isHDate(day) ? {
2599
+ var abs0 = typeof day === 'number' && !isNaN(day) ? day : isDate(day) ? greg2abs(day) : HDate.isHDate(day) ? {
2597
2600
  dd: day.day,
2598
2601
  mm: day.month,
2599
2602
  yy: day.year
@@ -2750,8 +2753,8 @@ var HDate = /*#__PURE__*/function () {
2750
2753
 
2751
2754
  }, {
2752
2755
  key: "greg",
2753
- value: function greg$1() {
2754
- return greg.abs2greg(this.abs());
2756
+ value: function greg() {
2757
+ return abs2greg(this.abs());
2755
2758
  }
2756
2759
  /**
2757
2760
  * Returns R.D. (Rata Die) fixed days.
@@ -3179,7 +3182,15 @@ var HDate = /*#__PURE__*/function () {
3179
3182
  }, {
3180
3183
  key: "monthNum",
3181
3184
  value: function monthNum(month) {
3182
- return typeof month === 'number' ? month : month.charCodeAt(0) >= 48 && month.charCodeAt(0) <= 57 ?
3185
+ if (typeof month === 'number') {
3186
+ if (isNaN(month) || month > 14) {
3187
+ throw new RangeError("Invalid month number: ".concat(month));
3188
+ }
3189
+
3190
+ return month;
3191
+ }
3192
+
3193
+ return month.charCodeAt(0) >= 48 && month.charCodeAt(0) <= 57 ?
3183
3194
  /* number */
3184
3195
  parseInt(month, 10) : HDate.monthFromName(month);
3185
3196
  }
@@ -3225,7 +3236,14 @@ var HDate = /*#__PURE__*/function () {
3225
3236
  }, {
3226
3237
  key: "monthFromName",
3227
3238
  value: function monthFromName(monthName) {
3228
- if (typeof monthName === 'number') return monthName;
3239
+ if (typeof monthName === 'number') {
3240
+ if (isNaN(monthName) || monthName < 1 || monthName > 14) {
3241
+ throw new RangeError("Invalid month name: ".concat(monthName));
3242
+ }
3243
+
3244
+ return monthName;
3245
+ }
3246
+
3229
3247
  var c = monthName.toLowerCase();
3230
3248
  /*
3231
3249
  the Hebrew months are unique to their second letter
@@ -3461,31 +3479,6 @@ function _onOrBefore(day, t, offset) {
3461
3479
  return new HDate(HDate.dayOnOrBefore(day, t.abs() + offset));
3462
3480
  }
3463
3481
 
3464
- var CHAG$1 = 0x000001;
3465
- var LIGHT_CANDLES$2 = 0x000002;
3466
- var YOM_TOV_ENDS$2 = 0x000004;
3467
- var CHUL_ONLY$2 = 0x000008; // chutz l'aretz (Diaspora)
3468
-
3469
- var IL_ONLY$2 = 0x000010; // b'aretz (Israel)
3470
-
3471
- var LIGHT_CANDLES_TZEIS$2 = 0x000020;
3472
- var CHANUKAH_CANDLES$2 = 0x000040;
3473
- var ROSH_CHODESH$1 = 0x000080;
3474
- var MINOR_FAST$2 = 0x000100;
3475
- var SPECIAL_SHABBAT$2 = 0x000200;
3476
- var PARSHA_HASHAVUA$1 = 0x000400;
3477
- var DAF_YOMI$1 = 0x000800;
3478
- var OMER_COUNT$1 = 0x001000;
3479
- var MODERN_HOLIDAY$2 = 0x002000;
3480
- var MAJOR_FAST$2 = 0x004000;
3481
- var SHABBAT_MEVARCHIM$1 = 0x008000;
3482
- var MOLAD = 0x010000;
3483
- var USER_EVENT = 0x020000;
3484
- var HEBREW_DATE = 0x040000;
3485
- var MINOR_HOLIDAY$2 = 0x080000;
3486
- var EREV$2 = 0x100000;
3487
- var CHOL_HAMOED$2 = 0x200000;
3488
- var MISHNA_YOMI = 0x400000;
3489
3482
  /**
3490
3483
  * Holiday flags for Event
3491
3484
  * @readonly
@@ -3494,73 +3487,73 @@ var MISHNA_YOMI = 0x400000;
3494
3487
 
3495
3488
  var flags = {
3496
3489
  /** Chag, yontiff, yom tov */
3497
- CHAG: CHAG$1,
3490
+ CHAG: 0x000001,
3498
3491
 
3499
3492
  /** Light candles 18 minutes before sundown */
3500
- LIGHT_CANDLES: LIGHT_CANDLES$2,
3493
+ LIGHT_CANDLES: 0x000002,
3501
3494
 
3502
3495
  /** End of holiday (end of Yom Tov) */
3503
- YOM_TOV_ENDS: YOM_TOV_ENDS$2,
3496
+ YOM_TOV_ENDS: 0x000004,
3504
3497
 
3505
3498
  /** Observed only in the Diaspora (chutz l'aretz) */
3506
- CHUL_ONLY: CHUL_ONLY$2,
3499
+ CHUL_ONLY: 0x000008,
3507
3500
 
3508
3501
  /** Observed only in Israel */
3509
- IL_ONLY: IL_ONLY$2,
3502
+ IL_ONLY: 0x000010,
3510
3503
 
3511
3504
  /** Light candles in the evening at Tzeit time (3 small stars) */
3512
- LIGHT_CANDLES_TZEIS: LIGHT_CANDLES_TZEIS$2,
3505
+ LIGHT_CANDLES_TZEIS: 0x000020,
3513
3506
 
3514
3507
  /** Candle-lighting for Chanukah */
3515
- CHANUKAH_CANDLES: CHANUKAH_CANDLES$2,
3508
+ CHANUKAH_CANDLES: 0x000040,
3516
3509
 
3517
3510
  /** Rosh Chodesh, beginning of a new Hebrew month */
3518
- ROSH_CHODESH: ROSH_CHODESH$1,
3511
+ ROSH_CHODESH: 0x000080,
3519
3512
 
3520
3513
  /** Minor fasts like Tzom Tammuz, Ta'anit Esther, ... */
3521
- MINOR_FAST: MINOR_FAST$2,
3514
+ MINOR_FAST: 0x000100,
3522
3515
 
3523
3516
  /** Shabbat Shekalim, Zachor, ... */
3524
- SPECIAL_SHABBAT: SPECIAL_SHABBAT$2,
3517
+ SPECIAL_SHABBAT: 0x000200,
3525
3518
 
3526
3519
  /** Weekly sedrot on Saturdays */
3527
- PARSHA_HASHAVUA: PARSHA_HASHAVUA$1,
3520
+ PARSHA_HASHAVUA: 0x000400,
3528
3521
 
3529
3522
  /** Daily page of Talmud */
3530
- DAF_YOMI: DAF_YOMI$1,
3523
+ DAF_YOMI: 0x000800,
3531
3524
 
3532
3525
  /** Days of the Omer */
3533
- OMER_COUNT: OMER_COUNT$1,
3526
+ OMER_COUNT: 0x001000,
3534
3527
 
3535
3528
  /** Yom HaShoah, Yom HaAtzma'ut, ... */
3536
- MODERN_HOLIDAY: MODERN_HOLIDAY$2,
3529
+ MODERN_HOLIDAY: 0x002000,
3537
3530
 
3538
3531
  /** Yom Kippur and Tish'a B'Av */
3539
- MAJOR_FAST: MAJOR_FAST$2,
3532
+ MAJOR_FAST: 0x004000,
3540
3533
 
3541
3534
  /** On the Saturday before Rosh Chodesh */
3542
- SHABBAT_MEVARCHIM: SHABBAT_MEVARCHIM$1,
3535
+ SHABBAT_MEVARCHIM: 0x008000,
3543
3536
 
3544
3537
  /** Molad */
3545
- MOLAD: MOLAD,
3538
+ MOLAD: 0x010000,
3546
3539
 
3547
3540
  /** Yahrzeit or Hebrew Anniversary */
3548
- USER_EVENT: USER_EVENT,
3541
+ USER_EVENT: 0x020000,
3549
3542
 
3550
3543
  /** Daily Hebrew date ("11th of Sivan, 5780") */
3551
- HEBREW_DATE: HEBREW_DATE,
3544
+ HEBREW_DATE: 0x040000,
3552
3545
 
3553
3546
  /** A holiday that's not major, modern, rosh chodesh, or a fast day */
3554
- MINOR_HOLIDAY: MINOR_HOLIDAY$2,
3547
+ MINOR_HOLIDAY: 0x080000,
3555
3548
 
3556
3549
  /** Evening before a major or minor holiday */
3557
- EREV: EREV$2,
3550
+ EREV: 0x100000,
3558
3551
 
3559
3552
  /** Chol haMoed, intermediate days of Pesach or Sukkot */
3560
- CHOL_HAMOED: CHOL_HAMOED$2,
3553
+ CHOL_HAMOED: 0x200000,
3561
3554
 
3562
3555
  /** Mishna Yomi */
3563
- MISHNA_YOMI: MISHNA_YOMI
3556
+ MISHNA_YOMI: 0x400000
3564
3557
  };
3565
3558
  /** Represents an Event with a title, date, and flags */
3566
3559
 
@@ -3694,7 +3687,7 @@ var Event = /*#__PURE__*/function () {
3694
3687
  }, {
3695
3688
  key: "observedInIsrael",
3696
3689
  value: function observedInIsrael() {
3697
- return !(this.mask & CHUL_ONLY$2);
3690
+ return !(this.mask & flags.CHUL_ONLY);
3698
3691
  }
3699
3692
  /**
3700
3693
  * Is this event observed in the Diaspora?
@@ -3709,7 +3702,25 @@ var Event = /*#__PURE__*/function () {
3709
3702
  }, {
3710
3703
  key: "observedInDiaspora",
3711
3704
  value: function observedInDiaspora() {
3712
- return !(this.mask & IL_ONLY$2);
3705
+ return !(this.mask & flags.IL_ONLY);
3706
+ }
3707
+ /**
3708
+ * Is this event observed in Israel/Diaspora?
3709
+ * @example
3710
+ * const ev1 = new Event(new HDate(7, 'Sivan', 5749), 'Shavuot II', flags.CHAG | flags.CHUL_ONLY);
3711
+ * ev1.observedIn(false); // true
3712
+ * ev1.observedIn(true); // false
3713
+ * const ev2 = new Event(new HDate(26, 'Kislev', 5749), 'Chanukah: 3 Candles', 0);
3714
+ * ev2.observedIn(false); // true
3715
+ * ev2.observedIn(true); // true
3716
+ * @param {boolean} il
3717
+ * @return {boolean}
3718
+ */
3719
+
3720
+ }, {
3721
+ key: "observedIn",
3722
+ value: function observedIn(il) {
3723
+ return il ? this.observedInIsrael() : this.observedInDiaspora();
3713
3724
  }
3714
3725
  /**
3715
3726
  * @deprecated
@@ -4314,7 +4325,7 @@ var Zmanim = /*#__PURE__*/function () {
4314
4325
  throw new RangeError("Longitude ".concat(longitude, " out of range [-180,180]"));
4315
4326
  }
4316
4327
 
4317
- var dt = greg.isDate(date) ? date : HDate.isHDate(date) ? date.greg() : throwTypeError$2("invalid date: ".concat(date));
4328
+ var dt = isDate(date) ? date : HDate.isHDate(date) ? date.greg() : throwTypeError$2("invalid date: ".concat(date));
4318
4329
  this.date = dt;
4319
4330
  this.solarCalc = new SolarCalc(this.date, latitude, longitude);
4320
4331
  this.sun = this.solarCalc.sun;
@@ -5563,11 +5574,10 @@ var MoladEvent = /*#__PURE__*/function (_Event) {
5563
5574
  }(Event);
5564
5575
 
5565
5576
  var $$2 = _export;
5566
- var global$3 = global$s;
5567
5577
  var uncurryThis$2 = functionUncurryThis;
5568
5578
  var toAbsoluteIndex = toAbsoluteIndex$4;
5569
5579
 
5570
- var RangeError$1 = global$3.RangeError;
5580
+ var $RangeError = RangeError;
5571
5581
  var fromCharCode = String.fromCharCode;
5572
5582
  // eslint-disable-next-line es-x/no-string-fromcodepoint -- required for testing
5573
5583
  var $fromCodePoint = String.fromCodePoint;
@@ -5587,7 +5597,7 @@ $$2({ target: 'String', stat: true, arity: 1, forced: INCORRECT_LENGTH }, {
5587
5597
  var code;
5588
5598
  while (length > i) {
5589
5599
  code = +arguments[i++];
5590
- if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError$1(code + ' is not a valid code point');
5600
+ if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw $RangeError(code + ' is not a valid code point');
5591
5601
  elements[i] = code < 0x10000
5592
5602
  ? fromCharCode(code)
5593
5603
  : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00);
@@ -5900,8 +5910,8 @@ function getTodayIsHe(omer) {
5900
5910
  }
5901
5911
 
5902
5912
  var osdate = new Date(1923, 8, 11);
5903
- var osday = greg.greg2abs(osdate);
5904
- var nsday = greg.greg2abs(new Date(1975, 5, 24));
5913
+ var osday = greg2abs(osdate);
5914
+ var nsday = greg2abs(new Date(1975, 5, 24));
5905
5915
  var shas = [['Berachot', 64], ['Shabbat', 157], ['Eruvin', 105], ['Pesachim', 121], ['Shekalim', 22], ['Yoma', 88], ['Sukkah', 56], ['Beitzah', 40], ['Rosh Hashana', 35], ['Taanit', 31], ['Megillah', 32], ['Moed Katan', 29], ['Chagigah', 27], ['Yevamot', 122], ['Ketubot', 112], ['Nedarim', 91], ['Nazir', 66], ['Sotah', 49], ['Gitin', 90], ['Kiddushin', 82], ['Baba Kamma', 119], ['Baba Metzia', 119], ['Baba Batra', 176], ['Sanhedrin', 113], ['Makkot', 24], ['Shevuot', 49], ['Avodah Zarah', 76], ['Horayot', 14], ['Zevachim', 120], ['Menachot', 110], ['Chullin', 142], ['Bechorot', 61], ['Arachin', 34], ['Temurah', 34], ['Keritot', 28], ['Meilah', 22], ['Kinnim', 4], ['Tamid', 9], ['Midot', 5], ['Niddah', 73]].map(function (m) {
5906
5916
  return {
5907
5917
  name: m[0],
@@ -5925,7 +5935,7 @@ var DafYomi = /*#__PURE__*/function () {
5925
5935
  function DafYomi(gregdate) {
5926
5936
  _classCallCheck(this, DafYomi);
5927
5937
 
5928
- var cday = typeof gregdate === 'number' && !isNaN(gregdate) ? gregdate : greg.isDate(gregdate) ? greg.greg2abs(gregdate) : HDate.isHDate(gregdate) ? gregdate.abs() : throwTypeError$1("non-date given to dafyomi: ".concat(gregdate));
5938
+ var cday = typeof gregdate === 'number' && !isNaN(gregdate) ? gregdate : isDate(gregdate) ? greg2abs(gregdate) : HDate.isHDate(gregdate) ? gregdate.abs() : throwTypeError$1("non-date given to dafyomi: ".concat(gregdate));
5929
5939
 
5930
5940
  if (cday < osday) {
5931
5941
  throw new RangeError("Date ".concat(gregdate, " too early; Daf Yomi cycle began on ").concat(osdate));
@@ -6180,22 +6190,20 @@ var getIteratorMethod$2 = function (it) {
6180
6190
  || Iterators[classof(it)];
6181
6191
  };
6182
6192
 
6183
- var global$2 = global$s;
6184
6193
  var call$1 = functionCall;
6185
6194
  var aCallable = aCallable$4;
6186
6195
  var anObject = anObject$5;
6187
- var tryToString = tryToString$2;
6196
+ var tryToString = tryToString$3;
6188
6197
  var getIteratorMethod$1 = getIteratorMethod$2;
6189
6198
 
6190
- var TypeError$1 = global$2.TypeError;
6199
+ var $TypeError = TypeError;
6191
6200
 
6192
6201
  var getIterator$1 = function (argument, usingIterator) {
6193
6202
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
6194
6203
  if (aCallable(iteratorMethod)) return anObject(call$1(iteratorMethod, argument));
6195
- throw TypeError$1(tryToString(argument) + ' is not iterable');
6204
+ throw $TypeError(tryToString(argument) + ' is not iterable');
6196
6205
  };
6197
6206
 
6198
- var global$1 = global$s;
6199
6207
  var bind = functionBindContext;
6200
6208
  var call = functionCall;
6201
6209
  var toObject = toObject$3;
@@ -6207,7 +6215,7 @@ var createProperty = createProperty$3;
6207
6215
  var getIterator = getIterator$1;
6208
6216
  var getIteratorMethod = getIteratorMethod$2;
6209
6217
 
6210
- var Array$1 = global$1.Array;
6218
+ var $Array = Array;
6211
6219
 
6212
6220
  // `Array.from` method implementation
6213
6221
  // https://tc39.es/ecma262/#sec-array.from
@@ -6222,7 +6230,7 @@ var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefi
6222
6230
  var index = 0;
6223
6231
  var length, result, step, iterator, next, value;
6224
6232
  // if the target is not iterable or it's an array with the default iterator - use a simple case
6225
- if (iteratorMethod && !(this == Array$1 && isArrayIteratorMethod(iteratorMethod))) {
6233
+ if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) {
6226
6234
  iterator = getIterator(O, iteratorMethod);
6227
6235
  next = iterator.next;
6228
6236
  result = IS_CONSTRUCTOR ? new this() : [];
@@ -6232,7 +6240,7 @@ var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefi
6232
6240
  }
6233
6241
  } else {
6234
6242
  length = lengthOfArrayLike(O);
6235
- result = IS_CONSTRUCTOR ? new this(length) : Array$1(length);
6243
+ result = IS_CONSTRUCTOR ? new this(length) : $Array(length);
6236
6244
  for (;length > index; index++) {
6237
6245
  value = mapping ? mapfn(O[index], index) : O[index];
6238
6246
  createProperty(result, index, value);
@@ -7477,7 +7485,7 @@ function getHolidaysForYear_(year) {
7477
7485
  var mishnayot = [{k:"Berakhot",v:[5,8,6,7,5,8,5,8,5]},{k:"Peah",v:[6,8,8,11,8,11,8,9]},{k:"Demai",v:[4,5,6,7,11,12,8]},{k:"Kilayim",v:[9,11,7,9,8,9,8,6,10]},{k:"Sheviit",v:[8,10,10,10,9,6,7,11,9,9]},{k:"Terumot",v:[10,6,9,13,9,6,7,12,7,12,10]},{k:"Maasrot",v:[8,8,10,6,8]},{k:"Maaser Sheni",v:[7,10,13,12,15]},{k:"Challah",v:[9,8,10,11]},{k:"Orlah",v:[9,17,9]},{k:"Bikkurim",v:[11,11,12,5]},{k:"Shabbat",v:[11,7,6,2,4,10,4,7,7,6,6,6,7,4,3,8,8,3,6,5,3,6,5,5]},{k:"Eruvin",v:[10,6,9,11,9,10,11,11,4,15]},{k:"Pesachim",v:[7,8,8,9,10,6,13,8,11,9]},{k:"Shekalim",v:[7,5,4,9,6,6,7,8]},{k:"Yoma",v:[8,7,11,6,7,8,5,9]},{k:"Sukkah",v:[11,9,15,10,8]},{k:"Beitzah",v:[10,10,8,7,7]},{k:"Rosh Hashanah",v:[9,9,8,9]},{k:"Taanit",v:[7,10,9,8]},{k:"Megillah",v:[11,6,6,10]},{k:"Moed Katan",v:[10,5,9]},{k:"Chagigah",v:[8,7,8]},{k:"Yevamot",v:[4,10,10,13,6,6,6,6,6,9,7,6,13,9,10,7]},{k:"Ketubot",v:[10,10,9,12,9,7,10,8,9,6,6,4,11]},{k:"Nedarim",v:[4,5,11,8,6,10,9,7,10,8,12]},{k:"Nazir",v:[7,10,7,7,7,11,4,2,5]},{k:"Sotah",v:[9,6,8,5,5,4,8,7,15]},{k:"Gittin",v:[6,7,8,9,9,7,9,10,10]},{k:"Kiddushin",v:[10,10,13,14]},{k:"Bava Kamma",v:[4,6,11,9,7,6,7,7,12,10]},{k:"Bava Metzia",v:[8,11,12,12,11,8,11,9,13,6]},{k:"Bava Batra",v:[6,14,8,9,11,8,4,8,10,8]},{k:"Sanhedrin",v:[6,5,8,5,5,6,11,7,6,6,6]},{k:"Makkot",v:[10,8,16]},{k:"Shevuot",v:[7,5,11,13,5,7,8,6]},{k:"Eduyot",v:[14,10,12,12,7,3,9,7]},{k:"Avodah Zarah",v:[9,7,10,12,12]},{k:"Avot",v:[18,16,18,22,23,11]},{k:"Horayot",v:[5,7,8]},{k:"Zevachim",v:[4,5,6,6,8,7,6,12,7,8,8,6,8,10]},{k:"Menachot",v:[4,5,7,5,9,7,6,7,9,9,9,5,11]},{k:"Chullin",v:[7,10,7,7,5,7,6,6,8,4,2,5]},{k:"Bekhorot",v:[7,9,4,10,6,12,7,10,8]},{k:"Arakhin",v:[4,6,5,4,6,5,5,7,8]},{k:"Temurah",v:[6,3,5,4,6,5,6]},{k:"Keritot",v:[7,6,10,3,8,9]},{k:"Meilah",v:[4,9,8,6,5,6]},{k:"Tamid",v:[4,5,9,3,6,3,4]},{k:"Middot",v:[9,6,8,7,4]},{k:"Kinnim",v:[4,5,6]},{k:"Kelim",v:[9,8,8,4,11,4,6,11,8,8,9,8,8,8,6,8,17,9,10,7,3,10,5,17,9,9,12,10,8,4]},{k:"Oholot",v:[8,7,7,3,7,7,6,6,16,7,9,8,6,7,10,5,5,10]},{k:"Negaim",v:[6,5,8,11,5,8,5,10,3,10,12,7,12,13]},{k:"Parah",v:[4,5,11,4,9,5,12,11,9,6,9,11]},{k:"Tahorot",v:[9,8,8,13,9,10,9,9,9,8]},{k:"Mikvaot",v:[8,10,4,5,6,11,7,5,7,8]},{k:"Niddah",v:[7,7,7,7,9,14,5,4,11,8]},{k:"Makhshirin",v:[6,11,8,10,11,8]},{k:"Zavim",v:[6,4,3,7,12]},{k:"Tevul Yom",v:[5,8,6,7]},{k:"Yadayim",v:[5,4,5,8]},{k:"Oktzin",v:[6,10,12]}];
7478
7486
 
7479
7487
  var cycleStartDate = new Date(1947, 4, 20);
7480
- var mishnaYomiStart = greg.greg2abs(cycleStartDate);
7488
+ var mishnaYomiStart = greg2abs(cycleStartDate);
7481
7489
  var numMishnayot = 4192;
7482
7490
  var numDays = numMishnayot / 2;
7483
7491
  /**
@@ -7553,7 +7561,7 @@ var MishnaYomiIndex = /*#__PURE__*/function () {
7553
7561
  _createClass(MishnaYomiIndex, [{
7554
7562
  key: "lookup",
7555
7563
  value: function lookup(date) {
7556
- var abs = typeof date === 'number' && !isNaN(date) ? date : greg.isDate(date) ? greg.greg2abs(date) : HDate.isHDate(date) ? date.abs() : throwTypeError("Invalid date: ".concat(date));
7564
+ var abs = typeof date === 'number' && !isNaN(date) ? date : isDate(date) ? greg2abs(date) : HDate.isHDate(date) ? date.abs() : throwTypeError("Invalid date: ".concat(date));
7557
7565
 
7558
7566
  if (abs < mishnaYomiStart) {
7559
7567
  var s = date.toISOString().substring(0, 10);
@@ -7754,7 +7762,7 @@ function getBirthdayOrAnniversary_(hyear, gdate) {
7754
7762
  return new HDate(day, month, hyear);
7755
7763
  }
7756
7764
 
7757
- var version="3.38.0";
7765
+ var version="3.39.0";
7758
7766
 
7759
7767
  var headers$1={"plural-forms":"nplurals=2; plural=(n > 1);",language:"en_CA@ashkenazi"};var contexts$1={"":{Berachot:["Berachos"],Shabbat:["Shabbos"],Taanit:["Taanis"],Yevamot:["Yevamos"],Ketubot:["Kesubos"],"Baba Batra":["Baba Basra"],Makkot:["Makkos"],Shevuot:["Shevuos"],Horayot:["Horayos"],Menachot:["Menachos"],Bechorot:["Bechoros"],Keritot:["Kerisos"],Midot:["Midos"],"Achrei Mot":["Achrei Mos"],Bechukotai:["Bechukosai"],"Beha'alotcha":["Beha'aloscha"],Bereshit:["Bereshis"],Chukat:["Chukas"],"Erev Shavuot":["Erev Shavuos"],"Erev Sukkot":["Erev Sukkos"],"Ki Tavo":["Ki Savo"],"Ki Teitzei":["Ki Seitzei"],"Ki Tisa":["Ki Sisa"],Matot:["Matos"],"Purim Katan":["Purim Koton"],Tazria:["Sazria"],"Shabbat Chazon":["Shabbos Chazon"],"Shabbat HaChodesh":["Shabbos HaChodesh"],"Shabbat HaGadol":["Shabbos HaGadol"],"Shabbat Nachamu":["Shabbos Nachamu"],"Shabbat Parah":["Shabbos Parah"],"Shabbat Shekalim":["Shabbos Shekalim"],"Shabbat Shuva":["Shabbos Shuvah"],"Shabbat Zachor":["Shabbos Zachor"],Shavuot:["Shavuos"],"Shavuot I":["Shavuos I"],"Shavuot II":["Shavuos II"],Shemot:["Shemos"],"Shmini Atzeret":["Shmini Atzeres"],"Simchat Torah":["Simchas Torah"],Sukkot:["Sukkos"],"Sukkot I":["Sukkos I"],"Sukkot II":["Sukkos II"],"Sukkot II (CH''M)":["Sukkos II (CH''M)"],"Sukkot III (CH''M)":["Sukkos III (CH''M)"],"Sukkot IV (CH''M)":["Sukkos IV (CH''M)"],"Sukkot V (CH''M)":["Sukkos V (CH''M)"],"Sukkot VI (CH''M)":["Sukkos VI (CH''M)"],"Sukkot VII (Hoshana Raba)":["Sukkos VII (Hoshana Raba)"],"Ta'anit Bechorot":["Ta'anis Bechoros"],"Ta'anit Esther":["Ta'anis Esther"],Toldot:["Toldos"],Vaetchanan:["Vaeschanan"],Yitro:["Yisro"],"Vezot Haberakhah":["Vezos Haberakhah"],Parashat:["Parshas"],"Leil Selichot":["Leil Selichos"],"Shabbat Mevarchim Chodesh":["Shabbos Mevorchim Chodesh"],"Shabbat Shirah":["Shabbos Shirah"],Tevet:["Teves"],"Asara B'Tevet":["Asara B'Teves"],Berakhot:["Berakhos"],Sheviit:["Sheviis"],Terumot:["Terumos"],Maasrot:["Maasros"],Eduyot:["Eduyos"],Avot:["Avos"],Bekhorot:["Bekhoros"],Middot:["Middos"],Oholot:["Oholos"],Tahorot:["Tahoros"],Mikvaot:["Mikvaos"]}};var poAshkenazi = {headers:headers$1,contexts:contexts$1};
7760
7768
 
@@ -7957,7 +7965,7 @@ function checkCandleOptions(options) {
7957
7965
 
7958
7966
  function getAbs(d) {
7959
7967
  if (typeof d == 'number') return d;
7960
- if (greg.isDate(d)) return greg.greg2abs(d);
7968
+ if (isDate(d)) return greg2abs(d);
7961
7969
  if (HDate.isHDate(d)) return d.abs();
7962
7970
  throw new TypeError("Invalid date type: ".concat(d));
7963
7971
  }
@@ -8019,12 +8027,12 @@ function getStartAndEnd(options) {
8019
8027
  startGreg.setFullYear(theYear);
8020
8028
  }
8021
8029
 
8022
- var _startAbs = greg.greg2abs(startGreg);
8030
+ var _startAbs = greg2abs(startGreg);
8023
8031
 
8024
8032
  var _endAbs;
8025
8033
 
8026
8034
  if (options.month) {
8027
- _endAbs = _startAbs + greg.daysInMonth(theMonth, theYear) - 1;
8035
+ _endAbs = _startAbs + daysInMonth$1(theMonth, theYear) - 1;
8028
8036
  } else {
8029
8037
  var endYear = theYear + numYears;
8030
8038
  var endGreg = new Date(endYear, 0, 1);
@@ -8033,7 +8041,7 @@ function getStartAndEnd(options) {
8033
8041
  endGreg.setFullYear(endYear);
8034
8042
  }
8035
8043
 
8036
- _endAbs = greg.greg2abs(endGreg) - 1;
8044
+ _endAbs = greg2abs(endGreg) - 1;
8037
8045
  }
8038
8046
 
8039
8047
  return [_startAbs, _endAbs];
@@ -8306,7 +8314,7 @@ var HebrewCalendar = /*#__PURE__*/function () {
8306
8314
  warnUnrecognizedOptions(options);
8307
8315
  var startAbs = startAndEnd[0];
8308
8316
  var endAbs = startAndEnd[1];
8309
- var startGreg = greg.abs2greg(startAbs);
8317
+ var startGreg = abs2greg(startAbs);
8310
8318
 
8311
8319
  if (startGreg.getFullYear() < 100) {
8312
8320
  options.candlelighting = false;
@@ -8324,7 +8332,7 @@ var HebrewCalendar = /*#__PURE__*/function () {
8324
8332
 
8325
8333
  if (hyear != currentYear) {
8326
8334
  currentYear = hyear;
8327
- holidaysYear = HebrewCalendar.getHolidaysForYear(currentYear);
8335
+ holidaysYear = getHolidaysForYear_(currentYear);
8328
8336
 
8329
8337
  if (options.sedrot && currentYear >= 3762) {
8330
8338
  sedra = getSedra_(currentYear, il);
@@ -8622,14 +8630,26 @@ var HebrewCalendar = /*#__PURE__*/function () {
8622
8630
  */
8623
8631
 
8624
8632
  function appendHolidayAndRelated(events, ev, options, candlesEv, dow) {
8625
- var eFlags = ev.getFlags();
8626
8633
  var il = options.il;
8627
- var observed = il && ev.observedInIsrael() || !il && ev.observedInDiaspora();
8628
- var mask = options.mask;
8629
8634
 
8630
- if (observed && (eFlags & mask || !eFlags && !options.userMask)) {
8631
- var location = options.location;
8635
+ if (!ev.observedIn(il)) {
8636
+ return candlesEv; // holiday isn't observed here; bail out early
8637
+ }
8638
+
8639
+ var eFlags = ev.getFlags();
8640
+ var location = options.location;
8641
+ var isMajorFast = Boolean(eFlags & MAJOR_FAST);
8642
+ var isMinorFast = Boolean(eFlags & MINOR_FAST);
8632
8643
 
8644
+ if (options.candlelighting && (isMajorFast || isMinorFast)) {
8645
+ ev = makeFastStartEnd(ev, location);
8646
+
8647
+ if (ev.startEvent && (isMajorFast || isMinorFast && !options.noMinorFast)) {
8648
+ events.push(ev.startEvent);
8649
+ }
8650
+ }
8651
+
8652
+ if (eFlags & options.mask || !eFlags && !options.userMask) {
8633
8653
  if (options.candlelighting && eFlags & MASK_LIGHT_CANDLES) {
8634
8654
  var hd = ev.getDate();
8635
8655
  candlesEv = makeCandleEvent(ev, hd, dow, location, options);
@@ -8651,22 +8671,14 @@ function appendHolidayAndRelated(events, ev, options, candlesEv, dow) {
8651
8671
  }
8652
8672
 
8653
8673
  if (!options.noHolidays) {
8654
- if (options.candlelighting && eFlags & (MINOR_FAST | MAJOR_FAST)) {
8655
- ev = makeFastStartEnd(ev, location);
8656
- }
8657
-
8658
- if (ev.startEvent) {
8659
- events.push(ev.startEvent);
8660
- }
8661
-
8662
8674
  events.push(ev); // the original event itself
8663
-
8664
- if (ev.endEvent) {
8665
- events.push(ev.endEvent);
8666
- }
8667
8675
  }
8668
8676
  }
8669
8677
 
8678
+ if (ev.endEvent && (isMajorFast || isMinorFast && !options.noMinorFast)) {
8679
+ events.push(ev.endEvent);
8680
+ }
8681
+
8670
8682
  return candlesEv;
8671
8683
  }
8672
8684