@depict-ai/ui 4.7.28 → 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 +437 -439
- package/ES10/index.d.ts +100 -83
- package/ES10/index.js +475 -478
- package/latest/index.cjs +419 -424
- package/latest/index.d.ts +100 -83
- package/latest/index.js +456 -462
- package/package.json +1 -1
- package/server/ES10/index.cjs +248 -254
- package/server/ES10/index.d.ts +100 -83
- package/server/ES10/index.js +289 -296
- package/server/latest/index.cjs +231 -237
- package/server/latest/index.d.ts +100 -83
- package/server/latest/index.js +273 -280
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_));
|
|
@@ -1017,69 +1385,10 @@ function $5441862cd2f5e111$export$e68cff63f76bd15b(props) {
|
|
|
1017
1385
|
get children() {
|
|
1018
1386
|
return props.children;
|
|
1019
1387
|
}
|
|
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];
|
|
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, () => {
|
|
@@ -1785,7 +2094,10 @@ function $275d06a183ca0a29$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1785
2094
|
var _el$ = $8tj43$getNextElement($275d06a183ca0a29$var$_tmpl$),
|
|
1786
2095
|
_el$2 = _el$.firstChild;
|
|
1787
2096
|
$8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify1(() => supportsHover_() && setUserWantsExpanded(false)));
|
|
1788
|
-
$8tj43$addEventListener(_el$2, "mouseenter", $8tj43$catchify1(() =>
|
|
2097
|
+
$8tj43$addEventListener(_el$2, "mouseenter", $8tj43$catchify1(() => {
|
|
2098
|
+
var _displays_;
|
|
2099
|
+
return ((_displays_ = displays_()) === null || _displays_ === void 0 ? void 0 : _displays_.length) && supportsHover_() && setUserWantsExpanded(true);
|
|
2100
|
+
}));
|
|
1789
2101
|
$8tj43$use(el => {
|
|
1790
2102
|
$8tj43$createEffect(() => {
|
|
1791
2103
|
if (userWantsExpanded()) return;
|
|
@@ -1838,7 +2150,7 @@ function $275d06a183ca0a29$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1838
2150
|
}
|
|
1839
2151
|
}));
|
|
1840
2152
|
$8tj43$effect(_p$ => {
|
|
1841
|
-
var _v$ = !!
|
|
2153
|
+
var _v$ = !!userWantsExpanded(),
|
|
1842
2154
|
_v$2 = !!(!getSecondPartAnimationRunning() && userWantsExpanded()),
|
|
1843
2155
|
_v$3 = displays_() &&
|
|
1844
2156
|
// The styling is written like this to eke out animation smoothness on low CPU devices, git blame for previous, more readable versions.
|
|
@@ -1917,6 +2229,7 @@ function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
|
1917
2229
|
} else prev.delete(us);
|
|
1918
2230
|
return prev;
|
|
1919
2231
|
}));
|
|
2232
|
+
$8tj43$createEffect(() => !display_() && setUserWantsExpanded(false));
|
|
1920
2233
|
if (slidableInformation) {
|
|
1921
2234
|
const ourVisiblityInSlider = $8tj43$createMemo(() => {
|
|
1922
2235
|
var _slidableInformation$, _slidableInformation$2;
|
|
@@ -1944,7 +2257,7 @@ function $22dd375b476673e2$export$44809a8a3e867e30(_ref) {
|
|
|
1944
2257
|
[_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
|
|
1945
2258
|
_el$4 = _el$3.nextSibling,
|
|
1946
2259
|
[_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
|
|
1947
|
-
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => setUserWantsExpanded(prev => !prev)), true);
|
|
2260
|
+
$8tj43$addEventListener(_el$, "click", $8tj43$catchify1(() => display_() && setUserWantsExpanded(prev => !prev)), true);
|
|
1948
2261
|
$8tj43$use(el => {
|
|
1949
2262
|
container = el;
|
|
1950
2263
|
const ro = new ResizeObserver($8tj43$catchify1(records => {
|
|
@@ -2181,7 +2494,7 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
2181
2494
|
_el$6 = _el$5.nextSibling,
|
|
2182
2495
|
[_el$7, _co$2] = $8tj43$getNextMarker(_el$6.nextSibling);
|
|
2183
2496
|
$8tj43$insert(_el$3, (0, $ca55612a53dbbdd2$export$a2cc176055f8f08), _el$5, _co$);
|
|
2184
|
-
$8tj43$insert(_el$3, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$
|
|
2497
|
+
$8tj43$insert(_el$3, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$mergeProps1({
|
|
2185
2498
|
get rows() {
|
|
2186
2499
|
return rows_object_();
|
|
2187
2500
|
},
|
|
@@ -2316,7 +2629,7 @@ function $bb34cd283e904784$export$2c9f9bf2092486aa(props) {
|
|
|
2316
2629
|
return $8tj43$createComponent((0, $39ddb986053fb759$export$d41d19e89346fa2), sharedOptions);
|
|
2317
2630
|
},
|
|
2318
2631
|
get children() {
|
|
2319
|
-
return $8tj43$createComponent((0, $e3efeb558d952696$export$7da560f849543dff), $8tj43$
|
|
2632
|
+
return $8tj43$createComponent((0, $e3efeb558d952696$export$7da560f849543dff), $8tj43$mergeProps1(sharedOptions, {
|
|
2320
2633
|
view_more_button_: () => {
|
|
2321
2634
|
var _props$gridOptions_;
|
|
2322
2635
|
return (_props$gridOptions_ = props.gridOptions_) === null || _props$gridOptions_ === void 0 ? void 0 : _props$gridOptions_.view_more_button;
|
|
@@ -2378,7 +2691,7 @@ async function $bb34cd283e904784$var$runDisplayTransformersForLooks(baseData, li
|
|
|
2378
2691
|
}) : displaysToTransform;
|
|
2379
2692
|
const transformedListings = await transformedListingsPromise;
|
|
2380
2693
|
const transformedDisplayById = Object.fromEntries(transformedProducts.map(display => [$6a4c7ed6d005505c$export$548d053aba053d79(display), display]));
|
|
2381
|
-
return transformedListings.map(listing => $8tj43$
|
|
2694
|
+
return transformedListings.map(listing => $8tj43$mergeProps(listing, {
|
|
2382
2695
|
// use mergeProps because in preview browser we add getters in this object, that would be called too early otherwise
|
|
2383
2696
|
displays: (displayIdsPerListingId[listing.listing_id] || []).map(displayId => transformedDisplayById[displayId]).filter(v => v)
|
|
2384
2697
|
}));
|
|
@@ -3852,7 +4165,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3852
4165
|
when: on_back_,
|
|
3853
4166
|
get children() {
|
|
3854
4167
|
var _el$ = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$);
|
|
3855
|
-
$8tj43$spread(_el$, $8tj43$
|
|
4168
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1({
|
|
3856
4169
|
get onClick() {
|
|
3857
4170
|
return $8tj43$catchify1(on_back_);
|
|
3858
4171
|
},
|
|
@@ -3874,7 +4187,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
3874
4187
|
var _el$2 = $8tj43$getNextElement($584c06c09cf4609d$var$_tmpl$2);
|
|
3875
4188
|
var _ref$ = buttonInFieldRef_;
|
|
3876
4189
|
typeof _ref$ === "function" ? $8tj43$use(_ref$, _el$2) : buttonInFieldRef_ = _el$2;
|
|
3877
|
-
$8tj43$spread(_el$2, $8tj43$
|
|
4190
|
+
$8tj43$spread(_el$2, $8tj43$mergeProps1({
|
|
3878
4191
|
get classList() {
|
|
3879
4192
|
return {
|
|
3880
4193
|
empty: searchFieldEmpty()
|
|
@@ -4682,7 +4995,7 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
4682
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
|
|
4683
4996
|
const LinkToListing = props => (() => {
|
|
4684
4997
|
var _el$ = $8tj43$getNextElement($26db6925469636a4$var$_tmpl$);
|
|
4685
|
-
$8tj43$spread(_el$, $8tj43$
|
|
4998
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1(props, {
|
|
4686
4999
|
get href() {
|
|
4687
5000
|
return href();
|
|
4688
5001
|
},
|
|
@@ -5098,7 +5411,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5098
5411
|
$8tj43$createComputed($8tj43$on(search_field_value_[0], () => !suggestions_updating_blocked() && set_selected_index(undefined), {
|
|
5099
5412
|
defer: true
|
|
5100
5413
|
})); // reset autocomplete position if query changes
|
|
5101
|
-
return [$8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$
|
|
5414
|
+
return [$8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$mergeProps1(sharedSuggestionProps, {
|
|
5102
5415
|
get title_() {
|
|
5103
5416
|
return i18n_.popular_;
|
|
5104
5417
|
},
|
|
@@ -5108,7 +5421,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5108
5421
|
return itemIndexes_.suggestionsIndex_;
|
|
5109
5422
|
},
|
|
5110
5423
|
showPlaceholders_: () => showPlaceholders() || noResults_() && !noResultsPopularSuggestions.latest
|
|
5111
|
-
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$
|
|
5424
|
+
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$mergeProps1(sharedSuggestionProps, {
|
|
5112
5425
|
get title_() {
|
|
5113
5426
|
return i18n_.previous_;
|
|
5114
5427
|
},
|
|
@@ -5125,7 +5438,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
5125
5438
|
return _el$;
|
|
5126
5439
|
})(),
|
|
5127
5440
|
showPlaceholders_: () => false
|
|
5128
|
-
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$
|
|
5441
|
+
})), $8tj43$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $8tj43$mergeProps1(sharedSuggestionProps, {
|
|
5129
5442
|
get title_() {
|
|
5130
5443
|
return i18n_.content_;
|
|
5131
5444
|
},
|
|
@@ -5663,7 +5976,7 @@ function $6a439680ae7e9ba3$export$b2539bed5023c21c(props) {
|
|
|
5663
5976
|
return $8tj43$createComponent($6a439680ae7e9ba3$var$TabsContext.Provider, {
|
|
5664
5977
|
value: new (0, $8tj43$ListenableSet)(),
|
|
5665
5978
|
get children() {
|
|
5666
|
-
return $8tj43$createComponent($6a439680ae7e9ba3$var$ActualTabs, $8tj43$
|
|
5979
|
+
return $8tj43$createComponent($6a439680ae7e9ba3$var$ActualTabs, $8tj43$mergeProps1(props, {
|
|
5667
5980
|
get children() {
|
|
5668
5981
|
return props.children;
|
|
5669
5982
|
}
|
|
@@ -5693,7 +6006,7 @@ function $6a439680ae7e9ba3$var$ActualTabs(props) {
|
|
|
5693
6006
|
},
|
|
5694
6007
|
children: item => {
|
|
5695
6008
|
const weSelected = $8tj43$createMemo(() => isSelected(item().id));
|
|
5696
|
-
return $8tj43$createComponent((0, $8tj43$Dynamic), $8tj43$
|
|
6009
|
+
return $8tj43$createComponent((0, $8tj43$Dynamic), $8tj43$mergeProps1({
|
|
5697
6010
|
get component() {
|
|
5698
6011
|
return props.AnchorComponent;
|
|
5699
6012
|
},
|
|
@@ -5804,7 +6117,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
|
|
|
5804
6117
|
if (!currentTabs) throw new Error("Tab must be a child of Tabs");
|
|
5805
6118
|
const id = $8tj43$createUniqueId();
|
|
5806
6119
|
const ourSet = currentTabs;
|
|
5807
|
-
const extendedProps = $8tj43$
|
|
6120
|
+
const extendedProps = $8tj43$mergeProps({
|
|
5808
6121
|
id: id
|
|
5809
6122
|
}, props);
|
|
5810
6123
|
ourSet.add(extendedProps);
|
|
@@ -6342,7 +6655,7 @@ function $6b0fd8fd20df8ccf$var$ActualShopTheLookButton(props) {
|
|
|
6342
6655
|
const displayStyleValue = $8tj43$createMemo(() => hasAnythingToShow() ? "" : "none");
|
|
6343
6656
|
const button = (() => {
|
|
6344
6657
|
var _el$2 = $8tj43$getNextElement($6b0fd8fd20df8ccf$var$_tmpl$2);
|
|
6345
|
-
$8tj43$spread(_el$2, $8tj43$
|
|
6658
|
+
$8tj43$spread(_el$2, $8tj43$mergeProps1(() => localProps.buttonAttributes), false, true);
|
|
6346
6659
|
$8tj43$insert(_el$2, () => {
|
|
6347
6660
|
var _localProps$buttonAtt;
|
|
6348
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";
|
|
@@ -6352,7 +6665,7 @@ function $6b0fd8fd20df8ccf$var$ActualShopTheLookButton(props) {
|
|
|
6352
6665
|
})();
|
|
6353
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
|
|
6354
6667
|
$8tj43$createEffect(() => !hasAnythingToShow() && closeModal()); // close modal if we ever get into the state of having it open and not having anything to show
|
|
6355
|
-
$6b0fd8fd20df8ccf$var$modalProps = $8tj43$
|
|
6668
|
+
$6b0fd8fd20df8ccf$var$modalProps = $8tj43$mergeProps(partForModal, {
|
|
6356
6669
|
products_to_shop_: products_to_shop_
|
|
6357
6670
|
});
|
|
6358
6671
|
button.addEventListener("click", openModal);
|
|
@@ -7098,7 +7411,7 @@ var $ff3225aef892a467$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<svg><path d="M
|
|
|
7098
7411
|
function $ff3225aef892a467$export$f21ab0717a89c77f(props) {
|
|
7099
7412
|
return (() => {
|
|
7100
7413
|
var _el$ = $8tj43$getNextElement($ff3225aef892a467$var$_tmpl$);
|
|
7101
|
-
$8tj43$spread(_el$, $8tj43$
|
|
7414
|
+
$8tj43$spread(_el$, $8tj43$mergeProps1(props, {
|
|
7102
7415
|
"xmlns": "http://www.w3.org/2000/svg",
|
|
7103
7416
|
"width": "11",
|
|
7104
7417
|
"height": "12"
|
|
@@ -8659,7 +8972,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
8659
8972
|
[_el$6, _co$] = $8tj43$getNextMarker(_el$5.nextSibling),
|
|
8660
8973
|
_el$7 = _el$6.nextSibling,
|
|
8661
8974
|
[_el$8, _co$2] = $8tj43$getNextMarker(_el$7.nextSibling);
|
|
8662
|
-
$8tj43$spread(_el$2, $8tj43$
|
|
8975
|
+
$8tj43$spread(_el$2, $8tj43$mergeProps1(attributes, {
|
|
8663
8976
|
get disabled() {
|
|
8664
8977
|
return $8tj43$memo(() => !!count_zero())() && !is_selected();
|
|
8665
8978
|
},
|
|
@@ -10312,7 +10625,7 @@ async function $284849364a6ef73a$var$_run_url_creator_for_suggest2(merchant, mar
|
|
|
10312
10625
|
// Filter out our transformed ancestors
|
|
10313
10626
|
const transformedAncestors = Object.fromEntries(transformerResult.filter(item => item.is_suggestion === false).map(item => [item.listing_id, item]));
|
|
10314
10627
|
// Add the now transformed ancestors into the ancestors of the listing suggestions
|
|
10315
|
-
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, {
|
|
10316
10629
|
// Use mergeProps instead of spread since page_url and other properties could be a getter that solid components should call
|
|
10317
10630
|
ancestors: item.ancestors.map(ancestor => {
|
|
10318
10631
|
const newAncestor = transformedAncestors[ancestor.listing_id];
|
|
@@ -10849,7 +11162,7 @@ function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
|
|
|
10849
11162
|
[_el$6, _co$2] = $8tj43$getNextMarker(_el$5.nextSibling);
|
|
10850
11163
|
$8tj43$insert(_el$2, () => i18n_.search_recs_title_());
|
|
10851
11164
|
$8tj43$insert(_el$, (0, $ca55612a53dbbdd2$export$a2cc176055f8f08), _el$4, _co$);
|
|
10852
|
-
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$
|
|
11165
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$mergeProps1({
|
|
10853
11166
|
rows: rows_object,
|
|
10854
11167
|
layout: "grid",
|
|
10855
11168
|
element_attributes: {
|
|
@@ -11594,102 +11907,6 @@ function $45a8953d760b5e58$export$a1fd619a4743ca08(_ref) {
|
|
|
11594
11907
|
});
|
|
11595
11908
|
return renderedDisplays_;
|
|
11596
11909
|
}
|
|
11597
|
-
var $64d94dcaa058dc7b$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div>`),
|
|
11598
|
-
$64d94dcaa058dc7b$var$_tmpl$2 = /*#__PURE__*/$8tj43$template(`<style type=text/css>`);
|
|
11599
|
-
const $64d94dcaa058dc7b$export$c500183c31c2b22e = "--spans-columns";
|
|
11600
|
-
function $64d94dcaa058dc7b$export$ab6b147eec64fea5(props) {
|
|
11601
|
-
const container_class = "x" + $8tj43$createUniqueId();
|
|
11602
|
-
const container_element_ = (() => {
|
|
11603
|
-
var _el$ = $8tj43$getNextElement($64d94dcaa058dc7b$var$_tmpl$);
|
|
11604
|
-
$8tj43$spread(_el$, $8tj43$mergeProps(() => props.element_attributes, {
|
|
11605
|
-
"classList": {
|
|
11606
|
-
[container_class]: true
|
|
11607
|
-
}
|
|
11608
|
-
}), false, true);
|
|
11609
|
-
$8tj43$insert(_el$, () => props.children);
|
|
11610
|
-
$8tj43$runHydrationEvents();
|
|
11611
|
-
return _el$;
|
|
11612
|
-
})(); // Don't want this in the error boundary below, it should only be for the actual layouting
|
|
11613
|
-
return $8tj43$createComponent((0, $74777e8fe65b3dcb$export$b69d0d92862de18b), {
|
|
11614
|
-
message_: "Failed calculating css grid layout",
|
|
11615
|
-
severity_: "error",
|
|
11616
|
-
get children() {
|
|
11617
|
-
return $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element_, false, container_class);
|
|
11618
|
-
}
|
|
11619
|
-
});
|
|
11620
|
-
}
|
|
11621
|
-
function $64d94dcaa058dc7b$export$e2f22da34aaf310a(props, container_element) {
|
|
11622
|
-
let insert_after_container = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
11623
|
-
let container_class = arguments.length > 3 ? arguments[3] : undefined;
|
|
11624
|
-
if (!container_class) {
|
|
11625
|
-
// only try to add if it wasn't provided, so that we have a code path without classList when doing SSR
|
|
11626
|
-
container_class = $8tj43$make_random_classname();
|
|
11627
|
-
container_element.classList.add(container_class);
|
|
11628
|
-
}
|
|
11629
|
-
const container_selector = ".depict .".concat(container_class); // class so ppl can have id if needed
|
|
11630
|
-
const col_styling = $8tj43$createMemo(() => $64d94dcaa058dc7b$var$generate_media_queried_declarations({
|
|
11631
|
-
container_selector_: container_selector,
|
|
11632
|
-
default_grid_spacing_text: props.grid_spacing,
|
|
11633
|
-
cols_at_size_: props.cols_at_size,
|
|
11634
|
-
override_vertical_spacing_: props.override_vertical_spacing,
|
|
11635
|
-
top_row_shortened_by_: props.top_row_shortened_by_()
|
|
11636
|
-
}));
|
|
11637
|
-
const base_styling = $8tj43$createMemo(() => {
|
|
11638
|
-
return "".concat(container_selector, "{display:grid;}");
|
|
11639
|
-
});
|
|
11640
|
-
const get_styling = $8tj43$createMemo(() => base_styling() + col_styling());
|
|
11641
|
-
const style_element = (() => {
|
|
11642
|
-
var _el$2 = $8tj43$getNextElement($64d94dcaa058dc7b$var$_tmpl$2);
|
|
11643
|
-
$8tj43$insert(_el$2, get_styling);
|
|
11644
|
-
return _el$2;
|
|
11645
|
-
})(); // need to create this after set_styling has been called or else there will be no styling in the SSR'd output
|
|
11646
|
-
if (insert_after_container) container_element.after(style_element);
|
|
11647
|
-
return [container_element, style_element];
|
|
11648
|
-
}
|
|
11649
|
-
function $64d94dcaa058dc7b$var$generate_media_queried_declarations(_ref) {
|
|
11650
|
-
let {
|
|
11651
|
-
container_selector_: container_selector_,
|
|
11652
|
-
default_grid_spacing_text: default_grid_spacing_text,
|
|
11653
|
-
cols_at_size_: cols_at_size_,
|
|
11654
|
-
override_vertical_spacing_: override_vertical_spacing_,
|
|
11655
|
-
top_row_shortened_by_: top_row_shortened_by_
|
|
11656
|
-
} = _ref;
|
|
11657
|
-
return cols_at_size_.map(options => {
|
|
11658
|
-
const [n_cols, min, max, grid_spacing_for_size] = options;
|
|
11659
|
-
const main_spacing_to_use = grid_spacing_for_size || default_grid_spacing_text;
|
|
11660
|
-
// See comment in else block below
|
|
11661
|
-
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);
|
|
11662
|
-
let spacing_styling;
|
|
11663
|
-
let additional_styling = ""; // outside the media query
|
|
11664
|
-
if (can_use_gap) spacing_styling = "gap:".concat(main_spacing_to_use, ";").concat(override_vertical_spacing_ ? "row-gap:".concat(override_vertical_spacing_, ";") : "");else {
|
|
11665
|
-
// 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)
|
|
11666
|
-
// 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.
|
|
11667
|
-
// Logical thought: use margins for the vertical spacing. But margins in grids are apparently relative to the size of the individual items in grids.
|
|
11668
|
-
// 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.
|
|
11669
|
-
const vertical_spacing_to_use = override_vertical_spacing_ !== null && override_vertical_spacing_ !== void 0 ? override_vertical_spacing_ : main_spacing_to_use;
|
|
11670
|
-
const width_multiplier = "var(".concat($64d94dcaa058dc7b$export$c500183c31c2b22e, ", 1)"); // How many cards wide the current item is (needed because content blocks)
|
|
11671
|
-
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
|
|
11672
|
-
// Equation from layout.tsx, also used in CheckboxGrid. Needs half spacing for some reason
|
|
11673
|
-
const this_item_width_meat = "calc(".concat(one_item_width_exclusing_gaps, " * ").concat(width_multiplier, ")"); // Width of just the card
|
|
11674
|
-
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
|
|
11675
|
-
const this_item_width = "calc(".concat(this_item_width_meat, " + ").concat(this_item_width_gaps, ")"); // Width of this item including gaps
|
|
11676
|
-
// 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
|
|
11677
|
-
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)
|
|
11678
|
-
spacing_styling = "column-gap:".concat(main_spacing_to_use, ";"); // Still use gaps in the horizontal direction because that works flawlessly
|
|
11679
|
-
// Re-use old layout code to get the correct :nth-child declarations for the top margins
|
|
11680
|
-
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_);
|
|
11681
|
-
}
|
|
11682
|
-
const media_query_body = "".concat(container_selector_, "{").concat(spacing_styling, "grid-template-columns:repeat(").concat(n_cols, ",minmax(0,1fr));}");
|
|
11683
|
-
return "".concat($8tj43$layout_media_query_header(min, max), "{").concat(media_query_body, "}").concat(additional_styling);
|
|
11684
|
-
}).join("");
|
|
11685
|
-
}
|
|
11686
|
-
function $64d94dcaa058dc7b$var$can_use_gap_for_unit(spacing) {
|
|
11687
|
-
const trimmed_spacing = spacing.trim();
|
|
11688
|
-
return !trimmed_spacing.includes("%");
|
|
11689
|
-
}
|
|
11690
|
-
function $64d94dcaa058dc7b$var$strip_percent_unit(css_value) {
|
|
11691
|
-
return css_value.replaceAll("%", "");
|
|
11692
|
-
}
|
|
11693
11910
|
function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
|
|
11694
11911
|
let {
|
|
11695
11912
|
layout_options_: layout_options_,
|
|
@@ -11716,226 +11933,6 @@ function $b2dbaafb23d00c7f$export$cb5808ba002cdeed(_ref) {
|
|
|
11716
11933
|
}) : when_filters_closed_cols;
|
|
11717
11934
|
});
|
|
11718
11935
|
}
|
|
11719
|
-
function $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_) {
|
|
11720
|
-
const size_active = $8tj43$createMemo(() => cols_at_size_().map(_ref => {
|
|
11721
|
-
let [n_cols, min_width, max_width] = _ref;
|
|
11722
|
-
const media_query = $8tj43$layout_media_query_header(min_width, max_width).replaceAll("@media", "");
|
|
11723
|
-
const matches = $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query);
|
|
11724
|
-
return [matches, n_cols];
|
|
11725
|
-
}));
|
|
11726
|
-
const n_cols_currently_showing = $8tj43$createMemo(() => {
|
|
11727
|
-
try {
|
|
11728
|
-
const [, n_cols_currently_showing] = size_active().find(_ref2 => {
|
|
11729
|
-
let [media_query] = _ref2;
|
|
11730
|
-
return media_query();
|
|
11731
|
-
});
|
|
11732
|
-
return n_cols_currently_showing;
|
|
11733
|
-
} catch (e) {
|
|
11734
|
-
$8tj43$dwarn("No active size found in columnsAtSize - can't render content blocks or looks");
|
|
11735
|
-
return null;
|
|
11736
|
-
}
|
|
11737
|
-
});
|
|
11738
|
-
return n_cols_currently_showing;
|
|
11739
|
-
}
|
|
11740
|
-
var $ff7feae4dddd6073$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=content-block-wrapper>`);
|
|
11741
|
-
function $ff7feae4dddd6073$export$791ef57e62e21c3f(_ref) {
|
|
11742
|
-
let {
|
|
11743
|
-
content_blocks_: incoming_content_blocks,
|
|
11744
|
-
cols_at_size_: cols_at_size_,
|
|
11745
|
-
set_top_row_shortened_by_: set_top_row_shortened_by_
|
|
11746
|
-
} = _ref;
|
|
11747
|
-
// these are by row
|
|
11748
|
-
const [content_blocks, set_content_blocks] = $8tj43$createStore([]);
|
|
11749
|
-
const n_cols_currently_showing_ = $40e2fa435715a1a0$export$a79e666719b3647c(cols_at_size_);
|
|
11750
|
-
$8tj43$createEffect(() => {
|
|
11751
|
-
const incoming_value = incoming_content_blocks();
|
|
11752
|
-
if (!incoming_value) {
|
|
11753
|
-
set_content_blocks([]);
|
|
11754
|
-
return;
|
|
11755
|
-
}
|
|
11756
|
-
set_content_blocks($8tj43$reconcile(incoming_value, {
|
|
11757
|
-
key: "content"
|
|
11758
|
-
})); // key: Make moving blocks faster, see https://github.com/solidjs/solid/issues/1925#issuecomment-1769671596
|
|
11759
|
-
});
|
|
11760
|
-
|
|
11761
|
-
const get_wrapped_blocks_ = $ff7feae4dddd6073$var$wrap_blocks_in_div(content_blocks, n_cols_currently_showing_);
|
|
11762
|
-
$8tj43$createComputed(() => {
|
|
11763
|
-
// 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
|
|
11764
|
-
const top_row_block = get_wrapped_blocks_()[0];
|
|
11765
|
-
const blocks_in_top_row_taken = top_row_block === null || top_row_block === void 0 ? void 0 : top_row_block.span_columns;
|
|
11766
|
-
if (blocks_in_top_row_taken == undefined) {
|
|
11767
|
-
// Fall back to zero if no content block in top row, since then no blocks in top row are taken
|
|
11768
|
-
set_top_row_shortened_by_(0);
|
|
11769
|
-
return;
|
|
11770
|
-
}
|
|
11771
|
-
set_top_row_shortened_by_(blocks_in_top_row_taken - 1); // minus one because the content block wrapper also is an element
|
|
11772
|
-
});
|
|
11773
|
-
|
|
11774
|
-
return $ff7feae4dddd6073$var$remap_blocks_to_index({
|
|
11775
|
-
get_wrapped_blocks_: get_wrapped_blocks_,
|
|
11776
|
-
n_cols_currently_showing_: n_cols_currently_showing_
|
|
11777
|
-
});
|
|
11778
|
-
}
|
|
11779
|
-
/**
|
|
11780
|
-
* Calculate where to put each of the finished wrapped content blocks. Also limit blocks' max width.
|
|
11781
|
-
* @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
|
|
11782
|
-
*/
|
|
11783
|
-
function $ff7feae4dddd6073$var$remap_blocks_to_index(_ref2) {
|
|
11784
|
-
let {
|
|
11785
|
-
get_wrapped_blocks_: get_wrapped_blocks_,
|
|
11786
|
-
n_cols_currently_showing_: n_cols_currently_showing_
|
|
11787
|
-
} = _ref2;
|
|
11788
|
-
return $8tj43$createMemo(() => {
|
|
11789
|
-
// This computation should be quite cheap since it just moves around things into an array
|
|
11790
|
-
const content_blocks_by_index = [];
|
|
11791
|
-
const constructed_block_arrays = new WeakSet();
|
|
11792
|
-
const wrapped_blocks = get_wrapped_blocks_();
|
|
11793
|
-
const cols_showing = n_cols_currently_showing_();
|
|
11794
|
-
// Need to keep track of products displaced by blocks above when mapping rows to indexes in the actual grid
|
|
11795
|
-
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
|
|
11796
|
-
if (!cols_showing)
|
|
11797
|
-
// Nope out of here if we don't know how many columns are showing
|
|
11798
|
-
return content_blocks_by_index;
|
|
11799
|
-
for (let i = 0; i < wrapped_blocks.length; i++) {
|
|
11800
|
-
// i = row to show at
|
|
11801
|
-
const block = wrapped_blocks[i];
|
|
11802
|
-
if (!block) continue; // Array can have holes/not defined places
|
|
11803
|
-
const index_of_first_item_in_row = i * cols_showing;
|
|
11804
|
-
const index_of_last_item_in_row = index_of_first_item_in_row + cols_showing;
|
|
11805
|
-
const {
|
|
11806
|
-
span_rows: span_rows,
|
|
11807
|
-
position: position,
|
|
11808
|
-
span_columns: span_columns
|
|
11809
|
-
} = block; // span columns is already capped in the block wrapping step (wrap_blocks_in_div)
|
|
11810
|
-
let target_index;
|
|
11811
|
-
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));
|
|
11812
|
-
// Calculate displacement of us by content blocks above us
|
|
11813
|
-
let displacement_by_added_blocks = 0;
|
|
11814
|
-
for (let j = 0; j < i; j++) {
|
|
11815
|
-
const row = displaced_products[j];
|
|
11816
|
-
if (row === undefined) continue; // there were no blocks in this row
|
|
11817
|
-
let displaced_items_in_row;
|
|
11818
|
-
if (typeof row === "number") displaced_items_in_row = row;else {
|
|
11819
|
-
displaced_items_in_row = row.filter(item => item).length;
|
|
11820
|
-
displaced_products[j] = displaced_items_in_row;
|
|
11821
|
-
}
|
|
11822
|
-
displacement_by_added_blocks += displaced_items_in_row;
|
|
11823
|
-
}
|
|
11824
|
-
const index_of_us_in_row = target_index - index_of_first_item_in_row;
|
|
11825
|
-
for (let j = 0; j < index_of_us_in_row; j++) {
|
|
11826
|
-
var _displaced_products$i;
|
|
11827
|
-
if ((_displaced_products$i = displaced_products[i]) !== null && _displaced_products$i !== void 0 && _displaced_products$i[j])
|
|
11828
|
-
// Add blocks in our *current* row to the displacement, but only the ones to our left
|
|
11829
|
-
displacement_by_added_blocks++;
|
|
11830
|
-
}
|
|
11831
|
-
// Add block to output array at the correct index
|
|
11832
|
-
const final_target_index = target_index - displacement_by_added_blocks;
|
|
11833
|
-
const existing_block = content_blocks_by_index[final_target_index];
|
|
11834
|
-
const block_content = block.content;
|
|
11835
|
-
// 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
|
|
11836
|
-
if (existing_block) {
|
|
11837
|
-
if (constructed_block_arrays.has(existing_block))
|
|
11838
|
-
// Only push to arrays we have created to not create funky bugs when there's an array in JSX.Element
|
|
11839
|
-
existing_block.push(block_content);else {
|
|
11840
|
-
const array = [existing_block, block_content];
|
|
11841
|
-
constructed_block_arrays.add(array);
|
|
11842
|
-
content_blocks_by_index[final_target_index] = array;
|
|
11843
|
-
}
|
|
11844
|
-
} else content_blocks_by_index[final_target_index] = block_content;
|
|
11845
|
-
// Update displacement
|
|
11846
|
-
for (let j = 0; j < span_rows; j++) {
|
|
11847
|
-
var _ref3;
|
|
11848
|
-
const row = displaced_products[_ref3 = i + j] || (displaced_products[_ref3] = []);
|
|
11849
|
-
for (let k = index_of_us_in_row; k < index_of_us_in_row + span_columns; k++) row[k] = true;
|
|
11850
|
-
}
|
|
11851
|
-
}
|
|
11852
|
-
return content_blocks_by_index;
|
|
11853
|
-
});
|
|
11854
|
-
}
|
|
11855
|
-
/**
|
|
11856
|
-
* 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.
|
|
11857
|
-
* Then renders the content and wraps it into a div with the correct styling.
|
|
11858
|
-
* Also caps span_columns to max available columns
|
|
11859
|
-
*/
|
|
11860
|
-
function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_span_columns) {
|
|
11861
|
-
const get_wrapped_blocks = $8tj43$mapArray(() => rendered_content_blocks, block => {
|
|
11862
|
-
if (!block) return;
|
|
11863
|
-
const final_span_columns = $8tj43$createMemo(() => {
|
|
11864
|
-
var _max_span_columns;
|
|
11865
|
-
return Math.min(block.span_columns, (_max_span_columns = max_span_columns()) !== null && _max_span_columns !== void 0 ? _max_span_columns : Infinity);
|
|
11866
|
-
});
|
|
11867
|
-
// 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
|
|
11868
|
-
const final_span_rows = $8tj43$createMemo(() => final_span_columns() === max_span_columns() ? 1 : block.span_rows);
|
|
11869
|
-
const [rendering_delayed, set_rendering_delayed_] = $8tj43$createSignal(true);
|
|
11870
|
-
const content = $8tj43$createComponent((0, $8tj43$Show), {
|
|
11871
|
-
get when() {
|
|
11872
|
-
return !rendering_delayed();
|
|
11873
|
-
},
|
|
11874
|
-
get children() {
|
|
11875
|
-
var _el$ = $8tj43$getNextElement($ff7feae4dddd6073$var$_tmpl$);
|
|
11876
|
-
$8tj43$insert(_el$, $8tj43$createComponent($ff7feae4dddd6073$var$RenderContent, {
|
|
11877
|
-
get content() {
|
|
11878
|
-
return block.content;
|
|
11879
|
-
}
|
|
11880
|
-
}));
|
|
11881
|
-
$8tj43$effect(_p$ => {
|
|
11882
|
-
var _v$ = {
|
|
11883
|
-
[(0, $64d94dcaa058dc7b$export$c500183c31c2b22e)]: final_span_columns()
|
|
11884
|
-
},
|
|
11885
|
-
_v$2 = "span ".concat(final_span_columns()),
|
|
11886
|
-
_v$3 = "span ".concat(final_span_rows());
|
|
11887
|
-
_p$.e = $8tj43$style(_el$, _v$, _p$.e);
|
|
11888
|
-
_v$2 !== _p$.t && ((_p$.t = _v$2) != null ? _el$.style.setProperty("grid-column", _v$2) : _el$.style.removeProperty("grid-column"));
|
|
11889
|
-
_v$3 !== _p$.a && ((_p$.a = _v$3) != null ? _el$.style.setProperty("grid-row", _v$3) : _el$.style.removeProperty("grid-row"));
|
|
11890
|
-
return _p$;
|
|
11891
|
-
}, {
|
|
11892
|
-
e: undefined,
|
|
11893
|
-
t: undefined,
|
|
11894
|
-
a: undefined
|
|
11895
|
-
});
|
|
11896
|
-
return _el$;
|
|
11897
|
-
}
|
|
11898
|
-
});
|
|
11899
|
-
return $8tj43$mergeProps1(block, {
|
|
11900
|
-
// Create content divs for the blocks with as much fine-grained diffing as possible?
|
|
11901
|
-
content: () => {
|
|
11902
|
-
// 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
|
|
11903
|
-
// 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
|
|
11904
|
-
set_rendering_delayed_(false);
|
|
11905
|
-
return content;
|
|
11906
|
-
},
|
|
11907
|
-
get span_columns() {
|
|
11908
|
-
// Cap max width of block to the number of columns available, for everyone downstream
|
|
11909
|
-
return final_span_columns();
|
|
11910
|
-
},
|
|
11911
|
-
get span_rows() {
|
|
11912
|
-
return final_span_rows();
|
|
11913
|
-
}
|
|
11914
|
-
});
|
|
11915
|
-
});
|
|
11916
|
-
return get_wrapped_blocks;
|
|
11917
|
-
}
|
|
11918
|
-
/**
|
|
11919
|
-
* 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.
|
|
11920
|
-
*/
|
|
11921
|
-
function $ff7feae4dddd6073$var$RenderContent(props) {
|
|
11922
|
-
const [resource] = $8tj43$createResource(() => props.content,
|
|
11923
|
-
// Could be reactive
|
|
11924
|
-
fn => fn());
|
|
11925
|
-
$8tj43$createEffect(() => {
|
|
11926
|
-
if (resource.error) console.error("Error in content block rendering", resource.error);
|
|
11927
|
-
});
|
|
11928
|
-
// 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)
|
|
11929
|
-
return $8tj43$createComponent((0, $8tj43$Suspense), {
|
|
11930
|
-
get fallback() {
|
|
11931
|
-
return $8tj43$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
|
|
11932
|
-
width: "100%",
|
|
11933
|
-
height: "max(100%, 400px)"
|
|
11934
|
-
});
|
|
11935
|
-
},
|
|
11936
|
-
children: resource
|
|
11937
|
-
});
|
|
11938
|
-
}
|
|
11939
11936
|
var $7faea0096f14b59b$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=PLP-results><!$><!/><!$><!/>`);
|
|
11940
11937
|
function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
11941
11938
|
let {
|
|
@@ -12146,7 +12143,7 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
12146
12143
|
} = slider;
|
|
12147
12144
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
12148
12145
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
12149
|
-
$8tj43$createComponent(Layout, $8tj43$
|
|
12146
|
+
$8tj43$createComponent(Layout, $8tj43$mergeProps1(layout_options_, {
|
|
12150
12147
|
rows: "all",
|
|
12151
12148
|
get cols_at_size() {
|
|
12152
12149
|
return modified_cols_at_size();
|
|
@@ -12675,7 +12672,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
12675
12672
|
get children() {
|
|
12676
12673
|
return (() => {
|
|
12677
12674
|
var _el$34 = $8tj43$getNextElement($082c4ed3e22f8d71$var$_tmpl$5);
|
|
12678
|
-
$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_, {
|
|
12679
12676
|
are_in_modal_: true
|
|
12680
12677
|
})));
|
|
12681
12678
|
return _el$34;
|
|
@@ -13488,7 +13485,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
13488
13485
|
[_el$8, _co$] = $8tj43$getNextMarker(_el$7.nextSibling),
|
|
13489
13486
|
_el$9 = _el$8.nextSibling,
|
|
13490
13487
|
[_el$10, _co$2] = $8tj43$getNextMarker(_el$9.nextSibling);
|
|
13491
|
-
$8tj43$insert(_el$4, $8tj43$createComponent(LinkIfPossible, $8tj43$
|
|
13488
|
+
$8tj43$insert(_el$4, $8tj43$createComponent(LinkIfPossible, $8tj43$mergeProps1(make_link_attributes, {
|
|
13492
13489
|
tabIndex: "-1",
|
|
13493
13490
|
get children() {
|
|
13494
13491
|
return $8tj43$createComponent((0, $3c5e15c6ee4227a9$export$605674723bcc715c), {
|
|
@@ -13497,7 +13494,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
13497
13494
|
});
|
|
13498
13495
|
}
|
|
13499
13496
|
})));
|
|
13500
|
-
$8tj43$insert(_el$5, $8tj43$createComponent(LinkIfPossible, $8tj43$
|
|
13497
|
+
$8tj43$insert(_el$5, $8tj43$createComponent(LinkIfPossible, $8tj43$mergeProps1({
|
|
13501
13498
|
"class": "content-title line-clamp"
|
|
13502
13499
|
}, make_link_attributes, {
|
|
13503
13500
|
get title() {
|
|
@@ -13666,7 +13663,7 @@ function $d53ebed6f63304e4$export$6d0c9c22f6652669(_ref) {
|
|
|
13666
13663
|
},
|
|
13667
13664
|
number_of_results_: num_results
|
|
13668
13665
|
}), _el$3, _co$);
|
|
13669
|
-
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$
|
|
13666
|
+
$8tj43$insert(_el$, $8tj43$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $8tj43$mergeProps1({
|
|
13670
13667
|
layout: "grid",
|
|
13671
13668
|
element_attributes: {
|
|
13672
13669
|
class: "cards"
|
|
@@ -14084,7 +14081,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
14084
14081
|
var _search_results_4, _search_results_4$con;
|
|
14085
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_)();
|
|
14086
14083
|
});
|
|
14087
|
-
const results_for = $8tj43$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $8tj43$
|
|
14084
|
+
const results_for = $8tj43$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $8tj43$mergeProps1({
|
|
14088
14085
|
get type() {
|
|
14089
14086
|
return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).products;
|
|
14090
14087
|
},
|
|
@@ -16253,7 +16250,7 @@ function $4b4b262708b516ee$var$add_us_to_crumbs(plp_meta) {
|
|
|
16253
16250
|
var _plp_meta3;
|
|
16254
16251
|
const api_value = (_plp_meta3 = plp_meta()) === null || _plp_meta3 === void 0 ? void 0 : _plp_meta3.breadcrumbs;
|
|
16255
16252
|
if (!api_value) return api_value;
|
|
16256
|
-
return [...api_value, $8tj43$
|
|
16253
|
+
return [...api_value, $8tj43$mergeProps(plp_meta(), {
|
|
16257
16254
|
get page_url() {
|
|
16258
16255
|
return href_accessor();
|
|
16259
16256
|
}
|
|
@@ -16365,4 +16362,4 @@ function $8821a19349c36651$export$e2bf8ce7779e827e(props) {
|
|
|
16365
16362
|
}, "Entire CategoryPage failed");
|
|
16366
16363
|
}
|
|
16367
16364
|
$8tj43$add_to_version_info("ui", (0, $8db9a15135765c11$export$83d89fbfd8236492));
|
|
16368
|
-
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 };
|