@mapvx/web-js 2.1.0-dev.1 → 3.0.0-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/controllers/routeController.js +1 -4
- package/dist/cjs/controllers/routeController.js.map +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/infrastructure/cache/CacheManager.js.map +1 -1
- package/dist/cjs/logger/logger.js +2 -3
- package/dist/cjs/logger/logger.js.map +1 -1
- package/dist/cjs/logger/sentry.js +1 -1
- package/dist/cjs/map/map.js +108 -49
- package/dist/cjs/map/map.js.map +1 -1
- package/dist/cjs/repository/repository.js +21 -21
- package/dist/cjs/repository/repository.js.map +1 -1
- package/dist/cjs/sdk.js +21 -21
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/cjs/utils/opening-hours-helper.js +22 -19
- package/dist/cjs/utils/opening-hours-helper.js.map +1 -1
- package/dist/cjs/utils/semaphore.js.map +1 -1
- package/dist/es/controllers/routeController.d.ts.map +1 -1
- package/dist/es/controllers/routeController.js +1 -4
- package/dist/es/controllers/routeController.js.map +1 -1
- package/dist/es/domain/models/route.d.ts +1 -1
- package/dist/es/domain/models/route.d.ts.map +1 -1
- package/dist/es/index.d.ts +1 -1
- package/dist/es/index.d.ts.map +1 -1
- package/dist/es/index.js.map +1 -1
- package/dist/es/infrastructure/cache/CacheManager.d.ts.map +1 -1
- package/dist/es/infrastructure/cache/CacheManager.js.map +1 -1
- package/dist/es/logger/logger.d.ts.map +1 -1
- package/dist/es/logger/logger.js +2 -3
- package/dist/es/logger/logger.js.map +1 -1
- package/dist/es/logger/sentry.js +1 -1
- package/dist/es/map/map.d.ts +11 -5
- package/dist/es/map/map.d.ts.map +1 -1
- package/dist/es/map/map.js +108 -49
- package/dist/es/map/map.js.map +1 -1
- package/dist/es/repository/repository.js +21 -21
- package/dist/es/repository/repository.js.map +1 -1
- package/dist/es/sdk.d.ts +26 -1
- package/dist/es/sdk.d.ts.map +1 -1
- package/dist/es/sdk.js +21 -21
- package/dist/es/sdk.js.map +1 -1
- package/dist/es/utils/opening-hours-helper.d.ts.map +1 -1
- package/dist/es/utils/opening-hours-helper.js +22 -19
- package/dist/es/utils/opening-hours-helper.js.map +1 -1
- package/dist/es/utils/semaphore.d.ts +1 -1
- package/dist/es/utils/semaphore.d.ts.map +1 -1
- package/dist/es/utils/semaphore.js.map +1 -1
- package/dist/umd/index.js +309 -134
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/styles.css +0 -12
- package/dist/umd/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -11242,7 +11242,7 @@ const extractSafariExtensionDetails = (func, filename) => {
|
|
|
11242
11242
|
// replaced with the package version by scripts/inject-build-defines.js. The DSN
|
|
11243
11243
|
// falls back to the public MapVX Sentry project DSN when none is injected at
|
|
11244
11244
|
// build time — a DSN's public key is safe to ship in the client bundle.
|
|
11245
|
-
var sentry_SDK_VERSION = true ? "
|
|
11245
|
+
var sentry_SDK_VERSION = true ? "3.0.0-dev.1" : 0;
|
|
11246
11246
|
var DSN = false ? 0 : "https://872f598f020e3cd73a0933b562d24c81@sentry.mapvx.app/5";
|
|
11247
11247
|
|
|
11248
11248
|
/**
|
|
@@ -11400,9 +11400,8 @@ var Logger = /*#__PURE__*/function () {
|
|
|
11400
11400
|
}], [{
|
|
11401
11401
|
key: "getInstance",
|
|
11402
11402
|
value: function getInstance() {
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
}
|
|
11403
|
+
var _Logger$instance;
|
|
11404
|
+
(_Logger$instance = Logger.instance) !== null && _Logger$instance !== void 0 ? _Logger$instance : Logger.instance = new Logger();
|
|
11406
11405
|
return Logger.instance;
|
|
11407
11406
|
}
|
|
11408
11407
|
}]);
|
|
@@ -13044,10 +13043,7 @@ var RouteController = /*#__PURE__*/function () {
|
|
|
13044
13043
|
var _drawConfig$routeStyl = drawConfig.routeStyle,
|
|
13045
13044
|
colors = _drawConfig$routeStyl.colors,
|
|
13046
13045
|
positions = _drawConfig$routeStyl.positions;
|
|
13047
|
-
var positionsToUse = positions;
|
|
13048
|
-
if (positionsToUse == null) {
|
|
13049
|
-
positionsToUse = createPositionsForStops(colors.length);
|
|
13050
|
-
}
|
|
13046
|
+
var positionsToUse = positions !== null && positions !== void 0 ? positions : createPositionsForStops(colors.length);
|
|
13051
13047
|
if (positionsToUse.length !== colors.length) {
|
|
13052
13048
|
throw new Error("Error: position array has different length than colors array");
|
|
13053
13049
|
}
|
|
@@ -16527,7 +16523,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16527
16523
|
this.logError(_t, {
|
|
16528
16524
|
functionName: "fetchAndParseMapStyle"
|
|
16529
16525
|
});
|
|
16530
|
-
throw new Error("Failed to fetch and parse map style"
|
|
16526
|
+
throw new Error("Failed to fetch and parse map style", {
|
|
16527
|
+
cause: _t
|
|
16528
|
+
});
|
|
16531
16529
|
case 7:
|
|
16532
16530
|
return _context.a(2);
|
|
16533
16531
|
}
|
|
@@ -16574,7 +16572,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16574
16572
|
this.logError(_t2, {
|
|
16575
16573
|
functionName: "fetchAndParseAnyMapStyle"
|
|
16576
16574
|
});
|
|
16577
|
-
throw new Error("Failed to fetch and parse map style with bearer token"
|
|
16575
|
+
throw new Error("Failed to fetch and parse map style with bearer token", {
|
|
16576
|
+
cause: _t2
|
|
16577
|
+
});
|
|
16578
16578
|
case 6:
|
|
16579
16579
|
return _context2.a(2);
|
|
16580
16580
|
}
|
|
@@ -16646,7 +16646,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16646
16646
|
this.logError(_t3, {
|
|
16647
16647
|
functionName: "fetchAndParseInstitutionsV2"
|
|
16648
16648
|
});
|
|
16649
|
-
throw new Error("Failed to fetch and parse institution"
|
|
16649
|
+
throw new Error("Failed to fetch and parse institution", {
|
|
16650
|
+
cause: _t3
|
|
16651
|
+
});
|
|
16650
16652
|
case 8:
|
|
16651
16653
|
return _context3.a(2);
|
|
16652
16654
|
}
|
|
@@ -16705,7 +16707,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16705
16707
|
case 6:
|
|
16706
16708
|
_context4.p = 6;
|
|
16707
16709
|
_t4 = _context4.v;
|
|
16708
|
-
throw new Error("Failed to fetch and parse place detail"
|
|
16710
|
+
throw new Error("Failed to fetch and parse place detail", {
|
|
16711
|
+
cause: _t4
|
|
16712
|
+
});
|
|
16709
16713
|
case 7:
|
|
16710
16714
|
return _context4.a(2);
|
|
16711
16715
|
}
|
|
@@ -16764,7 +16768,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16764
16768
|
case 6:
|
|
16765
16769
|
_context5.p = 6;
|
|
16766
16770
|
_t5 = _context5.v;
|
|
16767
|
-
throw new Error("Failed to fetch and parse place detail with bearer token"
|
|
16771
|
+
throw new Error("Failed to fetch and parse place detail with bearer token", {
|
|
16772
|
+
cause: _t5
|
|
16773
|
+
});
|
|
16768
16774
|
case 7:
|
|
16769
16775
|
return _context5.a(2);
|
|
16770
16776
|
}
|
|
@@ -16860,7 +16866,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16860
16866
|
case 6:
|
|
16861
16867
|
_context6.p = 6;
|
|
16862
16868
|
_t6 = _context6.v;
|
|
16863
|
-
throw new Error("Failed to fetch and parse subplaces"
|
|
16869
|
+
throw new Error("Failed to fetch and parse subplaces", {
|
|
16870
|
+
cause: _t6
|
|
16871
|
+
});
|
|
16864
16872
|
case 7:
|
|
16865
16873
|
return _context6.a(2);
|
|
16866
16874
|
}
|
|
@@ -16915,7 +16923,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16915
16923
|
case 5:
|
|
16916
16924
|
_context7.p = 5;
|
|
16917
16925
|
_t7 = _context7.v;
|
|
16918
|
-
throw new Error("Failed to fetch and parse any subplaces"
|
|
16926
|
+
throw new Error("Failed to fetch and parse any subplaces", {
|
|
16927
|
+
cause: _t7
|
|
16928
|
+
});
|
|
16919
16929
|
case 6:
|
|
16920
16930
|
return _context7.a(2);
|
|
16921
16931
|
}
|
|
@@ -16973,7 +16983,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
16973
16983
|
this.logError(_t8, {
|
|
16974
16984
|
functionName: "fetchAndParseAvailablePlaces"
|
|
16975
16985
|
});
|
|
16976
|
-
throw new Error("Failed to fetch and parse parent places"
|
|
16986
|
+
throw new Error("Failed to fetch and parse parent places", {
|
|
16987
|
+
cause: _t8
|
|
16988
|
+
});
|
|
16977
16989
|
case 6:
|
|
16978
16990
|
return _context8.a(2);
|
|
16979
16991
|
}
|
|
@@ -17031,7 +17043,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17031
17043
|
this.logError(_t9, {
|
|
17032
17044
|
functionName: "fetchAndParsePlacesFromInstitution"
|
|
17033
17045
|
});
|
|
17034
|
-
throw new Error("Failed to fetch and parse parent places from institution"
|
|
17046
|
+
throw new Error("Failed to fetch and parse parent places from institution", {
|
|
17047
|
+
cause: _t9
|
|
17048
|
+
});
|
|
17035
17049
|
case 6:
|
|
17036
17050
|
return _context9.a(2);
|
|
17037
17051
|
}
|
|
@@ -17116,7 +17130,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17116
17130
|
case 6:
|
|
17117
17131
|
_context0.p = 6;
|
|
17118
17132
|
_t0 = _context0.v;
|
|
17119
|
-
throw new Error("Failed to fetch and parse route"
|
|
17133
|
+
throw new Error("Failed to fetch and parse route", {
|
|
17134
|
+
cause: _t0
|
|
17135
|
+
});
|
|
17120
17136
|
case 7:
|
|
17121
17137
|
return _context0.a(2);
|
|
17122
17138
|
}
|
|
@@ -17176,7 +17192,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17176
17192
|
case 6:
|
|
17177
17193
|
_context1.p = 6;
|
|
17178
17194
|
_t1 = _context1.v;
|
|
17179
|
-
throw new Error("Failed to fetch and parse route"
|
|
17195
|
+
throw new Error("Failed to fetch and parse route", {
|
|
17196
|
+
cause: _t1
|
|
17197
|
+
});
|
|
17180
17198
|
case 7:
|
|
17181
17199
|
return _context1.a(2);
|
|
17182
17200
|
}
|
|
@@ -17221,7 +17239,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17221
17239
|
case 5:
|
|
17222
17240
|
_context10.p = 5;
|
|
17223
17241
|
_t10 = _context10.v;
|
|
17224
|
-
throw new Error("Failed to fetch and parse route"
|
|
17242
|
+
throw new Error("Failed to fetch and parse route", {
|
|
17243
|
+
cause: _t10
|
|
17244
|
+
});
|
|
17225
17245
|
case 6:
|
|
17226
17246
|
return _context10.a(2);
|
|
17227
17247
|
}
|
|
@@ -17316,7 +17336,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17316
17336
|
});
|
|
17317
17337
|
return _context11.a(2, _transport);
|
|
17318
17338
|
case 9:
|
|
17319
|
-
throw new Error("Failed to fetch and parse transport"
|
|
17339
|
+
throw new Error("Failed to fetch and parse transport", {
|
|
17340
|
+
cause: _t11
|
|
17341
|
+
});
|
|
17320
17342
|
case 10:
|
|
17321
17343
|
return _context11.a(2);
|
|
17322
17344
|
}
|
|
@@ -17384,7 +17406,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17384
17406
|
case 6:
|
|
17385
17407
|
_context12.p = 6;
|
|
17386
17408
|
_t12 = _context12.v;
|
|
17387
|
-
throw new Error("Failed to fetch and parse stops"
|
|
17409
|
+
throw new Error("Failed to fetch and parse stops", {
|
|
17410
|
+
cause: _t12
|
|
17411
|
+
});
|
|
17388
17412
|
case 7:
|
|
17389
17413
|
return _context12.a(2);
|
|
17390
17414
|
}
|
|
@@ -17429,7 +17453,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17429
17453
|
case 5:
|
|
17430
17454
|
_context13.p = 5;
|
|
17431
17455
|
_t13 = _context13.v;
|
|
17432
|
-
throw new Error("Failed to fetch and parse search results"
|
|
17456
|
+
throw new Error("Failed to fetch and parse search results", {
|
|
17457
|
+
cause: _t13
|
|
17458
|
+
});
|
|
17433
17459
|
case 6:
|
|
17434
17460
|
return _context13.a(2);
|
|
17435
17461
|
}
|
|
@@ -17484,7 +17510,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17484
17510
|
case 5:
|
|
17485
17511
|
_context14.p = 5;
|
|
17486
17512
|
_t14 = _context14.v;
|
|
17487
|
-
throw new Error("Failed to fetch and parse search places by tags"
|
|
17513
|
+
throw new Error("Failed to fetch and parse search places by tags", {
|
|
17514
|
+
cause: _t14
|
|
17515
|
+
});
|
|
17488
17516
|
case 6:
|
|
17489
17517
|
return _context14.a(2);
|
|
17490
17518
|
}
|
|
@@ -17551,7 +17579,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17551
17579
|
case 5:
|
|
17552
17580
|
_context15.p = 5;
|
|
17553
17581
|
_t15 = _context15.v;
|
|
17554
|
-
throw new Error("Failed to fetch and parse routes from origin results"
|
|
17582
|
+
throw new Error("Failed to fetch and parse routes from origin results", {
|
|
17583
|
+
cause: _t15
|
|
17584
|
+
});
|
|
17555
17585
|
case 6:
|
|
17556
17586
|
return _context15.a(2);
|
|
17557
17587
|
}
|
|
@@ -17594,7 +17624,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17594
17624
|
case 5:
|
|
17595
17625
|
_context16.p = 5;
|
|
17596
17626
|
_t16 = _context16.v;
|
|
17597
|
-
throw new Error("Failed to fetch and parse cache timestamp"
|
|
17627
|
+
throw new Error("Failed to fetch and parse cache timestamp", {
|
|
17628
|
+
cause: _t16
|
|
17629
|
+
});
|
|
17598
17630
|
case 6:
|
|
17599
17631
|
return _context16.a(2);
|
|
17600
17632
|
}
|
|
@@ -17664,7 +17696,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17664
17696
|
this.logError(_t17, {
|
|
17665
17697
|
functionName: "fetchAndParseConfiguration"
|
|
17666
17698
|
});
|
|
17667
|
-
throw new Error("Failed to fetch and parse configuration"
|
|
17699
|
+
throw new Error("Failed to fetch and parse configuration", {
|
|
17700
|
+
cause: _t17
|
|
17701
|
+
});
|
|
17668
17702
|
case 7:
|
|
17669
17703
|
return _context17.a(2);
|
|
17670
17704
|
}
|
|
@@ -17725,7 +17759,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17725
17759
|
case 6:
|
|
17726
17760
|
_context18.p = 6;
|
|
17727
17761
|
_t18 = _context18.v;
|
|
17728
|
-
throw new Error("Failed to fetch and parse categories"
|
|
17762
|
+
throw new Error("Failed to fetch and parse categories", {
|
|
17763
|
+
cause: _t18
|
|
17764
|
+
});
|
|
17729
17765
|
case 7:
|
|
17730
17766
|
return _context18.a(2);
|
|
17731
17767
|
}
|
|
@@ -17767,7 +17803,9 @@ var Repository = /*#__PURE__*/function (_Loggeable) {
|
|
|
17767
17803
|
case 5:
|
|
17768
17804
|
_context19.p = 5;
|
|
17769
17805
|
_t19 = _context19.v;
|
|
17770
|
-
throw new Error("Failed to fetch and parse css customization"
|
|
17806
|
+
throw new Error("Failed to fetch and parse css customization", {
|
|
17807
|
+
cause: _t19
|
|
17808
|
+
});
|
|
17771
17809
|
case 6:
|
|
17772
17810
|
return _context19.a(2);
|
|
17773
17811
|
}
|
|
@@ -19630,6 +19668,22 @@ var CIRCLE_LAYER_SUFFIXES = {
|
|
|
19630
19668
|
top: "-top"
|
|
19631
19669
|
};
|
|
19632
19670
|
|
|
19671
|
+
/**
|
|
19672
|
+
* How many times a failed vector tile is reloaded before it is dropped from the retry
|
|
19673
|
+
* queue. Bounded so a permanently unavailable tile stops being requested, while a tile
|
|
19674
|
+
* that failed on a transient network error still gets several chances.
|
|
19675
|
+
*/
|
|
19676
|
+
var MAX_TILE_RETRIES = 5;
|
|
19677
|
+
|
|
19678
|
+
/**
|
|
19679
|
+
* Base delay for the retry backoff. Attempt N waits `BASE * 2^(N-1)` before it is
|
|
19680
|
+
* eligible again — 1s, 2s, 4s, 8s — so a tile that keeps failing is retried ever less
|
|
19681
|
+
* often instead of once per timer tick.
|
|
19682
|
+
*/
|
|
19683
|
+
var TILE_RETRY_BASE_DELAY_MS = 1000;
|
|
19684
|
+
|
|
19685
|
+
/** Bookkeeping for one tile in the retry queue. */
|
|
19686
|
+
|
|
19633
19687
|
/** Fill/line layer ids for one circle render-order bucket. */
|
|
19634
19688
|
function circleLayerIdsFor(order) {
|
|
19635
19689
|
var suffix = CIRCLE_LAYER_SUFFIXES[order];
|
|
@@ -19722,7 +19776,7 @@ function parsePaddingValue(value, dimension) {
|
|
|
19722
19776
|
if (!match) {
|
|
19723
19777
|
return 0;
|
|
19724
19778
|
}
|
|
19725
|
-
var numericValue = parseFloat(match[1]);
|
|
19779
|
+
var numericValue = Number.parseFloat(match[1]);
|
|
19726
19780
|
var unit = match[2] || "px";
|
|
19727
19781
|
switch (unit) {
|
|
19728
19782
|
case "px":
|
|
@@ -19823,6 +19877,12 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
19823
19877
|
map_defineProperty(_this, "enableHover", false);
|
|
19824
19878
|
map_defineProperty(_this, "hoveredId", "unselected");
|
|
19825
19879
|
map_defineProperty(_this, "failedTiles", new Set());
|
|
19880
|
+
/**
|
|
19881
|
+
* Retry bookkeeping per failed tile. A WeakMap so it can never outlive the tiles
|
|
19882
|
+
* themselves — entries disappear with the tile objects, which is why none of the
|
|
19883
|
+
* `failedTiles.clear()` paths have to reset it.
|
|
19884
|
+
*/
|
|
19885
|
+
map_defineProperty(_this, "tileRetryState", new WeakMap());
|
|
19826
19886
|
map_defineProperty(_this, "geoLocation", navigator.geolocation);
|
|
19827
19887
|
/** Owns the deck.gl overlay + GLB scene; created on style load only when 3D is active. */
|
|
19828
19888
|
map_defineProperty(_this, "scene3D", undefined);
|
|
@@ -19956,6 +20016,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
19956
20016
|
value: function onMapStyleLoaded(mapConfig, container, style) {
|
|
19957
20017
|
var _mapConfig$pitch,
|
|
19958
20018
|
_mapConfig$bearingSna,
|
|
20019
|
+
_mapConfig$showCompas,
|
|
20020
|
+
_mapConfig$showZoom,
|
|
19959
20021
|
_mapConfig$navigation,
|
|
19960
20022
|
_this6 = this;
|
|
19961
20023
|
// Determine if service worker caching should be enabled
|
|
@@ -19998,8 +20060,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
19998
20060
|
(_this$map$touchZoomRo = this.map.touchZoomRotate) === null || _this$map$touchZoomRo === void 0 || (_this$map$touchZoomRo2 = _this$map$touchZoomRo.disableRotation) === null || _this$map$touchZoomRo2 === void 0 || _this$map$touchZoomRo2.call(_this$map$touchZoomRo);
|
|
19999
20061
|
}
|
|
20000
20062
|
this.map.addControl(new maplibre_gl.NavigationControl({
|
|
20001
|
-
showCompass: mapConfig.showCompass !==
|
|
20002
|
-
showZoom: mapConfig.showZoom !==
|
|
20063
|
+
showCompass: (_mapConfig$showCompas = mapConfig.showCompass) !== null && _mapConfig$showCompas !== void 0 ? _mapConfig$showCompas : true,
|
|
20064
|
+
showZoom: (_mapConfig$showZoom = mapConfig.showZoom) !== null && _mapConfig$showZoom !== void 0 ? _mapConfig$showZoom : true
|
|
20003
20065
|
}), (_mapConfig$navigation = mapConfig.navigationPosition) !== null && _mapConfig$navigation !== void 0 ? _mapConfig$navigation : "top-right");
|
|
20004
20066
|
this.map.on("load", function () {
|
|
20005
20067
|
var _this6$scene3D, _mapConfig$onMapReady;
|
|
@@ -20080,7 +20142,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20080
20142
|
var property = _this8.map.getLayoutProperty(id, "symbol-placement");
|
|
20081
20143
|
_this8.map.setLayoutProperty(id, "text-field", ["case", ["has", "name:".concat(lang)], ["get", "name:".concat(lang)], ["format", ["get", "name:latin"], property === "line" ? " " : "\n", ["get", "name:nonlatin"]]]);
|
|
20082
20144
|
} catch (error) {
|
|
20083
|
-
|
|
20145
|
+
_this8.debugLog("Layer language update failed (layer may not exist)", error);
|
|
20084
20146
|
}
|
|
20085
20147
|
});
|
|
20086
20148
|
// indoor layers
|
|
@@ -20094,7 +20156,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20094
20156
|
try {
|
|
20095
20157
|
_this8.map.setLayoutProperty(id, "text-field", ["case", ["has", "name:".concat(lang)], ["get", "name:".concat(lang)], ["get", "name"]]);
|
|
20096
20158
|
} catch (error) {
|
|
20097
|
-
|
|
20159
|
+
_this8.debugLog("Layer language update failed (layer may not exist)", error);
|
|
20098
20160
|
}
|
|
20099
20161
|
});
|
|
20100
20162
|
}
|
|
@@ -20135,7 +20197,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20135
20197
|
}
|
|
20136
20198
|
this.logEvent("clearTileCache");
|
|
20137
20199
|
} catch (error) {
|
|
20138
|
-
|
|
20200
|
+
this.debugLog("Tile cache clear failed (cache may not exist)", error);
|
|
20139
20201
|
}
|
|
20140
20202
|
}
|
|
20141
20203
|
|
|
@@ -20253,7 +20315,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20253
20315
|
this.logEvent("updateParentPlaceAndFloor");
|
|
20254
20316
|
options === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);
|
|
20255
20317
|
} catch (error) {
|
|
20256
|
-
|
|
20318
|
+
this.debugLog("Parent place/floor update failed", error);
|
|
20257
20319
|
}
|
|
20258
20320
|
}
|
|
20259
20321
|
}, {
|
|
@@ -20338,7 +20400,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20338
20400
|
this.logEvent("addMarker");
|
|
20339
20401
|
return markerCreated.id;
|
|
20340
20402
|
} catch (error) {
|
|
20341
|
-
throw new Error("Failed to add marker"
|
|
20403
|
+
throw new Error("Failed to add marker", {
|
|
20404
|
+
cause: error
|
|
20405
|
+
});
|
|
20342
20406
|
}
|
|
20343
20407
|
}
|
|
20344
20408
|
}, {
|
|
@@ -20355,7 +20419,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20355
20419
|
this.logEvent("updateMarker");
|
|
20356
20420
|
return (_marker$id = _marker === null || _marker === void 0 ? void 0 : _marker.id) !== null && _marker$id !== void 0 ? _marker$id : "";
|
|
20357
20421
|
} catch (error) {
|
|
20358
|
-
throw new Error("Failed to update marker"
|
|
20422
|
+
throw new Error("Failed to update marker", {
|
|
20423
|
+
cause: error
|
|
20424
|
+
});
|
|
20359
20425
|
}
|
|
20360
20426
|
}
|
|
20361
20427
|
}, {
|
|
@@ -20370,7 +20436,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20370
20436
|
}
|
|
20371
20437
|
this.logEvent("updateMarkerPosition");
|
|
20372
20438
|
} catch (error) {
|
|
20373
|
-
throw new Error("Failed to update marker position"
|
|
20439
|
+
throw new Error("Failed to update marker position", {
|
|
20440
|
+
cause: error
|
|
20441
|
+
});
|
|
20374
20442
|
}
|
|
20375
20443
|
}
|
|
20376
20444
|
}, {
|
|
@@ -20385,7 +20453,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20385
20453
|
}
|
|
20386
20454
|
this.logEvent("showMarker");
|
|
20387
20455
|
} catch (error) {
|
|
20388
|
-
|
|
20456
|
+
this.debugLog("Show marker failed (marker may not exist)", error);
|
|
20389
20457
|
}
|
|
20390
20458
|
}
|
|
20391
20459
|
}, {
|
|
@@ -20400,7 +20468,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20400
20468
|
}
|
|
20401
20469
|
this.logEvent("hideMarker");
|
|
20402
20470
|
} catch (error) {
|
|
20403
|
-
|
|
20471
|
+
this.debugLog("Hide marker failed (marker may not exist)", error);
|
|
20404
20472
|
}
|
|
20405
20473
|
}
|
|
20406
20474
|
}, {
|
|
@@ -20418,7 +20486,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20418
20486
|
}
|
|
20419
20487
|
this.logEvent("removeMarker");
|
|
20420
20488
|
} catch (error) {
|
|
20421
|
-
throw new Error("Failed to remove marker"
|
|
20489
|
+
throw new Error("Failed to remove marker", {
|
|
20490
|
+
cause: error
|
|
20491
|
+
});
|
|
20422
20492
|
}
|
|
20423
20493
|
}
|
|
20424
20494
|
}, {
|
|
@@ -20431,7 +20501,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20431
20501
|
this.markers = [];
|
|
20432
20502
|
this.logEvent("removeAllMarkers");
|
|
20433
20503
|
} catch (error) {
|
|
20434
|
-
throw new Error("Failed to remove all markers"
|
|
20504
|
+
throw new Error("Failed to remove all markers", {
|
|
20505
|
+
cause: error
|
|
20506
|
+
});
|
|
20435
20507
|
}
|
|
20436
20508
|
}
|
|
20437
20509
|
}, {
|
|
@@ -20564,7 +20636,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20564
20636
|
this.refreshCircles();
|
|
20565
20637
|
this.logEvent("removeCircle");
|
|
20566
20638
|
} catch (error) {
|
|
20567
|
-
throw new Error("Failed to remove circle"
|
|
20639
|
+
throw new Error("Failed to remove circle", {
|
|
20640
|
+
cause: error
|
|
20641
|
+
});
|
|
20568
20642
|
}
|
|
20569
20643
|
}
|
|
20570
20644
|
}, {
|
|
@@ -20575,7 +20649,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20575
20649
|
this.refreshCircles();
|
|
20576
20650
|
this.logEvent("removeAllCircles");
|
|
20577
20651
|
} catch (error) {
|
|
20578
|
-
throw new Error("Failed to remove all circles"
|
|
20652
|
+
throw new Error("Failed to remove all circles", {
|
|
20653
|
+
cause: error
|
|
20654
|
+
});
|
|
20579
20655
|
}
|
|
20580
20656
|
}
|
|
20581
20657
|
}, {
|
|
@@ -20593,6 +20669,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20593
20669
|
this.logEvent("showCircle");
|
|
20594
20670
|
return true;
|
|
20595
20671
|
} catch (error) {
|
|
20672
|
+
this.debugLog("Show circle failed", error);
|
|
20596
20673
|
return false;
|
|
20597
20674
|
}
|
|
20598
20675
|
}
|
|
@@ -20611,6 +20688,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20611
20688
|
this.logEvent("hideCircle");
|
|
20612
20689
|
return true;
|
|
20613
20690
|
} catch (error) {
|
|
20691
|
+
this.debugLog("Hide circle failed", error);
|
|
20614
20692
|
return false;
|
|
20615
20693
|
}
|
|
20616
20694
|
}
|
|
@@ -20780,7 +20858,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20780
20858
|
_iterator.f();
|
|
20781
20859
|
}
|
|
20782
20860
|
} catch (error) {
|
|
20783
|
-
|
|
20861
|
+
this.debugLog("Layers not added: style not loaded yet, the styledata listener will re-add them", error);
|
|
20784
20862
|
}
|
|
20785
20863
|
}
|
|
20786
20864
|
|
|
@@ -20799,7 +20877,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20799
20877
|
var source = this.map.getSource(CIRCLE_SOURCE_ID);
|
|
20800
20878
|
source === null || source === void 0 || source.setData(this.circleFeatureCollection());
|
|
20801
20879
|
} catch (error) {
|
|
20802
|
-
|
|
20880
|
+
this.debugLog("Source not found (a new style may still be loading)", error);
|
|
20803
20881
|
}
|
|
20804
20882
|
}
|
|
20805
20883
|
|
|
@@ -20839,7 +20917,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
20839
20917
|
this.logEvent("resize");
|
|
20840
20918
|
}
|
|
20841
20919
|
} catch (error) {
|
|
20842
|
-
|
|
20920
|
+
this.debugLog("Resize failed (map/container may not be ready)", error);
|
|
20843
20921
|
}
|
|
20844
20922
|
}
|
|
20845
20923
|
}, {
|
|
@@ -21037,6 +21115,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21037
21115
|
lng: coord.lng
|
|
21038
21116
|
});
|
|
21039
21117
|
} else {
|
|
21118
|
+
var _fitOptions$bearing, _fitOptions$pitch;
|
|
21040
21119
|
var minLat;
|
|
21041
21120
|
var minLng;
|
|
21042
21121
|
var maxLat;
|
|
@@ -21072,8 +21151,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21072
21151
|
});
|
|
21073
21152
|
var bearing = this.map.getBearing();
|
|
21074
21153
|
var pitch = this.map.getPitch();
|
|
21075
|
-
|
|
21076
|
-
|
|
21154
|
+
(_fitOptions$bearing = fitOptions.bearing) !== null && _fitOptions$bearing !== void 0 ? _fitOptions$bearing : fitOptions.bearing = bearing;
|
|
21155
|
+
(_fitOptions$pitch = fitOptions.pitch) !== null && _fitOptions$pitch !== void 0 ? _fitOptions$pitch : fitOptions.pitch = pitch;
|
|
21077
21156
|
if (onComplete) {
|
|
21078
21157
|
void this.map.once("moveend", onComplete);
|
|
21079
21158
|
}
|
|
@@ -21083,7 +21162,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21083
21162
|
}, {
|
|
21084
21163
|
key: "easeToCoordinates",
|
|
21085
21164
|
value: function easeToCoordinates(coordinates, options) {
|
|
21086
|
-
var _options$maxZoom;
|
|
21165
|
+
var _options$bearing, _options$pitch, _options$maxZoom;
|
|
21087
21166
|
if (coordinates.length === 0) {
|
|
21088
21167
|
return;
|
|
21089
21168
|
}
|
|
@@ -21111,8 +21190,8 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21111
21190
|
}));
|
|
21112
21191
|
return;
|
|
21113
21192
|
}
|
|
21114
|
-
var bearing = (options === null || options === void 0 ? void 0 : options.bearing) !==
|
|
21115
|
-
var pitch = (options === null || options === void 0 ? void 0 : options.pitch) !==
|
|
21193
|
+
var bearing = (_options$bearing = options === null || options === void 0 ? void 0 : options.bearing) !== null && _options$bearing !== void 0 ? _options$bearing : this.map.getBearing();
|
|
21194
|
+
var pitch = (_options$pitch = options === null || options === void 0 ? void 0 : options.pitch) !== null && _options$pitch !== void 0 ? _options$pitch : this.map.getPitch();
|
|
21116
21195
|
var cameraParams = {
|
|
21117
21196
|
bearing: bearing,
|
|
21118
21197
|
padding: padding,
|
|
@@ -21182,7 +21261,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21182
21261
|
});
|
|
21183
21262
|
options === null || options === void 0 || (_options$onComplete6 = options.onComplete) === null || _options$onComplete6 === void 0 || _options$onComplete6.call(options);
|
|
21184
21263
|
} catch (error) {
|
|
21185
|
-
|
|
21264
|
+
this.debugLog("Floor update failed", error);
|
|
21186
21265
|
}
|
|
21187
21266
|
}
|
|
21188
21267
|
}, {
|
|
@@ -21198,7 +21277,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21198
21277
|
floorId: floorId
|
|
21199
21278
|
});
|
|
21200
21279
|
} catch (error) {
|
|
21201
|
-
|
|
21280
|
+
this.debugLog("Place/floor update for routing failed", error);
|
|
21202
21281
|
}
|
|
21203
21282
|
}
|
|
21204
21283
|
}, {
|
|
@@ -21228,7 +21307,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21228
21307
|
case 3:
|
|
21229
21308
|
_context.p = 3;
|
|
21230
21309
|
_t = _context.v;
|
|
21231
|
-
throw new Error("Error: Failed to add route"
|
|
21310
|
+
throw new Error("Error: Failed to add route", {
|
|
21311
|
+
cause: _t
|
|
21312
|
+
});
|
|
21232
21313
|
case 4:
|
|
21233
21314
|
return _context.a(2);
|
|
21234
21315
|
}
|
|
@@ -21248,7 +21329,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21248
21329
|
drawRouteConfig,
|
|
21249
21330
|
ticket,
|
|
21250
21331
|
_route2,
|
|
21251
|
-
|
|
21332
|
+
reason,
|
|
21252
21333
|
_args2 = arguments,
|
|
21253
21334
|
_t2;
|
|
21254
21335
|
return map_regenerator().w(function (_context2) {
|
|
@@ -21292,8 +21373,10 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21292
21373
|
case 4:
|
|
21293
21374
|
_context2.p = 4;
|
|
21294
21375
|
_t2 = _context2.v;
|
|
21295
|
-
|
|
21296
|
-
throw new Error("Error: Failed to add route: ".concat(
|
|
21376
|
+
reason = _t2 instanceof Error ? _t2.message : String(_t2);
|
|
21377
|
+
throw new Error("Error: Failed to add route: ".concat(reason), {
|
|
21378
|
+
cause: _t2
|
|
21379
|
+
});
|
|
21297
21380
|
case 5:
|
|
21298
21381
|
return _context2.a(2);
|
|
21299
21382
|
}
|
|
@@ -21317,7 +21400,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21317
21400
|
});
|
|
21318
21401
|
this.routeController.updateRouteProgress(routeId, position, behindConfig);
|
|
21319
21402
|
} catch (error) {
|
|
21320
|
-
|
|
21403
|
+
this.debugLog("Route update failed (route may not exist)", error);
|
|
21321
21404
|
}
|
|
21322
21405
|
}
|
|
21323
21406
|
}, {
|
|
@@ -21327,7 +21410,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21327
21410
|
this.logEvent("removeRoute");
|
|
21328
21411
|
this.routeController.removeRoute(routeId);
|
|
21329
21412
|
} catch (error) {
|
|
21330
|
-
|
|
21413
|
+
this.debugLog("Remove route failed (no route may exist)", error);
|
|
21331
21414
|
}
|
|
21332
21415
|
this.syncLiveRouteId();
|
|
21333
21416
|
}
|
|
@@ -21338,7 +21421,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21338
21421
|
this.logEvent("removeRouteById");
|
|
21339
21422
|
this.routeController.removeRoute(routeId);
|
|
21340
21423
|
} catch (error) {
|
|
21341
|
-
|
|
21424
|
+
this.debugLog("Remove route failed (route may not exist)", error);
|
|
21342
21425
|
}
|
|
21343
21426
|
this.syncLiveRouteId();
|
|
21344
21427
|
}
|
|
@@ -21349,7 +21432,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21349
21432
|
this.logEvent("removeAllRoutes");
|
|
21350
21433
|
this.routeController.removeAllRoutes();
|
|
21351
21434
|
} catch (error) {
|
|
21352
|
-
|
|
21435
|
+
this.debugLog("Remove all routes failed", error);
|
|
21353
21436
|
}
|
|
21354
21437
|
this.syncLiveRouteId();
|
|
21355
21438
|
}
|
|
@@ -21565,7 +21648,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21565
21648
|
}
|
|
21566
21649
|
}
|
|
21567
21650
|
} catch (error) {
|
|
21568
|
-
|
|
21651
|
+
this.debugLog("Place selection failed (layer may not exist)", error);
|
|
21569
21652
|
}
|
|
21570
21653
|
}
|
|
21571
21654
|
}, {
|
|
@@ -21677,7 +21760,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21677
21760
|
case 5:
|
|
21678
21761
|
_context4.p = 5;
|
|
21679
21762
|
_t4 = _context4.v;
|
|
21680
|
-
throw new Error("Error: Failed to start animating route"
|
|
21763
|
+
throw new Error("Error: Failed to start animating route", {
|
|
21764
|
+
cause: _t4
|
|
21765
|
+
});
|
|
21681
21766
|
case 6:
|
|
21682
21767
|
return _context4.a(2);
|
|
21683
21768
|
}
|
|
@@ -21727,7 +21812,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21727
21812
|
case 5:
|
|
21728
21813
|
_context5.p = 5;
|
|
21729
21814
|
_t5 = _context5.v;
|
|
21730
|
-
throw new Error("Error: Failed to start animating route"
|
|
21815
|
+
throw new Error("Error: Failed to start animating route", {
|
|
21816
|
+
cause: _t5
|
|
21817
|
+
});
|
|
21731
21818
|
case 6:
|
|
21732
21819
|
return _context5.a(2);
|
|
21733
21820
|
}
|
|
@@ -21745,7 +21832,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21745
21832
|
this.routeController.pauseAnimation(routeId);
|
|
21746
21833
|
this.logEvent("pauseAnimateRoute");
|
|
21747
21834
|
} catch (error) {
|
|
21748
|
-
|
|
21835
|
+
this.debugLog("Pause animation failed (no animation may be running)", error);
|
|
21749
21836
|
}
|
|
21750
21837
|
}
|
|
21751
21838
|
}, {
|
|
@@ -21755,7 +21842,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21755
21842
|
this.routeController.resumeAnimation(routeId);
|
|
21756
21843
|
this.logEvent("resumeAnimateRoute");
|
|
21757
21844
|
} catch (error) {
|
|
21758
|
-
|
|
21845
|
+
this.debugLog("Resume animation failed (no animation may be paused)", error);
|
|
21759
21846
|
}
|
|
21760
21847
|
}
|
|
21761
21848
|
}, {
|
|
@@ -21765,7 +21852,7 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21765
21852
|
this.routeController.restartAnimation(routeId);
|
|
21766
21853
|
this.logEvent("restartAnimateRoute");
|
|
21767
21854
|
} catch (error) {
|
|
21768
|
-
|
|
21855
|
+
this.debugLog("Restart animation failed (no animation may exist)", error);
|
|
21769
21856
|
}
|
|
21770
21857
|
}
|
|
21771
21858
|
}, {
|
|
@@ -21815,7 +21902,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21815
21902
|
case 5:
|
|
21816
21903
|
_context6.p = 5;
|
|
21817
21904
|
_t6 = _context6.v;
|
|
21818
|
-
throw new Error("Error: Failed to add step animation"
|
|
21905
|
+
throw new Error("Error: Failed to add step animation", {
|
|
21906
|
+
cause: _t6
|
|
21907
|
+
});
|
|
21819
21908
|
case 6:
|
|
21820
21909
|
return _context6.a(2);
|
|
21821
21910
|
}
|
|
@@ -21866,7 +21955,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21866
21955
|
case 5:
|
|
21867
21956
|
_context7.p = 5;
|
|
21868
21957
|
_t7 = _context7.v;
|
|
21869
|
-
throw new Error("Error: Failed to add step animation"
|
|
21958
|
+
throw new Error("Error: Failed to add step animation", {
|
|
21959
|
+
cause: _t7
|
|
21960
|
+
});
|
|
21870
21961
|
case 6:
|
|
21871
21962
|
return _context7.a(2);
|
|
21872
21963
|
}
|
|
@@ -21884,7 +21975,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21884
21975
|
this.routeController.nextStepAnimation(routeId);
|
|
21885
21976
|
this.logEvent("nextStepAnimation");
|
|
21886
21977
|
} catch (error) {
|
|
21887
|
-
throw new Error("Error: Failed to animate step"
|
|
21978
|
+
throw new Error("Error: Failed to animate step", {
|
|
21979
|
+
cause: error
|
|
21980
|
+
});
|
|
21888
21981
|
}
|
|
21889
21982
|
}
|
|
21890
21983
|
}, {
|
|
@@ -21982,7 +22075,9 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
21982
22075
|
this.map.setPaintProperty("indoor-bordered-places", "line-width", width);
|
|
21983
22076
|
}
|
|
21984
22077
|
} catch (error) {
|
|
21985
|
-
throw new Error("Failed to add border to places"
|
|
22078
|
+
throw new Error("Failed to add border to places", {
|
|
22079
|
+
cause: error
|
|
22080
|
+
});
|
|
21986
22081
|
}
|
|
21987
22082
|
}
|
|
21988
22083
|
}, {
|
|
@@ -22110,15 +22205,53 @@ var InternalMapVXMap = /*#__PURE__*/function (_Loggeable) {
|
|
|
22110
22205
|
});
|
|
22111
22206
|
|
|
22112
22207
|
// Attempt to reload valid failed tiles
|
|
22208
|
+
var now = Date.now();
|
|
22113
22209
|
tilesToRetry.forEach(function (tile) {
|
|
22210
|
+
var _this15$tileRetryStat;
|
|
22211
|
+
var retry = (_this15$tileRetryStat = _this15.tileRetryState.get(tile)) !== null && _this15$tileRetryStat !== void 0 ? _this15$tileRetryStat : {
|
|
22212
|
+
attempts: 0,
|
|
22213
|
+
nextAttemptAt: 0,
|
|
22214
|
+
pending: false
|
|
22215
|
+
};
|
|
22216
|
+
|
|
22217
|
+
// Skip tiles with a reload still in flight or still inside their backoff window.
|
|
22218
|
+
if (retry.pending || now < retry.nextAttemptAt) return;
|
|
22219
|
+
var onFailure = function onFailure(error) {
|
|
22220
|
+
var attempts = retry.attempts + 1;
|
|
22221
|
+
if (attempts >= MAX_TILE_RETRIES) {
|
|
22222
|
+
_this15.debugLog("Tile reload failed ".concat(attempts, " times, dropping it from the retry queue"), error);
|
|
22223
|
+
_this15.failedTiles["delete"](tile);
|
|
22224
|
+
_this15.tileRetryState["delete"](tile);
|
|
22225
|
+
return;
|
|
22226
|
+
}
|
|
22227
|
+
|
|
22228
|
+
// Stay in the queue and try again once the backoff has elapsed.
|
|
22229
|
+
var backoffMs = TILE_RETRY_BASE_DELAY_MS * Math.pow(2, attempts - 1);
|
|
22230
|
+
_this15.debugLog("Tile reload failed (attempt ".concat(attempts, "/").concat(MAX_TILE_RETRIES, "), retrying in ").concat(backoffMs, "ms"), error);
|
|
22231
|
+
_this15.tileRetryState.set(tile, {
|
|
22232
|
+
attempts: attempts,
|
|
22233
|
+
nextAttemptAt: Date.now() + backoffMs,
|
|
22234
|
+
pending: false
|
|
22235
|
+
});
|
|
22236
|
+
};
|
|
22114
22237
|
try {
|
|
22115
22238
|
// Verify tile still exists and is in a retryable state
|
|
22116
22239
|
if (tile && (tile.state === "errored" || tile.state === "expired")) {
|
|
22117
|
-
|
|
22240
|
+
_this15.tileRetryState.set(tile, map_objectSpread(map_objectSpread({}, retry), {}, {
|
|
22241
|
+
pending: true
|
|
22242
|
+
}));
|
|
22243
|
+
// loadTile is async, so a rejection escapes this try/catch and has to be handled
|
|
22244
|
+
// on the promise itself - otherwise it surfaces as an unhandled rejection and the
|
|
22245
|
+
// tile is retried on every tick regardless of how often it has already failed.
|
|
22246
|
+
source.loadTile(tile).then(function () {
|
|
22247
|
+
// Loaded: forget the attempt history so a later failure starts from zero. The
|
|
22248
|
+
// tile leaves the queue through the tilesToRemove branch on the next tick,
|
|
22249
|
+
// once its state is no longer errored/expired.
|
|
22250
|
+
_this15.tileRetryState["delete"](tile);
|
|
22251
|
+
})["catch"](onFailure);
|
|
22118
22252
|
}
|
|
22119
22253
|
} catch (error) {
|
|
22120
|
-
|
|
22121
|
-
_this15.failedTiles["delete"](tile);
|
|
22254
|
+
onFailure(error);
|
|
22122
22255
|
}
|
|
22123
22256
|
});
|
|
22124
22257
|
}, 1000);
|
|
@@ -22345,7 +22478,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22345
22478
|
case 2:
|
|
22346
22479
|
_context.p = 2;
|
|
22347
22480
|
_t = _context.v;
|
|
22348
|
-
throw Error("Error getPlaceDetail"
|
|
22481
|
+
throw new Error("Error getPlaceDetail", {
|
|
22482
|
+
cause: _t
|
|
22483
|
+
});
|
|
22349
22484
|
case 3:
|
|
22350
22485
|
return _context.a(2);
|
|
22351
22486
|
}
|
|
@@ -22377,7 +22512,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22377
22512
|
case 2:
|
|
22378
22513
|
_context2.p = 2;
|
|
22379
22514
|
_t2 = _context2.v;
|
|
22380
|
-
throw Error("Error getAnyPlaceDetail"
|
|
22515
|
+
throw new Error("Error getAnyPlaceDetail", {
|
|
22516
|
+
cause: _t2
|
|
22517
|
+
});
|
|
22381
22518
|
case 3:
|
|
22382
22519
|
return _context2.a(2);
|
|
22383
22520
|
}
|
|
@@ -22416,7 +22553,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22416
22553
|
this.logEvent("createMap");
|
|
22417
22554
|
return map;
|
|
22418
22555
|
} catch (error) {
|
|
22419
|
-
throw new Error("Failed to create map"
|
|
22556
|
+
throw new Error("Failed to create map", {
|
|
22557
|
+
cause: error
|
|
22558
|
+
});
|
|
22420
22559
|
}
|
|
22421
22560
|
}
|
|
22422
22561
|
}, {
|
|
@@ -22437,7 +22576,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22437
22576
|
case 2:
|
|
22438
22577
|
_context3.p = 2;
|
|
22439
22578
|
_t3 = _context3.v;
|
|
22440
|
-
throw new Error("Failed to get configuration"
|
|
22579
|
+
throw new Error("Failed to get configuration", {
|
|
22580
|
+
cause: _t3
|
|
22581
|
+
});
|
|
22441
22582
|
case 3:
|
|
22442
22583
|
return _context3.a(2);
|
|
22443
22584
|
}
|
|
@@ -22466,7 +22607,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22466
22607
|
case 2:
|
|
22467
22608
|
_context4.p = 2;
|
|
22468
22609
|
_t4 = _context4.v;
|
|
22469
|
-
throw new Error("Failed to get categories"
|
|
22610
|
+
throw new Error("Failed to get categories", {
|
|
22611
|
+
cause: _t4
|
|
22612
|
+
});
|
|
22470
22613
|
case 3:
|
|
22471
22614
|
return _context4.a(2);
|
|
22472
22615
|
}
|
|
@@ -22494,7 +22637,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22494
22637
|
case 2:
|
|
22495
22638
|
_context5.p = 2;
|
|
22496
22639
|
_t5 = _context5.v;
|
|
22497
|
-
throw Error("Failed to get transport"
|
|
22640
|
+
throw new Error("Failed to get transport", {
|
|
22641
|
+
cause: _t5
|
|
22642
|
+
});
|
|
22498
22643
|
case 3:
|
|
22499
22644
|
return _context5.a(2);
|
|
22500
22645
|
}
|
|
@@ -22513,7 +22658,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22513
22658
|
this.logEvent("getCachedPlaces");
|
|
22514
22659
|
return places;
|
|
22515
22660
|
} catch (error) {
|
|
22516
|
-
throw Error("Failed to get cached places"
|
|
22661
|
+
throw new Error("Failed to get cached places", {
|
|
22662
|
+
cause: error
|
|
22663
|
+
});
|
|
22517
22664
|
}
|
|
22518
22665
|
}
|
|
22519
22666
|
}, {
|
|
@@ -22534,7 +22681,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22534
22681
|
case 2:
|
|
22535
22682
|
_context6.p = 2;
|
|
22536
22683
|
_t6 = _context6.v;
|
|
22537
|
-
throw Error("Failed to get available places"
|
|
22684
|
+
throw new Error("Failed to get available places", {
|
|
22685
|
+
cause: _t6
|
|
22686
|
+
});
|
|
22538
22687
|
case 3:
|
|
22539
22688
|
return _context6.a(2);
|
|
22540
22689
|
}
|
|
@@ -22563,7 +22712,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22563
22712
|
case 2:
|
|
22564
22713
|
_context7.p = 2;
|
|
22565
22714
|
_t7 = _context7.v;
|
|
22566
|
-
throw Error("Failed to get subplaces"
|
|
22715
|
+
throw new Error("Failed to get subplaces", {
|
|
22716
|
+
cause: _t7
|
|
22717
|
+
});
|
|
22567
22718
|
case 3:
|
|
22568
22719
|
return _context7.a(2);
|
|
22569
22720
|
}
|
|
@@ -22592,7 +22743,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22592
22743
|
case 2:
|
|
22593
22744
|
_context8.p = 2;
|
|
22594
22745
|
_t8 = _context8.v;
|
|
22595
|
-
throw Error("Failed to get places from institution"
|
|
22746
|
+
throw new Error("Failed to get places from institution", {
|
|
22747
|
+
cause: _t8
|
|
22748
|
+
});
|
|
22596
22749
|
case 3:
|
|
22597
22750
|
return _context8.a(2);
|
|
22598
22751
|
}
|
|
@@ -22621,7 +22774,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22621
22774
|
case 2:
|
|
22622
22775
|
_context9.p = 2;
|
|
22623
22776
|
_t9 = _context9.v;
|
|
22624
|
-
throw Error("Failed to get any sub-places"
|
|
22777
|
+
throw new Error("Failed to get any sub-places", {
|
|
22778
|
+
cause: _t9
|
|
22779
|
+
});
|
|
22625
22780
|
case 3:
|
|
22626
22781
|
return _context9.a(2);
|
|
22627
22782
|
}
|
|
@@ -22650,7 +22805,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22650
22805
|
case 2:
|
|
22651
22806
|
_context0.p = 2;
|
|
22652
22807
|
_t0 = _context0.v;
|
|
22653
|
-
throw Error("Error getInstitution"
|
|
22808
|
+
throw new Error("Error getInstitution", {
|
|
22809
|
+
cause: _t0
|
|
22810
|
+
});
|
|
22654
22811
|
case 3:
|
|
22655
22812
|
return _context0.a(2);
|
|
22656
22813
|
}
|
|
@@ -22680,7 +22837,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22680
22837
|
case 2:
|
|
22681
22838
|
_context1.p = 2;
|
|
22682
22839
|
_t1 = _context1.v;
|
|
22683
|
-
throw new Error("Failed to get route"
|
|
22840
|
+
throw new Error("Failed to get route", {
|
|
22841
|
+
cause: _t1
|
|
22842
|
+
});
|
|
22684
22843
|
case 3:
|
|
22685
22844
|
return _context1.a(2);
|
|
22686
22845
|
}
|
|
@@ -22710,7 +22869,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22710
22869
|
case 2:
|
|
22711
22870
|
_context10.p = 2;
|
|
22712
22871
|
_t10 = _context10.v;
|
|
22713
|
-
throw new Error("Failed to get route"
|
|
22872
|
+
throw new Error("Failed to get route", {
|
|
22873
|
+
cause: _t10
|
|
22874
|
+
});
|
|
22714
22875
|
case 3:
|
|
22715
22876
|
return _context10.a(2);
|
|
22716
22877
|
}
|
|
@@ -22740,7 +22901,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22740
22901
|
case 2:
|
|
22741
22902
|
_context11.p = 2;
|
|
22742
22903
|
_t11 = _context11.v;
|
|
22743
|
-
throw new Error("Failed to get route"
|
|
22904
|
+
throw new Error("Failed to get route", {
|
|
22905
|
+
cause: _t11
|
|
22906
|
+
});
|
|
22744
22907
|
case 3:
|
|
22745
22908
|
return _context11.a(2);
|
|
22746
22909
|
}
|
|
@@ -22771,7 +22934,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22771
22934
|
case 2:
|
|
22772
22935
|
_context12.p = 2;
|
|
22773
22936
|
_t12 = _context12.v;
|
|
22774
|
-
throw new Error("Failed to get places by input"
|
|
22937
|
+
throw new Error("Failed to get places by input", {
|
|
22938
|
+
cause: _t12
|
|
22939
|
+
});
|
|
22775
22940
|
case 3:
|
|
22776
22941
|
return _context12.a(2);
|
|
22777
22942
|
}
|
|
@@ -22829,7 +22994,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22829
22994
|
case 4:
|
|
22830
22995
|
_context13.p = 4;
|
|
22831
22996
|
_t13 = _context13.v;
|
|
22832
|
-
throw new Error("Failed to search places by tags"
|
|
22997
|
+
throw new Error("Failed to search places by tags", {
|
|
22998
|
+
cause: _t13
|
|
22999
|
+
});
|
|
22833
23000
|
case 5:
|
|
22834
23001
|
return _context13.a(2);
|
|
22835
23002
|
}
|
|
@@ -22856,7 +23023,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22856
23023
|
case 1:
|
|
22857
23024
|
_context14.p = 1;
|
|
22858
23025
|
_t14 = _context14.v;
|
|
22859
|
-
throw new Error("Failed to get places by category"
|
|
23026
|
+
throw new Error("Failed to get places by category", {
|
|
23027
|
+
cause: _t14
|
|
23028
|
+
});
|
|
22860
23029
|
case 2:
|
|
22861
23030
|
return _context14.a(2);
|
|
22862
23031
|
}
|
|
@@ -22991,7 +23160,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
22991
23160
|
case 2:
|
|
22992
23161
|
_context16.p = 2;
|
|
22993
23162
|
_t15 = _context16.v;
|
|
22994
|
-
throw new Error("Failed to get cache timestamp"
|
|
23163
|
+
throw new Error("Failed to get cache timestamp", {
|
|
23164
|
+
cause: _t15
|
|
23165
|
+
});
|
|
22995
23166
|
case 3:
|
|
22996
23167
|
return _context16.a(2);
|
|
22997
23168
|
}
|
|
@@ -23025,7 +23196,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
23025
23196
|
case 2:
|
|
23026
23197
|
_context17.p = 2;
|
|
23027
23198
|
_t16 = _context17.v;
|
|
23028
|
-
throw new Error("Failed to get css customization"
|
|
23199
|
+
throw new Error("Failed to get css customization", {
|
|
23200
|
+
cause: _t16
|
|
23201
|
+
});
|
|
23029
23202
|
case 3:
|
|
23030
23203
|
return _context17.a(2);
|
|
23031
23204
|
}
|
|
@@ -23053,7 +23226,9 @@ var InternalMapVXSDK = /*#__PURE__*/function (_Loggeable) {
|
|
|
23053
23226
|
case 2:
|
|
23054
23227
|
_context18.p = 2;
|
|
23055
23228
|
_t17 = _context18.v;
|
|
23056
|
-
throw new Error("Failed to notify health"
|
|
23229
|
+
throw new Error("Failed to notify health", {
|
|
23230
|
+
cause: _t17
|
|
23231
|
+
});
|
|
23057
23232
|
case 3:
|
|
23058
23233
|
return _context18.a(2);
|
|
23059
23234
|
}
|
|
@@ -23398,9 +23573,9 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23398
23573
|
if (!hourStr || !minuteStr) {
|
|
23399
23574
|
return "";
|
|
23400
23575
|
}
|
|
23401
|
-
var hour = parseInt(hourStr, 10);
|
|
23402
|
-
var minute = parseInt(minuteStr, 10);
|
|
23403
|
-
if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
|
|
23576
|
+
var hour = Number.parseInt(hourStr, 10);
|
|
23577
|
+
var minute = Number.parseInt(minuteStr, 10);
|
|
23578
|
+
if (Number.isNaN(hour) || Number.isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
|
|
23404
23579
|
return "";
|
|
23405
23580
|
}
|
|
23406
23581
|
var displayHour = hour % 24;
|
|
@@ -23531,13 +23706,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23531
23706
|
return date.toLocaleDateString(currentLang, {
|
|
23532
23707
|
weekday: "long"
|
|
23533
23708
|
});
|
|
23534
|
-
} catch (
|
|
23709
|
+
} catch (_unused5) {
|
|
23535
23710
|
// Fallback to English if the language is not valid
|
|
23536
23711
|
return date.toLocaleDateString("en", {
|
|
23537
23712
|
weekday: "long"
|
|
23538
23713
|
});
|
|
23539
23714
|
}
|
|
23540
|
-
} catch (
|
|
23715
|
+
} catch (_unused6) {
|
|
23541
23716
|
return "";
|
|
23542
23717
|
}
|
|
23543
23718
|
}
|
|
@@ -23568,7 +23743,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23568
23743
|
var dayNumberB = OpeningHoursHelper.getDayNumber(keyB);
|
|
23569
23744
|
return dayNumberA - dayNumberB;
|
|
23570
23745
|
}));
|
|
23571
|
-
} catch (
|
|
23746
|
+
} catch (_unused7) {
|
|
23572
23747
|
return openingHours;
|
|
23573
23748
|
}
|
|
23574
23749
|
}
|
|
@@ -23614,7 +23789,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23614
23789
|
if (is24Hours(interval)) {
|
|
23615
23790
|
return true;
|
|
23616
23791
|
}
|
|
23617
|
-
if (interval && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
|
|
23792
|
+
if (interval !== null && interval !== void 0 && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
|
|
23618
23793
|
// Create the date object based on yesterday
|
|
23619
23794
|
var openTime = OpeningHoursHelper.parseTimeAsDate(interval.open, yesterday);
|
|
23620
23795
|
var closeTime = OpeningHoursHelper.parseTimeAsDate(interval.close, yesterday);
|
|
@@ -23632,7 +23807,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23632
23807
|
_iterator.f();
|
|
23633
23808
|
}
|
|
23634
23809
|
return false;
|
|
23635
|
-
} catch (
|
|
23810
|
+
} catch (_unused8) {
|
|
23636
23811
|
return false;
|
|
23637
23812
|
}
|
|
23638
23813
|
}
|
|
@@ -23655,7 +23830,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23655
23830
|
try {
|
|
23656
23831
|
var day = date.getDate();
|
|
23657
23832
|
date.setDate(day - 1);
|
|
23658
|
-
} catch (
|
|
23833
|
+
} catch (_unused9) {}
|
|
23659
23834
|
}
|
|
23660
23835
|
|
|
23661
23836
|
/**
|
|
@@ -23676,7 +23851,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23676
23851
|
try {
|
|
23677
23852
|
var day = date.getDate();
|
|
23678
23853
|
date.setDate(day + 1);
|
|
23679
|
-
} catch (
|
|
23854
|
+
} catch (_unused0) {}
|
|
23680
23855
|
}
|
|
23681
23856
|
|
|
23682
23857
|
/**
|
|
@@ -23721,7 +23896,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23721
23896
|
if (is24Hours(interval)) {
|
|
23722
23897
|
return true;
|
|
23723
23898
|
}
|
|
23724
|
-
if (interval && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
|
|
23899
|
+
if (interval !== null && interval !== void 0 && interval.open && interval.close && OpeningHoursHelper.isValidTime(interval.open) && OpeningHoursHelper.isValidTime(interval.close)) {
|
|
23725
23900
|
// Create Date objects based on today
|
|
23726
23901
|
var openTime = OpeningHoursHelper.parseTimeAsDate(interval.open, now);
|
|
23727
23902
|
var closeTime = OpeningHoursHelper.parseTimeAsDate(interval.close, now);
|
|
@@ -23739,7 +23914,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23739
23914
|
_iterator2.f();
|
|
23740
23915
|
}
|
|
23741
23916
|
return false; // The current time is not within any interval
|
|
23742
|
-
} catch (
|
|
23917
|
+
} catch (_unused1) {
|
|
23743
23918
|
return false;
|
|
23744
23919
|
}
|
|
23745
23920
|
}
|
|
@@ -23770,8 +23945,8 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23770
23945
|
return false;
|
|
23771
23946
|
}
|
|
23772
23947
|
var intervals = openingHours[day];
|
|
23773
|
-
return !!(intervals && intervals
|
|
23774
|
-
} catch (
|
|
23948
|
+
return !!(intervals !== null && intervals !== void 0 && intervals.length);
|
|
23949
|
+
} catch (_unused10) {
|
|
23775
23950
|
return false;
|
|
23776
23951
|
}
|
|
23777
23952
|
}
|
|
@@ -23800,7 +23975,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23800
23975
|
}
|
|
23801
23976
|
var timeRegex = /^([01][0-9]|2[0-3]):[0-5][0-9]$/; // HH:mm format (requires leading zero)
|
|
23802
23977
|
return timeRegex.test(time);
|
|
23803
|
-
} catch (
|
|
23978
|
+
} catch (_unused11) {
|
|
23804
23979
|
return false;
|
|
23805
23980
|
}
|
|
23806
23981
|
}
|
|
@@ -23830,7 +24005,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23830
24005
|
var baseDate = date ? new Date(date) : new Date();
|
|
23831
24006
|
var newDate = new Date(baseDate.getFullYear(), baseDate.getMonth(), baseDate.getDate(), hours, minutes, 0, 0);
|
|
23832
24007
|
return newDate;
|
|
23833
|
-
} catch (
|
|
24008
|
+
} catch (_unused12) {
|
|
23834
24009
|
return new Date();
|
|
23835
24010
|
}
|
|
23836
24011
|
}
|
|
@@ -23875,7 +24050,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23875
24050
|
open: first.open,
|
|
23876
24051
|
close: last.close
|
|
23877
24052
|
};
|
|
23878
|
-
} catch (
|
|
24053
|
+
} catch (_unused13) {
|
|
23879
24054
|
return {
|
|
23880
24055
|
open: "00:00",
|
|
23881
24056
|
close: "00:00"
|
|
@@ -23909,7 +24084,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23909
24084
|
// Compare the 'open' times as strings
|
|
23910
24085
|
return a.open.localeCompare(b.open);
|
|
23911
24086
|
});
|
|
23912
|
-
} catch (
|
|
24087
|
+
} catch (_unused14) {
|
|
23913
24088
|
return openingTimes;
|
|
23914
24089
|
}
|
|
23915
24090
|
}
|
|
@@ -23937,13 +24112,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23937
24112
|
return "";
|
|
23938
24113
|
}
|
|
23939
24114
|
var intervals = openingHours[day];
|
|
23940
|
-
if (intervals && intervals
|
|
24115
|
+
if (intervals !== null && intervals !== void 0 && intervals.length) {
|
|
23941
24116
|
var flattenedTime = OpeningHoursHelper.flattenOpeningTimes(intervals);
|
|
23942
24117
|
return OpeningHoursHelper.formatTimeSchedule(flattenedTime);
|
|
23943
24118
|
} else {
|
|
23944
24119
|
return "";
|
|
23945
24120
|
}
|
|
23946
|
-
} catch (
|
|
24121
|
+
} catch (_unused15) {
|
|
23947
24122
|
return "";
|
|
23948
24123
|
}
|
|
23949
24124
|
}
|
|
@@ -23972,13 +24147,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
23972
24147
|
return "";
|
|
23973
24148
|
}
|
|
23974
24149
|
var intervals = openingHours[day];
|
|
23975
|
-
if (intervals && intervals
|
|
24150
|
+
if (intervals !== null && intervals !== void 0 && intervals.length) {
|
|
23976
24151
|
var flattenedTime = OpeningHoursHelper.flattenOpeningTimes(intervals);
|
|
23977
24152
|
return OpeningHoursHelper.formatTimeSchedule(flattenedTime);
|
|
23978
24153
|
} else {
|
|
23979
24154
|
return "";
|
|
23980
24155
|
}
|
|
23981
|
-
} catch (
|
|
24156
|
+
} catch (_unused16) {
|
|
23982
24157
|
return "";
|
|
23983
24158
|
}
|
|
23984
24159
|
}
|
|
@@ -24011,7 +24186,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24011
24186
|
var minutesClose = OpeningHoursHelper.toMinutes(closeHour);
|
|
24012
24187
|
var minutesCurrent = OpeningHoursHelper.toMinutes(currentHour);
|
|
24013
24188
|
return minutesCurrent >= minutesOpen && minutesCurrent <= minutesClose;
|
|
24014
|
-
} catch (
|
|
24189
|
+
} catch (_unused17) {
|
|
24015
24190
|
return false;
|
|
24016
24191
|
}
|
|
24017
24192
|
}
|
|
@@ -24043,15 +24218,15 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24043
24218
|
if (!hoursStr || !minutesStr) {
|
|
24044
24219
|
return new Date();
|
|
24045
24220
|
}
|
|
24046
|
-
var hours = parseInt(hoursStr, 10);
|
|
24047
|
-
var minutes = parseInt(minutesStr, 10);
|
|
24048
|
-
if (isNaN(hours) || isNaN(minutes)) {
|
|
24221
|
+
var hours = Number.parseInt(hoursStr, 10);
|
|
24222
|
+
var minutes = Number.parseInt(minutesStr, 10);
|
|
24223
|
+
if (Number.isNaN(hours) || Number.isNaN(minutes)) {
|
|
24049
24224
|
return new Date();
|
|
24050
24225
|
}
|
|
24051
24226
|
var date = baseDate ? new Date(baseDate) : new Date();
|
|
24052
24227
|
date.setHours(hours, minutes, 0, 0);
|
|
24053
24228
|
return date;
|
|
24054
|
-
} catch (
|
|
24229
|
+
} catch (_unused18) {
|
|
24055
24230
|
return new Date();
|
|
24056
24231
|
}
|
|
24057
24232
|
}
|
|
@@ -24093,7 +24268,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24093
24268
|
return firstDay;
|
|
24094
24269
|
}
|
|
24095
24270
|
return "".concat(firstDay, " - ").concat(lastDay);
|
|
24096
|
-
} catch (
|
|
24271
|
+
} catch (_unused19) {
|
|
24097
24272
|
return "";
|
|
24098
24273
|
}
|
|
24099
24274
|
}
|
|
@@ -24130,7 +24305,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24130
24305
|
return a.diff - b.diff;
|
|
24131
24306
|
});
|
|
24132
24307
|
return timesWithDiffs.length > 0 ? timesWithDiffs[0].time : "";
|
|
24133
|
-
} catch (
|
|
24308
|
+
} catch (_unused20) {
|
|
24134
24309
|
return "";
|
|
24135
24310
|
}
|
|
24136
24311
|
}
|
|
@@ -24178,7 +24353,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24178
24353
|
var time = new Date(date);
|
|
24179
24354
|
time.setSeconds(0, 0);
|
|
24180
24355
|
return time >= startDate && time <= endDate;
|
|
24181
|
-
} catch (
|
|
24356
|
+
} catch (_unused21) {
|
|
24182
24357
|
return false;
|
|
24183
24358
|
}
|
|
24184
24359
|
}
|
|
@@ -24219,7 +24394,7 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24219
24394
|
return "";
|
|
24220
24395
|
}
|
|
24221
24396
|
return OpeningHoursHelper.convertSingleTimeTo12Hour(time);
|
|
24222
|
-
} catch (
|
|
24397
|
+
} catch (_unused22) {
|
|
24223
24398
|
return "";
|
|
24224
24399
|
}
|
|
24225
24400
|
}
|
|
@@ -24247,8 +24422,8 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24247
24422
|
if (dayName == null) {
|
|
24248
24423
|
return false;
|
|
24249
24424
|
}
|
|
24250
|
-
return !!(openingHours && openingHours[dayName]);
|
|
24251
|
-
} catch (
|
|
24425
|
+
return !!(openingHours !== null && openingHours !== void 0 && openingHours[dayName]);
|
|
24426
|
+
} catch (_unused23) {
|
|
24252
24427
|
return false;
|
|
24253
24428
|
}
|
|
24254
24429
|
}
|
|
@@ -24282,13 +24457,13 @@ var OpeningHoursHelper = /*#__PURE__*/function () {
|
|
|
24282
24457
|
if (!hoursStr || !minutesStr) {
|
|
24283
24458
|
return 0;
|
|
24284
24459
|
}
|
|
24285
|
-
var hours = parseInt(hoursStr, 10);
|
|
24286
|
-
var minutes = parseInt(minutesStr, 10);
|
|
24287
|
-
if (isNaN(hours) || isNaN(minutes)) {
|
|
24460
|
+
var hours = Number.parseInt(hoursStr, 10);
|
|
24461
|
+
var minutes = Number.parseInt(minutesStr, 10);
|
|
24462
|
+
if (Number.isNaN(hours) || Number.isNaN(minutes)) {
|
|
24288
24463
|
return 0;
|
|
24289
24464
|
}
|
|
24290
24465
|
return hours * 60 + minutes;
|
|
24291
|
-
} catch (
|
|
24466
|
+
} catch (_unused24) {
|
|
24292
24467
|
return 0;
|
|
24293
24468
|
}
|
|
24294
24469
|
}
|