@depict-ai/ui 1.4.20 → 1.4.21
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 +2 -3
- package/ES10/index.d.ts +1 -1
- package/ES10/index.js +156 -157
- package/latest/index.cjs +2 -3
- package/latest/index.d.ts +1 -1
- package/latest/index.js +156 -157
- package/package.json +1 -1
- package/server/ES10/index.cjs +2 -3
- package/server/ES10/index.d.ts +1 -1
- package/server/ES10/index.js +97 -98
- package/server/latest/index.cjs +2 -3
- package/server/latest/index.d.ts +1 -1
- package/server/latest/index.js +97 -98
package/ES10/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, catchify as $8tj43$catchify, is_safari as $8tj43$is_safari, report as $8tj43$report, observer as $8tj43$observer, useExpandingContainer as $8tj43$useExpandingContainer, standard_price_format as $8tj43$standard_price_format, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, slider_fading_factory as $8tj43$slider_fading_factory, make_random_classname as $8tj43$make_random_classname, dlog as $8tj43$dlog, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, javascript_media_query as $8tj43$javascript_media_query, 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, fetch_recs as $8tj43$fetch_recs, snakeCasifyObject as $8tj43$snakeCasifyObject, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, base_url as $8tj43$base_url, get_depict_id as $8tj43$get_depict_id, get_user_id as $8tj43$get_user_id, get_session_id as $8tj43$get_session_id, make_url_with_query_params as $8tj43$make_url_with_query_params, fetch_retry as $8tj43$fetch_retry, add_version_query_params as $8tj43$add_version_query_params, dwarn as $8tj43$dwarn, sort_obj as $8tj43$sort_obj, edit_current_page_meta_tags as $8tj43$edit_current_page_meta_tags, use_href_accessor as $8tj43$use_href_accessor, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, queueMacroTask as $8tj43$queueMacroTask, is_debug as $8tj43$is_debug, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, deparallelize_no_drop as $8tj43$deparallelize_no_drop, insert_surfaces as $8tj43$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
2
|
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement, spread as $8tj43$spread, mergeProps as $8tj43$mergeProps, runHydrationEvents as $8tj43$runHydrationEvents, effect as $8tj43$effect, style as $8tj43$style, insert as $8tj43$insert, classList as $8tj43$classList, createComponent as $8tj43$createComponent, getNextMarker as $8tj43$getNextMarker, addEventListener as $8tj43$addEventListener, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, setAttribute as $8tj43$setAttribute, Dynamic as $8tj43$Dynamic, use as $8tj43$use, className as $8tj43$className, isServer as $8tj43$isServer } from "solid-js/web";
|
|
3
|
-
import { catchify as $8tj43$catchify } from "@depict-ai/utilishared/latest/ES10";
|
|
4
3
|
import { createSignal as $8tj43$createSignal, onCleanup as $8tj43$onCleanup, ErrorBoundary as $8tj43$ErrorBoundary, createMemo as $8tj43$createMemo, untrack as $8tj43$untrack, createEffect as $8tj43$createEffect, getOwner as $8tj43$getOwner, Show as $8tj43$Show, runWithOwner as $8tj43$runWithOwner, Index as $8tj43$Index, createRoot as $8tj43$createRoot, on as $8tj43$on, For as $8tj43$For, createRenderEffect as $8tj43$createRenderEffect, createComputed as $8tj43$createComputed, batch as $8tj43$batch, createResource as $8tj43$createResource, createReaction as $8tj43$createReaction, Suspense as $8tj43$Suspense } from "solid-js";
|
|
5
4
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
6
5
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
@@ -9,7 +8,7 @@ import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/def
|
|
|
9
8
|
/*! Depict.ai search and product listing SDK */
|
|
10
9
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
11
10
|
register_es_version("ui", "ES10");
|
|
12
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.
|
|
11
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "1.4.21";
|
|
13
12
|
const $56047603f9d212b6$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<img>`, 1);
|
|
14
13
|
function $56047603f9d212b6$export$e6fffe67d4cdd848(whatToWatch) {
|
|
15
14
|
const [size, setSize] = $8tj43$createSignal(0);
|
|
@@ -158,15 +157,15 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
158
157
|
$8tj43$insert(details_, [summary_, $8tj43$createComponent(ExpandingContainer, {
|
|
159
158
|
children: children
|
|
160
159
|
})], null);
|
|
161
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$
|
|
162
|
-
$8tj43$createEffect($8tj43$
|
|
160
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(details_).then($8tj43$catchify(() => set_is_in_dom(true)));
|
|
161
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
163
162
|
const is_open = is_open_memo();
|
|
164
163
|
if (!is_in_dom())
|
|
165
164
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
166
165
|
return;
|
|
167
166
|
if (dont_animate_if_instant_open_ && fresh_component && !timeout_started) {
|
|
168
167
|
timeout_started = true;
|
|
169
|
-
setTimeout($8tj43$
|
|
168
|
+
setTimeout($8tj43$catchify(() => fresh_component = false));
|
|
170
169
|
}
|
|
171
170
|
if (is_open) {
|
|
172
171
|
details_.open = true; // open up the toggle so the animation can happen
|
|
@@ -174,10 +173,10 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
174
173
|
await expand(0, do_duration);
|
|
175
174
|
} else {
|
|
176
175
|
const animation = await collapse();
|
|
177
|
-
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$
|
|
176
|
+
animation === null || animation === void 0 || animation.addEventListener("finish", $8tj43$catchify(() => details_.open = false));
|
|
178
177
|
}
|
|
179
178
|
}));
|
|
180
|
-
details_.addEventListener("toggle", $8tj43$
|
|
179
|
+
details_.addEventListener("toggle", $8tj43$catchify(() => {
|
|
181
180
|
const {
|
|
182
181
|
open: open
|
|
183
182
|
} = details_;
|
|
@@ -187,11 +186,11 @@ function $ad371564683947ab$export$6c6d7a51fa9aa15d(props) {
|
|
|
187
186
|
}) // in case someone somehow toggles it without us intercepting it at least follow suit
|
|
188
187
|
);
|
|
189
188
|
|
|
190
|
-
summary_.addEventListener("click", $8tj43$
|
|
189
|
+
summary_.addEventListener("click", $8tj43$catchify(ev => {
|
|
191
190
|
ev.preventDefault();
|
|
192
191
|
toggle();
|
|
193
192
|
}));
|
|
194
|
-
summary_.addEventListener("keydown", $8tj43$
|
|
193
|
+
summary_.addEventListener("keydown", $8tj43$catchify(ev => {
|
|
195
194
|
const {
|
|
196
195
|
key: key
|
|
197
196
|
} = ev;
|
|
@@ -288,7 +287,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
288
287
|
} = _ref;
|
|
289
288
|
let close_toast_;
|
|
290
289
|
const stay_open_promise = new Promise(r => close_toast_ = r);
|
|
291
|
-
$8tj43$
|
|
290
|
+
$8tj43$catchify(async () => {
|
|
292
291
|
const closing_animation_duration = 300; // ms
|
|
293
292
|
const element = (() => {
|
|
294
293
|
const _el$ = $8tj43$getNextElement($a61a2051e15c8d7a$var$_tmpl$);
|
|
@@ -299,8 +298,8 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
299
298
|
})();
|
|
300
299
|
const [, set_is_showing_toast] = $a61a2051e15c8d7a$export$22970a0140fc759c;
|
|
301
300
|
// if this is a memory leak the garbage collector is stupid - does someone know?
|
|
302
|
-
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$
|
|
303
|
-
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$
|
|
301
|
+
for (const ev of ["pointerover", "focusin"]) element.addEventListener(ev, $8tj43$catchify(() => closing_animation.pause()));
|
|
302
|
+
for (const ev of ["pointerout", "focusout"]) element.addEventListener(ev, $8tj43$catchify(() => closing_animation.play()));
|
|
304
303
|
const body = await (0, $8tj43$observer).wait_for_element("body");
|
|
305
304
|
const x_translate = "translateX(-50%) ";
|
|
306
305
|
let remove_keyboard_listener;
|
|
@@ -325,7 +324,7 @@ function $a61a2051e15c8d7a$export$5196e4c01fa56fcb(_ref) {
|
|
|
325
324
|
// let other toasts close us if they open while we're still here
|
|
326
325
|
$a61a2051e15c8d7a$var$closing_functions.add(close_toast_);
|
|
327
326
|
set_is_showing_toast(true);
|
|
328
|
-
const handler = $8tj43$
|
|
327
|
+
const handler = $8tj43$catchify(_ref2 => {
|
|
329
328
|
let {
|
|
330
329
|
key: key
|
|
331
330
|
} = _ref2;
|
|
@@ -432,7 +431,7 @@ function $b4465d8d605f61e9$export$8895d39404bd2bb1(props) {
|
|
|
432
431
|
const _el$2 = $8tj43$getNextElement($b4465d8d605f61e9$var$_tmpl$2),
|
|
433
432
|
_el$3 = _el$2.firstChild,
|
|
434
433
|
_el$4 = _el$3.nextSibling;
|
|
435
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
434
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => {
|
|
436
435
|
set_selected_filters(previous_selected_filters);
|
|
437
436
|
set_expanded_hierarchical_filters(previous_expanded_hierarchical_filters);
|
|
438
437
|
if (also_clear_sorting_ && previous_sorting) props.current_sorting_[1](previous_sorting);
|
|
@@ -515,7 +514,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
515
514
|
get children() {
|
|
516
515
|
return [(() => {
|
|
517
516
|
const _el$6 = $8tj43$getNextElement($4711a82d08d2021b$var$_tmpl$);
|
|
518
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
517
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify(() =>
|
|
519
518
|
// click event handlers don't have an owner, carry it over
|
|
520
519
|
$8tj43$runWithOwner(owner, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
521
520
|
selected_filters_: selected_filters_,
|
|
@@ -712,7 +711,7 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
712
711
|
_el$28 = _el$26.firstChild,
|
|
713
712
|
[_el$29, _co$10] = $8tj43$getNextMarker(_el$28.nextSibling),
|
|
714
713
|
_el$27 = _el$29.nextSibling;
|
|
715
|
-
$8tj43$addEventListener(_el$26, "click", $8tj43$
|
|
714
|
+
$8tj43$addEventListener(_el$26, "click", $8tj43$catchify(() => {
|
|
716
715
|
const to_remove = selected_data();
|
|
717
716
|
const cloned_selected_filters = [...read_selected_filters()];
|
|
718
717
|
cloned_selected_filters.splice(index_in_selected_filters, 1);
|
|
@@ -768,9 +767,9 @@ function $4711a82d08d2021b$export$fecbb157621501bd(_ref) {
|
|
|
768
767
|
});
|
|
769
768
|
const [is_in_dom, set_is_in_dom] = $8tj43$createSignal(document.documentElement.contains(outmost_element));
|
|
770
769
|
const hidden = $8tj43$createMemo(() => get_search_filters_open_() || get_search_sorting_open_());
|
|
771
|
-
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$
|
|
770
|
+
if (!$8tj43$untrack(is_in_dom)) (0, $8tj43$observer).wait_for_element(outmost_element).then($8tj43$catchify(() => set_is_in_dom(true)));
|
|
772
771
|
outmost_element.classList.add("selected-filters");
|
|
773
|
-
$8tj43$createEffect($8tj43$
|
|
772
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
774
773
|
if (!is_in_dom())
|
|
775
774
|
// wait with setting state until we're in DOM, animation won't work otherwise
|
|
776
775
|
return;
|
|
@@ -808,7 +807,7 @@ const $6b73914551534ea8$export$48513f6b9f8ce62d = props => {
|
|
|
808
807
|
// 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.
|
|
809
808
|
// 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
|
|
810
809
|
// Why it can't be done instantaneously I don't know.
|
|
811
|
-
input_el.addEventListener("change", $8tj43$
|
|
810
|
+
input_el.addEventListener("change", $8tj43$catchify(() => requestAnimationFrame($8tj43$catchify(() => {
|
|
812
811
|
if (input_el.checked !== checked()) input_el.checked = checked();
|
|
813
812
|
}))));
|
|
814
813
|
(_props$input_ref_ = props.input_ref_) === null || _props$input_ref_ === void 0 || _props$input_ref_.call(props, input_el);
|
|
@@ -868,7 +867,7 @@ function $3e850b2f2cca761f$export$ca21a16d65b3dd8(_ref) {
|
|
|
868
867
|
_el$3 = _el$.firstChild,
|
|
869
868
|
[_el$4, _co$] = $8tj43$getNextMarker(_el$3.nextSibling),
|
|
870
869
|
_el$2 = _el$4.nextSibling;
|
|
871
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
870
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify(() => set_show_extras(p => !p)), true);
|
|
872
871
|
$8tj43$insert(_el$, $8tj43$createComponent((0, $ff3225aef892a467$export$f21ab0717a89c77f), {}), _el$4, _co$);
|
|
873
872
|
$8tj43$insert(_el$2, (() => {
|
|
874
873
|
const _c$ = $8tj43$memo(() => !!get_show_extras());
|
|
@@ -966,7 +965,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
966
965
|
i18n_: i18n_
|
|
967
966
|
}) : []);
|
|
968
967
|
});
|
|
969
|
-
$8tj43$createEffect($8tj43$
|
|
968
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
970
969
|
if (!togglable_rest()) {
|
|
971
970
|
await collapse();
|
|
972
971
|
return;
|
|
@@ -979,7 +978,7 @@ function $133484ef10e4e954$export$dd948f91abc3a1c4(_ref) {
|
|
|
979
978
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
980
979
|
_el$4 = _el$3.nextSibling,
|
|
981
980
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
982
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
981
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify(() => {
|
|
983
982
|
const set_filter = existing_filter();
|
|
984
983
|
const {
|
|
985
984
|
field: field,
|
|
@@ -1060,7 +1059,7 @@ function $b54fc842e721c9eb$export$430444115f70a734(_ref) {
|
|
|
1060
1059
|
_el$9 = _el$3.nextSibling,
|
|
1061
1060
|
[_el$10, _co$2] = $8tj43$getNextMarker(_el$9.nextSibling);
|
|
1062
1061
|
$8tj43$setAttribute(_el$2, "for", random_selector);
|
|
1063
|
-
$8tj43$addEventListener(_el$4, "change", $8tj43$
|
|
1062
|
+
$8tj43$addEventListener(_el$4, "change", $8tj43$catchify(() => {
|
|
1064
1063
|
const filter_object = {
|
|
1065
1064
|
op: filter_().op,
|
|
1066
1065
|
field: filter_().field,
|
|
@@ -1133,7 +1132,7 @@ function $1e7465a8ffa97f6c$export$e0d834a0ad870cda(_ref) {
|
|
|
1133
1132
|
});
|
|
1134
1133
|
$8tj43$createComputed(() => {
|
|
1135
1134
|
clearTimeout(debounce_timeout);
|
|
1136
|
-
debounce_timeout = setTimeout($8tj43$
|
|
1135
|
+
debounce_timeout = setTimeout($8tj43$catchify(range => $8tj43$untrack(() => {
|
|
1137
1136
|
const default_data = filter_().data;
|
|
1138
1137
|
const filter_object = {
|
|
1139
1138
|
op: filter_().op,
|
|
@@ -1211,22 +1210,22 @@ function $1e7465a8ffa97f6c$var$RangeSelector(_ref3) {
|
|
|
1211
1210
|
[_el$22, _co$6] = $8tj43$getNextMarker(_el$21.nextSibling);
|
|
1212
1211
|
const _ref$ = price_input_1;
|
|
1213
1212
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$4) : price_input_1 = _el$4;
|
|
1214
|
-
$8tj43$addEventListener(_el$4, "keydown", $8tj43$
|
|
1213
|
+
$8tj43$addEventListener(_el$4, "keydown", $8tj43$catchify(_ref4 => {
|
|
1215
1214
|
let {
|
|
1216
1215
|
key: key
|
|
1217
1216
|
} = _ref4;
|
|
1218
1217
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1);
|
|
1219
1218
|
}), true);
|
|
1220
|
-
$8tj43$addEventListener(_el$4, "blur", $8tj43$
|
|
1219
|
+
$8tj43$addEventListener(_el$4, "blur", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, price_input_1)));
|
|
1221
1220
|
const _ref$2 = price_input_2;
|
|
1222
1221
|
typeof _ref$2 === "function" ? $8tj43$use(_ref$2, _el$7) : price_input_2 = _el$7;
|
|
1223
|
-
$8tj43$addEventListener(_el$7, "keydown", $8tj43$
|
|
1222
|
+
$8tj43$addEventListener(_el$7, "keydown", $8tj43$catchify(_ref5 => {
|
|
1224
1223
|
let {
|
|
1225
1224
|
key: key
|
|
1226
1225
|
} = _ref5;
|
|
1227
1226
|
if (key === "Enter") $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2);
|
|
1228
1227
|
}), true);
|
|
1229
|
-
$8tj43$addEventListener(_el$7, "blur", $8tj43$
|
|
1228
|
+
$8tj43$addEventListener(_el$7, "blur", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, price_input_2)));
|
|
1230
1229
|
$8tj43$insert(_el$, $8tj43$createComponent($1e7465a8ffa97f6c$var$ExponentialSlider, {
|
|
1231
1230
|
max_: max_,
|
|
1232
1231
|
min_: min_,
|
|
@@ -1354,7 +1353,7 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref9) {
|
|
|
1354
1353
|
return [(() => {
|
|
1355
1354
|
const _el$25 = $8tj43$getNextElement($1e7465a8ffa97f6c$var$_tmpl$2),
|
|
1356
1355
|
_el$26 = _el$25.firstChild;
|
|
1357
|
-
$8tj43$addEventListener(_el$25, "click", $8tj43$
|
|
1356
|
+
$8tj43$addEventListener(_el$25, "click", $8tj43$catchify(e => {
|
|
1358
1357
|
const rect = clickable_slider.getBoundingClientRect();
|
|
1359
1358
|
const slider_beginning_left = rect.left;
|
|
1360
1359
|
const slider_width = rect.width;
|
|
@@ -1380,12 +1379,12 @@ function $1e7465a8ffa97f6c$var$LinearSlider(_ref9) {
|
|
|
1380
1379
|
range_input_1 = el;
|
|
1381
1380
|
set_value(range_input_1, 0);
|
|
1382
1381
|
}, _el$28);
|
|
1383
|
-
$8tj43$addEventListener(_el$28, "input", $8tj43$
|
|
1382
|
+
$8tj43$addEventListener(_el$28, "input", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 0, range_input_1, offset_value_calculator_)), true);
|
|
1384
1383
|
$8tj43$use(el => {
|
|
1385
1384
|
range_input_2 = el;
|
|
1386
1385
|
set_value(range_input_2, 1);
|
|
1387
1386
|
}, _el$29);
|
|
1388
|
-
$8tj43$addEventListener(_el$29, "input", $8tj43$
|
|
1387
|
+
$8tj43$addEventListener(_el$29, "input", $8tj43$catchify(() => $1e7465a8ffa97f6c$var$set_range_with_sanitation(min_, max_, current_range_, 1, range_input_2, offset_value_calculator_)), true);
|
|
1389
1388
|
$8tj43$effect(_p$ => {
|
|
1390
1389
|
const _v$7 = i18n_.range_filter_low_point_aria_label_(),
|
|
1391
1390
|
_v$8 = min_(),
|
|
@@ -1458,7 +1457,7 @@ function $457279ff15864cb9$export$e5c2828934226505(_ref) {
|
|
|
1458
1457
|
return _el$;
|
|
1459
1458
|
})();
|
|
1460
1459
|
const [is_in_dom, set_is_in_dom] = $8tj43$createSignal(false);
|
|
1461
|
-
(0, $8tj43$observer).wait_for_element(outer_div).then($8tj43$
|
|
1460
|
+
(0, $8tj43$observer).wait_for_element(outer_div).then($8tj43$catchify(() => set_is_in_dom(true)));
|
|
1462
1461
|
$8tj43$createEffect(() => {
|
|
1463
1462
|
if (!is_in_dom())
|
|
1464
1463
|
// wait for us to being in DOM as animations don't work otherwise
|
|
@@ -1616,7 +1615,7 @@ function $0ae614c5c7babb43$export$a32086fa6616eafd(_ref) {
|
|
|
1616
1615
|
i18n_: i18n_
|
|
1617
1616
|
}) : []);
|
|
1618
1617
|
});
|
|
1619
|
-
$8tj43$createEffect($8tj43$
|
|
1618
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
1620
1619
|
if (!some_top_level_are_hidden()) {
|
|
1621
1620
|
await collapse();
|
|
1622
1621
|
return;
|
|
@@ -1683,7 +1682,7 @@ function $0ae614c5c7babb43$var$render_stuff(data, existing_filter, i18n_) {
|
|
|
1683
1682
|
return (_value$is_checked_$ = (_value6 = value()) === null || _value6 === void 0 ? void 0 : (_value6$is_checked_ = _value6.is_checked_) === null || _value6$is_checked_ === void 0 ? void 0 : (_value6$is_checked_$ = _value6$is_checked_[0]) === null || _value6$is_checked_$ === void 0 ? void 0 : _value6$is_checked_$.call(_value6$is_checked_)) !== null && _value$is_checked_$ !== void 0 ? _value$is_checked_$ : false;
|
|
1684
1683
|
},
|
|
1685
1684
|
input_ref_: input => {
|
|
1686
|
-
input.addEventListener("change", $8tj43$
|
|
1685
|
+
input.addEventListener("change", $8tj43$catchify(() => $8tj43$untrack(() => {
|
|
1687
1686
|
var _value8;
|
|
1688
1687
|
const {
|
|
1689
1688
|
checked: checked
|
|
@@ -1782,7 +1781,7 @@ function $0ae614c5c7babb43$var$batching_filter_state_syncer(props) {
|
|
|
1782
1781
|
existing_filter_: existing_filter_
|
|
1783
1782
|
} = props;
|
|
1784
1783
|
let sync_queued = false;
|
|
1785
|
-
const sync_fn = $8tj43$
|
|
1784
|
+
const sync_fn = $8tj43$catchify(async () => {
|
|
1786
1785
|
sync_queued = false;
|
|
1787
1786
|
// if we change, update filter state - next microtask, so that "reactions" to the change can process before we send it off to the API
|
|
1788
1787
|
const set_filter = existing_filter_();
|
|
@@ -1844,13 +1843,13 @@ function $0ae614c5c7babb43$var$create_updating_signal(_ref3) {
|
|
|
1844
1843
|
$8tj43$createComputed($8tj43$on(read_checked, trigger_sync_, {
|
|
1845
1844
|
defer: true
|
|
1846
1845
|
}));
|
|
1847
|
-
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$
|
|
1846
|
+
$8tj43$createComputed($8tj43$on(read_checked, $8tj43$catchify(new_value => {
|
|
1848
1847
|
if (updating_blocked) return;
|
|
1849
1848
|
for (const child of child_objects) child.is_checked_[1](new_value);
|
|
1850
1849
|
}), {
|
|
1851
1850
|
defer: true
|
|
1852
1851
|
}));
|
|
1853
|
-
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$
|
|
1852
|
+
$8tj43$createEffect($8tj43$on(get_child_object_values, $8tj43$catchify(() => {
|
|
1854
1853
|
const all_kids_checked = get_child_object_values.every(accessor => accessor());
|
|
1855
1854
|
if (all_kids_checked === read_checked()) return;
|
|
1856
1855
|
updating_blocked = true;
|
|
@@ -1991,7 +1990,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
1991
1990
|
});
|
|
1992
1991
|
return (() => {
|
|
1993
1992
|
const _el$2 = $8tj43$getNextElement($830ea8efda59884e$var$_tmpl$2);
|
|
1994
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
1993
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => {
|
|
1995
1994
|
const set_filter = existing_filter();
|
|
1996
1995
|
const {
|
|
1997
1996
|
field: field,
|
|
@@ -2160,7 +2159,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2160
2159
|
i18n_: i18n_
|
|
2161
2160
|
}) : []);
|
|
2162
2161
|
});
|
|
2163
|
-
$8tj43$createEffect($8tj43$
|
|
2162
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
2164
2163
|
if (!togglable_rest()) {
|
|
2165
2164
|
await collapse();
|
|
2166
2165
|
set_having_expanding_in_dom(false); // Once animation has finished, remove expanding from DOM
|
|
@@ -2175,7 +2174,7 @@ function $2cb856c297c53e6c$export$82ed4b28ecb67608(_ref) {
|
|
|
2175
2174
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
2176
2175
|
_el$4 = _el$3.nextSibling,
|
|
2177
2176
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
2178
|
-
$8tj43$addEventListener(_el$, "change", $8tj43$
|
|
2177
|
+
$8tj43$addEventListener(_el$, "change", $8tj43$catchify(() => {
|
|
2179
2178
|
const set_filter = existing_filter();
|
|
2180
2179
|
const {
|
|
2181
2180
|
field: field,
|
|
@@ -2589,7 +2588,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
2589
2588
|
_el$7 = _el$5.firstChild,
|
|
2590
2589
|
[_el$8, _co$] = $8tj43$getNextMarker(_el$7.nextSibling),
|
|
2591
2590
|
_el$6 = _el$8.nextSibling;
|
|
2592
|
-
$8tj43$addEventListener(_el$5, "click", $8tj43$
|
|
2591
|
+
$8tj43$addEventListener(_el$5, "click", $8tj43$catchify(() => {
|
|
2593
2592
|
const new_filter_obj = [...props.selected_filters_[0]()];
|
|
2594
2593
|
for (const filter of filter_array_()) {
|
|
2595
2594
|
const index = new_filter_obj.findIndex(_ref2 => {
|
|
@@ -2661,7 +2660,7 @@ function $f6b0500577e1b210$var$ActualFilterBody(props) {
|
|
|
2661
2660
|
},
|
|
2662
2661
|
get children() {
|
|
2663
2662
|
const _el$25 = $8tj43$getNextElement($f6b0500577e1b210$var$_tmpl$8);
|
|
2664
|
-
$8tj43$addEventListener(_el$25, "click", $8tj43$
|
|
2663
|
+
$8tj43$addEventListener(_el$25, "click", $8tj43$catchify(() => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
2665
2664
|
user_triggered_: true,
|
|
2666
2665
|
selected_filters_: props.selected_filters_,
|
|
2667
2666
|
i18n_: props.i18n_,
|
|
@@ -2892,7 +2891,7 @@ function $63f1f8dbcd07d3b0$var$ActualSolidLayout(props, container_element) {
|
|
|
2892
2891
|
const view_less_button_class = $8tj43$make_random_classname();
|
|
2893
2892
|
const view_more_button_container = $8tj43$createMemo(() => have_a_view_more_button() && (() => {
|
|
2894
2893
|
const _el$2 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
2895
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
2894
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => set_rows_visible()(prev => {
|
|
2896
2895
|
var _rows_or_empty_object2;
|
|
2897
2896
|
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);
|
|
2898
2897
|
})), true);
|
|
@@ -2904,7 +2903,7 @@ function $63f1f8dbcd07d3b0$var$ActualSolidLayout(props, container_element) {
|
|
|
2904
2903
|
// 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
|
|
2905
2904
|
const view_less_button_container = $8tj43$createMemo(() => have_a_view_less_button() && (() => {
|
|
2906
2905
|
const _el$3 = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
2907
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
2906
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => set_rows_visible()(() => {
|
|
2908
2907
|
var _rows_or_empty_object3;
|
|
2909
2908
|
return (_rows_or_empty_object3 = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object3 !== void 0 ? _rows_or_empty_object3 : 1;
|
|
2910
2909
|
})), true);
|
|
@@ -2928,7 +2927,7 @@ function $63f1f8dbcd07d3b0$var$ActualSolidLayout(props, container_element) {
|
|
|
2928
2927
|
return;
|
|
2929
2928
|
}
|
|
2930
2929
|
update_children_count();
|
|
2931
|
-
const mutation_observer = new MutationObserver($8tj43$
|
|
2930
|
+
const mutation_observer = new MutationObserver($8tj43$catchify(update_children_count));
|
|
2932
2931
|
mutation_observer.observe(container_element, {
|
|
2933
2932
|
childList: true
|
|
2934
2933
|
});
|
|
@@ -2994,7 +2993,7 @@ async function $d5f1e6a0f9117286$export$79b1565500412d9b(search_modal, modal_fn_
|
|
|
2994
2993
|
actually_close();else if (!animation_started && closing_animation) {
|
|
2995
2994
|
var _catchify;
|
|
2996
2995
|
animation_started = +new Date();
|
|
2997
|
-
(_catchify = $8tj43$
|
|
2996
|
+
(_catchify = $8tj43$catchify(closing_animation)()) === null || _catchify === void 0 || _catchify.then($8tj43$catchify(actually_close));
|
|
2998
2997
|
} else actually_close();
|
|
2999
2998
|
};
|
|
3000
2999
|
return search_modal({
|
|
@@ -3036,7 +3035,7 @@ async function $5c5732ef44f05b26$export$58e808b1db15d3bc(_ref) {
|
|
|
3036
3035
|
function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, router_) {
|
|
3037
3036
|
const signals = {};
|
|
3038
3037
|
const entries = Object.entries(params_to_default_value);
|
|
3039
|
-
const event_handler = $8tj43$
|
|
3038
|
+
const event_handler = $8tj43$catchify((what_happened, args) => {
|
|
3040
3039
|
if (what_happened == "popstate") $972f6bce0f9d61be$var$history_state_change(signals, entries, args.state);
|
|
3041
3040
|
});
|
|
3042
3041
|
// createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
|
|
@@ -3061,8 +3060,8 @@ function $972f6bce0f9d61be$export$e183a13865960371(params_to_default_value, rout
|
|
|
3061
3060
|
});
|
|
3062
3061
|
// 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
|
|
3063
3062
|
(0, $8tj43$instant_exec_on_suspect_history_change).add(event_handler);
|
|
3064
|
-
$8tj43$onCleanup($8tj43$
|
|
3065
|
-
$8tj43$createEffect($8tj43$
|
|
3063
|
+
$8tj43$onCleanup($8tj43$catchify(() => (0, $8tj43$instant_exec_on_suspect_history_change).delete(event_handler)));
|
|
3064
|
+
$8tj43$createEffect($8tj43$catchify(() => $8tj43$untrack($8tj43$catchify(() => $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
|
|
3066
3065
|
return signals;
|
|
3067
3066
|
}
|
|
3068
3067
|
function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
@@ -3316,7 +3315,7 @@ function $284849364a6ef73a$var$_get_cache_obj_for_endpoint2(endpoint) {
|
|
|
3316
3315
|
return (_classPrivateFieldGet5 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs))[endpoint] || (_classPrivateFieldGet5[endpoint] = {
|
|
3317
3316
|
in_progress_: {},
|
|
3318
3317
|
cache_: {},
|
|
3319
|
-
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$
|
|
3318
|
+
finalization_registry_: $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_supports_finalization_registry) ? new FinalizationRegistry($8tj43$catchify(key => {
|
|
3320
3319
|
const our_cache = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $284849364a6ef73a$var$_cache_objs)[endpoint].cache_;
|
|
3321
3320
|
$8tj43$dlog("[Search API]: removing", key, "from", our_cache);
|
|
3322
3321
|
delete our_cache[key];
|
|
@@ -3453,11 +3452,11 @@ async function $284849364a6ef73a$var$_cached_post_request2(endpoint, input_req,
|
|
|
3453
3452
|
result = $ed0fefda39a0f15d$export$967e966fca9515e(result);
|
|
3454
3453
|
cache_obj.cache_[body] = new WeakRef(result);
|
|
3455
3454
|
resolve_in_progress(result);
|
|
3456
|
-
setTimeout($8tj43$
|
|
3455
|
+
setTimeout($8tj43$catchify(() => {
|
|
3457
3456
|
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
|
|
3458
3457
|
else
|
|
3459
3458
|
// delete things from cache after 5 minutes, so it doesn't get too heavy
|
|
3460
|
-
setTimeout($8tj43$
|
|
3459
|
+
setTimeout($8tj43$catchify(() => delete cache_obj.cache_[body]), 300000);
|
|
3461
3460
|
}), 60000 // cache values for at least 60 seconds
|
|
3462
3461
|
);
|
|
3463
3462
|
|
|
@@ -3548,7 +3547,7 @@ function $43fbdca0f726a34b$export$92f2da32c6e7e7ee(_ref) {
|
|
|
3548
3547
|
}
|
|
3549
3548
|
function $33e7d1906c93db7d$export$205efb947c7ffd78(handler) {
|
|
3550
3549
|
let passive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
3551
|
-
const catchified_handler = $8tj43$
|
|
3550
|
+
const catchified_handler = $8tj43$catchify(handler);
|
|
3552
3551
|
const owner = $8tj43$getOwner();
|
|
3553
3552
|
// 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.
|
|
3554
3553
|
// Use observer in case that this gets called before body exists
|
|
@@ -3667,7 +3666,7 @@ function $b69740fc6de9f17e$export$83fd5de5504a7a67(_ref) {
|
|
|
3667
3666
|
fill: "forwards",
|
|
3668
3667
|
easing: "ease-in-out"
|
|
3669
3668
|
});
|
|
3670
|
-
animation.addEventListener("finish", $8tj43$
|
|
3669
|
+
animation.addEventListener("finish", $8tj43$catchify(() => {
|
|
3671
3670
|
if (unpermit_when_possible) set_permitted_to_show(false);
|
|
3672
3671
|
animation = undefined;
|
|
3673
3672
|
element.style.display = "none";
|
|
@@ -3729,7 +3728,7 @@ function $94af29837186eb21$export$ef6006467f04ee41(_ref) {
|
|
|
3729
3728
|
},
|
|
3730
3729
|
get children() {
|
|
3731
3730
|
const _el$3 = $8tj43$getNextElement($94af29837186eb21$var$_tmpl$);
|
|
3732
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
3731
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(() => $8tj43$runWithOwner(root, () => $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
3733
3732
|
user_triggered_: true,
|
|
3734
3733
|
selected_filters_: selected_filters_,
|
|
3735
3734
|
also_clear_sorting_: false,
|
|
@@ -3869,7 +3868,7 @@ function $6d2962bc9370f884$export$5e4aed86c12acdd9(_ref) {
|
|
|
3869
3868
|
last_loaded = +new Date();
|
|
3870
3869
|
is_first_load = true;
|
|
3871
3870
|
});
|
|
3872
|
-
$8tj43$createEffect($8tj43$
|
|
3871
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
3873
3872
|
const be_above_percentage = is_first_load ? 50 : 75; // if first load, load earlier
|
|
3874
3873
|
if (percentage_in_view_() < be_above_percentage || is_loading_more) return;
|
|
3875
3874
|
if (!get_last_cursor()) {
|
|
@@ -4042,7 +4041,7 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
4042
4041
|
const target_to_index_map = new Map();
|
|
4043
4042
|
const index_to_target_map_ = new Map();
|
|
4044
4043
|
const currently_intersecting = new Set();
|
|
4045
|
-
const intersection_observer = new IntersectionObserver($8tj43$
|
|
4044
|
+
const intersection_observer = new IntersectionObserver($8tj43$catchify(records => {
|
|
4046
4045
|
for (let i = 0; i < records.length; i++) {
|
|
4047
4046
|
const record = records[i];
|
|
4048
4047
|
const {
|
|
@@ -4379,7 +4378,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
4379
4378
|
_el$13 = _el$12.nextSibling,
|
|
4380
4379
|
_el$14 = _el$13.nextSibling,
|
|
4381
4380
|
[_el$15, _co$2] = $8tj43$getNextMarker(_el$14.nextSibling);
|
|
4382
|
-
$8tj43$addEventListener(_el$12, "change", $8tj43$
|
|
4381
|
+
$8tj43$addEventListener(_el$12, "change", $8tj43$catchify(() => set_current_sorting(item())));
|
|
4383
4382
|
$8tj43$setAttribute(_el$12, "name", title_radio_name);
|
|
4384
4383
|
$8tj43$insert(_el$11, () => item().meta.title, _el$15, _co$2);
|
|
4385
4384
|
$8tj43$effect(() => _el$12.checked = is_checked());
|
|
@@ -4413,7 +4412,7 @@ function $cfdbd124dd09d713$export$1f1775a58da589b5(_ref) {
|
|
|
4413
4412
|
_el$19 = _el$18.nextSibling,
|
|
4414
4413
|
_el$20 = _el$19.nextSibling,
|
|
4415
4414
|
[_el$21, _co$3] = $8tj43$getNextMarker(_el$20.nextSibling);
|
|
4416
|
-
$8tj43$addEventListener(_el$18, "change", $8tj43$
|
|
4415
|
+
$8tj43$addEventListener(_el$18, "change", $8tj43$catchify(() => set_current_sorting(c => c && {
|
|
4417
4416
|
...c,
|
|
4418
4417
|
order: order_value()
|
|
4419
4418
|
})));
|
|
@@ -4444,7 +4443,7 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
4444
4443
|
offset: 0
|
|
4445
4444
|
}, 1);
|
|
4446
4445
|
animation.pause();
|
|
4447
|
-
const fn = $8tj43$
|
|
4446
|
+
const fn = $8tj43$catchify(animation.play.bind(animation));
|
|
4448
4447
|
cleanup_fns.push(fn);
|
|
4449
4448
|
$8tj43$onCleanup(fn);
|
|
4450
4449
|
} catch (e) {
|
|
@@ -4455,7 +4454,7 @@ function $e56d241d0f33d459$export$fe334901e8bebd57() {
|
|
|
4455
4454
|
const style = element.style;
|
|
4456
4455
|
const original_value = style.overflow;
|
|
4457
4456
|
style.overflow = "hidden";
|
|
4458
|
-
const fn = $8tj43$
|
|
4457
|
+
const fn = $8tj43$catchify(() => style.overflow = original_value);
|
|
4459
4458
|
cleanup_fns.push(fn);
|
|
4460
4459
|
$8tj43$onCleanup(fn);
|
|
4461
4460
|
}
|
|
@@ -4541,7 +4540,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4541
4540
|
set_search_sorting_open(true);
|
|
4542
4541
|
}
|
|
4543
4542
|
});
|
|
4544
|
-
$8tj43$onCleanup($8tj43$
|
|
4543
|
+
$8tj43$onCleanup($8tj43$catchify(() => {
|
|
4545
4544
|
if (!sorting_expanded() && !filters_expanded()) {
|
|
4546
4545
|
set_search_filters_open(false);
|
|
4547
4546
|
set_search_sorting_open(false);
|
|
@@ -4573,7 +4572,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4573
4572
|
_el$12 = _el$14.nextSibling;
|
|
4574
4573
|
$8tj43$use(el => {
|
|
4575
4574
|
background = el;
|
|
4576
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
4575
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify(() => {
|
|
4577
4576
|
set_background_style("transition", "all 200ms ease-in");
|
|
4578
4577
|
set_background_style("opacity", "1");
|
|
4579
4578
|
}));
|
|
@@ -4581,7 +4580,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4581
4580
|
$8tj43$addEventListener(_el$2, "click", dismiss_modal_, true);
|
|
4582
4581
|
$8tj43$use(el => {
|
|
4583
4582
|
dismiss_button = el;
|
|
4584
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
4583
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify(() => {
|
|
4585
4584
|
set_button_style("transition", "all 200ms ease-in");
|
|
4586
4585
|
set_button_fraction_in(1);
|
|
4587
4586
|
}));
|
|
@@ -4615,7 +4614,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4615
4614
|
let last_move_page_y = start_page_y;
|
|
4616
4615
|
let first_move_was_downwards = false;
|
|
4617
4616
|
let distance_from_start_of_gesture = 0;
|
|
4618
|
-
const end_handler = $8tj43$
|
|
4617
|
+
const end_handler = $8tj43$catchify(e => {
|
|
4619
4618
|
const changedTouches = e === null || e === void 0 ? void 0 : e.changedTouches;
|
|
4620
4619
|
if (changedTouches && changedTouches[0].identifier !== our_fingers_identifier)
|
|
4621
4620
|
// other finger stopped touch, ignore it
|
|
@@ -4639,7 +4638,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4639
4638
|
modal.removeEventListener("touchcancel", end_handler);
|
|
4640
4639
|
modal.removeEventListener("touchmove", move_handler);
|
|
4641
4640
|
});
|
|
4642
|
-
const move_handler = $8tj43$
|
|
4641
|
+
const move_handler = $8tj43$catchify(e => {
|
|
4643
4642
|
const {
|
|
4644
4643
|
changedTouches: changedTouches
|
|
4645
4644
|
} = e;
|
|
@@ -4689,7 +4688,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4689
4688
|
};
|
|
4690
4689
|
$8tj43$use(el => {
|
|
4691
4690
|
modal = el;
|
|
4692
|
-
(0, $8tj43$observer).wait_for_element(el).then($8tj43$
|
|
4691
|
+
(0, $8tj43$observer).wait_for_element(el).then($8tj43$catchify(() => {
|
|
4693
4692
|
set_modal_style("transition", "all 200ms ease-in");
|
|
4694
4693
|
set_modal_style("transform", "translateY(0)");
|
|
4695
4694
|
}));
|
|
@@ -4775,7 +4774,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4775
4774
|
},
|
|
4776
4775
|
get children() {
|
|
4777
4776
|
const _el$11 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$);
|
|
4778
|
-
$8tj43$addEventListener(_el$11, "click", $8tj43$
|
|
4777
|
+
$8tj43$addEventListener(_el$11, "click", $8tj43$catchify(() => {
|
|
4779
4778
|
const show_toast = $b4465d8d605f61e9$export$8895d39404bd2bb1({
|
|
4780
4779
|
user_triggered_: true,
|
|
4781
4780
|
expanded_hierarchical_filters_: args_for_filtering_.expanded_hierarchical_filters_,
|
|
@@ -4785,7 +4784,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
4785
4784
|
also_clear_sorting_: false,
|
|
4786
4785
|
delay_toast_: true
|
|
4787
4786
|
});
|
|
4788
|
-
cleanup_promise.then($8tj43$
|
|
4787
|
+
cleanup_promise.then($8tj43$catchify(show_toast));
|
|
4789
4788
|
}), true);
|
|
4790
4789
|
$8tj43$insert(_el$11, () => i18n_.clear_individual_filter_());
|
|
4791
4790
|
$8tj43$runHydrationEvents();
|
|
@@ -4859,7 +4858,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4859
4858
|
const [sorting_open, set_sorting_open] = search_sorting_open_;
|
|
4860
4859
|
const [get_current_sorting_] = current_sorting_;
|
|
4861
4860
|
const [is_small, set_is_small] = $8tj43$createSignal(false);
|
|
4862
|
-
const dismiss_modal_ = $8tj43$
|
|
4861
|
+
const dismiss_modal_ = $8tj43$catchify(() => {
|
|
4863
4862
|
set_filters_open(false);
|
|
4864
4863
|
set_sorting_open(false);
|
|
4865
4864
|
});
|
|
@@ -4957,7 +4956,7 @@ function $7396052a1484264f$export$d7841e452f2e59a8(_ref) {
|
|
|
4957
4956
|
})());
|
|
4958
4957
|
}
|
|
4959
4958
|
});
|
|
4960
|
-
$8tj43$
|
|
4959
|
+
$8tj43$catchify(async () => {
|
|
4961
4960
|
({
|
|
4962
4961
|
open_modal_: open_modal_,
|
|
4963
4962
|
close_modal_: close_modal_
|
|
@@ -5038,7 +5037,7 @@ function $7396052a1484264f$var$OpenFiltersButton(_ref3) {
|
|
|
5038
5037
|
return _el$15;
|
|
5039
5038
|
}
|
|
5040
5039
|
}), _el$21, _co$5);
|
|
5041
|
-
$8tj43$addEventListener(_el$16, "click", $8tj43$
|
|
5040
|
+
$8tj43$addEventListener(_el$16, "click", $8tj43$catchify(() => $8tj43$batch(() => {
|
|
5042
5041
|
if (search_filters_open_[0]()) {
|
|
5043
5042
|
search_filters_open_[1](false);
|
|
5044
5043
|
return;
|
|
@@ -5100,7 +5099,7 @@ function $7396052a1484264f$var$OpenSortingButton(_ref4) {
|
|
|
5100
5099
|
_el$23 = _el$22.firstChild,
|
|
5101
5100
|
_el$24 = _el$23.nextSibling,
|
|
5102
5101
|
[_el$25, _co$6] = $8tj43$getNextMarker(_el$24.nextSibling);
|
|
5103
|
-
$8tj43$addEventListener(_el$22, "click", $8tj43$
|
|
5102
|
+
$8tj43$addEventListener(_el$22, "click", $8tj43$catchify(() => $8tj43$batch(() => {
|
|
5104
5103
|
if (search_sorting_open_[0]()) {
|
|
5105
5104
|
search_sorting_open_[1](false);
|
|
5106
5105
|
return;
|
|
@@ -5218,7 +5217,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5218
5217
|
}
|
|
5219
5218
|
old_pos = new_pos;
|
|
5220
5219
|
});
|
|
5221
|
-
const touchstart_handler = $8tj43$
|
|
5220
|
+
const touchstart_handler = $8tj43$catchify(e => {
|
|
5222
5221
|
is_in_touch_scroll = true;
|
|
5223
5222
|
if (e.touches.length === 1) {
|
|
5224
5223
|
// 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
|
|
@@ -5226,12 +5225,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5226
5225
|
diff_over_second_or_touch = 0;
|
|
5227
5226
|
}
|
|
5228
5227
|
});
|
|
5229
|
-
const touchend_handler = $8tj43$
|
|
5228
|
+
const touchend_handler = $8tj43$catchify(e => {
|
|
5230
5229
|
if (e.touches.length === 0)
|
|
5231
5230
|
// scroll gesture of any type (pinch can also be used as scroll, etc.) ended
|
|
5232
5231
|
inertia_timeout = setTimeout(
|
|
5233
5232
|
// inertia ends after 500ms (educated guess)
|
|
5234
|
-
$8tj43$
|
|
5233
|
+
$8tj43$catchify(() => {
|
|
5235
5234
|
is_in_touch_scroll = false;
|
|
5236
5235
|
diff_over_second_or_touch = 0;
|
|
5237
5236
|
}), 500);
|
|
@@ -5249,9 +5248,9 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5249
5248
|
const everything_closed = !get_search_filters_open_() && !get_search_sorting_open_();
|
|
5250
5249
|
if (!$8tj43$untrack(modal_is_closed) && everything_closed)
|
|
5251
5250
|
// I think the point of this is to delay the animation a bit IIRC
|
|
5252
|
-
timeout = setTimeout($8tj43$
|
|
5251
|
+
timeout = setTimeout($8tj43$catchify(() => set_if_modal_is_closed(true)), 200);else set_if_modal_is_closed(everything_closed);
|
|
5253
5252
|
});
|
|
5254
|
-
$8tj43$createComputed($8tj43$
|
|
5253
|
+
$8tj43$createComputed($8tj43$catchify(async () => {
|
|
5255
5254
|
const element = sort_and_filter_element_();
|
|
5256
5255
|
if (!element) return;
|
|
5257
5256
|
await (0, $8tj43$observer).wait_for_element(element);
|
|
@@ -5270,12 +5269,12 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5270
5269
|
_el$5 = _el$4.firstChild,
|
|
5271
5270
|
_el$6 = _el$4.nextSibling,
|
|
5272
5271
|
_el$7 = _el$6.firstChild;
|
|
5273
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
5272
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => {
|
|
5274
5273
|
set_search_filters_open_(true);
|
|
5275
5274
|
set_search_sorting_open_(false);
|
|
5276
5275
|
}), true);
|
|
5277
5276
|
$8tj43$insert(_el$3, $8tj43$createComponent((0, $05f67356defcdd65$export$28f6150e232898de), {}));
|
|
5278
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
5277
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify(() => {
|
|
5279
5278
|
set_search_filters_open_(false);
|
|
5280
5279
|
set_search_sorting_open_(true);
|
|
5281
5280
|
}), true);
|
|
@@ -5286,7 +5285,7 @@ function $6a16b21155984cef$var$ActualFloatingButtons(_ref2) {
|
|
|
5286
5285
|
});
|
|
5287
5286
|
return () => _c$() ? $8tj43$createComponent((0, $79af35736fe8e5c8$export$da32f7add8a22e86), {}) : $8tj43$createComponent((0, $73e3c96bc365e0e9$export$d10e63059ddb9fd4), {});
|
|
5288
5287
|
})());
|
|
5289
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
5288
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify(() => scrollTo({
|
|
5290
5289
|
top: 0,
|
|
5291
5290
|
behavior: "smooth"
|
|
5292
5291
|
})), true);
|
|
@@ -5539,7 +5538,7 @@ function $52efc9ae4382e25a$export$5646050d516e06bc(_ref) {
|
|
|
5539
5538
|
},
|
|
5540
5539
|
get children() {
|
|
5541
5540
|
const _el$2 = $8tj43$getNextElement($52efc9ae4382e25a$var$_tmpl$2);
|
|
5542
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
5541
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(ev => {
|
|
5543
5542
|
var _display_accessor2;
|
|
5544
5543
|
return router_.navigate_.go_to_({
|
|
5545
5544
|
new_url_: href(),
|
|
@@ -5619,7 +5618,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
5619
5618
|
$8tj43$createComputed(() => {
|
|
5620
5619
|
var _place_holdey_quickli, _place_holdey_quickli2;
|
|
5621
5620
|
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.query_id) {
|
|
5622
|
-
if (last_was_placeholder) queueMicrotask($8tj43$
|
|
5621
|
+
if (last_was_placeholder) queueMicrotask($8tj43$catchify(() => {
|
|
5623
5622
|
var _sliding_element;
|
|
5624
5623
|
(_sliding_element = sliding_element) === null || _sliding_element === void 0 || _sliding_element.scrollTo({
|
|
5625
5624
|
left: 0
|
|
@@ -5689,7 +5688,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
5689
5688
|
} else if (!(((_intersecting_items_o = intersecting_items_object[selected_index()]) === null || _intersecting_items_o === void 0 ? void 0 : _intersecting_items_o.intersectionRatio) >= 0.95)) {
|
|
5690
5689
|
// negated larger than to handle left side of comparison being undefined
|
|
5691
5690
|
let done_work = false;
|
|
5692
|
-
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$
|
|
5691
|
+
$8tj43$runWithOwner(owner, () => $8tj43$createComputed($8tj43$catchify(() => {
|
|
5693
5692
|
if (done_work || !Array.isArray(quicklinks_data_())) return;
|
|
5694
5693
|
const sel_index = selected_index();
|
|
5695
5694
|
const target_element = sel_index >= 0 ? sel_index : 0;
|
|
@@ -5745,7 +5744,7 @@ function $43fbb365ed0ac99e$export$466cdc317043f6cb(_ref) {
|
|
|
5745
5744
|
});
|
|
5746
5745
|
return (() => {
|
|
5747
5746
|
const _el$3 = $8tj43$getNextElement($43fbb365ed0ac99e$var$_tmpl$3);
|
|
5748
|
-
$8tj43$addEventListener(_el$3, "click", $8tj43$
|
|
5747
|
+
$8tj43$addEventListener(_el$3, "click", $8tj43$catchify(ev => {
|
|
5749
5748
|
const url = href();
|
|
5750
5749
|
if (is_selected() && !ev.metaKey && !ev.ctrlKey && !ev.button || !url)
|
|
5751
5750
|
// allow open currently selected one in new tab but otherwise prevent clicks
|
|
@@ -5811,7 +5810,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
5811
5810
|
}]); // get rid of old data the browser saves the old state and will restore it later on
|
|
5812
5811
|
};
|
|
5813
5812
|
|
|
5814
|
-
$8tj43$createComputed($8tj43$
|
|
5813
|
+
$8tj43$createComputed($8tj43$catchify(() => {
|
|
5815
5814
|
const last_result = get_last_result_in_viewport_();
|
|
5816
5815
|
if (last_result == undefined || last_result <= 0 || last_result == Infinity) return;
|
|
5817
5816
|
if (isNaN(last_result)) {
|
|
@@ -5838,7 +5837,7 @@ function $5e6abec0dab4e610$export$6e49da55e449af7c(_ref) {
|
|
|
5838
5837
|
set_to_later = last_result;
|
|
5839
5838
|
// If a delayed push timeout is already running, just changing the value that will be pushed is sufficient
|
|
5840
5839
|
if (timeout) return;
|
|
5841
|
-
timeout = setTimeout($8tj43$
|
|
5840
|
+
timeout = setTimeout($8tj43$catchify(() => {
|
|
5842
5841
|
timeout = undefined;
|
|
5843
5842
|
last_time_history_changed = +new Date();
|
|
5844
5843
|
set_min_results_loaded(set_to_later);
|
|
@@ -5886,7 +5885,7 @@ function $ec225bf1f1627ea8$export$210f130a61ac1e8d(fn) {
|
|
|
5886
5885
|
let last_queued;
|
|
5887
5886
|
let last_value;
|
|
5888
5887
|
let initial_run = true;
|
|
5889
|
-
$8tj43$createComputed($8tj43$
|
|
5888
|
+
$8tj43$createComputed($8tj43$catchify(async () => {
|
|
5890
5889
|
last_value = fn();
|
|
5891
5890
|
if (initial_run) {
|
|
5892
5891
|
initial_run = false;
|
|
@@ -5947,7 +5946,7 @@ function $a4777acaffa35a82$export$3945d6db2dfd3d12(_ref) {
|
|
|
5947
5946
|
const handler = () => allow_filter_clearing = false;
|
|
5948
5947
|
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
|
|
5949
5948
|
$8tj43$onCleanup(() => window.removeEventListener("popstate", handler));
|
|
5950
|
-
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$
|
|
5949
|
+
$8tj43$createEffect($8tj43$on(crumb_data_, $8tj43$catchify(new_crumb_data => {
|
|
5951
5950
|
const query_id_of_new_data = query_id_();
|
|
5952
5951
|
if (allow_filter_clearing && previous_crumb_data && new_crumb_data && query_id_of_new_data !== query_id_when_we_got_previous_data) {
|
|
5953
5952
|
const previous_length = previous_crumb_data.length;
|
|
@@ -6143,7 +6142,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6143
6142
|
});
|
|
6144
6143
|
const [plp_results_] = $8tj43$createResource(query_base_,
|
|
6145
6144
|
// 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)
|
|
6146
|
-
$8tj43$
|
|
6145
|
+
$8tj43$catchify(base_query => $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
6147
6146
|
id_: $8tj43$untrack(query_id_),
|
|
6148
6147
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
6149
6148
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
@@ -6287,7 +6286,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6287
6286
|
number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_,
|
|
6288
6287
|
...extra_sort_and_filter_args_
|
|
6289
6288
|
});
|
|
6290
|
-
$8tj43$
|
|
6289
|
+
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
6291
6290
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
6292
6291
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
6293
6292
|
id_: query_id_,
|
|
@@ -6297,7 +6296,7 @@ function $4b4b262708b516ee$export$f7d2f673fc2f091d(_ref) {
|
|
|
6297
6296
|
$8tj43$createComputed(() => {
|
|
6298
6297
|
if (plp_results_.loading) set_can_write_scroll_restoration(false);else if (plp_results_()) set_can_write_scroll_restoration(true);
|
|
6299
6298
|
});
|
|
6300
|
-
$8tj43$createRenderEffect($8tj43$
|
|
6299
|
+
$8tj43$createRenderEffect($8tj43$catchify(async () => {
|
|
6301
6300
|
var _only_show_filters_op;
|
|
6302
6301
|
const slim = is_slim_();
|
|
6303
6302
|
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();
|
|
@@ -6553,7 +6552,7 @@ function $9d3d794b62318ecc$export$477caf01aecaeb2a(options) {
|
|
|
6553
6552
|
const [get_selected_filters_, set_selected_filters] = selected_filters_;
|
|
6554
6553
|
const [get_has_sideways_filter_clearing_flag_, set_has_sideways_filter_clearing_flag] = sideways_filter_clearing_flag_;
|
|
6555
6554
|
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");
|
|
6556
|
-
const history_change_handler = $8tj43$
|
|
6555
|
+
const history_change_handler = $8tj43$catchify(() => set_current_href(location.href));
|
|
6557
6556
|
const owner = $8tj43$getOwner() || $8tj43$createRoot(() => $8tj43$getOwner());
|
|
6558
6557
|
const {
|
|
6559
6558
|
sorting_query_param_: sorting_query_param_,
|
|
@@ -6725,7 +6724,7 @@ class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
|
6725
6724
|
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
6726
6725
|
* @param category_query_id_ If you are navigating to a category and know the query_id of, please provide it. This is for making a better devEx in js-ui
|
|
6727
6726
|
*/
|
|
6728
|
-
go_to_: $8tj43$
|
|
6727
|
+
go_to_: $8tj43$catchify(async _ref => {
|
|
6729
6728
|
let {
|
|
6730
6729
|
new_url_: raw_new_url,
|
|
6731
6730
|
event_: event_,
|
|
@@ -7251,7 +7250,7 @@ const $702d7656a373973e$export$824dde41348efed1 = /*@__PURE__*/(() => {
|
|
|
7251
7250
|
|
|
7252
7251
|
const observe_to_signal = (element, setter) => {
|
|
7253
7252
|
const computed_style = getComputedStyle(element);
|
|
7254
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
7253
|
+
const resize_observer = new ResizeObserver($8tj43$catchify(() => {
|
|
7255
7254
|
setter(element.getBoundingClientRect().width + parseFloat(computed_style.marginLeft) + parseFloat(computed_style.marginRight) + parseFloat(computed_style.borderRightWidth) + parseFloat(computed_style.borderLeftWidth));
|
|
7256
7255
|
}));
|
|
7257
7256
|
resize_observer.observe(element);
|
|
@@ -7423,7 +7422,7 @@ function $dea31647b99a443b$export$d757d54550ebfb3d(_ref) {
|
|
|
7423
7422
|
_el$2 = _el$.firstChild,
|
|
7424
7423
|
_el$4 = _el$2.nextSibling,
|
|
7425
7424
|
[_el$5, _co$] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
7426
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
7425
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify(e => {
|
|
7427
7426
|
router_.navigate_.go_to_({
|
|
7428
7427
|
new_url_: category_suggestion_().page_url,
|
|
7429
7428
|
is_replace_: false,
|
|
@@ -7483,7 +7482,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7483
7482
|
let input_element;
|
|
7484
7483
|
// This is the div where we recommend (and ourselves do) attach the event listener to that opens the search modal.
|
|
7485
7484
|
let field_div;
|
|
7486
|
-
$8tj43$createEffect($8tj43$
|
|
7485
|
+
$8tj43$createEffect($8tj43$catchify(async () => {
|
|
7487
7486
|
if (disabled_) return;
|
|
7488
7487
|
// we aren't in DOM yet unfortunately, wouldn't even be with onMount
|
|
7489
7488
|
await (0, $8tj43$observer).wait_for_element(input_element);
|
|
@@ -7503,7 +7502,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7503
7502
|
when: on_back_,
|
|
7504
7503
|
get children() {
|
|
7505
7504
|
const _el$2 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$);
|
|
7506
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
7505
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(on_back_), true);
|
|
7507
7506
|
$8tj43$insert(_el$2, $8tj43$createComponent((0, $ecc323d9c29305ee$export$1c641004b5485fed), {}));
|
|
7508
7507
|
$8tj43$effect(() => $8tj43$setAttribute(_el$2, "aria-label", i18n_.back_()));
|
|
7509
7508
|
$8tj43$runHydrationEvents();
|
|
@@ -7520,7 +7519,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7520
7519
|
} = _ref2;
|
|
7521
7520
|
// 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).
|
|
7522
7521
|
if (pointerType === "mouse") {
|
|
7523
|
-
const handler = $8tj43$
|
|
7522
|
+
const handler = $8tj43$catchify(_ref3 => {
|
|
7524
7523
|
let {
|
|
7525
7524
|
pointerType: pointerType,
|
|
7526
7525
|
target: target
|
|
@@ -7534,26 +7533,26 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7534
7533
|
if (owner_of_field_element) $8tj43$runWithOwner(owner_of_field_element, () => $8tj43$onCleanup(() => window.removeEventListener("pointerup", handler)));
|
|
7535
7534
|
}
|
|
7536
7535
|
};
|
|
7537
|
-
$8tj43$addEventListener(_el$4, "select", $8tj43$
|
|
7536
|
+
$8tj43$addEventListener(_el$4, "select", $8tj43$catchify(() => {
|
|
7538
7537
|
if (disabled_)
|
|
7539
7538
|
// 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
|
|
7540
7539
|
return;
|
|
7541
7540
|
if (input_element.selectionStart === 0 && input_element.selectionEnd === input_element.value.length)
|
|
7542
7541
|
// everything was selected, clear filters on next submit on next input
|
|
7543
|
-
input_element.addEventListener("input", $8tj43$
|
|
7542
|
+
input_element.addEventListener("input", $8tj43$catchify(() => clear_filters_(false)),
|
|
7544
7543
|
// We don't count this as user triggered since it wasn't explicit
|
|
7545
7544
|
{
|
|
7546
7545
|
once: true
|
|
7547
7546
|
});
|
|
7548
7547
|
}));
|
|
7549
|
-
$8tj43$addEventListener(_el$4, "input", $8tj43$
|
|
7548
|
+
$8tj43$addEventListener(_el$4, "input", $8tj43$catchify(() => {
|
|
7550
7549
|
const {
|
|
7551
7550
|
value: value
|
|
7552
7551
|
} = input_element;
|
|
7553
7552
|
if (!disabled_ && !value.length) clear_filters_(false); // if the user clears the whole field, reset filters on next submit
|
|
7554
7553
|
search_field_value_[1](value);
|
|
7555
7554
|
}), true);
|
|
7556
|
-
$8tj43$addEventListener(_el$4, "keydown", $8tj43$
|
|
7555
|
+
$8tj43$addEventListener(_el$4, "keydown", $8tj43$catchify(e => {
|
|
7557
7556
|
if (disabled_) {
|
|
7558
7557
|
if (e.key !== "Tab" && e.key !== "Shift")
|
|
7559
7558
|
// 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
|
|
@@ -7563,19 +7562,19 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
7563
7562
|
if (!dont_submit) submit_query_();
|
|
7564
7563
|
}
|
|
7565
7564
|
}), true);
|
|
7566
|
-
const _ref$ = $8tj43$
|
|
7565
|
+
const _ref$ = $8tj43$catchify(el => {
|
|
7567
7566
|
input_element = el;
|
|
7568
7567
|
input_field_ref_ === null || input_field_ref_ === void 0 || input_field_ref_(el);
|
|
7569
7568
|
});
|
|
7570
7569
|
typeof _ref$ === "function" && $8tj43$use(_ref$, _el$4);
|
|
7571
7570
|
_el$4.classList.toggle("has-adjacent-back-button", !!on_back_);
|
|
7572
|
-
$8tj43$addEventListener(_el$5, "click", $8tj43$
|
|
7571
|
+
$8tj43$addEventListener(_el$5, "click", $8tj43$catchify(() => {
|
|
7573
7572
|
search_field_value_[1]("");
|
|
7574
7573
|
clear_filters_(true);
|
|
7575
7574
|
if (!disabled_) input_element.focus();
|
|
7576
7575
|
}), true);
|
|
7577
7576
|
$8tj43$insert(_el$5, $8tj43$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {}));
|
|
7578
|
-
$8tj43$addEventListener(_el$6, "click", $8tj43$
|
|
7577
|
+
$8tj43$addEventListener(_el$6, "click", $8tj43$catchify(() => submit_query_()), true);
|
|
7579
7578
|
$8tj43$insert(_el$6, $8tj43$createComponent((0, $ef0f18a578b32578$export$82eafebb825fc23f), {}));
|
|
7580
7579
|
$8tj43$effect(_p$ => {
|
|
7581
7580
|
const _v$ = i18n_.search_field_field_aria_label_(),
|
|
@@ -7717,7 +7716,7 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7717
7716
|
};
|
|
7718
7717
|
let ro;
|
|
7719
7718
|
if (one_axies_only !== "top") {
|
|
7720
|
-
ro = new ResizeObserver($8tj43$
|
|
7719
|
+
ro = new ResizeObserver($8tj43$catchify(records => {
|
|
7721
7720
|
records.forEach(_ref => {
|
|
7722
7721
|
let {
|
|
7723
7722
|
contentRect: {
|
|
@@ -7739,10 +7738,10 @@ function $1308a7816c3d4f2d$export$b3ad617e9036868(modal_body_style, input_field,
|
|
|
7739
7738
|
// "resize" doesn't fire sometimes when it should, also it doesn't when showing/hiding scrollbars which disabling scrolling does
|
|
7740
7739
|
// this works
|
|
7741
7740
|
// keeping resize just in case
|
|
7742
|
-
const resize_resize_observer = new ResizeObserver($8tj43$
|
|
7741
|
+
const resize_resize_observer = new ResizeObserver($8tj43$catchify(align_position));
|
|
7743
7742
|
resize_resize_observer.observe(document.documentElement);
|
|
7744
7743
|
(0, $8tj43$observer).wait_for_element("body").then(resize_resize_observer.observe.bind(resize_resize_observer));
|
|
7745
|
-
$8tj43$onCleanup($8tj43$
|
|
7744
|
+
$8tj43$onCleanup($8tj43$catchify(() => {
|
|
7746
7745
|
var _ro;
|
|
7747
7746
|
(_ro = ro) === null || _ro === void 0 || _ro.disconnect();
|
|
7748
7747
|
resize_resize_observer.disconnect();
|
|
@@ -7772,7 +7771,7 @@ function $d8a66ba54a42eb3e$export$e026af0c7b64ea5f(_ref) {
|
|
|
7772
7771
|
}, {
|
|
7773
7772
|
defer: true
|
|
7774
7773
|
}));
|
|
7775
|
-
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$
|
|
7774
|
+
$8tj43$createComputed($8tj43$on(get_search_query_, $8tj43$catchify(() => {
|
|
7776
7775
|
// when a query was submitted, clear filters if clear was pressed before
|
|
7777
7776
|
const clear_value = $8tj43$untrack(get_clear_filters_next_submit);
|
|
7778
7777
|
if (clear_value) {
|
|
@@ -7797,11 +7796,11 @@ function $07d90b8270ece8de$export$84bba84a7b837187(read_search_query) {
|
|
|
7797
7796
|
const key = "depict_searches";
|
|
7798
7797
|
const previous_searches = $8tj43$createSignal(JSON.parse(ls[key] || "[]"));
|
|
7799
7798
|
const [read_previous_searches, write_previous_searches] = previous_searches;
|
|
7800
|
-
$8tj43$createEffect($8tj43$
|
|
7799
|
+
$8tj43$createEffect($8tj43$catchify(() => {
|
|
7801
7800
|
const json_encoded = JSON.stringify(read_previous_searches());
|
|
7802
7801
|
if (ls[key] !== json_encoded) ls[key] = json_encoded;
|
|
7803
7802
|
}));
|
|
7804
|
-
$8tj43$createComputed($8tj43$
|
|
7803
|
+
$8tj43$createComputed($8tj43$catchify(() => {
|
|
7805
7804
|
const searches = $8tj43$untrack(read_previous_searches);
|
|
7806
7805
|
const current_query = read_search_query();
|
|
7807
7806
|
if (!current_query)
|
|
@@ -7910,7 +7909,7 @@ const $9a693c7e832d3f18$export$b05c0ae390cf3e06 = (display_or_variant_container,
|
|
|
7910
7909
|
[_el$21, _co$6] = $8tj43$getNextMarker(_el$20.nextSibling),
|
|
7911
7910
|
_el$22 = _el$21.nextSibling,
|
|
7912
7911
|
[_el$23, _co$7] = $8tj43$getNextMarker(_el$22.nextSibling);
|
|
7913
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$
|
|
7912
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify(event_ => router_.navigate_.go_to_({
|
|
7914
7913
|
new_url_: href(),
|
|
7915
7914
|
is_replace_: false,
|
|
7916
7915
|
event_: event_
|
|
@@ -8005,13 +8004,13 @@ function $f7414b949aeabc90$export$62f101a8aa597bf8(_ref) {
|
|
|
8005
8004
|
// don't wait if it's the first request
|
|
8006
8005
|
write_current_instant_query(value);
|
|
8007
8006
|
clearTimeout(timeout);
|
|
8008
|
-
timeout = setTimeout($8tj43$
|
|
8007
|
+
timeout = setTimeout($8tj43$catchify(() => write_current_instant_query(value)), 250);
|
|
8009
8008
|
});
|
|
8010
8009
|
const [search_results] = $8tj43$createResource($8tj43$createMemo(() => ({
|
|
8011
8010
|
tenant: tenant_(),
|
|
8012
8011
|
market: market_(),
|
|
8013
8012
|
query: read_current_instant_query()
|
|
8014
|
-
})), $8tj43$
|
|
8013
|
+
})), $8tj43$catchify(variable_data => {
|
|
8015
8014
|
return depict_api_.query({
|
|
8016
8015
|
// 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
|
|
8017
8016
|
limit: $8tj43$untrack(has_sort_or_filters_) ? max_cards : min_products_to_fetch_,
|
|
@@ -8097,7 +8096,7 @@ function $558d0596fcf0e0b0$export$50b90be27d8502d9(el, _ref, bottom_distance) {
|
|
|
8097
8096
|
[key]: new_value
|
|
8098
8097
|
});
|
|
8099
8098
|
};
|
|
8100
|
-
const is = new IntersectionObserver($8tj43$
|
|
8099
|
+
const is = new IntersectionObserver($8tj43$catchify(_records => {
|
|
8101
8100
|
do_positioning();
|
|
8102
8101
|
}), {
|
|
8103
8102
|
threshold: $8tj43$buildThresholdList(100)
|
|
@@ -8119,7 +8118,7 @@ function $e8776b492383c292$export$91c3b6774e8be0f5(_ref) {
|
|
|
8119
8118
|
const [get_current_href, set_current_href] = $8tj43$createSignal(location.href);
|
|
8120
8119
|
const [exit_iterable, exitable_iterable] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
8121
8120
|
$8tj43$onCleanup(exit_iterable);
|
|
8122
|
-
$8tj43$
|
|
8121
|
+
$8tj43$catchify(async () => {
|
|
8123
8122
|
for await (const href of exitable_iterable)
|
|
8124
8123
|
// use native links so ppl can cmdclick/right click and open in new tab and see target URL
|
|
8125
8124
|
set_current_href(href);
|
|
@@ -8190,18 +8189,18 @@ function $494c9ad553139dbc$export$a146ac6fa8346a25(_ref) {
|
|
|
8190
8189
|
_el$9 = _el$5.nextSibling;
|
|
8191
8190
|
$8tj43$use(element => element.addEventListener(
|
|
8192
8191
|
// 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.
|
|
8193
|
-
"click", $8tj43$
|
|
8192
|
+
"click", $8tj43$catchify(ev => {
|
|
8194
8193
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
8195
8194
|
// not button 0 or cmd/ctrl click
|
|
8196
8195
|
return;
|
|
8197
8196
|
ev.preventDefault();
|
|
8198
8197
|
submit_query_(item());
|
|
8199
8198
|
})), _el$4);
|
|
8200
|
-
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$
|
|
8201
|
-
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$
|
|
8199
|
+
$8tj43$addEventListener(_el$4, "mouseleave", $8tj43$catchify(() => write_selected_index_(undefined)));
|
|
8200
|
+
$8tj43$addEventListener(_el$4, "mouseenter", $8tj43$catchify(() => write_selected_index_([0, index])));
|
|
8202
8201
|
$8tj43$insert(_el$5, $8tj43$createComponent((0, $6d95ef50ee01d5a1$export$5d2caaa6b530761c), {}), _el$8, _co$);
|
|
8203
8202
|
$8tj43$insert(_el$6, item);
|
|
8204
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
8203
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify(e => {
|
|
8205
8204
|
// 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.
|
|
8206
8205
|
set_unfiltered_previous_searches_(prev => {
|
|
8207
8206
|
const new_value = [...prev];
|
|
@@ -8387,7 +8386,7 @@ function $40dd3f46f55d62ba$export$e872e2339fb04a7f(_ref) {
|
|
|
8387
8386
|
});
|
|
8388
8387
|
return (() => {
|
|
8389
8388
|
const _el$ = $8tj43$getNextElement($40dd3f46f55d62ba$var$_tmpl$);
|
|
8390
|
-
$8tj43$use(element => element.addEventListener("click", $8tj43$
|
|
8389
|
+
$8tj43$use(element => element.addEventListener("click", $8tj43$catchify(ev => {
|
|
8391
8390
|
// 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.
|
|
8392
8391
|
if (is_query()) {
|
|
8393
8392
|
if (ev.button || ev.metaKey || ev.ctrlKey)
|
|
@@ -8403,8 +8402,8 @@ function $40dd3f46f55d62ba$export$e872e2339fb04a7f(_ref) {
|
|
|
8403
8402
|
event_: ev
|
|
8404
8403
|
});
|
|
8405
8404
|
})), _el$);
|
|
8406
|
-
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$
|
|
8407
|
-
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$
|
|
8405
|
+
$8tj43$addEventListener(_el$, "mouseleave", $8tj43$catchify(() => write_selected_index_(undefined)));
|
|
8406
|
+
$8tj43$addEventListener(_el$, "mouseenter", $8tj43$catchify(() => write_selected_index_([autocomplete_data_index, index])));
|
|
8408
8407
|
$8tj43$insert(_el$, (() => {
|
|
8409
8408
|
const _c$ = $8tj43$memo(() => !!is_query());
|
|
8410
8409
|
return () => _c$() ? [$8tj43$createComponent((0, $8tj43$Show), {
|
|
@@ -8700,7 +8699,7 @@ function $2ebb1d6ae6763f7a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
8700
8699
|
if (!$8tj43$untrack(() => read_updating_blocked())) previous_value = sfv;
|
|
8701
8700
|
});
|
|
8702
8701
|
const owner = $8tj43$getOwner();
|
|
8703
|
-
const handler = $8tj43$
|
|
8702
|
+
const handler = $8tj43$catchify(_ref3 => {
|
|
8704
8703
|
let {
|
|
8705
8704
|
keyCode: keyCode
|
|
8706
8705
|
} = _ref3;
|
|
@@ -8763,7 +8762,7 @@ function $2ebb1d6ae6763f7a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
8763
8762
|
const el = element_();
|
|
8764
8763
|
if (!el) return;
|
|
8765
8764
|
el.addEventListener("keyup", handler);
|
|
8766
|
-
$8tj43$onCleanup($8tj43$
|
|
8765
|
+
$8tj43$onCleanup($8tj43$catchify(() => el.removeEventListener("keyup", handler)));
|
|
8767
8766
|
});
|
|
8768
8767
|
}
|
|
8769
8768
|
function $c4dee1ef44de29ca$export$af0124069c150252(_ref) {
|
|
@@ -8972,7 +8971,7 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
8972
8971
|
if (process.env.GA === "false") return;
|
|
8973
8972
|
let debounce_timeout;
|
|
8974
8973
|
const stop_timeout = () => clearTimeout(debounce_timeout);
|
|
8975
|
-
const send_to_ga = $8tj43$
|
|
8974
|
+
const send_to_ga = $8tj43$catchify(() => {
|
|
8976
8975
|
const fake_url = new URL(location.href);
|
|
8977
8976
|
const {
|
|
8978
8977
|
searchParams: searchParams
|
|
@@ -8985,12 +8984,12 @@ function $a09bb7c652acf957$export$3340fdd8259bd4fd(_ref) {
|
|
|
8985
8984
|
$8tj43$onCleanup(() => {
|
|
8986
8985
|
setTimeout(
|
|
8987
8986
|
// 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
|
|
8988
|
-
$8tj43$
|
|
8987
|
+
$8tj43$catchify(() => {
|
|
8989
8988
|
if ($8tj43$untrack(get_search_query_) === $8tj43$untrack(get_search_field_value_)) stop_timeout();
|
|
8990
8989
|
}));
|
|
8991
8990
|
});
|
|
8992
8991
|
let first_call = true;
|
|
8993
|
-
$8tj43$createEffect($8tj43$
|
|
8992
|
+
$8tj43$createEffect($8tj43$catchify(() => {
|
|
8994
8993
|
get_search_field_value_();
|
|
8995
8994
|
if (first_call) {
|
|
8996
8995
|
// we only want to do stuff when it changes
|
|
@@ -9071,7 +9070,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9071
9070
|
const [input_field, set_input_field] = $8tj43$createSignal();
|
|
9072
9071
|
const [get_search_field_value_] = search_field_value_;
|
|
9073
9072
|
const [get_modal_search_results, set_modal_search_results_] = $8tj43$createSignal();
|
|
9074
|
-
const close_on_escape_handler = $8tj43$
|
|
9073
|
+
const close_on_escape_handler = $8tj43$catchify(_ref2 => {
|
|
9075
9074
|
let {
|
|
9076
9075
|
key: key
|
|
9077
9076
|
} = _ref2;
|
|
@@ -9086,7 +9085,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9086
9085
|
const DiscoverMoreSection = () => (() => {
|
|
9087
9086
|
const _el$ = $8tj43$getNextElement($e82132ed97521828$var$_tmpl$),
|
|
9088
9087
|
_el$2 = _el$.firstChild;
|
|
9089
|
-
$8tj43$addEventListener(_el$2, "click", $8tj43$
|
|
9088
|
+
$8tj43$addEventListener(_el$2, "click", $8tj43$catchify(() => submit_query_()), true);
|
|
9090
9089
|
$8tj43$insert(_el$2, (() => {
|
|
9091
9090
|
const _c$ = $8tj43$memo(() => !!get_search_field_value_());
|
|
9092
9091
|
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
@@ -9101,7 +9100,7 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9101
9100
|
if (disable_scrolling_) $e56d241d0f33d459$export$fe334901e8bebd57();
|
|
9102
9101
|
$e82132ed97521828$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
|
|
9103
9102
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
9104
|
-
$8tj43$onCleanup($8tj43$
|
|
9103
|
+
$8tj43$onCleanup($8tj43$catchify(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
9105
9104
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
9106
9105
|
$a09bb7c652acf957$export$3340fdd8259bd4fd({
|
|
9107
9106
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -9156,14 +9155,14 @@ function $e82132ed97521828$export$1c593cbd6f1e10bc(_ref) {
|
|
|
9156
9155
|
[_el$16, _co$5] = $8tj43$getNextMarker(_el$15.nextSibling),
|
|
9157
9156
|
_el$17 = _el$5.nextSibling,
|
|
9158
9157
|
[_el$18, _co$6] = $8tj43$getNextMarker(_el$17.nextSibling);
|
|
9159
|
-
$8tj43$addEventListener(_el$4, "click", $8tj43$
|
|
9158
|
+
$8tj43$addEventListener(_el$4, "click", $8tj43$catchify(_ref3 => {
|
|
9160
9159
|
let {
|
|
9161
9160
|
target: target
|
|
9162
9161
|
} = _ref3;
|
|
9163
9162
|
if (target === modal_element) close_modal_();
|
|
9164
9163
|
}), true);
|
|
9165
9164
|
$8tj43$insert(_el$5, search_field, _el$14, _co$4);
|
|
9166
|
-
$8tj43$use(el => $8tj43$
|
|
9165
|
+
$8tj43$use(el => $8tj43$catchify((0, $558d0596fcf0e0b0$export$50b90be27d8502d9))(el, style_props_, bottom_distance_under_modal_), _el$6);
|
|
9167
9166
|
$8tj43$insert(_el$6, $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
9168
9167
|
severity_: "error",
|
|
9169
9168
|
message_: "Autocomplete/suggestions failed",
|
|
@@ -9262,8 +9261,8 @@ function $e82132ed97521828$var$close_modal_when_navigating_away(close_modal, sea
|
|
|
9262
9261
|
let set_initial_values = false;
|
|
9263
9262
|
let old_pathname;
|
|
9264
9263
|
let old_param_value;
|
|
9265
|
-
$8tj43$onCleanup($8tj43$
|
|
9266
|
-
$8tj43$
|
|
9264
|
+
$8tj43$onCleanup($8tj43$catchify(exit_iterable));
|
|
9265
|
+
$8tj43$catchify(async () => {
|
|
9267
9266
|
for await (const href of exitable_iterable) {
|
|
9268
9267
|
const u_o = new URL(href);
|
|
9269
9268
|
const new_pathname = u_o.pathname;
|
|
@@ -9341,7 +9340,7 @@ function $69602b3d8fd54c38$export$9dd50d35b9d94fdf(_ref) {
|
|
|
9341
9340
|
number_of_results_: number_of_results_,
|
|
9342
9341
|
type: type
|
|
9343
9342
|
} = _ref;
|
|
9344
|
-
const contents = $8tj43$createMemo($8tj43$
|
|
9343
|
+
const contents = $8tj43$createMemo($8tj43$catchify(() => {
|
|
9345
9344
|
const q = get_search_query_();
|
|
9346
9345
|
return i18n_[type === $69602b3d8fd54c38$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
9347
9346
|
const _el$ = $8tj43$getNextElement($69602b3d8fd54c38$var$_tmpl$);
|
|
@@ -9629,7 +9628,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
9629
9628
|
if (!result) return;
|
|
9630
9629
|
return {
|
|
9631
9630
|
href: result.page_url,
|
|
9632
|
-
onClick: $8tj43$
|
|
9631
|
+
onClick: $8tj43$catchify(ev => router_.navigate_.go_to_({
|
|
9633
9632
|
new_url_: result.page_url,
|
|
9634
9633
|
is_replace_: false,
|
|
9635
9634
|
event_: ev
|
|
@@ -9958,7 +9957,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
9958
9957
|
} : {})
|
|
9959
9958
|
};
|
|
9960
9959
|
});
|
|
9961
|
-
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$
|
|
9960
|
+
const [search_results_] = $8tj43$createResource(search_query_base_, $8tj43$catchify(async base_query => {
|
|
9962
9961
|
set_all_products_loaded(false);
|
|
9963
9962
|
// only first page of results
|
|
9964
9963
|
return await $5e6abec0dab4e610$export$cc42dd29bf655ab6({
|
|
@@ -9995,7 +9994,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
9995
9994
|
});
|
|
9996
9995
|
const modal_body_style = $8tj43$createSignal({});
|
|
9997
9996
|
const [get_search_field_elements, set_search_field_elements] = $8tj43$createSignal();
|
|
9998
|
-
const SafeSearchField = $8tj43$
|
|
9997
|
+
const SafeSearchField = $8tj43$catchify((0, $584c06c09cf4609d$export$b94867ecbd698f21));
|
|
9999
9998
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = $8tj43$createSignal(false);
|
|
10000
9999
|
const [desktop_filter_elements_, set_desktop_filter_elements] = $8tj43$createSignal();
|
|
10001
10000
|
const n_hits = $8tj43$createMemo(() => {
|
|
@@ -10059,7 +10058,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10059
10058
|
})()));
|
|
10060
10059
|
}).remove);
|
|
10061
10060
|
$3a2bed57c9a57e21$export$d31a1a1a83ad9413(search_results_, selected_filters_);
|
|
10062
|
-
$8tj43$
|
|
10061
|
+
$8tj43$catchify((0, $5e6abec0dab4e610$export$6e49da55e449af7c))({
|
|
10063
10062
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
10064
10063
|
last_result_in_viewport_: last_result_in_viewport_,
|
|
10065
10064
|
id_: get_search_query_,
|
|
@@ -10098,8 +10097,8 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10098
10097
|
if (!search_field) break add_input_field;
|
|
10099
10098
|
modal_body_style[1]({});
|
|
10100
10099
|
modal_body_style_ref_ === null || modal_body_style_ref_ === void 0 || modal_body_style_ref_(modal_body_style);
|
|
10101
|
-
const align_position = $8tj43$
|
|
10102
|
-
div_with_field_class.addEventListener("click", $8tj43$
|
|
10100
|
+
const align_position = $8tj43$catchify((0, $1308a7816c3d4f2d$export$b3ad617e9036868))(modal_body_style, search_field, undefined, true);
|
|
10101
|
+
div_with_field_class.addEventListener("click", $8tj43$catchify(e => {
|
|
10103
10102
|
var _target$matches, _target$closest, _on_open_, _ref4;
|
|
10104
10103
|
const target = e.target;
|
|
10105
10104
|
const sel = ".submit";
|
|
@@ -10302,7 +10301,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
10302
10301
|
function $37e8c97bb6876197$export$828dcdd425fd3231(aligner) {
|
|
10303
10302
|
const style_element = document.createElement("style");
|
|
10304
10303
|
document.head.append(style_element);
|
|
10305
|
-
const resize_observer = new ResizeObserver($8tj43$
|
|
10304
|
+
const resize_observer = new ResizeObserver($8tj43$catchify(() => {
|
|
10306
10305
|
const styles = $cc64aabf2c7a1f1a$export$1233ca167bf71f9a({
|
|
10307
10306
|
".depict.plp .depict-search-modal .search-field": {
|
|
10308
10307
|
"height": "".concat(aligner === null || aligner === void 0 ? void 0 : aligner.clientHeight, "px")
|
|
@@ -10529,7 +10528,7 @@ class $eb064bc3350276c1$export$ac6237957a15b3f0 {
|
|
|
10529
10528
|
selected_filters_: selected_filters_
|
|
10530
10529
|
});
|
|
10531
10530
|
$68e6625c8d51f847$export$5162a71f252e6122();
|
|
10532
|
-
$8tj43$
|
|
10531
|
+
$8tj43$catchify(async () => {
|
|
10533
10532
|
const {
|
|
10534
10533
|
open_modal_: open_modal_,
|
|
10535
10534
|
close_modal_: close_modal_
|
|
@@ -10814,7 +10813,7 @@ function $eb064bc3350276c1$export$316f6f283ae64765(props) {
|
|
|
10814
10813
|
const style_props_ = $8tj43$createSignal({
|
|
10815
10814
|
position: "fixed"
|
|
10816
10815
|
});
|
|
10817
|
-
const defaultHandler = $8tj43$
|
|
10816
|
+
const defaultHandler = $8tj43$catchify(() => {
|
|
10818
10817
|
// When selecting text in the SearchField that's in the page we want the same selection to persist. It doesn't by itself, since the SearchModal has an entirely different SearchField. Therefore, we manually copy the selection over.
|
|
10819
10818
|
const selected_text_range_ = [input_element.selectionStart, input_element.selectionEnd];
|
|
10820
10819
|
const {
|
|
@@ -10907,7 +10906,7 @@ const $169c13c0531d91d2$export$d86a33413558014e = openModalParams => {
|
|
|
10907
10906
|
}, dispose_aligner];
|
|
10908
10907
|
};
|
|
10909
10908
|
function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
10910
|
-
const handler = $8tj43$
|
|
10909
|
+
const handler = $8tj43$catchify(e => {
|
|
10911
10910
|
const {
|
|
10912
10911
|
key: key,
|
|
10913
10912
|
target: target
|
|
@@ -10926,7 +10925,7 @@ function $573c007c697a1831$export$d0596b5cae35ad4(open_search) {
|
|
|
10926
10925
|
function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
10927
10926
|
let old_url;
|
|
10928
10927
|
let disconnect_link_observer;
|
|
10929
|
-
const link_handler = $8tj43$
|
|
10928
|
+
const link_handler = $8tj43$catchify(e => {
|
|
10930
10929
|
const link = e.currentTarget || e.target;
|
|
10931
10930
|
if (link.href === old_url) {
|
|
10932
10931
|
history.pushState(history.state, "", link.href);
|
|
@@ -10935,7 +10934,7 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
10935
10934
|
});
|
|
10936
10935
|
let remove_added_listeners;
|
|
10937
10936
|
let resolve_remove_added_listeners;
|
|
10938
|
-
pr.addEventListener("open", $8tj43$
|
|
10937
|
+
pr.addEventListener("open", $8tj43$catchify(() => {
|
|
10939
10938
|
remove_added_listeners = new Promise(r => resolve_remove_added_listeners = r);
|
|
10940
10939
|
disconnect_link_observer = (0, $8tj43$observer).onexists("a", async _ref => {
|
|
10941
10940
|
let {
|
|
@@ -10946,12 +10945,12 @@ function $e60a76195ac6d408$export$689e204eadb33baf(pr) {
|
|
|
10946
10945
|
element.removeEventListener("click", link_handler);
|
|
10947
10946
|
});
|
|
10948
10947
|
}));
|
|
10949
|
-
pr.addEventListener("close", $8tj43$
|
|
10948
|
+
pr.addEventListener("close", $8tj43$catchify(() => {
|
|
10950
10949
|
var _disconnect_link_obse, _resolve_remove_added;
|
|
10951
10950
|
(_disconnect_link_obse = disconnect_link_observer) === null || _disconnect_link_obse === void 0 || _disconnect_link_obse();
|
|
10952
10951
|
(_resolve_remove_added = resolve_remove_added_listeners) === null || _resolve_remove_added === void 0 || _resolve_remove_added();
|
|
10953
10952
|
}));
|
|
10954
|
-
$8tj43$
|
|
10953
|
+
$8tj43$catchify(async () => {
|
|
10955
10954
|
for await (const href of (0, $8tj43$href_change_ipns)) if (!pr.is_page_(new URL(href))) old_url = href;
|
|
10956
10955
|
})();
|
|
10957
10956
|
}
|
|
@@ -11049,7 +11048,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
11049
11048
|
});
|
|
11050
11049
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_unload, {
|
|
11051
11050
|
writable: true,
|
|
11052
|
-
value: $8tj43$
|
|
11051
|
+
value: $8tj43$catchify(() => {
|
|
11053
11052
|
var _classPrivateFieldGet3;
|
|
11054
11053
|
if (!$8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_is_open)) return;
|
|
11055
11054
|
(_classPrivateFieldGet3 = $8tj43$babelruntimehelpersclassPrivateFieldGet(this, $f9fd3017c20b774a$var$_disconnect_observer)) === null || _classPrivateFieldGet3 === void 0 || _classPrivateFieldGet3.call(this);
|
|
@@ -11063,7 +11062,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
11063
11062
|
});
|
|
11064
11063
|
$f9fd3017c20b774a$var$_classPrivateFieldInitSpec(this, $f9fd3017c20b774a$var$_load, {
|
|
11065
11064
|
writable: true,
|
|
11066
|
-
value: $8tj43$
|
|
11065
|
+
value: $8tj43$catchify(async els => {
|
|
11067
11066
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_is_open, true);
|
|
11068
11067
|
// So that #load doesn't get called again
|
|
11069
11068
|
let set_should_stay_inserted;
|
|
@@ -11127,7 +11126,7 @@ class $f9fd3017c20b774a$export$3ccaa27d81dd8556 extends EventTarget {
|
|
|
11127
11126
|
async function $f9fd3017c20b774a$var$_listen2() {
|
|
11128
11127
|
const [exit_ipns, exitable_ipns] = $8tj43$make_asyncIterable_exiter((0, $8tj43$href_change_ipns));
|
|
11129
11128
|
$8tj43$babelruntimehelpersclassPrivateFieldSet(this, $f9fd3017c20b774a$var$_stop_listening, exit_ipns);
|
|
11130
|
-
const caught_page_check_fn = $8tj43$
|
|
11129
|
+
const caught_page_check_fn = $8tj43$catchify(this.is_page_, "page check failed");
|
|
11131
11130
|
for await (const href of exitable_ipns) {
|
|
11132
11131
|
const url = new URL(href);
|
|
11133
11132
|
if (!caught_page_check_fn(url)) {
|
|
@@ -11145,7 +11144,7 @@ function $f9fd3017c20b774a$var$_get_rendered_recs2() {
|
|
|
11145
11144
|
this.addEventListener("close", dispose, {
|
|
11146
11145
|
once: true
|
|
11147
11146
|
});
|
|
11148
|
-
return $8tj43$
|
|
11147
|
+
return $8tj43$catchify(this.render_, "rendering failed")() || [];
|
|
11149
11148
|
});
|
|
11150
11149
|
}
|
|
11151
11150
|
function $f9fd3017c20b774a$var$_empty_page_bugfix2() {
|
|
@@ -11193,7 +11192,7 @@ var $f9fd3017c20b774a$var$_visited_urls = {
|
|
|
11193
11192
|
writable: true,
|
|
11194
11193
|
value: (() => {
|
|
11195
11194
|
// 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).
|
|
11196
|
-
$8tj43$
|
|
11195
|
+
$8tj43$catchify(async () => {
|
|
11197
11196
|
// Static initialization blocks aren't supported in MobileSafari yet, otherwise this would be one.
|
|
11198
11197
|
// 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).
|
|
11199
11198
|
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Static_initialization_blocks
|