@depict-ai/ui 0.0.78 → 0.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/module.js CHANGED
@@ -1,9 +1,9 @@
1
- import {add_to_version_info as $g9l4l$add_to_version_info, fetch_recs as $g9l4l$fetch_recs, snakeCasifyObject as $g9l4l$snakeCasifyObject, GenericSliderArrowButton as $g9l4l$GenericSliderArrowButton, catchify as $g9l4l$catchify, base_url as $g9l4l$base_url, get_depict_id as $g9l4l$get_depict_id, get_user_id as $g9l4l$get_user_id, get_session_id as $g9l4l$get_session_id, dlog as $g9l4l$dlog, make_url_with_query_params as $g9l4l$make_url_with_query_params, fetch_retry as $g9l4l$fetch_retry, add_version_query_params as $g9l4l$add_version_query_params, sort_obj as $g9l4l$sort_obj, Tenant as $g9l4l$Tenant, Placeholder as $g9l4l$Placeholder, report as $g9l4l$report, javascript_media_query as $g9l4l$javascript_media_query, standard_price_format as $g9l4l$standard_price_format, deparallelize_no_drop as $g9l4l$deparallelize_no_drop, default_rr as $g9l4l$default_rr, make_random_classname as $g9l4l$make_random_classname, n_col_styling_with_dist as $g9l4l$n_col_styling_with_dist, observer as $g9l4l$observer, Lazyfier as $g9l4l$Lazyfier, queueMacroTask as $g9l4l$queueMacroTask, deparallelize as $g9l4l$deparallelize, Rec_Renderer as $g9l4l$Rec_Renderer, CrossIcon as $g9l4l$CrossIcon, useExpandingContainer as $g9l4l$useExpandingContainer, Amazing_Slider as $g9l4l$Amazing_Slider, slider_snap_css as $g9l4l$slider_snap_css, slider_fading_factory as $g9l4l$slider_fading_factory, MinusIcon as $g9l4l$MinusIcon, FilterIcon as $g9l4l$FilterIcon, SortIconAsc as $g9l4l$SortIconAsc, SortIconDesc as $g9l4l$SortIconDesc, PlusIcon as $g9l4l$PlusIcon, hsl_to_rgb as $g9l4l$hsl_to_rgb, relative_luminance_from_rgb as $g9l4l$relative_luminance_from_rgb, TickIcon as $g9l4l$TickIcon, ArrowUp as $g9l4l$ArrowUp, instant_exec_on_suspect_history_change as $g9l4l$instant_exec_on_suspect_history_change, normal_get_product_id as $g9l4l$normal_get_product_id, ContainedPlaceholderImage as $g9l4l$ContainedPlaceholderImage, BackIcon as $g9l4l$BackIcon, SearchIcon as $g9l4l$SearchIcon, Layout as $g9l4l$Layout, make_placeholder_rr as $g9l4l$make_placeholder_rr, async_iterable_ipns as $g9l4l$async_iterable_ipns, make_asyncIterable_exiter as $g9l4l$make_asyncIterable_exiter, href_change_ipns as $g9l4l$href_change_ipns, depict_click as $g9l4l$depict_click, impression_track_element as $g9l4l$impression_track_element, add_new_tab_listener as $g9l4l$add_new_tab_listener, ContainedImage as $g9l4l$ContainedImage, buildThresholdList as $g9l4l$buildThresholdList, PreviousSearchIcon as $g9l4l$PreviousSearchIcon, insert_surfaces as $g9l4l$insert_surfaces} from "@depict-ai/utilishared";
2
- import {template as $g9l4l$template, insert as $g9l4l$insert, effect as $g9l4l$effect, setAttribute as $g9l4l$setAttribute, createComponent as $g9l4l$createComponent, use as $g9l4l$use, addEventListener as $g9l4l$addEventListener, delegateEvents as $g9l4l$delegateEvents, spread as $g9l4l$spread, classList as $g9l4l$classList, memo as $g9l4l$memo, style as $g9l4l$style, mergeProps as $g9l4l$mergeProps, className as $g9l4l$className} from "solid-js/web";
3
- import {createSignal as $g9l4l$createSignal, onCleanup as $g9l4l$onCleanup, createComputed as $g9l4l$createComputed, createEffect as $g9l4l$createEffect, untrack as $g9l4l$untrack, batch as $g9l4l$batch, createResource as $g9l4l$createResource, createMemo as $g9l4l$createMemo, Show as $g9l4l$Show, createRenderEffect as $g9l4l$createRenderEffect, runWithOwner as $g9l4l$runWithOwner, createRoot as $g9l4l$createRoot, getOwner as $g9l4l$getOwner, createReaction as $g9l4l$createReaction, on as $g9l4l$on, ErrorBoundary as $g9l4l$ErrorBoundary, Index as $g9l4l$Index, For as $g9l4l$For} from "solid-js";
1
+ import {add_to_version_info as $g9l4l$add_to_version_info, fetch_recs as $g9l4l$fetch_recs, snakeCasifyObject as $g9l4l$snakeCasifyObject, GenericSliderArrowButton as $g9l4l$GenericSliderArrowButton, catchify as $g9l4l$catchify, base_url as $g9l4l$base_url, get_depict_id as $g9l4l$get_depict_id, get_user_id as $g9l4l$get_user_id, get_session_id as $g9l4l$get_session_id, dlog as $g9l4l$dlog, make_url_with_query_params as $g9l4l$make_url_with_query_params, fetch_retry as $g9l4l$fetch_retry, add_version_query_params as $g9l4l$add_version_query_params, sort_obj as $g9l4l$sort_obj, Tenant as $g9l4l$Tenant, Placeholder as $g9l4l$Placeholder, report as $g9l4l$report, javascript_media_query as $g9l4l$javascript_media_query, standard_price_format as $g9l4l$standard_price_format, deparallelize_no_drop as $g9l4l$deparallelize_no_drop, default_rr as $g9l4l$default_rr, make_random_classname as $g9l4l$make_random_classname, n_col_styling_with_dist as $g9l4l$n_col_styling_with_dist, observer as $g9l4l$observer, Lazyfier as $g9l4l$Lazyfier, queueMacroTask as $g9l4l$queueMacroTask, deparallelize as $g9l4l$deparallelize, Rec_Renderer as $g9l4l$Rec_Renderer, CrossIcon as $g9l4l$CrossIcon, useExpandingContainer as $g9l4l$useExpandingContainer, Amazing_Slider as $g9l4l$Amazing_Slider, slider_snap_css as $g9l4l$slider_snap_css, slider_fading_factory as $g9l4l$slider_fading_factory, MinusIcon as $g9l4l$MinusIcon, FilterIcon as $g9l4l$FilterIcon, SortIconAsc as $g9l4l$SortIconAsc, SortIconDesc as $g9l4l$SortIconDesc, PlusIcon as $g9l4l$PlusIcon, hsl_to_rgb as $g9l4l$hsl_to_rgb, relative_luminance_from_rgb as $g9l4l$relative_luminance_from_rgb, TickIcon as $g9l4l$TickIcon, ArrowUp as $g9l4l$ArrowUp, instant_exec_on_suspect_history_change as $g9l4l$instant_exec_on_suspect_history_change, dwarn as $g9l4l$dwarn, normal_get_product_id as $g9l4l$normal_get_product_id, ContainedPlaceholderImage as $g9l4l$ContainedPlaceholderImage, BackIcon as $g9l4l$BackIcon, SearchIcon as $g9l4l$SearchIcon, Layout as $g9l4l$Layout, make_placeholder_rr as $g9l4l$make_placeholder_rr, async_iterable_ipns as $g9l4l$async_iterable_ipns, make_asyncIterable_exiter as $g9l4l$make_asyncIterable_exiter, href_change_ipns as $g9l4l$href_change_ipns, depict_click as $g9l4l$depict_click, impression_track_element as $g9l4l$impression_track_element, add_new_tab_listener as $g9l4l$add_new_tab_listener, ContainedImage as $g9l4l$ContainedImage, buildThresholdList as $g9l4l$buildThresholdList, PreviousSearchIcon as $g9l4l$PreviousSearchIcon, insert_surfaces as $g9l4l$insert_surfaces} from "@depict-ai/utilishared";
2
+ import {template as $g9l4l$template, insert as $g9l4l$insert, effect as $g9l4l$effect, setAttribute as $g9l4l$setAttribute, createComponent as $g9l4l$createComponent, use as $g9l4l$use, addEventListener as $g9l4l$addEventListener, delegateEvents as $g9l4l$delegateEvents, spread as $g9l4l$spread, classList as $g9l4l$classList, memo as $g9l4l$memo, style as $g9l4l$style, Dynamic as $g9l4l$Dynamic, mergeProps as $g9l4l$mergeProps, className as $g9l4l$className} from "solid-js/web";
3
+ import {createSignal as $g9l4l$createSignal, onCleanup as $g9l4l$onCleanup, createComputed as $g9l4l$createComputed, createRenderEffect as $g9l4l$createRenderEffect, createEffect as $g9l4l$createEffect, untrack as $g9l4l$untrack, batch as $g9l4l$batch, createResource as $g9l4l$createResource, createMemo as $g9l4l$createMemo, Show as $g9l4l$Show, runWithOwner as $g9l4l$runWithOwner, createRoot as $g9l4l$createRoot, getOwner as $g9l4l$getOwner, createReaction as $g9l4l$createReaction, on as $g9l4l$on, ErrorBoundary as $g9l4l$ErrorBoundary, Index as $g9l4l$Index, For as $g9l4l$For} from "solid-js";
4
4
  import {compressToBase64 as $g9l4l$compressToBase64, decompressFromBase64 as $g9l4l$decompressFromBase64} from "lz-string";
5
5
 
6
- /*! Depict.ai search and product listing SDK */ const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.78";
6
+ /*! Depict.ai search and product listing SDK */ const $18bf1d29fb889cca$export$83d89fbfd8236492 = "0.0.80";
7
7
 
8
8
 
9
9
 
@@ -25,25 +25,28 @@ async function $e95f1855a5e3864f$export$58e808b1db15d3bc({ merchant: merchant ,
25
25
 
26
26
 
27
27
 
28
- function $014a147d094b0d08$export$e183a13865960371(params_to_default_value) {
28
+ function $014a147d094b0d08$export$e183a13865960371(params_to_default_value, router_) {
29
29
  const signals = {};
30
30
  const entries = Object.entries(params_to_default_value);
31
31
  const event_handler = (0, $g9l4l$catchify)(({ state: state })=>$014a147d094b0d08$var$history_state_change(signals, entries, state));
32
- for (const [param, default_value] of entries){
33
- const [read_signal] = signals[param] = (0, $g9l4l$createSignal)(history.state?.[param] ?? default_value);
34
- (0, $g9l4l$createComputed)((0, $g9l4l$catchify)(()=>{
32
+ // createRenderEffect because we need the instant execution so the signals always contain values, even before solid's render phase
33
+ (0, $g9l4l$createRenderEffect)(()=>{
34
+ let signal_changed = false;
35
+ let { state: state } = history; // cloning isn't necessary because we're calling replaceState on it anyway
36
+ if (state === null || typeof state != "object") state = {};
37
+ for (const [param, default_value] of entries){
38
+ const [read_signal] = signals[param] ||= (0, $g9l4l$createSignal)(state[param] ?? default_value);
35
39
  const new_value = read_signal();
36
- let { state: state } = history; // cloning isn't necessary because we're calling replaceState on it anyway
37
- if (new_value !== state?.[param]) {
38
- if (state === null || typeof state != "object") state = {};
40
+ if (new_value !== state[param]) {
41
+ signal_changed = true;
39
42
  state[param] = new_value;
40
- history.replaceState(state, "", location.href);
41
43
  }
42
- }));
43
- }
44
+ }
45
+ if (signal_changed) router_.navigate_.replace_state_(state);
46
+ });
44
47
  window.addEventListener("popstate", event_handler);
45
48
  (0, $g9l4l$onCleanup)((0, $g9l4l$catchify)(()=>window.removeEventListener("popstate", event_handler)));
46
- (0, $g9l4l$createEffect)((0, $g9l4l$catchify)(()=>(0, $g9l4l$untrack)((0, $g9l4l$catchify)(()=>$014a147d094b0d08$var$history_state_change(signals, entries, history.state))))); // we need this to run after the first writing
49
+ (0, $g9l4l$createEffect)((0, $g9l4l$catchify)(()=>(0, $g9l4l$untrack)((0, $g9l4l$catchify)(()=>$014a147d094b0d08$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
47
50
  return signals;
48
51
  }
49
52
  function $014a147d094b0d08$var$history_state_change(signals, entries, state) {
@@ -57,8 +60,8 @@ function $014a147d094b0d08$var$history_state_change(signals, entries, state) {
57
60
  }
58
61
 
59
62
 
60
- function $3075a4497054bec6$export$9862539c89138352(get_default_values_) {
61
- const state = (0, $014a147d094b0d08$export$e183a13865960371)(get_default_values_());
63
+ function $3075a4497054bec6$export$9862539c89138352(get_default_values_, router_) {
64
+ const state = (0, $014a147d094b0d08$export$e183a13865960371)(get_default_values_(), router_);
62
65
  const reset_state = ()=>{
63
66
  const new_defaults = get_default_values_();
64
67
  for(const key in state){
@@ -283,8 +286,12 @@ function $925024900e36130f$export$92f2da32c6e7e7ee({ search_results_: search_res
283
286
 
284
287
 
285
288
 
286
- function $5178263ed1e394ca$export$469c7af753d08925({ price_: price_ , price_formatting_: price_formatting_ }) {
287
- return (0, $g9l4l$createMemo)(()=>(0, $g9l4l$standard_price_format)(price_(), price_formatting_().places_after_comma_, price_formatting_().decimal_places_delimiter_, price_formatting_().thousands_delimiter_));
289
+
290
+ function $5178263ed1e394ca$export$a71e92cfbb498adc(props) {
291
+ return (0, $g9l4l$createMemo)(()=>{
292
+ const price_formatting = props.price_formatting_;
293
+ return (0, $g9l4l$standard_price_format)(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
294
+ });
288
295
  }
289
296
 
290
297
 
@@ -391,19 +398,27 @@ function $51b5c03492337d58$export$83fd5de5504a7a67({ formatted_number_of_results
391
398
  }));
392
399
  });
393
400
  return (()=>{
394
- const _el$ = $51b5c03492337d58$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$6 = _el$4.nextSibling, _el$7 = _el$6.nextSibling, _el$10 = _el$7.nextSibling, _el$8 = _el$10.nextSibling, _el$9 = _el$8.nextSibling;
401
+ const _el$ = $51b5c03492337d58$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.nextSibling, _el$7 = _el$4.nextSibling, _el$8 = _el$7.nextSibling, _el$11 = _el$8.nextSibling, _el$9 = _el$11.nextSibling, _el$10 = _el$9.nextSibling;
395
402
  const _ref$ = element;
396
403
  typeof _ref$ === "function" ? (0, $g9l4l$use)(_ref$, _el$) : element = _el$;
397
- (0, $g9l4l$insert)(_el$3, (0, $5178263ed1e394ca$export$469c7af753d08925)({
398
- price_: first_to_show,
399
- price_formatting_: modified_price_formatting_
404
+ (0, $g9l4l$insert)(_el$3, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
405
+ get price_ () {
406
+ return first_to_show();
407
+ },
408
+ get price_formatting_ () {
409
+ return modified_price_formatting_();
410
+ }
400
411
  }));
401
- (0, $g9l4l$insert)(_el$6, (0, $5178263ed1e394ca$export$469c7af753d08925)({
402
- price_: last_to_show,
403
- price_formatting_: modified_price_formatting_
412
+ (0, $g9l4l$insert)(_el$7, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
413
+ get price_ () {
414
+ return last_to_show();
415
+ },
416
+ get price_formatting_ () {
417
+ return modified_price_formatting_();
418
+ }
404
419
  }));
405
- (0, $g9l4l$insert)(_el$2, of_, _el$10);
406
- (0, $g9l4l$insert)(_el$9, count_to_show);
420
+ (0, $g9l4l$insert)(_el$2, of_, _el$11);
421
+ (0, $g9l4l$insert)(_el$10, count_to_show);
407
422
  return _el$;
408
423
  })();
409
424
  }
@@ -678,7 +693,8 @@ function $af89070cc0052779$export$8895d39404bd2bb1(props) {
678
693
  const { user_triggered_: user_triggered_ , i18n_: i18n_ , also_clear_sorting_: also_clear_sorting_ , local_filter_cache_: [get_local_filter_cache, set_local_filter_cache] , selected_filters_: [get_selected_filters, set_selected_filters] , expanded_hierarchical_filters_: [get_expanded_hierarchical_filters, set_expanded_hierarchical_filters] , delay_toast_: delay_toast_ } = props;
679
694
  const previous_selected_filters = (0, $g9l4l$untrack)(get_selected_filters);
680
695
  if (!previous_selected_filters.length) {
681
- // no filters selected, do nothing
696
+ // no filters selected, still clear sorting if applicable but don't display a toast for that since it's very minor
697
+ if (also_clear_sorting_) props.current_sorting_[1]();
682
698
  if (delay_toast_) return ()=>{};
683
699
  return;
684
700
  }
@@ -1349,16 +1365,24 @@ function $a7abb08807717ef9$export$fecbb157621501bd({ number_of_rendered_selected
1349
1365
  };
1350
1366
  (0, $g9l4l$insert)(_el$5, (0, $g9l4l$createComponent)((0, $g9l4l$CrossIcon), {}), _el$6);
1351
1367
  (0, $g9l4l$insert)(_el$6, ()=>price_formatting_().pre_, _el$7);
1352
- (0, $g9l4l$insert)(_el$6, ()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
1353
- price_: (0, $g9l4l$createMemo)(()=>filter().data[0]),
1354
- price_formatting_: price_formatting_
1355
- }), _el$7);
1368
+ (0, $g9l4l$insert)(_el$6, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
1369
+ get price_ () {
1370
+ return filter().data[0];
1371
+ },
1372
+ get price_formatting_ () {
1373
+ return price_formatting_();
1374
+ }
1375
+ }), _el$7);
1356
1376
  (0, $g9l4l$insert)(_el$6, ()=>price_formatting_().post_, _el$7);
1357
1377
  (0, $g9l4l$insert)(_el$6, ()=>price_formatting_().pre_, null);
1358
- (0, $g9l4l$insert)(_el$6, ()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
1359
- price_: (0, $g9l4l$createMemo)(()=>filter().data[1]),
1360
- price_formatting_: price_formatting_
1361
- }), null);
1378
+ (0, $g9l4l$insert)(_el$6, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
1379
+ get price_ () {
1380
+ return filter().data[1];
1381
+ },
1382
+ get price_formatting_ () {
1383
+ return price_formatting_();
1384
+ }
1385
+ }), null);
1362
1386
  (0, $g9l4l$insert)(_el$6, ()=>price_formatting_().post_, null);
1363
1387
  return _el$5;
1364
1388
  })();
@@ -1929,16 +1953,24 @@ function $66f3de62e88607b0$var$RangeSelector({ max_: max_ , min_: min_ , current
1929
1953
  i18n_: i18n_
1930
1954
  }), _el$8);
1931
1955
  (0, $g9l4l$insert)(_el$9, pre_price, null);
1932
- (0, $g9l4l$insert)(_el$9, ()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
1933
- price_: min_,
1934
- price_formatting_: price_formatting_
1935
- }), null);
1956
+ (0, $g9l4l$insert)(_el$9, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
1957
+ get price_ () {
1958
+ return min_();
1959
+ },
1960
+ get price_formatting_ () {
1961
+ return price_formatting_();
1962
+ }
1963
+ }), null);
1936
1964
  (0, $g9l4l$insert)(_el$9, post_price, null);
1937
1965
  (0, $g9l4l$insert)(_el$10, pre_price, null);
1938
- (0, $g9l4l$insert)(_el$10, ()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
1939
- price_: max_,
1940
- price_formatting_: price_formatting_
1941
- }), null);
1966
+ (0, $g9l4l$insert)(_el$10, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
1967
+ get price_ () {
1968
+ return max_();
1969
+ },
1970
+ get price_formatting_ () {
1971
+ return price_formatting_();
1972
+ }
1973
+ }), null);
1942
1974
  (0, $g9l4l$insert)(_el$10, post_price, null);
1943
1975
  (0, $g9l4l$effect)((_p$)=>{
1944
1976
  const _v$ = i18n_.range_filter_low_point_aria_label_(), _v$2 = min_(), _v$3 = max_(), _v$4 = i18n_.range_filter_high_point_aria_label_(), _v$5 = min_(), _v$6 = max_();
@@ -2843,48 +2875,57 @@ var $7b224b353182ce9a$export$2e2bcd8739ae039 = {
2843
2875
  const $7c4a8499f0ad6e11$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<span class="show-selected" aria-hidden="true"><span></span></span>`, 4);
2844
2876
  function $7c4a8499f0ad6e11$export$53c59af873b303c9({ selected_filters_in_group_: selected_filters_in_group_ , i18n_: { price_formatting_: price_formatting_ } }) {
2845
2877
  const [show_tick_icon, set_show_tick_icon] = (0, $g9l4l$createSignal)(false);
2846
- return (()=>{
2847
- const _el$ = $7c4a8499f0ad6e11$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild;
2848
- (0, $g9l4l$insert)(_el$2, ()=>(0, $g9l4l$createMemo)(()=>(0, $g9l4l$batch)(()=>{
2849
- set_show_tick_icon(false);
2850
- let { size: size } = selected_filters_in_group_();
2851
- try_specific: {
2852
- if (size > 1) break try_specific;
2853
- for (const [selected_filter, filter_data] of selected_filters_in_group_()){
2854
- // we're intentionally not looping in this statement since we always just want to show the first thing in the filter group
2855
- const { meta: meta } = filter_data;
2856
- const { type: type } = meta;
2857
- if (type === "range") return [
2858
- (0, $g9l4l$memo)(()=>price_formatting_().pre_),
2859
- (0, $g9l4l$memo)(()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
2860
- price_: (0, $g9l4l$createMemo)(()=>selected_filter.data[0]),
2861
- price_formatting_: price_formatting_
2862
- })),
2863
- (0, $g9l4l$memo)(()=>price_formatting_().post_),
2864
- " – ",
2865
- (0, $g9l4l$memo)(()=>price_formatting_().pre_),
2866
- (0, $g9l4l$memo)(()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
2867
- price_: (0, $g9l4l$createMemo)(()=>selected_filter.data[1]),
2868
- price_formatting_: price_formatting_
2869
- })),
2870
- (0, $g9l4l$memo)(()=>price_formatting_().post_)
2871
- ];
2872
- else {
2873
- const { data: data } = selected_filter;
2874
- const data_is_array = Array.isArray(data);
2875
- if (data_is_array && data.length !== 1) {
2876
- size = data.length;
2877
- break try_specific;
2878
- }
2879
- const needle = data_is_array ? data[0] : data;
2880
- const index_in_meta = meta.values.findIndex((value)=>needle === value || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index)=>needle[index] === item));
2881
- return meta.names?.[index_in_meta] || meta.values?.[index_in_meta];
2878
+ const text = (0, $g9l4l$createMemo)(()=>(0, $g9l4l$batch)(()=>{
2879
+ set_show_tick_icon(false);
2880
+ let { size: size } = selected_filters_in_group_();
2881
+ try_specific: {
2882
+ if (size > 1) break try_specific;
2883
+ for (const [selected_filter, filter_data] of selected_filters_in_group_()){
2884
+ // we're intentionally not looping in this statement since we always just want to show the first thing in the filter group
2885
+ const { meta: meta } = filter_data;
2886
+ const { type: type } = meta;
2887
+ if (type === "range") return [
2888
+ (0, $g9l4l$memo)(()=>price_formatting_().pre_),
2889
+ (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
2890
+ get price_ () {
2891
+ return selected_filter.data[0];
2892
+ },
2893
+ get price_formatting_ () {
2894
+ return price_formatting_();
2895
+ }
2896
+ }),
2897
+ (0, $g9l4l$memo)(()=>price_formatting_().post_),
2898
+ " – ",
2899
+ (0, $g9l4l$memo)(()=>price_formatting_().pre_),
2900
+ (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
2901
+ get price_ () {
2902
+ return selected_filter.data[1];
2903
+ },
2904
+ get price_formatting_ () {
2905
+ return price_formatting_();
2882
2906
  }
2907
+ }),
2908
+ (0, $g9l4l$memo)(()=>price_formatting_().post_)
2909
+ ];
2910
+ else {
2911
+ const { data: data } = selected_filter;
2912
+ const data_is_array = Array.isArray(data);
2913
+ if (data_is_array && data.length !== 1) {
2914
+ size = data.length;
2915
+ break try_specific;
2883
2916
  }
2917
+ const needle = data_is_array ? data[0] : data;
2918
+ const index_in_meta = meta.values.findIndex((value)=>needle === value || Array.isArray(needle) && Array.isArray(value) && needle.length === value.length && value.every((item, index)=>needle[index] === item));
2919
+ return meta.names?.[index_in_meta] || meta.values?.[index_in_meta];
2884
2920
  }
2885
- set_show_tick_icon(true);
2886
- return size + "";
2887
- })));
2921
+ }
2922
+ }
2923
+ set_show_tick_icon(true);
2924
+ return size + "";
2925
+ }));
2926
+ return (()=>{
2927
+ const _el$ = $7c4a8499f0ad6e11$var$_tmpl$.cloneNode(true), _el$2 = _el$.firstChild;
2928
+ (0, $g9l4l$insert)(_el$2, text);
2888
2929
  (0, $g9l4l$insert)(_el$, (0, $g9l4l$createComponent)((0, $g9l4l$Show), {
2889
2930
  get when () {
2890
2931
  return show_tick_icon();
@@ -2950,6 +2991,7 @@ function $a2432c33d88ec427$export$ab34afce88557c0e(props) {
2950
2991
 
2951
2992
 
2952
2993
 
2994
+
2953
2995
  const $8aff437d739a524d$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="filter-collapsible"></div>`, 2), $8aff437d739a524d$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<button class="clear-group"><span></span></button>`, 4), $8aff437d739a524d$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="view-more-clear"></div>`, 2), $8aff437d739a524d$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="filter-collapsible-body"><div class="filter-part"></div></div>`, 4), $8aff437d739a524d$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<details class="filter-collapsible"></details>`, 2), $8aff437d739a524d$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<summary class="filter-group-summary"><div class="summary"><span></span><div class="selected-w-sign"></div></div></summary>`, 8), $8aff437d739a524d$var$_tmpl$7 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="ungrouped"></div>`, 2), $8aff437d739a524d$var$_tmpl$8 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<button class="clear-all-filters major"></button>`, 2);
2954
2996
  function $8aff437d739a524d$export$3f1a388cc0d8fed7(props) {
2955
2997
  // Split like this to make placeholder wrapping more visible & this component is exported and used in MobileModal
@@ -3061,13 +3103,22 @@ function $8aff437d739a524d$var$ActualFilterBody(props) {
3061
3103
  return "Filter group " + JSON.stringify(section_) + " failed";
3062
3104
  },
3063
3105
  get children () {
3064
- return (0, $g9l4l$createMemo)(()=>(0, $g9l4l$createMemo)(()=>(0, $7b224b353182ce9a$export$2e2bcd8739ae039)[filter()?.meta?.type])()?.({
3065
- filter_: filter,
3066
- expanded_hierarchical_filters_: props.expanded_hierarchical_filters_,
3067
- selected_filters_: props.selected_filters_,
3068
- i18n_: props.i18n_,
3069
- view_more_button_below_group_: view_more_button_below_group
3070
- }));
3106
+ return (0, $g9l4l$createComponent)((0, $g9l4l$Dynamic), {
3107
+ get component () {
3108
+ return (0, $7b224b353182ce9a$export$2e2bcd8739ae039)[filter()?.meta?.type];
3109
+ },
3110
+ filter_: filter,
3111
+ get expanded_hierarchical_filters_ () {
3112
+ return props.expanded_hierarchical_filters_;
3113
+ },
3114
+ get selected_filters_ () {
3115
+ return props.selected_filters_;
3116
+ },
3117
+ get i18n_ () {
3118
+ return props.i18n_;
3119
+ },
3120
+ view_more_button_below_group_: view_more_button_below_group
3121
+ });
3071
3122
  }
3072
3123
  })
3073
3124
  }));
@@ -3123,19 +3174,27 @@ function $8aff437d739a524d$var$ActualFilterBody(props) {
3123
3174
  get each () {
3124
3175
  return untogglable_filters();
3125
3176
  },
3126
- children: (filter)=>// create memo to diff the function with next function
3127
- {
3177
+ children: (filter)=>{
3128
3178
  const view_more_button_below_group = (0, $g9l4l$createSignal)();
3129
- const filter_element_memo = (0, $g9l4l$createMemo)(()=>(0, $g9l4l$createMemo)(()=>(0, $7b224b353182ce9a$export$2e2bcd8739ae039)[filter()?.meta?.type])()?.({
3179
+ const [get_view_more_button_below_group] = view_more_button_below_group;
3180
+ return [
3181
+ (0, $g9l4l$createComponent)((0, $g9l4l$Dynamic), {
3182
+ get component () {
3183
+ return (0, $7b224b353182ce9a$export$2e2bcd8739ae039)[filter()?.meta?.type];
3184
+ },
3130
3185
  filter_: filter,
3131
- expanded_hierarchical_filters_: props.expanded_hierarchical_filters_,
3132
- selected_filters_: props.selected_filters_,
3133
- i18n_: props.i18n_,
3186
+ get expanded_hierarchical_filters_ () {
3187
+ return props.expanded_hierarchical_filters_;
3188
+ },
3189
+ get selected_filters_ () {
3190
+ return props.selected_filters_;
3191
+ },
3192
+ get i18n_ () {
3193
+ return props.i18n_;
3194
+ },
3134
3195
  view_more_button_below_group_: view_more_button_below_group
3135
- }));
3136
- return [
3137
- filter_element_memo,
3138
- view_more_button_below_group[0]
3196
+ }),
3197
+ (0, $g9l4l$memo)(get_view_more_button_below_group)
3139
3198
  ];
3140
3199
  }
3141
3200
  }));
@@ -3743,6 +3802,7 @@ function $dd3727f29e682893$export$b288c38ae3fddb56({ available_filters_: availab
3743
3802
 
3744
3803
  const $bf7fe049e78f975a$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="filters"><div class="body"></div></div>`, 4), $bf7fe049e78f975a$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="sorting"><div class="body"></div></div>`, 4), $bf7fe049e78f975a$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="sort-and-filter-buttons"><div class="outer"><div class="inner"></div></div></div>`, 6), $bf7fe049e78f975a$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<span class="num-filters"></span>`, 2), $bf7fe049e78f975a$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="open-filters-button-container"><button class="filter toggle-button major-minor-transition" type="button"><span></span></button></div>`, 6), $bf7fe049e78f975a$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<button class="toggle-button for-sorting major-minor-transition"><span></span></button>`, 4);
3745
3804
  function $bf7fe049e78f975a$export$d7841e452f2e59a8({ current_sorting_: current_sorting_ , set_extra_els_in_results_container_: set_extra_els_in_results_container_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , set_sort_or_filter_open_: set_sort_or_filter_open_ , i18n_: i18n_ , available_sortings_: available_sortings_ , available_filters_: available_filters_ , expanded_filters_: expanded_filters_ , middle_elements_: middle_elements_ , input_modal_open_: input_modal_open_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , number_of_rendered_selected_filters_items_: number_of_rendered_selected_filters_items_ , set_sort_and_filter_element_: set_sort_and_filter_element_ , formatted_number_of_results_: formatted_number_of_results_ , filter_button_width_: filter_button_width_ , sort_button_width_: sort_button_width_ , selected_filters_: selected_filters_ , local_filter_cache_: local_filter_cache_ , get_extra_filters_button_: get_extra_filters_button_ , get_extra_sorting_button_: get_extra_sorting_button_ }) {
3805
+ // @ts-ignore
3746
3806
  return (0, $a406ebe9523f192f$export$b69d0d92862de18b)({
3747
3807
  severity_: "error",
3748
3808
  message_: "Sorting and filters failed",
@@ -4266,7 +4326,7 @@ const $73294c7089bfc7c9$export$e2cf3f19dd3f8aac = "went_sideways_clear_filters";
4266
4326
  function $73294c7089bfc7c9$export$43cd1e747fecd42e(to_url, set_clearing_flag, from_search_params = new URLSearchParams(location.search)) {
4267
4327
  if (!to_url) return to_url;
4268
4328
  const was_url_object = to_url instanceof URL;
4269
- const url_object = was_url_object ? to_url : new URL(to_url);
4329
+ const url_object = was_url_object ? to_url : new URL(to_url, location.origin);
4270
4330
  const { searchParams: searchParams } = url_object;
4271
4331
  if (set_clearing_flag) searchParams.set($73294c7089bfc7c9$export$e2cf3f19dd3f8aac, "true");
4272
4332
  if (from_search_params.has($73294c7089bfc7c9$var$sorting_query_param)) searchParams.set($73294c7089bfc7c9$var$sorting_query_param, from_search_params.get($73294c7089bfc7c9$var$sorting_query_param));
@@ -5140,6 +5200,7 @@ function $0466953901b38f18$export$f091cbac892643a4(obj) {
5140
5200
 
5141
5201
  function $c7f938ac40924f3b$export$23fca46f3143581f(component, error_message) {
5142
5202
  const component_in_error_boundary = (do_with_elements)=>{
5203
+ // @ts-ignore
5143
5204
  return (0, $a406ebe9523f192f$export$b69d0d92862de18b)({
5144
5205
  severity_: "error",
5145
5206
  message_: error_message,
@@ -5166,13 +5227,16 @@ function $c7f938ac40924f3b$export$23fca46f3143581f(component, error_message) {
5166
5227
 
5167
5228
 
5168
5229
 
5169
- function $b4291f5d2e6b2fae$export$7bcff1eb3eca57d7(router) {
5230
+ function $f01b3a0b9fbf6519$export$477caf01aecaeb2a({ search_query_url_param_name_: search_query_url_param_name_ , router_: router_ }) {
5231
+ const search_query_ = search_query_url_param_name_ ? (0, $g9l4l$createSignal)("") : undefined;
5232
+ const get_search_query_ = search_query_?.[0];
5233
+ const set_search_query = search_query_?.[1];
5170
5234
  const current_sorting_ = (0, $g9l4l$createSignal)();
5171
5235
  const selected_filters_ = (0, $g9l4l$createSignal)([]);
5172
- const [get_sorting, set_sorting] = current_sorting_;
5173
- const [get_selected_filters, set_selected_filters] = selected_filters_;
5236
+ const [get_sorting_, set_sorting] = current_sorting_;
5237
+ const [get_selected_filters_, set_selected_filters] = selected_filters_;
5174
5238
  const [get_current_href, set_current_href] = (0, $g9l4l$createSignal)(location.href);
5175
- const history_change_handler = ()=>set_current_href(location.href);
5239
+ const history_change_handler = (0, $g9l4l$catchify)(()=>set_current_href(location.href));
5176
5240
  const owner = (0, $g9l4l$getOwner)() || (0, $g9l4l$createRoot)(()=>(0, $g9l4l$getOwner)());
5177
5241
  let writer_started = false;
5178
5242
  (0, $g9l4l$instant_exec_on_suspect_history_change).add(history_change_handler);
@@ -5182,12 +5246,12 @@ function $b4291f5d2e6b2fae$export$7bcff1eb3eca57d7(router) {
5182
5246
  (0, $g9l4l$batch)(()=>{
5183
5247
  const found_sorting = (0, $73294c7089bfc7c9$export$766e9676e74997d3)(searchParams);
5184
5248
  if (found_sorting) {
5185
- const current_sorting = (0, $g9l4l$untrack)(get_sorting);
5249
+ const current_sorting = (0, $g9l4l$untrack)(get_sorting_);
5186
5250
  // Do some diffing since we might assume in certain places of the code that if the signal changes it means the sorting has changed
5187
5251
  if (current_sorting?.field !== found_sorting.field || current_sorting?.order !== found_sorting.order) set_sorting(found_sorting);
5188
5252
  } else set_sorting();
5189
5253
  const found_filters = (0, $73294c7089bfc7c9$export$f934fa24c3a86811)(searchParams);
5190
- const selected_filters = (0, $g9l4l$untrack)(get_selected_filters);
5254
+ const selected_filters = (0, $g9l4l$untrack)(get_selected_filters_);
5191
5255
  const found_filters_map = new Map(found_filters.map(({ field: field , op: op , data: data })=>[
5192
5256
  JSON.stringify([
5193
5257
  field,
@@ -5200,25 +5264,36 @@ function $b4291f5d2e6b2fae$export$7bcff1eb3eca57d7(router) {
5200
5264
  field,
5201
5265
  op
5202
5266
  ]))) === JSON.stringify(data))) set_selected_filters(found_filters);
5267
+ if (search_query_url_param_name_) {
5268
+ const found_query = searchParams.get(search_query_url_param_name_);
5269
+ set_search_query(found_query || "");
5270
+ }
5203
5271
  if (!writer_started) {
5204
5272
  // The owner here is the createComputed which gets disposed the next time the computation runs - but we actually just want to delay the start of the href_writer until our signals contain the current value of the URL, therefore the runWithOwner
5205
- (0, $g9l4l$runWithOwner)(owner, ()=>$b4291f5d2e6b2fae$var$start_href_writer(get_sorting, get_selected_filters, router));
5273
+ (0, $g9l4l$runWithOwner)(owner, ()=>$f01b3a0b9fbf6519$var$start_href_writer({
5274
+ get_sorting_: get_sorting_,
5275
+ get_selected_filters_: get_selected_filters_,
5276
+ router_: router_
5277
+ }));
5206
5278
  writer_started = true;
5207
5279
  }
5208
5280
  });
5209
5281
  });
5282
+ // @ts-ignore
5210
5283
  return {
5211
5284
  current_sorting_: current_sorting_,
5212
- selected_filters_: selected_filters_
5285
+ selected_filters_: selected_filters_,
5286
+ ...typeof search_query_url_param_name_ === "string" ? {
5287
+ search_query_accessor_: get_search_query_
5288
+ } : {}
5213
5289
  };
5214
5290
  }
5215
5291
  /**
5216
5292
  * Writes the sorting and filters to the URL query parameters when they change.
5217
- */ function $b4291f5d2e6b2fae$var$start_href_writer(get_sorting, get_selected_filters, router) {
5218
- // This has to be a createComputed because there can be some kind of URL query bouncing back and forwards otherwise (observed when clearing filters by making a new search)
5219
- (0, $g9l4l$createComputed)((0, $g9l4l$on)([
5220
- get_sorting,
5221
- get_selected_filters
5293
+ */ function $f01b3a0b9fbf6519$var$start_href_writer({ get_sorting_: get_sorting_ , get_selected_filters_: get_selected_filters_ , router_: router_ }) {
5294
+ (0, $g9l4l$createEffect)((0, $g9l4l$on)([
5295
+ get_sorting_,
5296
+ get_selected_filters_
5222
5297
  ], ([sorting, filters])=>{
5223
5298
  const current_href = location.href;
5224
5299
  const url_object = new URL(current_href);
@@ -5236,7 +5311,7 @@ function $b4291f5d2e6b2fae$export$7bcff1eb3eca57d7(router) {
5236
5311
  // Having the array middle step because if we'd check the "size" property of the map the algorithm could be fooled if there were two query parameters with the same key
5237
5312
  const new_search_params_map = new Map(new_search_params);
5238
5313
  if (unmodified_search_params.length !== new_search_params.length || !unmodified_search_params.every(([key, value])=>new_search_params_map.get(key) === value)) // Only update URL if it actually changed
5239
- router.navigate_.go_to_({
5314
+ router_.navigate_.go_to_({
5240
5315
  is_replace_: true,
5241
5316
  new_url_: url_object.href,
5242
5317
  force_spa_navigation_: true
@@ -5295,10 +5370,15 @@ class $cfa2761d36e5714c$export$7e1297a3a19f10d8 {
5295
5370
  * @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
5296
5371
  * @param force_spa_navigation_ if you want to force SPA navigation even if on_navigation_ is set to "hard_navigation". You should only set this to true for inter-SDK-page navigations
5297
5372
  * @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
5298
- */ go_to_: async ({ new_url_: new_url_ , event_: event_ , force_spa_navigation_: force_spa_navigation_ , is_replace_: is_replace_ , category_query_id_: category_query_id_ })=>{
5373
+ * @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
5374
+ */ go_to_: (0, $g9l4l$catchify)(async ({ new_url_: raw_new_url , event_: event_ , force_spa_navigation_: force_spa_navigation_ , is_replace_: is_replace_ , category_query_id_: category_query_id_ })=>{
5375
+ const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
5299
5376
  const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
5300
5377
  if (this.#dont_attempt_navigation(event_)) return;
5301
- if (wants_hard_navigation && !force_spa_navigation_) {
5378
+ const different_origin = new_url_.origin !== location.origin;
5379
+ if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
5380
+ if (force_spa_navigation_ && different_origin) // If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
5381
+ (0, $g9l4l$dwarn)("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
5302
5382
  if (!event_) // If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
5303
5383
  location.assign(new_url_);
5304
5384
  return;
@@ -5308,14 +5388,15 @@ class $cfa2761d36e5714c$export$7e1297a3a19f10d8 {
5308
5388
  if (force_spa_navigation_ && wants_hard_navigation) {
5309
5389
  // Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
5310
5390
  const new_state = history.state;
5311
- if (category_query_id_) new_state.category_current_query_id = category_query_id_;
5391
+ if (category_query_id_) // In JS-UI we need to know the query_id of the current category, therefore push it into state
5392
+ new_state.category_current_query_id = category_query_id_;
5312
5393
  history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
5313
5394
  } else this.#throwing_on_navigation.call(this, {
5314
5395
  is_replace: is_replace_,
5315
- new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_)
5396
+ new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin)
5316
5397
  });
5317
5398
  await promise;
5318
- }
5399
+ })
5319
5400
  };
5320
5401
  constructor(on_navigation){
5321
5402
  this.on_navigation_ = on_navigation;
@@ -5377,7 +5458,9 @@ class $ec52ef1e6c117813$export$f34314aa9505732e {
5377
5458
  Object.assign(this, props_on_class); // set initial signal values
5378
5459
  (0, $2864fd26f57ff474$export$5162a71f252e6122)();
5379
5460
  if (on_navigation) this.#router.on_navigation_ = on_navigation;
5380
- const { selected_filters_: selected_filters_ , current_sorting_: current_sorting_ } = (0, $b4291f5d2e6b2fae$export$7bcff1eb3eca57d7)(this.#router);
5461
+ const { selected_filters_: selected_filters_ , current_sorting_: current_sorting_ } = (0, $f01b3a0b9fbf6519$export$477caf01aecaeb2a)({
5462
+ router_: this.#router
5463
+ });
5381
5464
  const [reset_history_state_, state_] = (0, $3075a4497054bec6$export$9862539c89138352)(()=>({
5382
5465
  category_filters_open: false,
5383
5466
  category_sorting_open: false,
@@ -5386,7 +5469,7 @@ class $ec52ef1e6c117813$export$f34314aa9505732e {
5386
5469
  category_local_filter_cache: [],
5387
5470
  category_expanded_hierarchical_filters: [],
5388
5471
  category_scroll_restoration_data: []
5389
- }));
5472
+ }), this.#router);
5390
5473
  const i18n_ = (0, $0466953901b38f18$export$f091cbac892643a4)(this.#locale_signal[0]);
5391
5474
  $ec52ef1e6c117813$var$privately_shared_properties.set(this, {
5392
5475
  state_: state_,
@@ -6031,7 +6114,7 @@ function $079defea521d5e2a$export$b3ad617e9036868(modal_body_style, input_field,
6031
6114
 
6032
6115
 
6033
6116
 
6034
- function $a0d89ff25220eb8d$export$e026af0c7b64ea5f({ selected_filters_: selected_filters_ , search_query_: [get_search_query] , current_sorting_: current_sorting_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , i18n_: i18n_ , local_filter_cache_: local_filter_cache_ }) {
6117
+ function $a0d89ff25220eb8d$export$e026af0c7b64ea5f({ selected_filters_: selected_filters_ , get_search_query_: get_search_query_ , current_sorting_: current_sorting_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , i18n_: i18n_ , local_filter_cache_: local_filter_cache_ }) {
6035
6118
  const [get_selected_filters] = selected_filters_;
6036
6119
  // Possible values:
6037
6120
  // 0 - we should not clear next submit
@@ -6046,7 +6129,7 @@ function $a0d89ff25220eb8d$export$e026af0c7b64ea5f({ selected_filters_: selected
6046
6129
  }, {
6047
6130
  defer: true
6048
6131
  }));
6049
- (0, $g9l4l$createComputed)((0, $g9l4l$on)(get_search_query, (0, $g9l4l$catchify)(()=>{
6132
+ (0, $g9l4l$createComputed)((0, $g9l4l$on)(get_search_query_, (0, $g9l4l$catchify)(()=>{
6050
6133
  // when a query was submitted, clear filters if clear was pressed before
6051
6134
  const clear_value = (0, $g9l4l$untrack)(get_clear_filters_next_submit);
6052
6135
  if (clear_value) {
@@ -6071,12 +6154,11 @@ function $a0d89ff25220eb8d$export$e026af0c7b64ea5f({ selected_filters_: selected
6071
6154
 
6072
6155
 
6073
6156
 
6074
- function $4d62f5daa51642fe$export$84bba84a7b837187(search_query) {
6157
+ function $4d62f5daa51642fe$export$84bba84a7b837187(read_search_query) {
6075
6158
  const ls = localStorage;
6076
6159
  const key = "depict_searches";
6077
6160
  const previous_searches = (0, $g9l4l$createSignal)(JSON.parse(ls[key] || "[]"));
6078
6161
  const [read_previous_searches, write_previous_searches] = previous_searches;
6079
- const [read_search_query] = search_query;
6080
6162
  (0, $g9l4l$createEffect)((0, $g9l4l$catchify)(()=>{
6081
6163
  const json_encoded = JSON.stringify(read_previous_searches());
6082
6164
  if (ls[key] !== json_encoded) ls[key] = json_encoded;
@@ -6097,9 +6179,9 @@ function $4d62f5daa51642fe$export$84bba84a7b837187(search_query) {
6097
6179
 
6098
6180
 
6099
6181
 
6100
- async function $7f6ddd9a7e868c4d$export$e16630ecb9644a1c({ on_submit_with_unchanged_value_: on_submit_with_unchanged_value_ , search_param_name_: search_param_name_ , set_search_field_value_: set_search_field_value_ , search_query_: [read_search_query] , url_transformer_: url_transformer_ , router_: router_ , after_submit_: after_submit_ , get_new_query: get_new_query }) {
6182
+ async function $7f6ddd9a7e868c4d$export$e16630ecb9644a1c({ on_submit_with_unchanged_value_: on_submit_with_unchanged_value_ , search_param_name_: search_param_name_ , set_search_field_value_: set_search_field_value_ , get_search_query_: get_search_query_ , url_transformer_: url_transformer_ , router_: router_ , after_submit_: after_submit_ , get_new_query: get_new_query }) {
6101
6183
  const new_search_query = get_new_query();
6102
- const previous_query = (0, $g9l4l$untrack)(read_search_query);
6184
+ const previous_query = (0, $g9l4l$untrack)(get_search_query_);
6103
6185
  if (previous_query === new_search_query && new URLSearchParams(location.search).has(search_param_name_)) {
6104
6186
  // don't push a history entry / re-search if someone submits a search again
6105
6187
  // do close the modal though
@@ -6123,32 +6205,6 @@ async function $7f6ddd9a7e868c4d$export$e16630ecb9644a1c({ on_submit_with_unchan
6123
6205
 
6124
6206
 
6125
6207
 
6126
- function $4ad18a8b237ff7f6$export$2542ffb77b620b02(params_to_default_value) {
6127
- // TODO: remove this abstraction, put it in same place as filters
6128
- // TODO: make it only return an accessor
6129
- const signals = {};
6130
- const entries = Object.entries(params_to_default_value);
6131
- for (const [param, default_value] of entries)signals[param] = (0, $g9l4l$createSignal)(default_value ?? "");
6132
- const [exit_iterable, exitable_iterable] = (0, $g9l4l$make_asyncIterable_exiter)((0, $g9l4l$href_change_ipns));
6133
- (0, $g9l4l$onCleanup)((0, $g9l4l$catchify)(exit_iterable));
6134
- (0, $g9l4l$catchify)(async ()=>{
6135
- for await (const href of exitable_iterable){
6136
- const { searchParams: searchParams } = new URL(href);
6137
- for (const [param, default_value] of entries){
6138
- const [_get, set] = signals[param];
6139
- if (searchParams.has(param)) {
6140
- const new_val = searchParams.get(param) ?? default_value ?? "";
6141
- set(new_val);
6142
- } else set(default_value ?? "");
6143
- }
6144
- }
6145
- })();
6146
- return signals;
6147
- }
6148
-
6149
-
6150
-
6151
-
6152
6208
 
6153
6209
 
6154
6210
 
@@ -6185,8 +6241,10 @@ function $4ad18a8b237ff7f6$export$2542ffb77b620b02(params_to_default_value) {
6185
6241
 
6186
6242
 
6187
6243
 
6244
+
6245
+
6188
6246
  const $d3c0043bb23a833f$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<span class="orig price"></span>`, 2), $d3c0043bb23a833f$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<a class="instant-card"><div class="img-part"></div><div class="right-part"><div class="title-brand-tagline"><span class="brand"></span><span class="title"></span></div><div class="price-container"><span class="price"></span></div></div></a>`, 16), $d3c0043bb23a833f$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="tagline"></div>`, 2);
6189
- const $d3c0043bb23a833f$export$b05c0ae390cf3e06 = (display_or_variant_container, { i18n: i18n , market: market })=>{
6247
+ const $d3c0043bb23a833f$export$b05c0ae390cf3e06 = (display_or_variant_container, { i18n: i18n , market: market }, router_)=>{
6190
6248
  const display = (0, $g9l4l$createMemo)(()=>{
6191
6249
  const display = display_or_variant_container();
6192
6250
  // Support for backend's new display format
@@ -6198,11 +6256,6 @@ const $d3c0043bb23a833f$export$b05c0ae390cf3e06 = (display_or_variant_container,
6198
6256
  };
6199
6257
  }
6200
6258
  if (display.page_url) return display;
6201
- // Support for post-migration (but still old basic format) Stronger displays, with slug but without page_url
6202
- if (display.slug) {
6203
- display.page_url = `/${market}/` + display.slug;
6204
- return display;
6205
- }
6206
6259
  // Support for Spendrups displays, used by our frontend script and Spendrups coming react-ui integration.
6207
6260
  if (!display?.variants?.length) return;
6208
6261
  return display.variants.filter((v)=>v.product_id == display.product_id)[0];
@@ -6220,8 +6273,14 @@ const $d3c0043bb23a833f$export$b05c0ae390cf3e06 = (display_or_variant_container,
6220
6273
  init_with_placeholder: true
6221
6274
  }));
6222
6275
  const is_sale = (0, $g9l4l$createMemo)(()=>display().sale_price !== display().original_price);
6276
+ const href = (0, $g9l4l$createMemo)(()=>display().page_url);
6223
6277
  const returnVal = (()=>{
6224
6278
  const _el$ = $d3c0043bb23a833f$var$_tmpl$2.cloneNode(true), _el$2 = _el$.firstChild, _el$3 = _el$2.nextSibling, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.nextSibling, _el$7 = _el$4.nextSibling, _el$9 = _el$7.firstChild;
6279
+ (0, $g9l4l$addEventListener)(_el$, "click", (0, $g9l4l$catchify)((event_)=>router_.navigate_.go_to_({
6280
+ new_url_: href(),
6281
+ is_replace_: false,
6282
+ event_: event_
6283
+ })), true);
6225
6284
  (0, $g9l4l$insert)(_el$2, contained_image);
6226
6285
  (0, $g9l4l$insert)(_el$5, ()=>display().brand);
6227
6286
  (0, $g9l4l$insert)(_el$6, ()=>display().title);
@@ -6243,22 +6302,30 @@ const $d3c0043bb23a833f$export$b05c0ae390cf3e06 = (display_or_variant_container,
6243
6302
  get children () {
6244
6303
  const _el$8 = $d3c0043bb23a833f$var$_tmpl$.cloneNode(true);
6245
6304
  (0, $g9l4l$insert)(_el$8, ()=>i18n.price_formatting_().pre_, null);
6246
- (0, $g9l4l$insert)(_el$8, ()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
6247
- price_: (0, $g9l4l$createMemo)(()=>display().original_price),
6248
- price_formatting_: i18n.price_formatting_
6249
- }), null);
6305
+ (0, $g9l4l$insert)(_el$8, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
6306
+ get price_ () {
6307
+ return display().original_price;
6308
+ },
6309
+ get price_formatting_ () {
6310
+ return i18n.price_formatting_();
6311
+ }
6312
+ }), null);
6250
6313
  (0, $g9l4l$insert)(_el$8, ()=>i18n.price_formatting_().post_, null);
6251
6314
  return _el$8;
6252
6315
  }
6253
6316
  }), _el$9);
6254
6317
  (0, $g9l4l$insert)(_el$9, ()=>i18n.price_formatting_().pre_, null);
6255
- (0, $g9l4l$insert)(_el$9, ()=>(0, $5178263ed1e394ca$export$469c7af753d08925)({
6256
- price_: (0, $g9l4l$createMemo)(()=>display().sale_price),
6257
- price_formatting_: i18n.price_formatting_
6258
- }), null);
6318
+ (0, $g9l4l$insert)(_el$9, (0, $g9l4l$createComponent)((0, $5178263ed1e394ca$export$a71e92cfbb498adc), {
6319
+ get price_ () {
6320
+ return display().sale_price;
6321
+ },
6322
+ get price_formatting_ () {
6323
+ return i18n.price_formatting_();
6324
+ }
6325
+ }), null);
6259
6326
  (0, $g9l4l$insert)(_el$9, ()=>i18n.price_formatting_().post_, null);
6260
6327
  (0, $g9l4l$effect)((_p$)=>{
6261
- const _v$ = display().page_url, _v$2 = !!is_sale();
6328
+ const _v$ = href(), _v$2 = !!is_sale();
6262
6329
  _v$ !== _p$._v$ && (0, $g9l4l$setAttribute)(_el$, "href", _p$._v$ = _v$);
6263
6330
  _v$2 !== _p$._v$2 && _el$9.classList.toggle("sales-price", _p$._v$2 = _v$2);
6264
6331
  return _p$;
@@ -6271,10 +6338,13 @@ const $d3c0043bb23a833f$export$b05c0ae390cf3e06 = (display_or_variant_container,
6271
6338
  // This solves a JSX type issue where the return value does not match with the explicit JSX.Element type for some reason
6272
6339
  return returnVal;
6273
6340
  };
6341
+ (0, $g9l4l$delegateEvents)([
6342
+ "click"
6343
+ ]);
6274
6344
 
6275
6345
 
6276
6346
  const $d811ce622b5b7626$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="instant-results"></div>`, 2);
6277
- function $d811ce622b5b7626$export$62f101a8aa597bf8({ depict_api_: depict_api_ , search_field_value_: [get_search_field_value] , tenant_: tenant_ , market_: market_ , render_instant_card_: render_instant_card_ , render_instant_card_placeholder_: render_instant_card_placeholder_ , min_products_to_fetch_: min_products_to_fetch_ , has_sort_or_filters_: has_sort_or_filters_ , set_num_results_accessor_: set_num_results_accessor_ , i18n_: i18n_ }) {
6347
+ function $d811ce622b5b7626$export$62f101a8aa597bf8({ depict_api_: depict_api_ , search_field_value_: [get_search_field_value] , tenant_: tenant_ , market_: market_ , render_instant_card_: render_instant_card_ , render_instant_card_placeholder_: render_instant_card_placeholder_ , min_products_to_fetch_: min_products_to_fetch_ , has_sort_or_filters_: has_sort_or_filters_ , set_num_results_accessor_: set_num_results_accessor_ , i18n_: i18n_ , router_: router_ }) {
6278
6348
  const max_cards = 4;
6279
6349
  const [read_current_instant_query, write_current_instant_query] = (0, $g9l4l$createSignal)("");
6280
6350
  let timeout;
@@ -6332,7 +6402,7 @@ function $d811ce622b5b7626$export$62f101a8aa597bf8({ depict_api_: depict_api_ ,
6332
6402
  i18n: i18n_,
6333
6403
  merchant: tenant_(),
6334
6404
  market: market_()
6335
- }), tenant_, market_)
6405
+ }, router_), tenant_, market_)
6336
6406
  });
6337
6407
  }
6338
6408
  }));
@@ -6638,14 +6708,14 @@ function $54eb3ff8b0c7c7b8$export$ba17c5b7e6dda39f({ whole_text_to_display_: who
6638
6708
 
6639
6709
 
6640
6710
  const $f19e81a7eecb0aac$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<a class="suggestion"></a>`, 2), $f19e81a7eecb0aac$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="search-icon"></div>`, 2), $f19e81a7eecb0aac$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<span class="type"></span>`, 2), $f19e81a7eecb0aac$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div><span class="value"></span></div>`, 4), $f19e81a7eecb0aac$var$_tmpl$5 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<h2 class="text"></h2>`, 2), $f19e81a7eecb0aac$var$_tmpl$6 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="suggestion-container query"></div>`, 2), $f19e81a7eecb0aac$var$_tmpl$7 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="suggestion-container page"></div>`, 2), $f19e81a7eecb0aac$var$_tmpl$8 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="suggestions"></div>`, 2);
6641
- function $f19e81a7eecb0aac$export$e872e2339fb04a7f({ suggestion_memo_: suggestion_memo_ , search_page_url_param_name_: search_page_url_param_name_ , selected_index_: [read_selected_index_, write_selected_index_] , url_transformer_: url_transformer_ , filtered_previous_searches_: filtered_previous_searches_ , currently_showing_suggestions_: currently_showing_suggestions_ , on_previous_searches_page_: on_previous_searches_page_ , i18n_: i18n_ , include_category_suggestions_: include_category_suggestions_ , searching_for_value_: searching_for_value_ , router_: router_ , submit_query_: submit_query_ }) {
6711
+ function $f19e81a7eecb0aac$export$e872e2339fb04a7f({ suggestion_memo_: suggestion_memo_ , search_query_url_param_name_: search_query_url_param_name_ , selected_index_: [read_selected_index_, write_selected_index_] , url_transformer_: url_transformer_ , filtered_previous_searches_: filtered_previous_searches_ , currently_showing_suggestions_: currently_showing_suggestions_ , on_previous_searches_page_: on_previous_searches_page_ , i18n_: i18n_ , include_category_suggestions_: include_category_suggestions_ , searching_for_value_: searching_for_value_ , router_: router_ , submit_query_: submit_query_ }) {
6642
6712
  const queries_memo = (0, $g9l4l$createMemo)(()=>suggestion_memo_().filter(({ type: type , title: title })=>type === (0, $c7bc9269d29d4bdc$export$3cf9497e790da491) && !filtered_previous_searches_().includes(title) // don't show the ones we already show from the history
6643
6713
  ));
6644
6714
  const not_queries_memo = (0, $g9l4l$createMemo)(()=>suggestion_memo_().filter(({ type: type })=>type !== (0, $c7bc9269d29d4bdc$export$3cf9497e790da491)));
6645
6715
  const render_entry = (input_obj, autocomplete_data_index, index, is_history = false)=>{
6646
6716
  const is_query = (0, $g9l4l$createMemo)(()=>input_obj().type === (0, $c7bc9269d29d4bdc$export$3cf9497e790da491));
6647
6717
  const href_with_changed_params_accessor = (0, $g9l4l$createMemo)(()=>is_query() ? (0, $8fee64e5ff6fd014$export$91c3b6774e8be0f5)({
6648
- param_: search_page_url_param_name_,
6718
+ param_: search_query_url_param_name_,
6649
6719
  value_: (0, $g9l4l$createMemo)(()=>input_obj().title),
6650
6720
  url_transformer_: url_transformer_
6651
6721
  }) : undefined);
@@ -6981,7 +7051,7 @@ function $a817d06dc1c5911c$var$open_link_on_cmd_pressed(e, href) {
6981
7051
 
6982
7052
 
6983
7053
  const $c7bc9269d29d4bdc$export$3cf9497e790da491 = "query";
6984
- function $c7bc9269d29d4bdc$export$2f2b9559550c7bbc({ search_field_value_: search_field_value_ , search_query_: [get_search_query_] , search_page_url_param_name_: search_page_url_param_name_ , previous_searches_: unfiltered_previous_searches , previous_searches_text_: previous_searches_text_ , depict_api_: depict_api_ , tenant_: tenant_ , market_: market_ , input_field_: input_field_ , url_transformer_: url_transformer_ , currently_showing_suggestions_: currently_showing_suggestions_ , set_override_on_enter_fn_: set_override_on_enter_fn_ , selected_index_: selected_index_ , i18n_: i18n_ , include_category_suggestions_: include_category_suggestions_ , submit_query_: submit_query_ , router_: router_ }) {
7054
+ function $c7bc9269d29d4bdc$export$2f2b9559550c7bbc({ search_field_value_: search_field_value_ , get_search_query_: get_search_query_ , search_query_url_param_name_: search_query_url_param_name_ , previous_searches_: unfiltered_previous_searches , previous_searches_text_: previous_searches_text_ , depict_api_: depict_api_ , tenant_: tenant_ , market_: market_ , input_field_: input_field_ , url_transformer_: url_transformer_ , currently_showing_suggestions_: currently_showing_suggestions_ , set_override_on_enter_fn_: set_override_on_enter_fn_ , selected_index_: selected_index_ , i18n_: i18n_ , include_category_suggestions_: include_category_suggestions_ , submit_query_: submit_query_ , router_: router_ }) {
6985
7055
  const [searching_for_value, set_searching_for_value] = (0, $g9l4l$createSignal)();
6986
7056
  const [read_search_field_value] = search_field_value_;
6987
7057
  const updating_blocked = (0, $g9l4l$createSignal)(false);
@@ -7022,7 +7092,7 @@ function $c7bc9269d29d4bdc$export$2f2b9559550c7bbc({ search_field_value_: search
7022
7092
  updating_blocked_: updating_blocked,
7023
7093
  currently_showing_suggestions_: currently_showing_suggestions_,
7024
7094
  set_override_on_enter_fn_: set_override_on_enter_fn_,
7025
- search_query_param_name_: search_page_url_param_name_,
7095
+ search_query_param_name_: search_query_url_param_name_,
7026
7096
  url_transformer_: url_transformer_,
7027
7097
  router_: router_
7028
7098
  });
@@ -7037,7 +7107,7 @@ function $c7bc9269d29d4bdc$export$2f2b9559550c7bbc({ search_field_value_: search
7037
7107
  get set_unfiltered_previous_searches_ () {
7038
7108
  return unfiltered_previous_searches[1];
7039
7109
  },
7040
- search_query_param_name_: search_page_url_param_name_,
7110
+ search_query_param_name_: search_query_url_param_name_,
7041
7111
  text_: previous_searches_text_,
7042
7112
  get previous_searches_ () {
7043
7113
  return (0, $g9l4l$createMemo)(()=>filtered_previous_searches().slice(0, 5));
@@ -7064,7 +7134,7 @@ function $c7bc9269d29d4bdc$export$2f2b9559550c7bbc({ search_field_value_: search
7064
7134
  i18n_: i18n_,
7065
7135
  url_transformer_: url_transformer_,
7066
7136
  searching_for_value_: searching_for_value,
7067
- search_page_url_param_name_: search_page_url_param_name_,
7137
+ search_query_url_param_name_: search_query_url_param_name_,
7068
7138
  selected_index_: selected_index_,
7069
7139
  suggestion_memo_: read_suggestion_signal,
7070
7140
  currently_showing_suggestions_: currently_showing_suggestions_,
@@ -7099,13 +7169,13 @@ function $b760a1a8108897d0$export$c7e181728ad525f(url) {
7099
7169
  }
7100
7170
 
7101
7171
 
7102
- function $e495e86fcf483c73$export$3340fdd8259bd4fd({ get_search_field_value_: get_search_field_value_ , search_page_url_param_name_: search_page_url_param_name_ , url_transformer_: url_transformer_ , get_search_query_: get_search_query_ }) {
7172
+ function $e495e86fcf483c73$export$3340fdd8259bd4fd({ get_search_field_value_: get_search_field_value_ , search_query_url_param_name_: search_query_url_param_name_ , url_transformer_: url_transformer_ , get_search_query_: get_search_query_ }) {
7103
7173
  let debounce_timeout;
7104
7174
  const stop_timeout = ()=>clearTimeout(debounce_timeout);
7105
7175
  const send_to_ga = (0, $g9l4l$catchify)(()=>{
7106
7176
  const fake_url = new URL(location.href);
7107
7177
  const { searchParams: searchParams } = fake_url;
7108
- searchParams.set(search_page_url_param_name_, (0, $g9l4l$untrack)(get_search_field_value_));
7178
+ searchParams.set(search_query_url_param_name_, (0, $g9l4l$untrack)(get_search_field_value_));
7109
7179
  searchParams.set("instant_result", "true");
7110
7180
  url_transformer_?.(fake_url);
7111
7181
  (0, $b760a1a8108897d0$export$c7e181728ad525f)(fake_url);
@@ -7156,7 +7226,7 @@ function $b24f16c875c2baa6$export$f021bdedd3ec901a(props) {
7156
7226
 
7157
7227
 
7158
7228
  const $a9f6faeac82c322b$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="discover-more"><button class="major" type="button"></button></div>`, 4), $a9f6faeac82c322b$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<b></b>`, 2), $a9f6faeac82c322b$var$_tmpl$3 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="depict-search-modal"><div class="body"><div class="padded"></div></div></div>`, 6), $a9f6faeac82c322b$var$_tmpl$4 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="depict plp search"><div class="depict-search-modal-backdrop"></div></div>`, 4);
7159
- function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_search_field_value , search_query_: search_query_ , search_page_url_param_name_: search_page_url_param_name_ , previous_searches_: previous_searches_ , close_modal_: close_modal_ , style_props_: style_props_ = (0, $g9l4l$createSignal)({}) , depict_api_: depict_api_ , tenant_: tenant_ , market_: market_ , submit_query_: props_submit_query , instant_results_options_: instant_results_options_ , register_closing_animation_: register_closing_animation_ , url_transformer_: url_transformer_ , closing_animation_: closing_animation_ , clear_filters_: clear_filters_ , i18n_: i18n_ , disable_scrolling_: disable_scrolling_ = true , enable_category_suggestions_: enable_category_suggestions_ , class_list_: class_list_ , bottom_distance_under_modal_: bottom_distance_under_modal_ , selected_text_range_: selected_text_range_ , dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_ = false , router_: router_ }) {
7229
+ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_search_field_value , get_search_query_: get_search_query_ , search_query_url_param_name_: search_query_url_param_name_ , previous_searches_: previous_searches_ , close_modal_: close_modal_ , style_props_: style_props_ = (0, $g9l4l$createSignal)({}) , depict_api_: depict_api_ , tenant_: tenant_ , market_: market_ , submit_query_: props_submit_query , instant_results_options_: instant_results_options_ , register_closing_animation_: register_closing_animation_ , url_transformer_: url_transformer_ , closing_animation_: closing_animation_ , clear_filters_: clear_filters_ , i18n_: i18n_ , disable_scrolling_: disable_scrolling_ = true , enable_category_suggestions_: enable_category_suggestions_ , class_list_: class_list_ , bottom_distance_under_modal_: bottom_distance_under_modal_ , selected_text_range_: selected_text_range_ , dont_sync_search_field_value_except_on_submit_: dont_sync_search_field_value_except_on_submit_ = false , router_: router_ }) {
7160
7230
  let on_enter_in_search_field_function;
7161
7231
  // As per feedback from stronger we sometimes want a modal with the search field value disconnected from the one in the rest of the UI, see https://depictaiworkspace.slack.com/archives/C02J16R9XEH/p1679065878487709.
7162
7232
  // This is desired for when the modal is opened from a UI element that visually does not look connected with the search page or current query
@@ -7183,7 +7253,7 @@ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_
7183
7253
  equals: false
7184
7254
  });
7185
7255
  if (disable_scrolling_) (0, $a1123c5ed9b0ee29$export$fe334901e8bebd57)();
7186
- $a9f6faeac82c322b$var$close_modal_when_navigating_away(close_modal_, search_page_url_param_name_);
7256
+ $a9f6faeac82c322b$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
7187
7257
  window.addEventListener("keydown", close_on_escape_handler);
7188
7258
  (0, $g9l4l$onCleanup)((0, $g9l4l$catchify)(()=>window.removeEventListener("keydown", close_on_escape_handler)));
7189
7259
  const owner = (0, $g9l4l$getOwner)();
@@ -7208,8 +7278,8 @@ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_
7208
7278
  (0, $e495e86fcf483c73$export$3340fdd8259bd4fd)({
7209
7279
  get_search_field_value_: get_search_field_value_,
7210
7280
  url_transformer_: url_transformer_,
7211
- search_page_url_param_name_: search_page_url_param_name_,
7212
- get_search_query_: search_query_[0]
7281
+ search_query_url_param_name_: search_query_url_param_name_,
7282
+ get_search_query_: get_search_query_
7213
7283
  });
7214
7284
  const random_classname = (0, $g9l4l$make_random_classname)();
7215
7285
  const body_style = (0, $g9l4l$createMemo)(()=>{
@@ -7226,7 +7296,6 @@ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_
7226
7296
  input_field_ref_: (element)=>set_input_field(element),
7227
7297
  override_on_enter_: (e)=>on_enter_in_search_field_function?.(e),
7228
7298
  on_back_: close_modal_,
7229
- search_query_: search_query_,
7230
7299
  search_field_value_: search_field_value_,
7231
7300
  submit_query_: submit_query_,
7232
7301
  clear_filters_: clear_filters_,
@@ -7258,9 +7327,9 @@ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_
7258
7327
  get previous_searches_text_ () {
7259
7328
  return i18n_.previous_searches_text_;
7260
7329
  },
7261
- search_query_: search_query_,
7330
+ get_search_query_: get_search_query_,
7262
7331
  previous_searches_: previous_searches_,
7263
- search_page_url_param_name_: search_page_url_param_name_,
7332
+ search_query_url_param_name_: search_query_url_param_name_,
7264
7333
  market_: market_,
7265
7334
  tenant_: tenant_,
7266
7335
  selected_index_: selected_index,
@@ -7285,6 +7354,7 @@ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_
7285
7354
  i18n_: i18n_,
7286
7355
  market_: market_,
7287
7356
  set_num_results_accessor_: set_num_results_accessor_,
7357
+ router_: router_,
7288
7358
  ...instant_results_options_
7289
7359
  });
7290
7360
  }
@@ -7317,7 +7387,7 @@ function $a9f6faeac82c322b$export$1c593cbd6f1e10bc({ search_field_value_: props_
7317
7387
  })()
7318
7388
  ];
7319
7389
  }
7320
- function $a9f6faeac82c322b$var$close_modal_when_navigating_away(close_modal, search_page_url_param_name_) {
7390
+ function $a9f6faeac82c322b$var$close_modal_when_navigating_away(close_modal, search_query_url_param_name_) {
7321
7391
  const [exit_iterable, exitable_iterable] = (0, $g9l4l$make_asyncIterable_exiter)((0, $g9l4l$href_change_ipns));
7322
7392
  let set_initial_values = false;
7323
7393
  let old_pathname;
@@ -7327,7 +7397,7 @@ function $a9f6faeac82c322b$var$close_modal_when_navigating_away(close_modal, sea
7327
7397
  for await (const href of exitable_iterable){
7328
7398
  const u_o = new URL(href);
7329
7399
  const new_pathname = u_o.pathname;
7330
- const new_param_value = u_o.searchParams.get(search_page_url_param_name_);
7400
+ const new_param_value = u_o.searchParams.get(search_query_url_param_name_);
7331
7401
  if (set_initial_values) {
7332
7402
  if (new_param_value !== old_param_value || new_pathname !== old_pathname) {
7333
7403
  // close modal when pathname or query changes
@@ -7416,9 +7486,9 @@ function $71cf2f71a46bffea$export$c05a196222ba1302({ suggestions_: suggestions_
7416
7486
 
7417
7487
 
7418
7488
  const $57ec75eac12fe1fc$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<b></b>`, 2), $57ec75eac12fe1fc$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="results-for"></div>`, 2);
7419
- function $57ec75eac12fe1fc$export$9dd50d35b9d94fdf({ search_query_: search_query_ , i18n_: i18n_ , formatted_number_of_results_: formatted_number_of_results_ }) {
7489
+ function $57ec75eac12fe1fc$export$9dd50d35b9d94fdf({ get_search_query_: get_search_query_ , i18n_: i18n_ , formatted_number_of_results_: formatted_number_of_results_ }) {
7420
7490
  const contents = (0, $g9l4l$createMemo)((0, $g9l4l$catchify)(()=>{
7421
- const q = search_query_[0]();
7491
+ const q = get_search_query_();
7422
7492
  return i18n_.get_showing_results_for_()((()=>{
7423
7493
  const _el$ = $57ec75eac12fe1fc$var$_tmpl$.cloneNode(true);
7424
7494
  (0, $g9l4l$insert)(_el$, q);
@@ -7445,7 +7515,7 @@ function $57ec75eac12fe1fc$export$9dd50d35b9d94fdf({ search_query_: search_query
7445
7515
 
7446
7516
  const $b76e8f62b1f313ef$var$_tmpl$ = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="filter-results-for-one-row"></div>`, 2), $b76e8f62b1f313ef$var$_tmpl$2 = /*@__PURE__*/ (0, /*@__PURE__*/$g9l4l$template)(`<div class="depict plp search"><div class="listing-page"></div></div>`, 4);
7447
7517
  function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7448
- const { depict_api_: depict_api_ , search_field_value_: search_field_value_ , search_query_: search_query_ , open_modal_: open_modal_ , submit_query_: submit_query_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , expanded_filters_: expanded_filters_ , input_modal_open_: input_modal_open_ , selected_filters_: selected_filters_ , i18n_: i18n_ , slider_arrow_button_: slider_arrow_button_ , make_category_suggestion_card_: make_category_suggestion_card_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , clear_filters_on_next_submit_: clear_filters_on_next_submit_ , local_filter_cache_: local_filter_cache_ , include_input_field_: include_input_field_ , tenant_: tenant_ , market_: market_ , showing_recommendation_rows_: showing_recommendation_rows_ , rr_options_: rr_options_ , recommendations_rr_options_: recommendations_rr_options_ = rr_options_ , search_recs_view_more_: search_recs_view_more_ , get_product_id_: get_product_id_ , disable_search_recommendations_: disable_search_recommendations_ , layout_options_: layout_options_ , recommendations_layout_options_: recommendations_layout_options_ = layout_options_ , scroll_restoration_data_: scroll_restoration_data_ } = opts;
7518
+ const { depict_api_: depict_api_ , search_field_value_: search_field_value_ , get_search_query_: get_search_query_ , open_modal_: open_modal_ , submit_query_: submit_query_ , current_sorting_: current_sorting_ , min_products_to_fetch_: min_products_to_fetch_ , search_filters_open_: search_filters_open_ , search_sorting_open_: search_sorting_open_ , expanded_filters_: expanded_filters_ , input_modal_open_: input_modal_open_ , selected_filters_: selected_filters_ , i18n_: i18n_ , slider_arrow_button_: slider_arrow_button_ , make_category_suggestion_card_: make_category_suggestion_card_ , expanded_hierarchical_filters_: expanded_hierarchical_filters_ , clear_filters_on_next_submit_: clear_filters_on_next_submit_ , local_filter_cache_: local_filter_cache_ , include_input_field_: include_input_field_ , tenant_: tenant_ , market_: market_ , showing_recommendation_rows_: showing_recommendation_rows_ , rr_options_: rr_options_ , recommendations_rr_options_: recommendations_rr_options_ = rr_options_ , search_recs_view_more_: search_recs_view_more_ , get_product_id_: get_product_id_ , disable_search_recommendations_: disable_search_recommendations_ , layout_options_: layout_options_ , recommendations_layout_options_: recommendations_layout_options_ = layout_options_ , scroll_restoration_data_: scroll_restoration_data_ } = opts;
7449
7519
  const tenant_object_ = new (0, $g9l4l$Tenant)({
7450
7520
  TENANT: (0, $g9l4l$untrack)(tenant_),
7451
7521
  MARKET: (0, $g9l4l$untrack)(market_),
@@ -7453,7 +7523,6 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7453
7523
  get_product_id: get_product_id_
7454
7524
  });
7455
7525
  const [get_sorting] = current_sorting_;
7456
- const [get_search_query] = search_query_;
7457
7526
  const all_products_loaded_ = (0, $g9l4l$createSignal)(false);
7458
7527
  const [get_all_products_loaded, set_all_products_loaded] = all_products_loaded_;
7459
7528
  const number_of_rendered_selected_filters_items_ = (0, $g9l4l$createSignal)(0);
@@ -7469,7 +7538,7 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7469
7538
  return {
7470
7539
  tenant: tenant_(),
7471
7540
  market: market_(),
7472
- query: get_search_query(),
7541
+ query: get_search_query_(),
7473
7542
  ...f.length ? {
7474
7543
  filters: f
7475
7544
  } : {},
@@ -7482,7 +7551,7 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7482
7551
  set_all_products_loaded(false);
7483
7552
  // only first page of results
7484
7553
  return await (0, $f4d7f67154f032af$export$cc42dd29bf655ab6)({
7485
- id_: (0, $g9l4l$untrack)(get_search_query),
7554
+ id_: (0, $g9l4l$untrack)(get_search_query_),
7486
7555
  min_products_to_fetch_: min_products_to_fetch_,
7487
7556
  scroll_restoration_data_: scroll_restoration_data_,
7488
7557
  make_request_: (limit, cursor)=>depict_api_.query({
@@ -7495,7 +7564,7 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7495
7564
  });
7496
7565
  }));
7497
7566
  const [suggestions] = (0, $g9l4l$createResource)((0, $g9l4l$createMemo)(()=>({
7498
- query: search_query_[0](),
7567
+ query: get_search_query_(),
7499
7568
  tenant: tenant_(),
7500
7569
  market: market_()
7501
7570
  })), (opts)=>depict_api_.suggest(opts));
@@ -7512,7 +7581,6 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7512
7581
  let div_with_field_class;
7513
7582
  search_field = SafeSearchField({
7514
7583
  i18n_: i18n_,
7515
- search_query_: search_query_,
7516
7584
  search_field_value_: search_field_value_,
7517
7585
  submit_query_: submit_query_,
7518
7586
  clear_filters_: clear_filters_on_next_submit_,
@@ -7550,7 +7618,7 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7550
7618
  });
7551
7619
  const [sort_and_filter_element_, set_sort_and_filter_element_] = (0, $g9l4l$createSignal)();
7552
7620
  const results_for = (0, $g9l4l$createComponent)((0, $57ec75eac12fe1fc$export$9dd50d35b9d94fdf), {
7553
- search_query_: search_query_,
7621
+ get_search_query_: get_search_query_,
7554
7622
  i18n_: i18n_,
7555
7623
  formatted_number_of_results_: formatted_number_of_results_
7556
7624
  });
@@ -7589,7 +7657,7 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7589
7657
  (0, $g9l4l$catchify)((0, $f4d7f67154f032af$export$6e49da55e449af7c))({
7590
7658
  scroll_restoration_data_: scroll_restoration_data_,
7591
7659
  last_result_in_viewport_: last_result_in_viewport_,
7592
- id_: get_search_query,
7660
+ id_: get_search_query_,
7593
7661
  can_write_scroll_restoration_: can_write_scroll_restoration_
7594
7662
  });
7595
7663
  (0, $g9l4l$createComputed)(()=>{
@@ -7601,7 +7669,7 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7601
7669
  available_filters_: available_filters_
7602
7670
  });
7603
7671
  (0, $g9l4l$createEffect)(()=>{
7604
- get_search_query();
7672
+ get_search_query_();
7605
7673
  (0, $b760a1a8108897d0$export$c7e181728ad525f)(location);
7606
7674
  });
7607
7675
  (0, $g9l4l$createComputed)(()=>{
@@ -7668,7 +7736,7 @@ function $b76e8f62b1f313ef$export$a54ec244c8863715(opts) {
7668
7736
  sort_or_filter_open_: sort_or_filter_open_,
7669
7737
  tenant_object_: tenant_object_,
7670
7738
  type_for_tracking_: "search",
7671
- id_currently_querying_for_: get_search_query,
7739
+ id_currently_querying_for_: get_search_query_,
7672
7740
  no_results_options_: {
7673
7741
  selected_filters_: selected_filters_,
7674
7742
  expanded_hierarchical_filters_: expanded_hierarchical_filters_,
@@ -7781,13 +7849,17 @@ class $540e930c58500cbe$export$ac6237957a15b3f0 {
7781
7849
  #modal_open_signal = (0, $g9l4l$createSignal)(false);
7782
7850
  static #has_been_constructed = false;
7783
7851
  #router = new (0, $cfa2761d36e5714c$export$7e1297a3a19f10d8)("hard_navigation");
7784
- constructor({ search_query_url_param_name: search_query_url_param_name = "query" , url_transformer: url_transformer , on_navigation: on_navigation , enable_category_suggestions: enable_category_suggestions = true , disable_scrolling_during_modal: // Stuff needed for non-standard customer deployments that we shouldn't actually expose
7785
- disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal_: bottom_distance_under_modal_ , render_instant_card: render_instant_card , ...props_on_class }){
7852
+ constructor({ search_query_url_param_name: search_query_url_param_name_ = "query" , url_transformer: url_transformer , on_navigation: on_navigation , enable_category_suggestions: enable_category_suggestions = true , disable_scrolling_during_modal: // Stuff needed for non-standard customer deployments that we shouldn't actually expose
7853
+ disable_scrolling_during_modal = true , api: api , bottom_distance_under_modal: bottom_distance_under_modal , render_instant_card: render_instant_card , ...props_on_class }){
7786
7854
  if ($540e930c58500cbe$export$ac6237957a15b3f0.#has_been_constructed) throw new Error("You can only have one instance of DepictSearch");
7787
7855
  Object.assign(this, props_on_class);
7788
- const { current_sorting_: current_sorting_ , selected_filters_: selected_filters_ } = (0, $b4291f5d2e6b2fae$export$7bcff1eb3eca57d7)(this.#router);
7856
+ if (on_navigation) this.#router.on_navigation_ = on_navigation;
7857
+ const { current_sorting_: current_sorting_ , selected_filters_: selected_filters_ , search_query_accessor_: raw_search_query_accessor } = (0, $f01b3a0b9fbf6519$export$477caf01aecaeb2a)({
7858
+ search_query_url_param_name_: search_query_url_param_name_,
7859
+ router_: this.#router
7860
+ });
7789
7861
  const [reset_history_state_, state_] = (0, $3075a4497054bec6$export$9862539c89138352)(()=>({
7790
- search_field_value: new URLSearchParams(location.search).get(search_query_url_param_name) ?? "",
7862
+ search_field_value: new URLSearchParams(location.search).get(search_query_url_param_name_) ?? "",
7791
7863
  search_filters_open: false,
7792
7864
  search_sorting_open: false,
7793
7865
  search_expanded_filters: [],
@@ -7796,14 +7868,15 @@ class $540e930c58500cbe$export$ac6237957a15b3f0 {
7796
7868
  search_expanded_hierarchical_filters: [],
7797
7869
  search_showing_recommendation_rows: (0, $aee0c68312d971f4$export$1c8c715550dc689d),
7798
7870
  search_scroll_restoration_data: []
7799
- }));
7871
+ }), this.#router);
7800
7872
  const search_query_updating_blocked_ = (0, $g9l4l$createSignal)(false);
7801
- const { [search_query_url_param_name]: raw_search_query_signal } = (0, $4ad18a8b237ff7f6$export$2542ffb77b620b02)({
7802
- [search_query_url_param_name]: ""
7873
+ const [get_search_query_updating_blocked] = search_query_updating_blocked_;
7874
+ const get_search_query_ = (0, $g9l4l$createMemo)((previous_value)=>{
7875
+ if (get_search_query_updating_blocked()) return previous_value;
7876
+ else return raw_search_query_accessor();
7803
7877
  });
7804
- const search_query_signal_ = (0, $g9l4l$createSignal)((0, $g9l4l$untrack)(raw_search_query_signal[0]));
7805
7878
  const depict_api_ = api ?? new (0, $3846bb34098c738f$export$e015ed2f2950f2e3)();
7806
- const previous_searches = (0, $4d62f5daa51642fe$export$84bba84a7b837187)(search_query_signal_);
7879
+ const previous_searches = (0, $4d62f5daa51642fe$export$84bba84a7b837187)(get_search_query_);
7807
7880
  const [, set_search_showing_recommendation_rows] = state_.search_showing_recommendation_rows;
7808
7881
  const after_submit_ = ()=>set_search_showing_recommendation_rows((0, $aee0c68312d971f4$export$1c8c715550dc689d)); // do this every time after we have submitted a new query - otherwise there might already be a saved number of rows in the state
7809
7882
  const on_submit_with_unchanged_value_ = ()=>this.modal_open = false;
@@ -7811,31 +7884,24 @@ class $540e930c58500cbe$export$ac6237957a15b3f0 {
7811
7884
  const configured_submit_query_ = (new_query)=>(0, $7f6ddd9a7e868c4d$export$e16630ecb9644a1c)({
7812
7885
  on_submit_with_unchanged_value_: on_submit_with_unchanged_value_,
7813
7886
  set_search_field_value_: set_search_field_value_,
7814
- search_query_: search_query_signal_,
7815
- search_param_name_: search_query_url_param_name,
7816
- url_transformer_: url_transformer,
7887
+ get_search_query_: get_search_query_,
7888
+ search_param_name_: search_query_url_param_name_,
7817
7889
  after_submit_: after_submit_,
7818
7890
  get_new_query: ()=>new_query || (0, $g9l4l$untrack)(get_search_field_value_),
7891
+ url_transformer_: url_transformer,
7819
7892
  router_: this.#router
7820
7893
  });
7821
7894
  const i18n_ = (0, $0466953901b38f18$export$f091cbac892643a4)(this.#locale_signal[0]);
7822
7895
  const clear_filters_on_next_submit_ = (0, $a0d89ff25220eb8d$export$e026af0c7b64ea5f)({
7823
7896
  selected_filters_: selected_filters_,
7824
- search_query_: search_query_signal_,
7897
+ get_search_query_: get_search_query_,
7825
7898
  current_sorting_: current_sorting_,
7826
7899
  expanded_hierarchical_filters_: state_.search_expanded_hierarchical_filters,
7827
7900
  i18n_: i18n_,
7828
7901
  local_filter_cache_: state_.search_local_filter_cache
7829
7902
  });
7830
- if (on_navigation) this.#router.on_navigation_ = on_navigation;
7831
- (0, $g9l4l$createComputed)(()=>{
7832
- const [get_search_query_updating_blocked] = search_query_updating_blocked_;
7833
- const [get_raw_search_query_signal] = raw_search_query_signal;
7834
- const [, set_search_query_signal] = search_query_signal_; // this signal won't get written from anywhere, see url_params_to_signals JSDoc
7835
- if (!get_search_query_updating_blocked()) set_search_query_signal(get_raw_search_query_signal());
7836
- });
7837
7903
  $540e930c58500cbe$var$privately_shared_properties.set(this, {
7838
- search_query_url_param_name_: search_query_url_param_name,
7904
+ search_query_url_param_name_: search_query_url_param_name_,
7839
7905
  reset_history_state_: reset_history_state_,
7840
7906
  state_: state_,
7841
7907
  router_: this.#router,
@@ -7844,7 +7910,7 @@ class $540e930c58500cbe$export$ac6237957a15b3f0 {
7844
7910
  enable_category_suggestions_: enable_category_suggestions,
7845
7911
  clear_filters_on_next_submit_: clear_filters_on_next_submit_,
7846
7912
  configured_submit_query_: configured_submit_query_,
7847
- search_query_signal_: search_query_signal_,
7913
+ get_search_query_: get_search_query_,
7848
7914
  i18n_: i18n_,
7849
7915
  search_query_updating_blocked_: search_query_updating_blocked_,
7850
7916
  current_sorting_: current_sorting_,
@@ -7858,8 +7924,8 @@ class $540e930c58500cbe$export$ac6237957a15b3f0 {
7858
7924
  return (0, $a9f6faeac82c322b$export$1c593cbd6f1e10bc)(...args);
7859
7925
  }, {
7860
7926
  search_field_value_: state_.search_field_value,
7861
- search_query_: search_query_signal_,
7862
- search_page_url_param_name_: search_query_url_param_name,
7927
+ get_search_query_: get_search_query_,
7928
+ search_query_url_param_name_: search_query_url_param_name_,
7863
7929
  previous_searches_: previous_searches,
7864
7930
  depict_api_: depict_api_,
7865
7931
  tenant_: this.#merchant_signal[0],
@@ -7877,7 +7943,7 @@ class $540e930c58500cbe$export$ac6237957a15b3f0 {
7877
7943
  i18n_: i18n_,
7878
7944
  enable_category_suggestions_: enable_category_suggestions,
7879
7945
  disable_scrolling_: disable_scrolling_during_modal,
7880
- bottom_distance_under_modal_: bottom_distance_under_modal_
7946
+ bottom_distance_under_modal_: bottom_distance_under_modal
7881
7947
  });
7882
7948
  // This will add some default behaviour to open_modal_ if no style_props_ are supplied
7883
7949
  // The default behaviour is to align the modal with the input field if possible
@@ -8007,7 +8073,7 @@ function $540e930c58500cbe$export$f2dc7e4e4aa11abb({ depict_search: depict_searc
8007
8073
  min_products_to_fetch_: $540e930c58500cbe$var$min_products_to_fetch_,
8008
8074
  local_filter_cache_: state_.search_local_filter_cache,
8009
8075
  search_field_value_: state_.search_field_value,
8010
- search_query_: shared_properties.search_query_signal_,
8076
+ get_search_query_: shared_properties.get_search_query_,
8011
8077
  clear_filters_on_next_submit_: shared_properties.clear_filters_on_next_submit_,
8012
8078
  open_modal_: (...args)=>depict_search.modal_open = args,
8013
8079
  submit_query_: shared_properties.configured_submit_query_,
@@ -8072,9 +8138,6 @@ function $540e930c58500cbe$export$316f6f283ae64765({ depict_search: depict_searc
8072
8138
  return (0, $c7f938ac40924f3b$export$23fca46f3143581f)(()=>{
8073
8139
  let input_element;
8074
8140
  const search_field = (0, $g9l4l$createComponent)((0, $6ded59a142c93078$export$b94867ecbd698f21), {
8075
- get search_query_ () {
8076
- return shared_properties.search_query_signal_;
8077
- },
8078
8141
  get search_field_value_ () {
8079
8142
  return shared_properties.state_.search_field_value;
8080
8143
  },
@@ -8418,4 +8481,4 @@ class $ba6c9609228edf6b$export$3ccaa27d81dd8556 extends EventTarget {
8418
8481
  (0, $g9l4l$add_to_version_info)("ui", (0, $18bf1d29fb889cca$export$83d89fbfd8236492));
8419
8482
 
8420
8483
 
8421
- export {$e95f1855a5e3864f$export$58e808b1db15d3bc as fetchDepictRecommendations, $ec52ef1e6c117813$export$de035477d6fef996 as QuickLinks, $ec52ef1e6c117813$export$5b7c3ce0ebe51f86 as BreadCrumbs, $6340962f8bafd049$export$b91cec6bdc6b32a1 as CategoryTitle, $9b693ea3ff420de6$export$824dde41348efed1 as embedded_num_products, $80a49d3809ecb080$export$643598a327b5833e as get_categories, $ec52ef1e6c117813$export$f34314aa9505732e as DepictCategory, $ec52ef1e6c117813$export$e2bf8ce7779e827e as CategoryPage, $540e930c58500cbe$export$ac6237957a15b3f0 as DepictSearch, $540e930c58500cbe$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $540e930c58500cbe$export$f2dc7e4e4aa11abb as SearchPage, $540e930c58500cbe$export$316f6f283ae64765 as SearchField, $22d7fd594100c3d0$export$aa14a9f43128f61f as ProductCardError, $7cbfd6122dbaf087$export$d86a33413558014e as open_modal_with_alignment, $aaacfac0064e97d9$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $079defea521d5e2a$export$b3ad617e9036868 as align_field, $b4e6a093ae83373b$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $246aa49a8f85c7f3$export$1233ca167bf71f9a as styles_to_valid_css_string, $a1123c5ed9b0ee29$export$fe334901e8bebd57 as disable_scrolling, $a3e81b85527bc866$export$d0596b5cae35ad4 as open_search_with_shift_slash, $3846bb34098c738f$export$e015ed2f2950f2e3 as DepictAPI, $fefe7683325039b3$export$d9f36cf74e24d595 as media_query_to_accessor, $36316d7b4c897a03$export$689e204eadb33baf as setup_fast_leave, $886fa987db4f3805$export$5196e4c01fa56fcb as show_toast, $5178263ed1e394ca$export$469c7af753d08925 as solid_format_price, $a79ffb1cbfbd2a09$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $ba6c9609228edf6b$export$3ccaa27d81dd8556 as PageReplacer, $18bf1d29fb889cca$export$83d89fbfd8236492 as version};
8484
+ export {$e95f1855a5e3864f$export$58e808b1db15d3bc as fetchDepictRecommendations, $ec52ef1e6c117813$export$de035477d6fef996 as QuickLinks, $ec52ef1e6c117813$export$5b7c3ce0ebe51f86 as BreadCrumbs, $6340962f8bafd049$export$b91cec6bdc6b32a1 as CategoryTitle, $9b693ea3ff420de6$export$824dde41348efed1 as embedded_num_products, $80a49d3809ecb080$export$643598a327b5833e as get_categories, $ec52ef1e6c117813$export$f34314aa9505732e as DepictCategory, $ec52ef1e6c117813$export$e2bf8ce7779e827e as CategoryPage, $540e930c58500cbe$export$ac6237957a15b3f0 as DepictSearch, $540e930c58500cbe$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $540e930c58500cbe$export$f2dc7e4e4aa11abb as SearchPage, $540e930c58500cbe$export$316f6f283ae64765 as SearchField, $22d7fd594100c3d0$export$aa14a9f43128f61f as ProductCardError, $7cbfd6122dbaf087$export$d86a33413558014e as open_modal_with_alignment, $aaacfac0064e97d9$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $079defea521d5e2a$export$b3ad617e9036868 as align_field, $b4e6a093ae83373b$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $246aa49a8f85c7f3$export$1233ca167bf71f9a as styles_to_valid_css_string, $a1123c5ed9b0ee29$export$fe334901e8bebd57 as disable_scrolling, $a3e81b85527bc866$export$d0596b5cae35ad4 as open_search_with_shift_slash, $3846bb34098c738f$export$e015ed2f2950f2e3 as DepictAPI, $fefe7683325039b3$export$d9f36cf74e24d595 as media_query_to_accessor, $36316d7b4c897a03$export$689e204eadb33baf as setup_fast_leave, $886fa987db4f3805$export$5196e4c01fa56fcb as show_toast, $5178263ed1e394ca$export$a71e92cfbb498adc as SolidFormatPrice, $a79ffb1cbfbd2a09$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $ba6c9609228edf6b$export$3ccaa27d81dd8556 as PageReplacer, $18bf1d29fb889cca$export$83d89fbfd8236492 as version};