@depict-ai/ui 4.7.24 → 4.7.25
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/ES10/index.cjs +112 -33
- package/ES10/index.d.ts +5 -1
- package/ES10/index.js +330 -252
- package/latest/index.cjs +112 -33
- package/latest/index.d.ts +5 -1
- package/latest/index.js +330 -252
- package/package.json +1 -1
- package/server/ES10/index.cjs +83 -20
- package/server/ES10/index.d.ts +5 -1
- package/server/ES10/index.js +219 -157
- package/server/latest/index.cjs +83 -20
- package/server/latest/index.d.ts +5 -1
- package/server/latest/index.js +219 -157
package/ES10/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, catchify as $8tj43$
|
|
2
|
-
import {
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, catchify as $8tj43$catchify1, dlog as $8tj43$dlog1, camelCasifyObject as $8tj43$camelCasifyObject, useExpandingContainer as $8tj43$useExpandingContainer, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, dwarn as $8tj43$dwarn, slider_fractional_factory as $8tj43$slider_fractional_factory, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, layout_media_query_header as $8tj43$layout_media_query_header, report as $8tj43$report, observer as $8tj43$observer, javascript_media_query as $8tj43$javascript_media_query, queueMacroTask as $8tj43$queueMacroTask, findMostFrequentItem as $8tj43$findMostFrequentItem, standard_price_format as $8tj43$standard_price_format, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, use_href_accessor as $8tj43$use_href_accessor, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, snakeCasifyObject as $8tj43$snakeCasifyObject, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces, is_debug as $8tj43$is_debug } from "@depict-ai/utilishared/ES10";
|
|
2
|
+
import { dlog as $8tj43$dlog, catchify as $8tj43$catchify, ListenableSet as $8tj43$ListenableSet, use_href_accessor as $8tj43$use_href_accessor1, queueMacroTask as $8tj43$queueMacroTask1, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
|
|
3
|
+
import { createRoot as $8tj43$createRoot, createSignal as $8tj43$createSignal, createEffect as $8tj43$createEffect, onCleanup as $8tj43$onCleanup, createContext as $8tj43$createContext, Show as $8tj43$Show, useContext as $8tj43$useContext, createMemo as $8tj43$createMemo, untrack as $8tj43$untrack, For as $8tj43$For, getOwner as $8tj43$getOwner, createResource as $8tj43$createResource, runWithOwner as $8tj43$runWithOwner, mergeProps as $8tj43$mergeProps1, Suspense as $8tj43$Suspense, createRenderEffect as $8tj43$createRenderEffect, Index as $8tj43$Index, createUniqueId as $8tj43$createUniqueId, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, splitProps as $8tj43$splitProps, on as $8tj43$on, batch as $8tj43$batch, createSelector as $8tj43$createSelector, children as $8tj43$children, createReaction as $8tj43$createReaction, mapArray as $8tj43$mapArray } from "solid-js";
|
|
3
4
|
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, createComponent as $8tj43$createComponent, isServer as $8tj43$isServer, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, mergeProps as $8tj43$mergeProps, className as $8tj43$className, spread as $8tj43$spread, runHydrationEvents as $8tj43$runHydrationEvents, addEventListener as $8tj43$addEventListener, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, getNextMarker as $8tj43$getNextMarker, classList as $8tj43$classList, use as $8tj43$use, style as $8tj43$style, setProperty as $8tj43$setProperty, Dynamic as $8tj43$Dynamic } from "solid-js/web";
|
|
4
5
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
-
import { ListenableSet as $8tj43$ListenableSet, catchify as $8tj43$catchify1, use_href_accessor as $8tj43$use_href_accessor1, queueMacroTask as $8tj43$queueMacroTask1, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
|
|
6
6
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
7
7
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
8
8
|
import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from "solid-js/store";
|
|
@@ -10,7 +10,68 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.25";
|
|
14
|
+
let $715f7f2e53146662$var$elementsHoveredSignal;
|
|
15
|
+
let $715f7f2e53146662$var$consumersSignal;
|
|
16
|
+
function $715f7f2e53146662$export$d4d96868197be50e() {
|
|
17
|
+
if (!$715f7f2e53146662$var$elementsHoveredSignal || !$715f7f2e53146662$var$consumersSignal) $8tj43$createRoot(dispose => {
|
|
18
|
+
$715f7f2e53146662$var$elementsHoveredSignal = $8tj43$createSignal(new Set());
|
|
19
|
+
$715f7f2e53146662$var$consumersSignal = $8tj43$createSignal(0);
|
|
20
|
+
const [consumers] = $715f7f2e53146662$var$consumersSignal;
|
|
21
|
+
// No matter how often useMobileHover is called, only add one listener and get hovered elements once per touchmove event, for efficiency
|
|
22
|
+
$715f7f2e53146662$var$doHeavyCalculations();
|
|
23
|
+
$8tj43$createEffect(() => {
|
|
24
|
+
// No-one needs information anymore, stop listening
|
|
25
|
+
const users = consumers();
|
|
26
|
+
if (users < 1) {
|
|
27
|
+
$8tj43$dlog("Stopping to listen for mobile hover");
|
|
28
|
+
dispose();
|
|
29
|
+
$715f7f2e53146662$var$elementsHoveredSignal = undefined;
|
|
30
|
+
$715f7f2e53146662$var$consumersSignal = undefined;
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
const [elementsHovered] = $715f7f2e53146662$var$elementsHoveredSignal;
|
|
35
|
+
const [, setConsumers] = $715f7f2e53146662$var$consumersSignal;
|
|
36
|
+
setConsumers(prev => prev + 1);
|
|
37
|
+
$8tj43$onCleanup(() => setConsumers(prev => prev - 1));
|
|
38
|
+
return elementsHovered;
|
|
39
|
+
}
|
|
40
|
+
function $715f7f2e53146662$var$doHeavyCalculations() {
|
|
41
|
+
$8tj43$dlog("Starting to listen for mobile hover");
|
|
42
|
+
const [, setElementsHovered] = $715f7f2e53146662$var$elementsHoveredSignal;
|
|
43
|
+
const elementAtTouch = new Map();
|
|
44
|
+
const updateSet = () => setElementsHovered(new Set([...elementAtTouch.values()].filter(v => v)));
|
|
45
|
+
const setPositionHandler = $8tj43$catchify(evt => {
|
|
46
|
+
for (const touch of evt.changedTouches) elementAtTouch.set(touch.identifier, $715f7f2e53146662$var$getElementAtTouch(touch));
|
|
47
|
+
updateSet();
|
|
48
|
+
});
|
|
49
|
+
const deleteTouchHandler = $8tj43$catchify(evt => {
|
|
50
|
+
for (const touch of evt.changedTouches) elementAtTouch.delete(touch.identifier);
|
|
51
|
+
updateSet();
|
|
52
|
+
});
|
|
53
|
+
addEventListener("touchstart", setPositionHandler, {
|
|
54
|
+
passive: true
|
|
55
|
+
});
|
|
56
|
+
addEventListener("touchmove", setPositionHandler, {
|
|
57
|
+
passive: true
|
|
58
|
+
});
|
|
59
|
+
addEventListener("touchend", deleteTouchHandler, {
|
|
60
|
+
passive: true
|
|
61
|
+
});
|
|
62
|
+
addEventListener("touchcancel", deleteTouchHandler, {
|
|
63
|
+
passive: true
|
|
64
|
+
});
|
|
65
|
+
$8tj43$onCleanup(() => {
|
|
66
|
+
removeEventListener("touchstart", setPositionHandler);
|
|
67
|
+
removeEventListener("touchmove", setPositionHandler);
|
|
68
|
+
removeEventListener("touchend", deleteTouchHandler);
|
|
69
|
+
removeEventListener("touchcancel", deleteTouchHandler);
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
function $715f7f2e53146662$var$getElementAtTouch(touch) {
|
|
73
|
+
return document.elementFromPoint(touch.clientX, touch.clientY);
|
|
74
|
+
}
|
|
14
75
|
function $a35e6f680c5bbc60$export$54299a3c81f5425() {
|
|
15
76
|
const d = document;
|
|
16
77
|
const [isVisible, setIsVisible] = $8tj43$createSignal(d.visibilityState !== "hidden");
|
|
@@ -286,7 +347,7 @@ function $2d7bad8684bc7f44$export$43f0fb951fcb0c54(_ref) {
|
|
|
286
347
|
} catch (e) {
|
|
287
348
|
if (!$2d7bad8684bc7f44$var$printedCloneError) {
|
|
288
349
|
$2d7bad8684bc7f44$var$printedCloneError = true;
|
|
289
|
-
$8tj43$
|
|
350
|
+
$8tj43$dlog1("Can't clone display", display, " (uncloneable objects in it), make sure you don't mutate it in the template since we cache.", e);
|
|
290
351
|
}
|
|
291
352
|
}
|
|
292
353
|
let renderingResult;
|
|
@@ -386,7 +447,7 @@ function $618bd53ea0a41cd4$export$4a14175d33d81a96(_ref) {
|
|
|
386
447
|
};
|
|
387
448
|
// The following sets up an intersection observer to determine which results are in the viewport, used for the ScrollStatus indicator, knowing when to load more and any other consumer of the useProductCardIsVisible hook.
|
|
388
449
|
const shouldObserve = $8tj43$createMemo(() => alwaysObserveCards_ || listenersForIntersecting() > 0);
|
|
389
|
-
const intersection_observer = new IntersectionObserver($8tj43$
|
|
450
|
+
const intersection_observer = new IntersectionObserver($8tj43$catchify1(records => {
|
|
390
451
|
const intersectingValue = currentlyIntersecting();
|
|
391
452
|
for (let i = 0; i < records.length; i++) {
|
|
392
453
|
const record = records[i];
|
|
@@ -755,7 +816,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
755
816
|
const view_less_button_class = "l" + $8tj43$createUniqueId(); // https://github.com/solidjs/solid-docs/issues/263#issuecomment-1622388079
|
|
756
817
|
const view_more_button_container = $8tj43$createMemo(() => have_a_view_more_button() && (() => {
|
|
757
818
|
var _el$2 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
758
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
819
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => set_rows_visible()(prev => {
|
|
759
820
|
var _rows_or_empty_object2;
|
|
760
821
|
return prev + ((_rows_or_empty_object2 = rows_or_empty_object().rows_per_click) !== null && _rows_or_empty_object2 !== void 0 ? _rows_or_empty_object2 : 1);
|
|
761
822
|
})), true);
|
|
@@ -767,7 +828,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
767
828
|
// We need to have duplicate buttons because which ones is shown depends on the number of rows visible and therefore on the viewport size and therefore on the css media queries
|
|
768
829
|
const view_less_button_container = $8tj43$createMemo(() => have_a_view_less_button() && (() => {
|
|
769
830
|
var _el$3 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
770
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
831
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => set_rows_visible()(() => {
|
|
771
832
|
var _rows_or_empty_object3;
|
|
772
833
|
return (_rows_or_empty_object3 = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object3 !== void 0 ? _rows_or_empty_object3 : 1;
|
|
773
834
|
})), true);
|
|
@@ -793,7 +854,7 @@ function $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, container_element) {
|
|
|
793
854
|
}
|
|
794
855
|
update_children_count();
|
|
795
856
|
if (!(0, $8tj43$isServer)) {
|
|
796
|
-
const mutation_observer = new MutationObserver($8tj43$
|
|
857
|
+
const mutation_observer = new MutationObserver($8tj43$catchify1(update_children_count));
|
|
797
858
|
mutation_observer.observe(container_element, {
|
|
798
859
|
childList: true
|
|
799
860
|
});
|
|
@@ -1125,7 +1186,7 @@ function $6db93f70c2db1486$export$2972b890694ced75(callback, _ref) {
|
|
|
1125
1186
|
}
|
|
1126
1187
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
1127
1188
|
const [size, setSize] = $8tj43$createSignal(0);
|
|
1128
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
1189
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => {
|
|
1129
1190
|
for (let j = 0; j < records.length; j++) {
|
|
1130
1191
|
const {
|
|
1131
1192
|
width: width
|
|
@@ -1140,7 +1201,7 @@ function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
|
1140
1201
|
let {
|
|
1141
1202
|
element: element
|
|
1142
1203
|
} = _ref;
|
|
1143
|
-
return requestAnimationFrame($8tj43$
|
|
1204
|
+
return requestAnimationFrame($8tj43$catchify1(() => resizeObserver.observe(element)));
|
|
1144
1205
|
});
|
|
1145
1206
|
$8tj43$onCleanup(() => {
|
|
1146
1207
|
resizeObserver.disconnect();
|
|
@@ -1198,7 +1259,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1198
1259
|
if (existingStack) return existingStack.add(fn);
|
|
1199
1260
|
const newStack = new Set([fn]);
|
|
1200
1261
|
if (listingContext) listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol] = newStack;
|
|
1201
|
-
const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($8tj43$
|
|
1262
|
+
const processStackWhenIdle = () => $6db93f70c2db1486$export$2972b890694ced75($8tj43$catchify1(deadline => {
|
|
1202
1263
|
const start = performance.now();
|
|
1203
1264
|
const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
|
|
1204
1265
|
for (const fn of newStack) {
|
|
@@ -1230,7 +1291,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1230
1291
|
let prevValue;
|
|
1231
1292
|
const aspectRatios = listingContext[$56047603f9d212b6$export$f8945274f08a3105] || (listingContext[$56047603f9d212b6$export$f8945274f08a3105] = new Set());
|
|
1232
1293
|
const [, setMostPrevalentAspectRatio] = listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] || (listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] = $8tj43$createSignal());
|
|
1233
|
-
img.addEventListener("load", $8tj43$
|
|
1294
|
+
img.addEventListener("load", $8tj43$catchify1(() => {
|
|
1234
1295
|
if (props.keyRatioUpdating) {
|
|
1235
1296
|
if (!srcJustChanged) return;
|
|
1236
1297
|
srcJustChanged = false;
|
|
@@ -1264,7 +1325,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1264
1325
|
$8tj43$createEffect(() => {
|
|
1265
1326
|
if (!props.size()) return; // wait until we have a size, run every time the size changes
|
|
1266
1327
|
if (timeoutSet) return;
|
|
1267
|
-
const handler = $8tj43$
|
|
1328
|
+
const handler = $8tj43$catchify1(() => {
|
|
1268
1329
|
if (gotCleanedUp) return;
|
|
1269
1330
|
img.sizes = sizePX(); // use latest available value of props.size
|
|
1270
1331
|
if (!sizeSetFastPath) {
|
|
@@ -1401,11 +1462,11 @@ function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
|
|
|
1401
1462
|
return $8tj43$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1402
1463
|
});
|
|
1403
1464
|
}
|
|
1404
|
-
var $
|
|
1405
|
-
$
|
|
1406
|
-
$
|
|
1407
|
-
$
|
|
1408
|
-
function $
|
|
1465
|
+
var $f84b097e079b0a33$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=img-wrapper>`),
|
|
1466
|
+
$f84b097e079b0a33$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<span class="d-price original">`),
|
|
1467
|
+
$f84b097e079b0a33$var$_tmpl$3 = /*#__PURE__*/$8tj43$template(`<div class=right-part><div class=text-container><span class="d-title line-clamp"></span><span class=d-price></span><!$><!/></div><!$><!/>`),
|
|
1468
|
+
$f84b097e079b0a33$var$_tmpl$4 = /*#__PURE__*/$8tj43$template(`<a class=look-item><!$><!/><!$><!/>`);
|
|
1469
|
+
function $f84b097e079b0a33$export$b73ed90f0ee50dc3(_ref) {
|
|
1409
1470
|
let {
|
|
1410
1471
|
display_: display_,
|
|
1411
1472
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1447,7 +1508,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1447
1508
|
return (_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title;
|
|
1448
1509
|
});
|
|
1449
1510
|
return (() => {
|
|
1450
|
-
var _el$ = $8tj43$getNextElement($
|
|
1511
|
+
var _el$ = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$4),
|
|
1451
1512
|
_el$12 = _el$.firstChild,
|
|
1452
1513
|
[_el$13, _co$3] = $8tj43$getNextMarker(_el$12.nextSibling),
|
|
1453
1514
|
_el$14 = _el$13.nextSibling,
|
|
@@ -1458,7 +1519,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1458
1519
|
href: href()
|
|
1459
1520
|
} : {}, {
|
|
1460
1521
|
get onClick() {
|
|
1461
|
-
return $8tj43$
|
|
1522
|
+
return $8tj43$catchify1(event_ => {
|
|
1462
1523
|
if (enableLink()) {
|
|
1463
1524
|
pseudoRouter_.navigate_.go_to_({
|
|
1464
1525
|
new_url_: href(),
|
|
@@ -1480,7 +1541,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1480
1541
|
});
|
|
1481
1542
|
},
|
|
1482
1543
|
get children() {
|
|
1483
|
-
var _el$2 = $8tj43$getNextElement($
|
|
1544
|
+
var _el$2 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$);
|
|
1484
1545
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Show), {
|
|
1485
1546
|
get when() {
|
|
1486
1547
|
return imageUrl();
|
|
@@ -1515,7 +1576,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1515
1576
|
return (animationEffectExists() ? isExpandedThrottledByOurEffectRun() : userWantsExpanded()) || animationIsRunning();
|
|
1516
1577
|
},
|
|
1517
1578
|
get children() {
|
|
1518
|
-
var _el$3 = $8tj43$getNextElement($
|
|
1579
|
+
var _el$3 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$3),
|
|
1519
1580
|
_el$4 = _el$3.firstChild,
|
|
1520
1581
|
_el$5 = _el$4.firstChild,
|
|
1521
1582
|
_el$6 = _el$5.nextSibling,
|
|
@@ -1552,7 +1613,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1552
1613
|
setAnimationEffectExists(true);
|
|
1553
1614
|
$8tj43$onCleanup(() => setAnimationEffectExists(false));
|
|
1554
1615
|
});
|
|
1555
|
-
for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $8tj43$
|
|
1616
|
+
for (const ev of ["cancel", "finish"]) textContainerAnimation.addEventListener(ev, $8tj43$catchify1(() => setAnimationIsRunning(false)));
|
|
1556
1617
|
disconnector();
|
|
1557
1618
|
}));
|
|
1558
1619
|
}, _el$3);
|
|
@@ -1599,7 +1660,7 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1599
1660
|
return isOnSale();
|
|
1600
1661
|
},
|
|
1601
1662
|
get children() {
|
|
1602
|
-
var _el$7 = $8tj43$getNextElement($
|
|
1663
|
+
var _el$7 = $8tj43$getNextElement($f84b097e079b0a33$var$_tmpl$2);
|
|
1603
1664
|
$8tj43$insert(_el$7, $8tj43$createComponent((0, $8tj43$Show), {
|
|
1604
1665
|
get when() {
|
|
1605
1666
|
return variantToUse() && !originalPrice.loading;
|
|
@@ -1662,7 +1723,7 @@ async function $c4103af154850e50$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1662
1723
|
const waitAFrame = () => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r)));
|
|
1663
1724
|
const timeoutPromise = new Promise(r => {
|
|
1664
1725
|
resolveTimeoutPromise = r;
|
|
1665
|
-
setTimeout($8tj43$
|
|
1726
|
+
setTimeout($8tj43$catchify1(() => {
|
|
1666
1727
|
r();
|
|
1667
1728
|
div.remove();
|
|
1668
1729
|
}), 500);
|
|
@@ -1694,12 +1755,12 @@ async function $c4103af154850e50$var$checkIfIsAffectedByChromeBug326498383() {
|
|
|
1694
1755
|
});
|
|
1695
1756
|
await timeoutPromise;
|
|
1696
1757
|
} catch (e) {
|
|
1697
|
-
$8tj43$
|
|
1758
|
+
$8tj43$dlog1("Failed to check if affected by chrome bug 326498383", e);
|
|
1698
1759
|
}
|
|
1699
1760
|
return isAffected;
|
|
1700
1761
|
}
|
|
1701
|
-
var $
|
|
1702
|
-
function $
|
|
1762
|
+
var $275d06a183ca0a29$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=scroll-padding><div class=look-overlay>`);
|
|
1763
|
+
function $275d06a183ca0a29$export$ebf0b1d4f90c09ae(_ref) {
|
|
1703
1764
|
let {
|
|
1704
1765
|
displays_: displays_,
|
|
1705
1766
|
FavoriteButton_: FavoriteButton_,
|
|
@@ -1719,6 +1780,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1719
1780
|
const textFadeInAnimationRunning = $8tj43$createSignal(false);
|
|
1720
1781
|
const [getSecondPartAnimationRunning] = textFadeInAnimationRunning;
|
|
1721
1782
|
const [userWantsExpanded, setUserWantsExpanded] = userWantsExpandedSignal_;
|
|
1783
|
+
//const elementsHovered = useMobileHover();
|
|
1722
1784
|
$c4103af154850e50$export$7b9a0e99f0aeb2f3().then(is => isAffectedByChromeBug = is);
|
|
1723
1785
|
return $8tj43$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
1724
1786
|
get children() {
|
|
@@ -1727,21 +1789,37 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1727
1789
|
return containerWidth_() || !displays_();
|
|
1728
1790
|
},
|
|
1729
1791
|
get children() {
|
|
1730
|
-
var _el$ = $8tj43$getNextElement($
|
|
1792
|
+
var _el$ = $8tj43$getNextElement($275d06a183ca0a29$var$_tmpl$),
|
|
1731
1793
|
_el$2 = _el$.firstChild;
|
|
1732
|
-
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$
|
|
1733
|
-
$8tj43$addEventListener(_el$2, "mouseenter", $8tj43$
|
|
1734
|
-
$8tj43$use(el =>
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1794
|
+
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify1(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1795
|
+
$8tj43$addEventListener(_el$2, "mouseenter", $8tj43$catchify1(() => supportsHover_() && setUserWantsExpanded(true)));
|
|
1796
|
+
$8tj43$use(el => {
|
|
1797
|
+
$8tj43$createEffect(() => {
|
|
1798
|
+
if (userWantsExpanded()) return;
|
|
1799
|
+
if (isAffectedByChromeBug) {
|
|
1800
|
+
$275d06a183ca0a29$var$scrollingFunctionForChrome(el, 0, animationDuration_);
|
|
1801
|
+
return;
|
|
1802
|
+
}
|
|
1803
|
+
el.scrollTo({
|
|
1804
|
+
top: 0,
|
|
1805
|
+
behavior: "smooth"
|
|
1806
|
+
});
|
|
1743
1807
|
});
|
|
1744
|
-
|
|
1808
|
+
// createEffect(wasOpenedByHover => {
|
|
1809
|
+
// if (supportsHover_()) return;
|
|
1810
|
+
// const hovered = elementsHovered();
|
|
1811
|
+
// checkHovered: {
|
|
1812
|
+
// if (hovered.has(el)) break checkHovered;
|
|
1813
|
+
// for (const element of hovered) {
|
|
1814
|
+
// if (el.contains(element)) break checkHovered;
|
|
1815
|
+
// }
|
|
1816
|
+
// if (wasOpenedByHover) setUserWantsExpanded(false);
|
|
1817
|
+
// return;
|
|
1818
|
+
// }
|
|
1819
|
+
// setUserWantsExpanded(true);
|
|
1820
|
+
// return true;
|
|
1821
|
+
// });
|
|
1822
|
+
}, _el$2);
|
|
1745
1823
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Index), {
|
|
1746
1824
|
get each() {
|
|
1747
1825
|
return displays_() || Array.from({
|
|
@@ -1749,7 +1827,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1749
1827
|
});
|
|
1750
1828
|
},
|
|
1751
1829
|
children: (display, index) => {
|
|
1752
|
-
return $8tj43$createComponent((0, $
|
|
1830
|
+
return $8tj43$createComponent((0, $f84b097e079b0a33$export$b73ed90f0ee50dc3), {
|
|
1753
1831
|
pseudoRouter_: pseudoRouter_,
|
|
1754
1832
|
animationDuration_: animationDuration_,
|
|
1755
1833
|
display_: display,
|
|
@@ -1759,7 +1837,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1759
1837
|
priceFormatting_: priceFormatting_,
|
|
1760
1838
|
outerRef_: el => $8tj43$createEffect(() => {
|
|
1761
1839
|
if (index !== 0) return;
|
|
1762
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
1840
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
1763
1841
|
resizeObserver.observe(el);
|
|
1764
1842
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
1765
1843
|
})
|
|
@@ -1790,11 +1868,11 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1790
1868
|
/**
|
|
1791
1869
|
* Workaround for Chrome bug 326498383, adapted version of https://stackoverflow.com/a/39494245
|
|
1792
1870
|
*/
|
|
1793
|
-
function $
|
|
1871
|
+
function $275d06a183ca0a29$var$scrollingFunctionForChrome(element, targetScrollY, duration) {
|
|
1794
1872
|
let start;
|
|
1795
1873
|
const startingY = element.scrollTop;
|
|
1796
1874
|
const diff = targetScrollY - startingY;
|
|
1797
|
-
const step = $8tj43$
|
|
1875
|
+
const step = $8tj43$catchify1(timestamp => {
|
|
1798
1876
|
if (!start) start = timestamp;
|
|
1799
1877
|
// Elapsed milliseconds since start of scrolling.
|
|
1800
1878
|
const time = timestamp - start;
|
|
@@ -1807,8 +1885,8 @@ function $4089a7972a508539$var$scrollingFunctionForChrome(element, targetScrollY
|
|
|
1807
1885
|
// Bootstrap our animation - it will get called right before next frame shall be rendered.
|
|
1808
1886
|
requestAnimationFrame(step);
|
|
1809
1887
|
}
|
|
1810
|
-
var $
|
|
1811
|
-
function $
|
|
1888
|
+
var $22dd375b476673e2$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=look-card><!$><!/><!$><!/>`);
|
|
1889
|
+
function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
1812
1890
|
let {
|
|
1813
1891
|
display_: display_,
|
|
1814
1892
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
@@ -1826,7 +1904,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1826
1904
|
const index = $1e69163caedaab4e$export$e3faf4d95300054f();
|
|
1827
1905
|
const [containerWidth_, setContainerWidth] = $8tj43$createSignal();
|
|
1828
1906
|
const [containerHeight_, setContainerHeight] = $8tj43$createSignal();
|
|
1829
|
-
const clickHandler = $8tj43$
|
|
1907
|
+
const clickHandler = $8tj43$catchify1(_ref2 => {
|
|
1830
1908
|
let {
|
|
1831
1909
|
target: target
|
|
1832
1910
|
} = _ref2;
|
|
@@ -1868,15 +1946,15 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1868
1946
|
// Close us if another look expands
|
|
1869
1947
|
$8tj43$createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
|
|
1870
1948
|
return (() => {
|
|
1871
|
-
var _el$ = $8tj43$getNextElement($
|
|
1949
|
+
var _el$ = $8tj43$getNextElement($22dd375b476673e2$var$_tmpl$),
|
|
1872
1950
|
_el$2 = _el$.firstChild,
|
|
1873
1951
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
1874
1952
|
_el$4 = _el$3.nextSibling,
|
|
1875
1953
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
1876
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
1954
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => setUserWantsExpanded(prev => !prev)), true);
|
|
1877
1955
|
$8tj43$use(el => {
|
|
1878
1956
|
container = el;
|
|
1879
|
-
const ro = new ResizeObserver($8tj43$
|
|
1957
|
+
const ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
1880
1958
|
const last = records.at(-1);
|
|
1881
1959
|
if (!last) return;
|
|
1882
1960
|
const {
|
|
@@ -1909,7 +1987,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1909
1987
|
});
|
|
1910
1988
|
}
|
|
1911
1989
|
}), _el$3, _co$);
|
|
1912
|
-
$8tj43$insert(_el$, $8tj43$createComponent((0, $
|
|
1990
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $275d06a183ca0a29$export$ebf0b1d4f90c09ae), {
|
|
1913
1991
|
displays_: () => {
|
|
1914
1992
|
var _display_2;
|
|
1915
1993
|
return (_display_2 = display_()) === null || _display_2 === void 0 ? void 0 : _display_2.displays;
|
|
@@ -1983,7 +2061,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
1983
2061
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
1984
2062
|
* @param listing_id_ If you are navigating to a category and know the listing_id of, please provide it. This is for making a better devEx in js-ui
|
|
1985
2063
|
*/
|
|
1986
|
-
go_to_: $8tj43$
|
|
2064
|
+
go_to_: $8tj43$catchify1(async _ref => {
|
|
1987
2065
|
let {
|
|
1988
2066
|
new_url_: raw_new_url,
|
|
1989
2067
|
event_: event_,
|
|
@@ -2209,7 +2287,7 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
2209
2287
|
return $bb34cd283e904784$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
2210
2288
|
});
|
|
2211
2289
|
const sharedOptions = {
|
|
2212
|
-
product_card_template_: display => $
|
|
2290
|
+
product_card_template_: display => $22dd375b476673e2$export$44809a8a3e867e30({
|
|
2213
2291
|
display_: () => display,
|
|
2214
2292
|
FavoriteButton_: props.FavoriteButton_,
|
|
2215
2293
|
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
@@ -2503,9 +2581,9 @@ const $9a693c7e832d3f18$export$b05c0ae390cf3e06 = _ref => {
|
|
|
2503
2581
|
var _selectedDueToKeyboar;
|
|
2504
2582
|
return (_selectedDueToKeyboar = selectedDueToKeyboardNavigation === null || selectedDueToKeyboardNavigation === void 0 ? void 0 : selectedDueToKeyboardNavigation()) !== null && _selectedDueToKeyboar !== void 0 ? _selectedDueToKeyboar : false;
|
|
2505
2583
|
}), _el$4);
|
|
2506
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
2507
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
2508
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
2584
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify1(() => set_selected_index_ === null || set_selected_index_ === void 0 ? void 0 : set_selected_index_()));
|
|
2585
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify1(() => set_selected_index_ === null || set_selected_index_ === void 0 ? void 0 : set_selected_index_([keyboardNavigationGroupIndex_(), index_()])));
|
|
2586
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(event_ => router_.navigate_.go_to_({
|
|
2509
2587
|
new_url_: href(),
|
|
2510
2588
|
is_replace_: false,
|
|
2511
2589
|
event_: event_
|
|
@@ -2634,7 +2712,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
2634
2712
|
// don't wait if it's the first request
|
|
2635
2713
|
write_current_instant_query(value);
|
|
2636
2714
|
clearTimeout(timeout);
|
|
2637
|
-
timeout = setTimeout($8tj43$
|
|
2715
|
+
timeout = setTimeout($8tj43$catchify1(() => write_current_instant_query(value)), 250);
|
|
2638
2716
|
});
|
|
2639
2717
|
const [search_results] = $8tj43$createResource($8tj43$createMemo(() => ({
|
|
2640
2718
|
// <-- key order important, see comment below
|
|
@@ -2642,7 +2720,7 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
2642
2720
|
market: market_(),
|
|
2643
2721
|
locale: i18n_.backend_locale_(),
|
|
2644
2722
|
query: read_current_instant_query()
|
|
2645
|
-
})), $8tj43$
|
|
2723
|
+
})), $8tj43$catchify1(async variable_data => {
|
|
2646
2724
|
return depict_api_.query({
|
|
2647
2725
|
// here it is (unfortunately) important that the keys in the object are in the same order as in SearchPage.tsx, because when JSON-encoding them to compare for caching the strings will be different otherwise
|
|
2648
2726
|
limit: $8tj43$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -2746,7 +2824,7 @@ function $9974e016866745eb$export$c7e181728ad525f(url) {
|
|
|
2746
2824
|
return;
|
|
2747
2825
|
$9974e016866745eb$var$last_sent_value = new_value;
|
|
2748
2826
|
const args = ["depict.send", "pageview", new_value];
|
|
2749
|
-
$8tj43$
|
|
2827
|
+
$8tj43$dlog1("Calling ga with args", ...args);
|
|
2750
2828
|
// @ts-ignore
|
|
2751
2829
|
ga(...args);
|
|
2752
2830
|
}
|
|
@@ -2761,7 +2839,7 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
2761
2839
|
if (process.env.GA === "false") return;
|
|
2762
2840
|
let debounce_timeout;
|
|
2763
2841
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
2764
|
-
const send_to_ga = $8tj43$
|
|
2842
|
+
const send_to_ga = $8tj43$catchify1(() => {
|
|
2765
2843
|
const fake_url = new URL(location.href);
|
|
2766
2844
|
const {
|
|
2767
2845
|
searchParams: searchParams
|
|
@@ -2774,12 +2852,12 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
2774
2852
|
$8tj43$onCleanup(() => {
|
|
2775
2853
|
setTimeout(
|
|
2776
2854
|
// do it next event loop because search_field_value_ is wrong this one and search_query might be too because we want the old value to be put into the history entry and a framework like NextJS might take some time to navigate
|
|
2777
|
-
$8tj43$
|
|
2855
|
+
$8tj43$catchify1(() => {
|
|
2778
2856
|
if ($8tj43$untrack(get_search_query_) === $8tj43$untrack(get_search_field_value_)) stop_timeout();
|
|
2779
2857
|
}));
|
|
2780
2858
|
});
|
|
2781
2859
|
let first_call = true;
|
|
2782
|
-
$8tj43$createEffect($8tj43$
|
|
2860
|
+
$8tj43$createEffect($8tj43$catchify1(() => {
|
|
2783
2861
|
get_search_field_value_();
|
|
2784
2862
|
if (first_call) {
|
|
2785
2863
|
// we only want to do stuff when it changes
|
|
@@ -2808,7 +2886,7 @@ function $558d0596fcf0e0b0$export$50b90be27d8502d9(el, _ref, bottom_distance) {
|
|
|
2808
2886
|
[key]: new_value
|
|
2809
2887
|
});
|
|
2810
2888
|
};
|
|
2811
|
-
const is = new IntersectionObserver($8tj43$
|
|
2889
|
+
const is = new IntersectionObserver($8tj43$catchify1(_records => {
|
|
2812
2890
|
do_positioning();
|
|
2813
2891
|
}), {
|
|
2814
2892
|
threshold: $8tj43$buildThresholdList(100)
|
|
@@ -2830,7 +2908,7 @@ function $e8776b492383c292$export$91c3b6774e8be0f5(_ref) {
|
|
|
2830
2908
|
const [get_current_href, set_current_href] = $8tj43$createSignal(location.href);
|
|
2831
2909
|
const [exit_iterable, exitable_iterable] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
2832
2910
|
$8tj43$onCleanup(exit_iterable);
|
|
2833
|
-
$8tj43$
|
|
2911
|
+
$8tj43$catchify1(async () => {
|
|
2834
2912
|
for await (const href of exitable_iterable)
|
|
2835
2913
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
2836
2914
|
set_current_href(href);
|
|
@@ -2902,18 +2980,18 @@ function $01dd2bfbbae020bc$export$a146ac6fa8346a25(_ref) {
|
|
|
2902
2980
|
_el$9 = _el$5.nextSibling;
|
|
2903
2981
|
$8tj43$use(element => element.addEventListener(
|
|
2904
2982
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
2905
|
-
"click", $8tj43$
|
|
2983
|
+
"click", $8tj43$catchify1(ev => {
|
|
2906
2984
|
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
2907
2985
|
// not button 0 or cmd/ctrl click
|
|
2908
2986
|
return;
|
|
2909
2987
|
ev.preventDefault();
|
|
2910
2988
|
submit_query_(item());
|
|
2911
2989
|
})), _el$4);
|
|
2912
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
2913
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
2990
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
2991
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify1(() => write_selected_index_([0, index])));
|
|
2914
2992
|
$8tj43$insert(_el$5, $8tj43$createComponent((0, $6d95ef50ee01d5a1$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
2915
2993
|
$8tj43$insert(_el$6, item);
|
|
2916
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
2994
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify1(e => {
|
|
2917
2995
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
2918
2996
|
set_unfiltered_previous_searches_(prev => {
|
|
2919
2997
|
const new_value = [...prev];
|
|
@@ -3106,7 +3184,7 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
3106
3184
|
});
|
|
3107
3185
|
return (() => {
|
|
3108
3186
|
var _el$ = $8tj43$getNextElement($b055f9e9aeceeb48$var$_tmpl$);
|
|
3109
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
3187
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify1(ev => {
|
|
3110
3188
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
3111
3189
|
if (is_query()) {
|
|
3112
3190
|
if ($9b35d1384e31813a$export$29d28dadc2d6b631(ev))
|
|
@@ -3123,8 +3201,8 @@ function $b055f9e9aeceeb48$export$e872e2339fb04a7f(_ref) {
|
|
|
3123
3201
|
event_: ev
|
|
3124
3202
|
});
|
|
3125
3203
|
})), _el$);
|
|
3126
|
-
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$
|
|
3127
|
-
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$
|
|
3204
|
+
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$catchify1(() => write_selected_index_(undefined)));
|
|
3205
|
+
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$catchify1(() => write_selected_index_([autocomplete_data_index, index])));
|
|
3128
3206
|
$8tj43$insert(_el$, (() => {
|
|
3129
3207
|
var _c$ = $8tj43$memo(() => !!is_query());
|
|
3130
3208
|
return () => _c$() ? [$8tj43$createComponent((0, $8tj43$Show), {
|
|
@@ -3417,7 +3495,7 @@ function $75e33704f2a83029$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
3417
3495
|
if (!$8tj43$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
3418
3496
|
});
|
|
3419
3497
|
const owner = $8tj43$getOwner();
|
|
3420
|
-
const handler = $8tj43$
|
|
3498
|
+
const handler = $8tj43$catchify1(_ref3 => {
|
|
3421
3499
|
let {
|
|
3422
3500
|
keyCode: keyCode
|
|
3423
3501
|
} = _ref3;
|
|
@@ -3484,7 +3562,7 @@ function $75e33704f2a83029$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
3484
3562
|
const el = element_();
|
|
3485
3563
|
if (!el) return;
|
|
3486
3564
|
el.addEventListener("keyup", handler);
|
|
3487
|
-
$8tj43$onCleanup($8tj43$
|
|
3565
|
+
$8tj43$onCleanup($8tj43$catchify1(() => el.removeEventListener("keyup", handler)));
|
|
3488
3566
|
});
|
|
3489
3567
|
}
|
|
3490
3568
|
function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
@@ -3701,7 +3779,7 @@ let $c3820807ac1e6fd7$export$44dad306455dddf;
|
|
|
3701
3779
|
|
|
3702
3780
|
function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
3703
3781
|
const [width, setWidth] = $8tj43$createSignal();
|
|
3704
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
3782
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => {
|
|
3705
3783
|
for (let j = 0; j < records.length; j++) {
|
|
3706
3784
|
var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
|
|
3707
3785
|
const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
|
|
@@ -3714,7 +3792,7 @@ function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
|
|
|
3714
3792
|
let {
|
|
3715
3793
|
element: element
|
|
3716
3794
|
} = _ref;
|
|
3717
|
-
return requestAnimationFrame($8tj43$
|
|
3795
|
+
return requestAnimationFrame($8tj43$catchify1(() => {
|
|
3718
3796
|
const current_size = what_to_watch.getBoundingClientRect().width;
|
|
3719
3797
|
if (current_size)
|
|
3720
3798
|
// If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
|
|
@@ -3762,7 +3840,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3762
3840
|
let input_element;
|
|
3763
3841
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
3764
3842
|
let field_div;
|
|
3765
|
-
$8tj43$createEffect($8tj43$
|
|
3843
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
3766
3844
|
if (disabled_) return;
|
|
3767
3845
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
3768
3846
|
await (0, $8tj43$observer).wait_for_element(input_element);
|
|
@@ -3783,7 +3861,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3783
3861
|
var _el$ = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$);
|
|
3784
3862
|
$8tj43$spread(_el$, $8tj43$mergeProps({
|
|
3785
3863
|
get onClick() {
|
|
3786
|
-
return $8tj43$
|
|
3864
|
+
return $8tj43$catchify1(on_back_);
|
|
3787
3865
|
},
|
|
3788
3866
|
get ["aria-label"]() {
|
|
3789
3867
|
return i18n_.back_();
|
|
@@ -3813,7 +3891,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3813
3891
|
return isNewModal || !searchFieldEmpty() ? "" : "display: none";
|
|
3814
3892
|
},
|
|
3815
3893
|
get onClick() {
|
|
3816
|
-
return $8tj43$
|
|
3894
|
+
return $8tj43$catchify1(() => {
|
|
3817
3895
|
if (isNewModal && searchFieldEmpty()) return;
|
|
3818
3896
|
setSearchFieldValue("");
|
|
3819
3897
|
clear_filters_(true);
|
|
@@ -3870,7 +3948,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3870
3948
|
field_div = el;
|
|
3871
3949
|
field_element_ref_ === null || field_element_ref_ === void 0 || field_element_ref_(el);
|
|
3872
3950
|
}, _el$5);
|
|
3873
|
-
$8tj43$addEventListener(_el$5, "click", $8tj43$
|
|
3951
|
+
$8tj43$addEventListener(_el$5, "click", $8tj43$catchify1(_ref2 => {
|
|
3874
3952
|
let {
|
|
3875
3953
|
target: target,
|
|
3876
3954
|
currentTarget: currentTarget,
|
|
@@ -3902,7 +3980,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3902
3980
|
} = _ref3;
|
|
3903
3981
|
// When selecting text with a mouse we want a SearchField to be focussed even when releasing the mouse outside the .field element (we assume the event listener which opens the modal is attached to that).
|
|
3904
3982
|
if (pointerType === "mouse") {
|
|
3905
|
-
const handler = $8tj43$
|
|
3983
|
+
const handler = $8tj43$catchify1(_ref4 => {
|
|
3906
3984
|
let {
|
|
3907
3985
|
pointerType: pointerType,
|
|
3908
3986
|
target: target
|
|
@@ -3916,26 +3994,26 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3916
3994
|
$8tj43$runWithOwner(owner_of_field_element, () => $8tj43$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
3917
3995
|
}
|
|
3918
3996
|
};
|
|
3919
|
-
$8tj43$addEventListener(_el$6, "select", $8tj43$
|
|
3997
|
+
$8tj43$addEventListener(_el$6, "select", $8tj43$catchify1(() => {
|
|
3920
3998
|
if (disabled_)
|
|
3921
3999
|
// just in case. The field not actually being disabled when being disabled_ is so that you can focus it and open the modal. We don't want any of the other input-field-interaction features to work
|
|
3922
4000
|
return;
|
|
3923
4001
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
3924
4002
|
// everything was selected, clear filters on next submit on next input
|
|
3925
|
-
input_element.addEventListener("input", $8tj43$
|
|
4003
|
+
input_element.addEventListener("input", $8tj43$catchify1(() => clear_filters_(false)),
|
|
3926
4004
|
// We don't count this as user triggered since it wasn't explicit
|
|
3927
4005
|
{
|
|
3928
4006
|
once: true
|
|
3929
4007
|
});
|
|
3930
4008
|
}));
|
|
3931
|
-
$8tj43$addEventListener(_el$6, "input", $8tj43$
|
|
4009
|
+
$8tj43$addEventListener(_el$6, "input", $8tj43$catchify1(() => {
|
|
3932
4010
|
const {
|
|
3933
4011
|
value: value
|
|
3934
4012
|
} = input_element;
|
|
3935
4013
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
3936
4014
|
setSearchFieldValue(value);
|
|
3937
4015
|
}), true);
|
|
3938
|
-
$8tj43$addEventListener(_el$6, "keydown", $8tj43$
|
|
4016
|
+
$8tj43$addEventListener(_el$6, "keydown", $8tj43$catchify1(e => {
|
|
3939
4017
|
if (disabled_) {
|
|
3940
4018
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
3941
4019
|
// alow tab-selecting the input field and then open the modal when the user start writing but also to move past the field with tab
|
|
@@ -3945,7 +4023,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3945
4023
|
if (!dont_submit) submit_query_();
|
|
3946
4024
|
}
|
|
3947
4025
|
}), true);
|
|
3948
|
-
var _ref$2 = $8tj43$
|
|
4026
|
+
var _ref$2 = $8tj43$catchify1(el => {
|
|
3949
4027
|
input_element = el;
|
|
3950
4028
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
3951
4029
|
});
|
|
@@ -3957,7 +4035,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3957
4035
|
when: !isNewModal,
|
|
3958
4036
|
get children() {
|
|
3959
4037
|
var _el$11 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$4);
|
|
3960
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
4038
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
3961
4039
|
$8tj43$insert(_el$11, $8tj43$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {}));
|
|
3962
4040
|
$8tj43$effect(() => $8tj43$setAttribute(_el$11, "aria-label", i18n_.search_submit_button_aria_label_()));
|
|
3963
4041
|
$8tj43$runHydrationEvents();
|
|
@@ -3994,18 +4072,18 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
3994
4072
|
offset: 0
|
|
3995
4073
|
}, 1);
|
|
3996
4074
|
animation.pause();
|
|
3997
|
-
const fn = $8tj43$
|
|
4075
|
+
const fn = $8tj43$catchify1(animation.play.bind(animation));
|
|
3998
4076
|
cleanup_fns.push(fn);
|
|
3999
4077
|
$8tj43$onCleanup(fn);
|
|
4000
4078
|
} catch (e) {
|
|
4001
|
-
$8tj43$
|
|
4079
|
+
$8tj43$dlog1("Probably partial keyframe error", e);
|
|
4002
4080
|
}
|
|
4003
4081
|
if (getComputedStyle(element).overflow !== "hidden") {
|
|
4004
4082
|
// safari gets special hacky treatment
|
|
4005
4083
|
const style = element.style;
|
|
4006
4084
|
const original_value = style.overflow;
|
|
4007
4085
|
style.overflow = "hidden";
|
|
4008
|
-
const fn = $8tj43$
|
|
4086
|
+
const fn = $8tj43$catchify1(() => style.overflow = original_value);
|
|
4009
4087
|
cleanup_fns.push(fn);
|
|
4010
4088
|
$8tj43$onCleanup(fn);
|
|
4011
4089
|
}
|
|
@@ -4028,8 +4106,8 @@ function $a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal, search_query_url
|
|
|
4028
4106
|
let set_initial_values = false;
|
|
4029
4107
|
let old_pathname;
|
|
4030
4108
|
let old_param_value;
|
|
4031
|
-
$8tj43$onCleanup($8tj43$
|
|
4032
|
-
$8tj43$
|
|
4109
|
+
$8tj43$onCleanup($8tj43$catchify1(exit_iterable));
|
|
4110
|
+
$8tj43$catchify1(async () => {
|
|
4033
4111
|
for await (const href of exitable_iterable) {
|
|
4034
4112
|
const u_o = new URL(href);
|
|
4035
4113
|
const new_pathname = u_o.pathname;
|
|
@@ -4101,7 +4179,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4101
4179
|
} = alignmentSignals_ || {};
|
|
4102
4180
|
const [bodyAlignmentStyle] = bodyAlignmentSignal;
|
|
4103
4181
|
const [get_modal_search_results, set_modal_search_results_] = $8tj43$createSignal();
|
|
4104
|
-
const close_on_escape_handler = $8tj43$
|
|
4182
|
+
const close_on_escape_handler = $8tj43$catchify1(_ref2 => {
|
|
4105
4183
|
let {
|
|
4106
4184
|
key: key
|
|
4107
4185
|
} = _ref2;
|
|
@@ -4127,7 +4205,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4127
4205
|
const DiscoverMoreSection = () => (() => {
|
|
4128
4206
|
var _el$ = $8tj43$getNextElement($40411f2ec772c376$var$_tmpl$),
|
|
4129
4207
|
_el$2 = _el$.firstChild;
|
|
4130
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
4208
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
4131
4209
|
$8tj43$insert(_el$2, (() => {
|
|
4132
4210
|
var _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
4133
4211
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -4142,7 +4220,7 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4142
4220
|
if (disable_scrolling_) $e56d241d0f33d459$export$fe334901e8bebd57();
|
|
4143
4221
|
$a82a41ab7188eda2$export$93d9bfd0c9c1a5b8(close_modal_, search_query_url_param_name_);
|
|
4144
4222
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
4145
|
-
$8tj43$onCleanup($8tj43$
|
|
4223
|
+
$8tj43$onCleanup($8tj43$catchify1(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
4146
4224
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
4147
4225
|
$a09bb7c652acf957$export$3340fdd8259bd4fd({
|
|
4148
4226
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -4197,14 +4275,14 @@ function $40411f2ec772c376$var$RawClassicSearchModal(_ref) {
|
|
|
4197
4275
|
[_el$16, _co$5] = $8tj43$getNextMarker(_el$15.nextSibling),
|
|
4198
4276
|
_el$17 = _el$5.nextSibling,
|
|
4199
4277
|
[_el$18, _co$6] = $8tj43$getNextMarker(_el$17.nextSibling);
|
|
4200
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
4278
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(_ref3 => {
|
|
4201
4279
|
let {
|
|
4202
4280
|
target: target
|
|
4203
4281
|
} = _ref3;
|
|
4204
4282
|
if (target === modal_element) close_modal_();
|
|
4205
4283
|
}), true);
|
|
4206
4284
|
$8tj43$insert(_el$5, search_field, _el$14, _co$4);
|
|
4207
|
-
$8tj43$use(el => $8tj43$
|
|
4285
|
+
$8tj43$use(el => $8tj43$catchify1((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_), _el$6);
|
|
4208
4286
|
$8tj43$insert(_el$6, $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
4209
4287
|
severity_: "error",
|
|
4210
4288
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -4410,7 +4488,7 @@ function $2855bffe06ef7a03$var$decode_filter_data(op, encoded_data) {
|
|
|
4410
4488
|
try {
|
|
4411
4489
|
return JSON.parse($8tj43$base64_decode_unicode(encoded_data));
|
|
4412
4490
|
} catch (e) {
|
|
4413
|
-
$8tj43$
|
|
4491
|
+
$8tj43$dlog1("Failed to fallback parse filter data", op, encoded_data, e);
|
|
4414
4492
|
}
|
|
4415
4493
|
return null;
|
|
4416
4494
|
}
|
|
@@ -4471,7 +4549,7 @@ function $2855bffe06ef7a03$export$766e9676e74997d3(search_params, sorting_query_
|
|
|
4471
4549
|
field: encoded_sorting.slice(0, -$2855bffe06ef7a03$var$descending_token.length),
|
|
4472
4550
|
order: "desc"
|
|
4473
4551
|
};
|
|
4474
|
-
$8tj43$
|
|
4552
|
+
$8tj43$dlog1("Invalid sorting query param value", encoded_sorting);
|
|
4475
4553
|
return;
|
|
4476
4554
|
}
|
|
4477
4555
|
function $2855bffe06ef7a03$export$916e6850778505f6(search_params, filter_query_param_prefix, sorting_query_param) {
|
|
@@ -4549,7 +4627,7 @@ function $52efc9ae4382e25a$export$5646050d516e06bc(_ref) {
|
|
|
4549
4627
|
},
|
|
4550
4628
|
get children() {
|
|
4551
4629
|
var _el$2 = $8tj43$getNextElement($52efc9ae4382e25a$var$_tmpl$2);
|
|
4552
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
4630
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(ev => router_.navigate_.go_to_({
|
|
4553
4631
|
new_url_: href(),
|
|
4554
4632
|
is_replace_: false,
|
|
4555
4633
|
event_: ev,
|
|
@@ -4616,7 +4694,7 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4616
4694
|
return href();
|
|
4617
4695
|
},
|
|
4618
4696
|
get onClick() {
|
|
4619
|
-
return $8tj43$
|
|
4697
|
+
return $8tj43$catchify1(ev => href() && router_.navigate_.go_to_({
|
|
4620
4698
|
new_url_: href(),
|
|
4621
4699
|
is_replace_: false,
|
|
4622
4700
|
event_: ev,
|
|
@@ -4647,8 +4725,8 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4647
4725
|
[_el$8, _co$2] = $8tj43$getNextMarker(_el$7.nextSibling),
|
|
4648
4726
|
_el$4 = _el$8.nextSibling;
|
|
4649
4727
|
$8tj43$use(element => $d0883254246d3eb6$export$12761f53d7ab7f27(element, selectedDueToKeyboardNavigation), _el$2);
|
|
4650
|
-
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$
|
|
4651
|
-
$8tj43$addEventListener(_el$2, "mouseover", $8tj43$
|
|
4728
|
+
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
4729
|
+
$8tj43$addEventListener(_el$2, "mouseover", $8tj43$catchify1(_ref2 => {
|
|
4652
4730
|
let {
|
|
4653
4731
|
target: target
|
|
4654
4732
|
} = _ref2;
|
|
@@ -4908,7 +4986,7 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
4908
4986
|
var _el$7 = $8tj43$getNextElement($5175a47d13b7c228$var$_tmpl$2);
|
|
4909
4987
|
$8tj43$use(element => {
|
|
4910
4988
|
$d0883254246d3eb6$export$12761f53d7ab7f27(element, selectedDueToKeyboardNavigation);
|
|
4911
|
-
element.addEventListener("click", $8tj43$
|
|
4989
|
+
element.addEventListener("click", $8tj43$catchify1(ev => {
|
|
4912
4990
|
// Viskan's Oscar Jacobson site requires us to add the event listener normally here. They do too much when this element is clicked. We work around it by blocking the event and just dispatching it non-bubbling on this element.
|
|
4913
4991
|
const itemContents = item();
|
|
4914
4992
|
if ("page_url_" in itemContents) {
|
|
@@ -4924,8 +5002,8 @@ function $5175a47d13b7c228$export$d4994a86c6235f72(_ref) {
|
|
|
4924
5002
|
submit_query_(itemContents.title_);
|
|
4925
5003
|
}));
|
|
4926
5004
|
}, _el$7);
|
|
4927
|
-
$8tj43$addEventListener(_el$7, "mouseleave", $8tj43$
|
|
4928
|
-
$8tj43$addEventListener(_el$7, "mouseenter", $8tj43$
|
|
5005
|
+
$8tj43$addEventListener(_el$7, "mouseleave", $8tj43$catchify1(() => write_selected_index_()));
|
|
5006
|
+
$8tj43$addEventListener(_el$7, "mouseenter", $8tj43$catchify1(() => write_selected_index_([itemIndex_(), index])));
|
|
4929
5007
|
$8tj43$insert(_el$7, $8tj43$createComponent((0, $02b6641aa50ce528$export$ba17c5b7e6dda39f), {
|
|
4930
5008
|
class_: "title line-clamp",
|
|
4931
5009
|
get whole_text_to_display_() {
|
|
@@ -5048,7 +5126,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5048
5126
|
},
|
|
5049
5127
|
extraTitleRowElements_: () => (() => {
|
|
5050
5128
|
var _el$ = $8tj43$getNextElement($4acc866f8fdfc002$var$_tmpl$);
|
|
5051
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
5129
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => set_unfiltered_previous_searches_([])), true);
|
|
5052
5130
|
$8tj43$insert(_el$, () => i18n_.clear_all_from_filter_crumbs_());
|
|
5053
5131
|
$8tj43$runHydrationEvents();
|
|
5054
5132
|
return _el$;
|
|
@@ -5199,7 +5277,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5199
5277
|
const random_classname_body = $8tj43$make_random_classname();
|
|
5200
5278
|
const backdropRandomClassname = $8tj43$make_random_classname();
|
|
5201
5279
|
const [get_modal_search_results_, set_modal_search_results_] = $8tj43$createSignal();
|
|
5202
|
-
const close_on_escape_handler = $8tj43$
|
|
5280
|
+
const close_on_escape_handler = $8tj43$catchify1(evt => {
|
|
5203
5281
|
if (evt.key === "Escape") {
|
|
5204
5282
|
evt.preventDefault(); // Prevent the browser from closing/cancelling the modal so our animations have time to run
|
|
5205
5283
|
close_modal_();
|
|
@@ -5302,7 +5380,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5302
5380
|
$8tj43$createEffect($8tj43$on(get_search_field_value_, () => {
|
|
5303
5381
|
setShowStaleListingSuggestions(true);
|
|
5304
5382
|
clearTimeout(listingSuggestionsDebounceTimeout);
|
|
5305
|
-
listingSuggestionsDebounceTimeout = setTimeout($8tj43$
|
|
5383
|
+
listingSuggestionsDebounceTimeout = setTimeout($8tj43$catchify1(() => setShowStaleListingSuggestions(false)), 350);
|
|
5306
5384
|
}, {
|
|
5307
5385
|
defer: true
|
|
5308
5386
|
}));
|
|
@@ -5440,7 +5518,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5440
5518
|
const discoverMoreSection = (() => {
|
|
5441
5519
|
var _el$7 = $8tj43$getNextElement($06fcd2a345efd24d$var$_tmpl$4),
|
|
5442
5520
|
_el$8 = _el$7.firstChild;
|
|
5443
|
-
$8tj43$addEventListener(_el$8, "click", $8tj43$
|
|
5521
|
+
$8tj43$addEventListener(_el$8, "click", $8tj43$catchify1(() => submit_query_()), true);
|
|
5444
5522
|
$8tj43$insert(_el$8, (() => {
|
|
5445
5523
|
var _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
5446
5524
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -5473,7 +5551,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5473
5551
|
}
|
|
5474
5552
|
});
|
|
5475
5553
|
if (setSearchFieldOuterWidth_) {
|
|
5476
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
5554
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setSearchFieldOuterWidth_(records.at(-1).contentRect.width)));
|
|
5477
5555
|
resizeObserver.observe(search_field);
|
|
5478
5556
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
5479
5557
|
}
|
|
@@ -5515,7 +5593,7 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5515
5593
|
_el$13 = _el$15.nextSibling,
|
|
5516
5594
|
_el$16 = _el$12.nextSibling,
|
|
5517
5595
|
[_el$17, _co$3] = $8tj43$getNextMarker(_el$16.nextSibling);
|
|
5518
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
5596
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(_ref3 => {
|
|
5519
5597
|
let {
|
|
5520
5598
|
target: target,
|
|
5521
5599
|
currentTarget: currentTarget
|
|
@@ -5524,13 +5602,13 @@ function $06fcd2a345efd24d$var$RawSearchModalV2(_ref) {
|
|
|
5524
5602
|
}), true);
|
|
5525
5603
|
$8tj43$use(element => {
|
|
5526
5604
|
// We don't have contained queries in JS so use ResizeObserver instead. This is so that the modal automatically assumes a mobile layout when aligning with a short SearchField.
|
|
5527
|
-
const resizeObserver = new ResizeObserver($8tj43$
|
|
5605
|
+
const resizeObserver = new ResizeObserver($8tj43$catchify1(records => setModalBodyWidth(records.at(-1).contentRect.width)));
|
|
5528
5606
|
resizeObserver.observe(element);
|
|
5529
5607
|
$8tj43$onCleanup(() => resizeObserver.disconnect());
|
|
5530
5608
|
}, _el$12);
|
|
5531
5609
|
$8tj43$insert(_el$12, search_field, _el$15, _co$2);
|
|
5532
5610
|
$8tj43$use(el => {
|
|
5533
|
-
$8tj43$
|
|
5611
|
+
$8tj43$catchify1((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, bodyAlignmentSignal, bottom_distance_under_modal_ || (() => 0.03 // 3% under SearchModalV2 by default
|
|
5534
5612
|
));
|
|
5535
5613
|
// Workaround part 2 of https://github.com/solidjs/solid/issues/2030
|
|
5536
5614
|
// We can't just re-render the components in the two different <Show> branches because <Show> would infinite loop because it depends on the resource created by the components
|
|
@@ -5608,7 +5686,7 @@ function $6a439680ae7e9ba3$var$ActualTabs(props) {
|
|
|
5608
5686
|
});
|
|
5609
5687
|
const isSelected = $8tj43$createSelector(currentlySelected);
|
|
5610
5688
|
const owner = $8tj43$getOwner();
|
|
5611
|
-
const updateTabsSignal = $8tj43$
|
|
5689
|
+
const updateTabsSignal = $8tj43$catchify(() => $8tj43$runWithOwner(owner, () => setTabsReactive([...ourTabsSet])));
|
|
5612
5690
|
const ourTabsSet = $6a439680ae7e9ba3$var$useTabs();
|
|
5613
5691
|
const location = $8tj43$use_href_accessor1();
|
|
5614
5692
|
const linkWithChangedHash = hash => {
|
|
@@ -5743,7 +5821,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
|
|
|
5743
5821
|
async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_opts, parent) {
|
|
5744
5822
|
const body = parent || document.body || (await (0, $8tj43$observer).wait_for_element("body"));
|
|
5745
5823
|
let dispose_and_remove;
|
|
5746
|
-
const open_modal_ = $8tj43$
|
|
5824
|
+
const open_modal_ = $8tj43$catchify1(async function () {
|
|
5747
5825
|
let extra_options_for_modal = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
5748
5826
|
let on_dispose = arguments.length > 1 ? arguments[1] : undefined;
|
|
5749
5827
|
// Below await is very intentional,
|
|
@@ -5778,7 +5856,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5778
5856
|
actually_close();else if (!animation_started && closing_animation) {
|
|
5779
5857
|
var _catchify;
|
|
5780
5858
|
animation_started = +new Date();
|
|
5781
|
-
(_catchify = $8tj43$
|
|
5859
|
+
(_catchify = $8tj43$catchify1(closing_animation)()) === null || _catchify === void 0 || _catchify.then($8tj43$catchify1(actually_close));
|
|
5782
5860
|
} else actually_close();
|
|
5783
5861
|
};
|
|
5784
5862
|
return search_modal({
|
|
@@ -5791,7 +5869,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5791
5869
|
});
|
|
5792
5870
|
body.append(...modal_els);
|
|
5793
5871
|
});
|
|
5794
|
-
const close_modal_ = $8tj43$
|
|
5872
|
+
const close_modal_ = $8tj43$catchify1(() => {
|
|
5795
5873
|
if (dispose_and_remove) {
|
|
5796
5874
|
// modal is open
|
|
5797
5875
|
const dispose_fn = dispose_and_remove;
|
|
@@ -5808,7 +5886,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
5808
5886
|
function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, router_) {
|
|
5809
5887
|
const signals = {};
|
|
5810
5888
|
const entries = Object.entries(params_to_default_value);
|
|
5811
|
-
const event_handler = $8tj43$
|
|
5889
|
+
const event_handler = $8tj43$catchify1((what_happened, args) => {
|
|
5812
5890
|
// Intentionally always update our signals to the history state to allow external control of SDK state for doing things like https://linear.app/depictai/issue/X-1432/is-this-possible-with-the-depict-sdk
|
|
5813
5891
|
if (what_happened !== "popstate") return;
|
|
5814
5892
|
// Had to undo the comment above,but leaving the history. Doing this because discovering why it doesn't work is a deja-vu and I don't want to have to discover it again.
|
|
@@ -5840,8 +5918,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
|
|
|
5840
5918
|
});
|
|
5841
5919
|
// history_dot_state_to_state needs to update after its signals after url_state does BUT in the same task (might even have to be in the same tick in the microtask queue). If we'd use window.addEventListener("popstate") it would be guaranteed to be too late since each event listener has its own task
|
|
5842
5920
|
(0, $8tj43$instant_exec_on_suspect_history_change).add(event_handler);
|
|
5843
|
-
$8tj43$onCleanup($8tj43$
|
|
5844
|
-
$8tj43$createEffect($8tj43$
|
|
5921
|
+
$8tj43$onCleanup($8tj43$catchify1(() => (0, $8tj43$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
5922
|
+
$8tj43$createEffect($8tj43$catchify1(() => $8tj43$untrack($8tj43$catchify1(() => $972f6bce0f9d61be$var$history_state_change(signals, entries, history.state))))); // we need this to run after reading the initial state from history.state to write the defaults to history.state
|
|
5845
5923
|
return signals;
|
|
5846
5924
|
}
|
|
5847
5925
|
function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
@@ -5999,7 +6077,7 @@ function $0706a7702baafc06$export$6b35356958ae5587(props) {
|
|
|
5999
6077
|
// If someone clicks on a product card in the shop the look modal, close the modal the next time the href changes
|
|
6000
6078
|
for (const item of resolved()) {
|
|
6001
6079
|
if (!(item instanceof Element)) return;
|
|
6002
|
-
item.addEventListener("click", $8tj43$
|
|
6080
|
+
item.addEventListener("click", $8tj43$catchify1(() =>
|
|
6003
6081
|
// run with modal owner so we don't do stuff after the modal closes
|
|
6004
6082
|
// can't have the owner of the product card as that gets disposed if the productId changes which might be too early (before location.href has changed)
|
|
6005
6083
|
$8tj43$runWithOwner(props.modalOwner_, () => $8tj43$createEffect($8tj43$on(hrefWithoutHash, props.actually_close_modal_, {
|
|
@@ -6125,7 +6203,7 @@ function $d2a67555f75bef95$export$a3cbef418994a664(props) {
|
|
|
6125
6203
|
var _el$ = $8tj43$getNextElement($d2a67555f75bef95$var$_tmpl$3),
|
|
6126
6204
|
_el$2 = _el$.firstChild,
|
|
6127
6205
|
_el$3 = _el$2.nextSibling;
|
|
6128
|
-
var _ref$ = $8tj43$
|
|
6206
|
+
var _ref$ = $8tj43$catchify1(element => {
|
|
6129
6207
|
const disconnect = (0, $8tj43$observer).onexists(element, _ref => {
|
|
6130
6208
|
let {
|
|
6131
6209
|
element: element
|
|
@@ -6312,7 +6390,7 @@ function $6b0fd8fd20df8ccf$var$actualSetupModal() {
|
|
|
6312
6390
|
(0, $68e6625c8d51f847$export$3064e1e8c6513da3).add(history_key);
|
|
6313
6391
|
const actually_close_modal_ = () => set_history_value(false);
|
|
6314
6392
|
const owner = $8tj43$getOwner();
|
|
6315
|
-
$8tj43$
|
|
6393
|
+
$8tj43$catchify1(async () => {
|
|
6316
6394
|
const {
|
|
6317
6395
|
open_modal_: open_modal_,
|
|
6318
6396
|
close_modal_: close_modal_
|
|
@@ -6392,15 +6470,15 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6392
6470
|
$8tj43$insert(details_, [summary_, $8tj43$createComponent(ExpandingContainer, {
|
|
6393
6471
|
children: children
|
|
6394
6472
|
})], null);
|
|
6395
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$
|
|
6396
|
-
$8tj43$createEffect($8tj43$
|
|
6473
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$catchify1(() => set_is_in_dom(true)));
|
|
6474
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
6397
6475
|
const is_open = is_open_memo();
|
|
6398
6476
|
if (!is_in_dom())
|
|
6399
6477
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
6400
6478
|
return;
|
|
6401
6479
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
6402
6480
|
timeout_started = true;
|
|
6403
|
-
setTimeout($8tj43$
|
|
6481
|
+
setTimeout($8tj43$catchify1(() => fresh_component = false));
|
|
6404
6482
|
}
|
|
6405
6483
|
if (is_open) {
|
|
6406
6484
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -6408,10 +6486,10 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6408
6486
|
await expand(0, do_duration);
|
|
6409
6487
|
} else {
|
|
6410
6488
|
const animation = await collapse();
|
|
6411
|
-
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$
|
|
6489
|
+
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$catchify1(() => details_.open = false));
|
|
6412
6490
|
}
|
|
6413
6491
|
}));
|
|
6414
|
-
details_.addEventListener("toggle", $8tj43$
|
|
6492
|
+
details_.addEventListener("toggle", $8tj43$catchify1(() => {
|
|
6415
6493
|
const {
|
|
6416
6494
|
open: open
|
|
6417
6495
|
} = details_;
|
|
@@ -6421,11 +6499,11 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
6421
6499
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
6422
6500
|
);
|
|
6423
6501
|
|
|
6424
|
-
summary_.addEventListener("click", $8tj43$
|
|
6502
|
+
summary_.addEventListener("click", $8tj43$catchify1(ev => {
|
|
6425
6503
|
ev.preventDefault();
|
|
6426
6504
|
toggle();
|
|
6427
6505
|
}));
|
|
6428
|
-
summary_.addEventListener("keydown", $8tj43$
|
|
6506
|
+
summary_.addEventListener("keydown", $8tj43$catchify1(ev => {
|
|
6429
6507
|
const {
|
|
6430
6508
|
key: key
|
|
6431
6509
|
} = ev;
|
|
@@ -6465,7 +6543,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6465
6543
|
} = _ref;
|
|
6466
6544
|
let close_toast_;
|
|
6467
6545
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
6468
|
-
$8tj43$
|
|
6546
|
+
$8tj43$catchify1(async () => {
|
|
6469
6547
|
const closing_animation_duration = 300; // ms
|
|
6470
6548
|
const element = (() => {
|
|
6471
6549
|
var _el$ = $8tj43$getNextElement($a61a2051e15c8d7a$var$_tmpl$);
|
|
@@ -6476,8 +6554,8 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6476
6554
|
})();
|
|
6477
6555
|
const [, set_is_showing_toast] = $a61a2051e15c8d7a$export$22970a0140fc759c;
|
|
6478
6556
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
6479
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$
|
|
6480
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$
|
|
6557
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$catchify1(() => closing_animation.pause()));
|
|
6558
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$catchify1(() => closing_animation.play()));
|
|
6481
6559
|
const body = await (0, $8tj43$observer).wait_for_element("body");
|
|
6482
6560
|
const x_translate = "translateX(-50%) ";
|
|
6483
6561
|
let remove_keyboard_listener;
|
|
@@ -6502,7 +6580,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
6502
6580
|
// let other toasts close us if they open while we're still here
|
|
6503
6581
|
$a61a2051e15c8d7a$var$closing_functions.add(close_toast_);
|
|
6504
6582
|
set_is_showing_toast(true);
|
|
6505
|
-
const handler = $8tj43$
|
|
6583
|
+
const handler = $8tj43$catchify1(_ref2 => {
|
|
6506
6584
|
let {
|
|
6507
6585
|
key: key
|
|
6508
6586
|
} = _ref2;
|
|
@@ -6615,7 +6693,7 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
6615
6693
|
var _el$2 = $8tj43$getNextElement($b4465d8d605f61e9$var$_tmpl$2),
|
|
6616
6694
|
_el$3 = _el$2.firstChild,
|
|
6617
6695
|
_el$4 = _el$3.nextSibling;
|
|
6618
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
6696
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => {
|
|
6619
6697
|
set_selected_filters(previous_selected_filters);
|
|
6620
6698
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
6621
6699
|
if (previousExpandedFilters) expanded_filters_ === null || expanded_filters_ === void 0 || expanded_filters_[1](previousExpandedFilters);
|
|
@@ -6693,7 +6771,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6693
6771
|
get children() {
|
|
6694
6772
|
return [(() => {
|
|
6695
6773
|
var _el$6 = $8tj43$getNextElement($4711a82d08d2021b$var$_tmpl$);
|
|
6696
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
6774
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify1(() =>
|
|
6697
6775
|
// click event handlers don't have an owner, carry it over
|
|
6698
6776
|
$8tj43$runWithOwner(owner, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
6699
6777
|
selected_filters_: selected_filters_,
|
|
@@ -6888,7 +6966,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6888
6966
|
_el$28 = _el$26.firstChild,
|
|
6889
6967
|
[_el$29, _co$10] = $8tj43$getNextMarker(_el$28.nextSibling),
|
|
6890
6968
|
_el$27 = _el$29.nextSibling;
|
|
6891
|
-
$8tj43$addEventListener(_el$26, "click", $8tj43$
|
|
6969
|
+
$8tj43$addEventListener(_el$26, "click", $8tj43$catchify1(() => {
|
|
6892
6970
|
const to_remove = selected_data();
|
|
6893
6971
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
6894
6972
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -6944,9 +7022,9 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
6944
7022
|
});
|
|
6945
7023
|
const [is_in_dom, set_is_in_dom] = $8tj43$createSignal(document.documentElement.contains(outmost_element));
|
|
6946
7024
|
const hidden = $8tj43$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
6947
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$
|
|
7025
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$catchify1(() => set_is_in_dom(true)));
|
|
6948
7026
|
outmost_element.classList.add("selected-filters");
|
|
6949
|
-
$8tj43$createEffect($8tj43$
|
|
7027
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
6950
7028
|
if (!is_in_dom())
|
|
6951
7029
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
6952
7030
|
return;
|
|
@@ -6984,7 +7062,7 @@ const $19e828709c7723a0$export$48513f6b9f8ce62d = props => {
|
|
|
6984
7062
|
// The reason for that being that we re-use the checkboxes. That means if one box was unchecked by the user and then removed, the "checked" value of "another" checkbox (that now had position 0) had changed to 0 (because the user unchecked the box with position 0) while solid js still believed that it was checked because it's checked signal hadn't changed.
|
|
6985
7063
|
// I've worked around this by restoring the state of the checkbox to what it is in solid js a bit after it was changed
|
|
6986
7064
|
// Why it can't be done instantaneously I don't know.
|
|
6987
|
-
input_el.addEventListener("change", $8tj43$
|
|
7065
|
+
input_el.addEventListener("change", $8tj43$catchify1(() => requestAnimationFrame($8tj43$catchify1(() => {
|
|
6988
7066
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
6989
7067
|
}))));
|
|
6990
7068
|
(_props$input_ref_ = props.input_ref_) === null || _props$input_ref_ === void 0 || _props$input_ref_.call(props, input_el);
|
|
@@ -7047,7 +7125,7 @@ function $3e850b2f2cca761f$export$ca21a16d65b3dd8(_ref) {
|
|
|
7047
7125
|
_el$3 = _el$.firstChild,
|
|
7048
7126
|
[_el$4, _co$] = $8tj43$getNextMarker(_el$3.nextSibling),
|
|
7049
7127
|
_el$2 = _el$4.nextSibling;
|
|
7050
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
7128
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => set_show_extras(p => !p)), true);
|
|
7051
7129
|
$8tj43$insert(_el$, $8tj43$createComponent((0, $ff3225aef892a467$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
7052
7130
|
$8tj43$insert(_el$2, (() => {
|
|
7053
7131
|
var _c$ = $8tj43$memo(() => !!get_show_extras());
|
|
@@ -7168,7 +7246,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
7168
7246
|
}) : []);
|
|
7169
7247
|
});
|
|
7170
7248
|
$8tj43$onCleanup(() => set_view_more_button_below_group_());
|
|
7171
|
-
$8tj43$createEffect($8tj43$
|
|
7249
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
7172
7250
|
if (!togglable_rest()) {
|
|
7173
7251
|
await collapse();
|
|
7174
7252
|
return;
|
|
@@ -7181,7 +7259,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
7181
7259
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
7182
7260
|
_el$4 = _el$3.nextSibling,
|
|
7183
7261
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
7184
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
7262
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify1(() => {
|
|
7185
7263
|
const set_filter = existing_filter();
|
|
7186
7264
|
const {
|
|
7187
7265
|
field: field,
|
|
@@ -7270,7 +7348,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
7270
7348
|
_el$9 = _el$3.nextSibling,
|
|
7271
7349
|
[_el$10, _co$2] = $8tj43$getNextMarker(_el$9.nextSibling);
|
|
7272
7350
|
$8tj43$setAttribute(_el$2, "for", random_selector);
|
|
7273
|
-
$8tj43$addEventListener(_el$4, "change", $8tj43$
|
|
7351
|
+
$8tj43$addEventListener(_el$4, "change", $8tj43$catchify1(() => {
|
|
7274
7352
|
const filter_object = {
|
|
7275
7353
|
op: filter_().op,
|
|
7276
7354
|
field: filter_().field,
|
|
@@ -7365,7 +7443,7 @@ function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
|
|
|
7365
7443
|
});
|
|
7366
7444
|
$8tj43$createComputed(() => {
|
|
7367
7445
|
clearTimeout(debounce_timeout);
|
|
7368
|
-
debounce_timeout = setTimeout($8tj43$
|
|
7446
|
+
debounce_timeout = setTimeout($8tj43$catchify1(range => $8tj43$untrack(() => {
|
|
7369
7447
|
const default_data = defaultRange();
|
|
7370
7448
|
const filter_object = {
|
|
7371
7449
|
op: filter_().op,
|
|
@@ -7444,22 +7522,22 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
|
|
|
7444
7522
|
[_el$22, _co$6] = $8tj43$getNextMarker(_el$21.nextSibling);
|
|
7445
7523
|
var _ref$ = price_input_1;
|
|
7446
7524
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
7447
|
-
$8tj43$addEventListener(_el$4, "keydown", $8tj43$
|
|
7525
|
+
$8tj43$addEventListener(_el$4, "keydown", $8tj43$catchify1(_ref4 => {
|
|
7448
7526
|
let {
|
|
7449
7527
|
key: key
|
|
7450
7528
|
} = _ref4;
|
|
7451
7529
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
7452
7530
|
}), true);
|
|
7453
|
-
$8tj43$addEventListener(_el$4, "blur", $8tj43$
|
|
7531
|
+
$8tj43$addEventListener(_el$4, "blur", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
7454
7532
|
var _ref$2 = price_input_2;
|
|
7455
7533
|
typeof _ref$2 === "function" ? $8tj43$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
7456
|
-
$8tj43$addEventListener(_el$7, "keydown", $8tj43$
|
|
7534
|
+
$8tj43$addEventListener(_el$7, "keydown", $8tj43$catchify1(_ref5 => {
|
|
7457
7535
|
let {
|
|
7458
7536
|
key: key
|
|
7459
7537
|
} = _ref5;
|
|
7460
7538
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
7461
7539
|
}), true);
|
|
7462
|
-
$8tj43$addEventListener(_el$7, "blur", $8tj43$
|
|
7540
|
+
$8tj43$addEventListener(_el$7, "blur", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
7463
7541
|
$8tj43$insert(_el$, $8tj43$createComponent($1e7465a8ffa97f6c$var$ExponentialSlider, {
|
|
7464
7542
|
max_: max_,
|
|
7465
7543
|
min_: min_,
|
|
@@ -7604,7 +7682,7 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref8) {
|
|
|
7604
7682
|
return [(() => {
|
|
7605
7683
|
var _el$25 = $8tj43$getNextElement($1e7465a8ffa97f6c$var$_tmpl$2),
|
|
7606
7684
|
_el$26 = _el$25.firstChild;
|
|
7607
|
-
$8tj43$addEventListener(_el$25, "click", $8tj43$
|
|
7685
|
+
$8tj43$addEventListener(_el$25, "click", $8tj43$catchify1(e => {
|
|
7608
7686
|
const rect = clickable_slider.getBoundingClientRect();
|
|
7609
7687
|
const slider_beginning_left = rect.left;
|
|
7610
7688
|
const slider_width = rect.width;
|
|
@@ -7630,12 +7708,12 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref8) {
|
|
|
7630
7708
|
range_input_1 = el;
|
|
7631
7709
|
set_value(range_input_1, 0);
|
|
7632
7710
|
}, _el$28);
|
|
7633
|
-
$8tj43$addEventListener(_el$28, "input", $8tj43$
|
|
7711
|
+
$8tj43$addEventListener(_el$28, "input", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, range_input_1, offset_value_calculator_)), true);
|
|
7634
7712
|
$8tj43$use(el => {
|
|
7635
7713
|
range_input_2 = el;
|
|
7636
7714
|
set_value(range_input_2, 1);
|
|
7637
7715
|
}, _el$29);
|
|
7638
|
-
$8tj43$addEventListener(_el$29, "input", $8tj43$
|
|
7716
|
+
$8tj43$addEventListener(_el$29, "input", $8tj43$catchify1(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
|
|
7639
7717
|
$8tj43$effect(_p$ => {
|
|
7640
7718
|
var _v$10 = should_be_disabled_(),
|
|
7641
7719
|
_v$11 = i18n_.range_filter_low_point_aria_label_(),
|
|
@@ -8101,7 +8179,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
8101
8179
|
}
|
|
8102
8180
|
while (execute_when_structure_finished.length) execute_when_structure_finished.pop()();
|
|
8103
8181
|
$0ae614c5c7babb43$var$expand_until_choice(data_structure);
|
|
8104
|
-
$8tj43$
|
|
8182
|
+
$8tj43$dlog1("CheckboxHierarchicalFilter: Recomputed structured_categories", data_structure);
|
|
8105
8183
|
return data_structure;
|
|
8106
8184
|
});
|
|
8107
8185
|
const some_top_level_are_hidden = $8tj43$createMemo(() => Object.keys(structured_categories()).length > $0ae614c5c7babb43$var$max_visible_without_collapsing);
|
|
@@ -8131,7 +8209,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
8131
8209
|
}) : []);
|
|
8132
8210
|
});
|
|
8133
8211
|
$8tj43$onCleanup(() => set_view_more_button_below_group());
|
|
8134
|
-
$8tj43$createEffect($8tj43$
|
|
8212
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
8135
8213
|
if (!some_top_level_are_hidden()) {
|
|
8136
8214
|
await collapse();
|
|
8137
8215
|
return;
|
|
@@ -8222,7 +8300,7 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_, filter
|
|
|
8222
8300
|
return (_value$is_checked_$ = (_value7 = value()) === null || _value7 === void 0 ? void 0 : (_value7$is_checked_ = _value7.is_checked_) === null || _value7$is_checked_ === void 0 ? void 0 : (_value7$is_checked_$ = _value7$is_checked_[0]) === null || _value7$is_checked_$ === void 0 ? void 0 : _value7$is_checked_$.call(_value7$is_checked_)) !== null && _value$is_checked_$ !== void 0 ? _value$is_checked_$ : false;
|
|
8223
8301
|
},
|
|
8224
8302
|
input_ref_: input => {
|
|
8225
|
-
input.addEventListener("change", $8tj43$
|
|
8303
|
+
input.addEventListener("change", $8tj43$catchify1(() => $8tj43$untrack(() => {
|
|
8226
8304
|
var _value9;
|
|
8227
8305
|
const {
|
|
8228
8306
|
checked: checked
|
|
@@ -8328,7 +8406,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
8328
8406
|
existing_filter_: existing_filter_
|
|
8329
8407
|
} = props;
|
|
8330
8408
|
let sync_queued = false;
|
|
8331
|
-
const sync_fn = $8tj43$
|
|
8409
|
+
const sync_fn = $8tj43$catchify1(async () => {
|
|
8332
8410
|
sync_queued = false;
|
|
8333
8411
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
8334
8412
|
const set_filter = existing_filter_();
|
|
@@ -8352,7 +8430,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
8352
8430
|
...base_object,
|
|
8353
8431
|
data: data
|
|
8354
8432
|
};
|
|
8355
|
-
$8tj43$
|
|
8433
|
+
$8tj43$dlog1("CheckboxHierarchicalFilter: Updating API state", filter_object);
|
|
8356
8434
|
const selected_filters = [...selected_filters_[0]()];
|
|
8357
8435
|
if (set_filter) selected_filters.splice(selected_filters.indexOf(set_filter), 1);
|
|
8358
8436
|
if (filter_object.data.length) selected_filters.push(filter_object);
|
|
@@ -8390,13 +8468,13 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
|
|
|
8390
8468
|
$8tj43$createComputed($8tj43$on(read_checked, trigger_sync_, {
|
|
8391
8469
|
defer: true
|
|
8392
8470
|
}));
|
|
8393
|
-
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$
|
|
8471
|
+
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$catchify1(new_value => {
|
|
8394
8472
|
if (updating_blocked) return;
|
|
8395
8473
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
8396
8474
|
}), {
|
|
8397
8475
|
defer: true
|
|
8398
8476
|
}));
|
|
8399
|
-
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$
|
|
8477
|
+
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$catchify1(() => {
|
|
8400
8478
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
8401
8479
|
if (all_kids_checked === read_checked()) return;
|
|
8402
8480
|
updating_blocked = true;
|
|
@@ -8600,7 +8678,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
8600
8678
|
};
|
|
8601
8679
|
},
|
|
8602
8680
|
get onClick() {
|
|
8603
|
-
return $8tj43$
|
|
8681
|
+
return $8tj43$catchify1(() => {
|
|
8604
8682
|
const set_filter = existing_filter();
|
|
8605
8683
|
const {
|
|
8606
8684
|
field: field,
|
|
@@ -8892,7 +8970,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
8892
8970
|
}) : []);
|
|
8893
8971
|
});
|
|
8894
8972
|
$8tj43$onCleanup(() => set_view_more_button_below_group_());
|
|
8895
|
-
$8tj43$createEffect($8tj43$
|
|
8973
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
8896
8974
|
if (!togglable_rest()) {
|
|
8897
8975
|
await collapse();
|
|
8898
8976
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -8907,7 +8985,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
8907
8985
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
8908
8986
|
_el$4 = _el$3.nextSibling,
|
|
8909
8987
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
8910
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
8988
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify1(() => {
|
|
8911
8989
|
const set_filter = existing_filter();
|
|
8912
8990
|
const {
|
|
8913
8991
|
field: field,
|
|
@@ -9458,7 +9536,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
9458
9536
|
_el$11 = _el$9.firstChild,
|
|
9459
9537
|
[_el$12, _co$3] = $8tj43$getNextMarker(_el$11.nextSibling),
|
|
9460
9538
|
_el$10 = _el$12.nextSibling;
|
|
9461
|
-
$8tj43$addEventListener(_el$9, "click", $8tj43$
|
|
9539
|
+
$8tj43$addEventListener(_el$9, "click", $8tj43$catchify1(() => {
|
|
9462
9540
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
9463
9541
|
for (const filter of filter_array_()) {
|
|
9464
9542
|
const index = new_filter_obj.findIndex(_ref3 => {
|
|
@@ -9530,7 +9608,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
9530
9608
|
},
|
|
9531
9609
|
get children() {
|
|
9532
9610
|
var _el$29 = $8tj43$getNextElement($f6b0500577e1b210$var$_tmpl$8);
|
|
9533
|
-
$8tj43$addEventListener(_el$29, "click", $8tj43$
|
|
9611
|
+
$8tj43$addEventListener(_el$29, "click", $8tj43$catchify1(() => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
9534
9612
|
user_triggered_: true,
|
|
9535
9613
|
selected_filters_: props.selected_filters_,
|
|
9536
9614
|
i18n_: props.i18n_,
|
|
@@ -9728,14 +9806,14 @@ async function $50aebf5b445518eb$export$58e808b1db15d3bc(options) {
|
|
|
9728
9806
|
headers: headers
|
|
9729
9807
|
} : {}),
|
|
9730
9808
|
method: "POST"
|
|
9731
|
-
}).catch(e => $8tj43$
|
|
9809
|
+
}).catch(e => $8tj43$dlog1("fetch_retry threw", e)).then(async maybe_response => {
|
|
9732
9810
|
var _decoded;
|
|
9733
9811
|
if (!maybe_response) return [];
|
|
9734
9812
|
let decoded;
|
|
9735
9813
|
try {
|
|
9736
9814
|
decoded = await maybe_response.json();
|
|
9737
9815
|
} catch (e) {
|
|
9738
|
-
$8tj43$
|
|
9816
|
+
$8tj43$dlog1("Failed to decode JSON", e);
|
|
9739
9817
|
}
|
|
9740
9818
|
return ((_decoded = decoded) === null || _decoded === void 0 ? void 0 : _decoded.displays) || [];
|
|
9741
9819
|
});
|
|
@@ -9794,7 +9872,7 @@ const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
9794
9872
|
|
|
9795
9873
|
const observe_to_signal = (element, setter) => {
|
|
9796
9874
|
const computed_style = getComputedStyle(element);
|
|
9797
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
9875
|
+
const resize_observer = new ResizeObserver($8tj43$catchify1(() => {
|
|
9798
9876
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
9799
9877
|
}));
|
|
9800
9878
|
resize_observer.observe(element);
|
|
@@ -9849,7 +9927,7 @@ async function $160ea2b55d8772d2$export$c1a6b039e689a58e(merchant, market, local
|
|
|
9849
9927
|
const in_ls = localStorage[localstorage_key];
|
|
9850
9928
|
if (in_ls) localstorage_value = JSON.parse(in_ls);
|
|
9851
9929
|
} catch (e) {
|
|
9852
|
-
$8tj43$
|
|
9930
|
+
$8tj43$dlog1("Failed parsing JSON from localStorage", e);
|
|
9853
9931
|
}
|
|
9854
9932
|
const updated = (_localstorage_value = localstorage_value) === null || _localstorage_value === void 0 ? void 0 : _localstorage_value.updated;
|
|
9855
9933
|
const now = +new Date();
|
|
@@ -9893,12 +9971,12 @@ async function $160ea2b55d8772d2$var$download_categories(merchant, market, local
|
|
|
9893
9971
|
if (!fetched) return [];
|
|
9894
9972
|
try {
|
|
9895
9973
|
if (fetched.status !== 200) {
|
|
9896
|
-
$8tj43$
|
|
9974
|
+
$8tj43$dlog1("failed to fetch queries, server responded with", fetched.status, fetched, await fetched.text());
|
|
9897
9975
|
return [];
|
|
9898
9976
|
}
|
|
9899
9977
|
return await fetched.json();
|
|
9900
9978
|
} catch (e) {
|
|
9901
|
-
$8tj43$
|
|
9979
|
+
$8tj43$dlog1("failed to decode queries json", fetched, e);
|
|
9902
9980
|
return [];
|
|
9903
9981
|
}
|
|
9904
9982
|
}
|
|
@@ -10199,9 +10277,9 @@ function $284849364a6ef73a$var$_get_cache_obj_for_endpoint2(endpoint) {
|
|
|
10199
10277
|
return (_classPrivateFieldGet4 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs))[endpoint] || (_classPrivateFieldGet4[endpoint] = {
|
|
10200
10278
|
in_progress_: {},
|
|
10201
10279
|
cache_: {},
|
|
10202
|
-
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$
|
|
10280
|
+
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$catchify1(key => {
|
|
10203
10281
|
const our_cache = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs)[endpoint].cache_;
|
|
10204
|
-
$8tj43$
|
|
10282
|
+
$8tj43$dlog1("[Search API]: removing", key, "from", our_cache);
|
|
10205
10283
|
delete our_cache[key];
|
|
10206
10284
|
})) : undefined
|
|
10207
10285
|
});
|
|
@@ -10338,11 +10416,11 @@ async function $284849364a6ef73a$var$_cached_request2(_ref4) {
|
|
|
10338
10416
|
result = $ed0fefda39a0f15d$export$967e966fca9515e(result);
|
|
10339
10417
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
10340
10418
|
resolve_in_progress(result);
|
|
10341
|
-
setTimeout($8tj43$
|
|
10419
|
+
setTimeout($8tj43$catchify1(() => {
|
|
10342
10420
|
if ($8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry)) cache_obj.finalization_registry_.register(result, body); // delete key from cache when value (WeakRefs) are collected
|
|
10343
10421
|
else
|
|
10344
10422
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
10345
|
-
setTimeout($8tj43$
|
|
10423
|
+
setTimeout($8tj43$catchify1(() => delete cache_obj.cache_[body]), 300000);
|
|
10346
10424
|
}), 60000 // cache values for at least 60 seconds
|
|
10347
10425
|
);
|
|
10348
10426
|
|
|
@@ -10374,7 +10452,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
10374
10452
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
10375
10453
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
10376
10454
|
const [get_current_href, set_current_href] = $8tj43$createSignal((_globalThis$location$ = globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$location = globalThis.location) === null || _globalThis$location === void 0 ? void 0 : _globalThis$location.href) !== null && _globalThis$location$ !== void 0 ? _globalThis$location$ : "https://example.com");
|
|
10377
|
-
const history_change_handler = $8tj43$
|
|
10455
|
+
const history_change_handler = $8tj43$catchify1(() => set_current_href(location.href));
|
|
10378
10456
|
const owner = $8tj43$getOwner() || $8tj43$createRoot(() => $8tj43$getOwner());
|
|
10379
10457
|
const {
|
|
10380
10458
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -10421,7 +10499,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
10421
10499
|
if (override_listing_id_query_param_names_) {
|
|
10422
10500
|
const found_override_listing_id = override_listing_id_query_param_names_.map(n => searchParams.get(n)).find(n => n);
|
|
10423
10501
|
set_override_listing_id(found_override_listing_id || null);
|
|
10424
|
-
if (found_override_listing_id) $8tj43$
|
|
10502
|
+
if (found_override_listing_id) $8tj43$dlog1("Found override query id:", found_override_listing_id); // This stuff might get confusing so better log it
|
|
10425
10503
|
}
|
|
10426
10504
|
|
|
10427
10505
|
if (hash === (0, $2855bffe06ef7a03$export$84daa4fa1471698b)) set_has_sideways_filter_clearing_flag(true);
|
|
@@ -10706,7 +10784,7 @@ function $dea31647b99a443b$export$d757d54550ebfb3d(_ref) {
|
|
|
10706
10784
|
_el$2 = _el$.firstChild,
|
|
10707
10785
|
_el$4 = _el$2.nextSibling,
|
|
10708
10786
|
[_el$5, _co$] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
10709
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
10787
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(e => {
|
|
10710
10788
|
router_.navigate_.go_to_({
|
|
10711
10789
|
new_url_: category_suggestion_().page_url,
|
|
10712
10790
|
is_replace_: false,
|
|
@@ -10871,7 +10949,7 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
10871
10949
|
}, {
|
|
10872
10950
|
defer: true
|
|
10873
10951
|
}));
|
|
10874
|
-
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$
|
|
10952
|
+
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$catchify1(() => {
|
|
10875
10953
|
// when a query was submitted, clear filters if clear was pressed before
|
|
10876
10954
|
const clear_value = $8tj43$untrack(get_clear_filters_next_submit);
|
|
10877
10955
|
if (clear_value) {
|
|
@@ -10898,11 +10976,11 @@ function $07d90b8270ece8de$export$84bba84a7b837187(read_search_query) {
|
|
|
10898
10976
|
const key = "depict_searches";
|
|
10899
10977
|
const previous_searches = $8tj43$createSignal(JSON.parse(ls[key] || "[]"));
|
|
10900
10978
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
10901
|
-
$8tj43$createEffect($8tj43$
|
|
10979
|
+
$8tj43$createEffect($8tj43$catchify1(() => {
|
|
10902
10980
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
10903
10981
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
10904
10982
|
}));
|
|
10905
|
-
$8tj43$createComputed($8tj43$
|
|
10983
|
+
$8tj43$createComputed($8tj43$catchify1(() => {
|
|
10906
10984
|
const searches = $8tj43$untrack(read_previous_searches);
|
|
10907
10985
|
const current_query = read_search_query();
|
|
10908
10986
|
if (!current_query)
|
|
@@ -10948,7 +11026,7 @@ async function $86b0ff0c85e5fc6c$export$e16630ecb9644a1c(_ref) {
|
|
|
10948
11026
|
function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
|
|
10949
11027
|
let passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
10950
11028
|
let override_element = arguments.length > 2 ? arguments[2] : undefined;
|
|
10951
|
-
const catchified_handler = $8tj43$
|
|
11029
|
+
const catchified_handler = $8tj43$catchify1(handler);
|
|
10952
11030
|
const owner = $8tj43$getOwner();
|
|
10953
11031
|
// Some customers (e.g. equestrian) have `height: 100%` and/or `overflow-x: hidden` on the body, which means that scroll events won't get dispatched on `window`. The pages who get it on <body> won't get it on `window` and vice-versa, so there shouldn't be a worry about duplicate calling of the handler.
|
|
10954
11032
|
// Use observer in case that this gets called before body exists
|
|
@@ -10993,7 +11071,7 @@ function $96d57a48e7bce64f$export$181cceed5c91919e(callback, alsoRaF, passiveLis
|
|
|
10993
11071
|
$8tj43$createEffect(() => {
|
|
10994
11072
|
if (alsoRaF !== null && alsoRaF !== void 0 && alsoRaF()) {
|
|
10995
11073
|
let disposed = false;
|
|
10996
|
-
const fn = $8tj43$
|
|
11074
|
+
const fn = $8tj43$catchify1(() => {
|
|
10997
11075
|
if (disposed) return;
|
|
10998
11076
|
probablyCallCallback();
|
|
10999
11077
|
requestAnimationFrame(fn);
|
|
@@ -11006,10 +11084,10 @@ function $96d57a48e7bce64f$export$181cceed5c91919e(callback, alsoRaF, passiveLis
|
|
|
11006
11084
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
11007
11085
|
// this works
|
|
11008
11086
|
// keeping resize just in case
|
|
11009
|
-
const resize_resize_observer = new ResizeObserver($8tj43$
|
|
11087
|
+
const resize_resize_observer = new ResizeObserver($8tj43$catchify1(probablyCallCallback));
|
|
11010
11088
|
resize_resize_observer.observe(document.documentElement);
|
|
11011
11089
|
(0, $8tj43$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
11012
|
-
$8tj43$onCleanup($8tj43$
|
|
11090
|
+
$8tj43$onCleanup($8tj43$catchify1(() => resize_resize_observer.disconnect()));
|
|
11013
11091
|
return probablyCallCallback;
|
|
11014
11092
|
}
|
|
11015
11093
|
const $1308a7816c3d4f2d$export$3f238c96c45e6cc6 = 1;
|
|
@@ -11042,7 +11120,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(_ref, input_field, alignment,
|
|
|
11042
11120
|
}, pollAlignment);
|
|
11043
11121
|
let ro;
|
|
11044
11122
|
if (alignment & $1308a7816c3d4f2d$export$902f8b4a7dae5d78 || alignment & $1308a7816c3d4f2d$export$5097308c5200105a) {
|
|
11045
|
-
ro = new ResizeObserver($8tj43$
|
|
11123
|
+
ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
11046
11124
|
records.forEach(_ref2 => {
|
|
11047
11125
|
let {
|
|
11048
11126
|
contentRect: {
|
|
@@ -11066,7 +11144,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(_ref, input_field, alignment,
|
|
|
11066
11144
|
}));
|
|
11067
11145
|
ro.observe(input_field);
|
|
11068
11146
|
}
|
|
11069
|
-
$8tj43$onCleanup($8tj43$
|
|
11147
|
+
$8tj43$onCleanup($8tj43$catchify1(() => {
|
|
11070
11148
|
var _ro;
|
|
11071
11149
|
return (_ro = ro) === null || _ro === void 0 ? void 0 : _ro.disconnect();
|
|
11072
11150
|
}));
|
|
@@ -11287,7 +11365,7 @@ function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
|
|
|
11287
11365
|
fill: "forwards",
|
|
11288
11366
|
easing: "ease-in-out"
|
|
11289
11367
|
});
|
|
11290
|
-
animation.addEventListener("finish", $8tj43$
|
|
11368
|
+
animation.addEventListener("finish", $8tj43$catchify1(() => {
|
|
11291
11369
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
11292
11370
|
animation = undefined;
|
|
11293
11371
|
element.style.display = "none";
|
|
@@ -11349,7 +11427,7 @@ function $94af29837186eb21$export$ef6006467f04ee41(_ref) {
|
|
|
11349
11427
|
},
|
|
11350
11428
|
get children() {
|
|
11351
11429
|
var _el$3 = $8tj43$getNextElement($94af29837186eb21$var$_tmpl$);
|
|
11352
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
11430
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(() => $8tj43$runWithOwner(root, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
11353
11431
|
user_triggered_: true,
|
|
11354
11432
|
selected_filters_: selected_filters_,
|
|
11355
11433
|
also_clear_sorting_: false,
|
|
@@ -11393,7 +11471,7 @@ function $6d2962bc9370f884$export$5e4aed86c12acdd9(_ref) {
|
|
|
11393
11471
|
is_first_load = true;
|
|
11394
11472
|
});
|
|
11395
11473
|
// percentage_in_view_ has equals: false so it should update even when set to the same value. That is to make sure that if the user bounces around below the "viewport" of our product listing we still start fetching as soon as is_loading_more becomes false again and we get IntersectionObserverEntries
|
|
11396
|
-
$8tj43$createEffect($8tj43$
|
|
11474
|
+
$8tj43$createEffect($8tj43$catchify1(async () => {
|
|
11397
11475
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
11398
11476
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
11399
11477
|
if (!get_last_cursor()) {
|
|
@@ -12154,7 +12232,7 @@ function $69602b3d8fd54c38$export$9dd50d35b9d94fdf(_ref) {
|
|
|
12154
12232
|
number_of_results_: number_of_results_,
|
|
12155
12233
|
type: type
|
|
12156
12234
|
} = _ref;
|
|
12157
|
-
const contents = $8tj43$createMemo($8tj43$
|
|
12235
|
+
const contents = $8tj43$createMemo($8tj43$catchify1(() => {
|
|
12158
12236
|
const q = get_search_query_();
|
|
12159
12237
|
return i18n_[type === $69602b3d8fd54c38$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
12160
12238
|
var _el$ = $8tj43$getNextElement($69602b3d8fd54c38$var$_tmpl$);
|
|
@@ -12243,7 +12321,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
12243
12321
|
_el$13 = _el$12.nextSibling,
|
|
12244
12322
|
_el$14 = _el$13.nextSibling,
|
|
12245
12323
|
[_el$15, _co$2] = $8tj43$getNextMarker(_el$14.nextSibling);
|
|
12246
|
-
$8tj43$addEventListener(_el$12, "change", $8tj43$
|
|
12324
|
+
$8tj43$addEventListener(_el$12, "change", $8tj43$catchify1(() => set_current_sorting(item())));
|
|
12247
12325
|
$8tj43$setAttribute(_el$12, "name", title_radio_name);
|
|
12248
12326
|
$8tj43$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
12249
12327
|
$8tj43$effect(() => $8tj43$setProperty(_el$12, "checked", is_checked()));
|
|
@@ -12277,7 +12355,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
12277
12355
|
_el$19 = _el$18.nextSibling,
|
|
12278
12356
|
_el$20 = _el$19.nextSibling,
|
|
12279
12357
|
[_el$21, _co$3] = $8tj43$getNextMarker(_el$20.nextSibling);
|
|
12280
|
-
$8tj43$addEventListener(_el$18, "change", $8tj43$
|
|
12358
|
+
$8tj43$addEventListener(_el$18, "change", $8tj43$catchify1(() => set_current_sorting(c => c && {
|
|
12281
12359
|
...c,
|
|
12282
12360
|
order: order_value()
|
|
12283
12361
|
})));
|
|
@@ -12378,7 +12456,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12378
12456
|
set_search_sorting_open(true);
|
|
12379
12457
|
}
|
|
12380
12458
|
});
|
|
12381
|
-
$8tj43$onCleanup($8tj43$
|
|
12459
|
+
$8tj43$onCleanup($8tj43$catchify1(() => {
|
|
12382
12460
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
12383
12461
|
set_search_filters_open(false);
|
|
12384
12462
|
set_search_sorting_open(false);
|
|
@@ -12410,16 +12488,16 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12410
12488
|
_el$12 = _el$14.nextSibling;
|
|
12411
12489
|
$8tj43$use(el => {
|
|
12412
12490
|
background = el;
|
|
12413
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12491
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12414
12492
|
set_background_style("transition", "all 200ms ease-in");
|
|
12415
12493
|
// For some reason this needs a requestAnimationFrame but the other modal-opening animations don't
|
|
12416
|
-
requestAnimationFrame($8tj43$
|
|
12494
|
+
requestAnimationFrame($8tj43$catchify1(() => set_background_style("opacity", "1")));
|
|
12417
12495
|
}));
|
|
12418
12496
|
}, _el$2);
|
|
12419
12497
|
$8tj43$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
12420
12498
|
$8tj43$use(el => {
|
|
12421
12499
|
dismiss_button = el;
|
|
12422
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12500
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12423
12501
|
set_button_style("transition", "all 200ms ease-in");
|
|
12424
12502
|
set_button_fraction_in(1);
|
|
12425
12503
|
}));
|
|
@@ -12433,11 +12511,11 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12433
12511
|
} = _ref2;
|
|
12434
12512
|
// touchstart should always only have one changed touch, track it here
|
|
12435
12513
|
if (touches >= 1) {
|
|
12436
|
-
$8tj43$
|
|
12514
|
+
$8tj43$dlog1("Got new touch", changedTouches, "ignoring"); // only support 1 touch for now
|
|
12437
12515
|
return;
|
|
12438
12516
|
}
|
|
12439
12517
|
if (target.closest($082c4ed3e22f8d71$var$no_go_selector) || target.matches($082c4ed3e22f8d71$var$no_go_selector)) {
|
|
12440
|
-
$8tj43$
|
|
12518
|
+
$8tj43$dlog1("Got touch on slider, ignoring for UX", target, changedTouches);
|
|
12441
12519
|
return;
|
|
12442
12520
|
}
|
|
12443
12521
|
set_modal_style("transition", "unset");
|
|
@@ -12453,7 +12531,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12453
12531
|
let last_move_page_y = start_page_y;
|
|
12454
12532
|
let first_move_was_downwards = false;
|
|
12455
12533
|
let distance_from_start_of_gesture = 0;
|
|
12456
|
-
const end_handler = $8tj43$
|
|
12534
|
+
const end_handler = $8tj43$catchify1(e => {
|
|
12457
12535
|
const changedTouches = e === null || e === void 0 ? void 0 : e.changedTouches;
|
|
12458
12536
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
12459
12537
|
// other finger stopped touch, ignore it
|
|
@@ -12477,7 +12555,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12477
12555
|
modal.removeEventListener("touchcancel", end_handler);
|
|
12478
12556
|
modal.removeEventListener("touchmove", move_handler);
|
|
12479
12557
|
});
|
|
12480
|
-
const move_handler = $8tj43$
|
|
12558
|
+
const move_handler = $8tj43$catchify1(e => {
|
|
12481
12559
|
const {
|
|
12482
12560
|
changedTouches: changedTouches
|
|
12483
12561
|
} = e;
|
|
@@ -12527,7 +12605,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12527
12605
|
};
|
|
12528
12606
|
$8tj43$use(el => {
|
|
12529
12607
|
modal = el;
|
|
12530
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
12608
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify1(() => {
|
|
12531
12609
|
set_modal_style("transition", "all 200ms ease-in");
|
|
12532
12610
|
set_modal_style("transform", "translateY(0)");
|
|
12533
12611
|
}));
|
|
@@ -12620,7 +12698,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12620
12698
|
},
|
|
12621
12699
|
get children() {
|
|
12622
12700
|
var _el$11 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$);
|
|
12623
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
12701
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify1(() => {
|
|
12624
12702
|
const show_toast = $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
12625
12703
|
user_triggered_: true,
|
|
12626
12704
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -12630,7 +12708,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12630
12708
|
also_clear_sorting_: false,
|
|
12631
12709
|
delay_toast_: true
|
|
12632
12710
|
});
|
|
12633
|
-
cleanup_promise.then($8tj43$
|
|
12711
|
+
cleanup_promise.then($8tj43$catchify1(show_toast));
|
|
12634
12712
|
}), true);
|
|
12635
12713
|
$8tj43$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
12636
12714
|
$8tj43$runHydrationEvents();
|
|
@@ -12706,7 +12784,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
12706
12784
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
12707
12785
|
const [get_current_sorting_] = current_sorting_;
|
|
12708
12786
|
const [is_small, set_is_small] = $8tj43$createSignal(false);
|
|
12709
|
-
const dismiss_modal_ = $8tj43$
|
|
12787
|
+
const dismiss_modal_ = $8tj43$catchify1(() => {
|
|
12710
12788
|
set_filters_open(false);
|
|
12711
12789
|
set_sorting_open(false);
|
|
12712
12790
|
});
|
|
@@ -12815,7 +12893,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
12815
12893
|
})());
|
|
12816
12894
|
}
|
|
12817
12895
|
});
|
|
12818
|
-
$8tj43$
|
|
12896
|
+
$8tj43$catchify1(async () => {
|
|
12819
12897
|
({
|
|
12820
12898
|
open_modal_: open_modal_,
|
|
12821
12899
|
close_modal_: close_modal_
|
|
@@ -12909,7 +12987,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref4) {
|
|
|
12909
12987
|
return _el$15;
|
|
12910
12988
|
}
|
|
12911
12989
|
}), _el$21, _co$5);
|
|
12912
|
-
$8tj43$addEventListener(_el$16, "click", $8tj43$
|
|
12990
|
+
$8tj43$addEventListener(_el$16, "click", $8tj43$catchify1(() => $8tj43$batch(() => {
|
|
12913
12991
|
if (search_filters_open_[0]()) {
|
|
12914
12992
|
search_filters_open_[1](false);
|
|
12915
12993
|
return;
|
|
@@ -12976,7 +13054,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref5) {
|
|
|
12976
13054
|
_el$23 = _el$22.firstChild,
|
|
12977
13055
|
_el$24 = _el$23.nextSibling,
|
|
12978
13056
|
[_el$25, _co$6] = $8tj43$getNextMarker(_el$24.nextSibling);
|
|
12979
|
-
$8tj43$addEventListener(_el$22, "click", $8tj43$
|
|
13057
|
+
$8tj43$addEventListener(_el$22, "click", $8tj43$catchify1(() => $8tj43$batch(() => {
|
|
12980
13058
|
if (search_sorting_open_[0]()) {
|
|
12981
13059
|
search_sorting_open_[1](false);
|
|
12982
13060
|
return;
|
|
@@ -13094,7 +13172,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13094
13172
|
}
|
|
13095
13173
|
old_pos = new_pos;
|
|
13096
13174
|
});
|
|
13097
|
-
const touchstart_handler = $8tj43$
|
|
13175
|
+
const touchstart_handler = $8tj43$catchify1(e => {
|
|
13098
13176
|
is_in_touch_scroll = true;
|
|
13099
13177
|
if (e.touches.length === 1) {
|
|
13100
13178
|
// we had no touches but then we got some. Adding a new touch cancels the inertia. We are in a new touch so do reset the diff
|
|
@@ -13102,12 +13180,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13102
13180
|
diff_over_second_or_touch = 0;
|
|
13103
13181
|
}
|
|
13104
13182
|
});
|
|
13105
|
-
const touchend_handler = $8tj43$
|
|
13183
|
+
const touchend_handler = $8tj43$catchify1(e => {
|
|
13106
13184
|
if (e.touches.length === 0)
|
|
13107
13185
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
13108
13186
|
inertia_timeout = setTimeout(
|
|
13109
13187
|
// inertia ends after 500ms (educated guess)
|
|
13110
|
-
$8tj43$
|
|
13188
|
+
$8tj43$catchify1(() => {
|
|
13111
13189
|
is_in_touch_scroll = false;
|
|
13112
13190
|
diff_over_second_or_touch = 0;
|
|
13113
13191
|
}), 500);
|
|
@@ -13125,9 +13203,9 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13125
13203
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
13126
13204
|
if (!$8tj43$untrack(modal_is_closed) && everything_closed)
|
|
13127
13205
|
// I think the point of this is to delay the animation a bit IIRC
|
|
13128
|
-
timeout = setTimeout($8tj43$
|
|
13206
|
+
timeout = setTimeout($8tj43$catchify1(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
13129
13207
|
});
|
|
13130
|
-
$8tj43$createComputed($8tj43$
|
|
13208
|
+
$8tj43$createComputed($8tj43$catchify1(async () => {
|
|
13131
13209
|
const element = sort_and_filter_element_();
|
|
13132
13210
|
if (!element) return;
|
|
13133
13211
|
await (0, $8tj43$observer).wait_for_element(element);
|
|
@@ -13146,12 +13224,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13146
13224
|
_el$5 = _el$4.firstChild,
|
|
13147
13225
|
_el$6 = _el$4.nextSibling,
|
|
13148
13226
|
_el$7 = _el$6.firstChild;
|
|
13149
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
13227
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify1(() => {
|
|
13150
13228
|
set_search_filters_open_(true);
|
|
13151
13229
|
set_search_sorting_open_(false);
|
|
13152
13230
|
}), true);
|
|
13153
13231
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $05f67356defcdd65$export$28f6150e232898de), {}));
|
|
13154
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
13232
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify1(() => {
|
|
13155
13233
|
set_search_filters_open_(false);
|
|
13156
13234
|
set_search_sorting_open_(true);
|
|
13157
13235
|
}), true);
|
|
@@ -13162,7 +13240,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
13162
13240
|
});
|
|
13163
13241
|
return () => _c$() ? $8tj43$createComponent((0, $79af35736fe8e5c8$export$da32f7add8a22e86), {}) : $8tj43$createComponent((0, $73e3c96bc365e0e9$export$d10e63059ddb9fd4), {});
|
|
13164
13242
|
})());
|
|
13165
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
13243
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify1(() => scrollTo({
|
|
13166
13244
|
top: 0,
|
|
13167
13245
|
behavior: "smooth"
|
|
13168
13246
|
})), true);
|
|
@@ -13194,7 +13272,7 @@ function $ec225bf1f1627ea8$export$210f130a61ac1e8d(fn) {
|
|
|
13194
13272
|
let last_queued;
|
|
13195
13273
|
let last_value;
|
|
13196
13274
|
let initial_run = true;
|
|
13197
|
-
$8tj43$createComputed($8tj43$
|
|
13275
|
+
$8tj43$createComputed($8tj43$catchify1(async () => {
|
|
13198
13276
|
last_value = fn();
|
|
13199
13277
|
if (initial_run) {
|
|
13200
13278
|
initial_run = false;
|
|
@@ -13242,7 +13320,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
13242
13320
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
13243
13321
|
};
|
|
13244
13322
|
|
|
13245
|
-
$8tj43$createComputed($8tj43$
|
|
13323
|
+
$8tj43$createComputed($8tj43$catchify1(() => {
|
|
13246
13324
|
const last_result = get_last_result_in_viewport_();
|
|
13247
13325
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
13248
13326
|
if (isNaN(last_result)) {
|
|
@@ -13269,7 +13347,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
13269
13347
|
set_to_later = last_result;
|
|
13270
13348
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
13271
13349
|
if (timeout) return;
|
|
13272
|
-
timeout = setTimeout($8tj43$
|
|
13350
|
+
timeout = setTimeout($8tj43$catchify1(() => {
|
|
13273
13351
|
timeout = undefined;
|
|
13274
13352
|
last_time_history_changed = +new Date();
|
|
13275
13353
|
set_min_results_loaded(set_to_later);
|
|
@@ -13382,7 +13460,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
13382
13460
|
if (!result) return;
|
|
13383
13461
|
return {
|
|
13384
13462
|
href: result.page_url,
|
|
13385
|
-
onClick: $8tj43$
|
|
13463
|
+
onClick: $8tj43$catchify1(ev => router_.navigate_.go_to_({
|
|
13386
13464
|
new_url_: result.page_url,
|
|
13387
13465
|
is_replace_: false,
|
|
13388
13466
|
event_: ev
|
|
@@ -13816,7 +13894,7 @@ function $937791b86d3d1509$export$44f738469d5570cf(_ref) {
|
|
|
13816
13894
|
// We might only have changed the left position which align_field doesn't know about, make it poll the position for a while
|
|
13817
13895
|
setPollAlignment_(true);
|
|
13818
13896
|
if (disableResizePollingTimeout) clearTimeout(disableResizePollingTimeout);
|
|
13819
|
-
disableResizePollingTimeout = setTimeout($8tj43$
|
|
13897
|
+
disableResizePollingTimeout = setTimeout($8tj43$catchify1(() => {
|
|
13820
13898
|
setPollAlignment_(false);
|
|
13821
13899
|
disableResizePollingTimeout = undefined;
|
|
13822
13900
|
}), 1000);
|
|
@@ -13949,7 +14027,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13949
14027
|
} : {})
|
|
13950
14028
|
};
|
|
13951
14029
|
});
|
|
13952
|
-
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$
|
|
14030
|
+
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$catchify1(async base_query => {
|
|
13953
14031
|
set_all_products_loaded(false);
|
|
13954
14032
|
// only first page of results
|
|
13955
14033
|
return await $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
@@ -13997,7 +14075,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
13997
14075
|
const [, setModalFieldStyle] = modal_field_style;
|
|
13998
14076
|
const [, setModalBackdropStyle] = modal_backdrop_style;
|
|
13999
14077
|
const [get_search_field_elements, set_search_field_elements] = $8tj43$createSignal();
|
|
14000
|
-
const SafeSearchField = $8tj43$
|
|
14078
|
+
const SafeSearchField = $8tj43$catchify1((0, $584c06c09cf4609d$export$b94867ecbd698f21));
|
|
14001
14079
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $8tj43$createSignal(false);
|
|
14002
14080
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $8tj43$createSignal();
|
|
14003
14081
|
const n_hits = $8tj43$createMemo(() => {
|
|
@@ -14066,7 +14144,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14066
14144
|
})()));
|
|
14067
14145
|
}).remove);
|
|
14068
14146
|
$3a2bed57c9a57e21$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
14069
|
-
$8tj43$
|
|
14147
|
+
$8tj43$catchify1((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
14070
14148
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
14071
14149
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
14072
14150
|
id_: get_search_query_,
|
|
@@ -14112,8 +14190,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14112
14190
|
setModalBodyStyle({});
|
|
14113
14191
|
modalAlignmentSignalsRef_ === null || modalAlignmentSignalsRef_ === void 0 || modalAlignmentSignalsRef_(alignmentSignals_);
|
|
14114
14192
|
const [pollAlignment, setPollAlignment_] = $8tj43$createSignal(false);
|
|
14115
|
-
const align_position = $8tj43$
|
|
14116
|
-
div_with_field_class.addEventListener("click", $8tj43$
|
|
14193
|
+
const align_position = $8tj43$catchify1((0, $1308a7816c3d4f2d$export$b3ad617e9036868))(alignmentSignals_, search_field, (0, $1308a7816c3d4f2d$export$3f238c96c45e6cc6) | (0, $1308a7816c3d4f2d$export$7895aadd1956b1c7) | (modalVersionUsed_ === 1 ? (0, $1308a7816c3d4f2d$export$902f8b4a7dae5d78) : (0, $1308a7816c3d4f2d$export$6060bc6bee850eb6) | (0, $1308a7816c3d4f2d$export$5097308c5200105a)), true, pollAlignment);
|
|
14194
|
+
div_with_field_class.addEventListener("click", $8tj43$catchify1(e => {
|
|
14117
14195
|
var _target$matches, _target$closest, _on_open_, _ref4;
|
|
14118
14196
|
const target = e.target;
|
|
14119
14197
|
const sel = ".submit";
|
|
@@ -14561,7 +14639,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
14561
14639
|
BackIcon_: BackIcon_
|
|
14562
14640
|
});
|
|
14563
14641
|
$68e6625c8d51f847$export$5162a71f252e6122();
|
|
14564
|
-
$8tj43$
|
|
14642
|
+
$8tj43$catchify1(async () => {
|
|
14565
14643
|
const {
|
|
14566
14644
|
open_modal_: open_modal_,
|
|
14567
14645
|
close_modal_: close_modal_
|
|
@@ -14825,7 +14903,7 @@ function $eb064bc3350276c1$export$f2dc7e4e4aa11abb(props) {
|
|
|
14825
14903
|
function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
14826
14904
|
const style_element = document.createElement("style");
|
|
14827
14905
|
document.head.append(style_element);
|
|
14828
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
14906
|
+
const resize_observer = new ResizeObserver($8tj43$catchify1(() => {
|
|
14829
14907
|
const styles = $cc64aabf2c7a1f1a$export$1233ca167bf71f9a({
|
|
14830
14908
|
".depict.plp .depict-search-modal .search-field": {
|
|
14831
14909
|
"height": "".concat(aligner === null || aligner === void 0 ? void 0 : aligner.clientHeight, "px")
|
|
@@ -14896,7 +14974,7 @@ const $169c13c0531d91d2$export$d86a33413558014e = openModalParams => {
|
|
|
14896
14974
|
}, dispose_aligner];
|
|
14897
14975
|
};
|
|
14898
14976
|
function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
14899
|
-
const handler = $8tj43$
|
|
14977
|
+
const handler = $8tj43$catchify1(e => {
|
|
14900
14978
|
const {
|
|
14901
14979
|
key: key,
|
|
14902
14980
|
target: target
|
|
@@ -14915,7 +14993,7 @@ function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
|
14915
14993
|
function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
14916
14994
|
let old_url;
|
|
14917
14995
|
let disconnect_link_observer;
|
|
14918
|
-
const link_handler = $8tj43$
|
|
14996
|
+
const link_handler = $8tj43$catchify1(e => {
|
|
14919
14997
|
const link = e.currentTarget || e.target;
|
|
14920
14998
|
if (link.href === old_url) {
|
|
14921
14999
|
history.pushState(history.state, "", link.href);
|
|
@@ -14924,7 +15002,7 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
14924
15002
|
});
|
|
14925
15003
|
let remove_added_listeners;
|
|
14926
15004
|
let resolve_remove_added_listeners;
|
|
14927
|
-
pr.addEventListener("open", $8tj43$
|
|
15005
|
+
pr.addEventListener("open", $8tj43$catchify1(() => {
|
|
14928
15006
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
14929
15007
|
disconnect_link_observer = (0, $8tj43$observer).onexists("a", async _ref => {
|
|
14930
15008
|
let {
|
|
@@ -14935,12 +15013,12 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
14935
15013
|
element.removeEventListener("click", link_handler);
|
|
14936
15014
|
});
|
|
14937
15015
|
}));
|
|
14938
|
-
pr.addEventListener("close", $8tj43$
|
|
15016
|
+
pr.addEventListener("close", $8tj43$catchify1(() => {
|
|
14939
15017
|
var _disconnect_link_obse, _resolve_remove_added;
|
|
14940
15018
|
(_disconnect_link_obse = disconnect_link_observer) === null || _disconnect_link_obse === void 0 || _disconnect_link_obse();
|
|
14941
15019
|
(_resolve_remove_added = resolve_remove_added_listeners) === null || _resolve_remove_added === void 0 || _resolve_remove_added();
|
|
14942
15020
|
}));
|
|
14943
|
-
$8tj43$
|
|
15021
|
+
$8tj43$catchify1(async () => {
|
|
14944
15022
|
for await (const href of (0, $8tj43$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
14945
15023
|
})();
|
|
14946
15024
|
}
|
|
@@ -15038,7 +15116,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15038
15116
|
});
|
|
15039
15117
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_unload, {
|
|
15040
15118
|
writable: true,
|
|
15041
|
-
value: /*@__PURE__*/$8tj43$
|
|
15119
|
+
value: /*@__PURE__*/$8tj43$catchify1(() => {
|
|
15042
15120
|
var _classPrivateFieldGet3;
|
|
15043
15121
|
if (!$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_is_open)) return;
|
|
15044
15122
|
(_classPrivateFieldGet3 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_disconnect_observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
@@ -15052,7 +15130,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15052
15130
|
});
|
|
15053
15131
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_load, {
|
|
15054
15132
|
writable: true,
|
|
15055
|
-
value: /*@__PURE__*/$8tj43$
|
|
15133
|
+
value: /*@__PURE__*/$8tj43$catchify1(async els => {
|
|
15056
15134
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_is_open, true);
|
|
15057
15135
|
// So that #load doesn't get called again
|
|
15058
15136
|
let set_should_stay_inserted;
|
|
@@ -15116,7 +15194,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
15116
15194
|
async function $f9fd3017c20b774a$var$_listen2() {
|
|
15117
15195
|
const [exit_ipns, exitable_ipns] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
15118
15196
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_stop_listening, exit_ipns);
|
|
15119
|
-
const caught_page_check_fn = $8tj43$
|
|
15197
|
+
const caught_page_check_fn = $8tj43$catchify1(this.is_page_, "page check failed");
|
|
15120
15198
|
for await (const href of exitable_ipns) {
|
|
15121
15199
|
const url = new URL(href);
|
|
15122
15200
|
if (!caught_page_check_fn(url)) {
|
|
@@ -15134,12 +15212,12 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
|
|
|
15134
15212
|
this.addEventListener("close", dispose, {
|
|
15135
15213
|
once: true
|
|
15136
15214
|
});
|
|
15137
|
-
return $8tj43$
|
|
15215
|
+
return $8tj43$catchify1(this.render_, "rendering failed")() || [];
|
|
15138
15216
|
});
|
|
15139
15217
|
}
|
|
15140
15218
|
function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
15141
15219
|
// Called when a "page" is "opened" using PageReplacer
|
|
15142
|
-
const on_maybe_popstate = $8tj43$
|
|
15220
|
+
const on_maybe_popstate = $8tj43$catchify1(what_happened => {
|
|
15143
15221
|
if (what_happened !== "popstate") return;
|
|
15144
15222
|
const cleaned_current_url = $f9fd3017c20b774a$var$clean_url(location.href);
|
|
15145
15223
|
if (!$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecGet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_visited_urls).has(cleaned_current_url)) {
|
|
@@ -15163,7 +15241,7 @@ function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
|
15163
15241
|
PageReplacer unload itself and reveals the original document - it is expected to be the one under https://ehandel.spendrups.se/Product/1104201, but actually it is the one under /start/search - a white page.
|
|
15164
15242
|
The fix: is to remember all pages that we have visited since the creation of `window` (we do that by having a static property on PageReplacer since we assume the PageReplacer source code will only exist once on the page and will be loaded at page load, the latter assumption might be wrong, but I hope not). If we get a "popstate" event (meaning back or forwards button, not new page being pushed) to an unknown page we reload.
|
|
15165
15243
|
*/
|
|
15166
|
-
$8tj43$
|
|
15244
|
+
$8tj43$dlog1("PageReplacer: ", cleaned_current_url, " hasn't been visited since document was created, reloading since we won't be able to show this page otherwise");
|
|
15167
15245
|
location.reload();
|
|
15168
15246
|
$f9fd3017c20b774a$var$_classStaticPrivateFieldSpecSet($f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$export$3ccaa27d81dd8556, $f9fd3017c20b774a$var$_reverting_permitted, false); // Disallow any reverting since we can't - it would flash a white page until the reload has finished.
|
|
15169
15247
|
$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_unload).call(this); // Call unload to "kill" the solid-js stuff quicker so that it stops updating - the user is expecting the next thing that happens to be a navigation to the actual page the URL says they're on.
|
|
@@ -15182,7 +15260,7 @@ var $f9fd3017c20b774a$var$_visited_urls = {
|
|
|
15182
15260
|
writable: true,
|
|
15183
15261
|
value: /*@__PURE__*/(() => {
|
|
15184
15262
|
// Keep track of all URLs that have been visited since the document that was initially loaded (loaded means the process where the browser creates a new `document` and `window` object).
|
|
15185
|
-
$8tj43$
|
|
15263
|
+
$8tj43$catchify1(async () => {
|
|
15186
15264
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
15187
15265
|
// I don't think we want to ship a library that users are *forced* to transpile, it should run in the newest version of all major browsers. So we'll just use a function wrapper for now (adding "last 1 ios version" to the build target does a bunch of other unneeded transpilations).
|
|
15188
15266
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|
|
@@ -15239,7 +15317,7 @@ function $a3026fb727bc7550$export$316f6f283ae64765(props) {
|
|
|
15239
15317
|
field_: $8tj43$createSignal({}),
|
|
15240
15318
|
backdrop_: backdropAlignmentSignal_
|
|
15241
15319
|
};
|
|
15242
|
-
const defaultHandler = $8tj43$
|
|
15320
|
+
const defaultHandler = $8tj43$catchify1(e => {
|
|
15243
15321
|
const {
|
|
15244
15322
|
modalVersionUsed_: modalVersionUsed_
|
|
15245
15323
|
} = shared_properties;
|
|
@@ -15375,7 +15453,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15375
15453
|
$8tj43$createComputed(() => {
|
|
15376
15454
|
var _place_holdey_quickli, _place_holdey_quickli2;
|
|
15377
15455
|
if ((_place_holdey_quickli = place_holdey_quicklinks_data()) !== null && _place_holdey_quickli !== void 0 && (_place_holdey_quickli2 = _place_holdey_quickli[0]) !== null && _place_holdey_quickli2 !== void 0 && _place_holdey_quickli2.listing_id) {
|
|
15378
|
-
if (last_was_placeholder) queueMicrotask($8tj43$
|
|
15456
|
+
if (last_was_placeholder) queueMicrotask($8tj43$catchify1(() => {
|
|
15379
15457
|
var _sliding_element;
|
|
15380
15458
|
(_sliding_element = sliding_element) === null || _sliding_element === void 0 || _sliding_element.scrollTo({
|
|
15381
15459
|
left: 0
|
|
@@ -15445,7 +15523,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15445
15523
|
} else if (!(((_intersecting_items_o = intersecting_items_object[selected_index()]) === null || _intersecting_items_o === void 0 ? void 0 : _intersecting_items_o.intersectionRatio) >= 0.95)) {
|
|
15446
15524
|
// negated larger than to handle left side of comparison being undefined
|
|
15447
15525
|
let done_work = false;
|
|
15448
|
-
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$
|
|
15526
|
+
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$catchify1(() => {
|
|
15449
15527
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
15450
15528
|
const sel_index = selected_index();
|
|
15451
15529
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -15497,7 +15575,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
15497
15575
|
});
|
|
15498
15576
|
return (() => {
|
|
15499
15577
|
var _el$3 = $8tj43$getNextElement($43fbb365ed0ac99e$var$_tmpl$3);
|
|
15500
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
15578
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify1(ev => {
|
|
15501
15579
|
const url = href();
|
|
15502
15580
|
if (is_selected() && !$9b35d1384e31813a$export$29d28dadc2d6b631(ev) || !url)
|
|
15503
15581
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -15642,7 +15720,7 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
15642
15720
|
const handler = () => allow_filter_clearing = false;
|
|
15643
15721
|
window.addEventListener("popstate", handler); // popstate only gets called when using back/forwards button of browser or the history navigate to achieve the same, but not on pushState or replaceState
|
|
15644
15722
|
$8tj43$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
15645
|
-
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$
|
|
15723
|
+
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$catchify1(new_crumb_data => {
|
|
15646
15724
|
const id_of_new_data = id_to_query_for_();
|
|
15647
15725
|
const type_of_id_of_new_data = id_type_();
|
|
15648
15726
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && (id_of_new_data !== id_when_we_got_previous_data.id_ || type_of_id_of_new_data !== id_when_we_got_previous_data.type_)) {
|
|
@@ -15696,7 +15774,7 @@ function $a4777acaffa35a82$var$clear_if_opened_new_tab_with_sideways_url_params_
|
|
|
15696
15774
|
// On first rendering of the CategoryPage (after we have results), check if we got to this URL by going sideways in QuickLinks and clear filters with toast if so
|
|
15697
15775
|
if (!$8tj43$untrack(get_sideways_filter_clearing_flag_)) return;
|
|
15698
15776
|
set_sideways_filter_clearing_flag_(false);
|
|
15699
|
-
$8tj43$
|
|
15777
|
+
$8tj43$dlog1("Flag to clear filters was set, clearing filters");
|
|
15700
15778
|
$8tj43$queueMacroTask(() => {
|
|
15701
15779
|
// Do it next task so that all the filters have time to populate
|
|
15702
15780
|
$b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
@@ -15825,7 +15903,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15825
15903
|
// Make "Get products in listing" request to get products in listing
|
|
15826
15904
|
const [plp_products_] = $8tj43$createResource(products_query_base_,
|
|
15827
15905
|
// only first page of results, unless the history state says we should load more (can't do that in load more thing, I tested, they need to be added at once for the browser to not give up scroll restoration)
|
|
15828
|
-
$8tj43$
|
|
15906
|
+
$8tj43$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
15829
15907
|
id_: $8tj43$untrack(id_to_query_for_),
|
|
15830
15908
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15831
15909
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -15845,7 +15923,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15845
15923
|
id_type_: id_type_()
|
|
15846
15924
|
}));
|
|
15847
15925
|
// Make "Get Listing" request to get quicklinks, breadcrumbs, title, etc
|
|
15848
|
-
const [plp_meta] = $8tj43$createResource(meta_query_base, $8tj43$
|
|
15926
|
+
const [plp_meta] = $8tj43$createResource(meta_query_base, $8tj43$catchify(query => depict_api_.get_listing(query)));
|
|
15849
15927
|
const available_sortings_ = $8tj43$createMemo(() => {
|
|
15850
15928
|
var _plp_products_, _plp_products_$sorts;
|
|
15851
15929
|
return (_plp_products_ = plp_products_()) === null || _plp_products_ === void 0 ? void 0 : (_plp_products_$sorts = _plp_products_.sorts) === null || _plp_products_$sorts === void 0 ? void 0 : _plp_products_$sorts.map(sort => {
|
|
@@ -15989,7 +16067,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
15989
16067
|
filterModalParent_: filterModalParent_,
|
|
15990
16068
|
...extra_sort_and_filter_args_
|
|
15991
16069
|
});
|
|
15992
|
-
$8tj43$
|
|
16070
|
+
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
15993
16071
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
15994
16072
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
15995
16073
|
id_: id_to_query_for_,
|
|
@@ -16003,7 +16081,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
16003
16081
|
$8tj43$createComputed(() => {
|
|
16004
16082
|
if (plp_products_.loading) set_can_write_scroll_restoration(false);else if (plp_products_()) set_can_write_scroll_restoration(true);
|
|
16005
16083
|
});
|
|
16006
|
-
$8tj43$createRenderEffect($8tj43$
|
|
16084
|
+
$8tj43$createRenderEffect($8tj43$catchify(async () => {
|
|
16007
16085
|
var _only_show_filters_op;
|
|
16008
16086
|
const slim = is_slim_();
|
|
16009
16087
|
const only_show_filters_opener = (_only_show_filters_op = only_show_filters_opener_) === null || _only_show_filters_op === void 0 ? void 0 : _only_show_filters_op();
|
|
@@ -16294,4 +16372,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16294
16372
|
}, "Entire CategoryPage failed");
|
|
16295
16373
|
}
|
|
16296
16374
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
16297
|
-
export { $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $
|
|
16375
|
+
export { $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|