@depict-ai/ui 1.4.4 → 1.4.6
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 +1080 -251
- package/ES10/index.d.ts +105 -24
- package/ES10/index.js +1080 -251
- package/latest/index.cjs +978 -219
- package/latest/index.d.ts +105 -24
- package/latest/index.js +978 -219
- package/locales/ES10/index.cjs +128 -26
- package/locales/ES10/index.d.ts +4 -1
- package/locales/ES10/index.js +128 -26
- package/locales/latest/index.cjs +128 -26
- package/locales/latest/index.d.ts +4 -1
- package/locales/latest/index.js +128 -26
- package/package.json +4 -4
- package/server/ES10/index.cjs +915 -179
- package/server/ES10/index.d.ts +105 -24
- package/server/ES10/index.js +915 -179
- package/server/latest/index.cjs +822 -153
- package/server/latest/index.d.ts +105 -24
- package/server/latest/index.js +822 -153
package/ES10/index.cjs
CHANGED
|
@@ -60,7 +60,7 @@ $parcel$export(module.exports, "defaultColsAtSize", () => $33eed84f447aa0c0$expo
|
|
|
60
60
|
$parcel$export(module.exports, "defaultCategoryTitlePlugin", () => $33eed84f447aa0c0$export$7bf543b9d9be2c22);
|
|
61
61
|
$parcel$export(module.exports, "version", () => $aa1938dec50d6c12$export$83d89fbfd8236492);
|
|
62
62
|
/*! Depict.ai search and product listing SDK */
|
|
63
|
-
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.
|
|
63
|
+
const $aa1938dec50d6c12$export$83d89fbfd8236492 = "1.4.6";
|
|
64
64
|
function $d6d51b09cb2116a6$export$5bad61ecde080b1f() {
|
|
65
65
|
const {
|
|
66
66
|
collapse: collapse,
|
|
@@ -738,7 +738,7 @@ function $c5842bdb10e57229$export$fecbb157621501bd(_ref) {
|
|
|
738
738
|
}
|
|
739
739
|
(0, $52FdA$solidjsweb.delegateEvents)(["click"]);
|
|
740
740
|
const $6b92e147c6e24046$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<span class="count"></span>`, 2),
|
|
741
|
-
$6b92e147c6e24046$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<label class="input-row"><div class="left"><input type="checkbox"><span class="custom-indicator"></span><span class="text"></span></div><!#><!/></label>`, 11);
|
|
741
|
+
$6b92e147c6e24046$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<label class="input-row"><div class="left"><input type="checkbox"><span class="custom-indicator"></span><span class="text line-clamp"></span></div><!#><!/></label>`, 11);
|
|
742
742
|
const $6b92e147c6e24046$export$48513f6b9f8ce62d = props => {
|
|
743
743
|
// It seems like there's no diffing without memos here (since we often just have computations in the getters above that update to the same result often because their dependencies change with unrelated changes often), so put memos here to avoid unneeded DOM changes
|
|
744
744
|
const count = (0, $52FdA$solidjs.createMemo)(() => props.count_);
|
|
@@ -2860,9 +2860,14 @@ function $6c2c739b113a8ddf$var$ActualSolidLayout(props, container_element) {
|
|
|
2860
2860
|
// Copy of Layout from utilishared but using solid-js signals instead of async iterable IPNS
|
|
2861
2861
|
const show_all_rows = (0, $52FdA$solidjs.createMemo)(() => props.rows === "all");
|
|
2862
2862
|
const rows_or_empty_object = (0, $52FdA$solidjs.createMemo)(() => show_all_rows() ? {} : props.rows);
|
|
2863
|
-
const
|
|
2864
|
-
const
|
|
2865
|
-
|
|
2863
|
+
const view_more_button_elements = (0, $e82d0d417fa613e8$export$2f0cbfbb4354bb52)((0, $52FdA$solidjs.createMemo)(() => rows_or_empty_object().button));
|
|
2864
|
+
const view_less_button_elements = (0, $e82d0d417fa613e8$export$2f0cbfbb4354bb52)((0, $52FdA$solidjs.createMemo)(() => rows_or_empty_object().view_less_button));
|
|
2865
|
+
const have_a_view_more_button = (0, $52FdA$solidjs.createMemo)(() => {
|
|
2866
|
+
const button = view_more_button_elements();
|
|
2867
|
+
return !(!button || Array.isArray(button) && !button.length);
|
|
2868
|
+
});
|
|
2869
|
+
const have_a_view_less_button = (0, $52FdA$solidjs.createMemo)(() => {
|
|
2870
|
+
const button = view_less_button_elements();
|
|
2866
2871
|
return !(!button || Array.isArray(button) && !button.length);
|
|
2867
2872
|
});
|
|
2868
2873
|
const [get_styling, set_styling] = (0, $52FdA$solidjs.createSignal)();
|
|
@@ -2871,22 +2876,38 @@ function $6c2c739b113a8ddf$var$ActualSolidLayout(props, container_element) {
|
|
|
2871
2876
|
const [get_children_count, set_children_count] = (0, $52FdA$solidjs.createSignal)(0);
|
|
2872
2877
|
const update_children_count = () => set_children_count(container_element.children.length);
|
|
2873
2878
|
const col_styling = (0, $52FdA$solidjs.createMemo)(() => (0, $52FdA$depictaiutilishared.n_col_styling_with_dist)(selector_beginning, props.grid_spacing, props.cols_at_size, props.layout, props.override_vertical_spacing));
|
|
2874
|
-
const default_currently_visible_signal = (0, $52FdA$solidjs.createSignal)(0)
|
|
2879
|
+
const default_currently_visible_signal = (0, $52FdA$solidjs.createSignal)((0, $52FdA$solidjs.untrack)(() => {
|
|
2880
|
+
var _rows_or_empty_object;
|
|
2881
|
+
return (_rows_or_empty_object = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object !== void 0 ? _rows_or_empty_object : 1;
|
|
2882
|
+
})); // Keep this signal here, so it doesn't change when rows_or_empty_object and I think it's to be expected that the "internal default signal" stays the same
|
|
2875
2883
|
const rows_visible_signal = (0, $52FdA$solidjs.createMemo)(() => rows_or_empty_object().currently_visible || default_currently_visible_signal);
|
|
2876
2884
|
const get_rows_visible = (0, $52FdA$solidjs.createMemo)(() => rows_visible_signal()[0]());
|
|
2877
2885
|
const set_rows_visible = (0, $52FdA$solidjs.createMemo)(() => rows_visible_signal()[1]);
|
|
2878
|
-
const
|
|
2879
|
-
const
|
|
2886
|
+
const view_more_button_class = (0, $52FdA$depictaiutilishared.make_random_classname)();
|
|
2887
|
+
const view_less_button_class = (0, $52FdA$depictaiutilishared.make_random_classname)();
|
|
2888
|
+
const view_more_button_container = (0, $52FdA$solidjs.createMemo)(() => have_a_view_more_button() && (() => {
|
|
2880
2889
|
const _el$2 = (0, $52FdA$solidjsweb.getNextElement)($6c2c739b113a8ddf$var$_tmpl$);
|
|
2881
2890
|
(0, $52FdA$solidjsweb.addEventListener)(_el$2, "click", (0, $52FdA$depictaiutilishared.catchify)(() => set_rows_visible()(prev => {
|
|
2882
|
-
var
|
|
2883
|
-
return prev + ((
|
|
2891
|
+
var _rows_or_empty_object2;
|
|
2892
|
+
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);
|
|
2884
2893
|
})), true);
|
|
2885
|
-
(0, $52FdA$solidjsweb.className)(_el$2, "load-more-container "
|
|
2894
|
+
(0, $52FdA$solidjsweb.className)(_el$2, "load-more-container ".concat(view_more_button_class));
|
|
2886
2895
|
(0, $52FdA$solidjsweb.insert)(_el$2, () => rows_or_empty_object().button);
|
|
2887
2896
|
(0, $52FdA$solidjsweb.runHydrationEvents)();
|
|
2888
2897
|
return _el$2;
|
|
2889
2898
|
})());
|
|
2899
|
+
// 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
|
|
2900
|
+
const view_less_button_container = (0, $52FdA$solidjs.createMemo)(() => have_a_view_less_button() && (() => {
|
|
2901
|
+
const _el$3 = (0, $52FdA$solidjsweb.getNextElement)($6c2c739b113a8ddf$var$_tmpl$);
|
|
2902
|
+
(0, $52FdA$solidjsweb.addEventListener)(_el$3, "click", (0, $52FdA$depictaiutilishared.catchify)(() => set_rows_visible()(() => {
|
|
2903
|
+
var _rows_or_empty_object3;
|
|
2904
|
+
return (_rows_or_empty_object3 = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object3 !== void 0 ? _rows_or_empty_object3 : 1;
|
|
2905
|
+
})), true);
|
|
2906
|
+
(0, $52FdA$solidjsweb.className)(_el$3, "load-less-container ".concat(view_less_button_class));
|
|
2907
|
+
(0, $52FdA$solidjsweb.insert)(_el$3, () => rows_or_empty_object().view_less_button);
|
|
2908
|
+
(0, $52FdA$solidjsweb.runHydrationEvents)();
|
|
2909
|
+
return _el$3;
|
|
2910
|
+
})());
|
|
2890
2911
|
container_element.classList.add(container_class);
|
|
2891
2912
|
(0, $52FdA$solidjs.createComputed)(() => {
|
|
2892
2913
|
// Make sure we don't have more rows visible than max_rows (this could happen by max_rows being decreased)
|
|
@@ -2901,10 +2922,6 @@ function $6c2c739b113a8ddf$var$ActualSolidLayout(props, container_element) {
|
|
|
2901
2922
|
set_styling(() => col_styling);
|
|
2902
2923
|
return;
|
|
2903
2924
|
}
|
|
2904
|
-
(0, $52FdA$solidjs.untrack)(() => {
|
|
2905
|
-
var _rows_or_empty_object2;
|
|
2906
|
-
return set_rows_visible()((_rows_or_empty_object2 = rows_or_empty_object().start_rows) !== null && _rows_or_empty_object2 !== void 0 ? _rows_or_empty_object2 : 1);
|
|
2907
|
-
});
|
|
2908
2925
|
update_children_count();
|
|
2909
2926
|
const mutation_observer = new MutationObserver((0, $52FdA$depictaiutilishared.catchify)(update_children_count));
|
|
2910
2927
|
mutation_observer.observe(container_element, {
|
|
@@ -2916,33 +2933,36 @@ function $6c2c739b113a8ddf$var$ActualSolidLayout(props, container_element) {
|
|
|
2916
2933
|
() => (0, $52FdA$solidjs.createMemo)(() => {
|
|
2917
2934
|
const {
|
|
2918
2935
|
rows_per_click: rows_per_click,
|
|
2919
|
-
max_rows = -1
|
|
2936
|
+
max_rows = -1,
|
|
2937
|
+
start_rows: start_rows
|
|
2920
2938
|
} = rows_or_empty_object();
|
|
2921
2939
|
const rows_visible = get_rows_visible();
|
|
2922
2940
|
const children_count = get_children_count();
|
|
2923
2941
|
return col_styling() + props.cols_at_size.map(options => {
|
|
2924
|
-
const [, min, max] = options;
|
|
2925
|
-
let
|
|
2942
|
+
const [recs_per_row, min, max] = options;
|
|
2943
|
+
let should_hide_view_more_button;
|
|
2926
2944
|
let visible_recs;
|
|
2927
2945
|
if (props.disable_partial_rows) {
|
|
2928
2946
|
visible_recs = (0, $52FdA$depictaiutilishared.layout_get_visible_recs_without_partial_rows)(rows_visible, children_count, options);
|
|
2929
2947
|
const visible_recs_next_show_more = (0, $52FdA$depictaiutilishared.layout_get_visible_recs_without_partial_rows)(rows_visible + (rows_per_click || 0),
|
|
2930
2948
|
// Should this really be zero when we default rows_per_click to 1?
|
|
2931
2949
|
children_count, options);
|
|
2932
|
-
|
|
2950
|
+
should_hide_view_more_button = visible_recs === visible_recs_next_show_more;
|
|
2933
2951
|
} else {
|
|
2934
2952
|
visible_recs = (0, $52FdA$depictaiutilishared.layout_get_total_rec_amount_for_row)(rows_visible, options);
|
|
2935
|
-
|
|
2953
|
+
should_hide_view_more_button = visible_recs >= children_count;
|
|
2936
2954
|
}
|
|
2937
|
-
const should_hide_button_final =
|
|
2938
|
-
|
|
2955
|
+
const should_hide_button_final = should_hide_view_more_button || max_rows !== -1 && rows_visible >= max_rows;
|
|
2956
|
+
// I don't really understand the logic for when the view more button gets hidden so IDK if below is correct, but it works how it should for now
|
|
2957
|
+
const should_hide_view_less_button = !should_hide_view_more_button || start_rows == undefined || rows_visible <= start_rows || children_count <= recs_per_row * start_rows;
|
|
2958
|
+
return "".concat((0, $52FdA$depictaiutilishared.layout_media_query_header)(min, max), "{").concat(selector_beginning, ":nth-child(n+").concat(visible_recs + 1, "){display:none}").concat(props.layout == "slider" ? "".concat(selector_beginning, ":nth-child(n+").concat(visible_recs, "){margin-right:0}") : "").concat(should_hide_button_final ? ".depict .".concat(view_more_button_class, "{display:none!important}") : "").concat(should_hide_view_less_button ? ".depict .".concat(view_less_button_class, "{display:none!important}") : "", "}");
|
|
2939
2959
|
}).join("");
|
|
2940
2960
|
}));
|
|
2941
2961
|
});
|
|
2942
|
-
return [container_element, (0, $52FdA$solidjsweb.memo)(
|
|
2943
|
-
const _el$
|
|
2944
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
2945
|
-
return _el$
|
|
2962
|
+
return [container_element, (0, $52FdA$solidjsweb.memo)(view_more_button_container), (0, $52FdA$solidjsweb.memo)(view_less_button_container), (() => {
|
|
2963
|
+
const _el$4 = (0, $52FdA$solidjsweb.getNextElement)($6c2c739b113a8ddf$var$_tmpl$2);
|
|
2964
|
+
(0, $52FdA$solidjsweb.insert)(_el$4, get_styling);
|
|
2965
|
+
return _el$4;
|
|
2946
2966
|
})()];
|
|
2947
2967
|
}
|
|
2948
2968
|
(0, $52FdA$solidjsweb.delegateEvents)(["click"]);
|
|
@@ -3049,6 +3069,43 @@ function $367b536a2a94d24e$var$history_state_change(signals, entries, state) {
|
|
|
3049
3069
|
}
|
|
3050
3070
|
});
|
|
3051
3071
|
}
|
|
3072
|
+
const $cfcd56242923775d$export$3064e1e8c6513da3 = new Set();
|
|
3073
|
+
let $cfcd56242923775d$var$has_ran = false;
|
|
3074
|
+
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
3075
|
+
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
3076
|
+
$cfcd56242923775d$var$has_ran = true;
|
|
3077
|
+
for (const function_name of ["replaceState", "pushState"]) {
|
|
3078
|
+
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
3079
|
+
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
3080
|
+
}
|
|
3081
|
+
}
|
|
3082
|
+
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
3083
|
+
thing[function_name] = new Proxy(thing[function_name], {
|
|
3084
|
+
apply(target, this_arg, arg_list) {
|
|
3085
|
+
try {
|
|
3086
|
+
if (typeof arg_list[0] == "object") {
|
|
3087
|
+
const cloned_object = {
|
|
3088
|
+
...arg_list[0]
|
|
3089
|
+
};
|
|
3090
|
+
const old_state = history.state;
|
|
3091
|
+
for (const key in old_state) {
|
|
3092
|
+
if (!$cfcd56242923775d$var$starts_with_any_prefix(key)) continue;
|
|
3093
|
+
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
3094
|
+
}
|
|
3095
|
+
arg_list[0] = cloned_object;
|
|
3096
|
+
}
|
|
3097
|
+
} catch (e) {
|
|
3098
|
+
(0, $52FdA$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
3099
|
+
}
|
|
3100
|
+
return Reflect.apply(target, this_arg, arg_list);
|
|
3101
|
+
}
|
|
3102
|
+
});
|
|
3103
|
+
}
|
|
3104
|
+
function $cfcd56242923775d$var$starts_with_any_prefix(key) {
|
|
3105
|
+
for (const prefix of $cfcd56242923775d$export$3064e1e8c6513da3) {
|
|
3106
|
+
if (key.startsWith(prefix)) return true;
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3052
3109
|
function $2b15291bd38ac551$export$9862539c89138352(_ref) {
|
|
3053
3110
|
let {
|
|
3054
3111
|
get_default_values_: get_default_values_,
|
|
@@ -3075,6 +3132,8 @@ function $2b15291bd38ac551$export$9862539c89138352(_ref) {
|
|
|
3075
3132
|
let [key, value] = _ref3;
|
|
3076
3133
|
return [key.slice(prefix_.length), value];
|
|
3077
3134
|
}));
|
|
3135
|
+
(0, $cfcd56242923775d$export$3064e1e8c6513da3).add(prefix_);
|
|
3136
|
+
// There's intentionally no onCleanup here since we want to preserve the state even if all components (in i.e. react-ui) that use the provider running this are unmounted and the provider is destroyed, since it might be re-created and need the old state (for example for doing scroll restoration)
|
|
3078
3137
|
return [reset_state, unprefixed_state];
|
|
3079
3138
|
}
|
|
3080
3139
|
|
|
@@ -3136,16 +3195,17 @@ var $e270e9f953fcbc58$var$_get_user_id = /*#__PURE__*/new WeakMap();
|
|
|
3136
3195
|
var $e270e9f953fcbc58$var$_get_session_id = /*#__PURE__*/new WeakMap();
|
|
3137
3196
|
var $e270e9f953fcbc58$var$_guard_url_creator_length = /*#__PURE__*/new WeakSet();
|
|
3138
3197
|
var $e270e9f953fcbc58$var$_run_url_creator_for_suggest = /*#__PURE__*/new WeakSet();
|
|
3139
|
-
var $e270e9f953fcbc58$var$
|
|
3198
|
+
var $e270e9f953fcbc58$var$_run_display_transformers_for_rest = /*#__PURE__*/new WeakSet();
|
|
3140
3199
|
var $e270e9f953fcbc58$var$_cached_post_request = /*#__PURE__*/new WeakSet();
|
|
3141
3200
|
class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
|
|
3142
3201
|
constructor(options) {
|
|
3143
3202
|
$e270e9f953fcbc58$var$_classPrivateMethodInitSpec(this, $e270e9f953fcbc58$var$_cached_post_request);
|
|
3144
|
-
$e270e9f953fcbc58$var$_classPrivateMethodInitSpec(this, $e270e9f953fcbc58$var$
|
|
3203
|
+
$e270e9f953fcbc58$var$_classPrivateMethodInitSpec(this, $e270e9f953fcbc58$var$_run_display_transformers_for_rest);
|
|
3145
3204
|
$e270e9f953fcbc58$var$_classPrivateMethodInitSpec(this, $e270e9f953fcbc58$var$_run_url_creator_for_suggest);
|
|
3146
3205
|
$e270e9f953fcbc58$var$_classPrivateMethodInitSpec(this, $e270e9f953fcbc58$var$_guard_url_creator_length);
|
|
3147
3206
|
$e270e9f953fcbc58$var$_classPrivateMethodInitSpec(this, $e270e9f953fcbc58$var$_get_cache_obj_for_endpoint);
|
|
3148
3207
|
(0, $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty))(this, "page_url_creator", void 0);
|
|
3208
|
+
(0, $parcel$interopDefault($52FdA$babelruntimehelpersdefineProperty))(this, "display_transformers", void 0);
|
|
3149
3209
|
$e270e9f953fcbc58$var$_classPrivateFieldInitSpec(this, $e270e9f953fcbc58$var$_supports_finalization_registry, {
|
|
3150
3210
|
writable: true,
|
|
3151
3211
|
value: typeof FinalizationRegistry === "function"
|
|
@@ -3184,12 +3244,14 @@ class $e270e9f953fcbc58$export$e015ed2f2950f2e3 {
|
|
|
3184
3244
|
get_metadata: get_metadata,
|
|
3185
3245
|
get_user_id: _get_user_id2,
|
|
3186
3246
|
get_session_id: _get_session_id2,
|
|
3187
|
-
page_url_creator:
|
|
3247
|
+
page_url_creator: _page_url_creator,
|
|
3248
|
+
display_transformers: _display_transformers
|
|
3188
3249
|
} = options !== null && options !== void 0 ? options : {};
|
|
3189
3250
|
(0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldSet))(this, $e270e9f953fcbc58$var$_get_metadata, get_metadata);
|
|
3190
3251
|
(0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldSet))(this, $e270e9f953fcbc58$var$_get_user_id, _get_user_id2);
|
|
3191
3252
|
(0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldSet))(this, $e270e9f953fcbc58$var$_get_session_id, _get_session_id2);
|
|
3192
|
-
this.page_url_creator =
|
|
3253
|
+
this.page_url_creator = _page_url_creator;
|
|
3254
|
+
this.display_transformers = _display_transformers;
|
|
3193
3255
|
}
|
|
3194
3256
|
async suggest(input_req) {
|
|
3195
3257
|
var _classPrivateFieldGet4;
|
|
@@ -3266,14 +3328,19 @@ function $e270e9f953fcbc58$var$_guard_url_creator_length2(expected, received) {
|
|
|
3266
3328
|
}
|
|
3267
3329
|
}
|
|
3268
3330
|
async function $e270e9f953fcbc58$var$_run_url_creator_for_suggest2(merchant, market, response) {
|
|
3269
|
-
|
|
3331
|
+
var _this$display_transfo;
|
|
3332
|
+
const page_url_creator = this.page_url_creator;
|
|
3333
|
+
const category_transformer = (_this$display_transfo = this.display_transformers) === null || _this$display_transfo === void 0 ? void 0 : _this$display_transfo.categories;
|
|
3334
|
+
if (!page_url_creator && !category_transformer) return response;
|
|
3270
3335
|
// find category suggestions, run thing with them, and then replace them
|
|
3271
3336
|
const category_suggestions = response.suggestions.filter(suggestion => suggestion.type === "category");
|
|
3272
|
-
const page_urls = await
|
|
3273
|
-
type: "categories",
|
|
3337
|
+
const page_urls = await (page_url_creator || category_transformer)({
|
|
3274
3338
|
market: market,
|
|
3275
3339
|
merchant: merchant,
|
|
3276
|
-
data: [...category_suggestions]
|
|
3340
|
+
data: [...category_suggestions],
|
|
3341
|
+
...(page_url_creator ? {
|
|
3342
|
+
type: "categories"
|
|
3343
|
+
} : {})
|
|
3277
3344
|
});
|
|
3278
3345
|
$e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_guard_url_creator_length, $e270e9f953fcbc58$var$_guard_url_creator_length2).call(this, category_suggestions, page_urls);
|
|
3279
3346
|
while (page_urls.length)
|
|
@@ -3281,17 +3348,29 @@ async function $e270e9f953fcbc58$var$_run_url_creator_for_suggest2(merchant, mar
|
|
|
3281
3348
|
Object.defineProperties(category_suggestions.pop(), Object.getOwnPropertyDescriptors(page_urls.pop()));
|
|
3282
3349
|
return response;
|
|
3283
3350
|
}
|
|
3284
|
-
async function $e270e9f953fcbc58$var$
|
|
3285
|
-
|
|
3351
|
+
async function $e270e9f953fcbc58$var$_run_display_transformers_for_rest2(merchant, market, input_data) {
|
|
3352
|
+
const {
|
|
3353
|
+
page_url_creator: page_url_creator,
|
|
3354
|
+
display_transformers: display_transformers
|
|
3355
|
+
} = this;
|
|
3356
|
+
if (!page_url_creator && !display_transformers) return input_data;
|
|
3357
|
+
const product_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.products;
|
|
3358
|
+
const category_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.categories;
|
|
3359
|
+
const content_result_transformer = display_transformers === null || display_transformers === void 0 ? void 0 : display_transformers.contentResults;
|
|
3286
3360
|
const displays = input_data.displays;
|
|
3287
|
-
const
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3361
|
+
const {
|
|
3362
|
+
breadcrumb: breadcrumb,
|
|
3363
|
+
quick_links: quick_links,
|
|
3364
|
+
content_search_links: content_search_links
|
|
3365
|
+
} = input_data;
|
|
3366
|
+
if (displays && (page_url_creator || product_transformer)) {
|
|
3367
|
+
const page_urls = await (page_url_creator || product_transformer)({
|
|
3292
3368
|
merchant: merchant,
|
|
3293
3369
|
market: market,
|
|
3294
|
-
displays: [...input_data.displays]
|
|
3370
|
+
displays: [...input_data.displays],
|
|
3371
|
+
...(page_url_creator ? {
|
|
3372
|
+
type: "products"
|
|
3373
|
+
} : {})
|
|
3295
3374
|
});
|
|
3296
3375
|
$e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_guard_url_creator_length, $e270e9f953fcbc58$var$_guard_url_creator_length2).call(this, displays, page_urls);
|
|
3297
3376
|
for (let i = 0; i < displays.length; i++) {
|
|
@@ -3309,19 +3388,30 @@ async function $e270e9f953fcbc58$var$_run_url_creator_for_rest2(merchant, market
|
|
|
3309
3388
|
displays[i] = new_display_or_page_url;
|
|
3310
3389
|
}
|
|
3311
3390
|
}
|
|
3312
|
-
for (const category_display_array of [breadcrumb, quick_links]) {
|
|
3391
|
+
if (page_url_creator || category_transformer) for (const category_display_array of [breadcrumb, quick_links]) {
|
|
3313
3392
|
if (!category_display_array) continue;
|
|
3314
|
-
const page_urls = await
|
|
3315
|
-
type: "categories",
|
|
3393
|
+
const page_urls = await (page_url_creator || category_transformer)({
|
|
3316
3394
|
merchant: merchant,
|
|
3317
3395
|
market: market,
|
|
3318
|
-
data: [...category_display_array]
|
|
3396
|
+
data: [...category_display_array],
|
|
3397
|
+
...(page_url_creator ? {
|
|
3398
|
+
type: "categories"
|
|
3399
|
+
} : {})
|
|
3319
3400
|
});
|
|
3320
3401
|
$e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_guard_url_creator_length, $e270e9f953fcbc58$var$_guard_url_creator_length2).call(this, category_display_array, page_urls);
|
|
3321
3402
|
for (let i = 0; i < category_display_array.length; i++)
|
|
3322
3403
|
// Copy over getters so we sneakily can make this reactive
|
|
3323
3404
|
Object.defineProperties(category_display_array[i], Object.getOwnPropertyDescriptors(page_urls[i]));
|
|
3324
3405
|
}
|
|
3406
|
+
if (content_search_links !== null && content_search_links !== void 0 && content_search_links.length && content_result_transformer) {
|
|
3407
|
+
const result = await content_result_transformer({
|
|
3408
|
+
merchant: merchant,
|
|
3409
|
+
market: market,
|
|
3410
|
+
data: [...content_search_links]
|
|
3411
|
+
});
|
|
3412
|
+
$e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_guard_url_creator_length, $e270e9f953fcbc58$var$_guard_url_creator_length2).call(this, content_search_links, result);
|
|
3413
|
+
input_data.content_search_links = result;
|
|
3414
|
+
}
|
|
3325
3415
|
return input_data;
|
|
3326
3416
|
}
|
|
3327
3417
|
async function $e270e9f953fcbc58$var$_cached_post_request2(endpoint, input_req, fallback_response) {
|
|
@@ -3349,7 +3439,7 @@ async function $e270e9f953fcbc58$var$_cached_post_request2(endpoint, input_req,
|
|
|
3349
3439
|
let result;
|
|
3350
3440
|
try {
|
|
3351
3441
|
const unmodified_result = await api_response.json();
|
|
3352
|
-
result = await $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$
|
|
3442
|
+
result = await $e270e9f953fcbc58$var$_classPrivateMethodGet(this, $e270e9f953fcbc58$var$_run_display_transformers_for_rest, $e270e9f953fcbc58$var$_run_display_transformers_for_rest2).call(this, input_req.tenant, input_req.market, unmodified_result);
|
|
3353
3443
|
} catch (e) {
|
|
3354
3444
|
(0, $52FdA$depictaiutilishared.dwarn)("URL creator or json decoding failed", e);
|
|
3355
3445
|
break return_successfully;
|
|
@@ -3439,12 +3529,11 @@ function $55f06aa93e360e7f$var$correct_range_filter_range_once(_ref3) {
|
|
|
3439
3529
|
}
|
|
3440
3530
|
function $068bde7fa83ac02c$export$92f2da32c6e7e7ee(_ref) {
|
|
3441
3531
|
let {
|
|
3442
|
-
|
|
3532
|
+
number_: number_,
|
|
3443
3533
|
i18n_: i18n_
|
|
3444
3534
|
} = _ref;
|
|
3445
3535
|
return (0, $52FdA$solidjs.createMemo)(() => {
|
|
3446
|
-
|
|
3447
|
-
const n_hits = (_search_results_ = search_results_()) === null || _search_results_ === void 0 ? void 0 : _search_results_.n_hits;
|
|
3536
|
+
const n_hits = number_();
|
|
3448
3537
|
if (isNaN(n_hits)) return "";
|
|
3449
3538
|
const price_formatting = i18n_.price_formatting_();
|
|
3450
3539
|
return (0, $52FdA$depictaiutilishared.standard_price_format)(n_hits, 0,
|
|
@@ -6079,7 +6168,10 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6079
6168
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = (0, $52FdA$solidjs.createSignal)(false);
|
|
6080
6169
|
const [desktop_filter_elements_, set_desktop_filter_elements] = (0, $52FdA$solidjs.createSignal)();
|
|
6081
6170
|
const formatted_number_of_results_ = (0, $068bde7fa83ac02c$export$92f2da32c6e7e7ee)({
|
|
6082
|
-
|
|
6171
|
+
number_: (0, $52FdA$solidjs.createMemo)(() => {
|
|
6172
|
+
var _plp_results_5;
|
|
6173
|
+
return (_plp_results_5 = plp_results_()) === null || _plp_results_5 === void 0 ? void 0 : _plp_results_5.n_hits;
|
|
6174
|
+
}),
|
|
6083
6175
|
i18n_: i18n_
|
|
6084
6176
|
});
|
|
6085
6177
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = (0, $52FdA$solidjs.createSignal)();
|
|
@@ -6110,8 +6202,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6110
6202
|
}), _el$4, _co$);
|
|
6111
6203
|
(0, $52FdA$solidjsweb.insert)(_el$, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
6112
6204
|
get when() {
|
|
6113
|
-
var
|
|
6114
|
-
return ((
|
|
6205
|
+
var _plp_results_6;
|
|
6206
|
+
return ((_plp_results_6 = plp_results_()) === null || _plp_results_6 === void 0 ? void 0 : _plp_results_6.n_hits) === 1;
|
|
6115
6207
|
},
|
|
6116
6208
|
get fallback() {
|
|
6117
6209
|
return i18n_.products_();
|
|
@@ -6330,8 +6422,8 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6330
6422
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
6331
6423
|
i18n_: i18n_,
|
|
6332
6424
|
number_of_results_: (0, $52FdA$solidjs.createMemo)(() => {
|
|
6333
|
-
var
|
|
6334
|
-
return (
|
|
6425
|
+
var _plp_results_7;
|
|
6426
|
+
return (_plp_results_7 = plp_results_()) === null || _plp_results_7 === void 0 ? void 0 : _plp_results_7.n_hits;
|
|
6335
6427
|
})
|
|
6336
6428
|
});
|
|
6337
6429
|
}
|
|
@@ -6353,37 +6445,6 @@ function $ede6c70ecdca46fe$export$f7d2f673fc2f091d(_ref) {
|
|
|
6353
6445
|
return _el$13;
|
|
6354
6446
|
})()];
|
|
6355
6447
|
}
|
|
6356
|
-
let $cfcd56242923775d$var$has_ran = false;
|
|
6357
|
-
function $cfcd56242923775d$export$5162a71f252e6122() {
|
|
6358
|
-
if ($cfcd56242923775d$var$has_ran || typeof history !== "object") return;
|
|
6359
|
-
$cfcd56242923775d$var$has_ran = true;
|
|
6360
|
-
for (const function_name of ["replaceState", "pushState"]) {
|
|
6361
|
-
if (Object.getOwnPropertyNames(history).includes(function_name)) $cfcd56242923775d$var$proxy_push_state(function_name, history);
|
|
6362
|
-
$cfcd56242923775d$var$proxy_push_state(function_name, History.prototype);
|
|
6363
|
-
}
|
|
6364
|
-
}
|
|
6365
|
-
function $cfcd56242923775d$var$proxy_push_state(function_name, thing) {
|
|
6366
|
-
thing[function_name] = new Proxy(thing[function_name], {
|
|
6367
|
-
apply(target, this_arg, arg_list) {
|
|
6368
|
-
try {
|
|
6369
|
-
if (typeof arg_list[0] == "object") {
|
|
6370
|
-
const cloned_object = {
|
|
6371
|
-
...arg_list[0]
|
|
6372
|
-
};
|
|
6373
|
-
const old_state = history.state;
|
|
6374
|
-
for (const key in old_state) {
|
|
6375
|
-
if (!key.startsWith("category_") && !key.startsWith("search_")) continue;
|
|
6376
|
-
if (!(key in cloned_object)) cloned_object[key] = old_state[key];
|
|
6377
|
-
}
|
|
6378
|
-
arg_list[0] = cloned_object;
|
|
6379
|
-
}
|
|
6380
|
-
} catch (e) {
|
|
6381
|
-
(0, $52FdA$depictaiutilishared.report)([e, "Failed to preserve items in history.state"], "error");
|
|
6382
|
-
}
|
|
6383
|
-
return Reflect.apply(target, this_arg, arg_list);
|
|
6384
|
-
}
|
|
6385
|
-
});
|
|
6386
|
-
}
|
|
6387
6448
|
const $5401a6698b0c0658$var$transform_elements = sorted_cols_at_size => {
|
|
6388
6449
|
const cols_at_size = [];
|
|
6389
6450
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -6726,7 +6787,6 @@ function $9cbefc32b9dab36d$var$_classApplyDescriptorGet(receiver, descriptor) {
|
|
|
6726
6787
|
return descriptor.value;
|
|
6727
6788
|
}
|
|
6728
6789
|
// We just pass page_url_creator to DepictAPI when we instantiate it, so don't allow it to be specified if api is already specified
|
|
6729
|
-
// on old displays, no page_url_creator can be specified
|
|
6730
6790
|
/**
|
|
6731
6791
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions.
|
|
6732
6792
|
* SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
@@ -6794,6 +6854,7 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
|
6794
6854
|
api: api,
|
|
6795
6855
|
on_navigation: on_navigation,
|
|
6796
6856
|
page_url_creator: page_url_creator,
|
|
6857
|
+
display_transformers: display_transformers,
|
|
6797
6858
|
unique_instance_key_for_state = "",
|
|
6798
6859
|
query_id_state_key: query_id_state_key,
|
|
6799
6860
|
...props_on_class
|
|
@@ -6862,8 +6923,10 @@ class $9cbefc32b9dab36d$export$f34314aa9505732e {
|
|
|
6862
6923
|
quicklinks_signal_: (0, $52FdA$solidjs.createSignal)(),
|
|
6863
6924
|
i18n_: i18n_,
|
|
6864
6925
|
reset_history_state_: reset_history_state_,
|
|
6926
|
+
// @ts-ignore
|
|
6865
6927
|
depict_api_: api !== null && api !== void 0 ? api : new (0, $e270e9f953fcbc58$export$e015ed2f2950f2e3)({
|
|
6866
|
-
page_url_creator: page_url_creator
|
|
6928
|
+
page_url_creator: page_url_creator,
|
|
6929
|
+
display_transformers: display_transformers
|
|
6867
6930
|
}),
|
|
6868
6931
|
router_: (0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet))(this, $9cbefc32b9dab36d$var$_router),
|
|
6869
6932
|
selected_filters_: selected_filters_,
|
|
@@ -7518,13 +7581,12 @@ function $c77adcdf5346b187$export$7de92c4c2205ebf3(_ref) {
|
|
|
7518
7581
|
});
|
|
7519
7582
|
}
|
|
7520
7583
|
function $c77adcdf5346b187$var$make_state_saved_rows(_ref3, i18n_) {
|
|
7521
|
-
var _untrack;
|
|
7522
7584
|
let [get_showing_recommendation_rows, set_showing_recommendation_rows] = _ref3;
|
|
7523
|
-
const currently_visible = (0, $52FdA$solidjs.createSignal)(0);
|
|
7585
|
+
const currently_visible = (0, $52FdA$solidjs.createSignal)((0, $52FdA$solidjs.untrack)(get_showing_recommendation_rows));
|
|
7524
7586
|
const [get_currently_visible, set_currently_visible] = currently_visible;
|
|
7525
7587
|
const rows = {
|
|
7526
7588
|
currently_visible: currently_visible,
|
|
7527
|
-
start_rows:
|
|
7589
|
+
start_rows: $c77adcdf5346b187$export$1c8c715550dc689d,
|
|
7528
7590
|
rows_per_click: 3,
|
|
7529
7591
|
button: (() => {
|
|
7530
7592
|
const _el$7 = (0, $52FdA$solidjsweb.getNextElement)($c77adcdf5346b187$var$_tmpl$2);
|
|
@@ -7697,7 +7759,7 @@ const $65353359a9fbdacd$export$27b710c08412a7ad = obj => {
|
|
|
7697
7759
|
return Object.fromEntries(Object.keys(obj).map(key => [key, obj[key]()]));
|
|
7698
7760
|
};
|
|
7699
7761
|
const $82d079b68975fbf7$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<span class="orig price"><!#><!/><!#><!/><!#><!/></span>`, 8),
|
|
7700
|
-
$82d079b68975fbf7$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.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>`, 26),
|
|
7762
|
+
$82d079b68975fbf7$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.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 line-clamp"></span><!#><!/></div><div class="price-container"><!#><!/><span class="price"><!#><!/><!#><!/><!#><!/></span></div></div></a>`, 26),
|
|
7701
7763
|
$82d079b68975fbf7$var$_tmpl$3 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="tagline"></div>`, 2);
|
|
7702
7764
|
const $82d079b68975fbf7$export$b05c0ae390cf3e06 = (display_or_variant_container, _ref, router_) => {
|
|
7703
7765
|
let {
|
|
@@ -7835,9 +7897,11 @@ function $6e8d48eea3d0469d$export$62f101a8aa597bf8(_ref) {
|
|
|
7835
7897
|
render_instant_card_placeholder_: render_instant_card_placeholder_,
|
|
7836
7898
|
min_products_to_fetch_: min_products_to_fetch_,
|
|
7837
7899
|
has_sort_or_filters_: has_sort_or_filters_,
|
|
7838
|
-
|
|
7900
|
+
set_total_num_results_accessor_: set_total_num_results_accessor_,
|
|
7839
7901
|
i18n_: i18n_,
|
|
7840
|
-
router_: router_
|
|
7902
|
+
router_: router_,
|
|
7903
|
+
set_modal_search_results_: set_modal_search_results_,
|
|
7904
|
+
content_search_enabled_: content_search_enabled_
|
|
7841
7905
|
} = _ref;
|
|
7842
7906
|
const max_cards = 4;
|
|
7843
7907
|
const [read_current_instant_query, write_current_instant_query] = (0, $52FdA$solidjs.createSignal)("");
|
|
@@ -7862,13 +7926,23 @@ function $6e8d48eea3d0469d$export$62f101a8aa597bf8(_ref) {
|
|
|
7862
7926
|
...variable_data
|
|
7863
7927
|
});
|
|
7864
7928
|
}));
|
|
7865
|
-
|
|
7866
|
-
|
|
7929
|
+
// Maybe we should move this createResoure out of this component, on the other hand it bloats the parent component and if it fails it takes more than needed with it, so I think writing the content results from here is better
|
|
7930
|
+
// This is for the press-enter-to-instant-content-result feature which gets called from Autocomplete.tsx
|
|
7931
|
+
set_modal_search_results_(() => search_results);
|
|
7932
|
+
(0, $52FdA$solidjs.onCleanup)(() => set_modal_search_results_(undefined)); // for consistency, in case this component crashes
|
|
7933
|
+
set_total_num_results_accessor_(() => (0, $068bde7fa83ac02c$export$92f2da32c6e7e7ee)({
|
|
7934
|
+
number_: (0, $52FdA$solidjs.createMemo)(() => {
|
|
7935
|
+
var _search_results, _search_results2, _search_results2$cont;
|
|
7936
|
+
const hits = (_search_results = search_results()) === null || _search_results === void 0 ? void 0 : _search_results.n_hits;
|
|
7937
|
+
const content_results = (_search_results2 = search_results()) === null || _search_results2 === void 0 ? void 0 : (_search_results2$cont = _search_results2.content_search_links) === null || _search_results2$cont === void 0 ? void 0 : _search_results2$cont.length;
|
|
7938
|
+
if (!content_results || !content_search_enabled_()) return hits;
|
|
7939
|
+
return (hits !== null && hits !== void 0 ? hits : 0) + content_results;
|
|
7940
|
+
}),
|
|
7867
7941
|
i18n_: i18n_
|
|
7868
7942
|
}));
|
|
7869
7943
|
const sliced_displays = (0, $52FdA$solidjs.createMemo)(() => {
|
|
7870
|
-
var
|
|
7871
|
-
return (
|
|
7944
|
+
var _search_results3, _search_results3$disp;
|
|
7945
|
+
return (_search_results3 = search_results()) === null || _search_results3 === void 0 ? void 0 : (_search_results3$disp = _search_results3.displays) === null || _search_results3$disp === void 0 ? void 0 : _search_results3$disp.slice(0, max_cards);
|
|
7872
7946
|
});
|
|
7873
7947
|
let placeholder;
|
|
7874
7948
|
return (() => {
|
|
@@ -7880,8 +7954,8 @@ function $6e8d48eea3d0469d$export$62f101a8aa597bf8(_ref) {
|
|
|
7880
7954
|
},
|
|
7881
7955
|
get fallback() {
|
|
7882
7956
|
return (0, $52FdA$solidjs.createMemo)(() => {
|
|
7883
|
-
var
|
|
7884
|
-
if (Array.isArray((
|
|
7957
|
+
var _search_results4;
|
|
7958
|
+
if (Array.isArray((_search_results4 = search_results()) === null || _search_results4 === void 0 ? void 0 : _search_results4.displays))
|
|
7885
7959
|
// remove placeholders if we have a response but no results
|
|
7886
7960
|
return undefined;
|
|
7887
7961
|
return new Array(max_cards).fill(1).map(() => (placeholder || (placeholder = render_instant_card_placeholder_())).cloneNode(true));
|
|
@@ -7969,7 +8043,7 @@ function $8767e7eba5066d2b$export$5d2caaa6b530761c() {
|
|
|
7969
8043
|
return (0, $52FdA$solidjsweb.getNextElement)($8767e7eba5066d2b$var$_tmpl$);
|
|
7970
8044
|
}
|
|
7971
8045
|
const $4edbc04f5c5a1843$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="previous-searches"><h2 class="text"></h2><div class="list"></div></div>`, 6),
|
|
7972
|
-
$4edbc04f5c5a1843$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<a class="item"><div class="left"><!#><!/><span></span></div><button class="delete"></button></a>`, 10);
|
|
8046
|
+
$4edbc04f5c5a1843$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<a class="item"><div class="left"><!#><!/><span class="line-clamp"></span></div><button class="delete"></button></a>`, 10);
|
|
7973
8047
|
function $4edbc04f5c5a1843$export$a146ac6fa8346a25(_ref) {
|
|
7974
8048
|
let {
|
|
7975
8049
|
text_: text_,
|
|
@@ -8055,15 +8129,18 @@ function $4edbc04f5c5a1843$export$a146ac6fa8346a25(_ref) {
|
|
|
8055
8129
|
return ((_read_selected_index_ = read_selected_index_()) === null || _read_selected_index_ === void 0 ? void 0 : _read_selected_index_[0]) === 0 && ((_read_selected_index_2 = read_selected_index_()) === null || _read_selected_index_2 === void 0 ? void 0 : _read_selected_index_2[1]) === index;
|
|
8056
8130
|
})(),
|
|
8057
8131
|
_v$2 = href(),
|
|
8058
|
-
_v$3 =
|
|
8132
|
+
_v$3 = item(),
|
|
8133
|
+
_v$4 = i18n_.previous_searches_delete_entry_from_history_();
|
|
8059
8134
|
_v$ !== _p$._v$ && _el$4.classList.toggle("selected", _p$._v$ = _v$);
|
|
8060
8135
|
_v$2 !== _p$._v$2 && (0, $52FdA$solidjsweb.setAttribute)(_el$4, "href", _p$._v$2 = _v$2);
|
|
8061
|
-
_v$3 !== _p$._v$3 && (0, $52FdA$solidjsweb.setAttribute)(_el$
|
|
8136
|
+
_v$3 !== _p$._v$3 && (0, $52FdA$solidjsweb.setAttribute)(_el$6, "title", _p$._v$3 = _v$3);
|
|
8137
|
+
_v$4 !== _p$._v$4 && (0, $52FdA$solidjsweb.setAttribute)(_el$9, "title", _p$._v$4 = _v$4);
|
|
8062
8138
|
return _p$;
|
|
8063
8139
|
}, {
|
|
8064
8140
|
_v$: undefined,
|
|
8065
8141
|
_v$2: undefined,
|
|
8066
|
-
_v$3: undefined
|
|
8142
|
+
_v$3: undefined,
|
|
8143
|
+
_v$4: undefined
|
|
8067
8144
|
});
|
|
8068
8145
|
return _el$4;
|
|
8069
8146
|
})();
|
|
@@ -8133,18 +8210,38 @@ function $23c3f390dee33ff8$export$ba17c5b7e6dda39f(_ref) {
|
|
|
8133
8210
|
const _el$2 = (0, $52FdA$solidjsweb.getNextElement)($23c3f390dee33ff8$var$_tmpl$2);
|
|
8134
8211
|
(0, $52FdA$solidjsweb.className)(_el$2, class_);
|
|
8135
8212
|
(0, $52FdA$solidjsweb.insert)(_el$2, text_itself);
|
|
8136
|
-
(0, $52FdA$solidjsweb.effect)(
|
|
8213
|
+
(0, $52FdA$solidjsweb.effect)(_p$ => {
|
|
8214
|
+
const _v$ = !!get_has_highlighted(),
|
|
8215
|
+
_v$2 = whole_text_to_display_memo() /* for when line-clamped, users can see full text on hover */;
|
|
8216
|
+
_v$ !== _p$._v$ && _el$2.classList.toggle("has-history-match", _p$._v$ = _v$);
|
|
8217
|
+
_v$2 !== _p$._v$2 && (0, $52FdA$solidjsweb.setAttribute)(_el$2, "title", _p$._v$2 = _v$2);
|
|
8218
|
+
return _p$;
|
|
8219
|
+
}, {
|
|
8220
|
+
_v$: undefined,
|
|
8221
|
+
_v$2: undefined
|
|
8222
|
+
});
|
|
8137
8223
|
return _el$2;
|
|
8138
8224
|
})();
|
|
8139
8225
|
}
|
|
8226
|
+
const $3cf7b4db1e203c93$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="M56 26.455a13.71 13.71 0 0 0-9.578 3.967A13.71 13.71 0 0 0 42.455 40v176a13.71 13.71 0 0 0 3.967 9.578A13.71 13.71 0 0 0 56 229.545h144A13.71 13.71 0 0 0 213.545 216V88a2.456 2.456 0 0 1 0-.002c.001-1.452-.597-2.895-1.623-3.922l-55.998-55.998a5.61 5.61 0 0 0-3.922-1.623 2.456 2.456 0 0 1-.002 0zm0 11.09h88A2.456 2.456 0 0 1 146.455 40v48c0 2.903 2.642 5.545 5.545 5.545h48A2.456 2.456 0 0 1 202.455 96v120a2.456 2.456 0 0 1-2.455 2.455H56A2.456 2.456 0 0 1 53.545 216V40A2.456 2.456 0 0 1 56 37.545zm103.061 11.498a2.456 2.456 0 0 1 2.676.531l28.689 28.689a2.456 2.456 0 0 1-1.736 4.191H160A2.456 2.456 0 0 1 157.545 80V51.311a2.456 2.456 0 0 1 1.516-2.268zM96 130.455c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545zm0 32c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545z"></path></svg>`, 4);
|
|
8227
|
+
function $3cf7b4db1e203c93$export$605674723bcc715c() {
|
|
8228
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8229
|
+
return (() => {
|
|
8230
|
+
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($3cf7b4db1e203c93$var$_tmpl$);
|
|
8231
|
+
(0, $52FdA$solidjsweb.spread)(_el$, props, true, true);
|
|
8232
|
+
(0, $52FdA$solidjsweb.runHydrationEvents)();
|
|
8233
|
+
return _el$;
|
|
8234
|
+
})();
|
|
8235
|
+
}
|
|
8140
8236
|
const $0677d509ad208e22$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<a class="suggestion"></a>`, 2),
|
|
8141
8237
|
$0677d509ad208e22$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="search-icon"></div>`, 2),
|
|
8142
8238
|
$0677d509ad208e22$var$_tmpl$3 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<span class="type"></span>`, 2),
|
|
8143
8239
|
$0677d509ad208e22$var$_tmpl$4 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div><!#><!/><span class="value"></span></div>`, 6),
|
|
8144
|
-
$0677d509ad208e22$var$_tmpl$5 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<
|
|
8145
|
-
$0677d509ad208e22$var$_tmpl$6 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<
|
|
8146
|
-
$0677d509ad208e22$var$_tmpl$7 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="suggestion-container
|
|
8147
|
-
$0677d509ad208e22$var$_tmpl$8 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="
|
|
8240
|
+
$0677d509ad208e22$var$_tmpl$5 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="with-icon"><!#><!/><!#><!/></div>`, 6),
|
|
8241
|
+
$0677d509ad208e22$var$_tmpl$6 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<h2 class="text"></h2>`, 2),
|
|
8242
|
+
$0677d509ad208e22$var$_tmpl$7 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="suggestion-container query"><!#><!/><!#><!/></div>`, 6),
|
|
8243
|
+
$0677d509ad208e22$var$_tmpl$8 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="suggestion-container page"></div>`, 2),
|
|
8244
|
+
$0677d509ad208e22$var$_tmpl$9 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="suggestions"><!#><!/><!#><!/><!#><!/></div>`, 8);
|
|
8148
8245
|
function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
8149
8246
|
let {
|
|
8150
8247
|
suggestion_memo_: suggestion_memo_,
|
|
@@ -8158,7 +8255,8 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8158
8255
|
include_category_suggestions_: include_category_suggestions_,
|
|
8159
8256
|
searching_for_value_: searching_for_value_,
|
|
8160
8257
|
router_: router_,
|
|
8161
|
-
submit_query_: submit_query_
|
|
8258
|
+
submit_query_: submit_query_,
|
|
8259
|
+
get_content_results_: get_content_results_
|
|
8162
8260
|
} = _ref;
|
|
8163
8261
|
const queries_memo = (0, $52FdA$solidjs.createMemo)(() => suggestion_memo_().filter(_ref2 => {
|
|
8164
8262
|
let {
|
|
@@ -8169,12 +8267,18 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8169
8267
|
} // don't show the ones we already show from the history
|
|
8170
8268
|
));
|
|
8171
8269
|
|
|
8172
|
-
const not_queries_memo = (0, $52FdA$solidjs.createMemo)(() =>
|
|
8173
|
-
|
|
8174
|
-
|
|
8175
|
-
|
|
8176
|
-
|
|
8177
|
-
|
|
8270
|
+
const not_queries_memo = (0, $52FdA$solidjs.createMemo)(() => {
|
|
8271
|
+
// For the section that shows categories and content results
|
|
8272
|
+
// We want to limit to 3 items, and we want to show the categories first
|
|
8273
|
+
const content_results = get_content_results_() || [];
|
|
8274
|
+
const from_suggest_request = include_category_suggestions_ ? suggestion_memo_().filter(_ref3 => {
|
|
8275
|
+
let {
|
|
8276
|
+
type: type
|
|
8277
|
+
} = _ref3;
|
|
8278
|
+
return type !== (0, $ce079d50d380ee11$export$3cf9497e790da491);
|
|
8279
|
+
}) : [];
|
|
8280
|
+
return [...from_suggest_request.slice(0, content_results.length ? 2 : 3), ...content_results.slice(0, 1)];
|
|
8281
|
+
});
|
|
8178
8282
|
const render_entry = function (input_obj, autocomplete_data_index, index) {
|
|
8179
8283
|
let is_history = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
8180
8284
|
const is_query = (0, $52FdA$solidjs.createMemo)(() => input_obj().type === (0, $ce079d50d380ee11$export$3cf9497e790da491));
|
|
@@ -8184,6 +8288,10 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8184
8288
|
url_transformer_: url_transformer_
|
|
8185
8289
|
}) : undefined);
|
|
8186
8290
|
const href = (0, $52FdA$solidjs.createMemo)(() => is_query() ? href_with_changed_params_accessor()() : input_obj().page_url);
|
|
8291
|
+
const is_selected = (0, $52FdA$solidjs.createMemo)(() => {
|
|
8292
|
+
var _read_selected_index_, _read_selected_index_2;
|
|
8293
|
+
return ((_read_selected_index_ = read_selected_index_()) === null || _read_selected_index_ === void 0 ? void 0 : _read_selected_index_[0]) === autocomplete_data_index && ((_read_selected_index_2 = read_selected_index_()) === null || _read_selected_index_2 === void 0 ? void 0 : _read_selected_index_2[1]) === index;
|
|
8294
|
+
});
|
|
8187
8295
|
return (() => {
|
|
8188
8296
|
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$);
|
|
8189
8297
|
(0, $52FdA$solidjsweb.use)(element => element.addEventListener("click", (0, $52FdA$depictaiutilishared.catchify)(ev => {
|
|
@@ -8197,7 +8305,7 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8197
8305
|
return;
|
|
8198
8306
|
}
|
|
8199
8307
|
router_.navigate_.go_to_({
|
|
8200
|
-
new_url_:
|
|
8308
|
+
new_url_: href(),
|
|
8201
8309
|
is_replace_: false,
|
|
8202
8310
|
event_: ev
|
|
8203
8311
|
});
|
|
@@ -8219,20 +8327,20 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8219
8327
|
return (0, $52FdA$solidjsweb.createComponent)((0, $8767e7eba5066d2b$export$5d2caaa6b530761c), {});
|
|
8220
8328
|
}
|
|
8221
8329
|
}), (0, $52FdA$solidjsweb.createComponent)((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
8222
|
-
class_: "value",
|
|
8330
|
+
class_: "value line-clamp",
|
|
8223
8331
|
get whole_text_to_display_() {
|
|
8224
8332
|
return (0, $52FdA$solidjs.createMemo)(() => input_obj().title);
|
|
8225
8333
|
},
|
|
8226
8334
|
searching_for_value_: searching_for_value_
|
|
8227
8335
|
})] : [(0, $52FdA$solidjsweb.memo)((() => {
|
|
8228
|
-
const _c$2 = (0, $52FdA$solidjsweb.memo)(() => typeof input_obj()
|
|
8336
|
+
const _c$2 = (0, $52FdA$solidjsweb.memo)(() => typeof input_obj() /* this is a harmless lie */.parent_title === "string");
|
|
8229
8337
|
return () => _c$2() ? (() => {
|
|
8230
8338
|
const _el$4 = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$4),
|
|
8231
8339
|
_el$6 = _el$4.firstChild,
|
|
8232
8340
|
[_el$7, _co$] = (0, $52FdA$solidjsweb.getNextMarker)(_el$6.nextSibling),
|
|
8233
8341
|
_el$5 = _el$7.nextSibling;
|
|
8234
8342
|
(0, $52FdA$solidjsweb.insert)(_el$4, (0, $52FdA$solidjsweb.createComponent)((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
8235
|
-
class_: "category",
|
|
8343
|
+
class_: "category line-clamp",
|
|
8236
8344
|
get whole_text_to_display_() {
|
|
8237
8345
|
return (0, $52FdA$solidjs.createMemo)(() => input_obj().title);
|
|
8238
8346
|
},
|
|
@@ -8240,16 +8348,38 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8240
8348
|
}), _el$7, _co$);
|
|
8241
8349
|
(0, $52FdA$solidjsweb.insert)(_el$5, () => input_obj().parent_title);
|
|
8242
8350
|
return _el$4;
|
|
8243
|
-
})() : (
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
|
|
8247
|
-
|
|
8248
|
-
|
|
8249
|
-
|
|
8351
|
+
})() : (() => {
|
|
8352
|
+
const _c$3 = (0, $52FdA$solidjsweb.memo)(() => input_obj().type === "content");
|
|
8353
|
+
return () => _c$3() ? (() => {
|
|
8354
|
+
const _el$8 = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$5),
|
|
8355
|
+
_el$9 = _el$8.firstChild,
|
|
8356
|
+
[_el$10, _co$2] = (0, $52FdA$solidjsweb.getNextMarker)(_el$9.nextSibling),
|
|
8357
|
+
_el$11 = _el$10.nextSibling,
|
|
8358
|
+
[_el$12, _co$3] = (0, $52FdA$solidjsweb.getNextMarker)(_el$11.nextSibling);
|
|
8359
|
+
(0, $52FdA$solidjsweb.insert)(_el$8, (0, $52FdA$solidjsweb.createComponent)((0, $3cf7b4db1e203c93$export$605674723bcc715c), {
|
|
8360
|
+
width: "16",
|
|
8361
|
+
height: "16"
|
|
8362
|
+
}), _el$10, _co$2);
|
|
8363
|
+
(0, $52FdA$solidjsweb.insert)(_el$8, (0, $52FdA$solidjsweb.createComponent)((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
8364
|
+
class_: "content line-clamp",
|
|
8365
|
+
get whole_text_to_display_() {
|
|
8366
|
+
return (0, $52FdA$solidjs.createMemo)(() => input_obj().title);
|
|
8367
|
+
},
|
|
8368
|
+
searching_for_value_: searching_for_value_
|
|
8369
|
+
}), _el$12, _co$3);
|
|
8370
|
+
return _el$8;
|
|
8371
|
+
})() : (0, $52FdA$solidjsweb.createComponent)((0, $23c3f390dee33ff8$export$ba17c5b7e6dda39f), {
|
|
8372
|
+
class_: "category line-clamp",
|
|
8373
|
+
get whole_text_to_display_() {
|
|
8374
|
+
return (0, $52FdA$solidjs.createMemo)(() => input_obj().title);
|
|
8375
|
+
},
|
|
8376
|
+
searching_for_value_: searching_for_value_
|
|
8377
|
+
});
|
|
8378
|
+
})();
|
|
8250
8379
|
})()), (() => {
|
|
8251
8380
|
const _el$3 = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$3);
|
|
8252
8381
|
(0, $52FdA$solidjsweb.insert)(_el$3, (0, $52FdA$solidjs.createMemo)(() => {
|
|
8382
|
+
if (input_obj().type === "content") return i18n_.content_();
|
|
8253
8383
|
if (input_obj().category_type === "BRAND") return i18n_.brand_();
|
|
8254
8384
|
return i18n_.category_();
|
|
8255
8385
|
}));
|
|
@@ -8258,10 +8388,7 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8258
8388
|
})());
|
|
8259
8389
|
(0, $52FdA$solidjsweb.effect)(_p$ => {
|
|
8260
8390
|
const _v$ = {
|
|
8261
|
-
selected: (
|
|
8262
|
-
var _read_selected_index_, _read_selected_index_2;
|
|
8263
|
-
return ((_read_selected_index_ = read_selected_index_()) === null || _read_selected_index_ === void 0 ? void 0 : _read_selected_index_[0]) === autocomplete_data_index && ((_read_selected_index_2 = read_selected_index_()) === null || _read_selected_index_2 === void 0 ? void 0 : _read_selected_index_2[1]) === index;
|
|
8264
|
-
})(),
|
|
8391
|
+
selected: is_selected(),
|
|
8265
8392
|
history: is_history,
|
|
8266
8393
|
["type-" + input_obj().type]: true
|
|
8267
8394
|
},
|
|
@@ -8288,8 +8415,8 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8288
8415
|
};
|
|
8289
8416
|
const should_show_previous_searches_in_query_part = (0, $52FdA$solidjs.createMemo)(() => !on_previous_searches_page_());
|
|
8290
8417
|
const should_show_at_all = (0, $52FdA$solidjs.createMemo)(() => {
|
|
8291
|
-
var _suggestion_memo_;
|
|
8292
|
-
return ((_suggestion_memo_ = suggestion_memo_()) === null || _suggestion_memo_ === void 0 ? void 0 : _suggestion_memo_.length) || should_show_previous_searches_in_query_part() && filtered_previous_searches_().length;
|
|
8418
|
+
var _suggestion_memo_, _get_content_results_;
|
|
8419
|
+
return ((_suggestion_memo_ = suggestion_memo_()) === null || _suggestion_memo_ === void 0 ? void 0 : _suggestion_memo_.length) || should_show_previous_searches_in_query_part() && filtered_previous_searches_().length || ((_get_content_results_ = get_content_results_()) === null || _get_content_results_ === void 0 ? void 0 : _get_content_results_.length);
|
|
8293
8420
|
});
|
|
8294
8421
|
const should_show_query_part = (0, $52FdA$solidjs.createMemo)(() => queries_memo().length || filtered_previous_searches_().length);
|
|
8295
8422
|
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
@@ -8297,34 +8424,34 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8297
8424
|
return should_show_at_all();
|
|
8298
8425
|
},
|
|
8299
8426
|
get children() {
|
|
8300
|
-
const _el$
|
|
8301
|
-
_el$
|
|
8302
|
-
[_el$
|
|
8303
|
-
_el$
|
|
8304
|
-
[_el$
|
|
8305
|
-
_el$
|
|
8306
|
-
[_el$
|
|
8307
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
8427
|
+
const _el$13 = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$9),
|
|
8428
|
+
_el$21 = _el$13.firstChild,
|
|
8429
|
+
[_el$22, _co$6] = (0, $52FdA$solidjsweb.getNextMarker)(_el$21.nextSibling),
|
|
8430
|
+
_el$23 = _el$22.nextSibling,
|
|
8431
|
+
[_el$24, _co$7] = (0, $52FdA$solidjsweb.getNextMarker)(_el$23.nextSibling),
|
|
8432
|
+
_el$25 = _el$24.nextSibling,
|
|
8433
|
+
[_el$26, _co$8] = (0, $52FdA$solidjsweb.getNextMarker)(_el$25.nextSibling);
|
|
8434
|
+
(0, $52FdA$solidjsweb.insert)(_el$13, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
8308
8435
|
get when() {
|
|
8309
8436
|
return on_previous_searches_page_();
|
|
8310
8437
|
},
|
|
8311
8438
|
get children() {
|
|
8312
|
-
const _el$
|
|
8313
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
8314
|
-
return _el$
|
|
8439
|
+
const _el$14 = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$6);
|
|
8440
|
+
(0, $52FdA$solidjsweb.insert)(_el$14, () => i18n_.suggestions_());
|
|
8441
|
+
return _el$14;
|
|
8315
8442
|
}
|
|
8316
|
-
}), _el$
|
|
8317
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
8443
|
+
}), _el$22, _co$6);
|
|
8444
|
+
(0, $52FdA$solidjsweb.insert)(_el$13, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
8318
8445
|
get when() {
|
|
8319
8446
|
return should_show_query_part();
|
|
8320
8447
|
},
|
|
8321
8448
|
get children() {
|
|
8322
|
-
const _el$
|
|
8323
|
-
_el$
|
|
8324
|
-
[_el$
|
|
8325
|
-
_el$
|
|
8326
|
-
[_el$
|
|
8327
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
8449
|
+
const _el$15 = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$7),
|
|
8450
|
+
_el$16 = _el$15.firstChild,
|
|
8451
|
+
[_el$17, _co$4] = (0, $52FdA$solidjsweb.getNextMarker)(_el$16.nextSibling),
|
|
8452
|
+
_el$18 = _el$17.nextSibling,
|
|
8453
|
+
[_el$19, _co$5] = (0, $52FdA$solidjsweb.getNextMarker)(_el$18.nextSibling);
|
|
8454
|
+
(0, $52FdA$solidjsweb.insert)(_el$15, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
8328
8455
|
get when() {
|
|
8329
8456
|
return should_show_previous_searches_in_query_part();
|
|
8330
8457
|
},
|
|
@@ -8347,8 +8474,8 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8347
8474
|
});
|
|
8348
8475
|
})();
|
|
8349
8476
|
}
|
|
8350
|
-
}), _el$
|
|
8351
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
8477
|
+
}), _el$17, _co$4);
|
|
8478
|
+
(0, $52FdA$solidjsweb.insert)(_el$15, () => {
|
|
8352
8479
|
const index_in_autocomplete = 2;
|
|
8353
8480
|
set_list_until_cleanup(queries_memo, index_in_autocomplete);
|
|
8354
8481
|
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Index), {
|
|
@@ -8357,18 +8484,18 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8357
8484
|
},
|
|
8358
8485
|
children: (item, index) => render_entry(item, index_in_autocomplete, index)
|
|
8359
8486
|
});
|
|
8360
|
-
}, _el$
|
|
8361
|
-
return _el$
|
|
8487
|
+
}, _el$19, _co$5);
|
|
8488
|
+
return _el$15;
|
|
8362
8489
|
}
|
|
8363
|
-
}), _el$
|
|
8364
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
8490
|
+
}), _el$24, _co$7);
|
|
8491
|
+
(0, $52FdA$solidjsweb.insert)(_el$13, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
8365
8492
|
get when() {
|
|
8366
|
-
return not_queries_memo().length
|
|
8493
|
+
return not_queries_memo().length;
|
|
8367
8494
|
},
|
|
8368
8495
|
keyed: false,
|
|
8369
8496
|
get children() {
|
|
8370
|
-
const _el$
|
|
8371
|
-
(0, $52FdA$solidjsweb.insert)(_el$
|
|
8497
|
+
const _el$20 = (0, $52FdA$solidjsweb.getNextElement)($0677d509ad208e22$var$_tmpl$8);
|
|
8498
|
+
(0, $52FdA$solidjsweb.insert)(_el$20, () => {
|
|
8372
8499
|
const index_in_autocomplete = 3;
|
|
8373
8500
|
set_list_until_cleanup(not_queries_memo, index_in_autocomplete);
|
|
8374
8501
|
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Index), {
|
|
@@ -8378,15 +8505,30 @@ function $0677d509ad208e22$export$e872e2339fb04a7f(_ref) {
|
|
|
8378
8505
|
children: (item, index) => render_entry(item, index_in_autocomplete, index)
|
|
8379
8506
|
});
|
|
8380
8507
|
});
|
|
8381
|
-
return _el$
|
|
8508
|
+
return _el$20;
|
|
8382
8509
|
}
|
|
8383
|
-
}), _el$
|
|
8384
|
-
(0, $52FdA$solidjsweb.effect)(() => _el$
|
|
8385
|
-
return _el$
|
|
8510
|
+
}), _el$26, _co$8);
|
|
8511
|
+
(0, $52FdA$solidjsweb.effect)(() => _el$13.classList.toggle("compact", !!on_previous_searches_page_()));
|
|
8512
|
+
return _el$13;
|
|
8386
8513
|
}
|
|
8387
8514
|
});
|
|
8388
8515
|
}
|
|
8389
|
-
const $
|
|
8516
|
+
const $1730e5b4d47679a3$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<a target="_blank"></a>`, 2);
|
|
8517
|
+
function $1730e5b4d47679a3$export$1efe1013da60d0e4(e, href) {
|
|
8518
|
+
if (e.metaKey || e.ctrlKey) {
|
|
8519
|
+
// Open link in a new tab with cmd/ctrl + enter.
|
|
8520
|
+
const link = (() => {
|
|
8521
|
+
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($1730e5b4d47679a3$var$_tmpl$);
|
|
8522
|
+
(0, $52FdA$solidjsweb.setAttribute)(_el$, "href", href);
|
|
8523
|
+
return _el$;
|
|
8524
|
+
})();
|
|
8525
|
+
document.body.append(link);
|
|
8526
|
+
link.click();
|
|
8527
|
+
link.remove();
|
|
8528
|
+
return true;
|
|
8529
|
+
}
|
|
8530
|
+
return false;
|
|
8531
|
+
}
|
|
8390
8532
|
function $1a7b2e0cdf65293a$export$217899a935ef803b(_ref) {
|
|
8391
8533
|
let {
|
|
8392
8534
|
selected_index_: [read_selected_index, write_selected_index],
|
|
@@ -8464,6 +8606,7 @@ function $1a7b2e0cdf65293a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
8464
8606
|
const sfv = get_search_field_value();
|
|
8465
8607
|
if (!(0, $52FdA$solidjs.untrack)(() => read_updating_blocked())) previous_value = sfv;
|
|
8466
8608
|
});
|
|
8609
|
+
const owner = (0, $52FdA$solidjs.getOwner)();
|
|
8467
8610
|
const handler = (0, $52FdA$depictaiutilishared.catchify)(_ref3 => {
|
|
8468
8611
|
let {
|
|
8469
8612
|
keyCode: keyCode
|
|
@@ -8496,29 +8639,29 @@ function $1a7b2e0cdf65293a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
8496
8639
|
const {
|
|
8497
8640
|
title: title
|
|
8498
8641
|
} = selected_entry;
|
|
8499
|
-
|
|
8642
|
+
(0, $52FdA$solidjs.runWithOwner)(owner, block_updating_for_one_change);
|
|
8500
8643
|
set_search_field_value(title);
|
|
8501
|
-
override_on_enter_for_this_entry(e => {
|
|
8644
|
+
(0, $52FdA$solidjs.runWithOwner)(owner, () => override_on_enter_for_this_entry(e => {
|
|
8502
8645
|
// Open search query in new tab on cmd+enter
|
|
8503
8646
|
// If it's not cmd+enter, pressing enter will just submit the value that was put into the field while selecting with the arrow keys ;)
|
|
8504
8647
|
const url = new URL(location);
|
|
8505
8648
|
url_transformer_ === null || url_transformer_ === void 0 || url_transformer_(url);
|
|
8506
8649
|
url.searchParams.set(search_query_param_name_, title);
|
|
8507
|
-
return $
|
|
8508
|
-
});
|
|
8509
|
-
} else if ((selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) == "category") override_on_enter_for_this_entry(e => {
|
|
8650
|
+
return (0, $1730e5b4d47679a3$export$1efe1013da60d0e4)(e, url.href);
|
|
8651
|
+
}));
|
|
8652
|
+
} else if ((selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) == "category" || (selected_entry === null || selected_entry === void 0 ? void 0 : selected_entry.type) === "content") (0, $52FdA$solidjs.runWithOwner)(owner, () => override_on_enter_for_this_entry(e => {
|
|
8510
8653
|
const {
|
|
8511
8654
|
page_url: page_url
|
|
8512
8655
|
} = selected_entry;
|
|
8513
|
-
if (
|
|
8656
|
+
if (!(0, $1730e5b4d47679a3$export$1efe1013da60d0e4)(e, page_url))
|
|
8514
8657
|
// Above fn will return true if it opened a new tab, and we won't make these checks anymore
|
|
8515
8658
|
router_.navigate_.go_to_({
|
|
8516
8659
|
new_url_: page_url,
|
|
8517
8660
|
is_replace_: false
|
|
8518
8661
|
});
|
|
8519
8662
|
return true;
|
|
8520
|
-
});else if (!selected_entry) {
|
|
8521
|
-
|
|
8663
|
+
}));else if (!selected_entry) {
|
|
8664
|
+
(0, $52FdA$solidjs.runWithOwner)(owner, block_updating_for_one_change);
|
|
8522
8665
|
set_search_field_value(previous_value);
|
|
8523
8666
|
}
|
|
8524
8667
|
});
|
|
@@ -8530,20 +8673,39 @@ function $1a7b2e0cdf65293a$var$actual_navigation_working_on_fake_data(_ref2) {
|
|
|
8530
8673
|
(0, $52FdA$solidjs.onCleanup)((0, $52FdA$depictaiutilishared.catchify)(() => el.removeEventListener("keyup", handler)));
|
|
8531
8674
|
});
|
|
8532
8675
|
}
|
|
8533
|
-
function $
|
|
8534
|
-
|
|
8535
|
-
|
|
8536
|
-
|
|
8537
|
-
|
|
8538
|
-
|
|
8539
|
-
|
|
8540
|
-
|
|
8541
|
-
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8676
|
+
function $4d9996ee79548b4b$export$af0124069c150252(_ref) {
|
|
8677
|
+
let {
|
|
8678
|
+
set_override_on_enter_fn_: set_override_on_enter_fn_,
|
|
8679
|
+
get_modal_search_results_: get_modal_search_results_,
|
|
8680
|
+
read_suggestion_signal_: read_suggestion_signal_,
|
|
8681
|
+
router_: router_,
|
|
8682
|
+
content_results_: content_results_
|
|
8683
|
+
} = _ref;
|
|
8684
|
+
const [get_autocomplete_wants_override_function, set_autocomplete_wants_override_function] = (0, $52FdA$solidjs.createSignal)(() => false);
|
|
8685
|
+
(0, $52FdA$solidjs.createComputed)(() => {
|
|
8686
|
+
var _get_modal_search_res, _search_results$displ;
|
|
8687
|
+
const suggestions = read_suggestion_signal_();
|
|
8688
|
+
const search_results = (_get_modal_search_res = get_modal_search_results_()) === null || _get_modal_search_res === void 0 ? void 0 : _get_modal_search_res();
|
|
8689
|
+
const content_results = content_results_();
|
|
8690
|
+
// If we only have one content result and nothing else, go there when pressing enter
|
|
8691
|
+
if (!suggestions.length && !(search_results !== null && search_results !== void 0 && (_search_results$displ = search_results.displays) !== null && _search_results$displ !== void 0 && _search_results$displ.length) && (content_results === null || content_results === void 0 ? void 0 : content_results.length) === 1) {
|
|
8692
|
+
const [{
|
|
8693
|
+
page_url: page_url
|
|
8694
|
+
}] = content_results;
|
|
8695
|
+
set_override_on_enter_fn_(e => {
|
|
8696
|
+
if (!(0, $1730e5b4d47679a3$export$1efe1013da60d0e4)(e, page_url))
|
|
8697
|
+
// Above fn will return true if it opened a new tab, and we won't make these checks anymore
|
|
8698
|
+
router_.navigate_.go_to_({
|
|
8699
|
+
new_url_: page_url,
|
|
8700
|
+
is_replace_: false
|
|
8701
|
+
});
|
|
8702
|
+
return true;
|
|
8703
|
+
});
|
|
8704
|
+
return;
|
|
8705
|
+
}
|
|
8706
|
+
set_override_on_enter_fn_(get_autocomplete_wants_override_function());
|
|
8707
|
+
});
|
|
8708
|
+
return new_fn => set_autocomplete_wants_override_function(() => new_fn);
|
|
8547
8709
|
}
|
|
8548
8710
|
const $ce079d50d380ee11$export$3cf9497e790da491 = "query";
|
|
8549
8711
|
function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
@@ -8564,12 +8726,15 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
8564
8726
|
i18n_: i18n_,
|
|
8565
8727
|
include_category_suggestions_: include_category_suggestions_,
|
|
8566
8728
|
submit_query_: submit_query_,
|
|
8567
|
-
router_: router_
|
|
8729
|
+
router_: router_,
|
|
8730
|
+
get_modal_search_results_: get_modal_search_results_,
|
|
8731
|
+
content_search_enabled_: content_search_enabled_
|
|
8568
8732
|
} = _ref;
|
|
8569
8733
|
const [searching_for_value, set_searching_for_value] = (0, $52FdA$solidjs.createSignal)();
|
|
8734
|
+
const [show_stale_content_results, set_show_stale_content_results] = (0, $52FdA$solidjs.createSignal)(false);
|
|
8570
8735
|
const [read_search_field_value] = search_field_value_;
|
|
8571
8736
|
const updating_blocked = (0, $52FdA$solidjs.createSignal)(false);
|
|
8572
|
-
const [
|
|
8737
|
+
const [read_suggestion_signal_, write_suggestion_signal] = (0, $52FdA$solidjs.createSignal)([]);
|
|
8573
8738
|
const filtered_previous_searches = (0, $52FdA$solidjs.createMemo)(() => [...unfiltered_previous_searches[0]()].reverse().filter(q => q !== get_search_query_()));
|
|
8574
8739
|
const deparallelized_fn = (0, $52FdA$depictaiutilishared.deparallelize_no_drop)(async request_obj => {
|
|
8575
8740
|
var _api_response$suggest;
|
|
@@ -8593,15 +8758,39 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
8593
8758
|
});
|
|
8594
8759
|
|
|
8595
8760
|
const show_previous_searches_component = (0, $52FdA$solidjs.createMemo)(() => !read_search_field_value() || (0, $52FdA$solidjs.untrack)(updating_blocked[0]) && !(0, $52FdA$solidjs.untrack)(searching_for_value));
|
|
8761
|
+
const get_content_results_ = (0, $52FdA$solidjs.createMemo)(prev => {
|
|
8762
|
+
var _get_modal_search_res, _get_modal_search_res2, _get_modal_search_res3;
|
|
8763
|
+
if (!content_search_enabled_()) return [];
|
|
8764
|
+
if (show_stale_content_results())
|
|
8765
|
+
// don't update content results when query suggestions don't update because otherwise they disappear when trying to keyboard navigate to them
|
|
8766
|
+
return prev;
|
|
8767
|
+
return (_get_modal_search_res = get_modal_search_results_()) === null || _get_modal_search_res === void 0 ? void 0 : (_get_modal_search_res2 = _get_modal_search_res()) === null || _get_modal_search_res2 === void 0 ? void 0 : (_get_modal_search_res3 = _get_modal_search_res2.content_search_links) === null || _get_modal_search_res3 === void 0 ? void 0 : _get_modal_search_res3.map(link => ({
|
|
8768
|
+
page_url: link.page_url,
|
|
8769
|
+
type: "content",
|
|
8770
|
+
title: link.title
|
|
8771
|
+
}));
|
|
8772
|
+
});
|
|
8773
|
+
// Ideally we'd propagate up the suggestion signal too and call this from SearchModal.tsx? Because it's not super related with autocomplete, but it's not a huge feature, and it's easier here so keeping it.
|
|
8774
|
+
// It's the functionality to open the content results page when you press enter, in the modal, when there's only one content result
|
|
8775
|
+
const manipulated_set_override_on_enter_fn_ = (0, $4d9996ee79548b4b$export$af0124069c150252)({
|
|
8776
|
+
set_override_on_enter_fn_: set_override_on_enter_fn_,
|
|
8777
|
+
get_modal_search_results_: get_modal_search_results_,
|
|
8778
|
+
read_suggestion_signal_: read_suggestion_signal_,
|
|
8779
|
+
router_: router_,
|
|
8780
|
+
content_results_: get_content_results_
|
|
8781
|
+
});
|
|
8596
8782
|
(0, $52FdA$solidjs.createComputed)(() => {
|
|
8597
8783
|
const field_value = read_search_field_value();
|
|
8598
|
-
if (
|
|
8784
|
+
if ((0, $52FdA$solidjs.untrack)(updating_blocked[0]))
|
|
8785
|
+
// not using updating_blocked instead of below signal since I presume they'd start updating too early then
|
|
8786
|
+
set_show_stale_content_results(true);else {
|
|
8599
8787
|
set_searching_for_value(field_value);
|
|
8600
8788
|
deparallelized_fn({
|
|
8601
8789
|
query: field_value,
|
|
8602
8790
|
tenant: tenant_(),
|
|
8603
8791
|
market: market_()
|
|
8604
8792
|
});
|
|
8793
|
+
set_show_stale_content_results(false);
|
|
8605
8794
|
}
|
|
8606
8795
|
});
|
|
8607
8796
|
(0, $52FdA$solidjs.createComputed)((0, $52FdA$solidjs.on)(search_field_value_[0], () => !updating_blocked[0]() && selected_index_[1](undefined), {
|
|
@@ -8613,7 +8802,7 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
8613
8802
|
search_field_value_: search_field_value_,
|
|
8614
8803
|
updating_blocked_: updating_blocked,
|
|
8615
8804
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
8616
|
-
set_override_on_enter_fn_:
|
|
8805
|
+
set_override_on_enter_fn_: manipulated_set_override_on_enter_fn_,
|
|
8617
8806
|
search_query_param_name_: search_query_url_param_name_,
|
|
8618
8807
|
url_transformer_: url_transformer_,
|
|
8619
8808
|
router_: router_
|
|
@@ -8653,11 +8842,12 @@ function $ce079d50d380ee11$export$2f2b9559550c7bbc(_ref) {
|
|
|
8653
8842
|
},
|
|
8654
8843
|
on_previous_searches_page_: show_previous_searches_component,
|
|
8655
8844
|
i18n_: i18n_,
|
|
8845
|
+
get_content_results_: get_content_results_,
|
|
8656
8846
|
url_transformer_: url_transformer_,
|
|
8657
8847
|
searching_for_value_: searching_for_value,
|
|
8658
8848
|
search_query_url_param_name_: search_query_url_param_name_,
|
|
8659
8849
|
selected_index_: selected_index_,
|
|
8660
|
-
suggestion_memo_:
|
|
8850
|
+
suggestion_memo_: read_suggestion_signal_,
|
|
8661
8851
|
currently_showing_suggestions_: currently_showing_suggestions_,
|
|
8662
8852
|
include_category_suggestions_: include_category_suggestions_,
|
|
8663
8853
|
router_: router_,
|
|
@@ -8769,7 +8959,8 @@ function $24419668d5fcfcd5$export$1c593cbd6f1e10bc(_ref) {
|
|
|
8769
8959
|
bottom_distance_under_modal_: bottom_distance_under_modal_,
|
|
8770
8960
|
selected_text_range_: selected_text_range_,
|
|
8771
8961
|
dont_sync_search_field_value_except_on_submit_ = false,
|
|
8772
|
-
router_: router_
|
|
8962
|
+
router_: router_,
|
|
8963
|
+
content_search_enabled_: content_search_enabled_
|
|
8773
8964
|
} = _ref;
|
|
8774
8965
|
let on_enter_in_search_field_function;
|
|
8775
8966
|
// 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.
|
|
@@ -8786,48 +8977,38 @@ function $24419668d5fcfcd5$export$1c593cbd6f1e10bc(_ref) {
|
|
|
8786
8977
|
};
|
|
8787
8978
|
const [input_field, set_input_field] = (0, $52FdA$solidjs.createSignal)();
|
|
8788
8979
|
const [get_search_field_value_] = search_field_value_;
|
|
8789
|
-
const [
|
|
8790
|
-
const [elements_inside_scrollable, set_elements_inside_scrollable] = (0, $52FdA$solidjs.createSignal)();
|
|
8980
|
+
const [get_modal_search_results, set_modal_search_results_] = (0, $52FdA$solidjs.createSignal)();
|
|
8791
8981
|
const close_on_escape_handler = (0, $52FdA$depictaiutilishared.catchify)(_ref2 => {
|
|
8792
8982
|
let {
|
|
8793
8983
|
key: key
|
|
8794
8984
|
} = _ref2;
|
|
8795
8985
|
if (key === "Escape") close_modal_();
|
|
8796
8986
|
});
|
|
8797
|
-
const [
|
|
8987
|
+
const [get_total_num_results_accessor, set_total_num_results_accessor_] = (0, $52FdA$solidjs.createSignal)();
|
|
8798
8988
|
const selected_index = (0, $52FdA$solidjs.createSignal)();
|
|
8799
8989
|
const currently_showing_suggestions_ = (0, $52FdA$solidjs.createSignal)([], {
|
|
8800
8990
|
equals: false
|
|
8801
8991
|
});
|
|
8992
|
+
const less_than_700_high = (0, $3e17e871e9d0911d$export$d9f36cf74e24d595)("(max-height:700px)");
|
|
8993
|
+
const DiscoverMoreSection = () => (() => {
|
|
8994
|
+
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($24419668d5fcfcd5$var$_tmpl$),
|
|
8995
|
+
_el$2 = _el$.firstChild;
|
|
8996
|
+
(0, $52FdA$solidjsweb.addEventListener)(_el$2, "click", (0, $52FdA$depictaiutilishared.catchify)(() => submit_query_()), true);
|
|
8997
|
+
(0, $52FdA$solidjsweb.insert)(_el$2, (() => {
|
|
8998
|
+
const _c$ = (0, $52FdA$solidjsweb.memo)(() => !!get_search_field_value_());
|
|
8999
|
+
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
9000
|
+
const _el$3 = (0, $52FdA$solidjsweb.getNextElement)($24419668d5fcfcd5$var$_tmpl$2);
|
|
9001
|
+
(0, $52FdA$solidjsweb.insert)(_el$3, () => get_total_num_results_accessor === null || get_total_num_results_accessor === void 0 ? void 0 : get_total_num_results_accessor());
|
|
9002
|
+
return _el$3;
|
|
9003
|
+
})()) : i18n_.modal_discover_more_();
|
|
9004
|
+
})());
|
|
9005
|
+
(0, $52FdA$solidjsweb.runHydrationEvents)();
|
|
9006
|
+
return _el$;
|
|
9007
|
+
})();
|
|
8802
9008
|
if (disable_scrolling_) (0, $8c2e68c6d458169b$export$fe334901e8bebd57)();
|
|
8803
9009
|
$24419668d5fcfcd5$var$close_modal_when_navigating_away(close_modal_, search_query_url_param_name_);
|
|
8804
9010
|
window.addEventListener("keydown", close_on_escape_handler);
|
|
8805
9011
|
(0, $52FdA$solidjs.onCleanup)((0, $52FdA$depictaiutilishared.catchify)(() => window.removeEventListener("keydown", close_on_escape_handler)));
|
|
8806
|
-
const owner = (0, $52FdA$solidjs.getOwner)();
|
|
8807
|
-
(0, $52FdA$solidjs.onCleanup)((0, $52FdA$depictaiutilishared.javascript_media_query)("(max-height:700px)", _ref3 => {
|
|
8808
|
-
let {
|
|
8809
|
-
matches: matches
|
|
8810
|
-
} = _ref3;
|
|
8811
|
-
return (0, $52FdA$solidjs.runWithOwner)(owner, () => {
|
|
8812
|
-
// the if below is reactive so we need an owner
|
|
8813
|
-
(matches ? set_elements_outside_scrollable : set_elements_inside_scrollable)("");
|
|
8814
|
-
(matches ? set_elements_inside_scrollable : set_elements_outside_scrollable)((() => {
|
|
8815
|
-
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($24419668d5fcfcd5$var$_tmpl$),
|
|
8816
|
-
_el$2 = _el$.firstChild;
|
|
8817
|
-
(0, $52FdA$solidjsweb.addEventListener)(_el$2, "click", (0, $52FdA$depictaiutilishared.catchify)(() => submit_query_()), true);
|
|
8818
|
-
(0, $52FdA$solidjsweb.insert)(_el$2, (() => {
|
|
8819
|
-
const _c$ = (0, $52FdA$solidjsweb.memo)(() => !!get_search_field_value_());
|
|
8820
|
-
return () => _c$() ? i18n_.modal_view_all_results_()((() => {
|
|
8821
|
-
const _el$3 = (0, $52FdA$solidjsweb.getNextElement)($24419668d5fcfcd5$var$_tmpl$2);
|
|
8822
|
-
(0, $52FdA$solidjsweb.insert)(_el$3, () => get_num_results_accessor === null || get_num_results_accessor === void 0 ? void 0 : get_num_results_accessor());
|
|
8823
|
-
return _el$3;
|
|
8824
|
-
})()) : i18n_.modal_discover_more_();
|
|
8825
|
-
})());
|
|
8826
|
-
(0, $52FdA$solidjsweb.runHydrationEvents)();
|
|
8827
|
-
return _el$;
|
|
8828
|
-
})());
|
|
8829
|
-
});
|
|
8830
|
-
}).remove);
|
|
8831
9012
|
if (closing_animation_) register_closing_animation_(closing_animation_);
|
|
8832
9013
|
(0, $4e44eb7e21ff022a$export$3340fdd8259bd4fd)({
|
|
8833
9014
|
get_search_field_value_: get_search_field_value_,
|
|
@@ -8882,10 +9063,10 @@ function $24419668d5fcfcd5$export$1c593cbd6f1e10bc(_ref) {
|
|
|
8882
9063
|
[_el$16, _co$5] = (0, $52FdA$solidjsweb.getNextMarker)(_el$15.nextSibling),
|
|
8883
9064
|
_el$17 = _el$5.nextSibling,
|
|
8884
9065
|
[_el$18, _co$6] = (0, $52FdA$solidjsweb.getNextMarker)(_el$17.nextSibling);
|
|
8885
|
-
(0, $52FdA$solidjsweb.addEventListener)(_el$4, "click", (0, $52FdA$depictaiutilishared.catchify)(
|
|
9066
|
+
(0, $52FdA$solidjsweb.addEventListener)(_el$4, "click", (0, $52FdA$depictaiutilishared.catchify)(_ref3 => {
|
|
8886
9067
|
let {
|
|
8887
9068
|
target: target
|
|
8888
|
-
} =
|
|
9069
|
+
} = _ref3;
|
|
8889
9070
|
if (target === modal_element) close_modal_();
|
|
8890
9071
|
}), true);
|
|
8891
9072
|
(0, $52FdA$solidjsweb.insert)(_el$5, search_field, _el$14, _co$4);
|
|
@@ -8913,7 +9094,9 @@ function $24419668d5fcfcd5$export$1c593cbd6f1e10bc(_ref) {
|
|
|
8913
9094
|
i18n_: i18n_,
|
|
8914
9095
|
include_category_suggestions_: enable_category_suggestions_ !== null && enable_category_suggestions_ !== void 0 ? enable_category_suggestions_ : true,
|
|
8915
9096
|
router_: router_,
|
|
8916
|
-
submit_query_: submit_query_
|
|
9097
|
+
submit_query_: submit_query_,
|
|
9098
|
+
get_modal_search_results_: get_modal_search_results,
|
|
9099
|
+
content_search_enabled_: content_search_enabled_
|
|
8917
9100
|
});
|
|
8918
9101
|
}
|
|
8919
9102
|
}), _el$8, _co$);
|
|
@@ -8927,14 +9110,30 @@ function $24419668d5fcfcd5$export$1c593cbd6f1e10bc(_ref) {
|
|
|
8927
9110
|
tenant_: tenant_,
|
|
8928
9111
|
i18n_: i18n_,
|
|
8929
9112
|
market_: market_,
|
|
8930
|
-
|
|
9113
|
+
set_total_num_results_accessor_: set_total_num_results_accessor_,
|
|
8931
9114
|
router_: router_,
|
|
9115
|
+
set_modal_search_results_: set_modal_search_results_,
|
|
9116
|
+
content_search_enabled_: content_search_enabled_,
|
|
8932
9117
|
...instant_results_options_
|
|
8933
9118
|
});
|
|
8934
9119
|
}
|
|
8935
9120
|
}), _el$10, _co$2);
|
|
8936
|
-
(0, $52FdA$solidjsweb.insert)(_el$6,
|
|
8937
|
-
|
|
9121
|
+
(0, $52FdA$solidjsweb.insert)(_el$6, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9122
|
+
get when() {
|
|
9123
|
+
return less_than_700_high();
|
|
9124
|
+
},
|
|
9125
|
+
get children() {
|
|
9126
|
+
return (0, $52FdA$solidjsweb.createComponent)(DiscoverMoreSection, {});
|
|
9127
|
+
}
|
|
9128
|
+
}), _el$12, _co$3);
|
|
9129
|
+
(0, $52FdA$solidjsweb.insert)(_el$5, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9130
|
+
get when() {
|
|
9131
|
+
return !less_than_700_high();
|
|
9132
|
+
},
|
|
9133
|
+
get children() {
|
|
9134
|
+
return (0, $52FdA$solidjsweb.createComponent)(DiscoverMoreSection, {});
|
|
9135
|
+
}
|
|
9136
|
+
}), _el$16, _co$5);
|
|
8938
9137
|
(0, $52FdA$solidjsweb.insert)(_el$4, (0, $52FdA$solidjsweb.createComponent)((0, $cc66bbf6e783bb58$export$f021bdedd3ec901a), {
|
|
8939
9138
|
styles: body_style
|
|
8940
9139
|
}), _el$18, _co$6);
|
|
@@ -9045,11 +9244,13 @@ function $9870a8a48ee126af$export$9dd50d35b9d94fdf(_ref) {
|
|
|
9045
9244
|
let {
|
|
9046
9245
|
get_search_query_: get_search_query_,
|
|
9047
9246
|
i18n_: i18n_,
|
|
9048
|
-
formatted_number_of_results_: formatted_number_of_results_
|
|
9247
|
+
formatted_number_of_results_: formatted_number_of_results_,
|
|
9248
|
+
number_of_results_: number_of_results_,
|
|
9249
|
+
type: type
|
|
9049
9250
|
} = _ref;
|
|
9050
9251
|
const contents = (0, $52FdA$solidjs.createMemo)((0, $52FdA$depictaiutilishared.catchify)(() => {
|
|
9051
9252
|
const q = get_search_query_();
|
|
9052
|
-
return i18n_.get_showing_results_for_()((() => {
|
|
9253
|
+
return i18n_[type === $9870a8a48ee126af$export$2452208c79fe93ea.content ? "get_showing_pages_for_" : "get_showing_results_for_"]()((() => {
|
|
9053
9254
|
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($9870a8a48ee126af$var$_tmpl$);
|
|
9054
9255
|
(0, $52FdA$solidjsweb.insert)(_el$, q);
|
|
9055
9256
|
return _el$;
|
|
@@ -9057,7 +9258,7 @@ function $9870a8a48ee126af$export$9dd50d35b9d94fdf(_ref) {
|
|
|
9057
9258
|
const _el$2 = (0, $52FdA$solidjsweb.getNextElement)($9870a8a48ee126af$var$_tmpl$);
|
|
9058
9259
|
(0, $52FdA$solidjsweb.insert)(_el$2, formatted_number_of_results_);
|
|
9059
9260
|
return _el$2;
|
|
9060
|
-
})());
|
|
9261
|
+
})(), !!q, number_of_results_());
|
|
9061
9262
|
}));
|
|
9062
9263
|
return (() => {
|
|
9063
9264
|
const _el$3 = (0, $52FdA$solidjsweb.getNextElement)($9870a8a48ee126af$var$_tmpl$2);
|
|
@@ -9065,6 +9266,11 @@ function $9870a8a48ee126af$export$9dd50d35b9d94fdf(_ref) {
|
|
|
9065
9266
|
return _el$3;
|
|
9066
9267
|
})();
|
|
9067
9268
|
}
|
|
9269
|
+
let $9870a8a48ee126af$export$2452208c79fe93ea;
|
|
9270
|
+
(function (ShowingResultsForType) {
|
|
9271
|
+
ShowingResultsForType[ShowingResultsForType["products"] = 0] = "products";
|
|
9272
|
+
ShowingResultsForType[ShowingResultsForType["content"] = 1] = "content";
|
|
9273
|
+
})($9870a8a48ee126af$export$2452208c79fe93ea || ($9870a8a48ee126af$export$2452208c79fe93ea = {}));
|
|
9068
9274
|
function $996102a9349df6d7$export$41b4894022a3580f() {
|
|
9069
9275
|
let {
|
|
9070
9276
|
style_props_ = (0, $52FdA$solidjs.createSignal)({})
|
|
@@ -9084,8 +9290,521 @@ function $996102a9349df6d7$export$41b4894022a3580f() {
|
|
|
9084
9290
|
})));
|
|
9085
9291
|
return style_props_;
|
|
9086
9292
|
}
|
|
9293
|
+
const $99472afa7112c427$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<span class="highlighted-part"></span>`, 2);
|
|
9294
|
+
const $99472afa7112c427$var$dont_cut_in_between_less_than_characters = 30;
|
|
9295
|
+
function $99472afa7112c427$export$e1a98a189fd2c0e7(_ref) {
|
|
9296
|
+
let {
|
|
9297
|
+
content_result_: content_result_,
|
|
9298
|
+
key_: key_,
|
|
9299
|
+
cut_when_possible_: cut_when_possible_
|
|
9300
|
+
} = _ref;
|
|
9301
|
+
const matched_tokens = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9302
|
+
var _content_result_$high, _content_result_$high2;
|
|
9303
|
+
return (_content_result_$high = content_result_().highlights) === null || _content_result_$high === void 0 ? void 0 : (_content_result_$high2 = _content_result_$high.find(highlight => highlight.field == key_)) === null || _content_result_$high2 === void 0 ? void 0 : _content_result_$high2.matched_tokens;
|
|
9304
|
+
});
|
|
9305
|
+
const full_value = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9306
|
+
var _content_result_$key_;
|
|
9307
|
+
return (_content_result_$key_ = content_result_()[key_]) === null || _content_result_$key_ === void 0 ? void 0 : _content_result_$key_.replaceAll("\n", " ");
|
|
9308
|
+
});
|
|
9309
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9310
|
+
get when() {
|
|
9311
|
+
var _matched_tokens;
|
|
9312
|
+
return (_matched_tokens = matched_tokens()) === null || _matched_tokens === void 0 ? void 0 : _matched_tokens.length;
|
|
9313
|
+
},
|
|
9314
|
+
get fallback() {
|
|
9315
|
+
return full_value();
|
|
9316
|
+
},
|
|
9317
|
+
get children() {
|
|
9318
|
+
return (() => {
|
|
9319
|
+
const segmented_cut_text = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9320
|
+
const segmented_text = $99472afa7112c427$var$segment_text(full_value(), matched_tokens());
|
|
9321
|
+
if (cut_when_possible_) $99472afa7112c427$var$cut_text(segmented_text);
|
|
9322
|
+
return segmented_text;
|
|
9323
|
+
});
|
|
9324
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Index), {
|
|
9325
|
+
get each() {
|
|
9326
|
+
return segmented_cut_text();
|
|
9327
|
+
},
|
|
9328
|
+
children: item => {
|
|
9329
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9330
|
+
get when() {
|
|
9331
|
+
return item().highlighted_;
|
|
9332
|
+
},
|
|
9333
|
+
get fallback() {
|
|
9334
|
+
return item().text_;
|
|
9335
|
+
},
|
|
9336
|
+
get children() {
|
|
9337
|
+
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($99472afa7112c427$var$_tmpl$);
|
|
9338
|
+
(0, $52FdA$solidjsweb.insert)(_el$, () => item().text_);
|
|
9339
|
+
return _el$;
|
|
9340
|
+
}
|
|
9341
|
+
});
|
|
9342
|
+
}
|
|
9343
|
+
});
|
|
9344
|
+
})();
|
|
9345
|
+
}
|
|
9346
|
+
});
|
|
9347
|
+
}
|
|
9348
|
+
function $99472afa7112c427$var$cut_text(segmented_text) {
|
|
9349
|
+
// cut away chunks of text that are not highlighted to give a google-like overview of the content
|
|
9350
|
+
const highlighted_segments = segmented_text === null || segmented_text === void 0 ? void 0 : segmented_text.filter(segment => segment.highlighted_);
|
|
9351
|
+
if (!segmented_text || !(highlighted_segments !== null && highlighted_segments !== void 0 && highlighted_segments.length)) return;
|
|
9352
|
+
// We have one or more highlighted segments
|
|
9353
|
+
if (highlighted_segments.length === 1) {
|
|
9354
|
+
// cut away from the left until the start of the highlighted sentence if just one sentence is highlighted
|
|
9355
|
+
$99472afa7112c427$var$cut_start(segmented_text.indexOf(highlighted_segments[0]), segmented_text);
|
|
9356
|
+
return;
|
|
9357
|
+
}
|
|
9358
|
+
// We have two or more highlighted segments, take the two biggest chunks and show them + a bit text around
|
|
9359
|
+
const sorted_highlighted_segments = [...highlighted_segments].sort((a, b) => b.text_.trim().length - a.text_.trim().length // trim to avoid unfair comparisons due to whitespace
|
|
9360
|
+
);
|
|
9361
|
+
|
|
9362
|
+
const [longest_segment, next_longest_segment] = sorted_highlighted_segments;
|
|
9363
|
+
// We need to cut before the first segment - possibly through other segments - and maybe between segments
|
|
9364
|
+
let [index_of_first_segment, index_of_second_segment] = [segmented_text.indexOf(longest_segment), segmented_text.indexOf(next_longest_segment)].sort((a, b) => a - b);
|
|
9365
|
+
$99472afa7112c427$var$cut_start(index_of_first_segment, segmented_text);
|
|
9366
|
+
// update indexes since we might have removed segments
|
|
9367
|
+
[index_of_first_segment, index_of_second_segment] = [segmented_text.indexOf(longest_segment), segmented_text.indexOf(next_longest_segment)].sort((a, b) => a - b);
|
|
9368
|
+
let number_of_characters_between_segments = 0;
|
|
9369
|
+
for (let i = index_of_first_segment + 1; i < index_of_second_segment; i++) {
|
|
9370
|
+
const segment = segmented_text[i];
|
|
9371
|
+
number_of_characters_between_segments += segment.text_.length;
|
|
9372
|
+
}
|
|
9373
|
+
if (number_of_characters_between_segments < $99472afa7112c427$var$dont_cut_in_between_less_than_characters)
|
|
9374
|
+
// don't cut if there are less than 30 characters between the two segments
|
|
9375
|
+
return;
|
|
9376
|
+
// We have more than 50 characters between the two segments, cut between them
|
|
9377
|
+
const [split_start_segment, split_start_character] = $99472afa7112c427$var$find_split_point(index_of_first_segment, index_of_second_segment, segmented_text);
|
|
9378
|
+
const [split_end_segment, split_end_character] = $99472afa7112c427$var$find_split_point(index_of_second_segment, index_of_first_segment, segmented_text);
|
|
9379
|
+
if (split_start_segment === undefined || split_end_segment === undefined ||
|
|
9380
|
+
// identical split point, or split end before split start, can't do anything
|
|
9381
|
+
split_start_segment == split_end_segment && split_start_character >= split_end_character || split_start_segment > split_end_segment) return;
|
|
9382
|
+
const dots_segment = {
|
|
9383
|
+
text_: " … ",
|
|
9384
|
+
highlighted_: false
|
|
9385
|
+
};
|
|
9386
|
+
const split_and_dotted_values = segmented_text.flatMap((segment, i) => {
|
|
9387
|
+
if (i < split_start_segment || i > split_end_segment) return segment;
|
|
9388
|
+
const text = segment.text_;
|
|
9389
|
+
if (i == split_end_segment && i == split_start_segment) return [{
|
|
9390
|
+
...segment,
|
|
9391
|
+
text_: text.slice(0, split_start_character).trimEnd()
|
|
9392
|
+
}, dots_segment, {
|
|
9393
|
+
...segment,
|
|
9394
|
+
text_: text.slice(split_end_character + 1, text.length).trimStart()
|
|
9395
|
+
}];else if (i == split_start_segment) {
|
|
9396
|
+
segment.text_ = text.slice(0, split_start_character).trimEnd(); // this would be split_start_character + 1, but we want to remove the last "dot" because . ... looks weird
|
|
9397
|
+
return segment;
|
|
9398
|
+
} else if (i == split_end_segment) return [dots_segment, {
|
|
9399
|
+
...segment,
|
|
9400
|
+
text_: text.slice(split_end_character + 1, text.length).trimStart()
|
|
9401
|
+
}];
|
|
9402
|
+
return []; // remove all segments inbetween
|
|
9403
|
+
});
|
|
9404
|
+
|
|
9405
|
+
segmented_text.splice(0, segmented_text.length, ...split_and_dotted_values); // Sorry…
|
|
9406
|
+
$99472afa7112c427$var$heal_holes(segmented_text);
|
|
9407
|
+
}
|
|
9408
|
+
function $99472afa7112c427$var$heal_holes(segmented_text) {
|
|
9409
|
+
// try to heal "holes" created in the segments so there are only alternating segments
|
|
9410
|
+
const segments_to_delete = new Set();
|
|
9411
|
+
for (let i = 0; i < segmented_text.length; i++) {
|
|
9412
|
+
var _previous_segment, _previous_segment2;
|
|
9413
|
+
const segment = segmented_text[i];
|
|
9414
|
+
let previous_segment;
|
|
9415
|
+
for (let j = i - 1; j >= 0; j--) {
|
|
9416
|
+
previous_segment = segmented_text[j];
|
|
9417
|
+
// Don't write to a segment that's marked for deletion or the contents we write to it will be deleted
|
|
9418
|
+
if (!segments_to_delete.has(previous_segment)) break;
|
|
9419
|
+
}
|
|
9420
|
+
if ((_previous_segment = previous_segment) !== null && _previous_segment !== void 0 && _previous_segment.highlighted_ && segment.highlighted_ || ((_previous_segment2 = previous_segment) === null || _previous_segment2 === void 0 ? void 0 : _previous_segment2.highlighted_) === false && segment.highlighted_ === false) {
|
|
9421
|
+
previous_segment.text_ += segment.text_; // IDK if this ever happens
|
|
9422
|
+
segments_to_delete.add(segment);
|
|
9423
|
+
}
|
|
9424
|
+
}
|
|
9425
|
+
for (const segment of segments_to_delete) {
|
|
9426
|
+
const index = segmented_text.indexOf(segment);
|
|
9427
|
+
segmented_text.splice(index, 1);
|
|
9428
|
+
}
|
|
9429
|
+
}
|
|
9430
|
+
function $99472afa7112c427$var$find_split_point(index_of_start_segment, index_of_end_segment, segmented_text) {
|
|
9431
|
+
let be_very_aggressive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
9432
|
+
const should_loop_backwards = index_of_start_segment > index_of_end_segment;
|
|
9433
|
+
const step = should_loop_backwards ? -1 : 1;
|
|
9434
|
+
const desperate_split_attempts = [":", ";", ","];
|
|
9435
|
+
while (desperate_split_attempts.length) {
|
|
9436
|
+
const split_point_between_words = [];
|
|
9437
|
+
// for the middle also try to split with a few more characters if the default ones don't work over a full run
|
|
9438
|
+
const desperate_split_attempt = desperate_split_attempts.pop();
|
|
9439
|
+
let is_first_character = true;
|
|
9440
|
+
for (let i = index_of_start_segment + step; should_loop_backwards ? i > index_of_end_segment : i < index_of_end_segment; i += step) {
|
|
9441
|
+
const segment = segmented_text[i];
|
|
9442
|
+
const text = segment.text_;
|
|
9443
|
+
for (let j = should_loop_backwards ? text.length - 1 : 0; should_loop_backwards ? j >= 0 : j < text.length; j += step) {
|
|
9444
|
+
const character = text[j];
|
|
9445
|
+
if (character == "." || character == "?" || character == "!" || character == desperate_split_attempt) return [i, j]; // segment index, character index
|
|
9446
|
+
if (is_first_character) is_first_character = false;else if (be_very_aggressive && character == " ") {
|
|
9447
|
+
split_point_between_words.push([i, j]);
|
|
9448
|
+
if (split_point_between_words.length > 3)
|
|
9449
|
+
// We can't find a split point, so we'll just split between words
|
|
9450
|
+
// This is because for UI reasons we only want to show 2 lines of text, so we need to be very aggressive with getting the second match soon
|
|
9451
|
+
return split_point_between_words[1];
|
|
9452
|
+
}
|
|
9453
|
+
}
|
|
9454
|
+
}
|
|
9455
|
+
}
|
|
9456
|
+
return [];
|
|
9457
|
+
}
|
|
9458
|
+
function $99472afa7112c427$var$cut_start(cut_left_of_index, segmented_text) {
|
|
9459
|
+
// Cut the start of the text to bring the first matching token
|
|
9460
|
+
let is_first_character = false;
|
|
9461
|
+
let words_encountered = 0;
|
|
9462
|
+
outmost_loop: for (let i = cut_left_of_index - 1; i >= 0; i--) {
|
|
9463
|
+
const segment = segmented_text[i];
|
|
9464
|
+
// We assume that two adjacent highlighted segments don't exist and have been merged if they were to have existed
|
|
9465
|
+
const text = segment.text_;
|
|
9466
|
+
for (let j = text.length - 1; j >= 0; j--) {
|
|
9467
|
+
const character = text[j];
|
|
9468
|
+
const is_space = character == " ";
|
|
9469
|
+
if (!is_first_character && is_space) words_encountered++;
|
|
9470
|
+
if (character == "." || character == "?" || character == "!" || character == "," || words_encountered > 8 && is_space) {
|
|
9471
|
+
// We have to be really aggressive at the start of sentences so stuff can be seen on mobile, hence comma
|
|
9472
|
+
segment.text_ = text.slice(j + 1).trimStart();
|
|
9473
|
+
segmented_text.splice(0, i);
|
|
9474
|
+
if (character === "," || is_space)
|
|
9475
|
+
// if we cut at a comma or psace, we add a … at the beginning
|
|
9476
|
+
segmented_text.unshift({
|
|
9477
|
+
text_: "… ",
|
|
9478
|
+
highlighted_: false
|
|
9479
|
+
});
|
|
9480
|
+
break outmost_loop;
|
|
9481
|
+
}
|
|
9482
|
+
if (is_first_character) is_first_character = false;
|
|
9483
|
+
}
|
|
9484
|
+
}
|
|
9485
|
+
$99472afa7112c427$var$heal_holes(segmented_text); // if we added a ... there could now be a sequence that's not alternating true/false
|
|
9486
|
+
}
|
|
9487
|
+
|
|
9488
|
+
function $99472afa7112c427$var$segment_text(text, matched_strings) {
|
|
9489
|
+
// segment text where the matched strings are highlighted sections
|
|
9490
|
+
const output = [];
|
|
9491
|
+
if (!text) return; // shouldn't happen but whatever
|
|
9492
|
+
for (let i = 0; i < text.length; i++) {
|
|
9493
|
+
const found_strings = [];
|
|
9494
|
+
if (!i || text[i - 1] == " ")
|
|
9495
|
+
// only match at the start of a word or string, it looks weird if i.e. "we" is highlighted in "activewear
|
|
9496
|
+
for (let j = 0; j < matched_strings.length; j++) {
|
|
9497
|
+
const matched_string = matched_strings[j];
|
|
9498
|
+
const part_in_text = text.slice(i, i + matched_string.length);
|
|
9499
|
+
if (matched_string.length < 2) continue; // don't match on single characters, i.e. "I", it looks weird
|
|
9500
|
+
if (part_in_text.toLowerCase() === matched_string.toLowerCase()) found_strings.push(part_in_text); // use the casing from the text, not from typesense, can look weird otherwise
|
|
9501
|
+
}
|
|
9502
|
+
|
|
9503
|
+
const last_index_in_output = output.length - 1;
|
|
9504
|
+
if (!found_strings.length) {
|
|
9505
|
+
var _output$last_index_in;
|
|
9506
|
+
const character = text[i];
|
|
9507
|
+
if (((_output$last_index_in = output[last_index_in_output]) === null || _output$last_index_in === void 0 ? void 0 : _output$last_index_in.highlighted_) === false || output.length && /\s/.test(character))
|
|
9508
|
+
// always push whitespace characters to the last segment, this is because typesense doesn't see them as part of the matched tokens but we want to be able to detect "phat" matched segments
|
|
9509
|
+
output[last_index_in_output].text_ += character;else output.push({
|
|
9510
|
+
highlighted_: false,
|
|
9511
|
+
text_: character
|
|
9512
|
+
});
|
|
9513
|
+
} else {
|
|
9514
|
+
var _output$last_index_in2;
|
|
9515
|
+
const longest_found_string = found_strings.reduce((a, b) => a.length > b.length ? a : b);
|
|
9516
|
+
if ((_output$last_index_in2 = output[last_index_in_output]) !== null && _output$last_index_in2 !== void 0 && _output$last_index_in2.highlighted_) output[last_index_in_output].text_ += longest_found_string;else output.push({
|
|
9517
|
+
highlighted_: true,
|
|
9518
|
+
text_: longest_found_string
|
|
9519
|
+
});
|
|
9520
|
+
i += longest_found_string.length - 1;
|
|
9521
|
+
}
|
|
9522
|
+
}
|
|
9523
|
+
return output;
|
|
9524
|
+
}
|
|
9525
|
+
const $f1fc9ea3e7632eba$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<a></a>`, 2),
|
|
9526
|
+
$f1fc9ea3e7632eba$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div></div>`, 2),
|
|
9527
|
+
$f1fc9ea3e7632eba$var$_tmpl$3 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="description line-clamp"></div>`, 2),
|
|
9528
|
+
$f1fc9ea3e7632eba$var$_tmpl$4 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="content-card"><div class="image"></div><div class="info"><!#><!/><!#><!/></div></div>`, 10);
|
|
9529
|
+
function $f1fc9ea3e7632eba$export$f631859cab12b342(_ref) {
|
|
9530
|
+
let {
|
|
9531
|
+
router_: router_,
|
|
9532
|
+
content_result_: content_result_
|
|
9533
|
+
} = _ref;
|
|
9534
|
+
const make_link_attributes = () => {
|
|
9535
|
+
const result = content_result_ === null || content_result_ === void 0 ? void 0 : content_result_();
|
|
9536
|
+
if (!result) return;
|
|
9537
|
+
return {
|
|
9538
|
+
href: result.page_url,
|
|
9539
|
+
onClick: (0, $52FdA$depictaiutilishared.catchify)(ev => router_.navigate_.go_to_({
|
|
9540
|
+
new_url_: result.page_url,
|
|
9541
|
+
is_replace_: false,
|
|
9542
|
+
event_: ev
|
|
9543
|
+
}))
|
|
9544
|
+
};
|
|
9545
|
+
};
|
|
9546
|
+
const LinkIfPossible = _ref2 => {
|
|
9547
|
+
let {
|
|
9548
|
+
children: children,
|
|
9549
|
+
...attributes
|
|
9550
|
+
} = _ref2;
|
|
9551
|
+
if (content_result_) return (() => {
|
|
9552
|
+
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($f1fc9ea3e7632eba$var$_tmpl$);
|
|
9553
|
+
(0, $52FdA$solidjsweb.spread)(_el$, attributes, false, true);
|
|
9554
|
+
(0, $52FdA$solidjsweb.insert)(_el$, children);
|
|
9555
|
+
(0, $52FdA$solidjsweb.runHydrationEvents)();
|
|
9556
|
+
return _el$;
|
|
9557
|
+
})();
|
|
9558
|
+
return (() => {
|
|
9559
|
+
const _el$2 = (0, $52FdA$solidjsweb.getNextElement)($f1fc9ea3e7632eba$var$_tmpl$2);
|
|
9560
|
+
(0, $52FdA$solidjsweb.spread)(_el$2, attributes, false, true);
|
|
9561
|
+
(0, $52FdA$solidjsweb.insert)(_el$2, children);
|
|
9562
|
+
(0, $52FdA$solidjsweb.runHydrationEvents)();
|
|
9563
|
+
return _el$2;
|
|
9564
|
+
})();
|
|
9565
|
+
};
|
|
9566
|
+
return (() => {
|
|
9567
|
+
const _el$3 = (0, $52FdA$solidjsweb.getNextElement)($f1fc9ea3e7632eba$var$_tmpl$4),
|
|
9568
|
+
_el$4 = _el$3.firstChild,
|
|
9569
|
+
_el$5 = _el$4.nextSibling,
|
|
9570
|
+
_el$7 = _el$5.firstChild,
|
|
9571
|
+
[_el$8, _co$] = (0, $52FdA$solidjsweb.getNextMarker)(_el$7.nextSibling),
|
|
9572
|
+
_el$9 = _el$8.nextSibling,
|
|
9573
|
+
[_el$10, _co$2] = (0, $52FdA$solidjsweb.getNextMarker)(_el$9.nextSibling);
|
|
9574
|
+
(0, $52FdA$solidjsweb.insert)(_el$4, (0, $52FdA$solidjsweb.createComponent)(LinkIfPossible, (0, $52FdA$solidjsweb.mergeProps)(make_link_attributes, {
|
|
9575
|
+
tabIndex: "-1",
|
|
9576
|
+
get children() {
|
|
9577
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $3cf7b4db1e203c93$export$605674723bcc715c), {
|
|
9578
|
+
width: "28",
|
|
9579
|
+
height: "28"
|
|
9580
|
+
});
|
|
9581
|
+
}
|
|
9582
|
+
})));
|
|
9583
|
+
(0, $52FdA$solidjsweb.insert)(_el$5, (0, $52FdA$solidjsweb.createComponent)(LinkIfPossible, (0, $52FdA$solidjsweb.mergeProps)({
|
|
9584
|
+
"class": "content-title line-clamp"
|
|
9585
|
+
}, make_link_attributes, {
|
|
9586
|
+
get title() {
|
|
9587
|
+
return content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().title;
|
|
9588
|
+
},
|
|
9589
|
+
get children() {
|
|
9590
|
+
return content_result_ ? (0, $52FdA$solidjsweb.createComponent)((0, $99472afa7112c427$export$e1a98a189fd2c0e7), {
|
|
9591
|
+
content_result_: content_result_,
|
|
9592
|
+
key_: "title",
|
|
9593
|
+
cut_when_possible_: false
|
|
9594
|
+
}) : (0, $52FdA$solidjsweb.createComponent)((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
|
|
9595
|
+
height: "1em",
|
|
9596
|
+
width: "20ch"
|
|
9597
|
+
});
|
|
9598
|
+
}
|
|
9599
|
+
})), _el$8, _co$);
|
|
9600
|
+
(0, $52FdA$solidjsweb.insert)(_el$5, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9601
|
+
get when() {
|
|
9602
|
+
return (content_result_ === null || content_result_ === void 0 ? void 0 : content_result_().description) || !content_result_;
|
|
9603
|
+
},
|
|
9604
|
+
get children() {
|
|
9605
|
+
const _el$6 = (0, $52FdA$solidjsweb.getNextElement)($f1fc9ea3e7632eba$var$_tmpl$3);
|
|
9606
|
+
(0, $52FdA$solidjsweb.insert)(_el$6, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9607
|
+
when: content_result_,
|
|
9608
|
+
get fallback() {
|
|
9609
|
+
return Array.from({
|
|
9610
|
+
length: 4
|
|
9611
|
+
}).map(() => (0, $52FdA$solidjsweb.createComponent)((0, $a7f7d416e6f61504$export$89c6019e4baa40b1), {
|
|
9612
|
+
height: "1em",
|
|
9613
|
+
width: "min(50ch, 100%)"
|
|
9614
|
+
}));
|
|
9615
|
+
},
|
|
9616
|
+
get children() {
|
|
9617
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $99472afa7112c427$export$e1a98a189fd2c0e7), {
|
|
9618
|
+
content_result_: content_result_,
|
|
9619
|
+
key_: "description",
|
|
9620
|
+
cut_when_possible_: true
|
|
9621
|
+
});
|
|
9622
|
+
}
|
|
9623
|
+
}));
|
|
9624
|
+
return _el$6;
|
|
9625
|
+
}
|
|
9626
|
+
}), _el$10, _co$2);
|
|
9627
|
+
return _el$3;
|
|
9628
|
+
})();
|
|
9629
|
+
}
|
|
9630
|
+
function $bf4a8d57aa8dd1c8$export$9ff751cd77687edc(_ref) {
|
|
9631
|
+
let {
|
|
9632
|
+
search_results_: search_results_,
|
|
9633
|
+
router_: router_
|
|
9634
|
+
} = _ref;
|
|
9635
|
+
const content_results = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9636
|
+
var _search_results_;
|
|
9637
|
+
return (_search_results_ = search_results_()) === null || _search_results_ === void 0 ? void 0 : _search_results_.content_search_links;
|
|
9638
|
+
});
|
|
9639
|
+
const content_results_by_page_url = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9640
|
+
const map = new Map();
|
|
9641
|
+
const results = content_results();
|
|
9642
|
+
if (!results) return map;
|
|
9643
|
+
for (let i = 0; i < results.length; i++) {
|
|
9644
|
+
const content_result = results[i];
|
|
9645
|
+
map.set(content_result.page_url, content_result);
|
|
9646
|
+
}
|
|
9647
|
+
return map;
|
|
9648
|
+
});
|
|
9649
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.For), {
|
|
9650
|
+
get each() {
|
|
9651
|
+
return [...content_results_by_page_url().keys()];
|
|
9652
|
+
},
|
|
9653
|
+
children: page_url => {
|
|
9654
|
+
const content_result = (0, $52FdA$solidjs.createMemo)(() => content_results_by_page_url().get(page_url));
|
|
9655
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $f1fc9ea3e7632eba$export$f631859cab12b342), {
|
|
9656
|
+
content_result_: content_result,
|
|
9657
|
+
router_: router_
|
|
9658
|
+
});
|
|
9659
|
+
}
|
|
9660
|
+
});
|
|
9661
|
+
}
|
|
9662
|
+
function $05f255c0a94b9ca1$export$4405d077f0a20494(_ref) {
|
|
9663
|
+
let {
|
|
9664
|
+
content_results_rows_: [get_history_state_content_results_rows],
|
|
9665
|
+
cols_at_size_: cols_at_size_
|
|
9666
|
+
} = _ref;
|
|
9667
|
+
const largest_column = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9668
|
+
const largest_in_cols_at_size = Math.max(...cols_at_size_().map(_ref2 => {
|
|
9669
|
+
let [cols] = _ref2;
|
|
9670
|
+
return cols;
|
|
9671
|
+
}));
|
|
9672
|
+
if (isNaN(largest_in_cols_at_size) || Math.abs(largest_in_cols_at_size) === Infinity) return 4; // fallback to something big so we always have the right amount of placeholders
|
|
9673
|
+
return largest_in_cols_at_size;
|
|
9674
|
+
});
|
|
9675
|
+
const num_placeholders = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9676
|
+
var _get_history_state_co;
|
|
9677
|
+
return ((_get_history_state_co = get_history_state_content_results_rows()) !== null && _get_history_state_co !== void 0 ? _get_history_state_co : (0, $eab939d0b95b75ee$export$70ceae36059a1036)) * largest_column();
|
|
9678
|
+
});
|
|
9679
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Index), {
|
|
9680
|
+
get each() {
|
|
9681
|
+
return Array.from({
|
|
9682
|
+
length: num_placeholders()
|
|
9683
|
+
});
|
|
9684
|
+
},
|
|
9685
|
+
children: () => (0, $52FdA$solidjsweb.createComponent)((0, $f1fc9ea3e7632eba$export$f631859cab12b342), {})
|
|
9686
|
+
});
|
|
9687
|
+
}
|
|
9688
|
+
const $eab939d0b95b75ee$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="content-results"><!#><!/><!#><!/></div>`, 6),
|
|
9689
|
+
$eab939d0b95b75ee$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<button class="view-more"></button>`, 2),
|
|
9690
|
+
$eab939d0b95b75ee$var$_tmpl$3 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<button class="view-less"></button>`, 2);
|
|
9691
|
+
const $eab939d0b95b75ee$export$70ceae36059a1036 = 1;
|
|
9692
|
+
function $eab939d0b95b75ee$export$6d0c9c22f6652669(_ref) {
|
|
9693
|
+
let {
|
|
9694
|
+
search_results_: search_results_,
|
|
9695
|
+
get_search_query_: get_search_query_,
|
|
9696
|
+
i18n_: i18n_,
|
|
9697
|
+
layout_options_: layout_options_,
|
|
9698
|
+
router_: router_,
|
|
9699
|
+
query_base_: query_base_,
|
|
9700
|
+
content_results_rows_: content_results_rows_
|
|
9701
|
+
} = _ref;
|
|
9702
|
+
const content_results = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9703
|
+
var _search_results_;
|
|
9704
|
+
return (_search_results_ = search_results_()) === null || _search_results_ === void 0 ? void 0 : _search_results_.content_search_links;
|
|
9705
|
+
});
|
|
9706
|
+
const num_results = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9707
|
+
var _content_results;
|
|
9708
|
+
return (_content_results = content_results()) === null || _content_results === void 0 ? void 0 : _content_results.length;
|
|
9709
|
+
});
|
|
9710
|
+
const is_loading_ = (0, $52FdA$solidjs.createMemo)(() => search_results_.loading || query_base_.loading); // See comment in PLPResults/index.tsx on why we need this
|
|
9711
|
+
const formatted_number_of_results_ = (0, $068bde7fa83ac02c$export$92f2da32c6e7e7ee)({
|
|
9712
|
+
number_: num_results,
|
|
9713
|
+
i18n_: i18n_
|
|
9714
|
+
});
|
|
9715
|
+
const [is_showing_placeholders, set_is_showing_placeholders] = (0, $52FdA$solidjs.createSignal)(false);
|
|
9716
|
+
const rows_object = $eab939d0b95b75ee$var$make_state_saved_rows(content_results_rows_, i18n_);
|
|
9717
|
+
return (() => {
|
|
9718
|
+
const _el$ = (0, $52FdA$solidjsweb.getNextElement)($eab939d0b95b75ee$var$_tmpl$),
|
|
9719
|
+
_el$2 = _el$.firstChild,
|
|
9720
|
+
[_el$3, _co$] = (0, $52FdA$solidjsweb.getNextMarker)(_el$2.nextSibling),
|
|
9721
|
+
_el$4 = _el$3.nextSibling,
|
|
9722
|
+
[_el$5, _co$2] = (0, $52FdA$solidjsweb.getNextMarker)(_el$4.nextSibling);
|
|
9723
|
+
(0, $52FdA$solidjsweb.insert)(_el$, (0, $52FdA$solidjsweb.createComponent)((0, $9870a8a48ee126af$export$9dd50d35b9d94fdf), {
|
|
9724
|
+
get_search_query_: get_search_query_,
|
|
9725
|
+
i18n_: i18n_,
|
|
9726
|
+
formatted_number_of_results_: formatted_number_of_results_,
|
|
9727
|
+
get type() {
|
|
9728
|
+
return (0, $9870a8a48ee126af$export$2452208c79fe93ea).content;
|
|
9729
|
+
},
|
|
9730
|
+
number_of_results_: num_results
|
|
9731
|
+
}), _el$3, _co$);
|
|
9732
|
+
(0, $52FdA$solidjsweb.insert)(_el$, (0, $52FdA$solidjsweb.createComponent)((0, $6c2c739b113a8ddf$export$d21e32dfedac04be), (0, $52FdA$solidjsweb.mergeProps)({
|
|
9733
|
+
layout: "grid",
|
|
9734
|
+
element_attributes: {
|
|
9735
|
+
class: "cards"
|
|
9736
|
+
}
|
|
9737
|
+
}, layout_options_, {
|
|
9738
|
+
rows: rows_object,
|
|
9739
|
+
get children() {
|
|
9740
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Suspense), {
|
|
9741
|
+
get fallback() {
|
|
9742
|
+
return (() => {
|
|
9743
|
+
set_is_showing_placeholders(true);
|
|
9744
|
+
(0, $52FdA$solidjs.onCleanup)(() => set_is_showing_placeholders(false));
|
|
9745
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $05f255c0a94b9ca1$export$4405d077f0a20494), {
|
|
9746
|
+
content_results_rows_: content_results_rows_,
|
|
9747
|
+
get cols_at_size_() {
|
|
9748
|
+
return (0, $52FdA$solidjs.createMemo)(() => layout_options_().cols_at_size);
|
|
9749
|
+
}
|
|
9750
|
+
});
|
|
9751
|
+
})();
|
|
9752
|
+
},
|
|
9753
|
+
get children() {
|
|
9754
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $bf4a8d57aa8dd1c8$export$9ff751cd77687edc), {
|
|
9755
|
+
router_: router_,
|
|
9756
|
+
search_results_: search_results_
|
|
9757
|
+
});
|
|
9758
|
+
}
|
|
9759
|
+
});
|
|
9760
|
+
}
|
|
9761
|
+
})), _el$5, _co$2);
|
|
9762
|
+
(0, $52FdA$solidjsweb.effect)(_p$ => {
|
|
9763
|
+
var _content_results2;
|
|
9764
|
+
const _v$ = !!is_showing_placeholders(),
|
|
9765
|
+
_v$2 = is_loading_() || ((_content_results2 = content_results()) === null || _content_results2 === void 0 ? void 0 : _content_results2.length) > 0 ? "" : "none";
|
|
9766
|
+
_v$ !== _p$._v$ && _el$.classList.toggle("loading", _p$._v$ = _v$);
|
|
9767
|
+
_v$2 !== _p$._v$2 && _el$.style.setProperty("display", _p$._v$2 = _v$2);
|
|
9768
|
+
return _p$;
|
|
9769
|
+
}, {
|
|
9770
|
+
_v$: undefined,
|
|
9771
|
+
_v$2: undefined
|
|
9772
|
+
});
|
|
9773
|
+
return _el$;
|
|
9774
|
+
})();
|
|
9775
|
+
}
|
|
9776
|
+
function $eab939d0b95b75ee$var$make_state_saved_rows(_ref2, i18n_) {
|
|
9777
|
+
let [get_showing_content_results_rows, set_showing_content_results_rows] = _ref2;
|
|
9778
|
+
const currently_visible = (0, $52FdA$solidjs.createSignal)((0, $52FdA$solidjs.untrack)(get_showing_content_results_rows));
|
|
9779
|
+
const [get_currently_visible, set_currently_visible] = currently_visible;
|
|
9780
|
+
const rows = {
|
|
9781
|
+
currently_visible: currently_visible,
|
|
9782
|
+
start_rows: $eab939d0b95b75ee$export$70ceae36059a1036,
|
|
9783
|
+
button: (() => {
|
|
9784
|
+
const _el$6 = (0, $52FdA$solidjsweb.getNextElement)($eab939d0b95b75ee$var$_tmpl$2);
|
|
9785
|
+
(0, $52FdA$solidjsweb.insert)(_el$6, () => i18n_.view_more_());
|
|
9786
|
+
return _el$6;
|
|
9787
|
+
})(),
|
|
9788
|
+
view_less_button: (() => {
|
|
9789
|
+
const _el$7 = (0, $52FdA$solidjsweb.getNextElement)($eab939d0b95b75ee$var$_tmpl$3);
|
|
9790
|
+
(0, $52FdA$solidjsweb.insert)(_el$7, () => i18n_.view_less_());
|
|
9791
|
+
return _el$7;
|
|
9792
|
+
})(),
|
|
9793
|
+
rows_per_click: 3
|
|
9794
|
+
};
|
|
9795
|
+
(0, $52FdA$solidjs.createComputed)((0, $52FdA$solidjs.on)(get_currently_visible, new_visible => set_showing_content_results_rows(new_visible), {
|
|
9796
|
+
defer: true
|
|
9797
|
+
}));
|
|
9798
|
+
(0, $52FdA$solidjs.createComputed)((0, $52FdA$solidjs.on)(get_showing_content_results_rows, function () {
|
|
9799
|
+
let new_rows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : $eab939d0b95b75ee$export$70ceae36059a1036;
|
|
9800
|
+
return set_currently_visible(new_rows);
|
|
9801
|
+
}, {
|
|
9802
|
+
defer: true
|
|
9803
|
+
}));
|
|
9804
|
+
return rows;
|
|
9805
|
+
}
|
|
9087
9806
|
const $739c927cbecd26b0$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="filter-results-for-one-row"><!#><!/><!#><!/></div>`, 6),
|
|
9088
|
-
$739c927cbecd26b0$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="depict plp search"><div class="listing-page"
|
|
9807
|
+
$739c927cbecd26b0$var$_tmpl$2 = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="depict plp search"><div class="listing-page"><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/><!#><!/></div><!#><!/><!#><!/></div>`, 22);
|
|
9089
9808
|
function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
9090
9809
|
let {
|
|
9091
9810
|
depict_api_: depict_api_,
|
|
@@ -9115,7 +9834,11 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9115
9834
|
recommendations_layout_options_: recommendations_layout_options_,
|
|
9116
9835
|
scroll_restoration_data_: scroll_restoration_data_,
|
|
9117
9836
|
product_card_template_: product_card_template_,
|
|
9118
|
-
modal_body_style_ref_: modal_body_style_ref_
|
|
9837
|
+
modal_body_style_ref_: modal_body_style_ref_,
|
|
9838
|
+
router_: router_,
|
|
9839
|
+
content_results_rows_: content_results_rows_,
|
|
9840
|
+
content_layout_options_: content_layout_options_,
|
|
9841
|
+
content_search_enabled_: content_search_enabled_
|
|
9119
9842
|
} = _ref;
|
|
9120
9843
|
const [get_sorting] = current_sorting_;
|
|
9121
9844
|
const all_products_loaded_ = (0, $52FdA$solidjs.createSignal)(false);
|
|
@@ -9182,16 +9905,29 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9182
9905
|
const SafeSearchField = (0, $52FdA$depictaiutilishared.catchify)((0, $29e5dbeb69da7a36$export$b94867ecbd698f21));
|
|
9183
9906
|
const [sort_or_filter_open_, set_sort_or_filter_open_] = (0, $52FdA$solidjs.createSignal)(false);
|
|
9184
9907
|
const [desktop_filter_elements_, set_desktop_filter_elements] = (0, $52FdA$solidjs.createSignal)();
|
|
9908
|
+
const n_hits = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9909
|
+
var _search_results_3;
|
|
9910
|
+
return (_search_results_3 = search_results_()) === null || _search_results_3 === void 0 ? void 0 : _search_results_3.n_hits;
|
|
9911
|
+
});
|
|
9185
9912
|
const formatted_number_of_results_ = (0, $068bde7fa83ac02c$export$92f2da32c6e7e7ee)({
|
|
9186
|
-
|
|
9913
|
+
number_: n_hits,
|
|
9187
9914
|
i18n_: i18n_
|
|
9188
9915
|
});
|
|
9189
9916
|
const [sort_and_filter_element_, set_sort_and_filter_element_] = (0, $52FdA$solidjs.createSignal)();
|
|
9190
|
-
const
|
|
9917
|
+
const no_results_text_ = (0, $52FdA$solidjs.createMemo)(() => {
|
|
9918
|
+
var _search_results_4, _search_results_4$con;
|
|
9919
|
+
return ((_search_results_4 = search_results_()) !== null && _search_results_4 !== void 0 && (_search_results_4$con = _search_results_4.content_search_links) !== null && _search_results_4$con !== void 0 && _search_results_4$con.length ? i18n_.no_products_ : i18n_.no_results_text_)();
|
|
9920
|
+
});
|
|
9921
|
+
const results_for = (0, $52FdA$solidjsweb.createComponent)((0, $9870a8a48ee126af$export$9dd50d35b9d94fdf), (0, $52FdA$solidjsweb.mergeProps)({
|
|
9922
|
+
get type() {
|
|
9923
|
+
return (0, $9870a8a48ee126af$export$2452208c79fe93ea).products;
|
|
9924
|
+
},
|
|
9925
|
+
number_of_results_: n_hits
|
|
9926
|
+
}, {
|
|
9191
9927
|
get_search_query_: get_search_query_,
|
|
9192
9928
|
i18n_: i18n_,
|
|
9193
9929
|
formatted_number_of_results_: formatted_number_of_results_
|
|
9194
|
-
});
|
|
9930
|
+
}));
|
|
9195
9931
|
const filters_opener = (0, $f70cc6dfcadf0fd5$export$d7841e452f2e59a8)({
|
|
9196
9932
|
set_sort_or_filter_open_: set_sort_or_filter_open_,
|
|
9197
9933
|
set_extra_els_in_results_container_: set_desktop_filter_elements,
|
|
@@ -9315,10 +10051,12 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9315
10051
|
[_el$17, _co$7] = (0, $52FdA$solidjsweb.getNextMarker)(_el$16.nextSibling),
|
|
9316
10052
|
_el$18 = _el$17.nextSibling,
|
|
9317
10053
|
[_el$19, _co$8] = (0, $52FdA$solidjsweb.getNextMarker)(_el$18.nextSibling),
|
|
9318
|
-
_el$20 = _el$
|
|
10054
|
+
_el$20 = _el$19.nextSibling,
|
|
9319
10055
|
[_el$21, _co$9] = (0, $52FdA$solidjsweb.getNextMarker)(_el$20.nextSibling),
|
|
9320
|
-
_el$22 = _el$
|
|
9321
|
-
[_el$23, _co$10] = (0, $52FdA$solidjsweb.getNextMarker)(_el$22.nextSibling)
|
|
10056
|
+
_el$22 = _el$7.nextSibling,
|
|
10057
|
+
[_el$23, _co$10] = (0, $52FdA$solidjsweb.getNextMarker)(_el$22.nextSibling),
|
|
10058
|
+
_el$24 = _el$23.nextSibling,
|
|
10059
|
+
[_el$25, _co$11] = (0, $52FdA$solidjsweb.getNextMarker)(_el$24.nextSibling);
|
|
9322
10060
|
(0, $52FdA$solidjsweb.insert)(_el$7, get_search_field_elements, _el$9, _co$3);
|
|
9323
10061
|
(0, $52FdA$solidjsweb.insert)(_el$7, make_category_suggestion_card_ ? (0, $52FdA$solidjsweb.createComponent)((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
9324
10062
|
severity_: "error",
|
|
@@ -9330,7 +10068,29 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9330
10068
|
});
|
|
9331
10069
|
}
|
|
9332
10070
|
}) : null, _el$11, _co$4);
|
|
9333
|
-
(0, $52FdA$solidjsweb.insert)(_el$7, (
|
|
10071
|
+
(0, $52FdA$solidjsweb.insert)(_el$7, (0, $52FdA$solidjsweb.createComponent)((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
10072
|
+
severity_: "error",
|
|
10073
|
+
message_: "ContentResults failed",
|
|
10074
|
+
get children() {
|
|
10075
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
10076
|
+
get when() {
|
|
10077
|
+
return content_search_enabled_();
|
|
10078
|
+
},
|
|
10079
|
+
get children() {
|
|
10080
|
+
return (0, $52FdA$solidjsweb.createComponent)((0, $eab939d0b95b75ee$export$6d0c9c22f6652669), {
|
|
10081
|
+
content_results_rows_: content_results_rows_,
|
|
10082
|
+
search_results_: search_results_,
|
|
10083
|
+
i18n_: i18n_,
|
|
10084
|
+
get_search_query_: get_search_query_,
|
|
10085
|
+
layout_options_: content_layout_options_,
|
|
10086
|
+
router_: router_,
|
|
10087
|
+
query_base_: search_query_base_
|
|
10088
|
+
});
|
|
10089
|
+
}
|
|
10090
|
+
});
|
|
10091
|
+
}
|
|
10092
|
+
}), _el$13, _co$5);
|
|
10093
|
+
(0, $52FdA$solidjsweb.insert)(_el$7, () => results_filters[0](), _el$15, _co$6);
|
|
9334
10094
|
(0, $52FdA$solidjsweb.insert)(_el$7, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9335
10095
|
get when() {
|
|
9336
10096
|
var _selected_filters_$;
|
|
@@ -9354,7 +10114,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9354
10114
|
}
|
|
9355
10115
|
});
|
|
9356
10116
|
}
|
|
9357
|
-
}), _el$
|
|
10117
|
+
}), _el$17, _co$7);
|
|
9358
10118
|
(0, $52FdA$solidjsweb.insert)(_el$7, (0, $52FdA$solidjsweb.createComponent)((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
9359
10119
|
severity_: "error",
|
|
9360
10120
|
message_: "Search results failed",
|
|
@@ -9377,11 +10137,14 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9377
10137
|
selected_filters_: selected_filters_,
|
|
9378
10138
|
expanded_hierarchical_filters_: expanded_hierarchical_filters_,
|
|
9379
10139
|
local_filter_cache_: local_filter_cache_,
|
|
9380
|
-
i18n_:
|
|
10140
|
+
i18n_: {
|
|
10141
|
+
...i18n_,
|
|
10142
|
+
no_results_text_: no_results_text_
|
|
10143
|
+
}
|
|
9381
10144
|
}
|
|
9382
10145
|
});
|
|
9383
10146
|
}
|
|
9384
|
-
}), _el$
|
|
10147
|
+
}), _el$19, _co$8);
|
|
9385
10148
|
(0, $52FdA$solidjsweb.insert)(_el$7, (0, $52FdA$solidjsweb.createComponent)((0, $52FdA$solidjs.Show), {
|
|
9386
10149
|
get when() {
|
|
9387
10150
|
return get_all_products_loaded() && !disable_search_recommendations_;
|
|
@@ -9409,7 +10172,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9409
10172
|
}
|
|
9410
10173
|
});
|
|
9411
10174
|
}
|
|
9412
|
-
}), _el$
|
|
10175
|
+
}), _el$21, _co$9);
|
|
9413
10176
|
(0, $52FdA$solidjsweb.insert)(_el$6, (0, $52FdA$solidjsweb.createComponent)((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
9414
10177
|
message_: "Scroll status failed",
|
|
9415
10178
|
severity_: "error",
|
|
@@ -9420,12 +10183,12 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9420
10183
|
formatted_number_of_results_: formatted_number_of_results_,
|
|
9421
10184
|
i18n_: i18n_,
|
|
9422
10185
|
number_of_results_: (0, $52FdA$solidjs.createMemo)(() => {
|
|
9423
|
-
var
|
|
9424
|
-
return (
|
|
10186
|
+
var _search_results_5;
|
|
10187
|
+
return (_search_results_5 = search_results_()) === null || _search_results_5 === void 0 ? void 0 : _search_results_5.n_hits;
|
|
9425
10188
|
})
|
|
9426
10189
|
});
|
|
9427
10190
|
}
|
|
9428
|
-
}), _el$
|
|
10191
|
+
}), _el$23, _co$10);
|
|
9429
10192
|
(0, $52FdA$solidjsweb.insert)(_el$6, (0, $52FdA$solidjsweb.createComponent)((0, $1b3cf201cdd38687$export$b69d0d92862de18b), {
|
|
9430
10193
|
message_: "Floating buttons failed",
|
|
9431
10194
|
severity_: "error",
|
|
@@ -9438,7 +10201,7 @@ function $739c927cbecd26b0$export$a54ec244c8863715(_ref) {
|
|
|
9438
10201
|
i18n_: i18n_
|
|
9439
10202
|
});
|
|
9440
10203
|
}
|
|
9441
|
-
}), _el$
|
|
10204
|
+
}), _el$25, _co$11);
|
|
9442
10205
|
(0, $52FdA$solidjsweb.effect)(() => (0, $52FdA$solidjsweb.setAttribute)(_el$6, "id", (0, $c95c6dd9e93acd82$export$44dad306455dddf).SEARCH_PAGE));
|
|
9443
10206
|
return _el$6;
|
|
9444
10207
|
})()];
|
|
@@ -9463,6 +10226,38 @@ function $98bd00c15a2e3159$export$828dcdd425fd3231(aligner) {
|
|
|
9463
10226
|
cleanup: cleanup
|
|
9464
10227
|
};
|
|
9465
10228
|
}
|
|
10229
|
+
|
|
10230
|
+
/**
|
|
10231
|
+
* Content results ContentCard look stupid on mobile if there are two columns of them, so we limit the number of columns to 1 if the screen is too small
|
|
10232
|
+
*/
|
|
10233
|
+
function $b1ea8d47bcf03111$export$ff7109b9b2b206ba(sdk_cols_at_size) {
|
|
10234
|
+
let min_width_for_more_than_one_column = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 500;
|
|
10235
|
+
if (!sdk_cols_at_size.length) return sdk_cols_at_size;
|
|
10236
|
+
const sorted_sizes = sdk_cols_at_size.map(_ref => {
|
|
10237
|
+
let [cols, max_width] = _ref;
|
|
10238
|
+
return [cols, max_width !== null && max_width !== void 0 ? max_width : Infinity];
|
|
10239
|
+
}).sort((_ref2, _ref3) => {
|
|
10240
|
+
let [, a] = _ref2;
|
|
10241
|
+
let [, b] = _ref3;
|
|
10242
|
+
return a - b;
|
|
10243
|
+
});
|
|
10244
|
+
const [[, smallest_max_width]] = sorted_sizes;
|
|
10245
|
+
if (smallest_max_width > min_width_for_more_than_one_column)
|
|
10246
|
+
// If everything above min_width_for_more_than_one_column, we can just add a 1 column at the beginning
|
|
10247
|
+
return [[1, min_width_for_more_than_one_column], ...sdk_cols_at_size];
|
|
10248
|
+
const to_delete = [];
|
|
10249
|
+
for (let i = 0; i < sorted_sizes.length; i++) {
|
|
10250
|
+
const [, max_width] = sorted_sizes[i];
|
|
10251
|
+
if (max_width > min_width_for_more_than_one_column) continue;
|
|
10252
|
+
to_delete.push(i);
|
|
10253
|
+
}
|
|
10254
|
+
while (to_delete.length) sorted_sizes.splice(to_delete.pop(), 1);
|
|
10255
|
+
sorted_sizes.unshift([1, min_width_for_more_than_one_column]);
|
|
10256
|
+
return sorted_sizes.map(_ref4 => {
|
|
10257
|
+
let [cols, max_width] = _ref4;
|
|
10258
|
+
return max_width == Infinity ? [cols] : [cols, max_width];
|
|
10259
|
+
});
|
|
10260
|
+
}
|
|
9466
10261
|
const $ddd39c5f36f49703$var$_tmpl$ = /*#__PURE__*/(0, $52FdA$solidjsweb.template)(`<div class="depict plp search"></div>`, 2);
|
|
9467
10262
|
function $ddd39c5f36f49703$var$_classPrivateFieldInitSpec(obj, privateMap, value) {
|
|
9468
10263
|
$ddd39c5f36f49703$var$_checkPrivateRedeclaration(obj, privateMap);
|
|
@@ -9494,6 +10289,7 @@ function $ddd39c5f36f49703$var$_classApplyDescriptorGet(receiver, descriptor) {
|
|
|
9494
10289
|
* Type for the private properties that are shared between the different exported search SDK wrapper functions. SDK users are not allowed to change/access these, they're an internal implementation detail.
|
|
9495
10290
|
*/
|
|
9496
10291
|
const $ddd39c5f36f49703$var$privately_shared_properties = /*@__PURE__*/new WeakMap();
|
|
10292
|
+
const $ddd39c5f36f49703$var$content_search_default = false;
|
|
9497
10293
|
const $ddd39c5f36f49703$var$min_products_to_fetch_ = 20;
|
|
9498
10294
|
const $ddd39c5f36f49703$export$bde3eb976dfded9 = depict_search => {
|
|
9499
10295
|
var _privately_shared_pro;
|
|
@@ -9503,6 +10299,7 @@ var $ddd39c5f36f49703$var$_locale_signal = /*#__PURE__*/new WeakMap();
|
|
|
9503
10299
|
var $ddd39c5f36f49703$var$_merchant_signal = /*#__PURE__*/new WeakMap();
|
|
9504
10300
|
var $ddd39c5f36f49703$var$_market_signal = /*#__PURE__*/new WeakMap();
|
|
9505
10301
|
var $ddd39c5f36f49703$var$_modal_open_signal = /*#__PURE__*/new WeakMap();
|
|
10302
|
+
var $ddd39c5f36f49703$var$_content_search_signal = /*#__PURE__*/new WeakMap();
|
|
9506
10303
|
var $ddd39c5f36f49703$var$_router = /*#__PURE__*/new WeakMap();
|
|
9507
10304
|
class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
9508
10305
|
constructor(_ref) {
|
|
@@ -9514,9 +10311,10 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
9514
10311
|
on_navigation: on_navigation,
|
|
9515
10312
|
enable_category_suggestions = true,
|
|
9516
10313
|
page_url_creator: page_url_creator,
|
|
10314
|
+
display_transformers: display_transformers,
|
|
10315
|
+
api: api,
|
|
9517
10316
|
// Stuff needed for non-standard customer deployments that we shouldn't actually expose
|
|
9518
10317
|
disable_scrolling_during_modal = true,
|
|
9519
|
-
api: api,
|
|
9520
10318
|
bottom_distance_under_modal: bottom_distance_under_modal,
|
|
9521
10319
|
render_instant_card: render_instant_card,
|
|
9522
10320
|
...props_on_class
|
|
@@ -9537,6 +10335,10 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
9537
10335
|
writable: true,
|
|
9538
10336
|
value: (0, $52FdA$solidjs.createSignal)(false)
|
|
9539
10337
|
});
|
|
10338
|
+
$ddd39c5f36f49703$var$_classPrivateFieldInitSpec(this, $ddd39c5f36f49703$var$_content_search_signal, {
|
|
10339
|
+
writable: true,
|
|
10340
|
+
value: (0, $52FdA$solidjs.createSignal)()
|
|
10341
|
+
});
|
|
9540
10342
|
$ddd39c5f36f49703$var$_classPrivateFieldInitSpec(this, $ddd39c5f36f49703$var$_router, {
|
|
9541
10343
|
writable: true,
|
|
9542
10344
|
value: new (0, $73014ff36186a4dd$export$7e1297a3a19f10d8)("hard_navigation")
|
|
@@ -9572,6 +10374,7 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
9572
10374
|
local_filter_cache: [],
|
|
9573
10375
|
expanded_hierarchical_filters: [],
|
|
9574
10376
|
showing_recommendation_rows: (0, $c77adcdf5346b187$export$1c8c715550dc689d),
|
|
10377
|
+
content_results_rows: (0, $eab939d0b95b75ee$export$70ceae36059a1036),
|
|
9575
10378
|
scroll_restoration_data: []
|
|
9576
10379
|
};
|
|
9577
10380
|
},
|
|
@@ -9583,12 +10386,18 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
9583
10386
|
const get_search_query_ = (0, $52FdA$solidjs.createMemo)(previous_value => {
|
|
9584
10387
|
if (get_search_query_updating_blocked()) return previous_value;else return raw_search_query_accessor();
|
|
9585
10388
|
});
|
|
10389
|
+
// @ts-ignore
|
|
9586
10390
|
const depict_api_ = api !== null && api !== void 0 ? api : new (0, $e270e9f953fcbc58$export$e015ed2f2950f2e3)({
|
|
9587
|
-
page_url_creator: page_url_creator
|
|
10391
|
+
page_url_creator: page_url_creator,
|
|
10392
|
+
display_transformers: display_transformers
|
|
9588
10393
|
});
|
|
9589
10394
|
const previous_searches = (0, $cfeb65948dbdcaab$export$84bba84a7b837187)(get_search_query_);
|
|
9590
10395
|
const [, set_search_showing_recommendation_rows] = state_.showing_recommendation_rows;
|
|
9591
|
-
const
|
|
10396
|
+
const [, set_search_content_results_rows] = state_.content_results_rows;
|
|
10397
|
+
const after_submit_ = () => {
|
|
10398
|
+
set_search_showing_recommendation_rows((0, $c77adcdf5346b187$export$1c8c715550dc689d));
|
|
10399
|
+
set_search_content_results_rows((0, $eab939d0b95b75ee$export$70ceae36059a1036));
|
|
10400
|
+
}; // do this every time after we have submitted a new query - otherwise there might already be a saved number of rows in the state
|
|
9592
10401
|
const on_submit_with_unchanged_value_ = () => this.modal_open = false;
|
|
9593
10402
|
const [get_search_field_value_, set_search_field_value_] = state_.field_value;
|
|
9594
10403
|
const configured_submit_query_ = new_query => (0, $7f680455a2aa1079$export$e16630ecb9644a1c)({
|
|
@@ -9646,6 +10455,10 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
9646
10455
|
submit_query_: configured_submit_query_,
|
|
9647
10456
|
url_transformer_: url_transformer,
|
|
9648
10457
|
router_: (0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet))(this, $ddd39c5f36f49703$var$_router),
|
|
10458
|
+
content_search_enabled_: () => {
|
|
10459
|
+
var _classPrivateFieldGet2;
|
|
10460
|
+
return (_classPrivateFieldGet2 = (0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet))(this, $ddd39c5f36f49703$var$_content_search_signal)[0]()) !== null && _classPrivateFieldGet2 !== void 0 ? _classPrivateFieldGet2 : $ddd39c5f36f49703$var$content_search_default;
|
|
10461
|
+
},
|
|
9649
10462
|
instant_results_options_: {
|
|
9650
10463
|
min_products_to_fetch_: $ddd39c5f36f49703$var$min_products_to_fetch_,
|
|
9651
10464
|
render_instant_card_: render_instant_card,
|
|
@@ -9714,6 +10527,12 @@ class $ddd39c5f36f49703$export$ac6237957a15b3f0 {
|
|
|
9714
10527
|
(0, $52FdA$solidjs.onCleanup)(() => $ddd39c5f36f49703$var$_classStaticPrivateFieldSpecGet($ddd39c5f36f49703$export$ac6237957a15b3f0, $ddd39c5f36f49703$export$ac6237957a15b3f0, $ddd39c5f36f49703$var$_keys_constructed_with).delete(unique_instance_key_for_state));
|
|
9715
10528
|
});
|
|
9716
10529
|
}
|
|
10530
|
+
get enable_content_search() {
|
|
10531
|
+
return (0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet))(this, $ddd39c5f36f49703$var$_content_search_signal)[0]();
|
|
10532
|
+
}
|
|
10533
|
+
set enable_content_search(new_state) {
|
|
10534
|
+
(0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet))(this, $ddd39c5f36f49703$var$_content_search_signal)[1](new_state);
|
|
10535
|
+
}
|
|
9717
10536
|
get on_navigation() {
|
|
9718
10537
|
// The only non-reactive public property on the class (I don't see it making sense to have it reactive)
|
|
9719
10538
|
return (0, $parcel$interopDefault($52FdA$babelruntimehelpersclassPrivateFieldGet))(this, $ddd39c5f36f49703$var$_router).on_navigation_;
|
|
@@ -9800,6 +10619,10 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
9800
10619
|
depict_api_: shared_properties.depict_api_,
|
|
9801
10620
|
min_products_to_fetch_: $ddd39c5f36f49703$var$min_products_to_fetch_,
|
|
9802
10621
|
local_filter_cache_: state_.local_filter_cache,
|
|
10622
|
+
content_search_enabled_: () => {
|
|
10623
|
+
var _depict_search$enable;
|
|
10624
|
+
return (_depict_search$enable = depict_search.enable_content_search) !== null && _depict_search$enable !== void 0 ? _depict_search$enable : $ddd39c5f36f49703$var$content_search_default;
|
|
10625
|
+
},
|
|
9803
10626
|
search_field_value_: state_.field_value,
|
|
9804
10627
|
get_search_query_: shared_properties.get_search_query_,
|
|
9805
10628
|
clear_filters_on_next_submit_: shared_properties.clear_filters_on_next_submit_,
|
|
@@ -9829,6 +10652,8 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
9829
10652
|
search_filters_open_: state_.filters_open,
|
|
9830
10653
|
search_sorting_open_: state_.sorting_open,
|
|
9831
10654
|
expanded_filters_: state_.expanded_filters,
|
|
10655
|
+
content_results_rows_: state_.content_results_rows,
|
|
10656
|
+
router_: shared_properties.router_,
|
|
9832
10657
|
make_category_suggestion_card_: shared_properties.enable_category_suggestions_ ? category_suggestion_ => {
|
|
9833
10658
|
return (0, $3001ad378baf39dc$export$d757d54550ebfb3d)({
|
|
9834
10659
|
category_suggestion_: category_suggestion_,
|
|
@@ -9844,6 +10669,10 @@ function $ddd39c5f36f49703$export$f2dc7e4e4aa11abb(props) {
|
|
|
9844
10669
|
cols_at_size: (0, $5401a6698b0c0658$export$6daf8749b65a1b77)(props.cols_at_size),
|
|
9845
10670
|
...grid_spacing_override()
|
|
9846
10671
|
})),
|
|
10672
|
+
content_layout_options_: (0, $52FdA$solidjs.createMemo)(() => ({
|
|
10673
|
+
cols_at_size: (0, $5401a6698b0c0658$export$6daf8749b65a1b77)((0, $b1ea8d47bcf03111$export$ff7109b9b2b206ba)(props.cols_at_size)),
|
|
10674
|
+
...grid_spacing_override()
|
|
10675
|
+
})),
|
|
9847
10676
|
recommendations_layout_options_: (0, $52FdA$solidjs.createMemo)(() => {
|
|
9848
10677
|
const {
|
|
9849
10678
|
extra_depict_options: extra_depict_options
|