@mapsindoors/map-template 1.95.1 → 1.95.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 (66) hide show
  1. package/dist/{GoogleMapsMap-C5n6Bgtp.mjs → GoogleMapsMap-Dkn60-_e.mjs} +2 -2
  2. package/dist/{MapboxMap-UCqzt1AC.mjs → MapboxMap-B1oo7IUm.mjs} +2 -2
  3. package/dist/_commonjsHelpers-B85MJLTf.js +5 -0
  4. package/dist/app-globals-DQuL1Twl.js +3 -0
  5. package/dist/combo-box-item.entry.js +8 -10
  6. package/dist/icon-DT_sDkmK.js +11 -0
  7. package/dist/index-BZQHyS7V.js +1701 -0
  8. package/dist/loader.js +7 -14
  9. package/dist/mapsindoors-react.es.js +1 -1
  10. package/dist/mapsindoors-react.umd.js +175 -175
  11. package/dist/mapsindoors-webcomponent.es.js +2916 -2904
  12. package/dist/mi-card_2.entry.js +23 -18
  13. package/dist/mi-chip.entry.js +25 -16
  14. package/dist/mi-column.entry.js +47 -23
  15. package/dist/mi-combo-box.entry.js +412 -379
  16. package/dist/mi-components.js +15 -12
  17. package/dist/mi-data-table.entry.js +298 -278
  18. package/dist/mi-distance_2.entry.js +58 -56
  19. package/dist/mi-dropdown-item.entry.js +8 -10
  20. package/dist/mi-dropdown.entry.js +525 -481
  21. package/dist/mi-floor-selector.entry.js +183 -180
  22. package/dist/mi-keyboard.entry.js +207 -186
  23. package/dist/mi-list-item-category.entry.js +44 -41
  24. package/dist/mi-list-item-location.entry.js +168 -162
  25. package/dist/mi-list.entry.js +56 -48
  26. package/dist/mi-location-booking.entry.js +320 -295
  27. package/dist/mi-location-info.entry.js +61 -53
  28. package/dist/mi-map-googlemaps.entry.js +369 -324
  29. package/dist/mi-map-mapbox.entry.js +502 -439
  30. package/dist/mi-metric-card.entry.js +50 -37
  31. package/dist/mi-my-position.entry.js +2341 -874
  32. package/dist/mi-notification.entry.js +112 -102
  33. package/dist/mi-route-instructions-heading.entry.js +70 -65
  34. package/dist/mi-route-instructions-maneuver-legacy.entry.js +80 -76
  35. package/dist/mi-route-instructions-maneuver.entry.js +80 -76
  36. package/dist/mi-route-instructions-step-legacy.entry.js +296 -282
  37. package/dist/mi-route-instructions-step.entry.js +313 -292
  38. package/dist/mi-route-instructions.entry.js +167 -150
  39. package/dist/mi-scroll-buttons.entry.js +104 -98
  40. package/dist/mi-search.entry.js +366 -325
  41. package/dist/mi-share-sms.entry.js +82 -70
  42. package/dist/mi-step-switcher.entry.js +34 -25
  43. package/dist/mi-tab-panel.entry.js +18 -18
  44. package/dist/mi-tab.entry.js +5 -7
  45. package/dist/mi-tabs.entry.js +42 -40
  46. package/dist/mi-time.entry.js +49 -49
  47. package/dist/mi-variables-CDNvnTkH.js +5 -0
  48. package/dist/{reactcomponent-DQsjxRIN.mjs → reactcomponent-2Oa1vSiK.mjs} +8996 -8660
  49. package/dist/route-travel-mode.enum-BvqP1fpw.js +9 -0
  50. package/dist/sort-order.enum-jsLAbYWg.js +566 -0
  51. package/dist/{unit-system.enum-eaefb53e.js → unit-system.enum-BwPgAWqL.js} +2 -2
  52. package/dist/utils-DNHzysQ6.js +61 -0
  53. package/package.json +1 -1
  54. package/dist/_commonjsHelpers-ba3f0406.js +0 -21
  55. package/dist/icon-b8d01d6f.js +0 -24
  56. package/dist/index-7e9696f3.js +0 -1678
  57. package/dist/mi-variables-9a6c8d4d.js +0 -6
  58. package/dist/polyfills/core-js.js +0 -11
  59. package/dist/polyfills/css-shim.js +0 -1
  60. package/dist/polyfills/dom.js +0 -79
  61. package/dist/polyfills/es5-html-element.js +0 -1
  62. package/dist/polyfills/index.js +0 -34
  63. package/dist/polyfills/system.js +0 -6
  64. package/dist/route-travel-mode.enum-7f4ce9c7.js +0 -9
  65. package/dist/sort-order.enum-64ce8998.js +0 -552
  66. package/dist/utils-ae714467.js +0 -61
@@ -1,5 +1,5 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-7e9696f3.js';
2
- import { c as isInternetExplorer } from './utils-ae714467.js';
1
+ import { r as registerInstance, c as createEvent, h, H as Host } from './index-BZQHyS7V.js';
2
+ import { c as isInternetExplorer } from './utils-DNHzysQ6.js';
3
3
 
4
4
  function toInteger(dirtyNumber) {
5
5
  if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
@@ -853,7 +853,7 @@ function _classCallCheck$w(instance, Constructor) { if (!(instance instanceof Co
853
853
 
854
854
  function _defineProperties$w(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
855
855
 
856
- function _createClass$w(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$w(Constructor.prototype, protoProps); if (staticProps) _defineProperties$w(Constructor, staticProps); return Constructor; }
856
+ function _createClass$w(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$w(Constructor.prototype, protoProps); return Constructor; }
857
857
 
858
858
  function _defineProperty$v(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
859
859
 
@@ -955,7 +955,7 @@ function _classCallCheck$v(instance, Constructor) { if (!(instance instanceof Co
955
955
 
956
956
  function _defineProperties$v(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
957
957
 
958
- function _createClass$v(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$v(Constructor.prototype, protoProps); if (staticProps) _defineProperties$v(Constructor, staticProps); return Constructor; }
958
+ function _createClass$v(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$v(Constructor.prototype, protoProps); return Constructor; }
959
959
  var Parser = /*#__PURE__*/function () {
960
960
  function Parser() {
961
961
  _classCallCheck$v(this, Parser);
@@ -991,7 +991,7 @@ function _classCallCheck$u(instance, Constructor) { if (!(instance instanceof Co
991
991
 
992
992
  function _defineProperties$u(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
993
993
 
994
- function _createClass$u(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$u(Constructor.prototype, protoProps); if (staticProps) _defineProperties$u(Constructor, staticProps); return Constructor; }
994
+ function _createClass$u(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$u(Constructor.prototype, protoProps); return Constructor; }
995
995
 
996
996
  function _inherits$u(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$u(subClass, superClass); }
997
997
 
@@ -1297,7 +1297,7 @@ function _classCallCheck$t(instance, Constructor) { if (!(instance instanceof Co
1297
1297
 
1298
1298
  function _defineProperties$t(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1299
1299
 
1300
- function _createClass$t(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$t(Constructor.prototype, protoProps); if (staticProps) _defineProperties$t(Constructor, staticProps); return Constructor; }
1300
+ function _createClass$t(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$t(Constructor.prototype, protoProps); return Constructor; }
1301
1301
 
1302
1302
  function _inherits$t(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$t(subClass, superClass); }
1303
1303
 
@@ -1456,7 +1456,7 @@ function _classCallCheck$s(instance, Constructor) { if (!(instance instanceof Co
1456
1456
 
1457
1457
  function _defineProperties$s(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1458
1458
 
1459
- function _createClass$s(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$s(Constructor.prototype, protoProps); if (staticProps) _defineProperties$s(Constructor, staticProps); return Constructor; }
1459
+ function _createClass$s(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$s(Constructor.prototype, protoProps); return Constructor; }
1460
1460
 
1461
1461
  function _inherits$s(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$s(subClass, superClass); }
1462
1462
 
@@ -1564,7 +1564,7 @@ function _classCallCheck$r(instance, Constructor) { if (!(instance instanceof Co
1564
1564
 
1565
1565
  function _defineProperties$r(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1566
1566
 
1567
- function _createClass$r(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$r(Constructor.prototype, protoProps); if (staticProps) _defineProperties$r(Constructor, staticProps); return Constructor; }
1567
+ function _createClass$r(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$r(Constructor.prototype, protoProps); return Constructor; }
1568
1568
 
1569
1569
  function _inherits$r(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$r(subClass, superClass); }
1570
1570
 
@@ -1633,7 +1633,7 @@ function _classCallCheck$q(instance, Constructor) { if (!(instance instanceof Co
1633
1633
 
1634
1634
  function _defineProperties$q(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1635
1635
 
1636
- function _createClass$q(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$q(Constructor.prototype, protoProps); if (staticProps) _defineProperties$q(Constructor, staticProps); return Constructor; }
1636
+ function _createClass$q(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$q(Constructor.prototype, protoProps); return Constructor; }
1637
1637
 
1638
1638
  function _inherits$q(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$q(subClass, superClass); }
1639
1639
 
@@ -1700,7 +1700,7 @@ function _classCallCheck$p(instance, Constructor) { if (!(instance instanceof Co
1700
1700
 
1701
1701
  function _defineProperties$p(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1702
1702
 
1703
- function _createClass$p(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$p(Constructor.prototype, protoProps); if (staticProps) _defineProperties$p(Constructor, staticProps); return Constructor; }
1703
+ function _createClass$p(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$p(Constructor.prototype, protoProps); return Constructor; }
1704
1704
 
1705
1705
  function _inherits$p(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$p(subClass, superClass); }
1706
1706
 
@@ -1811,7 +1811,7 @@ function _classCallCheck$o(instance, Constructor) { if (!(instance instanceof Co
1811
1811
 
1812
1812
  function _defineProperties$o(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1813
1813
 
1814
- function _createClass$o(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$o(Constructor.prototype, protoProps); if (staticProps) _defineProperties$o(Constructor, staticProps); return Constructor; }
1814
+ function _createClass$o(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$o(Constructor.prototype, protoProps); return Constructor; }
1815
1815
 
1816
1816
  function _inherits$o(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$o(subClass, superClass); }
1817
1817
 
@@ -1922,7 +1922,7 @@ function _classCallCheck$n(instance, Constructor) { if (!(instance instanceof Co
1922
1922
 
1923
1923
  function _defineProperties$n(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
1924
1924
 
1925
- function _createClass$n(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$n(Constructor.prototype, protoProps); if (staticProps) _defineProperties$n(Constructor, staticProps); return Constructor; }
1925
+ function _createClass$n(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$n(Constructor.prototype, protoProps); return Constructor; }
1926
1926
 
1927
1927
  function _inherits$n(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$n(subClass, superClass); }
1928
1928
 
@@ -2039,7 +2039,7 @@ function _classCallCheck$m(instance, Constructor) { if (!(instance instanceof Co
2039
2039
 
2040
2040
  function _defineProperties$m(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2041
2041
 
2042
- function _createClass$m(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$m(Constructor.prototype, protoProps); if (staticProps) _defineProperties$m(Constructor, staticProps); return Constructor; }
2042
+ function _createClass$m(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$m(Constructor.prototype, protoProps); return Constructor; }
2043
2043
 
2044
2044
  function _inherits$m(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$m(subClass, superClass); }
2045
2045
 
@@ -2190,7 +2190,7 @@ function _classCallCheck$l(instance, Constructor) { if (!(instance instanceof Co
2190
2190
 
2191
2191
  function _defineProperties$l(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2192
2192
 
2193
- function _createClass$l(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$l(Constructor.prototype, protoProps); if (staticProps) _defineProperties$l(Constructor, staticProps); return Constructor; }
2193
+ function _createClass$l(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$l(Constructor.prototype, protoProps); return Constructor; }
2194
2194
 
2195
2195
  function _inherits$l(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$l(subClass, superClass); }
2196
2196
 
@@ -2320,7 +2320,7 @@ function _classCallCheck$k(instance, Constructor) { if (!(instance instanceof Co
2320
2320
 
2321
2321
  function _defineProperties$k(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2322
2322
 
2323
- function _createClass$k(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$k(Constructor.prototype, protoProps); if (staticProps) _defineProperties$k(Constructor, staticProps); return Constructor; }
2323
+ function _createClass$k(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$k(Constructor.prototype, protoProps); return Constructor; }
2324
2324
 
2325
2325
  function _inherits$k(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$k(subClass, superClass); }
2326
2326
 
@@ -2398,7 +2398,7 @@ function _classCallCheck$j(instance, Constructor) { if (!(instance instanceof Co
2398
2398
 
2399
2399
  function _defineProperties$j(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2400
2400
 
2401
- function _createClass$j(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$j(Constructor.prototype, protoProps); if (staticProps) _defineProperties$j(Constructor, staticProps); return Constructor; }
2401
+ function _createClass$j(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$j(Constructor.prototype, protoProps); return Constructor; }
2402
2402
 
2403
2403
  function _inherits$j(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$j(subClass, superClass); }
2404
2404
 
@@ -2490,7 +2490,7 @@ function _classCallCheck$i(instance, Constructor) { if (!(instance instanceof Co
2490
2490
 
2491
2491
  function _defineProperties$i(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2492
2492
 
2493
- function _createClass$i(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$i(Constructor.prototype, protoProps); if (staticProps) _defineProperties$i(Constructor, staticProps); return Constructor; }
2493
+ function _createClass$i(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$i(Constructor.prototype, protoProps); return Constructor; }
2494
2494
 
2495
2495
  function _inherits$i(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$i(subClass, superClass); }
2496
2496
 
@@ -2600,7 +2600,7 @@ function _classCallCheck$h(instance, Constructor) { if (!(instance instanceof Co
2600
2600
 
2601
2601
  function _defineProperties$h(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2602
2602
 
2603
- function _createClass$h(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$h(Constructor.prototype, protoProps); if (staticProps) _defineProperties$h(Constructor, staticProps); return Constructor; }
2603
+ function _createClass$h(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$h(Constructor.prototype, protoProps); return Constructor; }
2604
2604
 
2605
2605
  function _inherits$h(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$h(subClass, superClass); }
2606
2606
 
@@ -2718,7 +2718,7 @@ function _classCallCheck$g(instance, Constructor) { if (!(instance instanceof Co
2718
2718
 
2719
2719
  function _defineProperties$g(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2720
2720
 
2721
- function _createClass$g(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$g(Constructor.prototype, protoProps); if (staticProps) _defineProperties$g(Constructor, staticProps); return Constructor; }
2721
+ function _createClass$g(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$g(Constructor.prototype, protoProps); return Constructor; }
2722
2722
 
2723
2723
  function _inherits$g(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$g(subClass, superClass); }
2724
2724
 
@@ -2851,7 +2851,7 @@ function _classCallCheck$f(instance, Constructor) { if (!(instance instanceof Co
2851
2851
 
2852
2852
  function _defineProperties$f(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
2853
2853
 
2854
- function _createClass$f(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$f(Constructor.prototype, protoProps); if (staticProps) _defineProperties$f(Constructor, staticProps); return Constructor; }
2854
+ function _createClass$f(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$f(Constructor.prototype, protoProps); return Constructor; }
2855
2855
 
2856
2856
  function _inherits$f(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$f(subClass, superClass); }
2857
2857
 
@@ -3002,7 +3002,7 @@ function _classCallCheck$e(instance, Constructor) { if (!(instance instanceof Co
3002
3002
 
3003
3003
  function _defineProperties$e(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3004
3004
 
3005
- function _createClass$e(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$e(Constructor.prototype, protoProps); if (staticProps) _defineProperties$e(Constructor, staticProps); return Constructor; }
3005
+ function _createClass$e(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$e(Constructor.prototype, protoProps); return Constructor; }
3006
3006
 
3007
3007
  function _inherits$e(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$e(subClass, superClass); }
3008
3008
 
@@ -3138,7 +3138,7 @@ function _classCallCheck$d(instance, Constructor) { if (!(instance instanceof Co
3138
3138
 
3139
3139
  function _defineProperties$d(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3140
3140
 
3141
- function _createClass$d(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$d(Constructor.prototype, protoProps); if (staticProps) _defineProperties$d(Constructor, staticProps); return Constructor; }
3141
+ function _createClass$d(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$d(Constructor.prototype, protoProps); return Constructor; }
3142
3142
 
3143
3143
  function _inherits$d(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$d(subClass, superClass); }
3144
3144
 
@@ -3230,7 +3230,7 @@ function _classCallCheck$c(instance, Constructor) { if (!(instance instanceof Co
3230
3230
 
3231
3231
  function _defineProperties$c(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3232
3232
 
3233
- function _createClass$c(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$c(Constructor.prototype, protoProps); if (staticProps) _defineProperties$c(Constructor, staticProps); return Constructor; }
3233
+ function _createClass$c(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$c(Constructor.prototype, protoProps); return Constructor; }
3234
3234
 
3235
3235
  function _inherits$c(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$c(subClass, superClass); }
3236
3236
 
@@ -3322,7 +3322,7 @@ function _classCallCheck$b(instance, Constructor) { if (!(instance instanceof Co
3322
3322
 
3323
3323
  function _defineProperties$b(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3324
3324
 
3325
- function _createClass$b(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$b(Constructor.prototype, protoProps); if (staticProps) _defineProperties$b(Constructor, staticProps); return Constructor; }
3325
+ function _createClass$b(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$b(Constructor.prototype, protoProps); return Constructor; }
3326
3326
 
3327
3327
  function _inherits$b(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$b(subClass, superClass); }
3328
3328
 
@@ -3415,7 +3415,7 @@ function _classCallCheck$a(instance, Constructor) { if (!(instance instanceof Co
3415
3415
 
3416
3416
  function _defineProperties$a(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3417
3417
 
3418
- function _createClass$a(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$a(Constructor.prototype, protoProps); if (staticProps) _defineProperties$a(Constructor, staticProps); return Constructor; }
3418
+ function _createClass$a(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$a(Constructor.prototype, protoProps); return Constructor; }
3419
3419
 
3420
3420
  function _inherits$a(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$a(subClass, superClass); }
3421
3421
 
@@ -3502,7 +3502,7 @@ function _classCallCheck$9(instance, Constructor) { if (!(instance instanceof Co
3502
3502
 
3503
3503
  function _defineProperties$9(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3504
3504
 
3505
- function _createClass$9(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$9(Constructor.prototype, protoProps); if (staticProps) _defineProperties$9(Constructor, staticProps); return Constructor; }
3505
+ function _createClass$9(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$9(Constructor.prototype, protoProps); return Constructor; }
3506
3506
 
3507
3507
  function _inherits$9(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$9(subClass, superClass); }
3508
3508
 
@@ -3580,7 +3580,7 @@ function _classCallCheck$8(instance, Constructor) { if (!(instance instanceof Co
3580
3580
 
3581
3581
  function _defineProperties$8(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3582
3582
 
3583
- function _createClass$8(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$8(Constructor.prototype, protoProps); if (staticProps) _defineProperties$8(Constructor, staticProps); return Constructor; }
3583
+ function _createClass$8(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$8(Constructor.prototype, protoProps); return Constructor; }
3584
3584
 
3585
3585
  function _inherits$8(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$8(subClass, superClass); }
3586
3586
 
@@ -3665,7 +3665,7 @@ function _classCallCheck$7(instance, Constructor) { if (!(instance instanceof Co
3665
3665
 
3666
3666
  function _defineProperties$7(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3667
3667
 
3668
- function _createClass$7(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$7(Constructor.prototype, protoProps); if (staticProps) _defineProperties$7(Constructor, staticProps); return Constructor; }
3668
+ function _createClass$7(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$7(Constructor.prototype, protoProps); return Constructor; }
3669
3669
 
3670
3670
  function _inherits$7(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$7(subClass, superClass); }
3671
3671
 
@@ -3744,7 +3744,7 @@ function _classCallCheck$6(instance, Constructor) { if (!(instance instanceof Co
3744
3744
 
3745
3745
  function _defineProperties$6(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3746
3746
 
3747
- function _createClass$6(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$6(Constructor.prototype, protoProps); if (staticProps) _defineProperties$6(Constructor, staticProps); return Constructor; }
3747
+ function _createClass$6(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$6(Constructor.prototype, protoProps); return Constructor; }
3748
3748
 
3749
3749
  function _inherits$6(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$6(subClass, superClass); }
3750
3750
 
@@ -3822,7 +3822,7 @@ function _classCallCheck$5(instance, Constructor) { if (!(instance instanceof Co
3822
3822
 
3823
3823
  function _defineProperties$5(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3824
3824
 
3825
- function _createClass$5(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$5(Constructor.prototype, protoProps); if (staticProps) _defineProperties$5(Constructor, staticProps); return Constructor; }
3825
+ function _createClass$5(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$5(Constructor.prototype, protoProps); return Constructor; }
3826
3826
 
3827
3827
  function _inherits$5(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$5(subClass, superClass); }
3828
3828
 
@@ -3900,7 +3900,7 @@ function _classCallCheck$4(instance, Constructor) { if (!(instance instanceof Co
3900
3900
 
3901
3901
  function _defineProperties$4(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3902
3902
 
3903
- function _createClass$4(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$4(Constructor.prototype, protoProps); if (staticProps) _defineProperties$4(Constructor, staticProps); return Constructor; }
3903
+ function _createClass$4(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$4(Constructor.prototype, protoProps); return Constructor; }
3904
3904
 
3905
3905
  function _inherits$4(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$4(subClass, superClass); }
3906
3906
 
@@ -3966,7 +3966,7 @@ function _classCallCheck$3(instance, Constructor) { if (!(instance instanceof Co
3966
3966
 
3967
3967
  function _defineProperties$3(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
3968
3968
 
3969
- function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); if (staticProps) _defineProperties$3(Constructor, staticProps); return Constructor; }
3969
+ function _createClass$3(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$3(Constructor.prototype, protoProps); return Constructor; }
3970
3970
 
3971
3971
  function _inherits$3(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$3(subClass, superClass); }
3972
3972
 
@@ -4048,7 +4048,7 @@ function _classCallCheck$2(instance, Constructor) { if (!(instance instanceof Co
4048
4048
 
4049
4049
  function _defineProperties$2(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4050
4050
 
4051
- function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); if (staticProps) _defineProperties$2(Constructor, staticProps); return Constructor; }
4051
+ function _createClass$2(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$2(Constructor.prototype, protoProps); return Constructor; }
4052
4052
 
4053
4053
  function _inherits$2(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$2(subClass, superClass); }
4054
4054
 
@@ -4130,7 +4130,7 @@ function _classCallCheck$1(instance, Constructor) { if (!(instance instanceof Co
4130
4130
 
4131
4131
  function _defineProperties$1(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4132
4132
 
4133
- function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); if (staticProps) _defineProperties$1(Constructor, staticProps); return Constructor; }
4133
+ function _createClass$1(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties$1(Constructor.prototype, protoProps); return Constructor; }
4134
4134
 
4135
4135
  function _inherits$1(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf$1(subClass, superClass); }
4136
4136
 
@@ -4193,7 +4193,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
4193
4193
 
4194
4194
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4195
4195
 
4196
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
4196
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); return Constructor; }
4197
4197
 
4198
4198
  function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
4199
4199
 
@@ -4330,7 +4330,7 @@ var parsers = {
4330
4330
 
4331
4331
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4332
4332
 
4333
- function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
4333
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
4334
4334
 
4335
4335
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4336
4336
 
@@ -4657,25 +4657,25 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
4657
4657
  */
4658
4658
 
4659
4659
  function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options) {
4660
- var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
4660
+ var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _defaultOptions$local3, _defaultOptions$local4;
4661
4661
 
4662
4662
  requiredArgs(3, arguments);
4663
4663
  var dateString = String(dirtyDateString);
4664
4664
  var formatString = String(dirtyFormatString);
4665
4665
  var defaultOptions = getDefaultOptions();
4666
- var locale$1 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
4666
+ var locale$1 = (_ref = (_options$locale = void 0 ) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
4667
4667
 
4668
4668
  if (!locale$1.match) {
4669
4669
  throw new RangeError('locale must contain match property');
4670
4670
  }
4671
4671
 
4672
- var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
4672
+ var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = void 0 ) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : void 0 ) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
4673
4673
 
4674
4674
  if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
4675
4675
  throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
4676
4676
  }
4677
4677
 
4678
- var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
4678
+ var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = void 0 ) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : void 0 ) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
4679
4679
 
4680
4680
  if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
4681
4681
  throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
@@ -4715,11 +4715,11 @@ function parse(dirtyDateString, dirtyFormatString, dirtyReferenceDate, options)
4715
4715
  var _loop = function _loop() {
4716
4716
  var token = _step.value;
4717
4717
 
4718
- if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(token)) {
4718
+ if (isProtectedWeekYearToken(token)) {
4719
4719
  throwProtectedError(token, formatString, dirtyDateString);
4720
4720
  }
4721
4721
 
4722
- if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(token)) {
4722
+ if (isProtectedDayOfYearToken(token)) {
4723
4723
  throwProtectedError(token, formatString, dirtyDateString);
4724
4724
  }
4725
4725
 
@@ -4919,275 +4919,300 @@ function areIntervalsOverlapping(intervalLeft, intervalRight, options) {
4919
4919
  throw new RangeError('Invalid interval');
4920
4920
  }
4921
4921
 
4922
- if (options !== null && options !== void 0 && options.inclusive) {
4923
- return leftStartTime <= rightEndTime && rightStartTime <= leftEndTime;
4924
- }
4925
-
4926
4922
  return leftStartTime < rightEndTime && rightStartTime < leftEndTime;
4927
4923
  }
4928
4924
 
4929
4925
  var LocationBookingDuration;
4930
4926
  (function (LocationBookingDuration) {
4931
- LocationBookingDuration[LocationBookingDuration["min30"] = 30] = "min30";
4932
- LocationBookingDuration[LocationBookingDuration["min60"] = 60] = "min60";
4927
+ LocationBookingDuration[LocationBookingDuration["min30"] = 30] = "min30";
4928
+ LocationBookingDuration[LocationBookingDuration["min60"] = 60] = "min60";
4933
4929
  })(LocationBookingDuration || (LocationBookingDuration = {}));
4934
4930
 
4935
- const locationBookingCss = "a.mi-button{cursor:default}.mi-button{border-radius:4px;border-width:1px;border-style:solid;font-family:Inter, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Oxygen, Ubuntu, Cantarell, \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", Arial, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\";font-size:1rem;font-weight:500;padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;display:inline-flex;align-items:center}.mi-button:disabled{opacity:0.48;cursor:not-allowed}.mi-button object{filter:invert(9%) sepia(13%) saturate(692%) hue-rotate(185deg) brightness(98%) contrast(91%);width:16px;height:16px}.mi-button--small{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;font-size:0.875rem;height:32px}.mi-button--small object{width:16px;height:16px}.mi-button--large{padding-left:16px;padding-right:16px;font-size:1.25rem}.mi-button--large object{width:20px;height:20px}.mi-button--full-width{width:100%;justify-content:center}.mi-button--icon-left{padding-left:12px}.mi-button--icon-left object{margin-right:8px}.mi-button--icon-right{padding-right:12px}.mi-button--icon-right object{margin-left:8px}.mi-button--icon-both{padding-top:12px;padding-bottom:12px}.mi-button--icon-both object:first-of-type{margin-right:8px}.mi-button--icon-both object:last-of-type{margin-left:8px}.mi-button--base{background:linear-gradient(#f5f7fa, #ebeff5);color:#1e2025;border-color:#c8d0e0}.mi-button--base:not(:disabled):hover{background:linear-gradient(#ebeff5, #dee3ed);border-color:#aeb9cb}.mi-button--base:not(:disabled):active{background:linear-gradient(#dee3ed, #ebeff5)}.mi-button--primary{color:#ffffff;border-color:#20693e;background:linear-gradient(#3ba064, #2a844e)}.mi-button--primary object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--primary:not(:disabled):hover{background:linear-gradient(#2a844e, #20693e)}.mi-button--primary:not(:disabled):active{background:linear-gradient(#20693e, #2a844e)}.mi-button--delete{background:linear-gradient(#f55151, #de1b1b);color:#ffffff;border-color:#ba0d0d}.mi-button--delete object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--delete:not(:disabled):hover{background:linear-gradient(#de1b1b, #ba0d0d)}.mi-button--delete:not(:disabled):active{background:linear-gradient(#ba0d0d, #de1b1b)}.mi-button--outline{color:#3071d9;border-color:#3071d9;background-color:transparent}.mi-button--outline object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--outline:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--outline:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.mi-button--link{color:#3071d9;border-style:none;background-color:transparent;cursor:pointer}.mi-button--link object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--link:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--link:disabled:hover{cursor:not-allowed}.mi-button--link:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}:host{display:block;box-sizing:border-box}ul{list-style:none;padding-left:0}li{font-size:1.25rem;margin-top:12px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center}.booking-icon{width:16px;height:16px;margin-right:4px;background-color:white}.booking-icon--blocked{background-color:rgba(0, 0, 0, 0.247);}";
4931
+ const locationBookingCss = () => `a.mi-button{cursor:default}.mi-button{border-radius:4px;border-width:1px;border-style:solid;font-family:Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";font-size:1rem;font-weight:500;padding-left:16px;padding-right:16px;padding-top:12px;padding-bottom:12px;display:inline-flex;align-items:center}.mi-button:disabled{opacity:0.48;cursor:not-allowed}.mi-button object{filter:invert(9%) sepia(13%) saturate(692%) hue-rotate(185deg) brightness(98%) contrast(91%);width:16px;height:16px}.mi-button--small{padding-left:12px;padding-right:12px;padding-top:8px;padding-bottom:8px;font-size:0.875rem;height:32px}.mi-button--small object{width:16px;height:16px}.mi-button--large{padding-left:16px;padding-right:16px;font-size:1.25rem}.mi-button--large object{width:20px;height:20px}.mi-button--full-width{width:100%;justify-content:center}.mi-button--icon-left{padding-left:12px}.mi-button--icon-left object{margin-right:8px}.mi-button--icon-right{padding-right:12px}.mi-button--icon-right object{margin-left:8px}.mi-button--icon-both{padding-top:12px;padding-bottom:12px}.mi-button--icon-both object:first-of-type{margin-right:8px}.mi-button--icon-both object:last-of-type{margin-left:8px}.mi-button--base{background:linear-gradient(#f5f7fa, #ebeff5);color:#1e2025;border-color:#c8d0e0}.mi-button--base:not(:disabled):hover{background:linear-gradient(#ebeff5, #dee3ed);border-color:#aeb9cb}.mi-button--base:not(:disabled):active{background:linear-gradient(#dee3ed, #ebeff5)}.mi-button--primary{color:#ffffff;border-color:#20693e;background:linear-gradient(#3ba064, #2a844e)}.mi-button--primary object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--primary:not(:disabled):hover{background:linear-gradient(#2a844e, #20693e)}.mi-button--primary:not(:disabled):active{background:linear-gradient(#20693e, #2a844e)}.mi-button--delete{background:linear-gradient(#f55151, #de1b1b);color:#ffffff;border-color:#ba0d0d}.mi-button--delete object{filter:invert(100%) sepia(93%) saturate(0%) hue-rotate(201deg) brightness(106%) contrast(106%)}.mi-button--delete:not(:disabled):hover{background:linear-gradient(#de1b1b, #ba0d0d)}.mi-button--delete:not(:disabled):active{background:linear-gradient(#ba0d0d, #de1b1b)}.mi-button--outline{color:#3071d9;border-color:#3071d9;background-color:transparent}.mi-button--outline object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--outline:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--outline:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}.mi-button--link{color:#3071d9;border-style:none;background-color:transparent;cursor:pointer}.mi-button--link object{filter:invert(38%) sepia(97%) saturate(742%) hue-rotate(188deg) brightness(86%) contrast(97%)}.mi-button--link:not(:disabled):hover{color:#1d5bbf;border-color:#1d5bbf;background-color:#eef4fc}.mi-button--link:disabled:hover{cursor:not-allowed}.mi-button--link:not(:disabled):active{color:#1d5bbf;border-color:#1d5bbf;background-color:#cfe0fc}:host{display:block;box-sizing:border-box}ul{list-style:none;padding-left:0}li{font-size:1.25rem;margin-top:12px;margin-bottom:12px;display:flex;justify-content:space-between;align-items:center}.booking-icon{width:16px;height:16px;margin-right:4px;background-color:white}.booking-icon--blocked{background-color:rgba(0, 0, 0, 0.247);}`;
4936
4932
 
4937
4933
  const LocationBooking = class {
4938
- constructor(hostRef) {
4939
- registerInstance(this, hostRef);
4940
- this.bookingCompleted = createEvent(this, "bookingCompleted", 7);
4941
- this.bookingFailed = createEvent(this, "bookingFailed", 7);
4942
- this.cancelCompleted = createEvent(this, "cancelCompleted", 7);
4943
- this.cancelFailed = createEvent(this, "cancelFailed", 7);
4944
- this.isInternetExplorer = isInternetExplorer();
4945
- this.location = undefined;
4946
- this.duration = LocationBookingDuration.min30;
4947
- this.translations = {
4948
- book: 'Book',
4949
- cancel: 'Cancel',
4950
- booked: 'Booked'
4951
- };
4952
- this.show = 4;
4953
- this.startHour = 8;
4954
- this.stopHour = 18;
4955
- this.bookingTitle = 'Booked';
4956
- this.timeSlots = [];
4957
- }
4958
- locationChanged() {
4959
- this.updateBookings();
4960
- }
4961
- updateDuration() {
4962
- if (this.location) {
4963
- this.updateBookings();
4934
+ constructor(hostRef) {
4935
+ registerInstance(this, hostRef);
4936
+ this.bookingCompleted = createEvent(this, "bookingCompleted", 7);
4937
+ this.bookingFailed = createEvent(this, "bookingFailed", 7);
4938
+ this.cancelCompleted = createEvent(this, "cancelCompleted", 7);
4939
+ this.cancelFailed = createEvent(this, "cancelFailed", 7);
4940
+ /**
4941
+ * Wether booking should be performed for 30 or 60 minutes.
4942
+ * @type {LocationBookingDuration}
4943
+ */
4944
+ this.duration = LocationBookingDuration.min30;
4945
+ /**
4946
+ * Translations object for translatable strings.
4947
+ */
4948
+ this.translations = {
4949
+ book: 'Book',
4950
+ cancel: 'Cancel',
4951
+ booked: 'Booked'
4952
+ };
4953
+ /**
4954
+ * How many time slots to show going forward in time. Default to 4.
4955
+ */
4956
+ this.show = 4;
4957
+ /**
4958
+ * No bookings will be allowed before this hour. Default value is 8.
4959
+ * @type {number} - the hour in 24h format
4960
+ */
4961
+ this.startHour = 8;
4962
+ /**
4963
+ * No bookings will be allowed within and after this hour. Default value is 18.
4964
+ * @type {number} - the hour (0-23)
4965
+ */
4966
+ this.stopHour = 18;
4967
+ /**
4968
+ * The title of the created bookings. Defaults to "Booked".
4969
+ * @type {string}
4970
+ */
4971
+ this.bookingTitle = 'Booked';
4972
+ /**
4973
+ * All time slots that can be presented.
4974
+ * @type BookingTimeSlot[]
4975
+ */
4976
+ this.timeSlots = [];
4977
+ this.isInternetExplorer = isInternetExplorer();
4978
+ }
4979
+ locationChanged() {
4980
+ this.updateBookings();
4981
+ }
4982
+ updateDuration() {
4983
+ if (this.location) {
4984
+ this.updateBookings();
4985
+ }
4964
4986
  }
4965
- }
4966
- /**
4967
- * Get existing bookings and calculate booking time slots for the location.
4968
- */
4969
- updateBookings() {
4970
- this.getBookingsToday()
4971
- .then(bookings => {
4972
- const dayOffset = new Date().getHours() >= this.stopHour ? 1 : 0;
4973
- const timeSlots = this.getTimeSlots(dayOffset);
4974
- // Decorate time slots with booking information
4975
- for (let timeSlot of timeSlots) {
4976
- timeSlot = this.assignBookingInfoToTimeslot(timeSlot, bookings);
4977
- }
4978
- this.timeSlots = timeSlots;
4979
- })
4980
- .catch(error => {
4981
- this.timeSlots = [];
4982
- console.warn(error); /* eslint-disable-line no-console */
4983
- });
4984
- }
4985
- /**
4986
- * Return an array of time slots for the rest of the day, or if given a day offset, time slots from the start hour.
4987
- * @param {number} daysOffset - number of days from now to generate time slots for.
4988
- * @returns {Object[]} - Array of intervals: { start: Date, end: Date }
4989
- */
4990
- getTimeSlots(daysOffset = 0) {
4991
- const now = addDays(new Date(), daysOffset);
4992
- if (daysOffset > 0) {
4993
- now.setHours(0, 0, 0, 0);
4994
- }
4995
- const startHour = Math.max(now.getHours(), this.startHour);
4996
- let startMinute;
4997
- if (this.duration === 60 || now.getHours() < this.startHour) {
4998
- startMinute = 0;
4999
- }
5000
- else {
5001
- startMinute = now.getMinutes() < 30 ? 0 : 30;
5002
- }
5003
- const timeSlots = [];
5004
- if (startHour < this.stopHour) {
5005
- // First time slot
5006
- const intervalStart = parse(`${startHour}:${startMinute}`, 'HH:mm', addDays(new Date(), daysOffset));
5007
- const intervalEnd = addMinutes(intervalStart, this.duration);
5008
- timeSlots.push({
5009
- start: intervalStart,
5010
- end: intervalEnd
5011
- });
5012
- // All asubsequent time slots
5013
- while (timeSlots[timeSlots.length - 1].start.getHours() < this.stopHour) {
5014
- const latestInterval = timeSlots[timeSlots.length - 1];
5015
- const intervalStart = latestInterval.end;
5016
- const intervalEnd = addMinutes(intervalStart, this.duration);
5017
- timeSlots.push({
5018
- start: intervalStart,
5019
- end: intervalEnd,
5020
- isRequesting: false
4987
+ /**
4988
+ * Get existing bookings and calculate booking time slots for the location.
4989
+ */
4990
+ updateBookings() {
4991
+ this.getBookingsToday()
4992
+ .then(bookings => {
4993
+ const dayOffset = new Date().getHours() >= this.stopHour ? 1 : 0;
4994
+ const timeSlots = this.getTimeSlots(dayOffset);
4995
+ // Decorate time slots with booking information
4996
+ for (let timeSlot of timeSlots) {
4997
+ timeSlot = this.assignBookingInfoToTimeslot(timeSlot, bookings);
4998
+ }
4999
+ this.timeSlots = timeSlots;
5000
+ })
5001
+ .catch(error => {
5002
+ this.timeSlots = [];
5003
+ console.warn(error); /* eslint-disable-line no-console */
5021
5004
  });
5022
- // Don't pass midnight
5023
- if (latestInterval.start.getHours() === 23 && latestInterval.end.getHours() === 0) {
5024
- break;
5005
+ }
5006
+ /**
5007
+ * Return an array of time slots for the rest of the day, or if given a day offset, time slots from the start hour.
5008
+ * @param {number} daysOffset - number of days from now to generate time slots for.
5009
+ * @returns {Object[]} - Array of intervals: { start: Date, end: Date }
5010
+ */
5011
+ getTimeSlots(daysOffset = 0) {
5012
+ const now = addDays(new Date(), daysOffset);
5013
+ if (daysOffset > 0) {
5014
+ now.setHours(0, 0, 0, 0);
5025
5015
  }
5026
- }
5016
+ const startHour = Math.max(now.getHours(), this.startHour);
5017
+ let startMinute;
5018
+ if (this.duration === 60 || now.getHours() < this.startHour) {
5019
+ startMinute = 0;
5020
+ }
5021
+ else {
5022
+ startMinute = now.getMinutes() < 30 ? 0 : 30;
5023
+ }
5024
+ const timeSlots = [];
5025
+ if (startHour < this.stopHour) {
5026
+ // First time slot
5027
+ const intervalStart = parse(`${startHour}:${startMinute}`, 'HH:mm', addDays(new Date(), daysOffset));
5028
+ const intervalEnd = addMinutes(intervalStart, this.duration);
5029
+ timeSlots.push({
5030
+ start: intervalStart,
5031
+ end: intervalEnd
5032
+ });
5033
+ // All asubsequent time slots
5034
+ while (timeSlots[timeSlots.length - 1].start.getHours() < this.stopHour) {
5035
+ const latestInterval = timeSlots[timeSlots.length - 1];
5036
+ const intervalStart = latestInterval.end;
5037
+ const intervalEnd = addMinutes(intervalStart, this.duration);
5038
+ timeSlots.push({
5039
+ start: intervalStart,
5040
+ end: intervalEnd,
5041
+ isRequesting: false
5042
+ });
5043
+ // Don't pass midnight
5044
+ if (latestInterval.start.getHours() === 23 && latestInterval.end.getHours() === 0) {
5045
+ break;
5046
+ }
5047
+ }
5048
+ }
5049
+ timeSlots.pop(); // Always remove the last, as it overlaps the max allowed one.
5050
+ return timeSlots;
5051
+ }
5052
+ /**
5053
+ * Get all bookings for the location within current day.
5054
+ * @returns {Promise<Object[]>}
5055
+ */
5056
+ getBookingsToday() {
5057
+ if (!this.location || this.location.properties.bookable !== true) {
5058
+ return Promise.reject('NOT BOOKABLE');
5059
+ }
5060
+ const startTime = new Date();
5061
+ startTime.setHours(startTime.getHours(), 0, 0, 0);
5062
+ const endTime = new Date();
5063
+ endTime.setHours(23, 59, 59, 999);
5064
+ return mapsindoors.services.BookingService.getBookingsUsingQuery({
5065
+ location: this.location,
5066
+ startTime: startTime.toUTCString(),
5067
+ endTime: endTime.toUTCString()
5068
+ });
5027
5069
  }
5028
- timeSlots.pop(); // Always remove the last, as it overlaps the max allowed one.
5029
- return timeSlots;
5030
- }
5031
- /**
5032
- * Get all bookings for the location within current day.
5033
- * @returns {Promise<Object[]>}
5034
- */
5035
- getBookingsToday() {
5036
- if (!this.location || this.location.properties.bookable !== true) {
5037
- return Promise.reject('NOT BOOKABLE');
5038
- }
5039
- const startTime = new Date();
5040
- startTime.setHours(startTime.getHours(), 0, 0, 0);
5041
- const endTime = new Date();
5042
- endTime.setHours(23, 59, 59, 999);
5043
- return mapsindoors.services.BookingService.getBookingsUsingQuery({
5044
- location: this.location,
5045
- startTime: startTime.toUTCString(),
5046
- endTime: endTime.toUTCString()
5047
- });
5048
- }
5049
- /**
5050
- * Decorate time slot with information about any existing booking.
5051
- * @param {BookingTimeSlot} timeSlot
5052
- * @param {Object[]} bookings
5053
- * @returns {BookingTimeSlot}
5054
- */
5055
- assignBookingInfoToTimeslot(timeSlot, bookings) {
5056
- timeSlot.available = true;
5057
- for (const booking of bookings) {
5058
- const bookingInterval = {
5059
- start: new Date(booking.startTime),
5060
- end: new Date(booking.endTime)
5061
- };
5062
- if (areIntervalsOverlapping(timeSlot, bookingInterval)) {
5063
- timeSlot.available = false;
5064
- timeSlot.cancellable = booking.managed;
5070
+ /**
5071
+ * Decorate time slot with information about any existing booking.
5072
+ * @param {BookingTimeSlot} timeSlot
5073
+ * @param {Object[]} bookings
5074
+ * @returns {BookingTimeSlot}
5075
+ */
5076
+ assignBookingInfoToTimeslot(timeSlot, bookings) {
5077
+ timeSlot.available = true;
5078
+ for (const booking of bookings) {
5079
+ const bookingInterval = {
5080
+ start: new Date(booking.startTime),
5081
+ end: new Date(booking.endTime)
5082
+ };
5083
+ if (areIntervalsOverlapping(timeSlot, bookingInterval)) {
5084
+ timeSlot.available = false;
5085
+ timeSlot.cancellable = booking.managed;
5086
+ if (timeSlot.cancellable) {
5087
+ timeSlot.bookingId = booking.bookingId;
5088
+ }
5089
+ }
5090
+ }
5091
+ return timeSlot;
5092
+ }
5093
+ /**
5094
+ * Convert time string to a localized one, based on browser settings.
5095
+ * @param {Date} timeString
5096
+ * @returns {string}
5097
+ */
5098
+ formatTime(timeString) {
5099
+ return timeString.toLocaleTimeString([], {
5100
+ hour: '2-digit', minute: '2-digit'
5101
+ }).toLowerCase();
5102
+ }
5103
+ /**
5104
+ * Update a timeslot in timeSlots state.
5105
+ * Due to the nature of state in Stencil, we need to reassign the whole array.
5106
+ *
5107
+ * @param {BookingTimeSlot} timeSlot
5108
+ * @param {number} timeSlotIndex
5109
+ * @param {object} changes
5110
+ */
5111
+ updateTimeslot(timeSlotIndex, changes) {
5112
+ const timeSlots = [...this.timeSlots];
5113
+ const timeSlotToUpdate = this.timeSlots[timeSlotIndex];
5114
+ const newTimeSlot = Object.assign(Object.assign({}, timeSlotToUpdate), changes);
5115
+ timeSlots[timeSlotIndex] = newTimeSlot;
5116
+ this.timeSlots = timeSlots;
5117
+ }
5118
+ /**
5119
+ * Perform a booking via the SDK.
5120
+ *
5121
+ * @param {BookingTimeSlot} timeSlot
5122
+ * @param {number} timeSlotIndex
5123
+ */
5124
+ performBooking(timeSlot, timeSlotIndex) {
5125
+ this.updateTimeslot(timeSlotIndex, { isRequesting: true });
5126
+ const booking = new mapsindoors.services.BookingService.MPBooking({
5127
+ ownerId: undefined,
5128
+ locationId: this.location.id,
5129
+ title: this.bookingTitle,
5130
+ description: null,
5131
+ participants: [],
5132
+ startTime: timeSlot.start,
5133
+ endTime: timeSlot.end
5134
+ });
5135
+ mapsindoors.services.BookingService.performBooking(booking)
5136
+ .then((createdBooking) => {
5137
+ // Decorate timeslot with the booking info.
5138
+ // Sadly, we cannot retrieve list of bookings due to timing issues on the backend:
5139
+ // A created booking is not given when retrieving list immediately after performing the booking.
5140
+ this.updateTimeslot(timeSlotIndex, {
5141
+ available: false,
5142
+ bookingId: createdBooking.bookingId,
5143
+ cancellable: true
5144
+ });
5145
+ this.bookingCompleted.emit(createdBooking);
5146
+ })
5147
+ .catch(error => {
5148
+ this.bookingFailed.emit(error);
5149
+ })
5150
+ .finally(() => this.updateTimeslot(timeSlotIndex, { isRequesting: false }));
5151
+ }
5152
+ /**
5153
+ * Cancel a booking via the SDK.
5154
+ *
5155
+ * @param {BookingTimeSlot} timeSlot
5156
+ * @param {number} timeSlotIndex
5157
+ */
5158
+ cancelBooking(timeSlot, timeSlotIndex) {
5159
+ this.updateTimeslot(timeSlotIndex, { isRequesting: true });
5160
+ const booking = new mapsindoors.services.BookingService.MPBooking({ id: timeSlot.bookingId });
5161
+ mapsindoors.services.BookingService.cancelBooking(booking)
5162
+ .then(() => {
5163
+ // Decorate timeslot with the booking info.
5164
+ // Sadly, we cannot retrieve list of bookings due to timing issues on the backend:
5165
+ // A cancelled booking is not given when retrieving list immediately after performing the booking.
5166
+ this.updateTimeslot(timeSlotIndex, {
5167
+ available: true,
5168
+ bookingId: null,
5169
+ cancellable: false
5170
+ });
5171
+ this.cancelCompleted.emit();
5172
+ })
5173
+ .catch(error => {
5174
+ this.cancelFailed.emit(error);
5175
+ })
5176
+ .finally(() => this.updateTimeslot(timeSlotIndex, { isRequesting: false }));
5177
+ }
5178
+ /**
5179
+ * Render booking button for a time slot depending on booking state info in given time slot.
5180
+ * @param {BookingTimeSlot} timeSlot
5181
+ * @returns {JSX.Element}
5182
+ */
5183
+ renderButton(timeSlot, timeSlotIndex) {
5065
5184
  if (timeSlot.cancellable) {
5066
- timeSlot.bookingId = booking.bookingId;
5185
+ return (h("button", { disabled: timeSlot.isRequesting, type: "button", onClick: () => this.cancelBooking(timeSlot, timeSlotIndex), class: "mi-button mi-button--small mi-button--delete" }, !this.isInternetExplorer && h("mi-icon", { class: "booking-icon booking-icon--cancel", "icon-name": "circled-minus" }), this.translations.cancel));
5186
+ }
5187
+ else if (timeSlot.available) {
5188
+ return (h("button", { disabled: timeSlot.isRequesting, type: "button", onClick: () => this.performBooking(timeSlot, timeSlotIndex), class: "mi-button mi-button--primary mi-button--small" }, !this.isInternetExplorer && h("mi-icon", { class: "booking-icon", "icon-name": "circled-plus" }), this.translations.book));
5189
+ }
5190
+ else {
5191
+ return (h("button", { disabled: true, type: "button", class: "mi-button mi-button--small" }, !this.isInternetExplorer && h("mi-icon", { class: "booking-icon booking-icon--blocked", "icon-name": "circled-blocked" }), this.translations.booked));
5067
5192
  }
5068
- }
5069
- }
5070
- return timeSlot;
5071
- }
5072
- /**
5073
- * Convert time string to a localized one, based on browser settings.
5074
- * @param {Date} timeString
5075
- * @returns {string}
5076
- */
5077
- formatTime(timeString) {
5078
- return timeString.toLocaleTimeString([], {
5079
- hour: '2-digit', minute: '2-digit'
5080
- }).toLowerCase();
5081
- }
5082
- /**
5083
- * Update a timeslot in timeSlots state.
5084
- * Due to the nature of state in Stencil, we need to reassign the whole array.
5085
- *
5086
- * @param {BookingTimeSlot} timeSlot
5087
- * @param {number} timeSlotIndex
5088
- * @param {object} changes
5089
- */
5090
- updateTimeslot(timeSlotIndex, changes) {
5091
- const timeSlots = [...this.timeSlots];
5092
- const timeSlotToUpdate = this.timeSlots[timeSlotIndex];
5093
- const newTimeSlot = Object.assign(Object.assign({}, timeSlotToUpdate), changes);
5094
- timeSlots[timeSlotIndex] = newTimeSlot;
5095
- this.timeSlots = timeSlots;
5096
- }
5097
- /**
5098
- * Perform a booking via the SDK.
5099
- *
5100
- * @param {BookingTimeSlot} timeSlot
5101
- * @param {number} timeSlotIndex
5102
- */
5103
- performBooking(timeSlot, timeSlotIndex) {
5104
- this.updateTimeslot(timeSlotIndex, { isRequesting: true });
5105
- const booking = new mapsindoors.services.BookingService.MPBooking({
5106
- ownerId: undefined,
5107
- locationId: this.location.id,
5108
- title: this.bookingTitle,
5109
- description: null,
5110
- participants: [],
5111
- startTime: timeSlot.start,
5112
- endTime: timeSlot.end
5113
- });
5114
- mapsindoors.services.BookingService.performBooking(booking)
5115
- .then((createdBooking) => {
5116
- // Decorate timeslot with the booking info.
5117
- // Sadly, we cannot retrieve list of bookings due to timing issues on the backend:
5118
- // A created booking is not given when retrieving list immediately after performing the booking.
5119
- this.updateTimeslot(timeSlotIndex, {
5120
- available: false,
5121
- bookingId: createdBooking.bookingId,
5122
- cancellable: true
5123
- });
5124
- this.bookingCompleted.emit(createdBooking);
5125
- })
5126
- .catch(error => {
5127
- this.bookingFailed.emit(error);
5128
- })
5129
- .finally(() => this.updateTimeslot(timeSlotIndex, { isRequesting: false }));
5130
- }
5131
- /**
5132
- * Cancel a booking via the SDK.
5133
- *
5134
- * @param {BookingTimeSlot} timeSlot
5135
- * @param {number} timeSlotIndex
5136
- */
5137
- cancelBooking(timeSlot, timeSlotIndex) {
5138
- this.updateTimeslot(timeSlotIndex, { isRequesting: true });
5139
- const booking = new mapsindoors.services.BookingService.MPBooking({ id: timeSlot.bookingId });
5140
- mapsindoors.services.BookingService.cancelBooking(booking)
5141
- .then(() => {
5142
- // Decorate timeslot with the booking info.
5143
- // Sadly, we cannot retrieve list of bookings due to timing issues on the backend:
5144
- // A cancelled booking is not given when retrieving list immediately after performing the booking.
5145
- this.updateTimeslot(timeSlotIndex, {
5146
- available: true,
5147
- bookingId: null,
5148
- cancellable: false
5149
- });
5150
- this.cancelCompleted.emit();
5151
- })
5152
- .catch(error => {
5153
- this.cancelFailed.emit(error);
5154
- })
5155
- .finally(() => this.updateTimeslot(timeSlotIndex, { isRequesting: false }));
5156
- }
5157
- /**
5158
- * Render booking button for a time slot depending on booking state info in given time slot.
5159
- * @param {BookingTimeSlot} timeSlot
5160
- * @returns {JSX.Element}
5161
- */
5162
- renderButton(timeSlot, timeSlotIndex) {
5163
- if (timeSlot.cancellable) {
5164
- return (h("button", { disabled: timeSlot.isRequesting, type: "button", onClick: () => this.cancelBooking(timeSlot, timeSlotIndex), class: "mi-button mi-button--small mi-button--delete" }, !this.isInternetExplorer && h("mi-icon", { class: "booking-icon booking-icon--cancel", "icon-name": "circled-minus" }), this.translations.cancel));
5165
- }
5166
- else if (timeSlot.available) {
5167
- return (h("button", { disabled: timeSlot.isRequesting, type: "button", onClick: () => this.performBooking(timeSlot, timeSlotIndex), class: "mi-button mi-button--primary mi-button--small" }, !this.isInternetExplorer && h("mi-icon", { class: "booking-icon", "icon-name": "circled-plus" }), this.translations.book));
5168
- }
5169
- else {
5170
- return (h("button", { disabled: true, type: "button", class: "mi-button mi-button--small" }, !this.isInternetExplorer && h("mi-icon", { class: "booking-icon booking-icon--blocked", "icon-name": "circled-blocked" }), this.translations.booked));
5171
5193
  }
5172
- }
5173
- componentWillLoad() {
5174
- this.updateBookings();
5175
- }
5176
- /**
5177
- * @returns {JSX.Element}
5178
- */
5179
- render() {
5180
- return (h(Host, null, h("ul", null, this.timeSlots.map(((timeSlot, timeSlotIndex) => {
5181
- if (timeSlotIndex >= this.show)
5182
- return null;
5183
- return (h("li", null, this.formatTime(timeSlot.start), " - ", this.formatTime(timeSlot.end), this.renderButton(timeSlot, timeSlotIndex)));
5184
- })))));
5185
- }
5186
- static get watchers() { return {
5187
- "location": ["locationChanged"],
5188
- "duration": ["updateDuration"]
5189
- }; }
5194
+ componentWillLoad() {
5195
+ this.updateBookings();
5196
+ }
5197
+ /**
5198
+ * @returns {JSX.Element}
5199
+ */
5200
+ render() {
5201
+ return (h(Host, { key: '96f4d21eb8edf037e90ee56a90ba250ea1a3dc7f' }, h("ul", { key: '692ff41d7e7519f835bb21f9aca7d0d39fe57e84' }, this.timeSlots.map(((timeSlot, timeSlotIndex) => {
5202
+ if (timeSlotIndex >= this.show)
5203
+ return null;
5204
+ return (h("li", null, this.formatTime(timeSlot.start), " - ", this.formatTime(timeSlot.end), this.renderButton(timeSlot, timeSlotIndex)));
5205
+ })))));
5206
+ }
5207
+ static get watchers() { return {
5208
+ "location": [{
5209
+ "locationChanged": 0
5210
+ }],
5211
+ "duration": [{
5212
+ "updateDuration": 0
5213
+ }]
5214
+ }; }
5190
5215
  };
5191
- LocationBooking.style = locationBookingCss;
5216
+ LocationBooking.style = locationBookingCss();
5192
5217
 
5193
5218
  export { LocationBooking as mi_location_booking };