sanity-plugin-recurring-dates 1.0.2 → 1.1.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/index.esm.js CHANGED
@@ -21,7 +21,6 @@ const DEFAULT_COUNTS = [5,
21
21
  30
22
22
  // daily
23
23
  ];
24
-
25
24
  const validateRRuleString = recurrence => {
26
25
  try {
27
26
  rrulestr(recurrence);
@@ -162,20 +161,23 @@ var moment$1 = {
162
161
  };
163
162
  }
164
163
  function isValid(m) {
165
- if (m._isValid == null) {
166
- var flags = getParsingFlags(m),
167
- parsedParts = some.call(flags.parsedDateParts, function (i) {
168
- return i != null;
169
- }),
170
- isNowValid = !isNaN(m._d.getTime()) && flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
164
+ var flags = null,
165
+ parsedParts = false,
166
+ isNowValid = m._d && !isNaN(m._d.getTime());
167
+ if (isNowValid) {
168
+ flags = getParsingFlags(m);
169
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
170
+ return i != null;
171
+ });
172
+ isNowValid = flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
171
173
  if (m._strict) {
172
174
  isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;
173
175
  }
174
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
175
- m._isValid = isNowValid;
176
- } else {
177
- return isNowValid;
178
- }
176
+ }
177
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
178
+ m._isValid = isNowValid;
179
+ } else {
180
+ return isNowValid;
179
181
  }
180
182
  return m._isValid;
181
183
  }
@@ -527,11 +529,56 @@ var moment$1 = {
527
529
  var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
528
530
  return isFunction(format) ? format(output) : format.replace(/%s/i, output);
529
531
  }
530
- var aliases = {};
531
- function addUnitAlias(unit, shorthand) {
532
- var lowerCase = unit.toLowerCase();
533
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
534
- }
532
+ var aliases = {
533
+ D: 'date',
534
+ dates: 'date',
535
+ date: 'date',
536
+ d: 'day',
537
+ days: 'day',
538
+ day: 'day',
539
+ e: 'weekday',
540
+ weekdays: 'weekday',
541
+ weekday: 'weekday',
542
+ E: 'isoWeekday',
543
+ isoweekdays: 'isoWeekday',
544
+ isoweekday: 'isoWeekday',
545
+ DDD: 'dayOfYear',
546
+ dayofyears: 'dayOfYear',
547
+ dayofyear: 'dayOfYear',
548
+ h: 'hour',
549
+ hours: 'hour',
550
+ hour: 'hour',
551
+ ms: 'millisecond',
552
+ milliseconds: 'millisecond',
553
+ millisecond: 'millisecond',
554
+ m: 'minute',
555
+ minutes: 'minute',
556
+ minute: 'minute',
557
+ M: 'month',
558
+ months: 'month',
559
+ month: 'month',
560
+ Q: 'quarter',
561
+ quarters: 'quarter',
562
+ quarter: 'quarter',
563
+ s: 'second',
564
+ seconds: 'second',
565
+ second: 'second',
566
+ gg: 'weekYear',
567
+ weekyears: 'weekYear',
568
+ weekyear: 'weekYear',
569
+ GG: 'isoWeekYear',
570
+ isoweekyears: 'isoWeekYear',
571
+ isoweekyear: 'isoWeekYear',
572
+ w: 'week',
573
+ weeks: 'week',
574
+ week: 'week',
575
+ W: 'isoWeek',
576
+ isoweeks: 'isoWeek',
577
+ isoweek: 'isoWeek',
578
+ y: 'year',
579
+ years: 'year',
580
+ year: 'year'
581
+ };
535
582
  function normalizeUnits(units) {
536
583
  return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
537
584
  }
@@ -549,10 +596,24 @@ var moment$1 = {
549
596
  }
550
597
  return normalizedInput;
551
598
  }
552
- var priorities = {};
553
- function addUnitPriority(unit, priority) {
554
- priorities[unit] = priority;
555
- }
599
+ var priorities = {
600
+ date: 9,
601
+ day: 11,
602
+ weekday: 11,
603
+ isoWeekday: 11,
604
+ dayOfYear: 4,
605
+ hour: 13,
606
+ millisecond: 16,
607
+ minute: 14,
608
+ month: 8,
609
+ quarter: 7,
610
+ second: 15,
611
+ weekYear: 1,
612
+ isoWeekYear: 1,
613
+ week: 5,
614
+ isoWeek: 5,
615
+ year: 1
616
+ };
556
617
  function getPrioritizedUnits(unitsObj) {
557
618
  var units = [],
558
619
  u;
@@ -569,76 +630,6 @@ var moment$1 = {
569
630
  });
570
631
  return units;
571
632
  }
572
- function isLeapYear(year) {
573
- return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
574
- }
575
- function absFloor(number) {
576
- if (number < 0) {
577
- // -0 -> 0
578
- return Math.ceil(number) || 0;
579
- } else {
580
- return Math.floor(number);
581
- }
582
- }
583
- function toInt(argumentForCoercion) {
584
- var coercedNumber = +argumentForCoercion,
585
- value = 0;
586
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
587
- value = absFloor(coercedNumber);
588
- }
589
- return value;
590
- }
591
- function makeGetSet(unit, keepTime) {
592
- return function (value) {
593
- if (value != null) {
594
- set$1(this, unit, value);
595
- hooks.updateOffset(this, keepTime);
596
- return this;
597
- } else {
598
- return get(this, unit);
599
- }
600
- };
601
- }
602
- function get(mom, unit) {
603
- return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
604
- }
605
- function set$1(mom, unit, value) {
606
- if (mom.isValid() && !isNaN(value)) {
607
- if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
608
- value = toInt(value);
609
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
610
- } else {
611
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
612
- }
613
- }
614
- }
615
-
616
- // MOMENTS
617
-
618
- function stringGet(units) {
619
- units = normalizeUnits(units);
620
- if (isFunction(this[units])) {
621
- return this[units]();
622
- }
623
- return this;
624
- }
625
- function stringSet(units, value) {
626
- if (typeof units === 'object') {
627
- units = normalizeObjectUnits(units);
628
- var prioritized = getPrioritizedUnits(units),
629
- i,
630
- prioritizedLen = prioritized.length;
631
- for (i = 0; i < prioritizedLen; i++) {
632
- this[prioritized[i].unit](units[prioritized[i].unit]);
633
- }
634
- } else {
635
- units = normalizeUnits(units);
636
- if (isFunction(this[units])) {
637
- return this[units](value);
638
- }
639
- }
640
- return this;
641
- }
642
633
  var match1 = /\d/,
643
634
  // 0 - 9
644
635
  match2 = /\d\d/,
@@ -674,6 +665,10 @@ var moment$1 = {
674
665
  // any word (or two) characters or numbers including two/three word month in arabic.
675
666
  // includes scottish gaelic two word and hyphenated months
676
667
  matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
668
+ match1to2NoLeadingZero = /^[1-9]\d?/,
669
+ // 1-99
670
+ match1to2HasZero = /^([1-9]\d|\d)/,
671
+ // 0-99
677
672
  regexes;
678
673
  regexes = {};
679
674
  function addRegexToken(token, regex, strictRegex) {
@@ -697,6 +692,22 @@ var moment$1 = {
697
692
  function regexEscape(s) {
698
693
  return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
699
694
  }
695
+ function absFloor(number) {
696
+ if (number < 0) {
697
+ // -0 -> 0
698
+ return Math.ceil(number) || 0;
699
+ } else {
700
+ return Math.floor(number);
701
+ }
702
+ }
703
+ function toInt(argumentForCoercion) {
704
+ var coercedNumber = +argumentForCoercion,
705
+ value = 0;
706
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
707
+ value = absFloor(coercedNumber);
708
+ }
709
+ return value;
710
+ }
700
711
  var tokens = {};
701
712
  function addParseToken(token, callback) {
702
713
  var i,
@@ -726,6 +737,9 @@ var moment$1 = {
726
737
  tokens[token](input, config._a, config, token);
727
738
  }
728
739
  }
740
+ function isLeapYear(year) {
741
+ return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
742
+ }
729
743
  var YEAR = 0,
730
744
  MONTH = 1,
731
745
  DATE = 2,
@@ -735,6 +749,157 @@ var moment$1 = {
735
749
  MILLISECOND = 6,
736
750
  WEEK = 7,
737
751
  WEEKDAY = 8;
752
+
753
+ // FORMATTING
754
+
755
+ addFormatToken('Y', 0, 0, function () {
756
+ var y = this.year();
757
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
758
+ });
759
+ addFormatToken(0, ['YY', 2], 0, function () {
760
+ return this.year() % 100;
761
+ });
762
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
763
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
764
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
765
+
766
+ // PARSING
767
+
768
+ addRegexToken('Y', matchSigned);
769
+ addRegexToken('YY', match1to2, match2);
770
+ addRegexToken('YYYY', match1to4, match4);
771
+ addRegexToken('YYYYY', match1to6, match6);
772
+ addRegexToken('YYYYYY', match1to6, match6);
773
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
774
+ addParseToken('YYYY', function (input, array) {
775
+ array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
776
+ });
777
+ addParseToken('YY', function (input, array) {
778
+ array[YEAR] = hooks.parseTwoDigitYear(input);
779
+ });
780
+ addParseToken('Y', function (input, array) {
781
+ array[YEAR] = parseInt(input, 10);
782
+ });
783
+
784
+ // HELPERS
785
+
786
+ function daysInYear(year) {
787
+ return isLeapYear(year) ? 366 : 365;
788
+ }
789
+
790
+ // HOOKS
791
+
792
+ hooks.parseTwoDigitYear = function (input) {
793
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
794
+ };
795
+
796
+ // MOMENTS
797
+
798
+ var getSetYear = makeGetSet('FullYear', true);
799
+ function getIsLeapYear() {
800
+ return isLeapYear(this.year());
801
+ }
802
+ function makeGetSet(unit, keepTime) {
803
+ return function (value) {
804
+ if (value != null) {
805
+ set$1(this, unit, value);
806
+ hooks.updateOffset(this, keepTime);
807
+ return this;
808
+ } else {
809
+ return get(this, unit);
810
+ }
811
+ };
812
+ }
813
+ function get(mom, unit) {
814
+ if (!mom.isValid()) {
815
+ return NaN;
816
+ }
817
+ var d = mom._d,
818
+ isUTC = mom._isUTC;
819
+ switch (unit) {
820
+ case 'Milliseconds':
821
+ return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
822
+ case 'Seconds':
823
+ return isUTC ? d.getUTCSeconds() : d.getSeconds();
824
+ case 'Minutes':
825
+ return isUTC ? d.getUTCMinutes() : d.getMinutes();
826
+ case 'Hours':
827
+ return isUTC ? d.getUTCHours() : d.getHours();
828
+ case 'Date':
829
+ return isUTC ? d.getUTCDate() : d.getDate();
830
+ case 'Day':
831
+ return isUTC ? d.getUTCDay() : d.getDay();
832
+ case 'Month':
833
+ return isUTC ? d.getUTCMonth() : d.getMonth();
834
+ case 'FullYear':
835
+ return isUTC ? d.getUTCFullYear() : d.getFullYear();
836
+ default:
837
+ return NaN;
838
+ // Just in case
839
+ }
840
+ }
841
+ function set$1(mom, unit, value) {
842
+ var d, isUTC, year, month, date;
843
+ if (!mom.isValid() || isNaN(value)) {
844
+ return;
845
+ }
846
+ d = mom._d;
847
+ isUTC = mom._isUTC;
848
+ switch (unit) {
849
+ case 'Milliseconds':
850
+ return void (isUTC ? d.setUTCMilliseconds(value) : d.setMilliseconds(value));
851
+ case 'Seconds':
852
+ return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
853
+ case 'Minutes':
854
+ return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
855
+ case 'Hours':
856
+ return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
857
+ case 'Date':
858
+ return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
859
+ // case 'Day': // Not real
860
+ // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
861
+ // case 'Month': // Not used because we need to pass two variables
862
+ // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
863
+ case 'FullYear':
864
+ break;
865
+ // See below ...
866
+ default:
867
+ return;
868
+ // Just in case
869
+ }
870
+ year = value;
871
+ month = mom.month();
872
+ date = mom.date();
873
+ date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
874
+ void (isUTC ? d.setUTCFullYear(year, month, date) : d.setFullYear(year, month, date));
875
+ }
876
+
877
+ // MOMENTS
878
+
879
+ function stringGet(units) {
880
+ units = normalizeUnits(units);
881
+ if (isFunction(this[units])) {
882
+ return this[units]();
883
+ }
884
+ return this;
885
+ }
886
+ function stringSet(units, value) {
887
+ if (typeof units === 'object') {
888
+ units = normalizeObjectUnits(units);
889
+ var prioritized = getPrioritizedUnits(units),
890
+ i,
891
+ prioritizedLen = prioritized.length;
892
+ for (i = 0; i < prioritizedLen; i++) {
893
+ this[prioritized[i].unit](units[prioritized[i].unit]);
894
+ }
895
+ } else {
896
+ units = normalizeUnits(units);
897
+ if (isFunction(this[units])) {
898
+ return this[units](value);
899
+ }
900
+ }
901
+ return this;
902
+ }
738
903
  function mod(n, x) {
739
904
  return (n % x + x) % x;
740
905
  }
@@ -774,17 +939,9 @@ var moment$1 = {
774
939
  return this.localeData().months(this, format);
775
940
  });
776
941
 
777
- // ALIASES
778
-
779
- addUnitAlias('month', 'M');
780
-
781
- // PRIORITY
782
-
783
- addUnitPriority('month', 8);
784
-
785
942
  // PARSING
786
943
 
787
- addRegexToken('M', match1to2);
944
+ addRegexToken('M', match1to2, match1to2NoLeadingZero);
788
945
  addRegexToken('MM', match1to2, match2);
789
946
  addRegexToken('MMM', function (isStrict, locale) {
790
947
  return locale.monthsShortRegex(isStrict);
@@ -905,7 +1062,6 @@ var moment$1 = {
905
1062
  // MOMENTS
906
1063
 
907
1064
  function setMonth(mom, value) {
908
- var dayOfMonth;
909
1065
  if (!mom.isValid()) {
910
1066
  // No op
911
1067
  return mom;
@@ -921,8 +1077,10 @@ var moment$1 = {
921
1077
  }
922
1078
  }
923
1079
  }
924
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
925
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1080
+ var month = value,
1081
+ date = mom.date();
1082
+ date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
1083
+ void (mom._isUTC ? mom._d.setUTCMonth(month, date) : mom._d.setMonth(month, date));
926
1084
  return mom;
927
1085
  }
928
1086
  function getSetMonth(value) {
@@ -979,90 +1137,29 @@ var moment$1 = {
979
1137
  longPieces = [],
980
1138
  mixedPieces = [],
981
1139
  i,
982
- mom;
1140
+ mom,
1141
+ shortP,
1142
+ longP;
983
1143
  for (i = 0; i < 12; i++) {
984
1144
  // make the regex if we don't have it already
985
1145
  mom = createUTC([2000, i]);
986
- shortPieces.push(this.monthsShort(mom, ''));
987
- longPieces.push(this.months(mom, ''));
988
- mixedPieces.push(this.months(mom, ''));
989
- mixedPieces.push(this.monthsShort(mom, ''));
1146
+ shortP = regexEscape(this.monthsShort(mom, ''));
1147
+ longP = regexEscape(this.months(mom, ''));
1148
+ shortPieces.push(shortP);
1149
+ longPieces.push(longP);
1150
+ mixedPieces.push(longP);
1151
+ mixedPieces.push(shortP);
990
1152
  }
991
1153
  // Sorting makes sure if one month (or abbr) is a prefix of another it
992
1154
  // will match the longer piece.
993
1155
  shortPieces.sort(cmpLenRev);
994
1156
  longPieces.sort(cmpLenRev);
995
1157
  mixedPieces.sort(cmpLenRev);
996
- for (i = 0; i < 12; i++) {
997
- shortPieces[i] = regexEscape(shortPieces[i]);
998
- longPieces[i] = regexEscape(longPieces[i]);
999
- }
1000
- for (i = 0; i < 24; i++) {
1001
- mixedPieces[i] = regexEscape(mixedPieces[i]);
1002
- }
1003
1158
  this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1004
1159
  this._monthsShortRegex = this._monthsRegex;
1005
1160
  this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
1006
1161
  this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
1007
1162
  }
1008
-
1009
- // FORMATTING
1010
-
1011
- addFormatToken('Y', 0, 0, function () {
1012
- var y = this.year();
1013
- return y <= 9999 ? zeroFill(y, 4) : '+' + y;
1014
- });
1015
- addFormatToken(0, ['YY', 2], 0, function () {
1016
- return this.year() % 100;
1017
- });
1018
- addFormatToken(0, ['YYYY', 4], 0, 'year');
1019
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
1020
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1021
-
1022
- // ALIASES
1023
-
1024
- addUnitAlias('year', 'y');
1025
-
1026
- // PRIORITIES
1027
-
1028
- addUnitPriority('year', 1);
1029
-
1030
- // PARSING
1031
-
1032
- addRegexToken('Y', matchSigned);
1033
- addRegexToken('YY', match1to2, match2);
1034
- addRegexToken('YYYY', match1to4, match4);
1035
- addRegexToken('YYYYY', match1to6, match6);
1036
- addRegexToken('YYYYYY', match1to6, match6);
1037
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1038
- addParseToken('YYYY', function (input, array) {
1039
- array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
1040
- });
1041
- addParseToken('YY', function (input, array) {
1042
- array[YEAR] = hooks.parseTwoDigitYear(input);
1043
- });
1044
- addParseToken('Y', function (input, array) {
1045
- array[YEAR] = parseInt(input, 10);
1046
- });
1047
-
1048
- // HELPERS
1049
-
1050
- function daysInYear(year) {
1051
- return isLeapYear(year) ? 366 : 365;
1052
- }
1053
-
1054
- // HOOKS
1055
-
1056
- hooks.parseTwoDigitYear = function (input) {
1057
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1058
- };
1059
-
1060
- // MOMENTS
1061
-
1062
- var getSetYear = makeGetSet('FullYear', true);
1063
- function getIsLeapYear() {
1064
- return isLeapYear(this.year());
1065
- }
1066
1163
  function createDate(y, m, d, h, M, s, ms) {
1067
1164
  // can't just apply() to create a date:
1068
1165
  // https://stackoverflow.com/q/181348
@@ -1159,21 +1256,11 @@ var moment$1 = {
1159
1256
  addFormatToken('w', ['ww', 2], 'wo', 'week');
1160
1257
  addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1161
1258
 
1162
- // ALIASES
1163
-
1164
- addUnitAlias('week', 'w');
1165
- addUnitAlias('isoWeek', 'W');
1166
-
1167
- // PRIORITIES
1168
-
1169
- addUnitPriority('week', 5);
1170
- addUnitPriority('isoWeek', 5);
1171
-
1172
1259
  // PARSING
1173
1260
 
1174
- addRegexToken('w', match1to2);
1261
+ addRegexToken('w', match1to2, match1to2NoLeadingZero);
1175
1262
  addRegexToken('ww', match1to2, match2);
1176
- addRegexToken('W', match1to2);
1263
+ addRegexToken('W', match1to2, match1to2NoLeadingZero);
1177
1264
  addRegexToken('WW', match1to2, match2);
1178
1265
  addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
1179
1266
  week[token.substr(0, 1)] = toInt(input);
@@ -1191,7 +1278,6 @@ var moment$1 = {
1191
1278
  // Sunday is the first day of the week.
1192
1279
  doy: 6 // The week that contains Jan 6th is the first week of the year.
1193
1280
  };
1194
-
1195
1281
  function localeFirstDayOfWeek() {
1196
1282
  return this._week.dow;
1197
1283
  }
@@ -1225,17 +1311,6 @@ var moment$1 = {
1225
1311
  addFormatToken('e', 0, 0, 'weekday');
1226
1312
  addFormatToken('E', 0, 0, 'isoWeekday');
1227
1313
 
1228
- // ALIASES
1229
-
1230
- addUnitAlias('day', 'd');
1231
- addUnitAlias('weekday', 'e');
1232
- addUnitAlias('isoWeekday', 'E');
1233
-
1234
- // PRIORITY
1235
- addUnitPriority('day', 11);
1236
- addUnitPriority('weekday', 11);
1237
- addUnitPriority('isoWeekday', 11);
1238
-
1239
1314
  // PARSING
1240
1315
 
1241
1316
  addRegexToken('d', match1to2);
@@ -1412,7 +1487,7 @@ var moment$1 = {
1412
1487
  if (!this.isValid()) {
1413
1488
  return input != null ? this : NaN;
1414
1489
  }
1415
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1490
+ var day = get(this, 'Day');
1416
1491
  if (input != null) {
1417
1492
  input = parseWeekday(input, this.localeData());
1418
1493
  return this.add(input - day, 'd');
@@ -1565,13 +1640,6 @@ var moment$1 = {
1565
1640
  meridiem('a', true);
1566
1641
  meridiem('A', false);
1567
1642
 
1568
- // ALIASES
1569
-
1570
- addUnitAlias('hour', 'h');
1571
-
1572
- // PRIORITY
1573
- addUnitPriority('hour', 13);
1574
-
1575
1643
  // PARSING
1576
1644
 
1577
1645
  function matchMeridiem(isStrict, locale) {
@@ -1579,9 +1647,9 @@ var moment$1 = {
1579
1647
  }
1580
1648
  addRegexToken('a', matchMeridiem);
1581
1649
  addRegexToken('A', matchMeridiem);
1582
- addRegexToken('H', match1to2);
1583
- addRegexToken('h', match1to2);
1584
- addRegexToken('k', match1to2);
1650
+ addRegexToken('H', match1to2, match1to2HasZero);
1651
+ addRegexToken('h', match1to2, match1to2NoLeadingZero);
1652
+ addRegexToken('k', match1to2, match1to2NoLeadingZero);
1585
1653
  addRegexToken('HH', match1to2, match2);
1586
1654
  addRegexToken('hh', match1to2, match2);
1587
1655
  addRegexToken('kk', match1to2, match2);
@@ -1714,7 +1782,8 @@ var moment$1 = {
1714
1782
  }
1715
1783
  function isLocaleNameSane(name) {
1716
1784
  // Prevent names that look like filesystem paths, i.e contain '/' or '\'
1717
- return name.match('^[^/\\\\]*$') != null;
1785
+ // Ensure name is available and function returns boolean
1786
+ return !!(name && name.match('^[^/\\\\]*$'));
1718
1787
  }
1719
1788
  function loadLocale(name) {
1720
1789
  var oldLocale = null,
@@ -1732,7 +1801,6 @@ var moment$1 = {
1732
1801
  locales[name] = null; // null means not found
1733
1802
  }
1734
1803
  }
1735
-
1736
1804
  return locales[name];
1737
1805
  }
1738
1806
 
@@ -2523,7 +2591,6 @@ var moment$1 = {
2523
2591
  if (unitHasDecimal) {
2524
2592
  return false; // only allow non-integers for smallest unit
2525
2593
  }
2526
-
2527
2594
  if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
2528
2595
  unitHasDecimal = true;
2529
2596
  }
@@ -3611,14 +3678,20 @@ var moment$1 = {
3611
3678
  mixedPieces = [],
3612
3679
  i,
3613
3680
  l,
3681
+ erasName,
3682
+ erasAbbr,
3683
+ erasNarrow,
3614
3684
  eras = this.eras();
3615
3685
  for (i = 0, l = eras.length; i < l; ++i) {
3616
- namePieces.push(regexEscape(eras[i].name));
3617
- abbrPieces.push(regexEscape(eras[i].abbr));
3618
- narrowPieces.push(regexEscape(eras[i].narrow));
3619
- mixedPieces.push(regexEscape(eras[i].name));
3620
- mixedPieces.push(regexEscape(eras[i].abbr));
3621
- mixedPieces.push(regexEscape(eras[i].narrow));
3686
+ erasName = regexEscape(eras[i].name);
3687
+ erasAbbr = regexEscape(eras[i].abbr);
3688
+ erasNarrow = regexEscape(eras[i].narrow);
3689
+ namePieces.push(erasName);
3690
+ abbrPieces.push(erasAbbr);
3691
+ narrowPieces.push(erasNarrow);
3692
+ mixedPieces.push(erasName);
3693
+ mixedPieces.push(erasAbbr);
3694
+ mixedPieces.push(erasNarrow);
3622
3695
  }
3623
3696
  this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
3624
3697
  this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
@@ -3644,14 +3717,6 @@ var moment$1 = {
3644
3717
 
3645
3718
  // ALIASES
3646
3719
 
3647
- addUnitAlias('weekYear', 'gg');
3648
- addUnitAlias('isoWeekYear', 'GG');
3649
-
3650
- // PRIORITY
3651
-
3652
- addUnitPriority('weekYear', 1);
3653
- addUnitPriority('isoWeekYear', 1);
3654
-
3655
3720
  // PARSING
3656
3721
 
3657
3722
  addRegexToken('G', matchSigned);
@@ -3672,7 +3737,7 @@ var moment$1 = {
3672
3737
  // MOMENTS
3673
3738
 
3674
3739
  function getSetWeekYear(input) {
3675
- return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);
3740
+ return getSetWeekYearHelper.call(this, input, this.week(), this.weekday() + this.localeData()._week.dow, this.localeData()._week.dow, this.localeData()._week.doy);
3676
3741
  }
3677
3742
  function getSetISOWeekYear(input) {
3678
3743
  return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);
@@ -3716,14 +3781,6 @@ var moment$1 = {
3716
3781
 
3717
3782
  addFormatToken('Q', 0, 'Qo', 'quarter');
3718
3783
 
3719
- // ALIASES
3720
-
3721
- addUnitAlias('quarter', 'Q');
3722
-
3723
- // PRIORITY
3724
-
3725
- addUnitPriority('quarter', 7);
3726
-
3727
3784
  // PARSING
3728
3785
 
3729
3786
  addRegexToken('Q', match1);
@@ -3741,16 +3798,9 @@ var moment$1 = {
3741
3798
 
3742
3799
  addFormatToken('D', ['DD', 2], 'Do', 'date');
3743
3800
 
3744
- // ALIASES
3745
-
3746
- addUnitAlias('date', 'D');
3747
-
3748
- // PRIORITY
3749
- addUnitPriority('date', 9);
3750
-
3751
3801
  // PARSING
3752
3802
 
3753
- addRegexToken('D', match1to2);
3803
+ addRegexToken('D', match1to2, match1to2NoLeadingZero);
3754
3804
  addRegexToken('DD', match1to2, match2);
3755
3805
  addRegexToken('Do', function (isStrict, locale) {
3756
3806
  // TODO: Remove "ordinalParse" fallback in next major release.
@@ -3769,13 +3819,6 @@ var moment$1 = {
3769
3819
 
3770
3820
  addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
3771
3821
 
3772
- // ALIASES
3773
-
3774
- addUnitAlias('dayOfYear', 'DDD');
3775
-
3776
- // PRIORITY
3777
- addUnitPriority('dayOfYear', 4);
3778
-
3779
3822
  // PARSING
3780
3823
 
3781
3824
  addRegexToken('DDD', match1to3);
@@ -3797,17 +3840,9 @@ var moment$1 = {
3797
3840
 
3798
3841
  addFormatToken('m', ['mm', 2], 0, 'minute');
3799
3842
 
3800
- // ALIASES
3801
-
3802
- addUnitAlias('minute', 'm');
3803
-
3804
- // PRIORITY
3805
-
3806
- addUnitPriority('minute', 14);
3807
-
3808
3843
  // PARSING
3809
3844
 
3810
- addRegexToken('m', match1to2);
3845
+ addRegexToken('m', match1to2, match1to2HasZero);
3811
3846
  addRegexToken('mm', match1to2, match2);
3812
3847
  addParseToken(['m', 'mm'], MINUTE);
3813
3848
 
@@ -3819,17 +3854,9 @@ var moment$1 = {
3819
3854
 
3820
3855
  addFormatToken('s', ['ss', 2], 0, 'second');
3821
3856
 
3822
- // ALIASES
3823
-
3824
- addUnitAlias('second', 's');
3825
-
3826
- // PRIORITY
3827
-
3828
- addUnitPriority('second', 15);
3829
-
3830
3857
  // PARSING
3831
3858
 
3832
- addRegexToken('s', match1to2);
3859
+ addRegexToken('s', match1to2, match1to2HasZero);
3833
3860
  addRegexToken('ss', match1to2, match2);
3834
3861
  addParseToken(['s', 'ss'], SECOND);
3835
3862
 
@@ -3865,14 +3892,6 @@ var moment$1 = {
3865
3892
  return this.millisecond() * 1000000;
3866
3893
  });
3867
3894
 
3868
- // ALIASES
3869
-
3870
- addUnitAlias('millisecond', 'ms');
3871
-
3872
- // PRIORITY
3873
-
3874
- addUnitPriority('millisecond', 16);
3875
-
3876
3895
  // PARSING
3877
3896
 
3878
3897
  addRegexToken('S', match1to3, match1);
@@ -4265,14 +4284,6 @@ var moment$1 = {
4265
4284
  }
4266
4285
  }
4267
4286
  }
4268
-
4269
- // TODO: Use this.as('ms')?
4270
- function valueOf$1() {
4271
- if (!this.isValid()) {
4272
- return NaN;
4273
- }
4274
- return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;
4275
- }
4276
4287
  function makeAs(alias) {
4277
4288
  return function () {
4278
4289
  return this.as(alias);
@@ -4286,7 +4297,8 @@ var moment$1 = {
4286
4297
  asWeeks = makeAs('w'),
4287
4298
  asMonths = makeAs('M'),
4288
4299
  asQuarters = makeAs('Q'),
4289
- asYears = makeAs('y');
4300
+ asYears = makeAs('y'),
4301
+ valueOf$1 = asMilliseconds;
4290
4302
  function clone$1() {
4291
4303
  return createDuration(this);
4292
4304
  }
@@ -4509,7 +4521,7 @@ var moment$1 = {
4509
4521
 
4510
4522
  //! moment.js
4511
4523
 
4512
- hooks.version = '2.29.4';
4524
+ hooks.version = '2.30.1';
4513
4525
  setHookCallback(createLocal);
4514
4526
  hooks.fn = proto;
4515
4527
  hooks.min = min;
@@ -4559,7 +4571,6 @@ var moment$1 = {
4559
4571
  // <input type="week" />
4560
4572
  MONTH: 'YYYY-MM' // <input type="month" />
4561
4573
  };
4562
-
4563
4574
  return hooks;
4564
4575
  });
4565
4576
  })(moment$1);
@@ -4610,132 +4621,86 @@ function _extends() {
4610
4621
  var propTypes$1 = {
4611
4622
  exports: {}
4612
4623
  };
4613
- var reactIs = {
4614
- exports: {}
4615
- };
4616
- var reactIs_production_min = {};
4617
4624
 
4618
- /** @license React v16.13.1
4619
- * react-is.production.min.js
4625
+ /**
4626
+ * Copyright (c) 2013-present, Facebook, Inc.
4620
4627
  *
4621
- * Copyright (c) Facebook, Inc. and its affiliates.
4628
+ * This source code is licensed under the MIT license found in the
4629
+ * LICENSE file in the root directory of this source tree.
4630
+ */
4631
+
4632
+ var ReactPropTypesSecret_1;
4633
+ var hasRequiredReactPropTypesSecret;
4634
+ function requireReactPropTypesSecret() {
4635
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
4636
+ hasRequiredReactPropTypesSecret = 1;
4637
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4638
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
4639
+ return ReactPropTypesSecret_1;
4640
+ }
4641
+
4642
+ /**
4643
+ * Copyright (c) 2013-present, Facebook, Inc.
4622
4644
  *
4623
4645
  * This source code is licensed under the MIT license found in the
4624
4646
  * LICENSE file in the root directory of this source tree.
4625
4647
  */
4626
4648
 
4627
- var hasRequiredReactIs_production_min;
4628
- function requireReactIs_production_min() {
4629
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
4630
- hasRequiredReactIs_production_min = 1;
4631
- var b = "function" === typeof Symbol && Symbol.for,
4632
- c = b ? Symbol.for("react.element") : 60103,
4633
- d = b ? Symbol.for("react.portal") : 60106,
4634
- e = b ? Symbol.for("react.fragment") : 60107,
4635
- f = b ? Symbol.for("react.strict_mode") : 60108,
4636
- g = b ? Symbol.for("react.profiler") : 60114,
4637
- h = b ? Symbol.for("react.provider") : 60109,
4638
- k = b ? Symbol.for("react.context") : 60110,
4639
- l = b ? Symbol.for("react.async_mode") : 60111,
4640
- m = b ? Symbol.for("react.concurrent_mode") : 60111,
4641
- n = b ? Symbol.for("react.forward_ref") : 60112,
4642
- p = b ? Symbol.for("react.suspense") : 60113,
4643
- q = b ? Symbol.for("react.suspense_list") : 60120,
4644
- r = b ? Symbol.for("react.memo") : 60115,
4645
- t = b ? Symbol.for("react.lazy") : 60116,
4646
- v = b ? Symbol.for("react.block") : 60121,
4647
- w = b ? Symbol.for("react.fundamental") : 60117,
4648
- x = b ? Symbol.for("react.responder") : 60118,
4649
- y = b ? Symbol.for("react.scope") : 60119;
4650
- function z(a) {
4651
- if ("object" === typeof a && null !== a) {
4652
- var u = a.$$typeof;
4653
- switch (u) {
4654
- case c:
4655
- switch (a = a.type, a) {
4656
- case l:
4657
- case m:
4658
- case e:
4659
- case g:
4660
- case f:
4661
- case p:
4662
- return a;
4663
- default:
4664
- switch (a = a && a.$$typeof, a) {
4665
- case k:
4666
- case n:
4667
- case t:
4668
- case r:
4669
- case h:
4670
- return a;
4671
- default:
4672
- return u;
4673
- }
4674
- }
4675
- case d:
4676
- return u;
4649
+ var factoryWithThrowingShims;
4650
+ var hasRequiredFactoryWithThrowingShims;
4651
+ function requireFactoryWithThrowingShims() {
4652
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
4653
+ hasRequiredFactoryWithThrowingShims = 1;
4654
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
4655
+ function emptyFunction() {}
4656
+ function emptyFunctionWithReset() {}
4657
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
4658
+ factoryWithThrowingShims = function () {
4659
+ function shim(props, propName, componentName, location, propFullName, secret) {
4660
+ if (secret === ReactPropTypesSecret) {
4661
+ // It is still safe when called from React.
4662
+ return;
4677
4663
  }
4664
+ var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
4665
+ err.name = 'Invariant Violation';
4666
+ throw err;
4678
4667
  }
4679
- }
4680
- function A(a) {
4681
- return z(a) === m;
4682
- }
4683
- reactIs_production_min.AsyncMode = l;
4684
- reactIs_production_min.ConcurrentMode = m;
4685
- reactIs_production_min.ContextConsumer = k;
4686
- reactIs_production_min.ContextProvider = h;
4687
- reactIs_production_min.Element = c;
4688
- reactIs_production_min.ForwardRef = n;
4689
- reactIs_production_min.Fragment = e;
4690
- reactIs_production_min.Lazy = t;
4691
- reactIs_production_min.Memo = r;
4692
- reactIs_production_min.Portal = d;
4693
- reactIs_production_min.Profiler = g;
4694
- reactIs_production_min.StrictMode = f;
4695
- reactIs_production_min.Suspense = p;
4696
- reactIs_production_min.isAsyncMode = function (a) {
4697
- return A(a) || z(a) === l;
4698
- };
4699
- reactIs_production_min.isConcurrentMode = A;
4700
- reactIs_production_min.isContextConsumer = function (a) {
4701
- return z(a) === k;
4702
- };
4703
- reactIs_production_min.isContextProvider = function (a) {
4704
- return z(a) === h;
4705
- };
4706
- reactIs_production_min.isElement = function (a) {
4707
- return "object" === typeof a && null !== a && a.$$typeof === c;
4708
- };
4709
- reactIs_production_min.isForwardRef = function (a) {
4710
- return z(a) === n;
4711
- };
4712
- reactIs_production_min.isFragment = function (a) {
4713
- return z(a) === e;
4714
- };
4715
- reactIs_production_min.isLazy = function (a) {
4716
- return z(a) === t;
4717
- };
4718
- reactIs_production_min.isMemo = function (a) {
4719
- return z(a) === r;
4720
- };
4721
- reactIs_production_min.isPortal = function (a) {
4722
- return z(a) === d;
4723
- };
4724
- reactIs_production_min.isProfiler = function (a) {
4725
- return z(a) === g;
4726
- };
4727
- reactIs_production_min.isStrictMode = function (a) {
4728
- return z(a) === f;
4729
- };
4730
- reactIs_production_min.isSuspense = function (a) {
4731
- return z(a) === p;
4732
- };
4733
- reactIs_production_min.isValidElementType = function (a) {
4734
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
4668
+ shim.isRequired = shim;
4669
+ function getShim() {
4670
+ return shim;
4671
+ } // Important!
4672
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
4673
+ var ReactPropTypes = {
4674
+ array: shim,
4675
+ bigint: shim,
4676
+ bool: shim,
4677
+ func: shim,
4678
+ number: shim,
4679
+ object: shim,
4680
+ string: shim,
4681
+ symbol: shim,
4682
+ any: shim,
4683
+ arrayOf: getShim,
4684
+ element: shim,
4685
+ elementType: shim,
4686
+ instanceOf: getShim,
4687
+ node: shim,
4688
+ objectOf: getShim,
4689
+ oneOf: getShim,
4690
+ oneOfType: getShim,
4691
+ shape: getShim,
4692
+ exact: getShim,
4693
+ checkPropTypes: emptyFunctionWithReset,
4694
+ resetWarningCache: emptyFunction
4695
+ };
4696
+ ReactPropTypes.PropTypes = ReactPropTypes;
4697
+ return ReactPropTypes;
4735
4698
  };
4736
- reactIs_production_min.typeOf = z;
4737
- return reactIs_production_min;
4699
+ return factoryWithThrowingShims;
4738
4700
  }
4701
+ var reactIs = {
4702
+ exports: {}
4703
+ };
4739
4704
  var reactIs_development = {};
4740
4705
 
4741
4706
  /** @license React v16.13.1
@@ -4908,6 +4873,129 @@ function requireReactIs_development() {
4908
4873
  }
4909
4874
  return reactIs_development;
4910
4875
  }
4876
+ var reactIs_production_min = {};
4877
+
4878
+ /** @license React v16.13.1
4879
+ * react-is.production.min.js
4880
+ *
4881
+ * Copyright (c) Facebook, Inc. and its affiliates.
4882
+ *
4883
+ * This source code is licensed under the MIT license found in the
4884
+ * LICENSE file in the root directory of this source tree.
4885
+ */
4886
+
4887
+ var hasRequiredReactIs_production_min;
4888
+ function requireReactIs_production_min() {
4889
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
4890
+ hasRequiredReactIs_production_min = 1;
4891
+ var b = "function" === typeof Symbol && Symbol.for,
4892
+ c = b ? Symbol.for("react.element") : 60103,
4893
+ d = b ? Symbol.for("react.portal") : 60106,
4894
+ e = b ? Symbol.for("react.fragment") : 60107,
4895
+ f = b ? Symbol.for("react.strict_mode") : 60108,
4896
+ g = b ? Symbol.for("react.profiler") : 60114,
4897
+ h = b ? Symbol.for("react.provider") : 60109,
4898
+ k = b ? Symbol.for("react.context") : 60110,
4899
+ l = b ? Symbol.for("react.async_mode") : 60111,
4900
+ m = b ? Symbol.for("react.concurrent_mode") : 60111,
4901
+ n = b ? Symbol.for("react.forward_ref") : 60112,
4902
+ p = b ? Symbol.for("react.suspense") : 60113,
4903
+ q = b ? Symbol.for("react.suspense_list") : 60120,
4904
+ r = b ? Symbol.for("react.memo") : 60115,
4905
+ t = b ? Symbol.for("react.lazy") : 60116,
4906
+ v = b ? Symbol.for("react.block") : 60121,
4907
+ w = b ? Symbol.for("react.fundamental") : 60117,
4908
+ x = b ? Symbol.for("react.responder") : 60118,
4909
+ y = b ? Symbol.for("react.scope") : 60119;
4910
+ function z(a) {
4911
+ if ("object" === typeof a && null !== a) {
4912
+ var u = a.$$typeof;
4913
+ switch (u) {
4914
+ case c:
4915
+ switch (a = a.type, a) {
4916
+ case l:
4917
+ case m:
4918
+ case e:
4919
+ case g:
4920
+ case f:
4921
+ case p:
4922
+ return a;
4923
+ default:
4924
+ switch (a = a && a.$$typeof, a) {
4925
+ case k:
4926
+ case n:
4927
+ case t:
4928
+ case r:
4929
+ case h:
4930
+ return a;
4931
+ default:
4932
+ return u;
4933
+ }
4934
+ }
4935
+ case d:
4936
+ return u;
4937
+ }
4938
+ }
4939
+ }
4940
+ function A(a) {
4941
+ return z(a) === m;
4942
+ }
4943
+ reactIs_production_min.AsyncMode = l;
4944
+ reactIs_production_min.ConcurrentMode = m;
4945
+ reactIs_production_min.ContextConsumer = k;
4946
+ reactIs_production_min.ContextProvider = h;
4947
+ reactIs_production_min.Element = c;
4948
+ reactIs_production_min.ForwardRef = n;
4949
+ reactIs_production_min.Fragment = e;
4950
+ reactIs_production_min.Lazy = t;
4951
+ reactIs_production_min.Memo = r;
4952
+ reactIs_production_min.Portal = d;
4953
+ reactIs_production_min.Profiler = g;
4954
+ reactIs_production_min.StrictMode = f;
4955
+ reactIs_production_min.Suspense = p;
4956
+ reactIs_production_min.isAsyncMode = function (a) {
4957
+ return A(a) || z(a) === l;
4958
+ };
4959
+ reactIs_production_min.isConcurrentMode = A;
4960
+ reactIs_production_min.isContextConsumer = function (a) {
4961
+ return z(a) === k;
4962
+ };
4963
+ reactIs_production_min.isContextProvider = function (a) {
4964
+ return z(a) === h;
4965
+ };
4966
+ reactIs_production_min.isElement = function (a) {
4967
+ return "object" === typeof a && null !== a && a.$$typeof === c;
4968
+ };
4969
+ reactIs_production_min.isForwardRef = function (a) {
4970
+ return z(a) === n;
4971
+ };
4972
+ reactIs_production_min.isFragment = function (a) {
4973
+ return z(a) === e;
4974
+ };
4975
+ reactIs_production_min.isLazy = function (a) {
4976
+ return z(a) === t;
4977
+ };
4978
+ reactIs_production_min.isMemo = function (a) {
4979
+ return z(a) === r;
4980
+ };
4981
+ reactIs_production_min.isPortal = function (a) {
4982
+ return z(a) === d;
4983
+ };
4984
+ reactIs_production_min.isProfiler = function (a) {
4985
+ return z(a) === g;
4986
+ };
4987
+ reactIs_production_min.isStrictMode = function (a) {
4988
+ return z(a) === f;
4989
+ };
4990
+ reactIs_production_min.isSuspense = function (a) {
4991
+ return z(a) === p;
4992
+ };
4993
+ reactIs_production_min.isValidElementType = function (a) {
4994
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
4995
+ };
4996
+ reactIs_production_min.typeOf = z;
4997
+ return reactIs_production_min;
4998
+ }
4911
4999
  var hasRequiredReactIs;
4912
5000
  function requireReactIs() {
4913
5001
  if (hasRequiredReactIs) return reactIs.exports;
@@ -5006,23 +5094,6 @@ function requireObjectAssign() {
5006
5094
  };
5007
5095
  return objectAssign;
5008
5096
  }
5009
-
5010
- /**
5011
- * Copyright (c) 2013-present, Facebook, Inc.
5012
- *
5013
- * This source code is licensed under the MIT license found in the
5014
- * LICENSE file in the root directory of this source tree.
5015
- */
5016
-
5017
- var ReactPropTypesSecret_1;
5018
- var hasRequiredReactPropTypesSecret;
5019
- function requireReactPropTypesSecret() {
5020
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
5021
- hasRequiredReactPropTypesSecret = 1;
5022
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5023
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
5024
- return ReactPropTypesSecret_1;
5025
- }
5026
5097
  var has;
5027
5098
  var hasRequiredHas;
5028
5099
  function requireHas() {
@@ -5677,66 +5748,6 @@ function requireFactoryWithTypeCheckers() {
5677
5748
  return factoryWithTypeCheckers;
5678
5749
  }
5679
5750
 
5680
- /**
5681
- * Copyright (c) 2013-present, Facebook, Inc.
5682
- *
5683
- * This source code is licensed under the MIT license found in the
5684
- * LICENSE file in the root directory of this source tree.
5685
- */
5686
-
5687
- var factoryWithThrowingShims;
5688
- var hasRequiredFactoryWithThrowingShims;
5689
- function requireFactoryWithThrowingShims() {
5690
- if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
5691
- hasRequiredFactoryWithThrowingShims = 1;
5692
- var ReactPropTypesSecret = requireReactPropTypesSecret();
5693
- function emptyFunction() {}
5694
- function emptyFunctionWithReset() {}
5695
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
5696
- factoryWithThrowingShims = function () {
5697
- function shim(props, propName, componentName, location, propFullName, secret) {
5698
- if (secret === ReactPropTypesSecret) {
5699
- // It is still safe when called from React.
5700
- return;
5701
- }
5702
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
5703
- err.name = 'Invariant Violation';
5704
- throw err;
5705
- }
5706
- shim.isRequired = shim;
5707
- function getShim() {
5708
- return shim;
5709
- } // Important!
5710
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5711
- var ReactPropTypes = {
5712
- array: shim,
5713
- bigint: shim,
5714
- bool: shim,
5715
- func: shim,
5716
- number: shim,
5717
- object: shim,
5718
- string: shim,
5719
- symbol: shim,
5720
- any: shim,
5721
- arrayOf: getShim,
5722
- element: shim,
5723
- elementType: shim,
5724
- instanceOf: getShim,
5725
- node: shim,
5726
- objectOf: getShim,
5727
- oneOf: getShim,
5728
- oneOfType: getShim,
5729
- shape: getShim,
5730
- exact: getShim,
5731
- checkPropTypes: emptyFunctionWithReset,
5732
- resetWarningCache: emptyFunction
5733
- };
5734
- ReactPropTypes.PropTypes = ReactPropTypes;
5735
- return ReactPropTypes;
5736
- };
5737
- return factoryWithThrowingShims;
5738
- }
5739
-
5740
5751
  /**
5741
5752
  * Copyright (c) 2013-present, Facebook, Inc.
5742
5753
  *
@@ -6018,7 +6029,6 @@ var mediumSidecar = createSidecarMedium({
6018
6029
  // however, it might be required for JSDOM tests
6019
6030
  // ssr: true,
6020
6031
  });
6021
-
6022
6032
  var emptyArray = [];
6023
6033
  var FocusLock$1 = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {
6024
6034
  var _extends2;
@@ -6217,31 +6227,31 @@ function _inheritsLoose(subClass, superClass) {
6217
6227
  subClass.prototype.constructor = subClass;
6218
6228
  _setPrototypeOf(subClass, superClass);
6219
6229
  }
6220
- function _typeof(obj) {
6230
+ function _typeof(o) {
6221
6231
  "@babel/helpers - typeof";
6222
6232
 
6223
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
6224
- return typeof obj;
6225
- } : function (obj) {
6226
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
6227
- }, _typeof(obj);
6233
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
6234
+ return typeof o;
6235
+ } : function (o) {
6236
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
6237
+ }, _typeof(o);
6228
6238
  }
6229
- function _toPrimitive(input, hint) {
6230
- if (_typeof(input) !== "object" || input === null) return input;
6231
- var prim = input[Symbol.toPrimitive];
6232
- if (prim !== undefined) {
6233
- var res = prim.call(input, hint || "default");
6234
- if (_typeof(res) !== "object") return res;
6239
+ function toPrimitive(t, r) {
6240
+ if ("object" != _typeof(t) || !t) return t;
6241
+ var e = t[Symbol.toPrimitive];
6242
+ if (void 0 !== e) {
6243
+ var i = e.call(t, r || "default");
6244
+ if ("object" != _typeof(i)) return i;
6235
6245
  throw new TypeError("@@toPrimitive must return a primitive value.");
6236
6246
  }
6237
- return (hint === "string" ? String : Number)(input);
6247
+ return ("string" === r ? String : Number)(t);
6238
6248
  }
6239
- function _toPropertyKey(arg) {
6240
- var key = _toPrimitive(arg, "string");
6241
- return _typeof(key) === "symbol" ? key : String(key);
6249
+ function toPropertyKey(t) {
6250
+ var i = toPrimitive(t, "string");
6251
+ return "symbol" == _typeof(i) ? i : String(i);
6242
6252
  }
6243
6253
  function _defineProperty(obj, key, value) {
6244
- key = _toPropertyKey(key);
6254
+ key = toPropertyKey(key);
6245
6255
  if (key in obj) {
6246
6256
  Object.defineProperty(obj, key, {
6247
6257
  value: value,
@@ -6502,17 +6512,29 @@ var filterAutoFocusable = function (nodes, cache) {
6502
6512
  });
6503
6513
  };
6504
6514
  /**
6505
- * only tabbable ones
6506
- * (but with guards which would be ignored)
6515
+ * !__WARNING__! Low level API.
6516
+ * @returns all tabbable nodes
6517
+ *
6518
+ * @see {@link getFocusableNodes} to get any focusable element
6519
+ *
6520
+ * @param topNodes - array of top level HTMLElements to search inside
6521
+ * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
6507
6522
  */
6508
6523
  var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {
6509
6524
  return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);
6510
6525
  };
6511
6526
  /**
6512
- * actually anything "focusable", not only tabbable
6513
- * (without guards, as long as they are not expected to be focused)
6527
+ * !__WARNING__! Low level API.
6528
+ *
6529
+ * @returns anything "focusable", not only tabbable. The difference is in `tabIndex=-1`
6530
+ * (without guards, as long as they are not expected to be ever focused)
6531
+ *
6532
+ * @see {@link getTabbableNodes} to get only tabble nodes element
6533
+ *
6534
+ * @param topNodes - array of top level HTMLElements to search inside
6535
+ * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
6514
6536
  */
6515
- var getAllTabbableNodes = function (topNodes, visibilityCache) {
6537
+ var getFocusableNodes = function (topNodes, visibilityCache) {
6516
6538
  return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);
6517
6539
  };
6518
6540
  /**
@@ -6570,7 +6592,6 @@ var filterNested = function (nodes) {
6570
6592
  /* eslint-enable */
6571
6593
  }
6572
6594
  }
6573
-
6574
6595
  return nodes.filter(function (_, index) {
6575
6596
  return !contained.has(index);
6576
6597
  });
@@ -6585,8 +6606,8 @@ var getTopParent = function (node) {
6585
6606
  };
6586
6607
  /**
6587
6608
  * returns all "focus containers" inside a given node
6588
- * @param node
6589
- * @returns {T}
6609
+ * @param node - node or nodes to look inside
6610
+ * @returns Element[]
6590
6611
  */
6591
6612
  var getAllAffectedNodes = function (node) {
6592
6613
  var nodes = asArray(node);
@@ -6607,6 +6628,10 @@ var safeProbe = function (cb) {
6607
6628
  /**
6608
6629
  * returns active element from document or from nested shadowdoms
6609
6630
  */
6631
+ /**
6632
+ * returns current active element. If the active element is a "container" itself(shadowRoot or iframe) returns active element inside it
6633
+ * @param [inDocument]
6634
+ */
6610
6635
  var getActiveElement = function (inDocument) {
6611
6636
  if (inDocument === void 0) {
6612
6637
  inDocument = document;
@@ -6628,7 +6653,8 @@ var focusInsideIframe = function (topNode, activeElement) {
6628
6653
  }));
6629
6654
  };
6630
6655
  /**
6631
- * @returns {Boolean} true, if the current focus is inside given node or nodes
6656
+ * @returns {Boolean} true, if the current focus is inside given node or nodes.
6657
+ * Supports nodes hidden inside shadowDom
6632
6658
  */
6633
6659
  var focusInside = function (topNode, activeElement) {
6634
6660
  // const activeElement = document && getActiveElement();
@@ -6644,8 +6670,11 @@ var focusInside = function (topNode, activeElement) {
6644
6670
  };
6645
6671
 
6646
6672
  /**
6647
- * focus is hidden FROM the focus-lock
6673
+ * checks if focus is hidden FROM the focus-lock
6648
6674
  * ie contained inside a node focus-lock shall ignore
6675
+ *
6676
+ * This is a utility function coupled with {@link FOCUS_ALLOW} constant
6677
+ *
6649
6678
  * @returns {boolean} focus is currently is in "allow" area
6650
6679
  */
6651
6680
  var focusIsHidden = function (inDocument) {
@@ -6864,16 +6893,21 @@ var reorderNodes = function (srcNodes, dstNodes) {
6864
6893
  }).filter(isDefined);
6865
6894
  };
6866
6895
  /**
6867
- * given top node(s) and the last active element return the element to be focused next
6896
+ * contains the main logic of the `focus-lock` package.
6897
+ *
6898
+ * ! you probably dont need this function !
6899
+ *
6900
+ * given top node(s) and the last active element returns the element to be focused next
6901
+ * @returns element which should be focused to move focus inside
6868
6902
  * @param topNode
6869
6903
  * @param lastNode
6870
6904
  */
6871
- var getFocusMerge = function (topNode, lastNode) {
6905
+ var focusSolver = function (topNode, lastNode) {
6872
6906
  var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);
6873
6907
  var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
6874
6908
  var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);
6875
6909
  var visibilityCache = new Map();
6876
- var anyFocusable = getAllTabbableNodes(entries, visibilityCache);
6910
+ var anyFocusable = getFocusableNodes(entries, visibilityCache);
6877
6911
  var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {
6878
6912
  var node = _a.node;
6879
6913
  return isNotAGuard(node);
@@ -6884,7 +6918,7 @@ var getFocusMerge = function (topNode, lastNode) {
6884
6918
  return undefined;
6885
6919
  }
6886
6920
  }
6887
- var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {
6921
+ var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {
6888
6922
  var node = _a.node;
6889
6923
  return node;
6890
6924
  });
@@ -6912,10 +6946,10 @@ var getFocusMerge = function (topNode, lastNode) {
6912
6946
  };
6913
6947
 
6914
6948
  /**
6915
- * return list of focusable elements inside a given top node
6916
- * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name
6949
+ * @returns list of focusable elements inside a given top node
6950
+ * @see {@link getFocusableNodes} for lower level access
6917
6951
  */
6918
- var getFocusabledIn = function (topNode) {
6952
+ var expandFocusableNodes = function (topNode) {
6919
6953
  var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
6920
6954
  var commonParent = getTopCommonParent(topNode, topNode, entries);
6921
6955
  var visibilityCache = new Map();
@@ -6949,23 +6983,30 @@ var focusOn = function (target, focusOptions) {
6949
6983
  var guardCount = 0;
6950
6984
  var lockDisabled = false;
6951
6985
  /**
6952
- * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.
6986
+ * The main functionality of the focus-lock package
6987
+ *
6988
+ * Contains focus at a given node.
6989
+ * The last focused element will help to determine which element(first or last) should be focused.
6990
+ * The found element will be focused.
6991
+ *
6992
+ * This is one time action (move), not a persistent focus-lock
6993
+ *
6953
6994
  * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus
6954
- * @param topNode
6955
- * @param lastNode
6956
- * @param options
6995
+ * @see {@link focusSolver} for the same functionality without autofocus
6957
6996
  */
6958
- var setFocus = function (topNode, lastNode, options) {
6997
+ var moveFocusInside = function (topNode, lastNode, options) {
6959
6998
  if (options === void 0) {
6960
6999
  options = {};
6961
7000
  }
6962
- var focusable = getFocusMerge(topNode, lastNode);
7001
+ var focusable = focusSolver(topNode, lastNode);
7002
+ // global local side effect to countain recursive lock activation and resolve focus-fighting
6963
7003
  if (lockDisabled) {
6964
7004
  return;
6965
7005
  }
6966
7006
  if (focusable) {
7007
+ /** +FOCUS-FIGHTING prevention **/
6967
7008
  if (guardCount > 2) {
6968
- // tslint:disable-next-line:no-console
7009
+ // we have recursive entered back the lock activation
6969
7010
  console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' + 'See https://github.com/theKashey/focus-lock/#focus-fighting');
6970
7011
  lockDisabled = true;
6971
7012
  setTimeout(function () {
@@ -7082,7 +7123,7 @@ var activateTrap = function activateTrap() {
7082
7123
  }
7083
7124
  document.body.focus();
7084
7125
  } else {
7085
- result = setFocus(workingArea, lastActiveFocus, {
7126
+ result = moveFocusInside(workingArea, lastActiveFocus, {
7086
7127
  focusOptions: focusOptions
7087
7128
  });
7088
7129
  lastPortaledElement = {};
@@ -7094,7 +7135,7 @@ var activateTrap = function activateTrap() {
7094
7135
  }
7095
7136
  if (document) {
7096
7137
  var newActiveElement = document && document.activeElement;
7097
- var allNodes = getFocusabledIn(workingArea);
7138
+ var allNodes = expandFocusableNodes(workingArea);
7098
7139
  var focusedIndex = allNodes.map(function (_ref) {
7099
7140
  var node = _ref.node;
7100
7141
  return node;
@@ -7200,7 +7241,7 @@ mediumFocus.assignSyncMedium(onFocus);
7200
7241
  mediumBlur.assignMedium(onBlur);
7201
7242
  mediumEffect.assignMedium(function (cb) {
7202
7243
  return cb({
7203
- moveFocusInside: setFocus,
7244
+ moveFocusInside: moveFocusInside,
7204
7245
  focusInside: focusInside
7205
7246
  });
7206
7247
  });
@@ -8687,7 +8728,7 @@ function Monthly(props) {
8687
8728
  }), weekNo && /* @__PURE__ */jsx(Box, {
8688
8729
  children: /* @__PURE__ */jsx(Select, {
8689
8730
  name: "day",
8690
- value: dayNo ? dayNo : 1,
8731
+ value: dayNo ? dayNo : 0,
8691
8732
  onChange: handleChange,
8692
8733
  children: DAYS.map((day, i) => {
8693
8734
  const weekday = new Weekday(i);
@@ -9054,7 +9095,8 @@ function RecurringDates(props) {
9054
9095
  defaultRecurrences,
9055
9096
  hideEndDate,
9056
9097
  hideCustom,
9057
- dateTimeOptions
9098
+ dateTimeOptions,
9099
+ dateOnly
9058
9100
  } = {
9059
9101
  ...pluginConfig,
9060
9102
  ...options
@@ -9098,6 +9140,21 @@ function RecurringDates(props) {
9098
9140
  ...dateTimeOptions
9099
9141
  };
9100
9142
  }
9143
+ if (dateOnly === true) {
9144
+ if ((startDateMember == null ? void 0 : startDateMember.kind) == "field") {
9145
+ startDateMember.field.schemaType.name = "date";
9146
+ }
9147
+ if ((endDateMember == null ? void 0 : endDateMember.kind) == "field") {
9148
+ endDateMember.field.schemaType.name = "date";
9149
+ }
9150
+ } else {
9151
+ if ((startDateMember == null ? void 0 : startDateMember.kind) == "field") {
9152
+ startDateMember.field.schemaType.name = "datetime";
9153
+ }
9154
+ if ((endDateMember == null ? void 0 : endDateMember.kind) == "field") {
9155
+ endDateMember.field.schemaType.name = "datetime";
9156
+ }
9157
+ }
9101
9158
  const hasEndDate = currentValue && currentValue.endDate;
9102
9159
  return /* @__PURE__ */jsxs(Stack, {
9103
9160
  space: 3,
@@ -9172,7 +9229,8 @@ function RecurringDates(props) {
9172
9229
  }
9173
9230
  var recurringDateSchema = config => {
9174
9231
  const {
9175
- dateTimeOptions
9232
+ dateTimeOptions,
9233
+ dateOnly
9176
9234
  } = config;
9177
9235
  return defineField({
9178
9236
  name: "recurringDates",
@@ -9181,13 +9239,13 @@ var recurringDateSchema = config => {
9181
9239
  fields: [defineField({
9182
9240
  title: "Start Date",
9183
9241
  name: "startDate",
9184
- type: "datetime",
9242
+ type: dateOnly ? "date" : "datetime",
9185
9243
  options: dateTimeOptions,
9186
9244
  validation: Rule => Rule.required()
9187
9245
  }), defineField({
9188
9246
  title: "End Date",
9189
9247
  name: "endDate",
9190
- type: "datetime",
9248
+ type: dateOnly ? "date" : "datetime",
9191
9249
  options: dateTimeOptions,
9192
9250
  validation: Rule => Rule.min(Rule.valueOfField("startDate"))
9193
9251
  }), defineField({