@everymatrix/casino-game-thumb-view 1.56.0 → 1.56.2

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.
Files changed (55) hide show
  1. package/dist/casino-game-thumb-view/casino-game-thumb-view.esm.js +1 -1
  2. package/dist/casino-game-thumb-view/{p-600af885.entry.js → p-0f03c743.entry.js} +1 -1
  3. package/dist/casino-game-thumb-view/p-358a4af8.entry.js +7 -0
  4. package/dist/casino-game-thumb-view/p-4ece4698.js +8 -0
  5. package/dist/casino-game-thumb-view/p-74a4ae4a.entry.js +1 -0
  6. package/dist/casino-game-thumb-view/p-a0c26052.entry.js +1 -0
  7. package/dist/casino-game-thumb-view/p-b5a64db5.js +2 -0
  8. package/dist/casino-game-thumb-view/p-d6ec6d6a.entry.js +1 -0
  9. package/dist/casino-game-thumb-view/p-fd38189d.entry.js +1 -0
  10. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +5 -1
  11. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +6 -1
  12. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +4 -4
  13. package/dist/cjs/casino-game-thumb-view.cjs.js +2 -2
  14. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +41 -52
  15. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +8 -3
  16. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +2 -1
  17. package/dist/cjs/{index-b36c6933.js → index-81c5b70d.js} +136 -289
  18. package/dist/cjs/loader.cjs.js +1 -1
  19. package/dist/cjs/{utils-c4ed3adc.js → utils-21e506f8.js} +365 -368
  20. package/dist/collection/collection-manifest.json +2 -2
  21. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +4 -4
  22. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +7 -2
  23. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +3 -5
  24. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +33 -99
  25. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +3 -5
  26. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +4 -3
  27. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +6 -27
  28. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +3 -2
  29. package/dist/esm/casino-extrainfo-baccarat.entry.js +5 -1
  30. package/dist/esm/casino-extrainfo-blackjack.entry.js +6 -1
  31. package/dist/esm/casino-extrainfo-roulette.entry.js +4 -4
  32. package/dist/esm/casino-game-thumb-view.js +3 -3
  33. package/dist/esm/casino-game-thumb-view_2.entry.js +41 -52
  34. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +8 -3
  35. package/dist/esm/casino-normal-game-thumbnail.entry.js +2 -1
  36. package/dist/esm/{index-23b4a4c5.js → index-8058a16f.js} +136 -289
  37. package/dist/esm/loader.js +2 -2
  38. package/dist/esm/{utils-090ac2e9.js → utils-d11d0845.js} +365 -368
  39. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +2 -0
  40. package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +2 -0
  41. package/dist/types/stencil-public-runtime.d.ts +0 -6
  42. package/package.json +1 -1
  43. package/dist/casino-game-thumb-view/p-13741d4d.js +0 -2
  44. package/dist/casino-game-thumb-view/p-53ba085b.entry.js +0 -1
  45. package/dist/casino-game-thumb-view/p-b13b5c25.entry.js +0 -1
  46. package/dist/casino-game-thumb-view/p-c6ee2783.entry.js +0 -1
  47. package/dist/casino-game-thumb-view/p-d2580653.js +0 -8
  48. package/dist/casino-game-thumb-view/p-dd797f50.entry.js +0 -7
  49. package/dist/casino-game-thumb-view/p-ee2bdcce.entry.js +0 -1
  50. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.d.ts +0 -2
  51. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/packages/stencil/casino-game-thumb-view/stencil.config.dev.d.ts +0 -2
  52. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/index.d.ts +0 -0
  53. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  54. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  55. /package/dist/types/Users/{adrian.pripon/Documents/Work → maria.bumbar/Desktop}/widgets-monorepo/packages/stencil/casino-game-thumb-view/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -1,5 +1,5 @@
1
1
  //! moment.js
2
- //! version : 2.30.1
2
+ //! version : 2.29.4
3
3
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
4
  //! license : MIT
5
5
  //! momentjs.com
@@ -149,25 +149,24 @@ if (Array.prototype.some) {
149
149
  }
150
150
 
151
151
  function isValid(m) {
152
- var flags = null,
153
- parsedParts = false,
154
- isNowValid = m._d && !isNaN(m._d.getTime());
155
- if (isNowValid) {
156
- flags = getParsingFlags(m);
157
- parsedParts = some.call(flags.parsedDateParts, function (i) {
158
- return i != null;
159
- });
160
- isNowValid =
161
- flags.overflow < 0 &&
162
- !flags.empty &&
163
- !flags.invalidEra &&
164
- !flags.invalidMonth &&
165
- !flags.invalidWeekday &&
166
- !flags.weekdayMismatch &&
167
- !flags.nullInput &&
168
- !flags.invalidFormat &&
169
- !flags.userInvalidated &&
170
- (!flags.meridiem || (flags.meridiem && parsedParts));
152
+ if (m._isValid == null) {
153
+ var flags = getParsingFlags(m),
154
+ parsedParts = some.call(flags.parsedDateParts, function (i) {
155
+ return i != null;
156
+ }),
157
+ isNowValid =
158
+ !isNaN(m._d.getTime()) &&
159
+ flags.overflow < 0 &&
160
+ !flags.empty &&
161
+ !flags.invalidEra &&
162
+ !flags.invalidMonth &&
163
+ !flags.invalidWeekday &&
164
+ !flags.weekdayMismatch &&
165
+ !flags.nullInput &&
166
+ !flags.invalidFormat &&
167
+ !flags.userInvalidated &&
168
+ (!flags.meridiem || (flags.meridiem && parsedParts));
169
+
171
170
  if (m._strict) {
172
171
  isNowValid =
173
172
  isNowValid &&
@@ -175,11 +174,12 @@ function isValid(m) {
175
174
  flags.unusedTokens.length === 0 &&
176
175
  flags.bigHour === undefined;
177
176
  }
178
- }
179
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
180
- m._isValid = isNowValid;
181
- } else {
182
- return isNowValid;
177
+
178
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
179
+ m._isValid = isNowValid;
180
+ } else {
181
+ return isNowValid;
182
+ }
183
183
  }
184
184
  return m._isValid;
185
185
  }
@@ -624,56 +624,12 @@ function pastFuture(diff, output) {
624
624
  return isFunction(format) ? format(output) : format.replace(/%s/i, output);
625
625
  }
626
626
 
627
- var aliases = {
628
- D: 'date',
629
- dates: 'date',
630
- date: 'date',
631
- d: 'day',
632
- days: 'day',
633
- day: 'day',
634
- e: 'weekday',
635
- weekdays: 'weekday',
636
- weekday: 'weekday',
637
- E: 'isoWeekday',
638
- isoweekdays: 'isoWeekday',
639
- isoweekday: 'isoWeekday',
640
- DDD: 'dayOfYear',
641
- dayofyears: 'dayOfYear',
642
- dayofyear: 'dayOfYear',
643
- h: 'hour',
644
- hours: 'hour',
645
- hour: 'hour',
646
- ms: 'millisecond',
647
- milliseconds: 'millisecond',
648
- millisecond: 'millisecond',
649
- m: 'minute',
650
- minutes: 'minute',
651
- minute: 'minute',
652
- M: 'month',
653
- months: 'month',
654
- month: 'month',
655
- Q: 'quarter',
656
- quarters: 'quarter',
657
- quarter: 'quarter',
658
- s: 'second',
659
- seconds: 'second',
660
- second: 'second',
661
- gg: 'weekYear',
662
- weekyears: 'weekYear',
663
- weekyear: 'weekYear',
664
- GG: 'isoWeekYear',
665
- isoweekyears: 'isoWeekYear',
666
- isoweekyear: 'isoWeekYear',
667
- w: 'week',
668
- weeks: 'week',
669
- week: 'week',
670
- W: 'isoWeek',
671
- isoweeks: 'isoWeek',
672
- isoweek: 'isoWeek',
673
- y: 'year',
674
- years: 'year',
675
- year: 'year',
676
- };
627
+ var aliases = {};
628
+
629
+ function addUnitAlias(unit, shorthand) {
630
+ var lowerCase = unit.toLowerCase();
631
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
632
+ }
677
633
 
678
634
  function normalizeUnits(units) {
679
635
  return typeof units === 'string'
@@ -698,24 +654,11 @@ function normalizeObjectUnits(inputObject) {
698
654
  return normalizedInput;
699
655
  }
700
656
 
701
- var priorities = {
702
- date: 9,
703
- day: 11,
704
- weekday: 11,
705
- isoWeekday: 11,
706
- dayOfYear: 4,
707
- hour: 13,
708
- millisecond: 16,
709
- minute: 14,
710
- month: 8,
711
- quarter: 7,
712
- second: 15,
713
- weekYear: 1,
714
- isoWeekYear: 1,
715
- week: 5,
716
- isoWeek: 5,
717
- year: 1,
718
- };
657
+ var priorities = {};
658
+
659
+ function addUnitPriority(unit, priority) {
660
+ priorities[unit] = priority;
661
+ }
719
662
 
720
663
  function getPrioritizedUnits(unitsObj) {
721
664
  var units = [],
@@ -731,6 +674,96 @@ function getPrioritizedUnits(unitsObj) {
731
674
  return units;
732
675
  }
733
676
 
677
+ function isLeapYear(year) {
678
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
679
+ }
680
+
681
+ function absFloor(number) {
682
+ if (number < 0) {
683
+ // -0 -> 0
684
+ return Math.ceil(number) || 0;
685
+ } else {
686
+ return Math.floor(number);
687
+ }
688
+ }
689
+
690
+ function toInt(argumentForCoercion) {
691
+ var coercedNumber = +argumentForCoercion,
692
+ value = 0;
693
+
694
+ if (coercedNumber !== 0 && isFinite(coercedNumber)) {
695
+ value = absFloor(coercedNumber);
696
+ }
697
+
698
+ return value;
699
+ }
700
+
701
+ function makeGetSet(unit, keepTime) {
702
+ return function (value) {
703
+ if (value != null) {
704
+ set$1(this, unit, value);
705
+ hooks.updateOffset(this, keepTime);
706
+ return this;
707
+ } else {
708
+ return get(this, unit);
709
+ }
710
+ };
711
+ }
712
+
713
+ function get(mom, unit) {
714
+ return mom.isValid()
715
+ ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]()
716
+ : NaN;
717
+ }
718
+
719
+ function set$1(mom, unit, value) {
720
+ if (mom.isValid() && !isNaN(value)) {
721
+ if (
722
+ unit === 'FullYear' &&
723
+ isLeapYear(mom.year()) &&
724
+ mom.month() === 1 &&
725
+ mom.date() === 29
726
+ ) {
727
+ value = toInt(value);
728
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](
729
+ value,
730
+ mom.month(),
731
+ daysInMonth(value, mom.month())
732
+ );
733
+ } else {
734
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value);
735
+ }
736
+ }
737
+ }
738
+
739
+ // MOMENTS
740
+
741
+ function stringGet(units) {
742
+ units = normalizeUnits(units);
743
+ if (isFunction(this[units])) {
744
+ return this[units]();
745
+ }
746
+ return this;
747
+ }
748
+
749
+ function stringSet(units, value) {
750
+ if (typeof units === 'object') {
751
+ units = normalizeObjectUnits(units);
752
+ var prioritized = getPrioritizedUnits(units),
753
+ i,
754
+ prioritizedLen = prioritized.length;
755
+ for (i = 0; i < prioritizedLen; i++) {
756
+ this[prioritized[i].unit](units[prioritized[i].unit]);
757
+ }
758
+ } else {
759
+ units = normalizeUnits(units);
760
+ if (isFunction(this[units])) {
761
+ return this[units](value);
762
+ }
763
+ }
764
+ return this;
765
+ }
766
+
734
767
  var match1 = /\d/, // 0 - 9
735
768
  match2 = /\d\d/, // 00 - 99
736
769
  match3 = /\d{3}/, // 000 - 999
@@ -751,8 +784,6 @@ var match1 = /\d/, // 0 - 9
751
784
  // includes scottish gaelic two word and hyphenated months
752
785
  matchWord =
753
786
  /[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,
754
- match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
755
- match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
756
787
  regexes;
757
788
 
758
789
  regexes = {};
@@ -791,26 +822,6 @@ function regexEscape(s) {
791
822
  return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
792
823
  }
793
824
 
794
- function absFloor(number) {
795
- if (number < 0) {
796
- // -0 -> 0
797
- return Math.ceil(number) || 0;
798
- } else {
799
- return Math.floor(number);
800
- }
801
- }
802
-
803
- function toInt(argumentForCoercion) {
804
- var coercedNumber = +argumentForCoercion,
805
- value = 0;
806
-
807
- if (coercedNumber !== 0 && isFinite(coercedNumber)) {
808
- value = absFloor(coercedNumber);
809
- }
810
-
811
- return value;
812
- }
813
-
814
825
  var tokens = {};
815
826
 
816
827
  function addParseToken(token, callback) {
@@ -844,10 +855,6 @@ function addTimeToArrayFromToken(token, input, config) {
844
855
  }
845
856
  }
846
857
 
847
- function isLeapYear(year) {
848
- return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
849
- }
850
-
851
858
  var YEAR = 0,
852
859
  MONTH = 1,
853
860
  DATE = 2,
@@ -858,173 +865,6 @@ var YEAR = 0,
858
865
  WEEK = 7,
859
866
  WEEKDAY = 8;
860
867
 
861
- // FORMATTING
862
-
863
- addFormatToken('Y', 0, 0, function () {
864
- var y = this.year();
865
- return y <= 9999 ? zeroFill(y, 4) : '+' + y;
866
- });
867
-
868
- addFormatToken(0, ['YY', 2], 0, function () {
869
- return this.year() % 100;
870
- });
871
-
872
- addFormatToken(0, ['YYYY', 4], 0, 'year');
873
- addFormatToken(0, ['YYYYY', 5], 0, 'year');
874
- addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
875
-
876
- // PARSING
877
-
878
- addRegexToken('Y', matchSigned);
879
- addRegexToken('YY', match1to2, match2);
880
- addRegexToken('YYYY', match1to4, match4);
881
- addRegexToken('YYYYY', match1to6, match6);
882
- addRegexToken('YYYYYY', match1to6, match6);
883
-
884
- addParseToken(['YYYYY', 'YYYYYY'], YEAR);
885
- addParseToken('YYYY', function (input, array) {
886
- array[YEAR] =
887
- input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
888
- });
889
- addParseToken('YY', function (input, array) {
890
- array[YEAR] = hooks.parseTwoDigitYear(input);
891
- });
892
- addParseToken('Y', function (input, array) {
893
- array[YEAR] = parseInt(input, 10);
894
- });
895
-
896
- // HELPERS
897
-
898
- function daysInYear(year) {
899
- return isLeapYear(year) ? 366 : 365;
900
- }
901
-
902
- // HOOKS
903
-
904
- hooks.parseTwoDigitYear = function (input) {
905
- return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
906
- };
907
-
908
- // MOMENTS
909
-
910
- var getSetYear = makeGetSet('FullYear', true);
911
-
912
- function getIsLeapYear() {
913
- return isLeapYear(this.year());
914
- }
915
-
916
- function makeGetSet(unit, keepTime) {
917
- return function (value) {
918
- if (value != null) {
919
- set$1(this, unit, value);
920
- hooks.updateOffset(this, keepTime);
921
- return this;
922
- } else {
923
- return get(this, unit);
924
- }
925
- };
926
- }
927
-
928
- function get(mom, unit) {
929
- if (!mom.isValid()) {
930
- return NaN;
931
- }
932
-
933
- var d = mom._d,
934
- isUTC = mom._isUTC;
935
-
936
- switch (unit) {
937
- case 'Milliseconds':
938
- return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
939
- case 'Seconds':
940
- return isUTC ? d.getUTCSeconds() : d.getSeconds();
941
- case 'Minutes':
942
- return isUTC ? d.getUTCMinutes() : d.getMinutes();
943
- case 'Hours':
944
- return isUTC ? d.getUTCHours() : d.getHours();
945
- case 'Date':
946
- return isUTC ? d.getUTCDate() : d.getDate();
947
- case 'Day':
948
- return isUTC ? d.getUTCDay() : d.getDay();
949
- case 'Month':
950
- return isUTC ? d.getUTCMonth() : d.getMonth();
951
- case 'FullYear':
952
- return isUTC ? d.getUTCFullYear() : d.getFullYear();
953
- default:
954
- return NaN; // Just in case
955
- }
956
- }
957
-
958
- function set$1(mom, unit, value) {
959
- var d, isUTC, year, month, date;
960
-
961
- if (!mom.isValid() || isNaN(value)) {
962
- return;
963
- }
964
-
965
- d = mom._d;
966
- isUTC = mom._isUTC;
967
-
968
- switch (unit) {
969
- case 'Milliseconds':
970
- return void (isUTC
971
- ? d.setUTCMilliseconds(value)
972
- : d.setMilliseconds(value));
973
- case 'Seconds':
974
- return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
975
- case 'Minutes':
976
- return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
977
- case 'Hours':
978
- return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
979
- case 'Date':
980
- return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
981
- // case 'Day': // Not real
982
- // return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
983
- // case 'Month': // Not used because we need to pass two variables
984
- // return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
985
- case 'FullYear':
986
- break; // See below ...
987
- default:
988
- return; // Just in case
989
- }
990
-
991
- year = value;
992
- month = mom.month();
993
- date = mom.date();
994
- date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
995
- void (isUTC
996
- ? d.setUTCFullYear(year, month, date)
997
- : d.setFullYear(year, month, date));
998
- }
999
-
1000
- // MOMENTS
1001
-
1002
- function stringGet(units) {
1003
- units = normalizeUnits(units);
1004
- if (isFunction(this[units])) {
1005
- return this[units]();
1006
- }
1007
- return this;
1008
- }
1009
-
1010
- function stringSet(units, value) {
1011
- if (typeof units === 'object') {
1012
- units = normalizeObjectUnits(units);
1013
- var prioritized = getPrioritizedUnits(units),
1014
- i,
1015
- prioritizedLen = prioritized.length;
1016
- for (i = 0; i < prioritizedLen; i++) {
1017
- this[prioritized[i].unit](units[prioritized[i].unit]);
1018
- }
1019
- } else {
1020
- units = normalizeUnits(units);
1021
- if (isFunction(this[units])) {
1022
- return this[units](value);
1023
- }
1024
- }
1025
- return this;
1026
- }
1027
-
1028
868
  function mod(n, x) {
1029
869
  return ((n % x) + x) % x;
1030
870
  }
@@ -1073,9 +913,17 @@ addFormatToken('MMMM', 0, 0, function (format) {
1073
913
  return this.localeData().months(this, format);
1074
914
  });
1075
915
 
916
+ // ALIASES
917
+
918
+ addUnitAlias('month', 'M');
919
+
920
+ // PRIORITY
921
+
922
+ addUnitPriority('month', 8);
923
+
1076
924
  // PARSING
1077
925
 
1078
- addRegexToken('M', match1to2, match1to2NoLeadingZero);
926
+ addRegexToken('M', match1to2);
1079
927
  addRegexToken('MM', match1to2, match2);
1080
928
  addRegexToken('MMM', function (isStrict, locale) {
1081
929
  return locale.monthsShortRegex(isStrict);
@@ -1241,6 +1089,8 @@ function localeMonthsParse(monthName, format, strict) {
1241
1089
  // MOMENTS
1242
1090
 
1243
1091
  function setMonth(mom, value) {
1092
+ var dayOfMonth;
1093
+
1244
1094
  if (!mom.isValid()) {
1245
1095
  // No op
1246
1096
  return mom;
@@ -1258,13 +1108,8 @@ function setMonth(mom, value) {
1258
1108
  }
1259
1109
  }
1260
1110
 
1261
- var month = value,
1262
- date = mom.date();
1263
-
1264
- date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
1265
- void (mom._isUTC
1266
- ? mom._d.setUTCMonth(month, date)
1267
- : mom._d.setMonth(month, date));
1111
+ dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
1112
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
1268
1113
  return mom;
1269
1114
  }
1270
1115
 
@@ -1331,24 +1176,27 @@ function computeMonthsParse() {
1331
1176
  longPieces = [],
1332
1177
  mixedPieces = [],
1333
1178
  i,
1334
- mom,
1335
- shortP,
1336
- longP;
1179
+ mom;
1337
1180
  for (i = 0; i < 12; i++) {
1338
1181
  // make the regex if we don't have it already
1339
1182
  mom = createUTC([2000, i]);
1340
- shortP = regexEscape(this.monthsShort(mom, ''));
1341
- longP = regexEscape(this.months(mom, ''));
1342
- shortPieces.push(shortP);
1343
- longPieces.push(longP);
1344
- mixedPieces.push(longP);
1345
- mixedPieces.push(shortP);
1183
+ shortPieces.push(this.monthsShort(mom, ''));
1184
+ longPieces.push(this.months(mom, ''));
1185
+ mixedPieces.push(this.months(mom, ''));
1186
+ mixedPieces.push(this.monthsShort(mom, ''));
1346
1187
  }
1347
1188
  // Sorting makes sure if one month (or abbr) is a prefix of another it
1348
1189
  // will match the longer piece.
1349
1190
  shortPieces.sort(cmpLenRev);
1350
1191
  longPieces.sort(cmpLenRev);
1351
1192
  mixedPieces.sort(cmpLenRev);
1193
+ for (i = 0; i < 12; i++) {
1194
+ shortPieces[i] = regexEscape(shortPieces[i]);
1195
+ longPieces[i] = regexEscape(longPieces[i]);
1196
+ }
1197
+ for (i = 0; i < 24; i++) {
1198
+ mixedPieces[i] = regexEscape(mixedPieces[i]);
1199
+ }
1352
1200
 
1353
1201
  this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1354
1202
  this._monthsShortRegex = this._monthsRegex;
@@ -1362,6 +1210,69 @@ function computeMonthsParse() {
1362
1210
  );
1363
1211
  }
1364
1212
 
1213
+ // FORMATTING
1214
+
1215
+ addFormatToken('Y', 0, 0, function () {
1216
+ var y = this.year();
1217
+ return y <= 9999 ? zeroFill(y, 4) : '+' + y;
1218
+ });
1219
+
1220
+ addFormatToken(0, ['YY', 2], 0, function () {
1221
+ return this.year() % 100;
1222
+ });
1223
+
1224
+ addFormatToken(0, ['YYYY', 4], 0, 'year');
1225
+ addFormatToken(0, ['YYYYY', 5], 0, 'year');
1226
+ addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
1227
+
1228
+ // ALIASES
1229
+
1230
+ addUnitAlias('year', 'y');
1231
+
1232
+ // PRIORITIES
1233
+
1234
+ addUnitPriority('year', 1);
1235
+
1236
+ // PARSING
1237
+
1238
+ addRegexToken('Y', matchSigned);
1239
+ addRegexToken('YY', match1to2, match2);
1240
+ addRegexToken('YYYY', match1to4, match4);
1241
+ addRegexToken('YYYYY', match1to6, match6);
1242
+ addRegexToken('YYYYYY', match1to6, match6);
1243
+
1244
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR);
1245
+ addParseToken('YYYY', function (input, array) {
1246
+ array[YEAR] =
1247
+ input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
1248
+ });
1249
+ addParseToken('YY', function (input, array) {
1250
+ array[YEAR] = hooks.parseTwoDigitYear(input);
1251
+ });
1252
+ addParseToken('Y', function (input, array) {
1253
+ array[YEAR] = parseInt(input, 10);
1254
+ });
1255
+
1256
+ // HELPERS
1257
+
1258
+ function daysInYear(year) {
1259
+ return isLeapYear(year) ? 366 : 365;
1260
+ }
1261
+
1262
+ // HOOKS
1263
+
1264
+ hooks.parseTwoDigitYear = function (input) {
1265
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
1266
+ };
1267
+
1268
+ // MOMENTS
1269
+
1270
+ var getSetYear = makeGetSet('FullYear', true);
1271
+
1272
+ function getIsLeapYear() {
1273
+ return isLeapYear(this.year());
1274
+ }
1275
+
1365
1276
  function createDate(y, m, d, h, M, s, ms) {
1366
1277
  // can't just apply() to create a date:
1367
1278
  // https://stackoverflow.com/q/181348
@@ -1467,11 +1378,21 @@ function weeksInYear(year, dow, doy) {
1467
1378
  addFormatToken('w', ['ww', 2], 'wo', 'week');
1468
1379
  addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1469
1380
 
1381
+ // ALIASES
1382
+
1383
+ addUnitAlias('week', 'w');
1384
+ addUnitAlias('isoWeek', 'W');
1385
+
1386
+ // PRIORITIES
1387
+
1388
+ addUnitPriority('week', 5);
1389
+ addUnitPriority('isoWeek', 5);
1390
+
1470
1391
  // PARSING
1471
1392
 
1472
- addRegexToken('w', match1to2, match1to2NoLeadingZero);
1393
+ addRegexToken('w', match1to2);
1473
1394
  addRegexToken('ww', match1to2, match2);
1474
- addRegexToken('W', match1to2, match1to2NoLeadingZero);
1395
+ addRegexToken('W', match1to2);
1475
1396
  addRegexToken('WW', match1to2, match2);
1476
1397
 
1477
1398
  addWeekParseToken(
@@ -1533,6 +1454,17 @@ addFormatToken('dddd', 0, 0, function (format) {
1533
1454
  addFormatToken('e', 0, 0, 'weekday');
1534
1455
  addFormatToken('E', 0, 0, 'isoWeekday');
1535
1456
 
1457
+ // ALIASES
1458
+
1459
+ addUnitAlias('day', 'd');
1460
+ addUnitAlias('weekday', 'e');
1461
+ addUnitAlias('isoWeekday', 'E');
1462
+
1463
+ // PRIORITY
1464
+ addUnitPriority('day', 11);
1465
+ addUnitPriority('weekday', 11);
1466
+ addUnitPriority('isoWeekday', 11);
1467
+
1536
1468
  // PARSING
1537
1469
 
1538
1470
  addRegexToken('d', match1to2);
@@ -1612,24 +1544,24 @@ function localeWeekdays(m, format) {
1612
1544
  return m === true
1613
1545
  ? shiftWeekdays(weekdays, this._week.dow)
1614
1546
  : m
1615
- ? weekdays[m.day()]
1616
- : weekdays;
1547
+ ? weekdays[m.day()]
1548
+ : weekdays;
1617
1549
  }
1618
1550
 
1619
1551
  function localeWeekdaysShort(m) {
1620
1552
  return m === true
1621
1553
  ? shiftWeekdays(this._weekdaysShort, this._week.dow)
1622
1554
  : m
1623
- ? this._weekdaysShort[m.day()]
1624
- : this._weekdaysShort;
1555
+ ? this._weekdaysShort[m.day()]
1556
+ : this._weekdaysShort;
1625
1557
  }
1626
1558
 
1627
1559
  function localeWeekdaysMin(m) {
1628
1560
  return m === true
1629
1561
  ? shiftWeekdays(this._weekdaysMin, this._week.dow)
1630
1562
  : m
1631
- ? this._weekdaysMin[m.day()]
1632
- : this._weekdaysMin;
1563
+ ? this._weekdaysMin[m.day()]
1564
+ : this._weekdaysMin;
1633
1565
  }
1634
1566
 
1635
1567
  function handleStrictParse$1(weekdayName, format, strict) {
@@ -1778,8 +1710,7 @@ function getSetDayOfWeek(input) {
1778
1710
  if (!this.isValid()) {
1779
1711
  return input != null ? this : NaN;
1780
1712
  }
1781
-
1782
- var day = get(this, 'Day');
1713
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1783
1714
  if (input != null) {
1784
1715
  input = parseWeekday(input, this.localeData());
1785
1716
  return this.add(input - day, 'd');
@@ -1978,6 +1909,13 @@ function meridiem(token, lowercase) {
1978
1909
  meridiem('a', true);
1979
1910
  meridiem('A', false);
1980
1911
 
1912
+ // ALIASES
1913
+
1914
+ addUnitAlias('hour', 'h');
1915
+
1916
+ // PRIORITY
1917
+ addUnitPriority('hour', 13);
1918
+
1981
1919
  // PARSING
1982
1920
 
1983
1921
  function matchMeridiem(isStrict, locale) {
@@ -1986,9 +1924,9 @@ function matchMeridiem(isStrict, locale) {
1986
1924
 
1987
1925
  addRegexToken('a', matchMeridiem);
1988
1926
  addRegexToken('A', matchMeridiem);
1989
- addRegexToken('H', match1to2, match1to2HasZero);
1990
- addRegexToken('h', match1to2, match1to2NoLeadingZero);
1991
- addRegexToken('k', match1to2, match1to2NoLeadingZero);
1927
+ addRegexToken('H', match1to2);
1928
+ addRegexToken('h', match1to2);
1929
+ addRegexToken('k', match1to2);
1992
1930
  addRegexToken('HH', match1to2, match2);
1993
1931
  addRegexToken('hh', match1to2, match2);
1994
1932
  addRegexToken('kk', match1to2, match2);
@@ -2138,8 +2076,7 @@ function chooseLocale(names) {
2138
2076
 
2139
2077
  function isLocaleNameSane(name) {
2140
2078
  // Prevent names that look like filesystem paths, i.e contain '/' or '\'
2141
- // Ensure name is available and function returns boolean
2142
- return !!(name && name.match('^[^/\\\\]*$'));
2079
+ return name.match('^[^/\\\\]*$') != null;
2143
2080
  }
2144
2081
 
2145
2082
  function loadLocale(name) {
@@ -2331,21 +2268,21 @@ function checkOverflow(m) {
2331
2268
  a[MONTH] < 0 || a[MONTH] > 11
2332
2269
  ? MONTH
2333
2270
  : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
2334
- ? DATE
2335
- : a[HOUR] < 0 ||
2336
- a[HOUR] > 24 ||
2337
- (a[HOUR] === 24 &&
2338
- (a[MINUTE] !== 0 ||
2339
- a[SECOND] !== 0 ||
2340
- a[MILLISECOND] !== 0))
2341
- ? HOUR
2342
- : a[MINUTE] < 0 || a[MINUTE] > 59
2343
- ? MINUTE
2344
- : a[SECOND] < 0 || a[SECOND] > 59
2345
- ? SECOND
2346
- : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
2347
- ? MILLISECOND
2348
- : -1;
2271
+ ? DATE
2272
+ : a[HOUR] < 0 ||
2273
+ a[HOUR] > 24 ||
2274
+ (a[HOUR] === 24 &&
2275
+ (a[MINUTE] !== 0 ||
2276
+ a[SECOND] !== 0 ||
2277
+ a[MILLISECOND] !== 0))
2278
+ ? HOUR
2279
+ : a[MINUTE] < 0 || a[MINUTE] > 59
2280
+ ? MINUTE
2281
+ : a[SECOND] < 0 || a[SECOND] > 59
2282
+ ? SECOND
2283
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
2284
+ ? MILLISECOND
2285
+ : -1;
2349
2286
 
2350
2287
  if (
2351
2288
  getParsingFlags(m)._overflowDayOfYear &&
@@ -3786,16 +3723,16 @@ function getCalendarFormat(myMoment, now) {
3786
3723
  return diff < -6
3787
3724
  ? 'sameElse'
3788
3725
  : diff < -1
3789
- ? 'lastWeek'
3790
- : diff < 0
3791
- ? 'lastDay'
3792
- : diff < 1
3793
- ? 'sameDay'
3794
- : diff < 2
3795
- ? 'nextDay'
3796
- : diff < 7
3797
- ? 'nextWeek'
3798
- : 'sameElse';
3726
+ ? 'lastWeek'
3727
+ : diff < 0
3728
+ ? 'lastDay'
3729
+ : diff < 1
3730
+ ? 'sameDay'
3731
+ : diff < 2
3732
+ ? 'nextDay'
3733
+ : diff < 7
3734
+ ? 'nextWeek'
3735
+ : 'sameElse';
3799
3736
  }
3800
3737
 
3801
3738
  function calendar$1(time, formats) {
@@ -4603,22 +4540,16 @@ function computeErasParse() {
4603
4540
  mixedPieces = [],
4604
4541
  i,
4605
4542
  l,
4606
- erasName,
4607
- erasAbbr,
4608
- erasNarrow,
4609
4543
  eras = this.eras();
4610
4544
 
4611
4545
  for (i = 0, l = eras.length; i < l; ++i) {
4612
- erasName = regexEscape(eras[i].name);
4613
- erasAbbr = regexEscape(eras[i].abbr);
4614
- erasNarrow = regexEscape(eras[i].narrow);
4546
+ namePieces.push(regexEscape(eras[i].name));
4547
+ abbrPieces.push(regexEscape(eras[i].abbr));
4548
+ narrowPieces.push(regexEscape(eras[i].narrow));
4615
4549
 
4616
- namePieces.push(erasName);
4617
- abbrPieces.push(erasAbbr);
4618
- narrowPieces.push(erasNarrow);
4619
- mixedPieces.push(erasName);
4620
- mixedPieces.push(erasAbbr);
4621
- mixedPieces.push(erasNarrow);
4550
+ mixedPieces.push(regexEscape(eras[i].name));
4551
+ mixedPieces.push(regexEscape(eras[i].abbr));
4552
+ mixedPieces.push(regexEscape(eras[i].narrow));
4622
4553
  }
4623
4554
 
4624
4555
  this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
@@ -4651,6 +4582,14 @@ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
4651
4582
 
4652
4583
  // ALIASES
4653
4584
 
4585
+ addUnitAlias('weekYear', 'gg');
4586
+ addUnitAlias('isoWeekYear', 'GG');
4587
+
4588
+ // PRIORITY
4589
+
4590
+ addUnitPriority('weekYear', 1);
4591
+ addUnitPriority('isoWeekYear', 1);
4592
+
4654
4593
  // PARSING
4655
4594
 
4656
4595
  addRegexToken('G', matchSigned);
@@ -4680,7 +4619,7 @@ function getSetWeekYear(input) {
4680
4619
  this,
4681
4620
  input,
4682
4621
  this.week(),
4683
- this.weekday() + this.localeData()._week.dow,
4622
+ this.weekday(),
4684
4623
  this.localeData()._week.dow,
4685
4624
  this.localeData()._week.doy
4686
4625
  );
@@ -4742,6 +4681,14 @@ function setWeekAll(weekYear, week, weekday, dow, doy) {
4742
4681
 
4743
4682
  addFormatToken('Q', 0, 'Qo', 'quarter');
4744
4683
 
4684
+ // ALIASES
4685
+
4686
+ addUnitAlias('quarter', 'Q');
4687
+
4688
+ // PRIORITY
4689
+
4690
+ addUnitPriority('quarter', 7);
4691
+
4745
4692
  // PARSING
4746
4693
 
4747
4694
  addRegexToken('Q', match1);
@@ -4761,9 +4708,16 @@ function getSetQuarter(input) {
4761
4708
 
4762
4709
  addFormatToken('D', ['DD', 2], 'Do', 'date');
4763
4710
 
4711
+ // ALIASES
4712
+
4713
+ addUnitAlias('date', 'D');
4714
+
4715
+ // PRIORITY
4716
+ addUnitPriority('date', 9);
4717
+
4764
4718
  // PARSING
4765
4719
 
4766
- addRegexToken('D', match1to2, match1to2NoLeadingZero);
4720
+ addRegexToken('D', match1to2);
4767
4721
  addRegexToken('DD', match1to2, match2);
4768
4722
  addRegexToken('Do', function (isStrict, locale) {
4769
4723
  // TODO: Remove "ordinalParse" fallback in next major release.
@@ -4785,6 +4739,13 @@ var getSetDayOfMonth = makeGetSet('Date', true);
4785
4739
 
4786
4740
  addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
4787
4741
 
4742
+ // ALIASES
4743
+
4744
+ addUnitAlias('dayOfYear', 'DDD');
4745
+
4746
+ // PRIORITY
4747
+ addUnitPriority('dayOfYear', 4);
4748
+
4788
4749
  // PARSING
4789
4750
 
4790
4751
  addRegexToken('DDD', match1to3);
@@ -4809,9 +4770,17 @@ function getSetDayOfYear(input) {
4809
4770
 
4810
4771
  addFormatToken('m', ['mm', 2], 0, 'minute');
4811
4772
 
4773
+ // ALIASES
4774
+
4775
+ addUnitAlias('minute', 'm');
4776
+
4777
+ // PRIORITY
4778
+
4779
+ addUnitPriority('minute', 14);
4780
+
4812
4781
  // PARSING
4813
4782
 
4814
- addRegexToken('m', match1to2, match1to2HasZero);
4783
+ addRegexToken('m', match1to2);
4815
4784
  addRegexToken('mm', match1to2, match2);
4816
4785
  addParseToken(['m', 'mm'], MINUTE);
4817
4786
 
@@ -4823,9 +4792,17 @@ var getSetMinute = makeGetSet('Minutes', false);
4823
4792
 
4824
4793
  addFormatToken('s', ['ss', 2], 0, 'second');
4825
4794
 
4795
+ // ALIASES
4796
+
4797
+ addUnitAlias('second', 's');
4798
+
4799
+ // PRIORITY
4800
+
4801
+ addUnitPriority('second', 15);
4802
+
4826
4803
  // PARSING
4827
4804
 
4828
- addRegexToken('s', match1to2, match1to2HasZero);
4805
+ addRegexToken('s', match1to2);
4829
4806
  addRegexToken('ss', match1to2, match2);
4830
4807
  addParseToken(['s', 'ss'], SECOND);
4831
4808
 
@@ -4863,6 +4840,14 @@ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
4863
4840
  return this.millisecond() * 1000000;
4864
4841
  });
4865
4842
 
4843
+ // ALIASES
4844
+
4845
+ addUnitAlias('millisecond', 'ms');
4846
+
4847
+ // PRIORITY
4848
+
4849
+ addUnitPriority('millisecond', 16);
4850
+
4866
4851
  // PARSING
4867
4852
 
4868
4853
  addRegexToken('S', match1to3, match1);
@@ -5170,12 +5155,12 @@ getSetGlobalLocale('en', {
5170
5155
  toInt((number % 100) / 10) === 1
5171
5156
  ? 'th'
5172
5157
  : b === 1
5173
- ? 'st'
5174
- : b === 2
5175
- ? 'nd'
5176
- : b === 3
5177
- ? 'rd'
5178
- : 'th';
5158
+ ? 'st'
5159
+ : b === 2
5160
+ ? 'nd'
5161
+ : b === 3
5162
+ ? 'rd'
5163
+ : 'th';
5179
5164
  return number + output;
5180
5165
  },
5181
5166
  });
@@ -5348,6 +5333,19 @@ function as(units) {
5348
5333
  }
5349
5334
  }
5350
5335
 
5336
+ // TODO: Use this.as('ms')?
5337
+ function valueOf$1() {
5338
+ if (!this.isValid()) {
5339
+ return NaN;
5340
+ }
5341
+ return (
5342
+ this._milliseconds +
5343
+ this._days * 864e5 +
5344
+ (this._months % 12) * 2592e6 +
5345
+ toInt(this._months / 12) * 31536e6
5346
+ );
5347
+ }
5348
+
5351
5349
  function makeAs(alias) {
5352
5350
  return function () {
5353
5351
  return this.as(alias);
@@ -5362,8 +5360,7 @@ var asMilliseconds = makeAs('ms'),
5362
5360
  asWeeks = makeAs('w'),
5363
5361
  asMonths = makeAs('M'),
5364
5362
  asQuarters = makeAs('Q'),
5365
- asYears = makeAs('y'),
5366
- valueOf$1 = asMilliseconds;
5363
+ asYears = makeAs('y');
5367
5364
 
5368
5365
  function clone$1() {
5369
5366
  return createDuration(this);
@@ -5632,7 +5629,7 @@ addParseToken('x', function (input, array, config) {
5632
5629
 
5633
5630
  //! moment.js
5634
5631
 
5635
- hooks.version = '2.30.1';
5632
+ hooks.version = '2.29.4';
5636
5633
 
5637
5634
  setHookCallback(createLocal);
5638
5635