@depict-ai/ui 4.7.6 → 4.7.8

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.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { add_to_version_info as $8tj43$add_to_version_info, useExpandingContainer as $8tj43$useExpandingContainer, fetch_retry as $8tj43$fetch_retry, base_url as $8tj43$base_url, dwarn as $8tj43$dwarn, slider_fractional_factory as $8tj43$slider_fractional_factory, dlog as $8tj43$dlog, camelCasifyObject as $8tj43$camelCasifyObject, make_random_classname as $8tj43$make_random_classname, n_col_styling_with_dist as $8tj43$n_col_styling_with_dist, catchify as $8tj43$catchify, 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, layout_media_query_header as $8tj43$layout_media_query_header, 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, observer as $8tj43$observer, javascript_media_query as $8tj43$javascript_media_query, 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 { createComponent as $8tj43$createComponent, insert as $8tj43$insert, template as $8tj43$template, getNextElement as $8tj43$getNextElement, mergeProps as $8tj43$mergeProps, effect as $8tj43$effect, className as $8tj43$className, isServer as $8tj43$isServer, 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, setAttribute as $8tj43$setAttribute, style as $8tj43$style, use as $8tj43$use, setProperty as $8tj43$setProperty, Dynamic as $8tj43$Dynamic } from "solid-js/web";
2
+ import { createComponent as $8tj43$createComponent, insert as $8tj43$insert, template as $8tj43$template, getNextElement as $8tj43$getNextElement, mergeProps as $8tj43$mergeProps, effect as $8tj43$effect, className as $8tj43$className, isServer as $8tj43$isServer, 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, setAttribute as $8tj43$setAttribute, use as $8tj43$use, style as $8tj43$style, setProperty as $8tj43$setProperty, Dynamic as $8tj43$Dynamic } from "solid-js/web";
3
3
  import { createSignal as $8tj43$createSignal, createMemo as $8tj43$createMemo, createResource as $8tj43$createResource, createEffect as $8tj43$createEffect, Show as $8tj43$Show, mergeProps as $8tj43$mergeProps1, Suspense as $8tj43$Suspense, untrack as $8tj43$untrack, createRenderEffect as $8tj43$createRenderEffect, Index as $8tj43$Index, createRoot as $8tj43$createRoot, onCleanup as $8tj43$onCleanup, For as $8tj43$For, getOwner as $8tj43$getOwner, runWithOwner as $8tj43$runWithOwner, createContext as $8tj43$createContext, useContext as $8tj43$useContext, 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
4
  import $8tj43$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  import { ListenableSet as $8tj43$ListenableSet, catchify as $8tj43$catchify1, use_href_accessor as $8tj43$use_href_accessor1, queueMacroTask as $8tj43$queueMacroTask1, report as $8tj43$report1 } from "@depict-ai/utilishared/ES10";
@@ -10,7 +10,7 @@ import { createStore as $8tj43$createStore, reconcile as $8tj43$reconcile } from
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.6";
13
+ const $8db9a15135765c11$export$83d89fbfd8236492 = "4.7.8";
14
14
  function $8e8b179489080711$export$5bad61ecde080b1f() {
15
15
  const {
16
16
  collapse: collapse,
@@ -901,38 +901,6 @@ function $00a5b94f0c11efbb$export$d9f36cf74e24d595(media_query) {
901
901
  }).remove);
902
902
  return signal[0];
903
903
  }
904
-
905
- /** @jsxImportSource solid-js */
906
-
907
- function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
908
- const [width, setWidth] = $8tj43$createSignal();
909
- const resizeObserver = new ResizeObserver($8tj43$catchify(records => {
910
- for (let j = 0; j < records.length; j++) {
911
- var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
912
- const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
913
- setWidth(width);
914
- }
915
- }));
916
- // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
917
- // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
918
- const disconnect = (0, $8tj43$observer).onexists(what_to_watch, _ref => {
919
- let {
920
- element: element
921
- } = _ref;
922
- return requestAnimationFrame($8tj43$catchify(() => {
923
- const current_size = what_to_watch.getBoundingClientRect().width;
924
- if (current_size)
925
- // If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
926
- setWidth(current_size);
927
- resizeObserver.observe(element);
928
- }));
929
- });
930
- $8tj43$onCleanup(() => {
931
- resizeObserver.disconnect();
932
- disconnect();
933
- });
934
- return width;
935
- }
936
904
  function $ceafb6fb91c6f394$export$89c6019e4baa40b1(props) {
937
905
  const style = $8tj43$createMemo(() => {
938
906
  const {
@@ -1096,9 +1064,10 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
1096
1064
  });
1097
1065
  // 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
1098
1066
  // Happened on singular, they have some weird observer (+we also have one but ours is at least 3x more efficient)
1099
- const executeWhenIdleBatched = fn => {
1067
+ const executeWhenIdleBatched = (fn, isSizesUpdate) => {
1100
1068
  if (typeof requestIdleCallback !== "function") return setTimeout(fn); // Old browsers don't get optimisation
1101
- if ($8tj43$untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately
1069
+ if ((!isSizesUpdate || !sizeSetFastPath) && $8tj43$untrack(isPrioritisedImage)) return fn(); // If we're one of the first 8 images, execute the callbacks immediately (improves lighthouse metrics)
1070
+ // unless we're just a `sizes` update after the initial sizes setting (this optimisation makes the looks animation a lot smoother on low-cpu devices)
1102
1071
  const existingStack = listingContext === null || listingContext === void 0 ? void 0 : listingContext[$56047603f9d212b6$var$onIdleFunctionsSymbol];
1103
1072
  if (existingStack) return existingStack.add(fn);
1104
1073
  const newStack = new Set([fn]);
@@ -1183,10 +1152,11 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
1183
1152
  // This greatly improves performance when loading (more) products
1184
1153
  // See https://depictaiworkspace.slack.com/archives/C05NJ0K3WRL/p1698220617663139
1185
1154
  timeoutSet = true; // Important to set timeoutSet before the call to executeWhenIdleBatched since if this is an important image executeWhenIdleBatched will execute fn immediately
1186
- executeWhenIdleBatched(handler);
1155
+ executeWhenIdleBatched(handler, true);
1187
1156
  });
1157
+ const dontLoadImageYet = $8tj43$createMemo(() => !props.size() || !hasSetSize()); // Moving this condition into a memo saves us from re-setting src and srcset (expensive) if just props.size changes
1188
1158
  $8tj43$createEffect(() => {
1189
- 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
1159
+ if (dontLoadImageYet()) return; // If size isn't known or set, don't assign src yet since it would cause the most low res image to load
1190
1160
  Object.assign(img, src_options());
1191
1161
  // Add to DOM once decoded to not require/block any paints before image has completed loading and avoid showing broken image symbol
1192
1162
  // We can do this because there has to be a container around us giving us a size
@@ -1202,7 +1172,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
1202
1172
  img.decode().catch(e => $8tj43$dwarn("Failed to decode image", e, img)) // Display the image also if loading failed so webdev can debug and doesn't get "no image"
1203
1173
  .then(async () => {
1204
1174
  // Also wait with inserting image (i.e. paint) until browser is idle
1205
- await new Promise(r => executeWhenIdleBatched(r));
1175
+ await new Promise(r => executeWhenIdleBatched(r, false));
1206
1176
  if (gotCleanedUp) return;
1207
1177
  setHasDecoded(true);
1208
1178
  hasDecodedFastPath = true;
@@ -1556,7 +1526,7 @@ var $72017ebd8b9df947$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div style=posi
1556
1526
  let $72017ebd8b9df947$var$cachedValue;
1557
1527
  async function $72017ebd8b9df947$export$7b9a0e99f0aeb2f3() {
1558
1528
  if ($72017ebd8b9df947$var$cachedValue != undefined) return $72017ebd8b9df947$var$cachedValue;
1559
- return $72017ebd8b9df947$var$cachedValue = await $72017ebd8b9df947$var$checkIfIsAffectedByChromeBug326498383();
1529
+ return $72017ebd8b9df947$var$cachedValue = $72017ebd8b9df947$var$checkIfIsAffectedByChromeBug326498383();
1560
1530
  }
1561
1531
  async function $72017ebd8b9df947$var$checkIfIsAffectedByChromeBug326498383() {
1562
1532
  let isAffected = true;
@@ -1569,7 +1539,7 @@ async function $72017ebd8b9df947$var$checkIfIsAffectedByChromeBug326498383() {
1569
1539
  setTimeout($8tj43$catchify(() => {
1570
1540
  r();
1571
1541
  div.remove();
1572
- }), 200);
1542
+ }), 500);
1573
1543
  });
1574
1544
  const {
1575
1545
  style: style
@@ -1612,7 +1582,8 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
1612
1582
  animationDuration_: animationDuration_,
1613
1583
  supportsHover_: supportsHover_,
1614
1584
  priceFormatting_: priceFormatting_,
1615
- pseudoRouter_: pseudoRouter_
1585
+ pseudoRouter_: pseudoRouter_,
1586
+ containerHeight_: containerHeight_
1616
1587
  } = _ref;
1617
1588
  let isAffectedByChromeBug = false;
1618
1589
  // If the user requests the drawer to be expanded or not
@@ -1632,6 +1603,8 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
1632
1603
  get children() {
1633
1604
  var _el$ = $8tj43$getNextElement($4089a7972a508539$var$_tmpl$),
1634
1605
  _el$2 = _el$.firstChild;
1606
+ $8tj43$addEventListener(_el$2, "mouseleave", $8tj43$catchify(() => supportsHover_() && setUserWantsExpanded(false)));
1607
+ $8tj43$addEventListener(_el$2, "mouseenter", $8tj43$catchify(() => supportsHover_() && setUserWantsExpanded(true)));
1635
1608
  $8tj43$use(el => $8tj43$createEffect(() => {
1636
1609
  if (userWantsExpanded()) return;
1637
1610
  if (isAffectedByChromeBug) {
@@ -1643,22 +1616,6 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
1643
1616
  behavior: "smooth"
1644
1617
  });
1645
1618
  }), _el$2);
1646
- $8tj43$spread(_el$2, $8tj43$mergeProps({
1647
- get classList() {
1648
- return {
1649
- expanded: userWantsExpanded(),
1650
- "resting-fully-expanded": !getSecondPartAnimationRunning() && userWantsExpanded()
1651
- };
1652
- },
1653
- get onMouseEnter() {
1654
- return $8tj43$catchify(() => supportsHover_() && setUserWantsExpanded(true));
1655
- },
1656
- get onMouseLeave() {
1657
- return $8tj43$catchify(() => supportsHover_() && setUserWantsExpanded(false));
1658
- }
1659
- }, () => displays_() && {
1660
- style: "--look-card-width:".concat(containerWidth_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px")
1661
- }), false, true);
1662
1619
  $8tj43$insert(_el$2, $8tj43$createComponent((0, $8tj43$Index), {
1663
1620
  get each() {
1664
1621
  return displays_() || Array.from({
@@ -1683,7 +1640,21 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
1683
1640
  });
1684
1641
  }
1685
1642
  }));
1686
- $8tj43$runHydrationEvents();
1643
+ $8tj43$effect(_p$ => {
1644
+ var _v$ = !!userWantsExpanded(),
1645
+ _v$2 = !!(!getSecondPartAnimationRunning() && userWantsExpanded()),
1646
+ _v$3 = displays_() &&
1647
+ // The styling is written like this to eke out animation smoothness on low CPU devices, git blame for previous, more readable versions.
1648
+ "--look-card-width:".concat(containerWidth_(), "px;--look-card-height:").concat(containerHeight_(), "px;--look-item-height:").concat(lookItemHeight() || 200, "px");
1649
+ _v$ !== _p$.e && _el$2.classList.toggle("expanded", _p$.e = _v$);
1650
+ _v$2 !== _p$.t && _el$2.classList.toggle("resting-fully-expanded", _p$.t = _v$2);
1651
+ _p$.a = $8tj43$style(_el$2, _v$3, _p$.a);
1652
+ return _p$;
1653
+ }, {
1654
+ e: undefined,
1655
+ t: undefined,
1656
+ a: undefined
1657
+ });
1687
1658
  return _el$;
1688
1659
  }
1689
1660
  });
@@ -1710,7 +1681,7 @@ function $4089a7972a508539$var$scrollingFunctionForChrome(element, targetScrollY
1710
1681
  // Bootstrap our animation - it will get called right before next frame shall be rendered.
1711
1682
  requestAnimationFrame(step);
1712
1683
  }
1713
- var $697d8713dc82b9ab$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=look-card>`);
1684
+ var $697d8713dc82b9ab$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<div class=look-card><!$><!/><!$><!/>`);
1714
1685
  function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
1715
1686
  let {
1716
1687
  display_: display_,
@@ -1721,27 +1692,17 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
1721
1692
  priceFormatting_: priceFormatting_,
1722
1693
  pseudoRouter_: pseudoRouter_
1723
1694
  } = _ref;
1695
+ let container;
1724
1696
  const useWantsExpandedSignal_ = $8tj43$createSignal(false);
1725
1697
  const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
1726
1698
  const supportsHover_ = $00a5b94f0c11efbb$export$d9f36cf74e24d595("(hover: hover) and (pointer: fine)");
1727
1699
  const us = Symbol("look");
1728
- const container = (() => {
1729
- var _el$ = $8tj43$getNextElement($697d8713dc82b9ab$var$_tmpl$);
1730
- $8tj43$addEventListener(_el$, "click", $8tj43$catchify(_ref2 => {
1731
- let {
1732
- target: target
1733
- } = _ref2;
1734
- return setUserWantsExpanded(prev => !prev);
1735
- }), true);
1736
- $8tj43$effect(() => _el$.classList.toggle("placeholder", !display_()));
1737
- $8tj43$runHydrationEvents();
1738
- return _el$;
1739
- })();
1740
- const containerWidth_ = $fc830a7ee59416ef$export$ebdc3711f7e02ccd(container);
1741
- const clickHandler = $8tj43$catchify(_ref3 => {
1700
+ const [containerWidth_, setContainerWidth] = $8tj43$createSignal();
1701
+ const [containerHeight_, setContainerHeight] = $8tj43$createSignal();
1702
+ const clickHandler = $8tj43$catchify(_ref2 => {
1742
1703
  let {
1743
1704
  target: target
1744
- } = _ref3;
1705
+ } = _ref2;
1745
1706
  if (target !== container && !container.contains(target))
1746
1707
  // When clicking outside the look, close it
1747
1708
  setUserWantsExpanded(false);
@@ -1759,39 +1720,66 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
1759
1720
  }));
1760
1721
  // Close us if another look expands
1761
1722
  $8tj43$createEffect(() => !expandedLooks_().has(us) && setUserWantsExpanded(false));
1762
- $8tj43$insert(container, () => [$8tj43$createComponent((0, $8tj43$Show), {
1763
- get when() {
1764
- return display_();
1765
- },
1766
- get fallback() {
1767
- return $8tj43$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
1768
- aspectRatio: "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(placeholderImageAspectRatio_, ")")
1769
- });
1770
- },
1771
- get children() {
1772
- return $8tj43$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1773
- get src() {
1774
- var _display_, _display_$image_urls;
1775
- return (_display_ = display_()) === null || _display_ === void 0 ? void 0 : (_display_$image_urls = _display_.image_urls) === null || _display_$image_urls === void 0 ? void 0 : _display_$image_urls[0];
1776
- },
1777
- aspectRatio: placeholderImageAspectRatio_,
1778
- autoAdjustAspectRatio: true
1779
- });
1780
- }
1781
- }), $8tj43$createComponent((0, $4089a7972a508539$export$ebf0b1d4f90c09ae), {
1782
- displays_: () => {
1783
- var _display_2;
1784
- return (_display_2 = display_()) === null || _display_2 === void 0 ? void 0 : _display_2.displays;
1785
- },
1786
- userWantsExpandedSignal_: useWantsExpandedSignal_,
1787
- containerWidth_: containerWidth_,
1788
- animationDuration_: animationDuration_,
1789
- supportsHover_: supportsHover_,
1790
- FavoriteButton_: FavoriteButton_,
1791
- priceFormatting_: priceFormatting_,
1792
- pseudoRouter_: pseudoRouter_
1793
- })]);
1794
- return container;
1723
+ return (() => {
1724
+ var _el$ = $8tj43$getNextElement($697d8713dc82b9ab$var$_tmpl$),
1725
+ _el$2 = _el$.firstChild,
1726
+ [_el$3, _co$] = $8tj43$getNextMarker(_el$2.nextSibling),
1727
+ _el$4 = _el$3.nextSibling,
1728
+ [_el$5, _co$2] = $8tj43$getNextMarker(_el$4.nextSibling);
1729
+ $8tj43$addEventListener(_el$, "click", $8tj43$catchify(() => setUserWantsExpanded(prev => !prev)), true);
1730
+ $8tj43$use(el => {
1731
+ container = el;
1732
+ const ro = new ResizeObserver($8tj43$catchify(records => {
1733
+ const last = records.at(-1);
1734
+ if (!last) return;
1735
+ const {
1736
+ width: width,
1737
+ height: height
1738
+ } = last.contentRect;
1739
+ setContainerWidth(width);
1740
+ setContainerHeight(height);
1741
+ }));
1742
+ ro.observe(el);
1743
+ $8tj43$onCleanup(() => ro.disconnect());
1744
+ }, _el$);
1745
+ _el$.classList.toggle("placeholder", !!!display_);
1746
+ $8tj43$insert(_el$, $8tj43$createComponent((0, $8tj43$Show), {
1747
+ get when() {
1748
+ return display_();
1749
+ },
1750
+ get fallback() {
1751
+ return $8tj43$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
1752
+ aspectRatio: "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(placeholderImageAspectRatio_, ")")
1753
+ });
1754
+ },
1755
+ get children() {
1756
+ return $8tj43$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
1757
+ get src() {
1758
+ var _display_, _display_$image_urls;
1759
+ return (_display_ = display_()) === null || _display_ === void 0 ? void 0 : (_display_$image_urls = _display_.image_urls) === null || _display_$image_urls === void 0 ? void 0 : _display_$image_urls[0];
1760
+ },
1761
+ aspectRatio: placeholderImageAspectRatio_,
1762
+ autoAdjustAspectRatio: true
1763
+ });
1764
+ }
1765
+ }), _el$3, _co$);
1766
+ $8tj43$insert(_el$, $8tj43$createComponent((0, $4089a7972a508539$export$ebf0b1d4f90c09ae), {
1767
+ displays_: () => {
1768
+ var _display_2;
1769
+ return (_display_2 = display_()) === null || _display_2 === void 0 ? void 0 : _display_2.displays;
1770
+ },
1771
+ userWantsExpandedSignal_: useWantsExpandedSignal_,
1772
+ containerWidth_: containerWidth_,
1773
+ animationDuration_: animationDuration_,
1774
+ supportsHover_: supportsHover_,
1775
+ FavoriteButton_: FavoriteButton_,
1776
+ priceFormatting_: priceFormatting_,
1777
+ pseudoRouter_: pseudoRouter_,
1778
+ containerHeight_: containerHeight_
1779
+ }), _el$5, _co$2);
1780
+ $8tj43$runHydrationEvents();
1781
+ return _el$;
1782
+ })();
1795
1783
  }
1796
1784
  $8tj43$delegateEvents(["click"]);
1797
1785
 
@@ -3554,6 +3542,38 @@ let $c3820807ac1e6fd7$export$44dad306455dddf;
3554
3542
  DEPICT_ID["SEARCH_PAGE"] = "depict-search-page";
3555
3543
  DEPICT_ID["PLP_CATEGORY"] = "depict-plp-category";
3556
3544
  })($c3820807ac1e6fd7$export$44dad306455dddf || ($c3820807ac1e6fd7$export$44dad306455dddf = {}));
3545
+
3546
+ /** @jsxImportSource solid-js */
3547
+
3548
+ function $fc830a7ee59416ef$export$ebdc3711f7e02ccd(what_to_watch) {
3549
+ const [width, setWidth] = $8tj43$createSignal();
3550
+ const resizeObserver = new ResizeObserver($8tj43$catchify(records => {
3551
+ for (let j = 0; j < records.length; j++) {
3552
+ var _records$j$borderBoxS, _records$j$borderBoxS2, _records$j$borderBoxS3;
3553
+ const width = (_records$j$borderBoxS = (_records$j$borderBoxS2 = records[j].borderBoxSize) === null || _records$j$borderBoxS2 === void 0 ? void 0 : (_records$j$borderBoxS3 = _records$j$borderBoxS2[0]) === null || _records$j$borderBoxS3 === void 0 ? void 0 : _records$j$borderBoxS3.inlineSize) !== null && _records$j$borderBoxS !== void 0 ? _records$j$borderBoxS : what_to_watch.getBoundingClientRect().width;
3554
+ setWidth(width);
3555
+ }
3556
+ }));
3557
+ // If we start observing elements before they're in the DOM Chrome (Version 117.0.5938.92 (Official Build) (arm64)) sometimes gives us a resize event with a width of 0 and then doesn't dispatch one with the actual width once it's in the DOM. So we wait until the element is in the DOM before we start observing it.
3558
+ // It doesn't seem to work even when waiting for it to be in the DOM, also wait an animation frame
3559
+ const disconnect = (0, $8tj43$observer).onexists(what_to_watch, _ref => {
3560
+ let {
3561
+ element: element
3562
+ } = _ref;
3563
+ return requestAnimationFrame($8tj43$catchify(() => {
3564
+ const current_size = what_to_watch.getBoundingClientRect().width;
3565
+ if (current_size)
3566
+ // If element has size, set signal to that. ResizeObserver only triggers when the content is visible in some cases, but it might already have a size. This reduces size filter expanding animation jank in chrome.
3567
+ setWidth(current_size);
3568
+ resizeObserver.observe(element);
3569
+ }));
3570
+ });
3571
+ $8tj43$onCleanup(() => {
3572
+ resizeObserver.disconnect();
3573
+ disconnect();
3574
+ });
3575
+ return width;
3576
+ }
3557
3577
  var $83c36ed4520d0335$var$_tmpl$ = /*#__PURE__*/$8tj43$template(`<svg xmlns=http://www.w3.org/2000/svg width=21 height=20 viewBox="0 0 21 20"fill=none><path fill-rule=evenodd d="M9.563 3.438c-3.107 0-5.625 2.518-5.625 5.625s2.518 5.625 5.625 5.625 5.625-2.518 5.625-5.625-2.518-5.625-5.625-5.625zm-7.5 5.625a7.5 7.5 0 1 1 15 0c0 1.733-.588 3.329-1.575 4.599l3.176 3.176a.94.94 0 0 1 0 1.326.94.94 0 0 1-1.326 0l-3.176-3.176a7.47 7.47 0 0 1-4.599 1.575 7.5 7.5 0 0 1-7.5-7.5z"fill=#0f0f0f>`);
3558
3578
  function $83c36ed4520d0335$export$f7658c347b037c3f() {
3559
3579
  let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};