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.js CHANGED
@@ -45,7 +45,6 @@ const DEFAULT_COUNTS = [5,
45
45
  30
46
46
  // daily
47
47
  ];
48
-
49
48
  const validateRRuleString = recurrence => {
50
49
  try {
51
50
  rrule.rrulestr(recurrence);
@@ -186,20 +185,23 @@ var moment$1 = {
186
185
  };
187
186
  }
188
187
  function isValid(m) {
189
- if (m._isValid == null) {
190
- var flags = getParsingFlags(m),
191
- parsedParts = some.call(flags.parsedDateParts, function (i) {
192
- return i != null;
193
- }),
194
- 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);
188
+ var flags = null,
189
+ parsedParts = false,
190
+ isNowValid = m._d && !isNaN(m._d.getTime());
191
+ if (isNowValid) {
192
+ flags = getParsingFlags(m);
193
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
194
+ return i != null;
195
+ });
196
+ 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);
195
197
  if (m._strict) {
196
198
  isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === undefined;
197
199
  }
198
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
199
- m._isValid = isNowValid;
200
- } else {
201
- return isNowValid;
202
- }
200
+ }
201
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
202
+ m._isValid = isNowValid;
203
+ } else {
204
+ return isNowValid;
203
205
  }
204
206
  return m._isValid;
205
207
  }
@@ -551,11 +553,56 @@ var moment$1 = {
551
553
  var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
552
554
  return isFunction(format) ? format(output) : format.replace(/%s/i, output);
553
555
  }
554
- var aliases = {};
555
- function addUnitAlias(unit, shorthand) {
556
- var lowerCase = unit.toLowerCase();
557
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
558
- }
556
+ var aliases = {
557
+ D: 'date',
558
+ dates: 'date',
559
+ date: 'date',
560
+ d: 'day',
561
+ days: 'day',
562
+ day: 'day',
563
+ e: 'weekday',
564
+ weekdays: 'weekday',
565
+ weekday: 'weekday',
566
+ E: 'isoWeekday',
567
+ isoweekdays: 'isoWeekday',
568
+ isoweekday: 'isoWeekday',
569
+ DDD: 'dayOfYear',
570
+ dayofyears: 'dayOfYear',
571
+ dayofyear: 'dayOfYear',
572
+ h: 'hour',
573
+ hours: 'hour',
574
+ hour: 'hour',
575
+ ms: 'millisecond',
576
+ milliseconds: 'millisecond',
577
+ millisecond: 'millisecond',
578
+ m: 'minute',
579
+ minutes: 'minute',
580
+ minute: 'minute',
581
+ M: 'month',
582
+ months: 'month',
583
+ month: 'month',
584
+ Q: 'quarter',
585
+ quarters: 'quarter',
586
+ quarter: 'quarter',
587
+ s: 'second',
588
+ seconds: 'second',
589
+ second: 'second',
590
+ gg: 'weekYear',
591
+ weekyears: 'weekYear',
592
+ weekyear: 'weekYear',
593
+ GG: 'isoWeekYear',
594
+ isoweekyears: 'isoWeekYear',
595
+ isoweekyear: 'isoWeekYear',
596
+ w: 'week',
597
+ weeks: 'week',
598
+ week: 'week',
599
+ W: 'isoWeek',
600
+ isoweeks: 'isoWeek',
601
+ isoweek: 'isoWeek',
602
+ y: 'year',
603
+ years: 'year',
604
+ year: 'year'
605
+ };
559
606
  function normalizeUnits(units) {
560
607
  return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined;
561
608
  }
@@ -573,10 +620,24 @@ var moment$1 = {
573
620
  }
574
621
  return normalizedInput;
575
622
  }
576
- var priorities = {};
577
- function addUnitPriority(unit, priority) {
578
- priorities[unit] = priority;
579
- }
623
+ var priorities = {
624
+ date: 9,
625
+ day: 11,
626
+ weekday: 11,
627
+ isoWeekday: 11,
628
+ dayOfYear: 4,
629
+ hour: 13,
630
+ millisecond: 16,
631
+ minute: 14,
632
+ month: 8,
633
+ quarter: 7,
634
+ second: 15,
635
+ weekYear: 1,
636
+ isoWeekYear: 1,
637
+ week: 5,
638
+ isoWeek: 5,
639
+ year: 1
640
+ };
580
641
  function getPrioritizedUnits(unitsObj) {
581
642
  var units = [],
582
643
  u;
@@ -593,76 +654,6 @@ var moment$1 = {
593
654
  });
594
655
  return units;
595
656
  }
596
- function isLeapYear(year) {
597
- return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
598
- }
599
- function absFloor(number) {
600
- if (number < 0) {
601
- // -0 -> 0
602
- return Math.ceil(number) || 0;
603
- } else {
604
- return Math.floor(number);
605
- }
606
- }
607
- function toInt(argumentForCoercion) {
608
- var coercedNumber = +argumentForCoercion,
609
- value = 0;
610
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
611
- value = absFloor(coercedNumber);
612
- }
613
- return value;
614
- }
615
- function makeGetSet(unit, keepTime) {
616
- return function (value) {
617
- if (value != null) {
618
- set$1(this, unit, value);
619
- hooks.updateOffset(this, keepTime);
620
- return this;
621
- } else {
622
- return get(this, unit);
623
- }
624
- };
625
- }
626
- function get(mom, unit) {
627
- return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN;
628
- }
629
- function set$1(mom, unit, value) {
630
- if (mom.isValid() && !isNaN(value)) {
631
- if (unit === 'FullYear' && isLeapYear(mom.year()) && mom.month() === 1 && mom.date() === 29) {
632
- value = toInt(value);
633
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value, mom.month(), daysInMonth(value, mom.month()));
634
- } else {
635
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
636
- }
637
- }
638
- }
639
-
640
- // MOMENTS
641
-
642
- function stringGet(units) {
643
- units = normalizeUnits(units);
644
- if (isFunction(this[units])) {
645
- return this[units]();
646
- }
647
- return this;
648
- }
649
- function stringSet(units, value) {
650
- if (typeof units === 'object') {
651
- units = normalizeObjectUnits(units);
652
- var prioritized = getPrioritizedUnits(units),
653
- i,
654
- prioritizedLen = prioritized.length;
655
- for (i = 0; i < prioritizedLen; i++) {
656
- this[prioritized[i].unit](units[prioritized[i].unit]);
657
- }
658
- } else {
659
- units = normalizeUnits(units);
660
- if (isFunction(this[units])) {
661
- return this[units](value);
662
- }
663
- }
664
- return this;
665
- }
666
657
  var match1 = /\d/,
667
658
  // 0 - 9
668
659
  match2 = /\d\d/,
@@ -698,6 +689,10 @@ var moment$1 = {
698
689
  // any word (or two) characters or numbers including two/three word month in arabic.
699
690
  // includes scottish gaelic two word and hyphenated months
700
691
  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,
692
+ match1to2NoLeadingZero = /^[1-9]\d?/,
693
+ // 1-99
694
+ match1to2HasZero = /^([1-9]\d|\d)/,
695
+ // 0-99
701
696
  regexes;
702
697
  regexes = {};
703
698
  function addRegexToken(token, regex, strictRegex) {
@@ -721,6 +716,22 @@ var moment$1 = {
721
716
  function regexEscape(s) {
722
717
  return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
723
718
  }
719
+ function absFloor(number) {
720
+ if (number < 0) {
721
+ // -0 -> 0
722
+ return Math.ceil(number) || 0;
723
+ } else {
724
+ return Math.floor(number);
725
+ }
726
+ }
727
+ function toInt(argumentForCoercion) {
728
+ var coercedNumber = +argumentForCoercion,
729
+ value = 0;
730
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
731
+ value = absFloor(coercedNumber);
732
+ }
733
+ return value;
734
+ }
724
735
  var tokens = {};
725
736
  function addParseToken(token, callback) {
726
737
  var i,
@@ -750,6 +761,9 @@ var moment$1 = {
750
761
  tokens[token](input, config._a, config, token);
751
762
  }
752
763
  }
764
+ function isLeapYear(year) {
765
+ return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
766
+ }
753
767
  var YEAR = 0,
754
768
  MONTH = 1,
755
769
  DATE = 2,
@@ -759,6 +773,157 @@ var moment$1 = {
759
773
  MILLISECOND = 6,
760
774
  WEEK = 7,
761
775
  WEEKDAY = 8;
776
+
777
+ // FORMATTING
778
+
779
+ addFormatToken('Y', 0, 0, function () {
780
+ var y = this.year();
781
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
782
+ });
783
+ addFormatToken(0, ['YY', 2], 0, function () {
784
+ return this.year() % 100;
785
+ });
786
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
787
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
788
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
789
+
790
+ // PARSING
791
+
792
+ addRegexToken('Y', matchSigned);
793
+ addRegexToken('YY', match1to2, match2);
794
+ addRegexToken('YYYY', match1to4, match4);
795
+ addRegexToken('YYYYY', match1to6, match6);
796
+ addRegexToken('YYYYYY', match1to6, match6);
797
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
798
+ addParseToken('YYYY', function (input, array) {
799
+ array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
800
+ });
801
+ addParseToken('YY', function (input, array) {
802
+ array[YEAR] = hooks.parseTwoDigitYear(input);
803
+ });
804
+ addParseToken('Y', function (input, array) {
805
+ array[YEAR] = parseInt(input, 10);
806
+ });
807
+
808
+ // HELPERS
809
+
810
+ function daysInYear(year) {
811
+ return isLeapYear(year) ? 366 : 365;
812
+ }
813
+
814
+ // HOOKS
815
+
816
+ hooks.parseTwoDigitYear = function (input) {
817
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
818
+ };
819
+
820
+ // MOMENTS
821
+
822
+ var getSetYear = makeGetSet('FullYear', true);
823
+ function getIsLeapYear() {
824
+ return isLeapYear(this.year());
825
+ }
826
+ function makeGetSet(unit, keepTime) {
827
+ return function (value) {
828
+ if (value != null) {
829
+ set$1(this, unit, value);
830
+ hooks.updateOffset(this, keepTime);
831
+ return this;
832
+ } else {
833
+ return get(this, unit);
834
+ }
835
+ };
836
+ }
837
+ function get(mom, unit) {
838
+ if (!mom.isValid()) {
839
+ return NaN;
840
+ }
841
+ var d = mom._d,
842
+ isUTC = mom._isUTC;
843
+ switch (unit) {
844
+ case 'Milliseconds':
845
+ return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
846
+ case 'Seconds':
847
+ return isUTC ? d.getUTCSeconds() : d.getSeconds();
848
+ case 'Minutes':
849
+ return isUTC ? d.getUTCMinutes() : d.getMinutes();
850
+ case 'Hours':
851
+ return isUTC ? d.getUTCHours() : d.getHours();
852
+ case 'Date':
853
+ return isUTC ? d.getUTCDate() : d.getDate();
854
+ case 'Day':
855
+ return isUTC ? d.getUTCDay() : d.getDay();
856
+ case 'Month':
857
+ return isUTC ? d.getUTCMonth() : d.getMonth();
858
+ case 'FullYear':
859
+ return isUTC ? d.getUTCFullYear() : d.getFullYear();
860
+ default:
861
+ return NaN;
862
+ // Just in case
863
+ }
864
+ }
865
+ function set$1(mom, unit, value) {
866
+ var d, isUTC, year, month, date;
867
+ if (!mom.isValid() || isNaN(value)) {
868
+ return;
869
+ }
870
+ d = mom._d;
871
+ isUTC = mom._isUTC;
872
+ switch (unit) {
873
+ case 'Milliseconds':
874
+ return void (isUTC ? d.setUTCMilliseconds(value) : d.setMilliseconds(value));
875
+ case 'Seconds':
876
+ return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
877
+ case 'Minutes':
878
+ return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
879
+ case 'Hours':
880
+ return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
881
+ case 'Date':
882
+ return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
883
+ // case 'Day': // Not real
884
+ // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
885
+ // case 'Month': // Not used because we need to pass two variables
886
+ // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
887
+ case 'FullYear':
888
+ break;
889
+ // See below ...
890
+ default:
891
+ return;
892
+ // Just in case
893
+ }
894
+ year = value;
895
+ month = mom.month();
896
+ date = mom.date();
897
+ date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
898
+ void (isUTC ? d.setUTCFullYear(year, month, date) : d.setFullYear(year, month, date));
899
+ }
900
+
901
+ // MOMENTS
902
+
903
+ function stringGet(units) {
904
+ units = normalizeUnits(units);
905
+ if (isFunction(this[units])) {
906
+ return this[units]();
907
+ }
908
+ return this;
909
+ }
910
+ function stringSet(units, value) {
911
+ if (typeof units === 'object') {
912
+ units = normalizeObjectUnits(units);
913
+ var prioritized = getPrioritizedUnits(units),
914
+ i,
915
+ prioritizedLen = prioritized.length;
916
+ for (i = 0; i < prioritizedLen; i++) {
917
+ this[prioritized[i].unit](units[prioritized[i].unit]);
918
+ }
919
+ } else {
920
+ units = normalizeUnits(units);
921
+ if (isFunction(this[units])) {
922
+ return this[units](value);
923
+ }
924
+ }
925
+ return this;
926
+ }
762
927
  function mod(n, x) {
763
928
  return (n % x + x) % x;
764
929
  }
@@ -798,17 +963,9 @@ var moment$1 = {
798
963
  return this.localeData().months(this, format);
799
964
  });
800
965
 
801
- // ALIASES
802
-
803
- addUnitAlias('month', 'M');
804
-
805
- // PRIORITY
806
-
807
- addUnitPriority('month', 8);
808
-
809
966
  // PARSING
810
967
 
811
- addRegexToken('M', match1to2);
968
+ addRegexToken('M', match1to2, match1to2NoLeadingZero);
812
969
  addRegexToken('MM', match1to2, match2);
813
970
  addRegexToken('MMM', function (isStrict, locale) {
814
971
  return locale.monthsShortRegex(isStrict);
@@ -929,7 +1086,6 @@ var moment$1 = {
929
1086
  // MOMENTS
930
1087
 
931
1088
  function setMonth(mom, value) {
932
- var dayOfMonth;
933
1089
  if (!mom.isValid()) {
934
1090
  // No op
935
1091
  return mom;
@@ -945,8 +1101,10 @@ var moment$1 = {
945
1101
  }
946
1102
  }
947
1103
  }
948
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
949
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1104
+ var month = value,
1105
+ date = mom.date();
1106
+ date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
1107
+ void (mom._isUTC ? mom._d.setUTCMonth(month, date) : mom._d.setMonth(month, date));
950
1108
  return mom;
951
1109
  }
952
1110
  function getSetMonth(value) {
@@ -1003,90 +1161,29 @@ var moment$1 = {
1003
1161
  longPieces = [],
1004
1162
  mixedPieces = [],
1005
1163
  i,
1006
- mom;
1164
+ mom,
1165
+ shortP,
1166
+ longP;
1007
1167
  for (i = 0; i < 12; i++) {
1008
1168
  // make the regex if we don't have it already
1009
1169
  mom = createUTC([2000, i]);
1010
- shortPieces.push(this.monthsShort(mom, ''));
1011
- longPieces.push(this.months(mom, ''));
1012
- mixedPieces.push(this.months(mom, ''));
1013
- mixedPieces.push(this.monthsShort(mom, ''));
1170
+ shortP = regexEscape(this.monthsShort(mom, ''));
1171
+ longP = regexEscape(this.months(mom, ''));
1172
+ shortPieces.push(shortP);
1173
+ longPieces.push(longP);
1174
+ mixedPieces.push(longP);
1175
+ mixedPieces.push(shortP);
1014
1176
  }
1015
1177
  // Sorting makes sure if one month (or abbr) is a prefix of another it
1016
1178
  // will match the longer piece.
1017
1179
  shortPieces.sort(cmpLenRev);
1018
1180
  longPieces.sort(cmpLenRev);
1019
1181
  mixedPieces.sort(cmpLenRev);
1020
- for (i = 0; i < 12; i++) {
1021
- shortPieces[i] = regexEscape(shortPieces[i]);
1022
- longPieces[i] = regexEscape(longPieces[i]);
1023
- }
1024
- for (i = 0; i < 24; i++) {
1025
- mixedPieces[i] = regexEscape(mixedPieces[i]);
1026
- }
1027
1182
  this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1028
1183
  this._monthsShortRegex = this._monthsRegex;
1029
1184
  this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i');
1030
1185
  this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i');
1031
1186
  }
1032
-
1033
- // FORMATTING
1034
-
1035
- addFormatToken('Y', 0, 0, function () {
1036
- var y = this.year();
1037
- return y <= 9999 ? zeroFill(y, 4) : '+' + y;
1038
- });
1039
- addFormatToken(0, ['YY', 2], 0, function () {
1040
- return this.year() % 100;
1041
- });
1042
- addFormatToken(0, ['YYYY', 4], 0, 'year');
1043
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
1044
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1045
-
1046
- // ALIASES
1047
-
1048
- addUnitAlias('year', 'y');
1049
-
1050
- // PRIORITIES
1051
-
1052
- addUnitPriority('year', 1);
1053
-
1054
- // PARSING
1055
-
1056
- addRegexToken('Y', matchSigned);
1057
- addRegexToken('YY', match1to2, match2);
1058
- addRegexToken('YYYY', match1to4, match4);
1059
- addRegexToken('YYYYY', match1to6, match6);
1060
- addRegexToken('YYYYYY', match1to6, match6);
1061
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1062
- addParseToken('YYYY', function (input, array) {
1063
- array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
1064
- });
1065
- addParseToken('YY', function (input, array) {
1066
- array[YEAR] = hooks.parseTwoDigitYear(input);
1067
- });
1068
- addParseToken('Y', function (input, array) {
1069
- array[YEAR] = parseInt(input, 10);
1070
- });
1071
-
1072
- // HELPERS
1073
-
1074
- function daysInYear(year) {
1075
- return isLeapYear(year) ? 366 : 365;
1076
- }
1077
-
1078
- // HOOKS
1079
-
1080
- hooks.parseTwoDigitYear = function (input) {
1081
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1082
- };
1083
-
1084
- // MOMENTS
1085
-
1086
- var getSetYear = makeGetSet('FullYear', true);
1087
- function getIsLeapYear() {
1088
- return isLeapYear(this.year());
1089
- }
1090
1187
  function createDate(y, m, d, h, M, s, ms) {
1091
1188
  // can't just apply() to create a date:
1092
1189
  // https://stackoverflow.com/q/181348
@@ -1183,21 +1280,11 @@ var moment$1 = {
1183
1280
  addFormatToken('w', ['ww', 2], 'wo', 'week');
1184
1281
  addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1185
1282
 
1186
- // ALIASES
1187
-
1188
- addUnitAlias('week', 'w');
1189
- addUnitAlias('isoWeek', 'W');
1190
-
1191
- // PRIORITIES
1192
-
1193
- addUnitPriority('week', 5);
1194
- addUnitPriority('isoWeek', 5);
1195
-
1196
1283
  // PARSING
1197
1284
 
1198
- addRegexToken('w', match1to2);
1285
+ addRegexToken('w', match1to2, match1to2NoLeadingZero);
1199
1286
  addRegexToken('ww', match1to2, match2);
1200
- addRegexToken('W', match1to2);
1287
+ addRegexToken('W', match1to2, match1to2NoLeadingZero);
1201
1288
  addRegexToken('WW', match1to2, match2);
1202
1289
  addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
1203
1290
  week[token.substr(0, 1)] = toInt(input);
@@ -1215,7 +1302,6 @@ var moment$1 = {
1215
1302
  // Sunday is the first day of the week.
1216
1303
  doy: 6 // The week that contains Jan 6th is the first week of the year.
1217
1304
  };
1218
-
1219
1305
  function localeFirstDayOfWeek() {
1220
1306
  return this._week.dow;
1221
1307
  }
@@ -1249,17 +1335,6 @@ var moment$1 = {
1249
1335
  addFormatToken('e', 0, 0, 'weekday');
1250
1336
  addFormatToken('E', 0, 0, 'isoWeekday');
1251
1337
 
1252
- // ALIASES
1253
-
1254
- addUnitAlias('day', 'd');
1255
- addUnitAlias('weekday', 'e');
1256
- addUnitAlias('isoWeekday', 'E');
1257
-
1258
- // PRIORITY
1259
- addUnitPriority('day', 11);
1260
- addUnitPriority('weekday', 11);
1261
- addUnitPriority('isoWeekday', 11);
1262
-
1263
1338
  // PARSING
1264
1339
 
1265
1340
  addRegexToken('d', match1to2);
@@ -1436,7 +1511,7 @@ var moment$1 = {
1436
1511
  if (!this.isValid()) {
1437
1512
  return input != null ? this : NaN;
1438
1513
  }
1439
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1514
+ var day = get(this, 'Day');
1440
1515
  if (input != null) {
1441
1516
  input = parseWeekday(input, this.localeData());
1442
1517
  return this.add(input - day, 'd');
@@ -1589,13 +1664,6 @@ var moment$1 = {
1589
1664
  meridiem('a', true);
1590
1665
  meridiem('A', false);
1591
1666
 
1592
- // ALIASES
1593
-
1594
- addUnitAlias('hour', 'h');
1595
-
1596
- // PRIORITY
1597
- addUnitPriority('hour', 13);
1598
-
1599
1667
  // PARSING
1600
1668
 
1601
1669
  function matchMeridiem(isStrict, locale) {
@@ -1603,9 +1671,9 @@ var moment$1 = {
1603
1671
  }
1604
1672
  addRegexToken('a', matchMeridiem);
1605
1673
  addRegexToken('A', matchMeridiem);
1606
- addRegexToken('H', match1to2);
1607
- addRegexToken('h', match1to2);
1608
- addRegexToken('k', match1to2);
1674
+ addRegexToken('H', match1to2, match1to2HasZero);
1675
+ addRegexToken('h', match1to2, match1to2NoLeadingZero);
1676
+ addRegexToken('k', match1to2, match1to2NoLeadingZero);
1609
1677
  addRegexToken('HH', match1to2, match2);
1610
1678
  addRegexToken('hh', match1to2, match2);
1611
1679
  addRegexToken('kk', match1to2, match2);
@@ -1738,7 +1806,8 @@ var moment$1 = {
1738
1806
  }
1739
1807
  function isLocaleNameSane(name) {
1740
1808
  // Prevent names that look like filesystem paths, i.e contain '/' or '\'
1741
- return name.match('^[^/\\\\]*$') != null;
1809
+ // Ensure name is available and function returns boolean
1810
+ return !!(name && name.match('^[^/\\\\]*$'));
1742
1811
  }
1743
1812
  function loadLocale(name) {
1744
1813
  var oldLocale = null,
@@ -1756,7 +1825,6 @@ var moment$1 = {
1756
1825
  locales[name] = null; // null means not found
1757
1826
  }
1758
1827
  }
1759
-
1760
1828
  return locales[name];
1761
1829
  }
1762
1830
 
@@ -2547,7 +2615,6 @@ var moment$1 = {
2547
2615
  if (unitHasDecimal) {
2548
2616
  return false; // only allow non-integers for smallest unit
2549
2617
  }
2550
-
2551
2618
  if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
2552
2619
  unitHasDecimal = true;
2553
2620
  }
@@ -3635,14 +3702,20 @@ var moment$1 = {
3635
3702
  mixedPieces = [],
3636
3703
  i,
3637
3704
  l,
3705
+ erasName,
3706
+ erasAbbr,
3707
+ erasNarrow,
3638
3708
  eras = this.eras();
3639
3709
  for (i = 0, l = eras.length; i < l; ++i) {
3640
- namePieces.push(regexEscape(eras[i].name));
3641
- abbrPieces.push(regexEscape(eras[i].abbr));
3642
- narrowPieces.push(regexEscape(eras[i].narrow));
3643
- mixedPieces.push(regexEscape(eras[i].name));
3644
- mixedPieces.push(regexEscape(eras[i].abbr));
3645
- mixedPieces.push(regexEscape(eras[i].narrow));
3710
+ erasName = regexEscape(eras[i].name);
3711
+ erasAbbr = regexEscape(eras[i].abbr);
3712
+ erasNarrow = regexEscape(eras[i].narrow);
3713
+ namePieces.push(erasName);
3714
+ abbrPieces.push(erasAbbr);
3715
+ narrowPieces.push(erasNarrow);
3716
+ mixedPieces.push(erasName);
3717
+ mixedPieces.push(erasAbbr);
3718
+ mixedPieces.push(erasNarrow);
3646
3719
  }
3647
3720
  this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
3648
3721
  this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
@@ -3668,14 +3741,6 @@ var moment$1 = {
3668
3741
 
3669
3742
  // ALIASES
3670
3743
 
3671
- addUnitAlias('weekYear', 'gg');
3672
- addUnitAlias('isoWeekYear', 'GG');
3673
-
3674
- // PRIORITY
3675
-
3676
- addUnitPriority('weekYear', 1);
3677
- addUnitPriority('isoWeekYear', 1);
3678
-
3679
3744
  // PARSING
3680
3745
 
3681
3746
  addRegexToken('G', matchSigned);
@@ -3696,7 +3761,7 @@ var moment$1 = {
3696
3761
  // MOMENTS
3697
3762
 
3698
3763
  function getSetWeekYear(input) {
3699
- return getSetWeekYearHelper.call(this, input, this.week(), this.weekday(), this.localeData()._week.dow, this.localeData()._week.doy);
3764
+ return getSetWeekYearHelper.call(this, input, this.week(), this.weekday() + this.localeData()._week.dow, this.localeData()._week.dow, this.localeData()._week.doy);
3700
3765
  }
3701
3766
  function getSetISOWeekYear(input) {
3702
3767
  return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4);
@@ -3740,14 +3805,6 @@ var moment$1 = {
3740
3805
 
3741
3806
  addFormatToken('Q', 0, 'Qo', 'quarter');
3742
3807
 
3743
- // ALIASES
3744
-
3745
- addUnitAlias('quarter', 'Q');
3746
-
3747
- // PRIORITY
3748
-
3749
- addUnitPriority('quarter', 7);
3750
-
3751
3808
  // PARSING
3752
3809
 
3753
3810
  addRegexToken('Q', match1);
@@ -3765,16 +3822,9 @@ var moment$1 = {
3765
3822
 
3766
3823
  addFormatToken('D', ['DD', 2], 'Do', 'date');
3767
3824
 
3768
- // ALIASES
3769
-
3770
- addUnitAlias('date', 'D');
3771
-
3772
- // PRIORITY
3773
- addUnitPriority('date', 9);
3774
-
3775
3825
  // PARSING
3776
3826
 
3777
- addRegexToken('D', match1to2);
3827
+ addRegexToken('D', match1to2, match1to2NoLeadingZero);
3778
3828
  addRegexToken('DD', match1to2, match2);
3779
3829
  addRegexToken('Do', function (isStrict, locale) {
3780
3830
  // TODO: Remove "ordinalParse" fallback in next major release.
@@ -3793,13 +3843,6 @@ var moment$1 = {
3793
3843
 
3794
3844
  addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
3795
3845
 
3796
- // ALIASES
3797
-
3798
- addUnitAlias('dayOfYear', 'DDD');
3799
-
3800
- // PRIORITY
3801
- addUnitPriority('dayOfYear', 4);
3802
-
3803
3846
  // PARSING
3804
3847
 
3805
3848
  addRegexToken('DDD', match1to3);
@@ -3821,17 +3864,9 @@ var moment$1 = {
3821
3864
 
3822
3865
  addFormatToken('m', ['mm', 2], 0, 'minute');
3823
3866
 
3824
- // ALIASES
3825
-
3826
- addUnitAlias('minute', 'm');
3827
-
3828
- // PRIORITY
3829
-
3830
- addUnitPriority('minute', 14);
3831
-
3832
3867
  // PARSING
3833
3868
 
3834
- addRegexToken('m', match1to2);
3869
+ addRegexToken('m', match1to2, match1to2HasZero);
3835
3870
  addRegexToken('mm', match1to2, match2);
3836
3871
  addParseToken(['m', 'mm'], MINUTE);
3837
3872
 
@@ -3843,17 +3878,9 @@ var moment$1 = {
3843
3878
 
3844
3879
  addFormatToken('s', ['ss', 2], 0, 'second');
3845
3880
 
3846
- // ALIASES
3847
-
3848
- addUnitAlias('second', 's');
3849
-
3850
- // PRIORITY
3851
-
3852
- addUnitPriority('second', 15);
3853
-
3854
3881
  // PARSING
3855
3882
 
3856
- addRegexToken('s', match1to2);
3883
+ addRegexToken('s', match1to2, match1to2HasZero);
3857
3884
  addRegexToken('ss', match1to2, match2);
3858
3885
  addParseToken(['s', 'ss'], SECOND);
3859
3886
 
@@ -3889,14 +3916,6 @@ var moment$1 = {
3889
3916
  return this.millisecond() * 1000000;
3890
3917
  });
3891
3918
 
3892
- // ALIASES
3893
-
3894
- addUnitAlias('millisecond', 'ms');
3895
-
3896
- // PRIORITY
3897
-
3898
- addUnitPriority('millisecond', 16);
3899
-
3900
3919
  // PARSING
3901
3920
 
3902
3921
  addRegexToken('S', match1to3, match1);
@@ -4289,14 +4308,6 @@ var moment$1 = {
4289
4308
  }
4290
4309
  }
4291
4310
  }
4292
-
4293
- // TODO: Use this.as('ms')?
4294
- function valueOf$1() {
4295
- if (!this.isValid()) {
4296
- return NaN;
4297
- }
4298
- return this._milliseconds + this._days * 864e5 + this._months % 12 * 2592e6 + toInt(this._months / 12) * 31536e6;
4299
- }
4300
4311
  function makeAs(alias) {
4301
4312
  return function () {
4302
4313
  return this.as(alias);
@@ -4310,7 +4321,8 @@ var moment$1 = {
4310
4321
  asWeeks = makeAs('w'),
4311
4322
  asMonths = makeAs('M'),
4312
4323
  asQuarters = makeAs('Q'),
4313
- asYears = makeAs('y');
4324
+ asYears = makeAs('y'),
4325
+ valueOf$1 = asMilliseconds;
4314
4326
  function clone$1() {
4315
4327
  return createDuration(this);
4316
4328
  }
@@ -4533,7 +4545,7 @@ var moment$1 = {
4533
4545
 
4534
4546
  //! moment.js
4535
4547
 
4536
- hooks.version = '2.29.4';
4548
+ hooks.version = '2.30.1';
4537
4549
  setHookCallback(createLocal);
4538
4550
  hooks.fn = proto;
4539
4551
  hooks.min = min;
@@ -4583,7 +4595,6 @@ var moment$1 = {
4583
4595
  // <input type="week" />
4584
4596
  MONTH: 'YYYY-MM' // <input type="month" />
4585
4597
  };
4586
-
4587
4598
  return hooks;
4588
4599
  });
4589
4600
  })(moment$1);
@@ -4634,132 +4645,86 @@ function _extends() {
4634
4645
  var propTypes$1 = {
4635
4646
  exports: {}
4636
4647
  };
4637
- var reactIs = {
4638
- exports: {}
4639
- };
4640
- var reactIs_production_min = {};
4641
4648
 
4642
- /** @license React v16.13.1
4643
- * react-is.production.min.js
4649
+ /**
4650
+ * Copyright (c) 2013-present, Facebook, Inc.
4644
4651
  *
4645
- * Copyright (c) Facebook, Inc. and its affiliates.
4652
+ * This source code is licensed under the MIT license found in the
4653
+ * LICENSE file in the root directory of this source tree.
4654
+ */
4655
+
4656
+ var ReactPropTypesSecret_1;
4657
+ var hasRequiredReactPropTypesSecret;
4658
+ function requireReactPropTypesSecret() {
4659
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
4660
+ hasRequiredReactPropTypesSecret = 1;
4661
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
4662
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
4663
+ return ReactPropTypesSecret_1;
4664
+ }
4665
+
4666
+ /**
4667
+ * Copyright (c) 2013-present, Facebook, Inc.
4646
4668
  *
4647
4669
  * This source code is licensed under the MIT license found in the
4648
4670
  * LICENSE file in the root directory of this source tree.
4649
4671
  */
4650
4672
 
4651
- var hasRequiredReactIs_production_min;
4652
- function requireReactIs_production_min() {
4653
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
4654
- hasRequiredReactIs_production_min = 1;
4655
- var b = "function" === typeof Symbol && Symbol.for,
4656
- c = b ? Symbol.for("react.element") : 60103,
4657
- d = b ? Symbol.for("react.portal") : 60106,
4658
- e = b ? Symbol.for("react.fragment") : 60107,
4659
- f = b ? Symbol.for("react.strict_mode") : 60108,
4660
- g = b ? Symbol.for("react.profiler") : 60114,
4661
- h = b ? Symbol.for("react.provider") : 60109,
4662
- k = b ? Symbol.for("react.context") : 60110,
4663
- l = b ? Symbol.for("react.async_mode") : 60111,
4664
- m = b ? Symbol.for("react.concurrent_mode") : 60111,
4665
- n = b ? Symbol.for("react.forward_ref") : 60112,
4666
- p = b ? Symbol.for("react.suspense") : 60113,
4667
- q = b ? Symbol.for("react.suspense_list") : 60120,
4668
- r = b ? Symbol.for("react.memo") : 60115,
4669
- t = b ? Symbol.for("react.lazy") : 60116,
4670
- v = b ? Symbol.for("react.block") : 60121,
4671
- w = b ? Symbol.for("react.fundamental") : 60117,
4672
- x = b ? Symbol.for("react.responder") : 60118,
4673
- y = b ? Symbol.for("react.scope") : 60119;
4674
- function z(a) {
4675
- if ("object" === typeof a && null !== a) {
4676
- var u = a.$$typeof;
4677
- switch (u) {
4678
- case c:
4679
- switch (a = a.type, a) {
4680
- case l:
4681
- case m:
4682
- case e:
4683
- case g:
4684
- case f:
4685
- case p:
4686
- return a;
4687
- default:
4688
- switch (a = a && a.$$typeof, a) {
4689
- case k:
4690
- case n:
4691
- case t:
4692
- case r:
4693
- case h:
4694
- return a;
4695
- default:
4696
- return u;
4697
- }
4698
- }
4699
- case d:
4700
- return u;
4673
+ var factoryWithThrowingShims;
4674
+ var hasRequiredFactoryWithThrowingShims;
4675
+ function requireFactoryWithThrowingShims() {
4676
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
4677
+ hasRequiredFactoryWithThrowingShims = 1;
4678
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
4679
+ function emptyFunction() {}
4680
+ function emptyFunctionWithReset() {}
4681
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
4682
+ factoryWithThrowingShims = function () {
4683
+ function shim(props, propName, componentName, location, propFullName, secret) {
4684
+ if (secret === ReactPropTypesSecret) {
4685
+ // It is still safe when called from React.
4686
+ return;
4701
4687
  }
4688
+ 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');
4689
+ err.name = 'Invariant Violation';
4690
+ throw err;
4702
4691
  }
4703
- }
4704
- function A(a) {
4705
- return z(a) === m;
4706
- }
4707
- reactIs_production_min.AsyncMode = l;
4708
- reactIs_production_min.ConcurrentMode = m;
4709
- reactIs_production_min.ContextConsumer = k;
4710
- reactIs_production_min.ContextProvider = h;
4711
- reactIs_production_min.Element = c;
4712
- reactIs_production_min.ForwardRef = n;
4713
- reactIs_production_min.Fragment = e;
4714
- reactIs_production_min.Lazy = t;
4715
- reactIs_production_min.Memo = r;
4716
- reactIs_production_min.Portal = d;
4717
- reactIs_production_min.Profiler = g;
4718
- reactIs_production_min.StrictMode = f;
4719
- reactIs_production_min.Suspense = p;
4720
- reactIs_production_min.isAsyncMode = function (a) {
4721
- return A(a) || z(a) === l;
4722
- };
4723
- reactIs_production_min.isConcurrentMode = A;
4724
- reactIs_production_min.isContextConsumer = function (a) {
4725
- return z(a) === k;
4726
- };
4727
- reactIs_production_min.isContextProvider = function (a) {
4728
- return z(a) === h;
4729
- };
4730
- reactIs_production_min.isElement = function (a) {
4731
- return "object" === typeof a && null !== a && a.$$typeof === c;
4732
- };
4733
- reactIs_production_min.isForwardRef = function (a) {
4734
- return z(a) === n;
4735
- };
4736
- reactIs_production_min.isFragment = function (a) {
4737
- return z(a) === e;
4738
- };
4739
- reactIs_production_min.isLazy = function (a) {
4740
- return z(a) === t;
4741
- };
4742
- reactIs_production_min.isMemo = function (a) {
4743
- return z(a) === r;
4744
- };
4745
- reactIs_production_min.isPortal = function (a) {
4746
- return z(a) === d;
4747
- };
4748
- reactIs_production_min.isProfiler = function (a) {
4749
- return z(a) === g;
4750
- };
4751
- reactIs_production_min.isStrictMode = function (a) {
4752
- return z(a) === f;
4753
- };
4754
- reactIs_production_min.isSuspense = function (a) {
4755
- return z(a) === p;
4756
- };
4757
- reactIs_production_min.isValidElementType = function (a) {
4758
- 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);
4692
+ shim.isRequired = shim;
4693
+ function getShim() {
4694
+ return shim;
4695
+ } // Important!
4696
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
4697
+ var ReactPropTypes = {
4698
+ array: shim,
4699
+ bigint: shim,
4700
+ bool: shim,
4701
+ func: shim,
4702
+ number: shim,
4703
+ object: shim,
4704
+ string: shim,
4705
+ symbol: shim,
4706
+ any: shim,
4707
+ arrayOf: getShim,
4708
+ element: shim,
4709
+ elementType: shim,
4710
+ instanceOf: getShim,
4711
+ node: shim,
4712
+ objectOf: getShim,
4713
+ oneOf: getShim,
4714
+ oneOfType: getShim,
4715
+ shape: getShim,
4716
+ exact: getShim,
4717
+ checkPropTypes: emptyFunctionWithReset,
4718
+ resetWarningCache: emptyFunction
4719
+ };
4720
+ ReactPropTypes.PropTypes = ReactPropTypes;
4721
+ return ReactPropTypes;
4759
4722
  };
4760
- reactIs_production_min.typeOf = z;
4761
- return reactIs_production_min;
4723
+ return factoryWithThrowingShims;
4762
4724
  }
4725
+ var reactIs = {
4726
+ exports: {}
4727
+ };
4763
4728
  var reactIs_development = {};
4764
4729
 
4765
4730
  /** @license React v16.13.1
@@ -4932,6 +4897,129 @@ function requireReactIs_development() {
4932
4897
  }
4933
4898
  return reactIs_development;
4934
4899
  }
4900
+ var reactIs_production_min = {};
4901
+
4902
+ /** @license React v16.13.1
4903
+ * react-is.production.min.js
4904
+ *
4905
+ * Copyright (c) Facebook, Inc. and its affiliates.
4906
+ *
4907
+ * This source code is licensed under the MIT license found in the
4908
+ * LICENSE file in the root directory of this source tree.
4909
+ */
4910
+
4911
+ var hasRequiredReactIs_production_min;
4912
+ function requireReactIs_production_min() {
4913
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
4914
+ hasRequiredReactIs_production_min = 1;
4915
+ var b = "function" === typeof Symbol && Symbol.for,
4916
+ c = b ? Symbol.for("react.element") : 60103,
4917
+ d = b ? Symbol.for("react.portal") : 60106,
4918
+ e = b ? Symbol.for("react.fragment") : 60107,
4919
+ f = b ? Symbol.for("react.strict_mode") : 60108,
4920
+ g = b ? Symbol.for("react.profiler") : 60114,
4921
+ h = b ? Symbol.for("react.provider") : 60109,
4922
+ k = b ? Symbol.for("react.context") : 60110,
4923
+ l = b ? Symbol.for("react.async_mode") : 60111,
4924
+ m = b ? Symbol.for("react.concurrent_mode") : 60111,
4925
+ n = b ? Symbol.for("react.forward_ref") : 60112,
4926
+ p = b ? Symbol.for("react.suspense") : 60113,
4927
+ q = b ? Symbol.for("react.suspense_list") : 60120,
4928
+ r = b ? Symbol.for("react.memo") : 60115,
4929
+ t = b ? Symbol.for("react.lazy") : 60116,
4930
+ v = b ? Symbol.for("react.block") : 60121,
4931
+ w = b ? Symbol.for("react.fundamental") : 60117,
4932
+ x = b ? Symbol.for("react.responder") : 60118,
4933
+ y = b ? Symbol.for("react.scope") : 60119;
4934
+ function z(a) {
4935
+ if ("object" === typeof a && null !== a) {
4936
+ var u = a.$$typeof;
4937
+ switch (u) {
4938
+ case c:
4939
+ switch (a = a.type, a) {
4940
+ case l:
4941
+ case m:
4942
+ case e:
4943
+ case g:
4944
+ case f:
4945
+ case p:
4946
+ return a;
4947
+ default:
4948
+ switch (a = a && a.$$typeof, a) {
4949
+ case k:
4950
+ case n:
4951
+ case t:
4952
+ case r:
4953
+ case h:
4954
+ return a;
4955
+ default:
4956
+ return u;
4957
+ }
4958
+ }
4959
+ case d:
4960
+ return u;
4961
+ }
4962
+ }
4963
+ }
4964
+ function A(a) {
4965
+ return z(a) === m;
4966
+ }
4967
+ reactIs_production_min.AsyncMode = l;
4968
+ reactIs_production_min.ConcurrentMode = m;
4969
+ reactIs_production_min.ContextConsumer = k;
4970
+ reactIs_production_min.ContextProvider = h;
4971
+ reactIs_production_min.Element = c;
4972
+ reactIs_production_min.ForwardRef = n;
4973
+ reactIs_production_min.Fragment = e;
4974
+ reactIs_production_min.Lazy = t;
4975
+ reactIs_production_min.Memo = r;
4976
+ reactIs_production_min.Portal = d;
4977
+ reactIs_production_min.Profiler = g;
4978
+ reactIs_production_min.StrictMode = f;
4979
+ reactIs_production_min.Suspense = p;
4980
+ reactIs_production_min.isAsyncMode = function (a) {
4981
+ return A(a) || z(a) === l;
4982
+ };
4983
+ reactIs_production_min.isConcurrentMode = A;
4984
+ reactIs_production_min.isContextConsumer = function (a) {
4985
+ return z(a) === k;
4986
+ };
4987
+ reactIs_production_min.isContextProvider = function (a) {
4988
+ return z(a) === h;
4989
+ };
4990
+ reactIs_production_min.isElement = function (a) {
4991
+ return "object" === typeof a && null !== a && a.$$typeof === c;
4992
+ };
4993
+ reactIs_production_min.isForwardRef = function (a) {
4994
+ return z(a) === n;
4995
+ };
4996
+ reactIs_production_min.isFragment = function (a) {
4997
+ return z(a) === e;
4998
+ };
4999
+ reactIs_production_min.isLazy = function (a) {
5000
+ return z(a) === t;
5001
+ };
5002
+ reactIs_production_min.isMemo = function (a) {
5003
+ return z(a) === r;
5004
+ };
5005
+ reactIs_production_min.isPortal = function (a) {
5006
+ return z(a) === d;
5007
+ };
5008
+ reactIs_production_min.isProfiler = function (a) {
5009
+ return z(a) === g;
5010
+ };
5011
+ reactIs_production_min.isStrictMode = function (a) {
5012
+ return z(a) === f;
5013
+ };
5014
+ reactIs_production_min.isSuspense = function (a) {
5015
+ return z(a) === p;
5016
+ };
5017
+ reactIs_production_min.isValidElementType = function (a) {
5018
+ 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);
5019
+ };
5020
+ reactIs_production_min.typeOf = z;
5021
+ return reactIs_production_min;
5022
+ }
4935
5023
  var hasRequiredReactIs;
4936
5024
  function requireReactIs() {
4937
5025
  if (hasRequiredReactIs) return reactIs.exports;
@@ -5030,23 +5118,6 @@ function requireObjectAssign() {
5030
5118
  };
5031
5119
  return objectAssign;
5032
5120
  }
5033
-
5034
- /**
5035
- * Copyright (c) 2013-present, Facebook, Inc.
5036
- *
5037
- * This source code is licensed under the MIT license found in the
5038
- * LICENSE file in the root directory of this source tree.
5039
- */
5040
-
5041
- var ReactPropTypesSecret_1;
5042
- var hasRequiredReactPropTypesSecret;
5043
- function requireReactPropTypesSecret() {
5044
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
5045
- hasRequiredReactPropTypesSecret = 1;
5046
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5047
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
5048
- return ReactPropTypesSecret_1;
5049
- }
5050
5121
  var has;
5051
5122
  var hasRequiredHas;
5052
5123
  function requireHas() {
@@ -5701,66 +5772,6 @@ function requireFactoryWithTypeCheckers() {
5701
5772
  return factoryWithTypeCheckers;
5702
5773
  }
5703
5774
 
5704
- /**
5705
- * Copyright (c) 2013-present, Facebook, Inc.
5706
- *
5707
- * This source code is licensed under the MIT license found in the
5708
- * LICENSE file in the root directory of this source tree.
5709
- */
5710
-
5711
- var factoryWithThrowingShims;
5712
- var hasRequiredFactoryWithThrowingShims;
5713
- function requireFactoryWithThrowingShims() {
5714
- if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
5715
- hasRequiredFactoryWithThrowingShims = 1;
5716
- var ReactPropTypesSecret = requireReactPropTypesSecret();
5717
- function emptyFunction() {}
5718
- function emptyFunctionWithReset() {}
5719
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
5720
- factoryWithThrowingShims = function () {
5721
- function shim(props, propName, componentName, location, propFullName, secret) {
5722
- if (secret === ReactPropTypesSecret) {
5723
- // It is still safe when called from React.
5724
- return;
5725
- }
5726
- 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');
5727
- err.name = 'Invariant Violation';
5728
- throw err;
5729
- }
5730
- shim.isRequired = shim;
5731
- function getShim() {
5732
- return shim;
5733
- } // Important!
5734
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5735
- var ReactPropTypes = {
5736
- array: shim,
5737
- bigint: shim,
5738
- bool: shim,
5739
- func: shim,
5740
- number: shim,
5741
- object: shim,
5742
- string: shim,
5743
- symbol: shim,
5744
- any: shim,
5745
- arrayOf: getShim,
5746
- element: shim,
5747
- elementType: shim,
5748
- instanceOf: getShim,
5749
- node: shim,
5750
- objectOf: getShim,
5751
- oneOf: getShim,
5752
- oneOfType: getShim,
5753
- shape: getShim,
5754
- exact: getShim,
5755
- checkPropTypes: emptyFunctionWithReset,
5756
- resetWarningCache: emptyFunction
5757
- };
5758
- ReactPropTypes.PropTypes = ReactPropTypes;
5759
- return ReactPropTypes;
5760
- };
5761
- return factoryWithThrowingShims;
5762
- }
5763
-
5764
5775
  /**
5765
5776
  * Copyright (c) 2013-present, Facebook, Inc.
5766
5777
  *
@@ -6042,7 +6053,6 @@ var mediumSidecar = createSidecarMedium({
6042
6053
  // however, it might be required for JSDOM tests
6043
6054
  // ssr: true,
6044
6055
  });
6045
-
6046
6056
  var emptyArray = [];
6047
6057
  var FocusLock$1 = /*#__PURE__*/React__namespace.forwardRef(function FocusLockUI(props, parentRef) {
6048
6058
  var _extends2;
@@ -6241,31 +6251,31 @@ function _inheritsLoose(subClass, superClass) {
6241
6251
  subClass.prototype.constructor = subClass;
6242
6252
  _setPrototypeOf(subClass, superClass);
6243
6253
  }
6244
- function _typeof(obj) {
6254
+ function _typeof(o) {
6245
6255
  "@babel/helpers - typeof";
6246
6256
 
6247
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
6248
- return typeof obj;
6249
- } : function (obj) {
6250
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
6251
- }, _typeof(obj);
6257
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
6258
+ return typeof o;
6259
+ } : function (o) {
6260
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
6261
+ }, _typeof(o);
6252
6262
  }
6253
- function _toPrimitive(input, hint) {
6254
- if (_typeof(input) !== "object" || input === null) return input;
6255
- var prim = input[Symbol.toPrimitive];
6256
- if (prim !== undefined) {
6257
- var res = prim.call(input, hint || "default");
6258
- if (_typeof(res) !== "object") return res;
6263
+ function toPrimitive(t, r) {
6264
+ if ("object" != _typeof(t) || !t) return t;
6265
+ var e = t[Symbol.toPrimitive];
6266
+ if (void 0 !== e) {
6267
+ var i = e.call(t, r || "default");
6268
+ if ("object" != _typeof(i)) return i;
6259
6269
  throw new TypeError("@@toPrimitive must return a primitive value.");
6260
6270
  }
6261
- return (hint === "string" ? String : Number)(input);
6271
+ return ("string" === r ? String : Number)(t);
6262
6272
  }
6263
- function _toPropertyKey(arg) {
6264
- var key = _toPrimitive(arg, "string");
6265
- return _typeof(key) === "symbol" ? key : String(key);
6273
+ function toPropertyKey(t) {
6274
+ var i = toPrimitive(t, "string");
6275
+ return "symbol" == _typeof(i) ? i : String(i);
6266
6276
  }
6267
6277
  function _defineProperty(obj, key, value) {
6268
- key = _toPropertyKey(key);
6278
+ key = toPropertyKey(key);
6269
6279
  if (key in obj) {
6270
6280
  Object.defineProperty(obj, key, {
6271
6281
  value: value,
@@ -6526,17 +6536,29 @@ var filterAutoFocusable = function (nodes, cache) {
6526
6536
  });
6527
6537
  };
6528
6538
  /**
6529
- * only tabbable ones
6530
- * (but with guards which would be ignored)
6539
+ * !__WARNING__! Low level API.
6540
+ * @returns all tabbable nodes
6541
+ *
6542
+ * @see {@link getFocusableNodes} to get any focusable element
6543
+ *
6544
+ * @param topNodes - array of top level HTMLElements to search inside
6545
+ * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
6531
6546
  */
6532
6547
  var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {
6533
6548
  return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);
6534
6549
  };
6535
6550
  /**
6536
- * actually anything "focusable", not only tabbable
6537
- * (without guards, as long as they are not expected to be focused)
6551
+ * !__WARNING__! Low level API.
6552
+ *
6553
+ * @returns anything "focusable", not only tabbable. The difference is in `tabIndex=-1`
6554
+ * (without guards, as long as they are not expected to be ever focused)
6555
+ *
6556
+ * @see {@link getTabbableNodes} to get only tabble nodes element
6557
+ *
6558
+ * @param topNodes - array of top level HTMLElements to search inside
6559
+ * @param visibilityCache - an cache to store intermediate measurements. Expected to be a fresh `new Map` on every call
6538
6560
  */
6539
- var getAllTabbableNodes = function (topNodes, visibilityCache) {
6561
+ var getFocusableNodes = function (topNodes, visibilityCache) {
6540
6562
  return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);
6541
6563
  };
6542
6564
  /**
@@ -6594,7 +6616,6 @@ var filterNested = function (nodes) {
6594
6616
  /* eslint-enable */
6595
6617
  }
6596
6618
  }
6597
-
6598
6619
  return nodes.filter(function (_, index) {
6599
6620
  return !contained.has(index);
6600
6621
  });
@@ -6609,8 +6630,8 @@ var getTopParent = function (node) {
6609
6630
  };
6610
6631
  /**
6611
6632
  * returns all "focus containers" inside a given node
6612
- * @param node
6613
- * @returns {T}
6633
+ * @param node - node or nodes to look inside
6634
+ * @returns Element[]
6614
6635
  */
6615
6636
  var getAllAffectedNodes = function (node) {
6616
6637
  var nodes = asArray(node);
@@ -6631,6 +6652,10 @@ var safeProbe = function (cb) {
6631
6652
  /**
6632
6653
  * returns active element from document or from nested shadowdoms
6633
6654
  */
6655
+ /**
6656
+ * returns current active element. If the active element is a "container" itself(shadowRoot or iframe) returns active element inside it
6657
+ * @param [inDocument]
6658
+ */
6634
6659
  var getActiveElement = function (inDocument) {
6635
6660
  if (inDocument === void 0) {
6636
6661
  inDocument = document;
@@ -6652,7 +6677,8 @@ var focusInsideIframe = function (topNode, activeElement) {
6652
6677
  }));
6653
6678
  };
6654
6679
  /**
6655
- * @returns {Boolean} true, if the current focus is inside given node or nodes
6680
+ * @returns {Boolean} true, if the current focus is inside given node or nodes.
6681
+ * Supports nodes hidden inside shadowDom
6656
6682
  */
6657
6683
  var focusInside = function (topNode, activeElement) {
6658
6684
  // const activeElement = document && getActiveElement();
@@ -6668,8 +6694,11 @@ var focusInside = function (topNode, activeElement) {
6668
6694
  };
6669
6695
 
6670
6696
  /**
6671
- * focus is hidden FROM the focus-lock
6697
+ * checks if focus is hidden FROM the focus-lock
6672
6698
  * ie contained inside a node focus-lock shall ignore
6699
+ *
6700
+ * This is a utility function coupled with {@link FOCUS_ALLOW} constant
6701
+ *
6673
6702
  * @returns {boolean} focus is currently is in "allow" area
6674
6703
  */
6675
6704
  var focusIsHidden = function (inDocument) {
@@ -6888,16 +6917,21 @@ var reorderNodes = function (srcNodes, dstNodes) {
6888
6917
  }).filter(isDefined);
6889
6918
  };
6890
6919
  /**
6891
- * given top node(s) and the last active element return the element to be focused next
6920
+ * contains the main logic of the `focus-lock` package.
6921
+ *
6922
+ * ! you probably dont need this function !
6923
+ *
6924
+ * given top node(s) and the last active element returns the element to be focused next
6925
+ * @returns element which should be focused to move focus inside
6892
6926
  * @param topNode
6893
6927
  * @param lastNode
6894
6928
  */
6895
- var getFocusMerge = function (topNode, lastNode) {
6929
+ var focusSolver = function (topNode, lastNode) {
6896
6930
  var activeElement = getActiveElement(asArray(topNode).length > 0 ? document : getFirst(topNode).ownerDocument);
6897
6931
  var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
6898
6932
  var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);
6899
6933
  var visibilityCache = new Map();
6900
- var anyFocusable = getAllTabbableNodes(entries, visibilityCache);
6934
+ var anyFocusable = getFocusableNodes(entries, visibilityCache);
6901
6935
  var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {
6902
6936
  var node = _a.node;
6903
6937
  return isNotAGuard(node);
@@ -6908,7 +6942,7 @@ var getFocusMerge = function (topNode, lastNode) {
6908
6942
  return undefined;
6909
6943
  }
6910
6944
  }
6911
- var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {
6945
+ var outerNodes = getFocusableNodes([commonParent], visibilityCache).map(function (_a) {
6912
6946
  var node = _a.node;
6913
6947
  return node;
6914
6948
  });
@@ -6936,10 +6970,10 @@ var getFocusMerge = function (topNode, lastNode) {
6936
6970
  };
6937
6971
 
6938
6972
  /**
6939
- * return list of focusable elements inside a given top node
6940
- * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name
6973
+ * @returns list of focusable elements inside a given top node
6974
+ * @see {@link getFocusableNodes} for lower level access
6941
6975
  */
6942
- var getFocusabledIn = function (topNode) {
6976
+ var expandFocusableNodes = function (topNode) {
6943
6977
  var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);
6944
6978
  var commonParent = getTopCommonParent(topNode, topNode, entries);
6945
6979
  var visibilityCache = new Map();
@@ -6973,23 +7007,30 @@ var focusOn = function (target, focusOptions) {
6973
7007
  var guardCount = 0;
6974
7008
  var lockDisabled = false;
6975
7009
  /**
6976
- * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.
7010
+ * The main functionality of the focus-lock package
7011
+ *
7012
+ * Contains focus at a given node.
7013
+ * The last focused element will help to determine which element(first or last) should be focused.
7014
+ * The found element will be focused.
7015
+ *
7016
+ * This is one time action (move), not a persistent focus-lock
7017
+ *
6977
7018
  * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus
6978
- * @param topNode
6979
- * @param lastNode
6980
- * @param options
7019
+ * @see {@link focusSolver} for the same functionality without autofocus
6981
7020
  */
6982
- var setFocus = function (topNode, lastNode, options) {
7021
+ var moveFocusInside = function (topNode, lastNode, options) {
6983
7022
  if (options === void 0) {
6984
7023
  options = {};
6985
7024
  }
6986
- var focusable = getFocusMerge(topNode, lastNode);
7025
+ var focusable = focusSolver(topNode, lastNode);
7026
+ // global local side effect to countain recursive lock activation and resolve focus-fighting
6987
7027
  if (lockDisabled) {
6988
7028
  return;
6989
7029
  }
6990
7030
  if (focusable) {
7031
+ /** +FOCUS-FIGHTING prevention **/
6991
7032
  if (guardCount > 2) {
6992
- // tslint:disable-next-line:no-console
7033
+ // we have recursive entered back the lock activation
6993
7034
  console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' + 'See https://github.com/theKashey/focus-lock/#focus-fighting');
6994
7035
  lockDisabled = true;
6995
7036
  setTimeout(function () {
@@ -7106,7 +7147,7 @@ var activateTrap = function activateTrap() {
7106
7147
  }
7107
7148
  document.body.focus();
7108
7149
  } else {
7109
- result = setFocus(workingArea, lastActiveFocus, {
7150
+ result = moveFocusInside(workingArea, lastActiveFocus, {
7110
7151
  focusOptions: focusOptions
7111
7152
  });
7112
7153
  lastPortaledElement = {};
@@ -7118,7 +7159,7 @@ var activateTrap = function activateTrap() {
7118
7159
  }
7119
7160
  if (document) {
7120
7161
  var newActiveElement = document && document.activeElement;
7121
- var allNodes = getFocusabledIn(workingArea);
7162
+ var allNodes = expandFocusableNodes(workingArea);
7122
7163
  var focusedIndex = allNodes.map(function (_ref) {
7123
7164
  var node = _ref.node;
7124
7165
  return node;
@@ -7224,7 +7265,7 @@ mediumFocus.assignSyncMedium(onFocus);
7224
7265
  mediumBlur.assignMedium(onBlur);
7225
7266
  mediumEffect.assignMedium(function (cb) {
7226
7267
  return cb({
7227
- moveFocusInside: setFocus,
7268
+ moveFocusInside: moveFocusInside,
7228
7269
  focusInside: focusInside
7229
7270
  });
7230
7271
  });
@@ -8711,7 +8752,7 @@ function Monthly(props) {
8711
8752
  }), weekNo && /* @__PURE__ */jsxRuntime.jsx(ui.Box, {
8712
8753
  children: /* @__PURE__ */jsxRuntime.jsx(ui.Select, {
8713
8754
  name: "day",
8714
- value: dayNo ? dayNo : 1,
8755
+ value: dayNo ? dayNo : 0,
8715
8756
  onChange: handleChange,
8716
8757
  children: DAYS.map((day, i) => {
8717
8758
  const weekday = new rrule.Weekday(i);
@@ -9078,7 +9119,8 @@ function RecurringDates(props) {
9078
9119
  defaultRecurrences,
9079
9120
  hideEndDate,
9080
9121
  hideCustom,
9081
- dateTimeOptions
9122
+ dateTimeOptions,
9123
+ dateOnly
9082
9124
  } = {
9083
9125
  ...pluginConfig,
9084
9126
  ...options
@@ -9122,6 +9164,21 @@ function RecurringDates(props) {
9122
9164
  ...dateTimeOptions
9123
9165
  };
9124
9166
  }
9167
+ if (dateOnly === true) {
9168
+ if ((startDateMember == null ? void 0 : startDateMember.kind) == "field") {
9169
+ startDateMember.field.schemaType.name = "date";
9170
+ }
9171
+ if ((endDateMember == null ? void 0 : endDateMember.kind) == "field") {
9172
+ endDateMember.field.schemaType.name = "date";
9173
+ }
9174
+ } else {
9175
+ if ((startDateMember == null ? void 0 : startDateMember.kind) == "field") {
9176
+ startDateMember.field.schemaType.name = "datetime";
9177
+ }
9178
+ if ((endDateMember == null ? void 0 : endDateMember.kind) == "field") {
9179
+ endDateMember.field.schemaType.name = "datetime";
9180
+ }
9181
+ }
9125
9182
  const hasEndDate = currentValue && currentValue.endDate;
9126
9183
  return /* @__PURE__ */jsxRuntime.jsxs(ui.Stack, {
9127
9184
  space: 3,
@@ -9196,7 +9253,8 @@ function RecurringDates(props) {
9196
9253
  }
9197
9254
  var recurringDateSchema = config => {
9198
9255
  const {
9199
- dateTimeOptions
9256
+ dateTimeOptions,
9257
+ dateOnly
9200
9258
  } = config;
9201
9259
  return sanity.defineField({
9202
9260
  name: "recurringDates",
@@ -9205,13 +9263,13 @@ var recurringDateSchema = config => {
9205
9263
  fields: [sanity.defineField({
9206
9264
  title: "Start Date",
9207
9265
  name: "startDate",
9208
- type: "datetime",
9266
+ type: dateOnly ? "date" : "datetime",
9209
9267
  options: dateTimeOptions,
9210
9268
  validation: Rule => Rule.required()
9211
9269
  }), sanity.defineField({
9212
9270
  title: "End Date",
9213
9271
  name: "endDate",
9214
- type: "datetime",
9272
+ type: dateOnly ? "date" : "datetime",
9215
9273
  options: dateTimeOptions,
9216
9274
  validation: Rule => Rule.min(Rule.valueOfField("startDate"))
9217
9275
  }), sanity.defineField({