@depict-ai/ui 2.1.4 → 2.1.5

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.
@@ -1,12 +1,12 @@
1
- import { add_to_version_info as $i7OB2$add_to_version_info, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, dlog as $i7OB2$dlog, queueMacroTask as $i7OB2$queueMacroTask, catchify as $i7OB2$catchify, is_safari as $i7OB2$is_safari, observer as $i7OB2$observer, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, slider_fading_factory as $i7OB2$slider_fading_factory, slider_fractional_factory as $i7OB2$slider_fractional_factory, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, fetch_recs as $i7OB2$fetch_recs, snakeCasifyObject as $i7OB2$snakeCasifyObject, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, base_url as $i7OB2$base_url, get_depict_id as $i7OB2$get_depict_id, get_user_id as $i7OB2$get_user_id, get_session_id as $i7OB2$get_session_id, sort_obj as $i7OB2$sort_obj, fetch_retry as $i7OB2$fetch_retry, add_version_query_params as $i7OB2$add_version_query_params, dwarn as $i7OB2$dwarn, make_url_with_query_params as $i7OB2$make_url_with_query_params, edit_current_page_meta_tags as $i7OB2$edit_current_page_meta_tags, javascript_media_query as $i7OB2$javascript_media_query, use_href_accessor as $i7OB2$use_href_accessor, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, ContainedImage as $i7OB2$ContainedImage, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
- import { createComponent as $i7OB2$createComponent, ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, ssrStyle as $i7OB2$ssrStyle, ssrElement as $i7OB2$ssrElement, mergeProps as $i7OB2$mergeProps, escape as $i7OB2$escape, insert as $i7OB2$insert, ssrAttribute as $i7OB2$ssrAttribute, isServer as $i7OB2$isServer, ssrClassList as $i7OB2$ssrClassList, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
3
- import { createSignal as $i7OB2$createSignal, getOwner as $i7OB2$getOwner, createEffect as $i7OB2$createEffect, runWithOwner as $i7OB2$runWithOwner, onCleanup as $i7OB2$onCleanup, createMemo as $i7OB2$createMemo, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, createResource as $i7OB2$createResource, Suspense as $i7OB2$Suspense, Show as $i7OB2$Show, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, For as $i7OB2$For, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, on as $i7OB2$on, batch as $i7OB2$batch, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray, mergeProps as $i7OB2$mergeProps1 } from "solid-js";
1
+ import { add_to_version_info as $i7OB2$add_to_version_info, base64_encode_unicode as $i7OB2$base64_encode_unicode, base64_decode_unicode as $i7OB2$base64_decode_unicode, dlog as $i7OB2$dlog, queueMacroTask as $i7OB2$queueMacroTask, catchify as $i7OB2$catchify, is_safari as $i7OB2$is_safari, observer as $i7OB2$observer, dwarn as $i7OB2$dwarn, Amazing_Slider as $i7OB2$Amazing_Slider, slider_snap_css as $i7OB2$slider_snap_css, slider_fading_factory as $i7OB2$slider_fading_factory, slider_fractional_factory as $i7OB2$slider_fractional_factory, camelCasifyObject as $i7OB2$camelCasifyObject, make_random_classname as $i7OB2$make_random_classname, n_col_styling_with_dist as $i7OB2$n_col_styling_with_dist, layout_get_visible_recs_without_partial_rows as $i7OB2$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $i7OB2$layout_get_total_rec_amount_for_row, layout_media_query_header as $i7OB2$layout_media_query_header, report as $i7OB2$report, useExpandingContainer as $i7OB2$useExpandingContainer, standard_price_format as $i7OB2$standard_price_format, hex_to_rgb as $i7OB2$hex_to_rgb, relative_luminance_from_rgb as $i7OB2$relative_luminance_from_rgb, fetch_recs as $i7OB2$fetch_recs, snakeCasifyObject as $i7OB2$snakeCasifyObject, instant_exec_on_suspect_history_change as $i7OB2$instant_exec_on_suspect_history_change, base_url as $i7OB2$base_url, get_depict_id as $i7OB2$get_depict_id, get_user_id as $i7OB2$get_user_id, get_session_id as $i7OB2$get_session_id, sort_obj as $i7OB2$sort_obj, fetch_retry as $i7OB2$fetch_retry, add_version_query_params as $i7OB2$add_version_query_params, make_url_with_query_params as $i7OB2$make_url_with_query_params, edit_current_page_meta_tags as $i7OB2$edit_current_page_meta_tags, javascript_media_query as $i7OB2$javascript_media_query, use_href_accessor as $i7OB2$use_href_accessor, make_asyncIterable_exiter as $i7OB2$make_asyncIterable_exiter, href_change_ipns as $i7OB2$href_change_ipns, ContainedImage as $i7OB2$ContainedImage, deparallelize_no_drop as $i7OB2$deparallelize_no_drop, ListenableSet as $i7OB2$ListenableSet, insert_surfaces as $i7OB2$insert_surfaces } from "@depict-ai/utilishared/latest";
2
+ import { createComponent as $i7OB2$createComponent, insert as $i7OB2$insert, ssr as $i7OB2$ssr, ssrHydrationKey as $i7OB2$ssrHydrationKey, ssrStyle as $i7OB2$ssrStyle, spread as $i7OB2$spread, escape as $i7OB2$escape, ssrAttribute as $i7OB2$ssrAttribute, mergeProps as $i7OB2$mergeProps1, isServer as $i7OB2$isServer, ssrElement as $i7OB2$ssrElement, ssrClassList as $i7OB2$ssrClassList, Dynamic as $i7OB2$Dynamic } from "solid-js/web";
3
+ import { createSignal as $i7OB2$createSignal, getOwner as $i7OB2$getOwner, createEffect as $i7OB2$createEffect, runWithOwner as $i7OB2$runWithOwner, onCleanup as $i7OB2$onCleanup, createMemo as $i7OB2$createMemo, createContext as $i7OB2$createContext, useContext as $i7OB2$useContext, mergeProps as $i7OB2$mergeProps, Show as $i7OB2$Show, createResource as $i7OB2$createResource, Suspense as $i7OB2$Suspense, untrack as $i7OB2$untrack, createRenderEffect as $i7OB2$createRenderEffect, Index as $i7OB2$Index, createRoot as $i7OB2$createRoot, For as $i7OB2$For, createUniqueId as $i7OB2$createUniqueId, createComputed as $i7OB2$createComputed, ErrorBoundary as $i7OB2$ErrorBoundary, on as $i7OB2$on, batch as $i7OB2$batch, createReaction as $i7OB2$createReaction, mapArray as $i7OB2$mapArray } from "solid-js";
4
4
  import { createStore as $i7OB2$createStore, reconcile as $i7OB2$reconcile } from "solid-js/store";
5
5
 
6
6
  /*! Depict.ai search and product listing SDK */
7
7
  import { register_es_version } from "../../multi_import_deduplicator.mjs";
8
8
  register_es_version("ui", "latest");
9
- const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.4";
9
+ const $ec291e0010116877$export$83d89fbfd8236492 = "2.1.5";
10
10
  const $4147651646da990a$var$fallback_operator = "in";
11
11
  const $4147651646da990a$var$fallback_token = "";
12
12
  const $4147651646da990a$var$legacy_filter_prefix = "filter_";
@@ -221,6 +221,7 @@ function $e8ffe11ed01df0fe$export$e6fffe67d4cdd848(whatToWatch) {
221
221
  });
222
222
  return size;
223
223
  }
224
+ const $e8ffe11ed01df0fe$var$onIdleFunctionsSymbol = /*@__PURE__*/Symbol("onIdleFunctions");
224
225
  function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
225
226
  // Enable reactive props
226
227
  const otherOptions = $i7OB2$createMemo(() => {
@@ -243,11 +244,91 @@ function $e8ffe11ed01df0fe$export$6e5611bc7e57e477(props) {
243
244
  srcset: srcset
244
245
  };
245
246
  });
246
- return $i7OB2$ssrElement("img", $i7OB2$mergeProps(otherOptions, src_options, {
247
- get sizes() {
248
- return props.size() + "px";
249
- }
250
- }), undefined, true);
247
+ // Work around https://github.com/solidjs/solid/issues/1828
248
+ const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
249
+ const [hasSetSize, setHasSetSize] = $i7OB2$createSignal(false);
250
+ const [hasDecoded, setHasDecoded] = $i7OB2$createSignal(false);
251
+ const sizePX = $i7OB2$createMemo(() => `${props.size()}px`); // props.size could be a getter that expects a cleanup so get it in this memo instead of where we set img.sizes
252
+ const listingContext = $011607bdf658f807$export$8d0c4fdbb05a2f2e();
253
+ // Batch idle callbacks so that MutationObserver can batch the resulting mutations better, so we don't lose tons of CPU time to MutationObservers doing lots of things for each image
254
+ // Happened on singular, they have some weird observer (+we also have one but ours is at least 3x more efficient)
255
+ const executeWhenIdleBatched = fn => {
256
+ if (typeof requestIdleCallback !== "function") setTimeout(fn); // Old browsers don't get optimisation
257
+ const existingStack = listingContext?.[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
258
+ if (existingStack) return existingStack.add(fn);
259
+ const newStack = new Set([fn]);
260
+ if (listingContext) listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol] = newStack;
261
+ const processStackWhenIdle = () => requestIdleCallback(deadline => {
262
+ const start = performance.now();
263
+ const thirdDeadlineTime = deadline.timeRemaining() / 3; // observers coming after this take up 2-3x the time so don't use all of it
264
+ for (const fn of newStack) {
265
+ newStack.delete(fn);
266
+ fn();
267
+ const timeTaken = performance.now() - start;
268
+ if ((!deadline.timeRemaining() || timeTaken > thirdDeadlineTime) && newStack.size) {
269
+ // There's still work to be done but no time, so schedule another idle callback
270
+ processStackWhenIdle();
271
+ return;
272
+ }
273
+ }
274
+ // Stack is empty
275
+ if (listingContext) delete listingContext[$e8ffe11ed01df0fe$var$onIdleFunctionsSymbol];
276
+ }, {
277
+ timeout: 15000
278
+ } // long timeout, better to not have images than to freeze the browser. But also we don't want to confuse user why no iamges are loading
279
+ );
280
+
281
+ processStackWhenIdle();
282
+ };
283
+ let sizeSetFastPath = false;
284
+ let hasDecodedFastPath = false;
285
+ let timeoutSet = false;
286
+ $i7OB2$spread(img, $i7OB2$mergeProps(otherOptions), false, true);
287
+ $i7OB2$createEffect(() => {
288
+ if (!props.size()) return; // wait until we have a size
289
+ if (timeoutSet) return;
290
+ const handler = $i7OB2$catchify(() => {
291
+ img.sizes = sizePX(); // use latest available value of props.size
292
+ if (!sizeSetFastPath) {
293
+ setHasSetSize(true);
294
+ sizeSetFastPath = true;
295
+ }
296
+ timeoutSet = false;
297
+ });
298
+ // Throttle the updating of sizes to avoid unnecessary image re-fetches during resize
299
+ // And also because we first set src after sizes has been set, wait with loading and decoding images until browser is idle
300
+ // This greatly improves performance when loading (more) products
301
+ // See https://depictaiworkspace.slack.com/archives/C05NJ0K3WRL/p1698220617663139
302
+ executeWhenIdleBatched(handler);
303
+ timeoutSet = true;
304
+ });
305
+ $i7OB2$createEffect(() => {
306
+ if (!props.size() || !hasSetSize()) return; // If size isn't known or set, don't assign src yet since it would cause the most low res image to load
307
+ Object.assign(img, src_options());
308
+ // Add to DOM once decoded to not require/block any paints before image has completed loading and avoid showing broken image symbol
309
+ // We can do this because there has to be a container around us giving us a size
310
+ // No need to listen if we're already in the DOM
311
+ if (hasDecodedFastPath) return;
312
+ if (props.loading === "lazy") {
313
+ // For lazy loading there's no decoding to wait for as it only occurs when the image is visible
314
+ // Make sure src is set before we put the image into the DOM though so no broken image symbol is shown
315
+ setHasDecoded(true);
316
+ hasDecodedFastPath = true;
317
+ }
318
+ img.decode().catch(e => $i7OB2$dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
319
+ .then(async () => {
320
+ // Also wait with inserting image (i.e. paint) until browser is idle
321
+ await new Promise(r => executeWhenIdleBatched(r));
322
+ setHasDecoded(true);
323
+ hasDecodedFastPath = true;
324
+ });
325
+ });
326
+ return $i7OB2$createComponent((0, $i7OB2$Show), {
327
+ get when() {
328
+ return hasDecoded();
329
+ },
330
+ children: img
331
+ });
251
332
  }
252
333
  function $e8ffe11ed01df0fe$var$make_srcset(url, resolutions) {
253
334
  return resolutions.map(width => `${$e8ffe11ed01df0fe$var$generateImageUrl(url, width)} ${width}w`).join(", ");
@@ -285,7 +366,7 @@ function $660070e2a394b3c3$export$e4b984597b71e989(props) {
285
366
  $i7OB2$queueMacroTask(() => setCurrentImageSize(undefined)); // 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
286
367
  });
287
368
 
288
- container.append($i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
369
+ $i7OB2$insert(container, $i7OB2$createComponent((0, $e8ffe11ed01df0fe$export$6e5611bc7e57e477), {
289
370
  style: "width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0;",
290
371
  get size() {
291
372
  return $i7OB2$createMemo(() => currentImageSize()?.() || 0);
@@ -660,7 +741,7 @@ const $c8d5ff4524619fcd$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
660
741
  $c8d5ff4524619fcd$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
661
742
  function $c8d5ff4524619fcd$export$d21e32dfedac04be(props) {
662
743
  const container_class = "x" + $i7OB2$createUniqueId();
663
- const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps(() => props.element_attributes, {
744
+ const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps1(() => props.element_attributes, {
664
745
  classList: {
665
746
  [container_class]: true
666
747
  }
@@ -785,7 +866,7 @@ function $c4492d24952ed731$export$d41d19e89346fa2({
785
866
  } = slider;
786
867
  const Layout = props => $c8d5ff4524619fcd$export$445d8d3f5f706a40(props, insert_here, true);
787
868
  // Do like this, so we don't have to call mergeProps ourselves
788
- $i7OB2$createComponent(Layout, $i7OB2$mergeProps({
869
+ $i7OB2$createComponent(Layout, $i7OB2$mergeProps1({
789
870
  rows: "all",
790
871
  layout: "slider"
791
872
  }, layout_options_));
@@ -900,7 +981,7 @@ function $3da8afe3ed57cf34$export$7da560f849543dff({
900
981
  }) {
901
982
  const is_showing_something = $i7OB2$createMemo(() => recommendations_resource_.loading || recommendations_resource_()?.length);
902
983
  const num_placeholders_ = () => 20;
903
- const elements = $i7OB2$ssr($3da8afe3ed57cf34$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
984
+ const elements = $i7OB2$ssr($3da8afe3ed57cf34$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
904
985
  get rows() {
905
986
  return rows_object_();
906
987
  },
@@ -1110,7 +1191,7 @@ function $8c0f86cb3e266eeb$export$a71e92cfbb498adc(props) {
1110
1191
  }
1111
1192
  const $19976a74d273070d$var$_tmpl$ = '<path d="M11.669 10.531l9.156-9.156a.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569A.8.8 0 0 0 20.24 0a.77.77 0 0 0-.569.237l-9.14 9.14-9.14-9.14A.79.79 0 0 0 .807 0a.77.77 0 0 0-.569.237A.78.78 0 0 0 0 .807a.77.77 0 0 0 .237.569l9.156 9.156-9.156 9.14c-.159.157-.237.349-.237.569s.079.412.237.569c.085.085.174.148.268.19a1.095 1.095 0 0 0 .316.048.894.894 0 0 0 .285-.048.84.84 0 0 0 .285-.19l9.139-9.14 9.14 9.14a.894.894 0 0 0 .268.19 1.049 1.049 0 0 0 .301.048.941.941 0 0 0 .301-.048.84.84 0 0 0 .285-.19.78.78 0 0 0 .237-.569c0-.221-.079-.412-.237-.569z"></path>';
1112
1193
  function $19976a74d273070d$export$3b621d86b1566b2(props = {}) {
1113
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps(props, {
1194
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1(props, {
1114
1195
  xmlns: "http://www.w3.org/2000/svg",
1115
1196
  width: "21.064",
1116
1197
  height: "21.047",
@@ -1348,7 +1429,7 @@ const $49b79728e7d9e2a1$export$48513f6b9f8ce62d = props => {
1348
1429
  };
1349
1430
  const $f8a56ba74eedd0c6$var$_tmpl$ = '<path d="M10.173 5.548H5.5V.875c0-.075-.027-.14-.081-.193S5.301.601 5.226.601s-.14.027-.193.081-.081.118-.081.193v4.673H.274c-.075 0-.14.027-.193.081A.27.27 0 0 0 0 5.827c0 .075.027.14.081.193s.118.081.193.081h4.678v4.673c0 .075.027.14.081.193s.118.081.193.081.14-.027.193-.081.081-.118.081-.193V6.101h4.673a.27.27 0 0 0 .199-.081c.054-.054.08-.118.08-.193a.27.27 0 0 0-.279-.279z" fill="#000"></path>';
1350
1431
  function $f8a56ba74eedd0c6$export$f21ab0717a89c77f(props) {
1351
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps(props, {
1432
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1(props, {
1352
1433
  xmlns: "http://www.w3.org/2000/svg",
1353
1434
  width: "11",
1354
1435
  height: "12"
@@ -2195,7 +2276,7 @@ const $93716a9ad0dea854$export$414f6a19d38e655c = ({
2195
2276
  const current_value = $91aa8ee9f431800d$export$325f75597868c4f0(value().value_);
2196
2277
  return !!data?.some(item => $91aa8ee9f431800d$export$325f75597868c4f0(item) === current_value);
2197
2278
  });
2198
- const MakeButton = attributes => $i7OB2$ssrElement("button", $i7OB2$mergeProps(attributes, {
2279
+ const MakeButton = attributes => $i7OB2$ssrElement("button", $i7OB2$mergeProps1(attributes, {
2199
2280
  get disabled() {
2200
2281
  return value().count_ === 0 && !is_selected();
2201
2282
  },
@@ -2445,7 +2526,7 @@ var $12497d09ef87296e$export$2e2bcd8739ae039 = {
2445
2526
  };
2446
2527
  const $9bc34983fc5f7bdb$var$_tmpl$ = '<path d="M4.617 12.738a.48.48 0 0 1-.164-.027c-.051-.023-.094-.055-.129-.098L.125 8.414A.39.39 0 0 1 0 8.117c0-.113.039-.211.125-.293s.18-.125.293-.125.215.043.297.125l3.902 3.902L16.086.262c.082-.082.18-.125.297-.125s.211.043.293.125.125.184.125.301-.043.215-.125.297L4.914 12.613c-.039.043-.086.078-.141.098s-.102.027-.156.027zm0 0"></path>';
2447
2528
  function $9bc34983fc5f7bdb$export$f2ca6fc699ca1fb4(props = {}) {
2448
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
2529
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
2449
2530
  xmlns: "http://www.w3.org/2000/svg",
2450
2531
  width: "16.8",
2451
2532
  height: "14"
@@ -3766,7 +3847,7 @@ const $6dee9211e57ac31a$var$_tmpl$ = ["<style", ' type="text/css">', "</style>"]
3766
3847
  const $6dee9211e57ac31a$export$c500183c31c2b22e = "--spans-columns";
3767
3848
  function $6dee9211e57ac31a$export$ab6b147eec64fea5(props) {
3768
3849
  const container_class = "x" + $i7OB2$createUniqueId();
3769
- const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps(() => props.element_attributes, {
3850
+ const container_element_ = $i7OB2$ssrElement("div", $i7OB2$mergeProps1(() => props.element_attributes, {
3770
3851
  classList: {
3771
3852
  [container_class]: true
3772
3853
  }
@@ -4047,7 +4128,7 @@ function $e7a7eb102ddc0c79$var$wrap_blocks_in_div(rendered_content_blocks, max_s
4047
4128
  })));
4048
4129
  }
4049
4130
  });
4050
- return $i7OB2$mergeProps1(block, {
4131
+ return $i7OB2$mergeProps(block, {
4051
4132
  // Create content divs for the blocks with as much fine-grained diffing as possible?
4052
4133
  content: () => {
4053
4134
  // 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
@@ -4384,7 +4465,7 @@ function $aea1edf92433e81e$export$fe334901e8bebd57() {
4384
4465
  const $e1bb71e65e01a3a0$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zM9.449 3.5H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h1.398c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-1.051-.699h.703v-.699h-.703zm0 0"></path>',
4385
4466
  $e1bb71e65e01a3a0$var$_tmpl$2 = '<path d="M10.852 6.301H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h2.801a.35.35 0 0 1 .348.352v1.398a.35.35 0 0 1-.348.352zm-2.453-.699H10.5v-.703H8.398zm3.851 3.5H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h4.199c.191 0 .352.156.352.352V8.75c0 .191-.16.352-.352.352zm-3.852-.703h3.5V7.7h-3.5zm5.25 3.499H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h5.598a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-5.25-.699H13.3V10.5H8.398zm0 0"></path>';
4386
4467
  function $e1bb71e65e01a3a0$export$da32f7add8a22e86(props = {}) {
4387
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
4468
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
4388
4469
  xmlns: "http://www.w3.org/2000/svg",
4389
4470
  width: "14",
4390
4471
  height: "14",
@@ -4393,7 +4474,7 @@ function $e1bb71e65e01a3a0$export$da32f7add8a22e86(props = {}) {
4393
4474
  }
4394
4475
  const $05fbe84eb34564ec$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3.5 12.453V.348a.35.35 0 0 0-.7 0v12.105L.598 10.254c-.137-.137-.359-.137-.492 0a.35.35 0 0 0 0 .492l2.797 2.801a.35.35 0 0 0 .496 0L6.2 10.746c.137-.137.137-.355 0-.492zm3.25 1.644H8.051a.35.35 0 0 1-.352-.348v-1.402a.35.35 0 0 1 .352-.348h1.398a.35.35 0 0 1 .352.348v1.402a.35.35 0 0 1-.352.348zm-1.051-.699h.703V10.5h-.703zm2.454-2.097H8.051c-.195 0-.352-.16-.352-.352V7.352A.35.35 0 0 1 8.051 7h2.801a.35.35 0 0 1 .348.352V8.75c0 .191-.156.352-.348.352zm-2.453-.703H10.5V7.7H8.398zm3.851-2.098H8.051a.35.35 0 0 1-.352-.352V4.551a.35.35 0 0 1 .352-.352h4.199c.191 0 .352.156.352.352v1.398c0 .195-.16.352-.352.352zm-3.852-.699h3.5v-.703h-3.5zm5.25-2.102H8.051a.35.35 0 0 1-.352-.352V1.75c0-.191.156-.352.352-.352h5.598c.195 0 .352.16.352.352v1.398a.35.35 0 0 1-.352.352zm-5.25-.699H13.3v-.699H8.398zm0 0"></path>';
4395
4476
  function $05fbe84eb34564ec$export$d10e63059ddb9fd4(props = {}) {
4396
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
4477
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
4397
4478
  xmlns: "http://www.w3.org/2000/svg",
4398
4479
  width: "14",
4399
4480
  height: "14",
@@ -4506,7 +4587,7 @@ function $757dac7f7c6c5241$export$9bf11afa910f536e({
4506
4587
  })));
4507
4588
  },
4508
4589
  get children() {
4509
- return $i7OB2$ssr($757dac7f7c6c5241$var$_tmpl$5, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $i7OB2$mergeProps(args_for_filtering_, {
4590
+ return $i7OB2$ssr($757dac7f7c6c5241$var$_tmpl$5, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent((0, $fab07f52c9861732$export$3f1a388cc0d8fed7), $i7OB2$mergeProps1(args_for_filtering_, {
4510
4591
  are_in_modal_: true
4511
4592
  }))));
4512
4593
  }
@@ -6478,7 +6559,7 @@ function $22e59517c2ec94d3$export$1c641004b5485fed() {
6478
6559
  }
6479
6560
  const $16f0ed5ea30d8d9c$var$_tmpl$ = '<path d="M19.811 20.174l-6.234-6.809a7.96 7.96 0 0 0 .923-1.179c.274-.424.502-.865.687-1.323a8.04 8.04 0 0 0 .42-1.436 7.88 7.88 0 0 0 .144-1.507c0-.526-.051-1.042-.154-1.548-.096-.506-.243-.995-.441-1.466s-.441-.919-.728-1.343a8.28 8.28 0 0 0-.984-1.21 7.86 7.86 0 0 0-1.2-.984A7.56 7.56 0 0 0 10.89.651C10.418.453 9.929.302 9.423.2S8.401.046 7.875.046 6.833.097 6.327.2 5.332.453 4.86.651a7.56 7.56 0 0 0-1.354.718c-.431.287-.831.615-1.2.984a8.28 8.28 0 0 0-.984 1.21 7.73 7.73 0 0 0-.728 1.343c-.198.472-.349.96-.451 1.466A8.31 8.31 0 0 0 0 7.921a8.31 8.31 0 0 0 .144 1.548c.103.506.253.995.451 1.466a8.08 8.08 0 0 0 .728 1.354 7.86 7.86 0 0 0 .984 1.2 7.54 7.54 0 0 0 1.2.995c.431.287.882.53 1.354.728.472.191.96.338 1.466.441a8.31 8.31 0 0 0 1.548.144c.451 0 .896-.038 1.333-.113a7.83 7.83 0 0 0 1.282-.328 7.55 7.55 0 0 0 1.2-.533 8.08 8.08 0 0 0 1.107-.749l6.245 6.809a.45.45 0 0 0 .174.123.55.55 0 0 0 .205.041.61.61 0 0 0 .195-.031c.061-.021.116-.055.164-.102.109-.096.164-.219.164-.369.007-.144-.038-.267-.133-.369zM1.046 7.921c0-.937.178-1.818.533-2.646.362-.834.851-1.559 1.466-2.174.622-.615 1.347-1.101 2.174-1.456.827-.362 1.712-.543 2.656-.543s1.829.181 2.656.543c.827.355 1.548.841 2.164 1.456.622.615 1.111 1.34 1.466 2.174a6.52 6.52 0 0 1 .543 2.646c0 .943-.181 1.829-.543 2.656a6.89 6.89 0 0 1-1.466 2.174c-.615.615-1.336 1.104-2.164 1.466-.827.356-1.712.533-2.656.533s-1.829-.178-2.656-.533c-.827-.362-1.552-.851-2.174-1.466-.615-.622-1.104-1.347-1.466-2.174-.355-.827-.533-1.712-.533-2.656z"></path>';
6480
6561
  function $16f0ed5ea30d8d9c$export$82eafebb825fc23f(props = {}) {
6481
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps(props, {
6562
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1(props, {
6482
6563
  xmlns: "http://www.w3.org/2000/svg",
6483
6564
  width: "20",
6484
6565
  height: "22"
@@ -6537,7 +6618,7 @@ function $172e1b898d457050$export$7de92c4c2205ebf3({
6537
6618
  const should_show = $i7OB2$createMemo(() => !!((recommendations_resource.loading || recommendations_resource()?.length) && all_products_loaded_()));
6538
6619
  const num_placeholders_ = $i7OB2$createMemo(() => (0, $7747fe1a8c5652e3$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...layout_options_().cols_at_size.map(([per_column]) => per_column)));
6539
6620
  // Don't tear down elements every time one updates the page - don't put them within <Show>
6540
- const elements = $i7OB2$ssr($172e1b898d457050$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.search_recs_title_()), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
6621
+ const elements = $i7OB2$ssr($172e1b898d457050$var$_tmpl$, $i7OB2$ssrHydrationKey(), $i7OB2$escape(i18n_.search_recs_title_()), $i7OB2$escape($a458486f22b22f63$export$a2cc176055f8f08()), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
6541
6622
  rows: rows_object,
6542
6623
  layout: "grid",
6543
6624
  element_attributes: {
@@ -7018,7 +7099,7 @@ function $f3213c0640246d58$export$ba17c5b7e6dda39f({
7018
7099
  }
7019
7100
  const $190927650b4840eb$var$_tmpl$ = '<path d="M56 26.455a13.71 13.71 0 0 0-9.578 3.967A13.71 13.71 0 0 0 42.455 40v176a13.71 13.71 0 0 0 3.967 9.578A13.71 13.71 0 0 0 56 229.545h144A13.71 13.71 0 0 0 213.545 216V88a2.456 2.456 0 0 1 0-.002c.001-1.452-.597-2.895-1.623-3.922l-55.998-55.998a5.61 5.61 0 0 0-3.922-1.623 2.456 2.456 0 0 1-.002 0zm0 11.09h88A2.456 2.456 0 0 1 146.455 40v48c0 2.903 2.642 5.545 5.545 5.545h48A2.456 2.456 0 0 1 202.455 96v120a2.456 2.456 0 0 1-2.455 2.455H56A2.456 2.456 0 0 1 53.545 216V40A2.456 2.456 0 0 1 56 37.545zm103.061 11.498a2.456 2.456 0 0 1 2.676.531l28.689 28.689a2.456 2.456 0 0 1-1.736 4.191H160A2.456 2.456 0 0 1 157.545 80V51.311a2.456 2.456 0 0 1 1.516-2.268zM96 130.455c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545zm0 32c-2.903 0-5.545 2.642-5.545 5.545s2.642 5.545 5.545 5.545h64c2.903 0 5.545-2.642 5.545-5.545s-2.642-5.545-5.545-5.545z"></path>';
7020
7101
  function $190927650b4840eb$export$605674723bcc715c(props = {}) {
7021
- return $i7OB2$ssrElement("svg", $i7OB2$mergeProps({
7102
+ return $i7OB2$ssrElement("svg", $i7OB2$mergeProps1({
7022
7103
  xmlns: "http://www.w3.org/2000/svg",
7023
7104
  width: "32",
7024
7105
  height: "32",
@@ -8092,7 +8173,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
8092
8173
  if (content_result_) return $i7OB2$ssrElement("a", attributes, () => $i7OB2$escape(children), true);
8093
8174
  return $i7OB2$ssrElement("div", attributes, () => $i7OB2$escape(children), true);
8094
8175
  };
8095
- return $i7OB2$ssr($b2bf2cdcff8142d8$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps(make_link_attributes, {
8176
+ return $i7OB2$ssr($b2bf2cdcff8142d8$var$_tmpl$2, $i7OB2$ssrHydrationKey(), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps1(make_link_attributes, {
8096
8177
  tabIndex: "-1",
8097
8178
  get children() {
8098
8179
  return $i7OB2$createComponent((0, $190927650b4840eb$export$605674723bcc715c), {
@@ -8100,7 +8181,7 @@ function $b2bf2cdcff8142d8$export$f631859cab12b342({
8100
8181
  height: "28"
8101
8182
  });
8102
8183
  }
8103
- }))), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps({
8184
+ }))), $i7OB2$escape($i7OB2$createComponent(LinkIfPossible, $i7OB2$mergeProps1({
8104
8185
  "class": "content-title line-clamp"
8105
8186
  }, make_link_attributes, {
8106
8187
  get title() {
@@ -8232,7 +8313,7 @@ function $49de9d31aeea1b5e$export$6d0c9c22f6652669({
8232
8313
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).content;
8233
8314
  },
8234
8315
  number_of_results_: num_results
8235
- })), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps({
8316
+ })), $i7OB2$escape($i7OB2$createComponent((0, $c8d5ff4524619fcd$export$d21e32dfedac04be), $i7OB2$mergeProps1({
8236
8317
  layout: "grid",
8237
8318
  element_attributes: {
8238
8319
  class: "cards"
@@ -8381,7 +8462,7 @@ function $7097477c78a89208$export$a54ec244c8863715({
8381
8462
  });
8382
8463
  const [sort_and_filter_element_, set_sort_and_filter_element_] = $i7OB2$createSignal();
8383
8464
  const no_results_text_ = $i7OB2$createMemo(() => (search_results_()?.content_search_links?.length ? i18n_.no_products_ : i18n_.no_results_text_)());
8384
- const results_for = $i7OB2$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $i7OB2$mergeProps({
8465
+ const results_for = $i7OB2$createComponent((0, $f8c929beb82c512b$export$9dd50d35b9d94fdf), $i7OB2$mergeProps1({
8385
8466
  get type() {
8386
8467
  return (0, $f8c929beb82c512b$export$2452208c79fe93ea).products;
8387
8468
  },