@everymatrix/casino-game-thumb-view 1.43.4 → 1.45.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.
Files changed (131) 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-2207062c.entry.js +1 -0
  3. package/dist/casino-game-thumb-view/p-39684b4a.entry.js +1 -0
  4. package/dist/casino-game-thumb-view/p-af0284b5.entry.js +1 -0
  5. package/dist/casino-game-thumb-view/p-b73b7a18.entry.js +1 -0
  6. package/dist/casino-game-thumb-view/p-bd016895.entry.js +7 -0
  7. package/dist/casino-game-thumb-view/p-d2580653.js +8 -0
  8. package/dist/casino-game-thumb-view/p-d48c3566.entry.js +1 -0
  9. package/dist/casino-game-thumb-view/p-e1255160.js +1 -0
  10. package/dist/casino-game-thumb-view/p-eef6f908.js +2 -0
  11. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  12. package/dist/cjs/casino-extrainfo-baccarat.cjs.entry.js +327 -322
  13. package/dist/cjs/casino-extrainfo-blackjack.cjs.entry.js +45 -45
  14. package/dist/cjs/casino-extrainfo-roulette.cjs.entry.js +35 -34
  15. package/dist/cjs/casino-game-thumb-view.cjs.js +17 -11
  16. package/dist/cjs/casino-game-thumb-view_2.cjs.entry.js +469 -519
  17. package/dist/cjs/casino-game-thumbnail-betlimit_2.cjs.entry.js +258 -251
  18. package/dist/cjs/casino-normal-game-thumbnail.cjs.entry.js +14 -12
  19. package/dist/cjs/game-thumbnail-5a34c727.js +78 -0
  20. package/dist/cjs/index-48d13981.js +1709 -0
  21. package/dist/cjs/loader.cjs.js +7 -13
  22. package/dist/cjs/locale.utils-53bf703a.js +132 -0
  23. package/dist/cjs/{utils-a0afc0a9.js → utils-c4ed3adc.js} +407 -404
  24. package/dist/collection/collection-manifest.json +10 -10
  25. package/dist/collection/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.js +251 -230
  26. package/dist/collection/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.js +136 -114
  27. package/dist/collection/components/casino-extrainfo-roulette/casino-extrainfo-roulette.js +126 -119
  28. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.css +1 -1
  29. package/dist/collection/components/casino-game-thumb-view/casino-game-thumb-view.js +1023 -1027
  30. package/dist/collection/components/casino-game-thumb-view/index.js +1 -0
  31. package/dist/collection/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.js +78 -80
  32. package/dist/collection/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.js +153 -150
  33. package/dist/collection/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.js +201 -206
  34. package/dist/collection/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.js +71 -58
  35. package/dist/collection/constants/game-thumbnail.js +66 -66
  36. package/dist/collection/models/casino-game-thumb-view.js +6 -6
  37. package/dist/collection/models/currency-symbols.js +170 -170
  38. package/dist/collection/utils/baccarat-board-svg.js +225 -225
  39. package/dist/collection/utils/locale.utils.js +122 -122
  40. package/dist/collection/utils/utils.js +41 -41
  41. package/dist/esm/app-globals-0f993ce5.js +3 -0
  42. package/dist/esm/casino-extrainfo-baccarat.entry.js +327 -322
  43. package/dist/esm/casino-extrainfo-blackjack.entry.js +45 -45
  44. package/dist/esm/casino-extrainfo-roulette.entry.js +35 -34
  45. package/dist/esm/casino-game-thumb-view.js +14 -11
  46. package/dist/esm/casino-game-thumb-view_2.entry.js +469 -519
  47. package/dist/esm/casino-game-thumbnail-betlimit_2.entry.js +258 -251
  48. package/dist/esm/casino-normal-game-thumbnail.entry.js +14 -12
  49. package/dist/esm/game-thumbnail-035e97e2.js +72 -0
  50. package/dist/esm/index-8c9a8030.js +1681 -0
  51. package/dist/esm/loader.js +7 -13
  52. package/dist/esm/locale.utils-0c514ca8.js +130 -0
  53. package/dist/{components/utils.js → esm/utils-090ac2e9.js} +407 -404
  54. package/dist/stencil.config.dev.js +17 -0
  55. package/dist/stencil.config.js +12 -35
  56. 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 +2 -0
  57. 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 +2 -0
  58. package/dist/types/components/casino-extrainfo-baccarat/casino-extrainfo-baccarat.d.ts +36 -36
  59. package/dist/types/components/casino-extrainfo-blackjack/casino-extrainfo-blackjack.d.ts +33 -33
  60. package/dist/types/components/casino-extrainfo-roulette/casino-extrainfo-roulette.d.ts +18 -18
  61. package/dist/types/components/casino-game-thumb-view/casino-game-thumb-view.d.ts +213 -213
  62. package/dist/types/components/casino-game-thumb-view/index.d.ts +1 -0
  63. package/dist/types/components/casino-game-thumbnail-betlimit/casino-game-thumbnail-betlimit.d.ts +14 -14
  64. package/dist/types/components/casino-game-thumbnail-extrainfo/casino-game-thumbnail-extrainfo.d.ts +13 -13
  65. package/dist/types/components/casino-game-thumbnail-overlay/casino-game-thumbnail-overlay.d.ts +28 -28
  66. package/dist/types/components/casino-normal-game-thumbnail/casino-normal-game-thumbnail.d.ts +4 -4
  67. package/dist/types/components.d.ts +33 -2
  68. package/dist/types/constants/game-thumbnail.d.ts +66 -66
  69. package/dist/types/models/casino-game-thumb-view.d.ts +107 -107
  70. package/dist/types/models/currency-symbols.d.ts +170 -170
  71. package/dist/types/stencil-public-runtime.d.ts +142 -33
  72. package/dist/types/utils/baccarat-board-svg.d.ts +29 -29
  73. package/loader/cdn.js +1 -3
  74. package/loader/index.cjs.js +1 -3
  75. package/loader/index.d.ts +13 -1
  76. package/loader/index.es2017.js +1 -3
  77. package/loader/index.js +1 -3
  78. package/loader/package.json +1 -0
  79. package/package.json +8 -8
  80. package/dist/assets/baccarat.svg +0 -43
  81. package/dist/assets/fav.svg +0 -9
  82. package/dist/assets/favorite.svg +0 -12
  83. package/dist/assets/seat.svg +0 -6
  84. package/dist/assets/unfav.svg +0 -20
  85. package/dist/casino-game-thumb-view/p-1bbf4b70.entry.js +0 -1
  86. package/dist/casino-game-thumb-view/p-42bf2034.entry.js +0 -1
  87. package/dist/casino-game-thumb-view/p-46dbb1cb.js +0 -1
  88. package/dist/casino-game-thumb-view/p-6a6b2a78.js +0 -8
  89. package/dist/casino-game-thumb-view/p-7ae107ed.entry.js +0 -1
  90. package/dist/casino-game-thumb-view/p-9cbfffbc.entry.js +0 -1
  91. package/dist/casino-game-thumb-view/p-d961aec4.entry.js +0 -1
  92. package/dist/casino-game-thumb-view/p-db43bb56.entry.js +0 -7
  93. package/dist/cjs/game-thumbnail-31d518f0.js +0 -78
  94. package/dist/cjs/index-65a1d768.js +0 -1796
  95. package/dist/cjs/locale.utils-aa160787.js +0 -132
  96. package/dist/components/casino-extrainfo-baccarat.d.ts +0 -11
  97. package/dist/components/casino-extrainfo-baccarat.js +0 -400
  98. package/dist/components/casino-extrainfo-blackjack.d.ts +0 -11
  99. package/dist/components/casino-extrainfo-blackjack.js +0 -92
  100. package/dist/components/casino-extrainfo-roulette.d.ts +0 -11
  101. package/dist/components/casino-extrainfo-roulette.js +0 -78
  102. package/dist/components/casino-game-thumb-view.d.ts +0 -11
  103. package/dist/components/casino-game-thumb-view.js +0 -1625
  104. package/dist/components/casino-game-thumbnail-betlimit.d.ts +0 -11
  105. package/dist/components/casino-game-thumbnail-betlimit.js +0 -6
  106. package/dist/components/casino-game-thumbnail-betlimit2.js +0 -227
  107. package/dist/components/casino-game-thumbnail-extrainfo.d.ts +0 -11
  108. package/dist/components/casino-game-thumbnail-extrainfo.js +0 -6
  109. package/dist/components/casino-game-thumbnail-extrainfo2.js +0 -96
  110. package/dist/components/casino-game-thumbnail-overlay.d.ts +0 -11
  111. package/dist/components/casino-game-thumbnail-overlay.js +0 -6
  112. package/dist/components/casino-game-thumbnail-overlay2.js +0 -69
  113. package/dist/components/casino-normal-game-thumbnail.d.ts +0 -11
  114. package/dist/components/casino-normal-game-thumbnail.js +0 -52
  115. package/dist/components/game-thumbnail.js +0 -72
  116. package/dist/components/index.d.ts +0 -26
  117. package/dist/components/index.js +0 -1
  118. package/dist/components/locale.utils.js +0 -130
  119. package/dist/esm/game-thumbnail-0a56ee03.js +0 -72
  120. package/dist/esm/index-1e44dd9f.js +0 -1769
  121. package/dist/esm/locale.utils-e0cf897e.js +0 -130
  122. package/dist/esm/polyfills/core-js.js +0 -11
  123. package/dist/esm/polyfills/css-shim.js +0 -1
  124. package/dist/esm/polyfills/dom.js +0 -79
  125. package/dist/esm/polyfills/es5-html-element.js +0 -1
  126. package/dist/esm/polyfills/index.js +0 -34
  127. package/dist/esm/polyfills/system.js +0 -6
  128. package/dist/esm/utils-e9314132.js +0 -5739
  129. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/casino-game-thumb-view/.stencil/packages/casino-game-thumb-view/stencil.config.d.ts +0 -2
  130. /package/dist/casino-game-thumb-view/{p-2d5f59fe.js → p-2d02adb1.js} +0 -0
  131. /package/dist/casino-game-thumb-view/{p-1e63a1ab.js → p-59ceeaaa.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  //! moment.js
2
- //! version : 2.29.4
2
+ //! version : 2.30.1
3
3
  //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
4
4
  //! license : MIT
5
5
  //! momentjs.com
@@ -149,24 +149,25 @@ if (Array.prototype.some) {
149
149
  }
150
150
 
151
151
  function isValid(m) {
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
-
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));
170
171
  if (m._strict) {
171
172
  isNowValid =
172
173
  isNowValid &&
@@ -174,12 +175,11 @@ function isValid(m) {
174
175
  flags.unusedTokens.length === 0 &&
175
176
  flags.bigHour === undefined;
176
177
  }
177
-
178
- if (Object.isFrozen == null || !Object.isFrozen(m)) {
179
- m._isValid = isNowValid;
180
- } else {
181
- return isNowValid;
182
- }
178
+ }
179
+ if (Object.isFrozen == null || !Object.isFrozen(m)) {
180
+ m._isValid = isNowValid;
181
+ } else {
182
+ return isNowValid;
183
183
  }
184
184
  return m._isValid;
185
185
  }
@@ -624,12 +624,56 @@ function pastFuture(diff, output) {
624
624
  return isFunction(format) ? format(output) : format.replace(/%s/i, output);
625
625
  }
626
626
 
627
- var aliases = {};
628
-
629
- function addUnitAlias(unit, shorthand) {
630
- var lowerCase = unit.toLowerCase();
631
- aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit;
632
- }
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
+ };
633
677
 
634
678
  function normalizeUnits(units) {
635
679
  return typeof units === 'string'
@@ -654,11 +698,24 @@ function normalizeObjectUnits(inputObject) {
654
698
  return normalizedInput;
655
699
  }
656
700
 
657
- var priorities = {};
658
-
659
- function addUnitPriority(unit, priority) {
660
- priorities[unit] = priority;
661
- }
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
+ };
662
719
 
663
720
  function getPrioritizedUnits(unitsObj) {
664
721
  var units = [],
@@ -674,96 +731,6 @@ function getPrioritizedUnits(unitsObj) {
674
731
  return units;
675
732
  }
676
733
 
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
-
767
734
  var match1 = /\d/, // 0 - 9
768
735
  match2 = /\d\d/, // 00 - 99
769
736
  match3 = /\d{3}/, // 000 - 999
@@ -784,6 +751,8 @@ var match1 = /\d/, // 0 - 9
784
751
  // includes scottish gaelic two word and hyphenated months
785
752
  matchWord =
786
753
  /[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
787
756
  regexes;
788
757
 
789
758
  regexes = {};
@@ -822,6 +791,26 @@ function regexEscape(s) {
822
791
  return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
823
792
  }
824
793
 
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
+
825
814
  var tokens = {};
826
815
 
827
816
  function addParseToken(token, callback) {
@@ -855,6 +844,10 @@ function addTimeToArrayFromToken(token, input, config) {
855
844
  }
856
845
  }
857
846
 
847
+ function isLeapYear(year) {
848
+ return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
849
+ }
850
+
858
851
  var YEAR = 0,
859
852
  MONTH = 1,
860
853
  DATE = 2,
@@ -865,6 +858,173 @@ var YEAR = 0,
865
858
  WEEK = 7,
866
859
  WEEKDAY = 8;
867
860
 
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
+
868
1028
  function mod(n, x) {
869
1029
  return ((n % x) + x) % x;
870
1030
  }
@@ -913,17 +1073,9 @@ addFormatToken('MMMM', 0, 0, function (format) {
913
1073
  return this.localeData().months(this, format);
914
1074
  });
915
1075
 
916
- // ALIASES
917
-
918
- addUnitAlias('month', 'M');
919
-
920
- // PRIORITY
921
-
922
- addUnitPriority('month', 8);
923
-
924
1076
  // PARSING
925
1077
 
926
- addRegexToken('M', match1to2);
1078
+ addRegexToken('M', match1to2, match1to2NoLeadingZero);
927
1079
  addRegexToken('MM', match1to2, match2);
928
1080
  addRegexToken('MMM', function (isStrict, locale) {
929
1081
  return locale.monthsShortRegex(isStrict);
@@ -1089,8 +1241,6 @@ function localeMonthsParse(monthName, format, strict) {
1089
1241
  // MOMENTS
1090
1242
 
1091
1243
  function setMonth(mom, value) {
1092
- var dayOfMonth;
1093
-
1094
1244
  if (!mom.isValid()) {
1095
1245
  // No op
1096
1246
  return mom;
@@ -1108,8 +1258,13 @@ function setMonth(mom, value) {
1108
1258
  }
1109
1259
  }
1110
1260
 
1111
- dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value));
1112
- mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth);
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));
1113
1268
  return mom;
1114
1269
  }
1115
1270
 
@@ -1176,27 +1331,24 @@ function computeMonthsParse() {
1176
1331
  longPieces = [],
1177
1332
  mixedPieces = [],
1178
1333
  i,
1179
- mom;
1334
+ mom,
1335
+ shortP,
1336
+ longP;
1180
1337
  for (i = 0; i < 12; i++) {
1181
1338
  // make the regex if we don't have it already
1182
1339
  mom = createUTC([2000, i]);
1183
- shortPieces.push(this.monthsShort(mom, ''));
1184
- longPieces.push(this.months(mom, ''));
1185
- mixedPieces.push(this.months(mom, ''));
1186
- mixedPieces.push(this.monthsShort(mom, ''));
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);
1187
1346
  }
1188
1347
  // Sorting makes sure if one month (or abbr) is a prefix of another it
1189
1348
  // will match the longer piece.
1190
1349
  shortPieces.sort(cmpLenRev);
1191
1350
  longPieces.sort(cmpLenRev);
1192
1351
  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
- }
1200
1352
 
1201
1353
  this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
1202
1354
  this._monthsShortRegex = this._monthsRegex;
@@ -1210,69 +1362,6 @@ function computeMonthsParse() {
1210
1362
  );
1211
1363
  }
1212
1364
 
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
-
1276
1365
  function createDate(y, m, d, h, M, s, ms) {
1277
1366
  // can't just apply() to create a date:
1278
1367
  // https://stackoverflow.com/q/181348
@@ -1378,21 +1467,11 @@ function weeksInYear(year, dow, doy) {
1378
1467
  addFormatToken('w', ['ww', 2], 'wo', 'week');
1379
1468
  addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
1380
1469
 
1381
- // ALIASES
1382
-
1383
- addUnitAlias('week', 'w');
1384
- addUnitAlias('isoWeek', 'W');
1385
-
1386
- // PRIORITIES
1387
-
1388
- addUnitPriority('week', 5);
1389
- addUnitPriority('isoWeek', 5);
1390
-
1391
1470
  // PARSING
1392
1471
 
1393
- addRegexToken('w', match1to2);
1472
+ addRegexToken('w', match1to2, match1to2NoLeadingZero);
1394
1473
  addRegexToken('ww', match1to2, match2);
1395
- addRegexToken('W', match1to2);
1474
+ addRegexToken('W', match1to2, match1to2NoLeadingZero);
1396
1475
  addRegexToken('WW', match1to2, match2);
1397
1476
 
1398
1477
  addWeekParseToken(
@@ -1454,17 +1533,6 @@ addFormatToken('dddd', 0, 0, function (format) {
1454
1533
  addFormatToken('e', 0, 0, 'weekday');
1455
1534
  addFormatToken('E', 0, 0, 'isoWeekday');
1456
1535
 
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
-
1468
1536
  // PARSING
1469
1537
 
1470
1538
  addRegexToken('d', match1to2);
@@ -1544,24 +1612,24 @@ function localeWeekdays(m, format) {
1544
1612
  return m === true
1545
1613
  ? shiftWeekdays(weekdays, this._week.dow)
1546
1614
  : m
1547
- ? weekdays[m.day()]
1548
- : weekdays;
1615
+ ? weekdays[m.day()]
1616
+ : weekdays;
1549
1617
  }
1550
1618
 
1551
1619
  function localeWeekdaysShort(m) {
1552
1620
  return m === true
1553
1621
  ? shiftWeekdays(this._weekdaysShort, this._week.dow)
1554
1622
  : m
1555
- ? this._weekdaysShort[m.day()]
1556
- : this._weekdaysShort;
1623
+ ? this._weekdaysShort[m.day()]
1624
+ : this._weekdaysShort;
1557
1625
  }
1558
1626
 
1559
1627
  function localeWeekdaysMin(m) {
1560
1628
  return m === true
1561
1629
  ? shiftWeekdays(this._weekdaysMin, this._week.dow)
1562
1630
  : m
1563
- ? this._weekdaysMin[m.day()]
1564
- : this._weekdaysMin;
1631
+ ? this._weekdaysMin[m.day()]
1632
+ : this._weekdaysMin;
1565
1633
  }
1566
1634
 
1567
1635
  function handleStrictParse$1(weekdayName, format, strict) {
@@ -1710,7 +1778,8 @@ function getSetDayOfWeek(input) {
1710
1778
  if (!this.isValid()) {
1711
1779
  return input != null ? this : NaN;
1712
1780
  }
1713
- var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
1781
+
1782
+ var day = get(this, 'Day');
1714
1783
  if (input != null) {
1715
1784
  input = parseWeekday(input, this.localeData());
1716
1785
  return this.add(input - day, 'd');
@@ -1909,13 +1978,6 @@ function meridiem(token, lowercase) {
1909
1978
  meridiem('a', true);
1910
1979
  meridiem('A', false);
1911
1980
 
1912
- // ALIASES
1913
-
1914
- addUnitAlias('hour', 'h');
1915
-
1916
- // PRIORITY
1917
- addUnitPriority('hour', 13);
1918
-
1919
1981
  // PARSING
1920
1982
 
1921
1983
  function matchMeridiem(isStrict, locale) {
@@ -1924,9 +1986,9 @@ function matchMeridiem(isStrict, locale) {
1924
1986
 
1925
1987
  addRegexToken('a', matchMeridiem);
1926
1988
  addRegexToken('A', matchMeridiem);
1927
- addRegexToken('H', match1to2);
1928
- addRegexToken('h', match1to2);
1929
- addRegexToken('k', match1to2);
1989
+ addRegexToken('H', match1to2, match1to2HasZero);
1990
+ addRegexToken('h', match1to2, match1to2NoLeadingZero);
1991
+ addRegexToken('k', match1to2, match1to2NoLeadingZero);
1930
1992
  addRegexToken('HH', match1to2, match2);
1931
1993
  addRegexToken('hh', match1to2, match2);
1932
1994
  addRegexToken('kk', match1to2, match2);
@@ -2076,7 +2138,8 @@ function chooseLocale(names) {
2076
2138
 
2077
2139
  function isLocaleNameSane(name) {
2078
2140
  // Prevent names that look like filesystem paths, i.e contain '/' or '\'
2079
- return name.match('^[^/\\\\]*$') != null;
2141
+ // Ensure name is available and function returns boolean
2142
+ return !!(name && name.match('^[^/\\\\]*$'));
2080
2143
  }
2081
2144
 
2082
2145
  function loadLocale(name) {
@@ -2268,21 +2331,21 @@ function checkOverflow(m) {
2268
2331
  a[MONTH] < 0 || a[MONTH] > 11
2269
2332
  ? MONTH
2270
2333
  : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
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;
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;
2286
2349
 
2287
2350
  if (
2288
2351
  getParsingFlags(m)._overflowDayOfYear &&
@@ -3723,16 +3786,16 @@ function getCalendarFormat(myMoment, now) {
3723
3786
  return diff < -6
3724
3787
  ? 'sameElse'
3725
3788
  : diff < -1
3726
- ? 'lastWeek'
3727
- : diff < 0
3728
- ? 'lastDay'
3729
- : diff < 1
3730
- ? 'sameDay'
3731
- : diff < 2
3732
- ? 'nextDay'
3733
- : diff < 7
3734
- ? 'nextWeek'
3735
- : 'sameElse';
3789
+ ? 'lastWeek'
3790
+ : diff < 0
3791
+ ? 'lastDay'
3792
+ : diff < 1
3793
+ ? 'sameDay'
3794
+ : diff < 2
3795
+ ? 'nextDay'
3796
+ : diff < 7
3797
+ ? 'nextWeek'
3798
+ : 'sameElse';
3736
3799
  }
3737
3800
 
3738
3801
  function calendar$1(time, formats) {
@@ -4540,16 +4603,22 @@ function computeErasParse() {
4540
4603
  mixedPieces = [],
4541
4604
  i,
4542
4605
  l,
4606
+ erasName,
4607
+ erasAbbr,
4608
+ erasNarrow,
4543
4609
  eras = this.eras();
4544
4610
 
4545
4611
  for (i = 0, l = eras.length; i < l; ++i) {
4546
- namePieces.push(regexEscape(eras[i].name));
4547
- abbrPieces.push(regexEscape(eras[i].abbr));
4548
- narrowPieces.push(regexEscape(eras[i].narrow));
4612
+ erasName = regexEscape(eras[i].name);
4613
+ erasAbbr = regexEscape(eras[i].abbr);
4614
+ erasNarrow = regexEscape(eras[i].narrow);
4549
4615
 
4550
- mixedPieces.push(regexEscape(eras[i].name));
4551
- mixedPieces.push(regexEscape(eras[i].abbr));
4552
- mixedPieces.push(regexEscape(eras[i].narrow));
4616
+ namePieces.push(erasName);
4617
+ abbrPieces.push(erasAbbr);
4618
+ narrowPieces.push(erasNarrow);
4619
+ mixedPieces.push(erasName);
4620
+ mixedPieces.push(erasAbbr);
4621
+ mixedPieces.push(erasNarrow);
4553
4622
  }
4554
4623
 
4555
4624
  this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
@@ -4582,14 +4651,6 @@ addWeekYearFormatToken('GGGGG', 'isoWeekYear');
4582
4651
 
4583
4652
  // ALIASES
4584
4653
 
4585
- addUnitAlias('weekYear', 'gg');
4586
- addUnitAlias('isoWeekYear', 'GG');
4587
-
4588
- // PRIORITY
4589
-
4590
- addUnitPriority('weekYear', 1);
4591
- addUnitPriority('isoWeekYear', 1);
4592
-
4593
4654
  // PARSING
4594
4655
 
4595
4656
  addRegexToken('G', matchSigned);
@@ -4619,7 +4680,7 @@ function getSetWeekYear(input) {
4619
4680
  this,
4620
4681
  input,
4621
4682
  this.week(),
4622
- this.weekday(),
4683
+ this.weekday() + this.localeData()._week.dow,
4623
4684
  this.localeData()._week.dow,
4624
4685
  this.localeData()._week.doy
4625
4686
  );
@@ -4681,14 +4742,6 @@ function setWeekAll(weekYear, week, weekday, dow, doy) {
4681
4742
 
4682
4743
  addFormatToken('Q', 0, 'Qo', 'quarter');
4683
4744
 
4684
- // ALIASES
4685
-
4686
- addUnitAlias('quarter', 'Q');
4687
-
4688
- // PRIORITY
4689
-
4690
- addUnitPriority('quarter', 7);
4691
-
4692
4745
  // PARSING
4693
4746
 
4694
4747
  addRegexToken('Q', match1);
@@ -4708,16 +4761,9 @@ function getSetQuarter(input) {
4708
4761
 
4709
4762
  addFormatToken('D', ['DD', 2], 'Do', 'date');
4710
4763
 
4711
- // ALIASES
4712
-
4713
- addUnitAlias('date', 'D');
4714
-
4715
- // PRIORITY
4716
- addUnitPriority('date', 9);
4717
-
4718
4764
  // PARSING
4719
4765
 
4720
- addRegexToken('D', match1to2);
4766
+ addRegexToken('D', match1to2, match1to2NoLeadingZero);
4721
4767
  addRegexToken('DD', match1to2, match2);
4722
4768
  addRegexToken('Do', function (isStrict, locale) {
4723
4769
  // TODO: Remove "ordinalParse" fallback in next major release.
@@ -4739,13 +4785,6 @@ var getSetDayOfMonth = makeGetSet('Date', true);
4739
4785
 
4740
4786
  addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
4741
4787
 
4742
- // ALIASES
4743
-
4744
- addUnitAlias('dayOfYear', 'DDD');
4745
-
4746
- // PRIORITY
4747
- addUnitPriority('dayOfYear', 4);
4748
-
4749
4788
  // PARSING
4750
4789
 
4751
4790
  addRegexToken('DDD', match1to3);
@@ -4770,17 +4809,9 @@ function getSetDayOfYear(input) {
4770
4809
 
4771
4810
  addFormatToken('m', ['mm', 2], 0, 'minute');
4772
4811
 
4773
- // ALIASES
4774
-
4775
- addUnitAlias('minute', 'm');
4776
-
4777
- // PRIORITY
4778
-
4779
- addUnitPriority('minute', 14);
4780
-
4781
4812
  // PARSING
4782
4813
 
4783
- addRegexToken('m', match1to2);
4814
+ addRegexToken('m', match1to2, match1to2HasZero);
4784
4815
  addRegexToken('mm', match1to2, match2);
4785
4816
  addParseToken(['m', 'mm'], MINUTE);
4786
4817
 
@@ -4792,17 +4823,9 @@ var getSetMinute = makeGetSet('Minutes', false);
4792
4823
 
4793
4824
  addFormatToken('s', ['ss', 2], 0, 'second');
4794
4825
 
4795
- // ALIASES
4796
-
4797
- addUnitAlias('second', 's');
4798
-
4799
- // PRIORITY
4800
-
4801
- addUnitPriority('second', 15);
4802
-
4803
4826
  // PARSING
4804
4827
 
4805
- addRegexToken('s', match1to2);
4828
+ addRegexToken('s', match1to2, match1to2HasZero);
4806
4829
  addRegexToken('ss', match1to2, match2);
4807
4830
  addParseToken(['s', 'ss'], SECOND);
4808
4831
 
@@ -4840,14 +4863,6 @@ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
4840
4863
  return this.millisecond() * 1000000;
4841
4864
  });
4842
4865
 
4843
- // ALIASES
4844
-
4845
- addUnitAlias('millisecond', 'ms');
4846
-
4847
- // PRIORITY
4848
-
4849
- addUnitPriority('millisecond', 16);
4850
-
4851
4866
  // PARSING
4852
4867
 
4853
4868
  addRegexToken('S', match1to3, match1);
@@ -5155,12 +5170,12 @@ getSetGlobalLocale('en', {
5155
5170
  toInt((number % 100) / 10) === 1
5156
5171
  ? 'th'
5157
5172
  : b === 1
5158
- ? 'st'
5159
- : b === 2
5160
- ? 'nd'
5161
- : b === 3
5162
- ? 'rd'
5163
- : 'th';
5173
+ ? 'st'
5174
+ : b === 2
5175
+ ? 'nd'
5176
+ : b === 3
5177
+ ? 'rd'
5178
+ : 'th';
5164
5179
  return number + output;
5165
5180
  },
5166
5181
  });
@@ -5333,19 +5348,6 @@ function as(units) {
5333
5348
  }
5334
5349
  }
5335
5350
 
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
-
5349
5351
  function makeAs(alias) {
5350
5352
  return function () {
5351
5353
  return this.as(alias);
@@ -5360,7 +5362,8 @@ var asMilliseconds = makeAs('ms'),
5360
5362
  asWeeks = makeAs('w'),
5361
5363
  asMonths = makeAs('M'),
5362
5364
  asQuarters = makeAs('Q'),
5363
- asYears = makeAs('y');
5365
+ asYears = makeAs('y'),
5366
+ valueOf$1 = asMilliseconds;
5364
5367
 
5365
5368
  function clone$1() {
5366
5369
  return createDuration(this);
@@ -5629,7 +5632,7 @@ addParseToken('x', function (input, array, config) {
5629
5632
 
5630
5633
  //! moment.js
5631
5634
 
5632
- hooks.version = '2.29.4';
5635
+ hooks.version = '2.30.1';
5633
5636
 
5634
5637
  setHookCallback(createLocal);
5635
5638
 
@@ -5683,10 +5686,10 @@ const DEFAULT_AMOUNT_SEPARATOR = ',';
5683
5686
  * @returns {String} formated value
5684
5687
  */
5685
5688
  const numberWithSeparators = (value, sep = DEFAULT_AMOUNT_SEPARATOR) => {
5686
- if (value !== undefined && value !== null) {
5687
- return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, sep);
5688
- }
5689
- return '';
5689
+ if (value !== undefined && value !== null) {
5690
+ return `${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, sep);
5691
+ }
5692
+ return '';
5690
5693
  };
5691
5694
  /**
5692
5695
  * @name isMobile
@@ -5695,45 +5698,45 @@ const numberWithSeparators = (value, sep = DEFAULT_AMOUNT_SEPARATOR) => {
5695
5698
  * @returns {Boolean} true or false
5696
5699
  */
5697
5700
  const isMobile = (userAgent) => {
5698
- return !!(userAgent.toLowerCase().match(/android/i) ||
5699
- userAgent.toLowerCase().match(/blackberry|bb/i) ||
5700
- userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
5701
- userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
5701
+ return !!(userAgent.toLowerCase().match(/android/i) ||
5702
+ userAgent.toLowerCase().match(/blackberry|bb/i) ||
5703
+ userAgent.toLowerCase().match(/iphone|ipad|ipod/i) ||
5704
+ userAgent.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
5702
5705
  };
5703
5706
  const addGameTag = (tags) => {
5704
- if ((tags === null || tags === void 0 ? void 0 : tags.length) === 0)
5705
- return '';
5706
- let tagName;
5707
- let differenceOfTime = 99999999999;
5708
- let firstToExpire;
5709
- const currentDate = new Date(Date.now());
5710
- tags.forEach((tag, index) => {
5711
- const startDateOfTag = new Date(tag.schedules[0].startTime);
5712
- const endDateOfTag = new Date(tag.schedules[0].endTime);
5713
- if (hooks(endDateOfTag).diff(currentDate) < differenceOfTime) {
5714
- differenceOfTime = hooks(endDateOfTag).diff(currentDate);
5715
- firstToExpire = index;
5716
- }
5717
- if (hooks(currentDate).isAfter(startDateOfTag) && hooks(currentDate).isBefore(endDateOfTag)) {
5718
- tagName = tags[firstToExpire].name;
5719
- }
5720
- });
5721
- return tagName;
5707
+ if ((tags === null || tags === void 0 ? void 0 : tags.length) === 0)
5708
+ return '';
5709
+ let tagName;
5710
+ let differenceOfTime = 99999999999;
5711
+ let firstToExpire;
5712
+ const currentDate = new Date(Date.now());
5713
+ tags.forEach((tag, index) => {
5714
+ const startDateOfTag = new Date(tag.schedules[0].startTime);
5715
+ const endDateOfTag = new Date(tag.schedules[0].endTime);
5716
+ if (hooks(endDateOfTag).diff(currentDate) < differenceOfTime) {
5717
+ differenceOfTime = hooks(endDateOfTag).diff(currentDate);
5718
+ firstToExpire = index;
5719
+ }
5720
+ if (hooks(currentDate).isAfter(startDateOfTag) && hooks(currentDate).isBefore(endDateOfTag)) {
5721
+ tagName = tags[firstToExpire].name;
5722
+ }
5723
+ });
5724
+ return tagName;
5722
5725
  };
5723
5726
  const convertGicBaccaratUpdateItem = (oriItem) => {
5724
- var _a, _b;
5725
- return {
5726
- winner: oriItem.Winner,
5727
- color: oriItem.Color,
5728
- location: {
5729
- column: (_a = oriItem.Location) === null || _a === void 0 ? void 0 : _a.Column,
5730
- row: (_b = oriItem.Location) === null || _b === void 0 ? void 0 : _b.Row
5731
- },
5732
- ties: (oriItem.Ties) | 0,
5733
- score: oriItem.Score,
5734
- playerPair: oriItem.PlayerPair,
5735
- bankerPair: oriItem.BankerPair
5736
- };
5727
+ var _a, _b;
5728
+ return {
5729
+ winner: oriItem.Winner,
5730
+ color: oriItem.Color,
5731
+ location: {
5732
+ column: (_a = oriItem.Location) === null || _a === void 0 ? void 0 : _a.Column,
5733
+ row: (_b = oriItem.Location) === null || _b === void 0 ? void 0 : _b.Row
5734
+ },
5735
+ ties: (oriItem.Ties) | 0,
5736
+ score: oriItem.Score,
5737
+ playerPair: oriItem.PlayerPair,
5738
+ bankerPair: oriItem.BankerPair
5739
+ };
5737
5740
  };
5738
5741
 
5739
5742
  export { addGameTag as a, convertGicBaccaratUpdateItem as c, hooks as h, isMobile as i, numberWithSeparators as n };