@depict-ai/ui 4.7.29 → 4.7.30
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 +432 -438
- package/ES10/index.d.ts +100 -83
- package/ES10/index.js +470 -477
- package/latest/index.cjs +416 -422
- package/latest/index.d.ts +100 -83
- package/latest/index.js +453 -460
- package/package.json +1 -1
- package/server/ES10/index.cjs +246 -253
- package/server/ES10/index.d.ts +100 -83
- package/server/ES10/index.js +287 -295
- package/server/latest/index.cjs +229 -236
- package/server/latest/index.d.ts +100 -83
- package/server/latest/index.js +271 -279
package/ES10/index.js
CHANGED
|
@@ -1,16 +1,441 @@
|
|
|
1
|
-
import { add_to_version_info as $8tj43$add_to_version_info,
|
|
1
|
+
import { add_to_version_info as $8tj43$add_to_version_info, layout_media_query_header as $8tj43$layout_media_query_header, dwarn as $8tj43$dwarn, javascript_media_query as $8tj43$javascript_media_query, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, report as $8tj43$report, slider_fading_factory as $8tj43$slider_fading_factory, Amazing_Slider as $8tj43$Amazing_Slider, slider_snap_css as $8tj43$slider_snap_css, catchify as $8tj43$catchify1, dlog as $8tj43$dlog1, camelCasifyObject as $8tj43$camelCasifyObject, useExpandingContainer as $8tj43$useExpandingContainer, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, slider_fractional_factory as $8tj43$slider_fractional_factory, layout_get_visible_recs_without_partial_rows as $8tj43$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $8tj43$layout_get_total_rec_amount_for_row, observer as $8tj43$observer, queueMacroTask as $8tj43$queueMacroTask, findMostFrequentItem as $8tj43$findMostFrequentItem, standard_price_format as $8tj43$standard_price_format, instant_exec_on_suspect_history_change as $8tj43$instant_exec_on_suspect_history_change, deparallelize_no_drop as $8tj43$deparallelize_no_drop, ContainedImage as $8tj43$ContainedImage, buildThresholdList as $8tj43$buildThresholdList, make_asyncIterable_exiter as $8tj43$make_asyncIterable_exiter, href_change_ipns as $8tj43$href_change_ipns, base64_encode_unicode as $8tj43$base64_encode_unicode, base64_decode_unicode as $8tj43$base64_decode_unicode, use_href_accessor as $8tj43$use_href_accessor, get_session_id as $8tj43$get_session_id, add_version_query_params as $8tj43$add_version_query_params, hex_to_rgb as $8tj43$hex_to_rgb, relative_luminance_from_rgb as $8tj43$relative_luminance_from_rgb, snakeCasifyObject as $8tj43$snakeCasifyObject, make_url_with_query_params as $8tj43$make_url_with_query_params, sort_obj as $8tj43$sort_obj, insert_surfaces as $8tj43$insert_surfaces, is_debug as $8tj43$is_debug } from "@depict-ai/utilishared/ES10";
|
|
2
|
+
import { template as $8tj43$template, createComponent as $8tj43$createComponent, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, effect as $8tj43$effect, style as $8tj43$style, spread as $8tj43$spread, mergeProps as $8tj43$mergeProps1, runHydrationEvents as $8tj43$runHydrationEvents, getNextMarker as $8tj43$getNextMarker, classList as $8tj43$classList, className as $8tj43$className, isServer as $8tj43$isServer, setAttribute as $8tj43$setAttribute, addEventListener as $8tj43$addEventListener, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, use as $8tj43$use, setProperty as $8tj43$setProperty, Dynamic as $8tj43$Dynamic } from "solid-js/web";
|
|
3
|
+
import { createEffect as $8tj43$createEffect, createComputed as $8tj43$createComputed, createMemo as $8tj43$createMemo, mapArray as $8tj43$mapArray, createSignal as $8tj43$createSignal, Show as $8tj43$Show, mergeProps as $8tj43$mergeProps, createResource as $8tj43$createResource, Suspense as $8tj43$Suspense, onCleanup as $8tj43$onCleanup, createUniqueId as $8tj43$createUniqueId, createContext as $8tj43$createContext, useContext as $8tj43$useContext, ErrorBoundary as $8tj43$ErrorBoundary, createRoot as $8tj43$createRoot, untrack as $8tj43$untrack, For as $8tj43$For, getOwner as $8tj43$getOwner, runWithOwner as $8tj43$runWithOwner, createRenderEffect as $8tj43$createRenderEffect, Index as $8tj43$Index, splitProps as $8tj43$splitProps, on as $8tj43$on, batch as $8tj43$batch, createSelector as $8tj43$createSelector, children as $8tj43$children, createReaction as $8tj43$createReaction } from "solid-js";
|
|
4
|
+
import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from "solid-js/store";
|
|
2
5
|
import { dlog as $8tj43$dlog, catchify as $8tj43$catchify, ListenableSet as $8tj43$ListenableSet, use_href_accessor as $8tj43$use_href_accessor1, queueMacroTask as $8tj43$queueMacroTask1, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
|
|
3
|
-
import { createRoot as $8tj43$createRoot, createSignal as $8tj43$createSignal, createEffect as $8tj43$createEffect, onCleanup as $8tj43$onCleanup, createContext as $8tj43$createContext, Show as $8tj43$Show, useContext as $8tj43$useContext, createMemo as $8tj43$createMemo, untrack as $8tj43$untrack, For as $8tj43$For, getOwner as $8tj43$getOwner, createResource as $8tj43$createResource, runWithOwner as $8tj43$runWithOwner, mergeProps as $8tj43$mergeProps1, Suspense as $8tj43$Suspense, createRenderEffect as $8tj43$createRenderEffect, Index as $8tj43$Index, createUniqueId as $8tj43$createUniqueId, createComputed as $8tj43$createComputed, ErrorBoundary as $8tj43$ErrorBoundary, splitProps as $8tj43$splitProps, on as $8tj43$on, batch as $8tj43$batch, createSelector as $8tj43$createSelector, children as $8tj43$children, createReaction as $8tj43$createReaction, mapArray as $8tj43$mapArray } from "solid-js";
|
|
4
|
-
import { template as $8tj43$template, getNextElement as $8tj43$getNextElement, insert as $8tj43$insert, createComponent as $8tj43$createComponent, isServer as $8tj43$isServer, effect as $8tj43$effect, setAttribute as $8tj43$setAttribute, mergeProps as $8tj43$mergeProps, className as $8tj43$className, spread as $8tj43$spread, runHydrationEvents as $8tj43$runHydrationEvents, addEventListener as $8tj43$addEventListener, memo as $8tj43$memo, delegateEvents as $8tj43$delegateEvents, getNextMarker as $8tj43$getNextMarker, classList as $8tj43$classList, use as $8tj43$use, style as $8tj43$style, setProperty as $8tj43$setProperty, Dynamic as $8tj43$Dynamic } from "solid-js/web";
|
|
5
6
|
import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
6
7
|
import $8tj43$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
7
8
|
import $8tj43$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
8
|
-
import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from "solid-js/store";
|
|
9
9
|
|
|
10
10
|
/*! Depict.ai search and product listing SDK */
|
|
11
11
|
import { register_es_version } from "../multi_import_deduplicator.mjs";
|
|
12
12
|
register_es_version("ui", "ES10");
|
|
13
|
-
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.30";
|
|
14
|
+
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
15
|
+
const signal = $8tj43$createSignal(false);
|
|
16
|
+
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
17
|
+
let {
|
|
18
|
+
matches: matches
|
|
19
|
+
} = _ref;
|
|
20
|
+
return signal[1](matches);
|
|
21
|
+
}).remove);
|
|
22
|
+
return signal[0];
|
|
23
|
+
}
|
|
24
|
+
function $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_) {
|
|
25
|
+
const size_active = $8tj43$createMemo(() => cols_at_size_().map(_ref => {
|
|
26
|
+
let [n_cols, min_width, max_width] = _ref;
|
|
27
|
+
const media_query = $8tj43$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
28
|
+
const matches = $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query);
|
|
29
|
+
return [matches, n_cols];
|
|
30
|
+
}));
|
|
31
|
+
const n_cols_currently_showing = $8tj43$createMemo(() => {
|
|
32
|
+
try {
|
|
33
|
+
const [, n_cols_currently_showing] = size_active().find(_ref2 => {
|
|
34
|
+
let [media_query] = _ref2;
|
|
35
|
+
return media_query();
|
|
36
|
+
});
|
|
37
|
+
return n_cols_currently_showing;
|
|
38
|
+
} catch (e) {
|
|
39
|
+
$8tj43$dwarn("No active size found in columnsAtSize - can't render content blocks or looks");
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
return n_cols_currently_showing;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
|
|
47
|
+
class $f3b7124b76123e44$export$e1d52e4f0c7557a1 extends Error {}
|
|
48
|
+
class $f3b7124b76123e44$export$aa14a9f43128f61f extends $f3b7124b76123e44$export$e1d52e4f0c7557a1 {
|
|
49
|
+
constructor(templateError) {
|
|
50
|
+
super("Uncaught error in product card template", {
|
|
51
|
+
cause: templateError
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
var $74777e8fe65b3dcb$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div><!$><!/><!$><!/>`);
|
|
56
|
+
const $74777e8fe65b3dcb$var$ExtraInfoContext = /*@__PURE__*/$8tj43$createContext();
|
|
57
|
+
function $74777e8fe65b3dcb$export$240ecf5363d76c0f(props) {
|
|
58
|
+
return $8tj43$createComponent($74777e8fe65b3dcb$var$ExtraInfoContext.Provider, {
|
|
59
|
+
get value() {
|
|
60
|
+
return props.getContext_;
|
|
61
|
+
},
|
|
62
|
+
get children() {
|
|
63
|
+
return props.children;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function $74777e8fe65b3dcb$export$b69d0d92862de18b(props) {
|
|
68
|
+
const getContextFunction = $8tj43$useContext($74777e8fe65b3dcb$var$ExtraInfoContext);
|
|
69
|
+
return $8tj43$ErrorBoundary({
|
|
70
|
+
fallback(err, retry) {
|
|
71
|
+
const {
|
|
72
|
+
message_: message_,
|
|
73
|
+
severity_: severity_
|
|
74
|
+
} = props;
|
|
75
|
+
let message = message_;
|
|
76
|
+
if (err instanceof (0, $f3b7124b76123e44$export$aa14a9f43128f61f)) {
|
|
77
|
+
console.error(err.cause);
|
|
78
|
+
message = "".concat(message, ": ").concat(err.message);
|
|
79
|
+
} else $8tj43$report([err, message_], severity_, getContextFunction === null || getContextFunction === void 0 ? void 0 : getContextFunction());
|
|
80
|
+
return (() => {
|
|
81
|
+
var _el$ = $8tj43$getNextElement($74777e8fe65b3dcb$var$_tmpl$),
|
|
82
|
+
_el$2 = _el$.firstChild,
|
|
83
|
+
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
84
|
+
_el$4 = _el$3.nextSibling,
|
|
85
|
+
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
86
|
+
$8tj43$insert(_el$, message, _el$3, _co$);
|
|
87
|
+
$8tj43$insert(_el$, () => {
|
|
88
|
+
var _props$on_error_;
|
|
89
|
+
return (_props$on_error_ = props.on_error_) === null || _props$on_error_ === void 0 ? void 0 : _props$on_error_.call(props, retry);
|
|
90
|
+
}, _el$5, _co$2);
|
|
91
|
+
$8tj43$effect(_$p => {
|
|
92
|
+
var _props$class_list_;
|
|
93
|
+
return $8tj43$classList(_el$, Object.fromEntries(((_props$class_list_ = props.class_list_) === null || _props$class_list_ === void 0 ? void 0 : _props$class_list_.map(c => [c, true])) || []), _$p);
|
|
94
|
+
});
|
|
95
|
+
return _el$;
|
|
96
|
+
})();
|
|
97
|
+
},
|
|
98
|
+
get children() {
|
|
99
|
+
return props.children;
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
var $64d94dcaa058dc7b$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`),
|
|
104
|
+
$64d94dcaa058dc7b$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<style type=text/css>`);
|
|
105
|
+
const $64d94dcaa058dc7b$export$c500183c31c2b22e = "--spans-columns";
|
|
106
|
+
function $64d94dcaa058dc7b$export$ab6b147eec64fea5(props) {
|
|
107
|
+
const container_class = "x" + $8tj43$createUniqueId();
|
|
108
|
+
const container_element_ = (() => {
|
|
109
|
+
var _el$ = $8tj43$getNextElement($64d94dcaa058dc7b$var$_tmpl$);
|
|
110
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1(() => props.element_attributes, {
|
|
111
|
+
"classList": {
|
|
112
|
+
[container_class]: true
|
|
113
|
+
}
|
|
114
|
+
}), false, true);
|
|
115
|
+
$8tj43$insert(_el$, () => props.children);
|
|
116
|
+
$8tj43$runHydrationEvents();
|
|
117
|
+
return _el$;
|
|
118
|
+
})(); // Don't want this in the error boundary below, it should only be for the actual layouting
|
|
119
|
+
return $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
120
|
+
message_: "Failed calculating css grid layout",
|
|
121
|
+
severity_: "error",
|
|
122
|
+
get children() {
|
|
123
|
+
return $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element_, false, container_class);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
function $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element) {
|
|
128
|
+
let insert_after_container = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
129
|
+
let container_class = arguments.length > 3 ? arguments[3] : undefined;
|
|
130
|
+
if (!container_class) {
|
|
131
|
+
// only try to add if it wasn't provided, so that we have a code path without classList when doing SSR
|
|
132
|
+
container_class = $8tj43$make_random_classname();
|
|
133
|
+
container_element.classList.add(container_class);
|
|
134
|
+
}
|
|
135
|
+
const container_selector = ".depict .".concat(container_class); // class so ppl can have id if needed
|
|
136
|
+
const col_styling = $8tj43$createMemo(() => $64d94dcaa058dc7b$var$generate_media_queried_declarations({
|
|
137
|
+
container_selector_: container_selector,
|
|
138
|
+
default_grid_spacing_text: props.grid_spacing,
|
|
139
|
+
cols_at_size_: props.cols_at_size,
|
|
140
|
+
override_vertical_spacing_: props.override_vertical_spacing,
|
|
141
|
+
top_row_shortened_by_: props.top_row_shortened_by_()
|
|
142
|
+
}));
|
|
143
|
+
const base_styling = $8tj43$createMemo(() => {
|
|
144
|
+
return "".concat(container_selector, "{display:grid;}");
|
|
145
|
+
});
|
|
146
|
+
const get_styling = $8tj43$createMemo(() => base_styling() + col_styling());
|
|
147
|
+
const style_element = (() => {
|
|
148
|
+
var _el$2 = $8tj43$getNextElement($64d94dcaa058dc7b$var$_tmpl$2);
|
|
149
|
+
$8tj43$insert(_el$2, get_styling);
|
|
150
|
+
return _el$2;
|
|
151
|
+
})(); // need to create this after set_styling has been called or else there will be no styling in the SSR'd output
|
|
152
|
+
if (insert_after_container) container_element.after(style_element);
|
|
153
|
+
return [container_element, style_element];
|
|
154
|
+
}
|
|
155
|
+
function $64d94dcaa058dc7b$var$generate_media_queried_declarations(_ref) {
|
|
156
|
+
let {
|
|
157
|
+
container_selector_: container_selector_,
|
|
158
|
+
default_grid_spacing_text: default_grid_spacing_text,
|
|
159
|
+
cols_at_size_: cols_at_size_,
|
|
160
|
+
override_vertical_spacing_: override_vertical_spacing_,
|
|
161
|
+
top_row_shortened_by_: top_row_shortened_by_
|
|
162
|
+
} = _ref;
|
|
163
|
+
return cols_at_size_.map(options => {
|
|
164
|
+
const [n_cols, min, max, grid_spacing_for_size] = options;
|
|
165
|
+
const main_spacing_to_use = grid_spacing_for_size || default_grid_spacing_text;
|
|
166
|
+
// See comment in else block below
|
|
167
|
+
const can_use_gap = override_vertical_spacing_ ? $64d94dcaa058dc7b$var$can_use_gap_for_unit(override_vertical_spacing_) : $64d94dcaa058dc7b$var$can_use_gap_for_unit(main_spacing_to_use);
|
|
168
|
+
let spacing_styling;
|
|
169
|
+
let additional_styling = ""; // outside the media query
|
|
170
|
+
if (can_use_gap) spacing_styling = "gap:".concat(main_spacing_to_use, ";").concat(override_vertical_spacing_ ? "row-gap:".concat(override_vertical_spacing_, ";") : "");else {
|
|
171
|
+
// When using percent units, which our default styling does (because convenient) and our interface relies on (hard to specify different gaps for different screen sizes)
|
|
172
|
+
// row gaps in grids are relative to the whole height of the grid, maybe see also https://stackoverflow.com/a/53563865. The issue with that is that as we load more products, the gap grows. Also, it breaks existing integrations.
|
|
173
|
+
// Logical thought: use margins for the vertical spacing. But margins in grids are apparently relative to the size of the individual items in grids.
|
|
174
|
+
// Given that, and that content blocks can be of different width, we have to do some complicated calculations to convert the provided gap, which is in gap of the total container width, to a margin of the individual items.
|
|
175
|
+
const vertical_spacing_to_use = override_vertical_spacing_ !== null && override_vertical_spacing_ !== void 0 ? override_vertical_spacing_ : main_spacing_to_use;
|
|
176
|
+
const width_multiplier = "var(".concat($64d94dcaa058dc7b$export$c500183c31c2b22e, ", 1)"); // How many cards wide the current item is (needed because content blocks)
|
|
177
|
+
const one_item_width_exclusing_gaps = "calc(calc(100 / ".concat(n_cols, ") - calc(calc(").concat(n_cols * 2 - 2, " * calc(").concat($64d94dcaa058dc7b$var$strip_percent_unit(vertical_spacing_to_use), " / 2)) / ").concat(n_cols, "))"); // Width of one item in percent of the whole
|
|
178
|
+
// Equation from layout.tsx, also used in CheckboxGrid. Needs half spacing for some reason
|
|
179
|
+
const this_item_width_meat = "calc(".concat(one_item_width_exclusing_gaps, " * ").concat(width_multiplier, ")"); // Width of just the card
|
|
180
|
+
const this_item_width_gaps = "calc(calc(".concat(width_multiplier, " - 1) * ").concat($64d94dcaa058dc7b$var$strip_percent_unit(vertical_spacing_to_use), ")"); // Width of the gaps
|
|
181
|
+
const this_item_width = "calc(".concat(this_item_width_meat, " + ").concat(this_item_width_gaps, ")"); // Width of this item including gaps
|
|
182
|
+
// this_item_width needs to be unitless, and since plain css can't do calc(40% / 5%) which would become unitless we need to strip all units in the calculations before
|
|
183
|
+
const convert_top_spacing_to_item_width_percentage = spacing => "calc(calc(100 / ".concat(this_item_width, ") * ").concat(spacing, ")"); // Now finally we can convert the desired spacing to a percentage of this individual item's width (including gaps that would be there but aren't because content blocks span them)
|
|
184
|
+
spacing_styling = "column-gap:".concat(main_spacing_to_use, ";"); // Still use gaps in the horizontal direction because that works flawlessly
|
|
185
|
+
// Re-use old layout code to get the correct :nth-child declarations for the top margins
|
|
186
|
+
additional_styling = $8tj43$n_col_styling_with_dist(container_selector_ + ">", convert_top_spacing_to_item_width_percentage(default_grid_spacing_text), [[n_cols, min, max, grid_spacing_for_size ? convert_top_spacing_to_item_width_percentage(grid_spacing_for_size) : null]], "grid", override_vertical_spacing_ ? convert_top_spacing_to_item_width_percentage(override_vertical_spacing_) : override_vertical_spacing_, top_row_shortened_by_);
|
|
187
|
+
}
|
|
188
|
+
const media_query_body = "".concat(container_selector_, "{").concat(spacing_styling, "grid-template-columns:repeat(").concat(n_cols, ",minmax(0,1fr));}");
|
|
189
|
+
return "".concat($8tj43$layout_media_query_header(min, max), "{").concat(media_query_body, "}").concat(additional_styling);
|
|
190
|
+
}).join("");
|
|
191
|
+
}
|
|
192
|
+
function $64d94dcaa058dc7b$var$can_use_gap_for_unit(spacing) {
|
|
193
|
+
const trimmed_spacing = spacing.trim();
|
|
194
|
+
return !trimmed_spacing.includes("%");
|
|
195
|
+
}
|
|
196
|
+
function $64d94dcaa058dc7b$var$strip_percent_unit(css_value) {
|
|
197
|
+
return css_value.replaceAll("%", "");
|
|
198
|
+
}
|
|
199
|
+
var $bc2337c9a05ecd18$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<span>`);
|
|
200
|
+
function $bc2337c9a05ecd18$export$acb3eaade4b23afd(props) {
|
|
201
|
+
// Work around https://github.com/solidjs/solid/issues/1980
|
|
202
|
+
return (() => {
|
|
203
|
+
var _el$ = $8tj43$getNextElement($bc2337c9a05ecd18$var$_tmpl$);
|
|
204
|
+
$8tj43$effect(_p$ => {
|
|
205
|
+
var _v$ = "".concat(props.class || "", " depict-placeholder"),
|
|
206
|
+
_v$2 = props.style;
|
|
207
|
+
_v$ !== _p$.e && $8tj43$className(_el$, _p$.e = _v$);
|
|
208
|
+
_p$.t = $8tj43$style(_el$, _v$2, _p$.t);
|
|
209
|
+
return _p$;
|
|
210
|
+
}, {
|
|
211
|
+
e: undefined,
|
|
212
|
+
t: undefined
|
|
213
|
+
});
|
|
214
|
+
return _el$;
|
|
215
|
+
})();
|
|
216
|
+
}
|
|
217
|
+
function $3ab4aa97880fb88d$export$3f37af283f8fb843(props) {
|
|
218
|
+
const style = $8tj43$createMemo(() => {
|
|
219
|
+
const {
|
|
220
|
+
style: style,
|
|
221
|
+
height: height,
|
|
222
|
+
width: width,
|
|
223
|
+
aspectRatio: aspectRatio
|
|
224
|
+
} = props;
|
|
225
|
+
const is_image = aspectRatio != undefined;
|
|
226
|
+
const size_data = is_image ? {
|
|
227
|
+
width: "100%",
|
|
228
|
+
"padding-bottom": "calc(calc(1 / ".concat(aspectRatio, ") * 100%)")
|
|
229
|
+
} : {
|
|
230
|
+
width: width,
|
|
231
|
+
height: height
|
|
232
|
+
};
|
|
233
|
+
return {
|
|
234
|
+
display: "block",
|
|
235
|
+
...(style || {}),
|
|
236
|
+
...size_data
|
|
237
|
+
};
|
|
238
|
+
});
|
|
239
|
+
return $8tj43$createComponent((0, $bc2337c9a05ecd18$export$acb3eaade4b23afd), {
|
|
240
|
+
get style() {
|
|
241
|
+
return style();
|
|
242
|
+
},
|
|
243
|
+
get ["class"]() {
|
|
244
|
+
return props.class;
|
|
245
|
+
}
|
|
246
|
+
});
|
|
247
|
+
}
|
|
248
|
+
var $ff7feae4dddd6073$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=content-block-wrapper>`);
|
|
249
|
+
function $ff7feae4dddd6073$export$791ef57e62e21c3f(_ref) {
|
|
250
|
+
let {
|
|
251
|
+
content_blocks_: incoming_content_blocks,
|
|
252
|
+
cols_at_size_: cols_at_size_,
|
|
253
|
+
set_top_row_shortened_by_: set_top_row_shortened_by_
|
|
254
|
+
} = _ref;
|
|
255
|
+
// these are by row
|
|
256
|
+
const [content_blocks, set_content_blocks] = $8tj43$createStore([]);
|
|
257
|
+
const n_cols_currently_showing_ = $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_);
|
|
258
|
+
$8tj43$createEffect(() => {
|
|
259
|
+
const incoming_value = incoming_content_blocks();
|
|
260
|
+
if (!incoming_value) {
|
|
261
|
+
set_content_blocks([]);
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
set_content_blocks($8tj43$reconcile(incoming_value, {
|
|
265
|
+
key: "content"
|
|
266
|
+
})); // key: Make moving blocks faster, see https://github.com/solidjs/solid/issues/1925#issuecomment-1769671596
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
const get_wrapped_blocks_ = $ff7feae4dddd6073$var$wrap_blocks_in_div(content_blocks, n_cols_currently_showing_);
|
|
270
|
+
$8tj43$createComputed(() => {
|
|
271
|
+
// Update our styling if a content block forces some items that should be in the top row into a lower one, so we can generate margin-top declarations for them
|
|
272
|
+
const top_row_block = get_wrapped_blocks_()[0];
|
|
273
|
+
const blocks_in_top_row_taken = top_row_block === null || top_row_block === void 0 ? void 0 : top_row_block.span_columns;
|
|
274
|
+
if (blocks_in_top_row_taken == undefined) {
|
|
275
|
+
// Fall back to zero if no content block in top row, since then no blocks in top row are taken
|
|
276
|
+
set_top_row_shortened_by_(0);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
set_top_row_shortened_by_(blocks_in_top_row_taken - 1); // minus one because the content block wrapper also is an element
|
|
280
|
+
});
|
|
281
|
+
|
|
282
|
+
return $8tj43$createMemo(() => $ff7feae4dddd6073$export$92aa5d691d588f3f({
|
|
283
|
+
wrapped_blocks_: get_wrapped_blocks_(),
|
|
284
|
+
n_cols_currently_showing_: n_cols_currently_showing_()
|
|
285
|
+
}));
|
|
286
|
+
}
|
|
287
|
+
function $ff7feae4dddd6073$export$92aa5d691d588f3f(_ref2) {
|
|
288
|
+
let {
|
|
289
|
+
wrapped_blocks_: wrapped_blocks_,
|
|
290
|
+
n_cols_currently_showing_: n_cols_currently_showing_
|
|
291
|
+
} = _ref2;
|
|
292
|
+
// This computation should be quite cheap since it just moves around things into an array
|
|
293
|
+
const content_blocks_by_index = [];
|
|
294
|
+
const constructed_block_arrays = new WeakSet();
|
|
295
|
+
// Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
|
|
296
|
+
const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
|
|
297
|
+
if (!n_cols_currently_showing_)
|
|
298
|
+
// Nope out of here if we don't know how many columns are showing
|
|
299
|
+
return content_blocks_by_index;
|
|
300
|
+
for (let i = 0; i < wrapped_blocks_.length; i++) {
|
|
301
|
+
// i = row to show at
|
|
302
|
+
const block = wrapped_blocks_[i];
|
|
303
|
+
if (!block) continue; // Array can have holes/not defined places
|
|
304
|
+
const index_of_first_item_in_row = i * n_cols_currently_showing_;
|
|
305
|
+
const index_of_last_item_in_row = index_of_first_item_in_row + n_cols_currently_showing_;
|
|
306
|
+
const {
|
|
307
|
+
span_rows: span_rows,
|
|
308
|
+
position: position,
|
|
309
|
+
span_columns: span_columns
|
|
310
|
+
} = block; // span columns is already capped in the block wrapping step (wrap_blocks_in_div)
|
|
311
|
+
let target_index;
|
|
312
|
+
if (position === "left") target_index = index_of_first_item_in_row;else if (position === "right") target_index = index_of_last_item_in_row - span_columns;else if (position === "center") target_index = index_of_first_item_in_row + Math.floor((n_cols_currently_showing_ - span_columns) / 2);else throw new Error("Invalid position for content block - must be left, right or center: " + JSON.stringify(position));
|
|
313
|
+
// Calculate displacement of us by content blocks above us
|
|
314
|
+
let displacement_by_added_blocks = 0;
|
|
315
|
+
for (let j = 0; j < i; j++) {
|
|
316
|
+
const row = displaced_products[j];
|
|
317
|
+
if (row === undefined) continue; // there were no blocks in this row
|
|
318
|
+
let displaced_items_in_row;
|
|
319
|
+
if (typeof row === "number") displaced_items_in_row = row;else {
|
|
320
|
+
displaced_items_in_row = row.filter(item => item).length;
|
|
321
|
+
displaced_products[j] = displaced_items_in_row;
|
|
322
|
+
}
|
|
323
|
+
displacement_by_added_blocks += displaced_items_in_row;
|
|
324
|
+
}
|
|
325
|
+
const index_of_us_in_row = target_index - index_of_first_item_in_row;
|
|
326
|
+
for (let j = 0; j < index_of_us_in_row; j++) {
|
|
327
|
+
var _displaced_products$i;
|
|
328
|
+
if ((_displaced_products$i = displaced_products[i]) !== null && _displaced_products$i !== void 0 && _displaced_products$i[j])
|
|
329
|
+
// Add blocks in our *current* row to the displacement, but only the ones to our left
|
|
330
|
+
displacement_by_added_blocks++;
|
|
331
|
+
}
|
|
332
|
+
// Add block to output array at the correct index
|
|
333
|
+
const final_target_index = target_index - displacement_by_added_blocks;
|
|
334
|
+
const existing_block = content_blocks_by_index[final_target_index];
|
|
335
|
+
const block_content = block.content;
|
|
336
|
+
// If two blocks want to exist at the same location (can happen, for example if one block wants to be at the end of a row and the other one at the start of the next row) add an array with both
|
|
337
|
+
if (existing_block) {
|
|
338
|
+
if (constructed_block_arrays.has(existing_block))
|
|
339
|
+
// Only push to arrays we have created to not create funky bugs when there's an array in JSX.Element
|
|
340
|
+
existing_block.push(block_content);else {
|
|
341
|
+
const array = [existing_block, block_content];
|
|
342
|
+
constructed_block_arrays.add(array);
|
|
343
|
+
content_blocks_by_index[final_target_index] = array;
|
|
344
|
+
}
|
|
345
|
+
} else content_blocks_by_index[final_target_index] = block_content;
|
|
346
|
+
// Update displacement
|
|
347
|
+
for (let j = 0; j < span_rows; j++) {
|
|
348
|
+
var _ref3;
|
|
349
|
+
const row = displaced_products[_ref3 = i + j] || (displaced_products[_ref3] = []);
|
|
350
|
+
for (let k = index_of_us_in_row; k < index_of_us_in_row + span_columns; k++) row[k] = true;
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
return content_blocks_by_index;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Takes a store that contains an array from where index is number of row and value is the result of executing the content block rendering function.
|
|
357
|
+
* Then renders the content and wraps it into a div with the correct styling.
|
|
358
|
+
* Also caps span_columns to max available columns
|
|
359
|
+
*/
|
|
360
|
+
function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
361
|
+
const get_wrapped_blocks = $8tj43$mapArray(() => rendered_content_blocks, block => {
|
|
362
|
+
if (!block) return;
|
|
363
|
+
const final_span_columns = $8tj43$createMemo(() => {
|
|
364
|
+
var _max_span_columns;
|
|
365
|
+
return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
|
|
366
|
+
});
|
|
367
|
+
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
368
|
+
const final_span_rows = $8tj43$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
369
|
+
const [rendering_delayed, set_rendering_delayed_] = $8tj43$createSignal(true);
|
|
370
|
+
const content = $8tj43$createComponent((0, $8tj43$Show), {
|
|
371
|
+
get when() {
|
|
372
|
+
return !rendering_delayed();
|
|
373
|
+
},
|
|
374
|
+
get children() {
|
|
375
|
+
var _el$ = $8tj43$getNextElement($ff7feae4dddd6073$var$_tmpl$);
|
|
376
|
+
$8tj43$insert(_el$, $8tj43$createComponent($ff7feae4dddd6073$var$RenderContent, {
|
|
377
|
+
get content() {
|
|
378
|
+
return block.content;
|
|
379
|
+
}
|
|
380
|
+
}));
|
|
381
|
+
$8tj43$effect(_p$ => {
|
|
382
|
+
var _v$ = {
|
|
383
|
+
[(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: final_span_columns()
|
|
384
|
+
},
|
|
385
|
+
_v$2 = "span ".concat(final_span_columns()),
|
|
386
|
+
_v$3 = "span ".concat(final_span_rows());
|
|
387
|
+
_p$.e = $8tj43$style(_el$, _v$, _p$.e);
|
|
388
|
+
_v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
|
|
389
|
+
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
|
|
390
|
+
return _p$;
|
|
391
|
+
}, {
|
|
392
|
+
e: undefined,
|
|
393
|
+
t: undefined,
|
|
394
|
+
a: undefined
|
|
395
|
+
});
|
|
396
|
+
return _el$;
|
|
397
|
+
}
|
|
398
|
+
});
|
|
399
|
+
return $8tj43$mergeProps(block, {
|
|
400
|
+
// Create content divs for the blocks with as much fine-grained diffing as possible?
|
|
401
|
+
content: () => {
|
|
402
|
+
// Sneaky on-demand rendering, so we don't render more blocks than we can show: we have the rendered value here and don't return a function that renders because if our block would be moved around we'd be guaranteed to re-render
|
|
403
|
+
// However, no need to count products to know if we should render: the <For> loops in Placeholders and render_displays will only call this function if there's actually a product here that wants to display this block
|
|
404
|
+
set_rendering_delayed_(false);
|
|
405
|
+
return content;
|
|
406
|
+
},
|
|
407
|
+
get span_columns() {
|
|
408
|
+
// Cap max width of block to the number of columns available, for everyone downstream
|
|
409
|
+
return final_span_columns();
|
|
410
|
+
},
|
|
411
|
+
get span_rows() {
|
|
412
|
+
return final_span_rows();
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
return get_wrapped_blocks;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Basically adds support for async content block functions and shows a rudimentary placeholder if rendering is delayed. Required due to react having a rendering delay.
|
|
420
|
+
*/
|
|
421
|
+
function $ff7feae4dddd6073$var$RenderContent(props) {
|
|
422
|
+
const [resource] = $8tj43$createResource(() => props.content,
|
|
423
|
+
// Could be reactive
|
|
424
|
+
fn => fn());
|
|
425
|
+
$8tj43$createEffect(() => {
|
|
426
|
+
if (resource.error) console.error("Error in content block rendering", resource.error);
|
|
427
|
+
});
|
|
428
|
+
// The suspense is for when there's an async content block (which we have to support due to react having a rendering delay) so that we can show some height while it's loading (should kinda never be visible)
|
|
429
|
+
return $8tj43$createComponent((0, $8tj43$Suspense), {
|
|
430
|
+
get fallback() {
|
|
431
|
+
return $8tj43$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
|
|
432
|
+
width: "100%",
|
|
433
|
+
height: "max(100%, 400px)"
|
|
434
|
+
});
|
|
435
|
+
},
|
|
436
|
+
children: resource
|
|
437
|
+
});
|
|
438
|
+
}
|
|
14
439
|
let $715f7f2e53146662$var$elementsHoveredSignal;
|
|
15
440
|
let $715f7f2e53146662$var$consumersSignal;
|
|
16
441
|
function $715f7f2e53146662$export$d4d96868197be50e() {
|
|
@@ -690,70 +1115,13 @@ function $bdd80c7862246dc2$var$Placeholder(_ref2) {
|
|
|
690
1115
|
});
|
|
691
1116
|
}
|
|
692
1117
|
|
|
693
|
-
// Errors caused by SDK consuming code interfacing with the SDK, not the SDK itself or other Depict packages
|
|
694
|
-
class $f3b7124b76123e44$export$e1d52e4f0c7557a1 extends Error {}
|
|
695
|
-
class $f3b7124b76123e44$export$aa14a9f43128f61f extends $f3b7124b76123e44$export$e1d52e4f0c7557a1 {
|
|
696
|
-
constructor(templateError) {
|
|
697
|
-
super("Uncaught error in product card template", {
|
|
698
|
-
cause: templateError
|
|
699
|
-
});
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
var $74777e8fe65b3dcb$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div><!$><!/><!$><!/>`);
|
|
703
|
-
const $74777e8fe65b3dcb$var$ExtraInfoContext = /*@__PURE__*/$8tj43$createContext();
|
|
704
|
-
function $74777e8fe65b3dcb$export$240ecf5363d76c0f(props) {
|
|
705
|
-
return $8tj43$createComponent($74777e8fe65b3dcb$var$ExtraInfoContext.Provider, {
|
|
706
|
-
get value() {
|
|
707
|
-
return props.getContext_;
|
|
708
|
-
},
|
|
709
|
-
get children() {
|
|
710
|
-
return props.children;
|
|
711
|
-
}
|
|
712
|
-
});
|
|
713
|
-
}
|
|
714
|
-
function $74777e8fe65b3dcb$export$b69d0d92862de18b(props) {
|
|
715
|
-
const getContextFunction = $8tj43$useContext($74777e8fe65b3dcb$var$ExtraInfoContext);
|
|
716
|
-
return $8tj43$ErrorBoundary({
|
|
717
|
-
fallback(err, retry) {
|
|
718
|
-
const {
|
|
719
|
-
message_: message_,
|
|
720
|
-
severity_: severity_
|
|
721
|
-
} = props;
|
|
722
|
-
let message = message_;
|
|
723
|
-
if (err instanceof (0, $f3b7124b76123e44$export$aa14a9f43128f61f)) {
|
|
724
|
-
console.error(err.cause);
|
|
725
|
-
message = "".concat(message, ": ").concat(err.message);
|
|
726
|
-
} else $8tj43$report([err, message_], severity_, getContextFunction === null || getContextFunction === void 0 ? void 0 : getContextFunction());
|
|
727
|
-
return (() => {
|
|
728
|
-
var _el$ = $8tj43$getNextElement($74777e8fe65b3dcb$var$_tmpl$),
|
|
729
|
-
_el$2 = _el$.firstChild,
|
|
730
|
-
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
731
|
-
_el$4 = _el$3.nextSibling,
|
|
732
|
-
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
733
|
-
$8tj43$insert(_el$, message, _el$3, _co$);
|
|
734
|
-
$8tj43$insert(_el$, () => {
|
|
735
|
-
var _props$on_error_;
|
|
736
|
-
return (_props$on_error_ = props.on_error_) === null || _props$on_error_ === void 0 ? void 0 : _props$on_error_.call(props, retry);
|
|
737
|
-
}, _el$5, _co$2);
|
|
738
|
-
$8tj43$effect(_$p => {
|
|
739
|
-
var _props$class_list_;
|
|
740
|
-
return $8tj43$classList(_el$, Object.fromEntries(((_props$class_list_ = props.class_list_) === null || _props$class_list_ === void 0 ? void 0 : _props$class_list_.map(c => [c, true])) || []), _$p);
|
|
741
|
-
});
|
|
742
|
-
return _el$;
|
|
743
|
-
})();
|
|
744
|
-
},
|
|
745
|
-
get children() {
|
|
746
|
-
return props.children;
|
|
747
|
-
}
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
1118
|
var $63f1f8dbcd07d3b0$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`),
|
|
751
1119
|
$63f1f8dbcd07d3b0$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<style type=text/css>`);
|
|
752
1120
|
function $63f1f8dbcd07d3b0$export$d21e32dfedac04be(props) {
|
|
753
1121
|
const container_class = "x" + $8tj43$createUniqueId();
|
|
754
1122
|
const container_element_ = (() => {
|
|
755
1123
|
var _el$ = $8tj43$getNextElement($63f1f8dbcd07d3b0$var$_tmpl$);
|
|
756
|
-
$8tj43$spread(_el$, $8tj43$
|
|
1124
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1(() => props.element_attributes, {
|
|
757
1125
|
"classList": {
|
|
758
1126
|
[container_class]: true
|
|
759
1127
|
}
|
|
@@ -929,7 +1297,7 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
929
1297
|
} = slider;
|
|
930
1298
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
931
1299
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
932
|
-
$8tj43$createComponent(Layout, $8tj43$
|
|
1300
|
+
$8tj43$createComponent(Layout, $8tj43$mergeProps1({
|
|
933
1301
|
rows: "all",
|
|
934
1302
|
layout: "slider"
|
|
935
1303
|
}, layout_options_));
|
|
@@ -1016,70 +1384,11 @@ function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
|
|
|
1016
1384
|
value: our_object,
|
|
1017
1385
|
get children() {
|
|
1018
1386
|
return props.children;
|
|
1019
|
-
}
|
|
1020
|
-
});
|
|
1021
|
-
}
|
|
1022
|
-
function $5441862cd2f5e111$export$8d0c4fdbb05a2f2e() {
|
|
1023
|
-
return $8tj43$useContext($5441862cd2f5e111$var$ListingContext);
|
|
1024
|
-
}
|
|
1025
|
-
var $bc2337c9a05ecd18$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<span>`);
|
|
1026
|
-
function $bc2337c9a05ecd18$export$acb3eaade4b23afd(props) {
|
|
1027
|
-
// Work around https://github.com/solidjs/solid/issues/1980
|
|
1028
|
-
return (() => {
|
|
1029
|
-
var _el$ = $8tj43$getNextElement($bc2337c9a05ecd18$var$_tmpl$);
|
|
1030
|
-
$8tj43$effect(_p$ => {
|
|
1031
|
-
var _v$ = "".concat(props.class || "", " depict-placeholder"),
|
|
1032
|
-
_v$2 = props.style;
|
|
1033
|
-
_v$ !== _p$.e && $8tj43$className(_el$, _p$.e = _v$);
|
|
1034
|
-
_p$.t = $8tj43$style(_el$, _v$2, _p$.t);
|
|
1035
|
-
return _p$;
|
|
1036
|
-
}, {
|
|
1037
|
-
e: undefined,
|
|
1038
|
-
t: undefined
|
|
1039
|
-
});
|
|
1040
|
-
return _el$;
|
|
1041
|
-
})();
|
|
1042
|
-
}
|
|
1043
|
-
function $3ab4aa97880fb88d$export$3f37af283f8fb843(props) {
|
|
1044
|
-
const style = $8tj43$createMemo(() => {
|
|
1045
|
-
const {
|
|
1046
|
-
style: style,
|
|
1047
|
-
height: height,
|
|
1048
|
-
width: width,
|
|
1049
|
-
aspectRatio: aspectRatio
|
|
1050
|
-
} = props;
|
|
1051
|
-
const is_image = aspectRatio != undefined;
|
|
1052
|
-
const size_data = is_image ? {
|
|
1053
|
-
width: "100%",
|
|
1054
|
-
"padding-bottom": "calc(calc(1 / ".concat(aspectRatio, ") * 100%)")
|
|
1055
|
-
} : {
|
|
1056
|
-
width: width,
|
|
1057
|
-
height: height
|
|
1058
|
-
};
|
|
1059
|
-
return {
|
|
1060
|
-
display: "block",
|
|
1061
|
-
...(style || {}),
|
|
1062
|
-
...size_data
|
|
1063
|
-
};
|
|
1064
|
-
});
|
|
1065
|
-
return $8tj43$createComponent((0, $bc2337c9a05ecd18$export$acb3eaade4b23afd), {
|
|
1066
|
-
get style() {
|
|
1067
|
-
return style();
|
|
1068
|
-
},
|
|
1069
|
-
get ["class"]() {
|
|
1070
|
-
return props.class;
|
|
1071
|
-
}
|
|
1072
|
-
});
|
|
1073
|
-
}
|
|
1074
|
-
function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
|
|
1075
|
-
const signal = $8tj43$createSignal(false);
|
|
1076
|
-
$8tj43$onCleanup($8tj43$javascript_media_query(media_query, _ref => {
|
|
1077
|
-
let {
|
|
1078
|
-
matches: matches
|
|
1079
|
-
} = _ref;
|
|
1080
|
-
return signal[1](matches);
|
|
1081
|
-
}).remove);
|
|
1082
|
-
return signal[0];
|
|
1387
|
+
}
|
|
1388
|
+
});
|
|
1389
|
+
}
|
|
1390
|
+
function $5441862cd2f5e111$export$8d0c4fdbb05a2f2e() {
|
|
1391
|
+
return $8tj43$useContext($5441862cd2f5e111$var$ListingContext);
|
|
1083
1392
|
}
|
|
1084
1393
|
function $ceafb6fb91c6f394$export$89c6019e4baa40b1(props) {
|
|
1085
1394
|
const style = $8tj43$createMemo(() => {
|
|
@@ -1237,7 +1546,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1237
1546
|
if (loading === "force-lazy") return true;
|
|
1238
1547
|
return loading === "lazy" && !isPrioritisedImage();
|
|
1239
1548
|
});
|
|
1240
|
-
const modifiedOtherAttributes = $8tj43$
|
|
1549
|
+
const modifiedOtherAttributes = $8tj43$mergeProps(otherAttributes, {
|
|
1241
1550
|
get loading() {
|
|
1242
1551
|
return shouldActuallyEnableLazyLoading() ? "lazy" : undefined;
|
|
1243
1552
|
}
|
|
@@ -1310,7 +1619,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1310
1619
|
$8tj43$onCleanup(() => prevValue && aspectRatios.delete(prevValue));
|
|
1311
1620
|
}
|
|
1312
1621
|
$8tj43$onCleanup(() => gotCleanedUp = true);
|
|
1313
|
-
$8tj43$spread(img, $8tj43$
|
|
1622
|
+
$8tj43$spread(img, $8tj43$mergeProps(modifiedOtherAttributes), false, true);
|
|
1314
1623
|
$8tj43$createRenderEffect(() => {
|
|
1315
1624
|
props.src;
|
|
1316
1625
|
srcJustChanged = true;
|
|
@@ -1412,7 +1721,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1412
1721
|
$8tj43$queueMacroTask(() => setCurrentImageSize()); // unset the size accessor next event loop iteration, so that all onCleanup's have time to run, since the effects run more aggressively and can create a size accessor with a cleaned up owner otherwise
|
|
1413
1722
|
});
|
|
1414
1723
|
|
|
1415
|
-
$8tj43$insert(container, $8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $8tj43$
|
|
1724
|
+
$8tj43$insert(container, $8tj43$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $8tj43$mergeProps1({
|
|
1416
1725
|
get size() {
|
|
1417
1726
|
return $8tj43$createMemo(() => {
|
|
1418
1727
|
var _currentImageSize;
|
|
@@ -1431,7 +1740,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1431
1740
|
return container;
|
|
1432
1741
|
}
|
|
1433
1742
|
function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
|
|
1434
|
-
return $8tj43$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $8tj43$
|
|
1743
|
+
return $8tj43$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $8tj43$mergeProps1(props, {
|
|
1435
1744
|
get imgProps() {
|
|
1436
1745
|
return {
|
|
1437
1746
|
...props.imgProps,
|
|
@@ -1508,7 +1817,7 @@ function $f84b097e079b0a33$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1508
1817
|
[_el$15, _co$4] = $8tj43$getNextMarker(_el$14.nextSibling);
|
|
1509
1818
|
var _ref$ = outerRef_;
|
|
1510
1819
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$) : outerRef_ = _el$;
|
|
1511
|
-
$8tj43$spread(_el$, $8tj43$
|
|
1820
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1(() => enableLink() ? {
|
|
1512
1821
|
href: href()
|
|
1513
1822
|
} : {}, {
|
|
1514
1823
|
get onClick() {
|
|
@@ -1610,7 +1919,7 @@ function $f84b097e079b0a33$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1610
1919
|
disconnector();
|
|
1611
1920
|
}));
|
|
1612
1921
|
}, _el$3);
|
|
1613
|
-
$8tj43$spread(_el$5, $8tj43$
|
|
1922
|
+
$8tj43$spread(_el$5, $8tj43$mergeProps1(() => title() && {
|
|
1614
1923
|
title: title()
|
|
1615
1924
|
}), false, true);
|
|
1616
1925
|
$8tj43$insert(_el$5, () => {
|
|
@@ -1948,7 +2257,7 @@ function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
|
1948
2257
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
1949
2258
|
_el$4 = _el$3.nextSibling,
|
|
1950
2259
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
1951
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => setUserWantsExpanded(prev =>
|
|
2260
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => display_() && setUserWantsExpanded(prev => !prev)), true);
|
|
1952
2261
|
$8tj43$use(el => {
|
|
1953
2262
|
container = el;
|
|
1954
2263
|
const ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
@@ -2185,7 +2494,7 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
2185
2494
|
_el$6 = _el$5.nextSibling,
|
|
2186
2495
|
[_el$7, _co$2] = $8tj43$getNextMarker(_el$6.nextSibling);
|
|
2187
2496
|
$8tj43$insert(_el$3, (0, $ca55612a53dbbdd2$export$a2cc176055f8f08), _el$5, _co$);
|
|
2188
|
-
$8tj43$insert(_el$3, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$
|
|
2497
|
+
$8tj43$insert(_el$3, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$mergeProps1({
|
|
2189
2498
|
get rows() {
|
|
2190
2499
|
return rows_object_();
|
|
2191
2500
|
},
|
|
@@ -2320,7 +2629,7 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
2320
2629
|
return $8tj43$createComponent((0, $39ddb986053fb759$export$d41d19e89346fa2), sharedOptions);
|
|
2321
2630
|
},
|
|
2322
2631
|
get children() {
|
|
2323
|
-
return $8tj43$createComponent((0, $e3efeb558d952696$export$7da560f849543dff), $8tj43$
|
|
2632
|
+
return $8tj43$createComponent((0, $e3efeb558d952696$export$7da560f849543dff), $8tj43$mergeProps1(sharedOptions, {
|
|
2324
2633
|
view_more_button_: () => {
|
|
2325
2634
|
var _props$gridOptions_;
|
|
2326
2635
|
return (_props$gridOptions_ = props.gridOptions_) === null || _props$gridOptions_ === void 0 ? void 0 : _props$gridOptions_.view_more_button;
|
|
@@ -2382,7 +2691,7 @@ async function $bb34cd283e904784$var$runDisplayTransformersForLooks(baseData, li
|
|
|
2382
2691
|
}) : displaysToTransform;
|
|
2383
2692
|
const transformedListings = await transformedListingsPromise;
|
|
2384
2693
|
const transformedDisplayById = Object.fromEntries(transformedProducts.map(display => [$6a4c7ed6d005505c$export$548d053aba053d79(display), display]));
|
|
2385
|
-
return transformedListings.map(listing => $8tj43$
|
|
2694
|
+
return transformedListings.map(listing => $8tj43$mergeProps(listing, {
|
|
2386
2695
|
// use mergeProps because in preview browser we add getters in this object, that would be called too early otherwise
|
|
2387
2696
|
displays: (displayIdsPerListingId[listing.listing_id] || []).map(displayId => transformedDisplayById[displayId]).filter(v => v)
|
|
2388
2697
|
}));
|
|
@@ -3856,7 +4165,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3856
4165
|
when: on_back_,
|
|
3857
4166
|
get children() {
|
|
3858
4167
|
var _el$ = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$);
|
|
3859
|
-
$8tj43$spread(_el$, $8tj43$
|
|
4168
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1({
|
|
3860
4169
|
get onClick() {
|
|
3861
4170
|
return $8tj43$catchify1(on_back_);
|
|
3862
4171
|
},
|
|
@@ -3878,7 +4187,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3878
4187
|
var _el$2 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$2);
|
|
3879
4188
|
var _ref$ = buttonInFieldRef_;
|
|
3880
4189
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3881
|
-
$8tj43$spread(_el$2, $8tj43$
|
|
4190
|
+
$8tj43$spread(_el$2, $8tj43$mergeProps1({
|
|
3882
4191
|
get classList() {
|
|
3883
4192
|
return {
|
|
3884
4193
|
empty: searchFieldEmpty()
|
|
@@ -4686,7 +4995,7 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4686
4995
|
}); // <- could be made reactive getter created in displayTransformers, read it in memo here since it might create computations (for example in the preview-brower), and there's no owner in the onClick handler
|
|
4687
4996
|
const LinkToListing = props => (() => {
|
|
4688
4997
|
var _el$ = $8tj43$getNextElement($26db6925469636a4$var$_tmpl$);
|
|
4689
|
-
$8tj43$spread(_el$, $8tj43$
|
|
4998
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1(props, {
|
|
4690
4999
|
get href() {
|
|
4691
5000
|
return href();
|
|
4692
5001
|
},
|
|
@@ -5102,7 +5411,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5102
5411
|
$8tj43$createComputed($8tj43$on(search_field_value_[0], () => !suggestions_updating_blocked() && set_selected_index(undefined), {
|
|
5103
5412
|
defer: true
|
|
5104
5413
|
})); // reset autocomplete position if query changes
|
|
5105
|
-
return [$8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$
|
|
5414
|
+
return [$8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$mergeProps1(sharedSuggestionProps, {
|
|
5106
5415
|
get title_() {
|
|
5107
5416
|
return i18n_.popular_;
|
|
5108
5417
|
},
|
|
@@ -5112,7 +5421,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5112
5421
|
return itemIndexes_.suggestionsIndex_;
|
|
5113
5422
|
},
|
|
5114
5423
|
showPlaceholders_: () => showPlaceholders() || noResults_() && !noResultsPopularSuggestions.latest
|
|
5115
|
-
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$
|
|
5424
|
+
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$mergeProps1(sharedSuggestionProps, {
|
|
5116
5425
|
get title_() {
|
|
5117
5426
|
return i18n_.previous_;
|
|
5118
5427
|
},
|
|
@@ -5129,7 +5438,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5129
5438
|
return _el$;
|
|
5130
5439
|
})(),
|
|
5131
5440
|
showPlaceholders_: () => false
|
|
5132
|
-
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$
|
|
5441
|
+
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$mergeProps1(sharedSuggestionProps, {
|
|
5133
5442
|
get title_() {
|
|
5134
5443
|
return i18n_.content_;
|
|
5135
5444
|
},
|
|
@@ -5667,7 +5976,7 @@ function $6a439680ae7e9ba3$export$b2539bed5023c21c(props) {
|
|
|
5667
5976
|
return $8tj43$createComponent($6a439680ae7e9ba3$var$TabsContext.Provider, {
|
|
5668
5977
|
value: new (0, $8tj43$ListenableSet)(),
|
|
5669
5978
|
get children() {
|
|
5670
|
-
return $8tj43$createComponent($6a439680ae7e9ba3$var$ActualTabs, $8tj43$
|
|
5979
|
+
return $8tj43$createComponent($6a439680ae7e9ba3$var$ActualTabs, $8tj43$mergeProps1(props, {
|
|
5671
5980
|
get children() {
|
|
5672
5981
|
return props.children;
|
|
5673
5982
|
}
|
|
@@ -5697,7 +6006,7 @@ function $6a439680ae7e9ba3$var$ActualTabs(props) {
|
|
|
5697
6006
|
},
|
|
5698
6007
|
children: item => {
|
|
5699
6008
|
const weSelected = $8tj43$createMemo(() => isSelected(item().id));
|
|
5700
|
-
return $8tj43$createComponent((0, $8tj43$Dynamic), $8tj43$
|
|
6009
|
+
return $8tj43$createComponent((0, $8tj43$Dynamic), $8tj43$mergeProps1({
|
|
5701
6010
|
get component() {
|
|
5702
6011
|
return props.AnchorComponent;
|
|
5703
6012
|
},
|
|
@@ -5808,7 +6117,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
|
|
|
5808
6117
|
if (!currentTabs) throw new Error("Tab must be a child of Tabs");
|
|
5809
6118
|
const id = $8tj43$createUniqueId();
|
|
5810
6119
|
const ourSet = currentTabs;
|
|
5811
|
-
const extendedProps = $8tj43$
|
|
6120
|
+
const extendedProps = $8tj43$mergeProps({
|
|
5812
6121
|
id: id
|
|
5813
6122
|
}, props);
|
|
5814
6123
|
ourSet.add(extendedProps);
|
|
@@ -6346,7 +6655,7 @@ function $6b0fd8fd20df8ccf$var$ActualShopTheLookButton(props) {
|
|
|
6346
6655
|
const displayStyleValue = $8tj43$createMemo(() => hasAnythingToShow() ? "" : "none");
|
|
6347
6656
|
const button = (() => {
|
|
6348
6657
|
var _el$2 = $8tj43$getNextElement($6b0fd8fd20df8ccf$var$_tmpl$2);
|
|
6349
|
-
$8tj43$spread(_el$2, $8tj43$
|
|
6658
|
+
$8tj43$spread(_el$2, $8tj43$mergeProps1(() => localProps.buttonAttributes), false, true);
|
|
6350
6659
|
$8tj43$insert(_el$2, () => {
|
|
6351
6660
|
var _localProps$buttonAtt;
|
|
6352
6661
|
return (localProps === null || localProps === void 0 ? void 0 : (_localProps$buttonAtt = localProps.buttonAttributes) === null || _localProps$buttonAtt === void 0 ? void 0 : _localProps$buttonAtt.children) || "Shop the look";
|
|
@@ -6356,7 +6665,7 @@ function $6b0fd8fd20df8ccf$var$ActualShopTheLookButton(props) {
|
|
|
6356
6665
|
})();
|
|
6357
6666
|
$8tj43$createEffect(() => button.style.display = displayStyleValue()); // Set our attributes like this, so we allow total control over the button from the outside via buttonAttributes
|
|
6358
6667
|
$8tj43$createEffect(() => !hasAnythingToShow() && closeModal()); // close modal if we ever get into the state of having it open and not having anything to show
|
|
6359
|
-
$6b0fd8fd20df8ccf$var$modalProps = $8tj43$
|
|
6668
|
+
$6b0fd8fd20df8ccf$var$modalProps = $8tj43$mergeProps(partForModal, {
|
|
6360
6669
|
products_to_shop_: products_to_shop_
|
|
6361
6670
|
});
|
|
6362
6671
|
button.addEventListener("click", openModal);
|
|
@@ -7102,7 +7411,7 @@ var $ff3225aef892a467$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<svg><path d="M
|
|
|
7102
7411
|
function $ff3225aef892a467$export$f21ab0717a89c77f(props) {
|
|
7103
7412
|
return (() => {
|
|
7104
7413
|
var _el$ = $8tj43$getNextElement($ff3225aef892a467$var$_tmpl$);
|
|
7105
|
-
$8tj43$spread(_el$, $8tj43$
|
|
7414
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1(props, {
|
|
7106
7415
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
7107
7416
|
"width": "11",
|
|
7108
7417
|
"height": "12"
|
|
@@ -8663,7 +8972,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
8663
8972
|
[_el$6, _co$] = $8tj43$getNextMarker(_el$5.nextSibling),
|
|
8664
8973
|
_el$7 = _el$6.nextSibling,
|
|
8665
8974
|
[_el$8, _co$2] = $8tj43$getNextMarker(_el$7.nextSibling);
|
|
8666
|
-
$8tj43$spread(_el$2, $8tj43$
|
|
8975
|
+
$8tj43$spread(_el$2, $8tj43$mergeProps1(attributes, {
|
|
8667
8976
|
get disabled() {
|
|
8668
8977
|
return $8tj43$memo(() => !!count_zero())() && !is_selected();
|
|
8669
8978
|
},
|
|
@@ -10316,7 +10625,7 @@ async function $284849364a6ef73a$var$_run_url_creator_for_suggest2(merchant, mar
|
|
|
10316
10625
|
// Filter out our transformed ancestors
|
|
10317
10626
|
const transformedAncestors = Object.fromEntries(transformerResult.filter(item => item.is_suggestion === false).map(item => [item.listing_id, item]));
|
|
10318
10627
|
// Add the now transformed ancestors into the ancestors of the listing suggestions
|
|
10319
|
-
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $8tj43$
|
|
10628
|
+
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $8tj43$mergeProps(item, {
|
|
10320
10629
|
// Use mergeProps instead of spread since page_url and other properties could be a getter that solid components should call
|
|
10321
10630
|
ancestors: item.ancestors.map(ancestor => {
|
|
10322
10631
|
const newAncestor = transformedAncestors[ancestor.listing_id];
|
|
@@ -10853,7 +11162,7 @@ function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
|
|
|
10853
11162
|
[_el$6, _co$2] = $8tj43$getNextMarker(_el$5.nextSibling);
|
|
10854
11163
|
$8tj43$insert(_el$2, () => i18n_.search_recs_title_());
|
|
10855
11164
|
$8tj43$insert(_el$, (0, $ca55612a53dbbdd2$export$a2cc176055f8f08), _el$4, _co$);
|
|
10856
|
-
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$
|
|
11165
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$mergeProps1({
|
|
10857
11166
|
rows: rows_object,
|
|
10858
11167
|
layout: "grid",
|
|
10859
11168
|
element_attributes: {
|
|
@@ -11598,102 +11907,6 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
11598
11907
|
});
|
|
11599
11908
|
return renderedDisplays_;
|
|
11600
11909
|
}
|
|
11601
|
-
var $64d94dcaa058dc7b$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`),
|
|
11602
|
-
$64d94dcaa058dc7b$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<style type=text/css>`);
|
|
11603
|
-
const $64d94dcaa058dc7b$export$c500183c31c2b22e = "--spans-columns";
|
|
11604
|
-
function $64d94dcaa058dc7b$export$ab6b147eec64fea5(props) {
|
|
11605
|
-
const container_class = "x" + $8tj43$createUniqueId();
|
|
11606
|
-
const container_element_ = (() => {
|
|
11607
|
-
var _el$ = $8tj43$getNextElement($64d94dcaa058dc7b$var$_tmpl$);
|
|
11608
|
-
$8tj43$spread(_el$, $8tj43$mergeProps(() => props.element_attributes, {
|
|
11609
|
-
"classList": {
|
|
11610
|
-
[container_class]: true
|
|
11611
|
-
}
|
|
11612
|
-
}), false, true);
|
|
11613
|
-
$8tj43$insert(_el$, () => props.children);
|
|
11614
|
-
$8tj43$runHydrationEvents();
|
|
11615
|
-
return _el$;
|
|
11616
|
-
})(); // Don't want this in the error boundary below, it should only be for the actual layouting
|
|
11617
|
-
return $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
11618
|
-
message_: "Failed calculating css grid layout",
|
|
11619
|
-
severity_: "error",
|
|
11620
|
-
get children() {
|
|
11621
|
-
return $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element_, false, container_class);
|
|
11622
|
-
}
|
|
11623
|
-
});
|
|
11624
|
-
}
|
|
11625
|
-
function $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element) {
|
|
11626
|
-
let insert_after_container = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
11627
|
-
let container_class = arguments.length > 3 ? arguments[3] : undefined;
|
|
11628
|
-
if (!container_class) {
|
|
11629
|
-
// only try to add if it wasn't provided, so that we have a code path without classList when doing SSR
|
|
11630
|
-
container_class = $8tj43$make_random_classname();
|
|
11631
|
-
container_element.classList.add(container_class);
|
|
11632
|
-
}
|
|
11633
|
-
const container_selector = ".depict .".concat(container_class); // class so ppl can have id if needed
|
|
11634
|
-
const col_styling = $8tj43$createMemo(() => $64d94dcaa058dc7b$var$generate_media_queried_declarations({
|
|
11635
|
-
container_selector_: container_selector,
|
|
11636
|
-
default_grid_spacing_text: props.grid_spacing,
|
|
11637
|
-
cols_at_size_: props.cols_at_size,
|
|
11638
|
-
override_vertical_spacing_: props.override_vertical_spacing,
|
|
11639
|
-
top_row_shortened_by_: props.top_row_shortened_by_()
|
|
11640
|
-
}));
|
|
11641
|
-
const base_styling = $8tj43$createMemo(() => {
|
|
11642
|
-
return "".concat(container_selector, "{display:grid;}");
|
|
11643
|
-
});
|
|
11644
|
-
const get_styling = $8tj43$createMemo(() => base_styling() + col_styling());
|
|
11645
|
-
const style_element = (() => {
|
|
11646
|
-
var _el$2 = $8tj43$getNextElement($64d94dcaa058dc7b$var$_tmpl$2);
|
|
11647
|
-
$8tj43$insert(_el$2, get_styling);
|
|
11648
|
-
return _el$2;
|
|
11649
|
-
})(); // need to create this after set_styling has been called or else there will be no styling in the SSR'd output
|
|
11650
|
-
if (insert_after_container) container_element.after(style_element);
|
|
11651
|
-
return [container_element, style_element];
|
|
11652
|
-
}
|
|
11653
|
-
function $64d94dcaa058dc7b$var$generate_media_queried_declarations(_ref) {
|
|
11654
|
-
let {
|
|
11655
|
-
container_selector_: container_selector_,
|
|
11656
|
-
default_grid_spacing_text: default_grid_spacing_text,
|
|
11657
|
-
cols_at_size_: cols_at_size_,
|
|
11658
|
-
override_vertical_spacing_: override_vertical_spacing_,
|
|
11659
|
-
top_row_shortened_by_: top_row_shortened_by_
|
|
11660
|
-
} = _ref;
|
|
11661
|
-
return cols_at_size_.map(options => {
|
|
11662
|
-
const [n_cols, min, max, grid_spacing_for_size] = options;
|
|
11663
|
-
const main_spacing_to_use = grid_spacing_for_size || default_grid_spacing_text;
|
|
11664
|
-
// See comment in else block below
|
|
11665
|
-
const can_use_gap = override_vertical_spacing_ ? $64d94dcaa058dc7b$var$can_use_gap_for_unit(override_vertical_spacing_) : $64d94dcaa058dc7b$var$can_use_gap_for_unit(main_spacing_to_use);
|
|
11666
|
-
let spacing_styling;
|
|
11667
|
-
let additional_styling = ""; // outside the media query
|
|
11668
|
-
if (can_use_gap) spacing_styling = "gap:".concat(main_spacing_to_use, ";").concat(override_vertical_spacing_ ? "row-gap:".concat(override_vertical_spacing_, ";") : "");else {
|
|
11669
|
-
// When using percent units, which our default styling does (because convenient) and our interface relies on (hard to specify different gaps for different screen sizes)
|
|
11670
|
-
// row gaps in grids are relative to the whole height of the grid, maybe see also https://stackoverflow.com/a/53563865. The issue with that is that as we load more products, the gap grows. Also, it breaks existing integrations.
|
|
11671
|
-
// Logical thought: use margins for the vertical spacing. But margins in grids are apparently relative to the size of the individual items in grids.
|
|
11672
|
-
// Given that, and that content blocks can be of different width, we have to do some complicated calculations to convert the provided gap, which is in gap of the total container width, to a margin of the individual items.
|
|
11673
|
-
const vertical_spacing_to_use = override_vertical_spacing_ !== null && override_vertical_spacing_ !== void 0 ? override_vertical_spacing_ : main_spacing_to_use;
|
|
11674
|
-
const width_multiplier = "var(".concat($64d94dcaa058dc7b$export$c500183c31c2b22e, ", 1)"); // How many cards wide the current item is (needed because content blocks)
|
|
11675
|
-
const one_item_width_exclusing_gaps = "calc(calc(100 / ".concat(n_cols, ") - calc(calc(").concat(n_cols * 2 - 2, " * calc(").concat($64d94dcaa058dc7b$var$strip_percent_unit(vertical_spacing_to_use), " / 2)) / ").concat(n_cols, "))"); // Width of one item in percent of the whole
|
|
11676
|
-
// Equation from layout.tsx, also used in CheckboxGrid. Needs half spacing for some reason
|
|
11677
|
-
const this_item_width_meat = "calc(".concat(one_item_width_exclusing_gaps, " * ").concat(width_multiplier, ")"); // Width of just the card
|
|
11678
|
-
const this_item_width_gaps = "calc(calc(".concat(width_multiplier, " - 1) * ").concat($64d94dcaa058dc7b$var$strip_percent_unit(vertical_spacing_to_use), ")"); // Width of the gaps
|
|
11679
|
-
const this_item_width = "calc(".concat(this_item_width_meat, " + ").concat(this_item_width_gaps, ")"); // Width of this item including gaps
|
|
11680
|
-
// this_item_width needs to be unitless, and since plain css can't do calc(40% / 5%) which would become unitless we need to strip all units in the calculations before
|
|
11681
|
-
const convert_top_spacing_to_item_width_percentage = spacing => "calc(calc(100 / ".concat(this_item_width, ") * ").concat(spacing, ")"); // Now finally we can convert the desired spacing to a percentage of this individual item's width (including gaps that would be there but aren't because content blocks span them)
|
|
11682
|
-
spacing_styling = "column-gap:".concat(main_spacing_to_use, ";"); // Still use gaps in the horizontal direction because that works flawlessly
|
|
11683
|
-
// Re-use old layout code to get the correct :nth-child declarations for the top margins
|
|
11684
|
-
additional_styling = $8tj43$n_col_styling_with_dist(container_selector_ + ">", convert_top_spacing_to_item_width_percentage(default_grid_spacing_text), [[n_cols, min, max, grid_spacing_for_size ? convert_top_spacing_to_item_width_percentage(grid_spacing_for_size) : null]], "grid", override_vertical_spacing_ ? convert_top_spacing_to_item_width_percentage(override_vertical_spacing_) : override_vertical_spacing_, top_row_shortened_by_);
|
|
11685
|
-
}
|
|
11686
|
-
const media_query_body = "".concat(container_selector_, "{").concat(spacing_styling, "grid-template-columns:repeat(").concat(n_cols, ",minmax(0,1fr));}");
|
|
11687
|
-
return "".concat($8tj43$layout_media_query_header(min, max), "{").concat(media_query_body, "}").concat(additional_styling);
|
|
11688
|
-
}).join("");
|
|
11689
|
-
}
|
|
11690
|
-
function $64d94dcaa058dc7b$var$can_use_gap_for_unit(spacing) {
|
|
11691
|
-
const trimmed_spacing = spacing.trim();
|
|
11692
|
-
return !trimmed_spacing.includes("%");
|
|
11693
|
-
}
|
|
11694
|
-
function $64d94dcaa058dc7b$var$strip_percent_unit(css_value) {
|
|
11695
|
-
return css_value.replaceAll("%", "");
|
|
11696
|
-
}
|
|
11697
11910
|
function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
|
|
11698
11911
|
let {
|
|
11699
11912
|
layout_options_: layout_options_,
|
|
@@ -11720,226 +11933,6 @@ function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
|
|
|
11720
11933
|
}) : when_filters_closed_cols;
|
|
11721
11934
|
});
|
|
11722
11935
|
}
|
|
11723
|
-
function $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_) {
|
|
11724
|
-
const size_active = $8tj43$createMemo(() => cols_at_size_().map(_ref => {
|
|
11725
|
-
let [n_cols, min_width, max_width] = _ref;
|
|
11726
|
-
const media_query = $8tj43$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
11727
|
-
const matches = $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query);
|
|
11728
|
-
return [matches, n_cols];
|
|
11729
|
-
}));
|
|
11730
|
-
const n_cols_currently_showing = $8tj43$createMemo(() => {
|
|
11731
|
-
try {
|
|
11732
|
-
const [, n_cols_currently_showing] = size_active().find(_ref2 => {
|
|
11733
|
-
let [media_query] = _ref2;
|
|
11734
|
-
return media_query();
|
|
11735
|
-
});
|
|
11736
|
-
return n_cols_currently_showing;
|
|
11737
|
-
} catch (e) {
|
|
11738
|
-
$8tj43$dwarn("No active size found in columnsAtSize - can't render content blocks or looks");
|
|
11739
|
-
return null;
|
|
11740
|
-
}
|
|
11741
|
-
});
|
|
11742
|
-
return n_cols_currently_showing;
|
|
11743
|
-
}
|
|
11744
|
-
var $ff7feae4dddd6073$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=content-block-wrapper>`);
|
|
11745
|
-
function $ff7feae4dddd6073$export$791ef57e62e21c3f(_ref) {
|
|
11746
|
-
let {
|
|
11747
|
-
content_blocks_: incoming_content_blocks,
|
|
11748
|
-
cols_at_size_: cols_at_size_,
|
|
11749
|
-
set_top_row_shortened_by_: set_top_row_shortened_by_
|
|
11750
|
-
} = _ref;
|
|
11751
|
-
// these are by row
|
|
11752
|
-
const [content_blocks, set_content_blocks] = $8tj43$createStore([]);
|
|
11753
|
-
const n_cols_currently_showing_ = $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_);
|
|
11754
|
-
$8tj43$createEffect(() => {
|
|
11755
|
-
const incoming_value = incoming_content_blocks();
|
|
11756
|
-
if (!incoming_value) {
|
|
11757
|
-
set_content_blocks([]);
|
|
11758
|
-
return;
|
|
11759
|
-
}
|
|
11760
|
-
set_content_blocks($8tj43$reconcile(incoming_value, {
|
|
11761
|
-
key: "content"
|
|
11762
|
-
})); // key: Make moving blocks faster, see https://github.com/solidjs/solid/issues/1925#issuecomment-1769671596
|
|
11763
|
-
});
|
|
11764
|
-
|
|
11765
|
-
const get_wrapped_blocks_ = $ff7feae4dddd6073$var$wrap_blocks_in_div(content_blocks, n_cols_currently_showing_);
|
|
11766
|
-
$8tj43$createComputed(() => {
|
|
11767
|
-
// Update our styling if a content block forces some items that should be in the top row into a lower one, so we can generate margin-top declarations for them
|
|
11768
|
-
const top_row_block = get_wrapped_blocks_()[0];
|
|
11769
|
-
const blocks_in_top_row_taken = top_row_block === null || top_row_block === void 0 ? void 0 : top_row_block.span_columns;
|
|
11770
|
-
if (blocks_in_top_row_taken == undefined) {
|
|
11771
|
-
// Fall back to zero if no content block in top row, since then no blocks in top row are taken
|
|
11772
|
-
set_top_row_shortened_by_(0);
|
|
11773
|
-
return;
|
|
11774
|
-
}
|
|
11775
|
-
set_top_row_shortened_by_(blocks_in_top_row_taken - 1); // minus one because the content block wrapper also is an element
|
|
11776
|
-
});
|
|
11777
|
-
|
|
11778
|
-
return $ff7feae4dddd6073$var$remap_blocks_to_index({
|
|
11779
|
-
get_wrapped_blocks_: get_wrapped_blocks_,
|
|
11780
|
-
n_cols_currently_showing_: n_cols_currently_showing_
|
|
11781
|
-
});
|
|
11782
|
-
}
|
|
11783
|
-
/**
|
|
11784
|
-
* Calculate where to put each of the finished wrapped content blocks. Also limit blocks' max width.
|
|
11785
|
-
* @returns an array where index is index of the blocks in the "displays array" and value is the content block (elements) to show at that index
|
|
11786
|
-
*/
|
|
11787
|
-
function $ff7feae4dddd6073$var$remap_blocks_to_index(_ref2) {
|
|
11788
|
-
let {
|
|
11789
|
-
get_wrapped_blocks_: get_wrapped_blocks_,
|
|
11790
|
-
n_cols_currently_showing_: n_cols_currently_showing_
|
|
11791
|
-
} = _ref2;
|
|
11792
|
-
return $8tj43$createMemo(() => {
|
|
11793
|
-
// This computation should be quite cheap since it just moves around things into an array
|
|
11794
|
-
const content_blocks_by_index = [];
|
|
11795
|
-
const constructed_block_arrays = new WeakSet();
|
|
11796
|
-
const wrapped_blocks = get_wrapped_blocks_();
|
|
11797
|
-
const cols_showing = n_cols_currently_showing_();
|
|
11798
|
-
// Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
|
|
11799
|
-
const displaced_products = []; // undefined = is product, true = is content block if number instead of tuple number indicates content blocks in that row. Index in first array is row, index in second array is column
|
|
11800
|
-
if (!cols_showing)
|
|
11801
|
-
// Nope out of here if we don't know how many columns are showing
|
|
11802
|
-
return content_blocks_by_index;
|
|
11803
|
-
for (let i = 0; i < wrapped_blocks.length; i++) {
|
|
11804
|
-
// i = row to show at
|
|
11805
|
-
const block = wrapped_blocks[i];
|
|
11806
|
-
if (!block) continue; // Array can have holes/not defined places
|
|
11807
|
-
const index_of_first_item_in_row = i * cols_showing;
|
|
11808
|
-
const index_of_last_item_in_row = index_of_first_item_in_row + cols_showing;
|
|
11809
|
-
const {
|
|
11810
|
-
span_rows: span_rows,
|
|
11811
|
-
position: position,
|
|
11812
|
-
span_columns: span_columns
|
|
11813
|
-
} = block; // span columns is already capped in the block wrapping step (wrap_blocks_in_div)
|
|
11814
|
-
let target_index;
|
|
11815
|
-
if (position === "left") target_index = index_of_first_item_in_row;else if (position === "right") target_index = index_of_last_item_in_row - span_columns;else if (position === "center") target_index = index_of_first_item_in_row + Math.floor((cols_showing - span_columns) / 2);else throw new Error("Invalid position for content block - must be left, right or center: " + JSON.stringify(position));
|
|
11816
|
-
// Calculate displacement of us by content blocks above us
|
|
11817
|
-
let displacement_by_added_blocks = 0;
|
|
11818
|
-
for (let j = 0; j < i; j++) {
|
|
11819
|
-
const row = displaced_products[j];
|
|
11820
|
-
if (row === undefined) continue; // there were no blocks in this row
|
|
11821
|
-
let displaced_items_in_row;
|
|
11822
|
-
if (typeof row === "number") displaced_items_in_row = row;else {
|
|
11823
|
-
displaced_items_in_row = row.filter(item => item).length;
|
|
11824
|
-
displaced_products[j] = displaced_items_in_row;
|
|
11825
|
-
}
|
|
11826
|
-
displacement_by_added_blocks += displaced_items_in_row;
|
|
11827
|
-
}
|
|
11828
|
-
const index_of_us_in_row = target_index - index_of_first_item_in_row;
|
|
11829
|
-
for (let j = 0; j < index_of_us_in_row; j++) {
|
|
11830
|
-
var _displaced_products$i;
|
|
11831
|
-
if ((_displaced_products$i = displaced_products[i]) !== null && _displaced_products$i !== void 0 && _displaced_products$i[j])
|
|
11832
|
-
// Add blocks in our *current* row to the displacement, but only the ones to our left
|
|
11833
|
-
displacement_by_added_blocks++;
|
|
11834
|
-
}
|
|
11835
|
-
// Add block to output array at the correct index
|
|
11836
|
-
const final_target_index = target_index - displacement_by_added_blocks;
|
|
11837
|
-
const existing_block = content_blocks_by_index[final_target_index];
|
|
11838
|
-
const block_content = block.content;
|
|
11839
|
-
// If two blocks want to exist at the same location (can happen, for example if one block wants to be at the end of a row and the other one at the start of the next row) add an array with both
|
|
11840
|
-
if (existing_block) {
|
|
11841
|
-
if (constructed_block_arrays.has(existing_block))
|
|
11842
|
-
// Only push to arrays we have created to not create funky bugs when there's an array in JSX.Element
|
|
11843
|
-
existing_block.push(block_content);else {
|
|
11844
|
-
const array = [existing_block, block_content];
|
|
11845
|
-
constructed_block_arrays.add(array);
|
|
11846
|
-
content_blocks_by_index[final_target_index] = array;
|
|
11847
|
-
}
|
|
11848
|
-
} else content_blocks_by_index[final_target_index] = block_content;
|
|
11849
|
-
// Update displacement
|
|
11850
|
-
for (let j = 0; j < span_rows; j++) {
|
|
11851
|
-
var _ref3;
|
|
11852
|
-
const row = displaced_products[_ref3 = i + j] || (displaced_products[_ref3] = []);
|
|
11853
|
-
for (let k = index_of_us_in_row; k < index_of_us_in_row + span_columns; k++) row[k] = true;
|
|
11854
|
-
}
|
|
11855
|
-
}
|
|
11856
|
-
return content_blocks_by_index;
|
|
11857
|
-
});
|
|
11858
|
-
}
|
|
11859
|
-
/**
|
|
11860
|
-
* Takes a store that contains an array from where index is number of row and value is the result of executing the content block rendering function.
|
|
11861
|
-
* Then renders the content and wraps it into a div with the correct styling.
|
|
11862
|
-
* Also caps span_columns to max available columns
|
|
11863
|
-
*/
|
|
11864
|
-
function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
11865
|
-
const get_wrapped_blocks = $8tj43$mapArray(() => rendered_content_blocks, block => {
|
|
11866
|
-
if (!block) return;
|
|
11867
|
-
const final_span_columns = $8tj43$createMemo(() => {
|
|
11868
|
-
var _max_span_columns;
|
|
11869
|
-
return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
|
|
11870
|
-
});
|
|
11871
|
-
// If the item spans an entire row, limit the height to 1 row since there's no concept of "rows" if there are no products beside the block
|
|
11872
|
-
const final_span_rows = $8tj43$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
11873
|
-
const [rendering_delayed, set_rendering_delayed_] = $8tj43$createSignal(true);
|
|
11874
|
-
const content = $8tj43$createComponent((0, $8tj43$Show), {
|
|
11875
|
-
get when() {
|
|
11876
|
-
return !rendering_delayed();
|
|
11877
|
-
},
|
|
11878
|
-
get children() {
|
|
11879
|
-
var _el$ = $8tj43$getNextElement($ff7feae4dddd6073$var$_tmpl$);
|
|
11880
|
-
$8tj43$insert(_el$, $8tj43$createComponent($ff7feae4dddd6073$var$RenderContent, {
|
|
11881
|
-
get content() {
|
|
11882
|
-
return block.content;
|
|
11883
|
-
}
|
|
11884
|
-
}));
|
|
11885
|
-
$8tj43$effect(_p$ => {
|
|
11886
|
-
var _v$ = {
|
|
11887
|
-
[(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: final_span_columns()
|
|
11888
|
-
},
|
|
11889
|
-
_v$2 = "span ".concat(final_span_columns()),
|
|
11890
|
-
_v$3 = "span ".concat(final_span_rows());
|
|
11891
|
-
_p$.e = $8tj43$style(_el$, _v$, _p$.e);
|
|
11892
|
-
_v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
|
|
11893
|
-
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
|
|
11894
|
-
return _p$;
|
|
11895
|
-
}, {
|
|
11896
|
-
e: undefined,
|
|
11897
|
-
t: undefined,
|
|
11898
|
-
a: undefined
|
|
11899
|
-
});
|
|
11900
|
-
return _el$;
|
|
11901
|
-
}
|
|
11902
|
-
});
|
|
11903
|
-
return $8tj43$mergeProps1(block, {
|
|
11904
|
-
// Create content divs for the blocks with as much fine-grained diffing as possible?
|
|
11905
|
-
content: () => {
|
|
11906
|
-
// Sneaky on-demand rendering, so we don't render more blocks than we can show: we have the rendered value here and don't return a function that renders because if our block would be moved around we'd be guaranteed to re-render
|
|
11907
|
-
// However, no need to count products to know if we should render: the <For> loops in Placeholders and render_displays will only call this function if there's actually a product here that wants to display this block
|
|
11908
|
-
set_rendering_delayed_(false);
|
|
11909
|
-
return content;
|
|
11910
|
-
},
|
|
11911
|
-
get span_columns() {
|
|
11912
|
-
// Cap max width of block to the number of columns available, for everyone downstream
|
|
11913
|
-
return final_span_columns();
|
|
11914
|
-
},
|
|
11915
|
-
get span_rows() {
|
|
11916
|
-
return final_span_rows();
|
|
11917
|
-
}
|
|
11918
|
-
});
|
|
11919
|
-
});
|
|
11920
|
-
return get_wrapped_blocks;
|
|
11921
|
-
}
|
|
11922
|
-
/**
|
|
11923
|
-
* Basically adds support for async content block functions and shows a rudimentary placeholder if rendering is delayed. Required due to react having a rendering delay.
|
|
11924
|
-
*/
|
|
11925
|
-
function $ff7feae4dddd6073$var$RenderContent(props) {
|
|
11926
|
-
const [resource] = $8tj43$createResource(() => props.content,
|
|
11927
|
-
// Could be reactive
|
|
11928
|
-
fn => fn());
|
|
11929
|
-
$8tj43$createEffect(() => {
|
|
11930
|
-
if (resource.error) console.error("Error in content block rendering", resource.error);
|
|
11931
|
-
});
|
|
11932
|
-
// The suspense is for when there's an async content block (which we have to support due to react having a rendering delay) so that we can show some height while it's loading (should kinda never be visible)
|
|
11933
|
-
return $8tj43$createComponent((0, $8tj43$Suspense), {
|
|
11934
|
-
get fallback() {
|
|
11935
|
-
return $8tj43$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
|
|
11936
|
-
width: "100%",
|
|
11937
|
-
height: "max(100%, 400px)"
|
|
11938
|
-
});
|
|
11939
|
-
},
|
|
11940
|
-
children: resource
|
|
11941
|
-
});
|
|
11942
|
-
}
|
|
11943
11936
|
var $7faea0096f14b59b$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=PLP-results><!$><!/><!$><!/>`);
|
|
11944
11937
|
function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
11945
11938
|
let {
|
|
@@ -12150,7 +12143,7 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
12150
12143
|
} = slider;
|
|
12151
12144
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
12152
12145
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
12153
|
-
$8tj43$createComponent(Layout, $8tj43$
|
|
12146
|
+
$8tj43$createComponent(Layout, $8tj43$mergeProps1(layout_options_, {
|
|
12154
12147
|
rows: "all",
|
|
12155
12148
|
get cols_at_size() {
|
|
12156
12149
|
return modified_cols_at_size();
|
|
@@ -12679,7 +12672,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12679
12672
|
get children() {
|
|
12680
12673
|
return (() => {
|
|
12681
12674
|
var _el$34 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$5);
|
|
12682
|
-
$8tj43$insert(_el$34, $8tj43$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), $8tj43$
|
|
12675
|
+
$8tj43$insert(_el$34, $8tj43$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), $8tj43$mergeProps1(args_for_filtering_, {
|
|
12683
12676
|
are_in_modal_: true
|
|
12684
12677
|
})));
|
|
12685
12678
|
return _el$34;
|
|
@@ -13492,7 +13485,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
13492
13485
|
[_el$8, _co$] = $8tj43$getNextMarker(_el$7.nextSibling),
|
|
13493
13486
|
_el$9 = _el$8.nextSibling,
|
|
13494
13487
|
[_el$10, _co$2] = $8tj43$getNextMarker(_el$9.nextSibling);
|
|
13495
|
-
$8tj43$insert(_el$4, $8tj43$createComponent(LinkIfPossible, $8tj43$
|
|
13488
|
+
$8tj43$insert(_el$4, $8tj43$createComponent(LinkIfPossible, $8tj43$mergeProps1(make_link_attributes, {
|
|
13496
13489
|
tabIndex: "-1",
|
|
13497
13490
|
get children() {
|
|
13498
13491
|
return $8tj43$createComponent((0, $3c5e15c6ee4227a9$export$605674723bcc715c), {
|
|
@@ -13501,7 +13494,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
13501
13494
|
});
|
|
13502
13495
|
}
|
|
13503
13496
|
})));
|
|
13504
|
-
$8tj43$insert(_el$5, $8tj43$createComponent(LinkIfPossible, $8tj43$
|
|
13497
|
+
$8tj43$insert(_el$5, $8tj43$createComponent(LinkIfPossible, $8tj43$mergeProps1({
|
|
13505
13498
|
"class": "content-title line-clamp"
|
|
13506
13499
|
}, make_link_attributes, {
|
|
13507
13500
|
get title() {
|
|
@@ -13670,7 +13663,7 @@ function $d53ebed6f63304e4$export$6d0c9c22f6652669(_ref) {
|
|
|
13670
13663
|
},
|
|
13671
13664
|
number_of_results_: num_results
|
|
13672
13665
|
}), _el$3, _co$);
|
|
13673
|
-
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$
|
|
13666
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$mergeProps1({
|
|
13674
13667
|
layout: "grid",
|
|
13675
13668
|
element_attributes: {
|
|
13676
13669
|
class: "cards"
|
|
@@ -14088,7 +14081,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14088
14081
|
var _search_results_4, _search_results_4$con;
|
|
14089
14082
|
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_)();
|
|
14090
14083
|
});
|
|
14091
|
-
const results_for = $8tj43$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $8tj43$
|
|
14084
|
+
const results_for = $8tj43$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $8tj43$mergeProps1({
|
|
14092
14085
|
get type() {
|
|
14093
14086
|
return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).products;
|
|
14094
14087
|
},
|
|
@@ -16257,7 +16250,7 @@ function $4b4b262708b516ee$var$add_us_to_crumbs(plp_meta) {
|
|
|
16257
16250
|
var _plp_meta3;
|
|
16258
16251
|
const api_value = (_plp_meta3 = plp_meta()) === null || _plp_meta3 === void 0 ? void 0 : _plp_meta3.breadcrumbs;
|
|
16259
16252
|
if (!api_value) return api_value;
|
|
16260
|
-
return [...api_value, $8tj43$
|
|
16253
|
+
return [...api_value, $8tj43$mergeProps(plp_meta(), {
|
|
16261
16254
|
get page_url() {
|
|
16262
16255
|
return href_accessor();
|
|
16263
16256
|
}
|
|
@@ -16369,4 +16362,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16369
16362
|
}, "Entire CategoryPage failed");
|
|
16370
16363
|
}
|
|
16371
16364
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
16372
|
-
export { $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|
|
16365
|
+
export { $ff7feae4dddd6073$export$92aa5d691d588f3f as remap_blocks_to_index, $715f7f2e53146662$export$d4d96868197be50e as useMobileHover, $a35e6f680c5bbc60$export$54299a3c81f5425 as useVisibilityState, $002f09d00aac50b2$export$eaa625fb39439e37 as useSlidableInformation, $618bd53ea0a41cd4$export$80bb7300ce6a8be3 as useProductCardIsVisible, $618bd53ea0a41cd4$export$f223d69ed12f5fb7 as CurrentlyIntersectingContext, $8e8b179489080711$export$5bad61ecde080b1f as useExpandingContainerReactive, $bb34cd283e904784$export$2c9f9bf2092486aa as LooksSliderOrGrid, $22dd375b476673e2$export$44809a8a3e867e30 as LookCard, $ac571292d606f30b$export$7e1297a3a19f10d8 as PseudoRouter, $6d75ec14f537c37f$export$83bb9af5671e1dbe as promiseSafeStructuredClone, $68e6625c8d51f847$export$5162a71f252e6122 as preserve_items_in_history_dot_state, $68e6625c8d51f847$export$3064e1e8c6513da3 as prefixes_to_preserve_in_history_dot_state, $9b35d1384e31813a$export$29d28dadc2d6b631 as allowNativeNavigation, $b026fa9c9c904a98$export$1ea76ea778b880dd as modalVersionSymbol, $a604a8ffa4e4c03f$export$e417c49320921907 as createDeparallelizedNoDropResource, $01c33966d9ddb108$export$f50b88e2a00918b5 as throw_globally, $40411f2ec772c376$export$9265e66f26f8e383 as ClassicSearchModal, $06fcd2a345efd24d$export$b0c55aa2e87c4be7 as SearchModalV2, $98688279b9059f50$export$9d4a4b669b1929ab as ModernResponsiveContainedImage, $6a439680ae7e9ba3$export$3e41faf802a29e71 as Tab, $6a439680ae7e9ba3$export$b2539bed5023c21c as Tabs, $6b0fd8fd20df8ccf$export$d4973c31938cbfd1 as ShopTheLookButton, $972f6bce0f9d61be$export$e183a13865960371 as history_dot_state_to_state, $2855bffe06ef7a03$export$916e6850778505f6 as strip_encoded_filter_and_sort, $2855bffe06ef7a03$export$58aa3f171519b6d7 as encode_filters, $2855bffe06ef7a03$export$f934fa24c3a86811 as decode_filters, $2855bffe06ef7a03$export$62acb285a7579555 as encode_sorting, $2855bffe06ef7a03$export$766e9676e74997d3 as decode_sorting, $4df489344a0f97c7$export$d7b7ab832c20e2f4 as shopifyContainedImageContextSymbol, $5441862cd2f5e111$export$e68cff63f76bd15b as ListingProvider, $5441862cd2f5e111$export$8d0c4fdbb05a2f2e as useListing, $1e69163caedaab4e$export$11354f017ddc9790 as ProductCardIndexProvider, $1e69163caedaab4e$export$e3faf4d95300054f as useProductCardIndex, $4df489344a0f97c7$export$e4b984597b71e989 as ShopifyContainedImage, $002f09d00aac50b2$export$6649caad96ef8870 as SlidableItems, $fc830a7ee59416ef$export$ebdc3711f7e02ccd as make_accurate_width_accessor, $d5d7e58c5c9d8db0$export$9574e176201e5e8d as RecommendationSlider, $b432b11321ad4c97$export$9756467d34d91cdb as RecommendationGrid, $56047603f9d212b6$export$6e5611bc7e57e477 as ShopifyResponsiveImg, $56047603f9d212b6$export$e6fffe67d4cdd848 as makeSizeAccessor, $801e8845d3fa3653$export$94026ee33dbabc26 as ImageContainer, $74777e8fe65b3dcb$export$b69d0d92862de18b as SentryErrorBoundary, $74777e8fe65b3dcb$export$240ecf5363d76c0f as ExtraSentryContextProvider, $ad371564683947ab$export$6c6d7a51fa9aa15d as ExpandingDetails, $e18ab2868df26f40$export$f091cbac892643a4 as accessor_of_object_to_object_with_accessor_values, $4711a82d08d2021b$export$fecbb157621501bd as SelectedFilters, $f6b0500577e1b210$export$3f1a388cc0d8fed7 as FilterBody, $44aa24b1bb793549$export$b288c38ae3fddb56 as create_modified_filters, $63f1f8dbcd07d3b0$export$d21e32dfedac04be as SolidLayout, $63f1f8dbcd07d3b0$export$445d8d3f5f706a40 as SolidLayoutWithProvidedElement, $d5f1e6a0f9117286$export$79b1565500412d9b as general_modal_abstraction, $9783d437ad61594c$export$3b621d86b1566b2 as CrossIcon, $ca6ab5f08bd28bca$export$8be2714ec7f169ee as GenericSliderArrowButton, $50aebf5b445518eb$export$58e808b1db15d3bc as fetchDepictRecommendations, $fa332ea03168857c$export$b91cec6bdc6b32a1 as CategoryTitle, $702d7656a373973e$export$824dde41348efed1 as embedded_num_products, $160ea2b55d8772d2$export$c1a6b039e689a58e as get_listings, $f5f54892fd0c7d9f$export$f34314aa9505732e as DepictCategory, $eb064bc3350276c1$export$ac6237957a15b3f0 as DepictSearch, $eb064bc3350276c1$export$bde3eb976dfded9 as get_search_query_updating_blocked_signal, $eb064bc3350276c1$export$f2dc7e4e4aa11abb as SearchPage, $f3b7124b76123e44$export$aa14a9f43128f61f as ProductCardError, $169c13c0531d91d2$export$d86a33413558014e as open_modal_with_alignment, $5eaa00b951637e96$export$ee1733d9a8495996 as DefaultInstantCardPlaceholder, $1308a7816c3d4f2d$export$b3ad617e9036868 as align_field, $1308a7816c3d4f2d$export$3f238c96c45e6cc6 as ALIGN_TOP, $1308a7816c3d4f2d$export$902f8b4a7dae5d78 as ALIGN_WIDTH_ON_MODAL, $1308a7816c3d4f2d$export$7895aadd1956b1c7 as ALIGN_LEFT, $1308a7816c3d4f2d$export$6060bc6bee850eb6 as SET_CENTERED_LEFT, $a9c7ba6087881ac2$export$6daf8749b65a1b77 as convert_sdk_cols_at_size_to_layout, $cc64aabf2c7a1f1a$export$1233ca167bf71f9a as styles_to_valid_css_string, $e56d241d0f33d459$export$fe334901e8bebd57 as disable_scrolling, $573c007c697a1831$export$d0596b5cae35ad4 as open_search_with_shift_slash, $284849364a6ef73a$export$e015ed2f2950f2e3 as DepictAPI, $00a5b94f0c11efbb$export$d9f36cf74e24d595 as media_query_to_accessor, $e60a76195ac6d408$export$689e204eadb33baf as setup_fast_leave, $a61a2051e15c8d7a$export$5196e4c01fa56fcb as show_toast, $60ec7a29849d81db$export$a71e92cfbb498adc as SolidFormatPrice, $37e8c97bb6876197$export$828dcdd425fd3231 as connect_search_field_height_to_aligner_height, $bc2337c9a05ecd18$export$acb3eaade4b23afd as BasePlaceholder, $ceafb6fb91c6f394$export$89c6019e4baa40b1 as TextPlaceholder, $3ab4aa97880fb88d$export$3f37af283f8fb843 as ImagePlaceholder, $f9fd3017c20b774a$export$3ccaa27d81dd8556 as PageReplacer, $d399250dfa491636$export$864d304a0bc46829 as defaultGridSpacing, $d399250dfa491636$export$c3834fa86c616831 as defaultColsAtSize, $d399250dfa491636$export$7bf543b9d9be2c22 as defaultCategoryTitlePlugin, $8db9a15135765c11$export$83d89fbfd8236492 as version, $a3026fb727bc7550$export$316f6f283ae64765 as SearchField, $62a8813a51fbd22f$export$5b7c3ce0ebe51f86 as BreadCrumbs, $62a8813a51fbd22f$export$de035477d6fef996 as QuickLinks, $8821a19349c36651$export$e2bf8ce7779e827e as CategoryPage };
|