@depict-ai/ui 4.3.0 → 4.3.2
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 +350 -258
- package/ES10/index.d.ts +244 -237
- package/ES10/index.js +384 -292
- package/latest/index.cjs +326 -234
- package/latest/index.d.ts +244 -237
- package/latest/index.js +360 -268
- package/package.json +2 -2
- package/server/ES10/index.cjs +307 -219
- package/server/ES10/index.d.ts +244 -237
- package/server/ES10/index.js +347 -259
- package/server/latest/index.cjs +284 -195
- package/server/latest/index.d.ts +244 -237
- package/server/latest/index.js +324 -235
package/server/ES10/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { add_to_version_info as $b8hua$add_to_version_info, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, catchify as $b8hua$catchify, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, observer as $b8hua$observer, javascript_media_query as $b8hua$javascript_media_query, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem,
|
|
2
|
-
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, escape as $b8hua$escape, createComponent as $b8hua$createComponent, mergeProps as $b8hua$
|
|
3
|
-
import { createSignal as $b8hua$createSignal, createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, Show as $b8hua$Show, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, onCleanup as $b8hua$onCleanup, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner,
|
|
4
|
-
import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify1, use_href_accessor as $b8hua$use_href_accessor1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
|
|
1
|
+
import { add_to_version_info as $b8hua$add_to_version_info, fetch_retry as $b8hua$fetch_retry, base_url as $b8hua$base_url, dwarn as $b8hua$dwarn, slider_fractional_factory as $b8hua$slider_fractional_factory, dlog as $b8hua$dlog, camelCasifyObject as $b8hua$camelCasifyObject, make_random_classname as $b8hua$make_random_classname, n_col_styling_with_dist as $b8hua$n_col_styling_with_dist, catchify as $b8hua$catchify, layout_get_visible_recs_without_partial_rows as $b8hua$layout_get_visible_recs_without_partial_rows, layout_get_total_rec_amount_for_row as $b8hua$layout_get_total_rec_amount_for_row, layout_media_query_header as $b8hua$layout_media_query_header, report as $b8hua$report, slider_fading_factory as $b8hua$slider_fading_factory, Amazing_Slider as $b8hua$Amazing_Slider, slider_snap_css as $b8hua$slider_snap_css, observer as $b8hua$observer, javascript_media_query as $b8hua$javascript_media_query, queueMacroTask as $b8hua$queueMacroTask, findMostFrequentItem as $b8hua$findMostFrequentItem, standard_price_format as $b8hua$standard_price_format, instant_exec_on_suspect_history_change as $b8hua$instant_exec_on_suspect_history_change, deparallelize_no_drop as $b8hua$deparallelize_no_drop, ContainedImage as $b8hua$ContainedImage, make_asyncIterable_exiter as $b8hua$make_asyncIterable_exiter, href_change_ipns as $b8hua$href_change_ipns, base64_encode_unicode as $b8hua$base64_encode_unicode, base64_decode_unicode as $b8hua$base64_decode_unicode, use_href_accessor as $b8hua$use_href_accessor, get_session_id as $b8hua$get_session_id, add_version_query_params as $b8hua$add_version_query_params, useExpandingContainer as $b8hua$useExpandingContainer, hex_to_rgb as $b8hua$hex_to_rgb, relative_luminance_from_rgb as $b8hua$relative_luminance_from_rgb, snakeCasifyObject as $b8hua$snakeCasifyObject, make_url_with_query_params as $b8hua$make_url_with_query_params, sort_obj as $b8hua$sort_obj, ListenableSet as $b8hua$ListenableSet1, insert_surfaces as $b8hua$insert_surfaces } from "@depict-ai/utilishared/ES10";
|
|
2
|
+
import { ssr as $b8hua$ssr, ssrHydrationKey as $b8hua$ssrHydrationKey, ssrStyle as $b8hua$ssrStyle, escape as $b8hua$escape, createComponent as $b8hua$createComponent, mergeProps as $b8hua$mergeProps1, isServer as $b8hua$isServer, ssrElement as $b8hua$ssrElement, ssrClassList as $b8hua$ssrClassList, insert as $b8hua$insert, ssrAttribute as $b8hua$ssrAttribute, spread as $b8hua$spread, Dynamic as $b8hua$Dynamic } from "solid-js/web";
|
|
3
|
+
import { createSignal as $b8hua$createSignal, createMemo as $b8hua$createMemo, createResource as $b8hua$createResource, createEffect as $b8hua$createEffect, mergeProps as $b8hua$mergeProps, Show as $b8hua$Show, Suspense as $b8hua$Suspense, untrack as $b8hua$untrack, createRenderEffect as $b8hua$createRenderEffect, Index as $b8hua$Index, createRoot as $b8hua$createRoot, onCleanup as $b8hua$onCleanup, For as $b8hua$For, getOwner as $b8hua$getOwner, runWithOwner as $b8hua$runWithOwner, createContext as $b8hua$createContext, useContext as $b8hua$useContext, createUniqueId as $b8hua$createUniqueId, createComputed as $b8hua$createComputed, ErrorBoundary as $b8hua$ErrorBoundary, splitProps as $b8hua$splitProps, on as $b8hua$on, batch as $b8hua$batch, createSelector as $b8hua$createSelector, children as $b8hua$children, createReaction as $b8hua$createReaction, mapArray as $b8hua$mapArray } from "solid-js";
|
|
5
4
|
import $b8hua$babelruntimehelpersdefineProperty from "@babel/runtime/helpers/defineProperty";
|
|
5
|
+
import { ListenableSet as $b8hua$ListenableSet, catchify as $b8hua$catchify1, use_href_accessor as $b8hua$use_href_accessor1, report as $b8hua$report1 } from "@depict-ai/utilishared/ES10";
|
|
6
6
|
import $b8hua$babelruntimehelpersclassPrivateFieldSet from "@babel/runtime/helpers/classPrivateFieldSet";
|
|
7
7
|
import $b8hua$babelruntimehelpersclassPrivateFieldGet from "@babel/runtime/helpers/classPrivateFieldGet";
|
|
8
8
|
import { createStore as $b8hua$createStore, reconcile as $b8hua$reconcile } from "solid-js/store";
|
|
@@ -10,7 +10,7 @@ import { createStore as $b8hua$createStore, reconcile as $b8hua$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.3.
|
|
13
|
+
const $8db9a15135765c11$export$83d89fbfd8236492 = "4.3.2";
|
|
14
14
|
const $a9c7ba6087881ac2$var$transform_elements = sorted_cols_at_size => {
|
|
15
15
|
const cols_at_size = [];
|
|
16
16
|
for (let i = 0; i < sorted_cols_at_size.length; i++) {
|
|
@@ -436,7 +436,7 @@ var $63f1f8dbcd07d3b0$var$_tmpl$ = ["<div", ' class="', '">', "</div>"],
|
|
|
436
436
|
$63f1f8dbcd07d3b0$var$_tmpl$2 = ["<style", ' type="text/css">', "</style>"];
|
|
437
437
|
function $63f1f8dbcd07d3b0$export$d21e32dfedac04be(props) {
|
|
438
438
|
const container_class = "x" + $b8hua$createUniqueId();
|
|
439
|
-
const container_element_ = $b8hua$ssrElement("div", $b8hua$
|
|
439
|
+
const container_element_ = $b8hua$ssrElement("div", $b8hua$mergeProps1(() => props.element_attributes, {
|
|
440
440
|
classList: {
|
|
441
441
|
[container_class]: true
|
|
442
442
|
}
|
|
@@ -640,7 +640,7 @@ function $39ddb986053fb759$export$d41d19e89346fa2(_ref) {
|
|
|
640
640
|
} = slider;
|
|
641
641
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
642
642
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
643
|
-
$b8hua$createComponent(Layout, $b8hua$
|
|
643
|
+
$b8hua$createComponent(Layout, $b8hua$mergeProps1({
|
|
644
644
|
rows: "all",
|
|
645
645
|
layout: "slider"
|
|
646
646
|
}, layout_options_));
|
|
@@ -919,7 +919,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
919
919
|
});
|
|
920
920
|
// Work around https://github.com/solidjs/solid/issues/1828
|
|
921
921
|
const img = new Image(); // Need to use new Image or browser might not start loading image before it's in the DOM
|
|
922
|
-
const [, otherAttributes] = $b8hua$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
922
|
+
const [, otherAttributes] = $b8hua$splitProps(props, ["resolutions", "size", "src", "srcSet", "loading", "keyRatioUpdating", "customUrls" // Can't have properties ending on underscore because the property name mangling will get confused by this <-
|
|
923
923
|
]);
|
|
924
924
|
|
|
925
925
|
const [hasSetSize, setHasSetSize] = $b8hua$createSignal(false);
|
|
@@ -935,7 +935,7 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
935
935
|
if (loading === "force-lazy") return true;
|
|
936
936
|
return loading === "lazy" && !isPrioritisedImage();
|
|
937
937
|
});
|
|
938
|
-
const modifiedOtherAttributes = $b8hua$
|
|
938
|
+
const modifiedOtherAttributes = $b8hua$mergeProps(otherAttributes, {
|
|
939
939
|
get loading() {
|
|
940
940
|
return shouldActuallyEnableLazyLoading() ? "lazy" : undefined;
|
|
941
941
|
}
|
|
@@ -975,13 +975,18 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
975
975
|
let hasDecodedFastPath = false;
|
|
976
976
|
let timeoutSet = false;
|
|
977
977
|
let gotCleanedUp = false;
|
|
978
|
+
let srcJustChanged = true;
|
|
978
979
|
img.classList.add("s-responsive-image");
|
|
979
980
|
if (listingContext) {
|
|
980
981
|
let prevValue;
|
|
981
982
|
const aspectRatios = listingContext[$56047603f9d212b6$export$f8945274f08a3105] || (listingContext[$56047603f9d212b6$export$f8945274f08a3105] = new Set());
|
|
982
983
|
const [, setMostPrevalentAspectRatio] = listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] || (listingContext[$56047603f9d212b6$export$6066eb417ed2e9f7] = $b8hua$createSignal());
|
|
983
984
|
img.addEventListener("load", $b8hua$catchify(() => {
|
|
984
|
-
|
|
985
|
+
if (props.keyRatioUpdating) {
|
|
986
|
+
if (!srcJustChanged) return;
|
|
987
|
+
srcJustChanged = false;
|
|
988
|
+
}
|
|
989
|
+
// Save our aspect ratio whenever it changes, so that we can base the containers on the most dominant aspect ratio, used in SearchModalV2 and LookItem
|
|
985
990
|
const aspectRatio_ = img.naturalWidth / img.naturalHeight;
|
|
986
991
|
if (prevValue) aspectRatios.delete(prevValue);
|
|
987
992
|
const newValue = !isNaN(aspectRatio_) ? {
|
|
@@ -1002,7 +1007,11 @@ function $56047603f9d212b6$export$6e5611bc7e57e477(props) {
|
|
|
1002
1007
|
$b8hua$onCleanup(() => prevValue && aspectRatios.delete(prevValue));
|
|
1003
1008
|
}
|
|
1004
1009
|
$b8hua$onCleanup(() => gotCleanedUp = true);
|
|
1005
|
-
$b8hua$spread(img, $b8hua$
|
|
1010
|
+
$b8hua$spread(img, $b8hua$mergeProps(modifiedOtherAttributes), false, true);
|
|
1011
|
+
$b8hua$createRenderEffect(() => {
|
|
1012
|
+
props.src;
|
|
1013
|
+
srcJustChanged = true;
|
|
1014
|
+
});
|
|
1006
1015
|
$b8hua$createEffect(() => {
|
|
1007
1016
|
if (!props.size()) return; // wait until we have a size, run every time the size changes
|
|
1008
1017
|
if (timeoutSet) return;
|
|
@@ -1070,48 +1079,22 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1070
1079
|
context[$4df489344a0f97c7$export$d7b7ab832c20e2f4] = $b8hua$createSignal();
|
|
1071
1080
|
const [currentImageSize, setCurrentImageSize] = (context === null || context === void 0 ? void 0 : context[$4df489344a0f97c7$export$d7b7ab832c20e2f4]) || $4df489344a0f97c7$var$backupSizeSignal; // use global fallback signal (might lead to blurry images) if no context is available
|
|
1072
1081
|
const [mostPrevalentAspectRatio] = context ? context[(0, $56047603f9d212b6$export$6066eb417ed2e9f7)] || (context[(0, $56047603f9d212b6$export$6066eb417ed2e9f7)] = $b8hua$createSignal()) : [];
|
|
1073
|
-
const [aspectRatio, setAspectRatio] = $b8hua$createSignal($b8hua$untrack(() => props.aspectRatio));
|
|
1074
1082
|
const container = $801e8845d3fa3653$export$94026ee33dbabc26({
|
|
1075
1083
|
// Write getters manually instead of using JSX, so we can do more complex logic in the aspectRatio getter without increasing bundle size
|
|
1076
1084
|
get class() {
|
|
1077
1085
|
return props.class;
|
|
1078
1086
|
},
|
|
1079
1087
|
get aspectRatio() {
|
|
1080
|
-
|
|
1088
|
+
if (props.autoAdjustAspectRatio) {
|
|
1089
|
+
const targetRatio = mostPrevalentAspectRatio === null || mostPrevalentAspectRatio === void 0 ? void 0 : mostPrevalentAspectRatio();
|
|
1090
|
+
if (targetRatio != undefined) return "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(targetRatio, ")");
|
|
1091
|
+
}
|
|
1092
|
+
return props.aspectRatio;
|
|
1081
1093
|
}
|
|
1082
1094
|
});
|
|
1083
1095
|
const owner = $b8hua$getOwner();
|
|
1084
1096
|
let createdSizeAccessor = false;
|
|
1085
1097
|
let wasCleanedUp = false;
|
|
1086
|
-
let timeout;
|
|
1087
|
-
$b8hua$createEffect(() => {
|
|
1088
|
-
const {
|
|
1089
|
-
autoAdjustAspectRatio: autoAdjustAspectRatio
|
|
1090
|
-
} = props;
|
|
1091
|
-
if (autoAdjustAspectRatio) {
|
|
1092
|
-
const targetRatio = mostPrevalentAspectRatio === null || mostPrevalentAspectRatio === void 0 ? void 0 : mostPrevalentAspectRatio();
|
|
1093
|
-
if (targetRatio != undefined) {
|
|
1094
|
-
const targetValue = "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(targetRatio, ")");
|
|
1095
|
-
const updateAspectRatio = $b8hua$catchify(() => setAspectRatio(targetValue));
|
|
1096
|
-
if (autoAdjustAspectRatio === "smoothed") {
|
|
1097
|
-
if (!timeout)
|
|
1098
|
-
// If we don't have a timeout yet, also update instantly. This is so that the aspect ratio does get set at the start of a transition, if it changes (when using smoothing).
|
|
1099
|
-
updateAspectRatio();
|
|
1100
|
-
clearTimeout(timeout);
|
|
1101
|
-
timeout = setTimeout(() => {
|
|
1102
|
-
timeout = undefined;
|
|
1103
|
-
updateAspectRatio();
|
|
1104
|
-
}, 500);
|
|
1105
|
-
return;
|
|
1106
|
-
}
|
|
1107
|
-
return updateAspectRatio();
|
|
1108
|
-
}
|
|
1109
|
-
} else {
|
|
1110
|
-
clearTimeout(timeout);
|
|
1111
|
-
timeout = undefined;
|
|
1112
|
-
}
|
|
1113
|
-
setAspectRatio(props.aspectRatio);
|
|
1114
|
-
});
|
|
1115
1098
|
$b8hua$createEffect(() => {
|
|
1116
1099
|
if (currentImageSize() || wasCleanedUp) return; // We get into the effect when onCleanup is called if we don't have wasCleanedUp
|
|
1117
1100
|
// ensure we always have a size accessor
|
|
@@ -1125,7 +1108,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1125
1108
|
$b8hua$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
|
|
1126
1109
|
});
|
|
1127
1110
|
|
|
1128
|
-
$b8hua$insert(container, $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $b8hua$
|
|
1111
|
+
$b8hua$insert(container, $b8hua$createComponent((0, $56047603f9d212b6$export$6e5611bc7e57e477), $b8hua$mergeProps1({
|
|
1129
1112
|
get size() {
|
|
1130
1113
|
return $b8hua$createMemo(() => {
|
|
1131
1114
|
var _currentImageSize;
|
|
@@ -1144,7 +1127,7 @@ function $4df489344a0f97c7$export$e4b984597b71e989(props) {
|
|
|
1144
1127
|
return container;
|
|
1145
1128
|
}
|
|
1146
1129
|
function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
|
|
1147
|
-
return $b8hua$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $b8hua$
|
|
1130
|
+
return $b8hua$createComponent((0, $4df489344a0f97c7$export$e4b984597b71e989), $b8hua$mergeProps1(props, {
|
|
1148
1131
|
get imgProps() {
|
|
1149
1132
|
return {
|
|
1150
1133
|
...props.imgProps,
|
|
@@ -1161,7 +1144,13 @@ function $98688279b9059f50$export$9d4a4b669b1929ab(props) {
|
|
|
1161
1144
|
}
|
|
1162
1145
|
}));
|
|
1163
1146
|
}
|
|
1164
|
-
|
|
1147
|
+
function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
|
|
1148
|
+
return $b8hua$createMemo(() => {
|
|
1149
|
+
const price_formatting = props.price_formatting_;
|
|
1150
|
+
return $b8hua$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1151
|
+
});
|
|
1152
|
+
}
|
|
1153
|
+
var $0c5b1686f971e5e7$var$_tmpl$ = ["<div", ' class="img-wrapper">', "</div>"],
|
|
1165
1154
|
$0c5b1686f971e5e7$var$_tmpl$2 = ["<span", ' class="d-price original">', "</span>"],
|
|
1166
1155
|
$0c5b1686f971e5e7$var$_tmpl$3 = ["<div", ' class="right-part"><div class="text-container"><span class="d-title line-clamp">', '</span><span class="', '">', "</span><!--$-->", "<!--/--></div><!--$-->", "<!--/--></div>"];
|
|
1167
1156
|
function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
@@ -1171,23 +1160,17 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1171
1160
|
isExpanded_: isExpanded_,
|
|
1172
1161
|
textFadeInAnimationRunning_: textFadeInAnimationRunning_,
|
|
1173
1162
|
outerRef_: outerRef_,
|
|
1174
|
-
animationDuration_: animationDuration_
|
|
1163
|
+
animationDuration_: animationDuration_,
|
|
1164
|
+
priceFormatting_: priceFormatting_,
|
|
1165
|
+
pseudoRouter_: pseudoRouter_
|
|
1175
1166
|
} = _ref;
|
|
1176
1167
|
const variantToUse = $b8hua$createMemo(() => {
|
|
1177
1168
|
const display = display_();
|
|
1178
1169
|
return display === null || display === void 0 ? void 0 : display.variant_displays[display === null || display === void 0 ? void 0 : display.variant_index];
|
|
1179
1170
|
});
|
|
1180
|
-
const imageUrls = () => {
|
|
1181
|
-
var _variantToUse;
|
|
1182
|
-
return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : _variantToUse.image_urls;
|
|
1183
|
-
};
|
|
1184
1171
|
const imageUrl = $b8hua$createMemo(() => {
|
|
1185
|
-
var
|
|
1186
|
-
return (
|
|
1187
|
-
});
|
|
1188
|
-
const secondaryImageUrl = $b8hua$createMemo(() => {
|
|
1189
|
-
var _imageUrls2;
|
|
1190
|
-
return (_imageUrls2 = imageUrls()) === null || _imageUrls2 === void 0 ? void 0 : _imageUrls2[1];
|
|
1172
|
+
var _variantToUse, _variantToUse$image_u;
|
|
1173
|
+
return (_variantToUse = variantToUse()) === null || _variantToUse === void 0 ? void 0 : (_variantToUse$image_u = _variantToUse.image_urls) === null || _variantToUse$image_u === void 0 ? void 0 : _variantToUse$image_u[0];
|
|
1191
1174
|
});
|
|
1192
1175
|
const [animationIsRunning, setAnimationIsRunning] = textFadeInAnimationRunning_;
|
|
1193
1176
|
const [isExpandedThrottledByOurEffectRun, setIsExpandedThrottledByOurEffectRun] = $b8hua$createSignal($b8hua$untrack(isExpanded_));
|
|
@@ -1200,16 +1183,18 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1200
1183
|
var _variantToUse3;
|
|
1201
1184
|
return (_variantToUse3 = variantToUse()) === null || _variantToUse3 === void 0 ? void 0 : _variantToUse3.original_price;
|
|
1202
1185
|
});
|
|
1203
|
-
const isOnSale = $b8hua$createMemo(() => salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense
|
|
1186
|
+
const isOnSale = $b8hua$createMemo(() => !salePrice.loading && !originalPrice.loading && salePrice.latest !== originalPrice.latest); // .latest doesn't trigger suspense after the initial load
|
|
1187
|
+
const enableLink = $b8hua$createMemo(() => isExpanded_() && !animationIsRunning());
|
|
1188
|
+
const href = $b8hua$createMemo(() => {
|
|
1189
|
+
var _variantToUse4;
|
|
1190
|
+
return (_variantToUse4 = variantToUse()) === null || _variantToUse4 === void 0 ? void 0 : _variantToUse4.page_url;
|
|
1191
|
+
});
|
|
1204
1192
|
const FavoriteButton = FavoriteButton_; // Just to get rid of the type error - TS doesn't understand <Show>
|
|
1205
|
-
return $b8hua$ssrElement("a", $b8hua$
|
|
1193
|
+
return $b8hua$ssrElement("a", $b8hua$mergeProps1({
|
|
1206
1194
|
"class": "look-item"
|
|
1207
|
-
}, () => {
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
href: (_variantToUse4 = variantToUse()) === null || _variantToUse4 === void 0 ? void 0 : _variantToUse4.page_url
|
|
1211
|
-
} : {};
|
|
1212
|
-
}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1195
|
+
}, () => enableLink() ? {
|
|
1196
|
+
href: href()
|
|
1197
|
+
} : {}), () => ["<!--$-->", $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1213
1198
|
when: imageUrl,
|
|
1214
1199
|
get fallback() {
|
|
1215
1200
|
return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
|
|
@@ -1235,25 +1220,10 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1235
1220
|
return isExpanded_() ? 0.75 : 1;
|
|
1236
1221
|
},
|
|
1237
1222
|
get autoAdjustAspectRatio() {
|
|
1238
|
-
return isExpanded_()
|
|
1239
|
-
}
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1243
|
-
get when() {
|
|
1244
|
-
return secondaryImageUrl();
|
|
1245
|
-
},
|
|
1246
|
-
get children() {
|
|
1247
|
-
return $b8hua$createComponent((0, $98688279b9059f50$export$9d4a4b669b1929ab), {
|
|
1248
|
-
get src() {
|
|
1249
|
-
return secondaryImageUrl();
|
|
1223
|
+
return isExpanded_();
|
|
1250
1224
|
},
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
},
|
|
1254
|
-
"class": "secondary",
|
|
1255
|
-
get autoAdjustAspectRatio() {
|
|
1256
|
-
return isExpanded_() ? "smoothed" : false;
|
|
1225
|
+
imgProps: {
|
|
1226
|
+
keyRatioUpdating: true
|
|
1257
1227
|
}
|
|
1258
1228
|
});
|
|
1259
1229
|
}
|
|
@@ -1268,18 +1238,66 @@ function $0c5b1686f971e5e7$export$b73ed90f0ee50dc3(_ref) {
|
|
|
1268
1238
|
return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$3, $b8hua$ssrHydrationKey(), (_$escape2 = $b8hua$escape((_variantToUse5 = variantToUse()) === null || _variantToUse5 === void 0 ? void 0 : _variantToUse5.title)) !== null && _$escape2 !== void 0 ? _$escape2 : $b8hua$escape($b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
|
|
1269
1239
|
height: "1em",
|
|
1270
1240
|
width: "20ch"
|
|
1271
|
-
})), "d-price ".concat(isOnSale() ? "sale" : ""),
|
|
1272
|
-
height: "1em",
|
|
1273
|
-
width: "20ch"
|
|
1274
|
-
})) : $b8hua$escape(salePrice()), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1241
|
+
})), "d-price ".concat(isOnSale() ? "sale" : ""), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1275
1242
|
get when() {
|
|
1276
|
-
return
|
|
1243
|
+
return variantToUse() && !salePrice.loading;
|
|
1277
1244
|
},
|
|
1278
|
-
get
|
|
1279
|
-
return $b8hua$
|
|
1245
|
+
get fallback() {
|
|
1246
|
+
return $b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
|
|
1280
1247
|
height: "1em",
|
|
1281
1248
|
width: "20ch"
|
|
1282
|
-
})
|
|
1249
|
+
});
|
|
1250
|
+
},
|
|
1251
|
+
get children() {
|
|
1252
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
1253
|
+
get when() {
|
|
1254
|
+
return salePrice.latest;
|
|
1255
|
+
},
|
|
1256
|
+
get children() {
|
|
1257
|
+
return [priceFormatting_().pre_, $b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
|
|
1258
|
+
get price_() {
|
|
1259
|
+
return salePrice();
|
|
1260
|
+
},
|
|
1261
|
+
get price_formatting_() {
|
|
1262
|
+
return priceFormatting_();
|
|
1263
|
+
}
|
|
1264
|
+
}), priceFormatting_().post_];
|
|
1265
|
+
}
|
|
1266
|
+
});
|
|
1267
|
+
}
|
|
1268
|
+
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1269
|
+
get when() {
|
|
1270
|
+
return isOnSale();
|
|
1271
|
+
},
|
|
1272
|
+
get children() {
|
|
1273
|
+
return $b8hua$ssr($0c5b1686f971e5e7$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1274
|
+
get when() {
|
|
1275
|
+
return variantToUse() && !originalPrice.loading;
|
|
1276
|
+
},
|
|
1277
|
+
get fallback() {
|
|
1278
|
+
return $b8hua$createComponent((0, $ceafb6fb91c6f394$export$89c6019e4baa40b1), {
|
|
1279
|
+
height: "1em",
|
|
1280
|
+
width: "20ch"
|
|
1281
|
+
});
|
|
1282
|
+
},
|
|
1283
|
+
get children() {
|
|
1284
|
+
return $b8hua$createComponent((0, $b8hua$Show), {
|
|
1285
|
+
get when() {
|
|
1286
|
+
return salePrice.latest;
|
|
1287
|
+
},
|
|
1288
|
+
get children() {
|
|
1289
|
+
return [priceFormatting_().pre_, $b8hua$createComponent((0, $60ec7a29849d81db$export$a71e92cfbb498adc), {
|
|
1290
|
+
get price_() {
|
|
1291
|
+
return originalPrice();
|
|
1292
|
+
},
|
|
1293
|
+
get price_formatting_() {
|
|
1294
|
+
return priceFormatting_();
|
|
1295
|
+
}
|
|
1296
|
+
}), priceFormatting_().post_];
|
|
1297
|
+
}
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1300
|
+
})));
|
|
1283
1301
|
}
|
|
1284
1302
|
})), $b8hua$escape($b8hua$createComponent((0, $b8hua$Show), {
|
|
1285
1303
|
when: FavoriteButton_,
|
|
@@ -1350,7 +1368,9 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1350
1368
|
userWantsExpandedSignal_: [userWantsExpanded, setUserWantsExpanded],
|
|
1351
1369
|
containerWidth_: containerWidth_,
|
|
1352
1370
|
animationDuration_: animationDuration_,
|
|
1353
|
-
supportsHover_: supportsHover_
|
|
1371
|
+
supportsHover_: supportsHover_,
|
|
1372
|
+
priceFormatting_: priceFormatting_,
|
|
1373
|
+
pseudoRouter_: pseudoRouter_
|
|
1354
1374
|
} = _ref;
|
|
1355
1375
|
let isAffectedByChromeBug = false;
|
|
1356
1376
|
// If the user requests the drawer to be expanded or not
|
|
@@ -1367,7 +1387,7 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1367
1387
|
return containerWidth_() || !displays_;
|
|
1368
1388
|
},
|
|
1369
1389
|
get children() {
|
|
1370
|
-
return $b8hua$ssr($4089a7972a508539$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrElement("div", $b8hua$
|
|
1390
|
+
return $b8hua$ssr($4089a7972a508539$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrElement("div", $b8hua$mergeProps1({
|
|
1371
1391
|
get ["class"]() {
|
|
1372
1392
|
return "look-overlay ".concat(userWantsExpanded() ? "expanded" : "", " ").concat(!getSecondPartAnimationRunning() && userWantsExpanded() ? "resting-fully-expanded" : "");
|
|
1373
1393
|
}
|
|
@@ -1381,11 +1401,13 @@ function $4089a7972a508539$export$ebf0b1d4f90c09ae(_ref) {
|
|
|
1381
1401
|
},
|
|
1382
1402
|
children: (display, index) => {
|
|
1383
1403
|
return $b8hua$createComponent((0, $0c5b1686f971e5e7$export$b73ed90f0ee50dc3), {
|
|
1404
|
+
pseudoRouter_: pseudoRouter_,
|
|
1384
1405
|
animationDuration_: animationDuration_,
|
|
1385
1406
|
display_: display,
|
|
1386
1407
|
FavoriteButton_: FavoriteButton_,
|
|
1387
1408
|
isExpanded_: userWantsExpanded,
|
|
1388
1409
|
textFadeInAnimationRunning_: textFadeInAnimationRunning,
|
|
1410
|
+
priceFormatting_: priceFormatting_,
|
|
1389
1411
|
outerRef_: el => $b8hua$createEffect(() => {
|
|
1390
1412
|
if (index !== 0) return;
|
|
1391
1413
|
const resizeObserver = new ResizeObserver($b8hua$catchify(records => setLookItemHeight(records.at(-1).contentRect.height)));
|
|
@@ -1427,10 +1449,10 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1427
1449
|
expandedLooksSignal_: [expandedLooks_, setExpandedLooks],
|
|
1428
1450
|
FavoriteButton_: FavoriteButton_,
|
|
1429
1451
|
placeholderImageAspectRatio_: placeholderImageAspectRatio_,
|
|
1430
|
-
animationDuration_: animationDuration_
|
|
1452
|
+
animationDuration_: animationDuration_,
|
|
1453
|
+
priceFormatting_: priceFormatting_,
|
|
1454
|
+
pseudoRouter_: pseudoRouter_
|
|
1431
1455
|
} = _ref;
|
|
1432
|
-
// TODO: shopify, run displayTransformers to get dynamic prices
|
|
1433
|
-
// TODO: format prices
|
|
1434
1456
|
const [coverImage] = (display_ === null || display_ === void 0 ? void 0 : display_.image_urls) || [];
|
|
1435
1457
|
const useWantsExpandedSignal_ = $b8hua$createSignal(false);
|
|
1436
1458
|
const [userWantsExpanded, setUserWantsExpanded] = useWantsExpandedSignal_;
|
|
@@ -1463,7 +1485,7 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1463
1485
|
when: display_,
|
|
1464
1486
|
get fallback() {
|
|
1465
1487
|
return $b8hua$createComponent((0, $3ab4aa97880fb88d$export$3f37af283f8fb843), {
|
|
1466
|
-
aspectRatio: placeholderImageAspectRatio_
|
|
1488
|
+
aspectRatio: "var(".concat((0, $5eaa00b951637e96$export$8a2234b5b1a5ebd4), ", ").concat(placeholderImageAspectRatio_, ")")
|
|
1467
1489
|
});
|
|
1468
1490
|
},
|
|
1469
1491
|
get children() {
|
|
@@ -1481,10 +1503,136 @@ function $697d8713dc82b9ab$export$44809a8a3e867e30(_ref) {
|
|
|
1481
1503
|
containerWidth_: containerWidth_,
|
|
1482
1504
|
animationDuration_: animationDuration_,
|
|
1483
1505
|
supportsHover_: supportsHover_,
|
|
1484
|
-
FavoriteButton_: FavoriteButton_
|
|
1506
|
+
FavoriteButton_: FavoriteButton_,
|
|
1507
|
+
priceFormatting_: priceFormatting_,
|
|
1508
|
+
pseudoRouter_: pseudoRouter_
|
|
1485
1509
|
})]);
|
|
1486
1510
|
return container;
|
|
1487
1511
|
}
|
|
1512
|
+
|
|
1513
|
+
/**
|
|
1514
|
+
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
1515
|
+
* @param clickEvent The click event that triggered the navigation
|
|
1516
|
+
*/
|
|
1517
|
+
function $9b35d1384e31813a$export$29d28dadc2d6b631(clickEvent) {
|
|
1518
|
+
return (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.button) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.metaKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.ctrlKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
1519
|
+
);
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
function $ac571292d606f30b$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
1523
|
+
$ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
1524
|
+
privateSet.add(obj);
|
|
1525
|
+
}
|
|
1526
|
+
function $ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateCollection) {
|
|
1527
|
+
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
1528
|
+
}
|
|
1529
|
+
function $ac571292d606f30b$var$_classPrivateMethodGet(receiver, privateSet, fn) {
|
|
1530
|
+
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
1531
|
+
return fn;
|
|
1532
|
+
}
|
|
1533
|
+
var $ac571292d606f30b$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
1534
|
+
var $ac571292d606f30b$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
1535
|
+
class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
1536
|
+
/**
|
|
1537
|
+
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
1538
|
+
*/ /**
|
|
1539
|
+
* We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
|
|
1540
|
+
*/ /**
|
|
1541
|
+
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
1542
|
+
* This standardises waiting for all kinds of routers
|
|
1543
|
+
*/
|
|
1544
|
+
constructor(on_navigation, listing_query_state_key) {
|
|
1545
|
+
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_get_navigation_happened_promise);
|
|
1546
|
+
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_throwing_on_navigation);
|
|
1547
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "on_navigation_", void 0);
|
|
1548
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "listing_query_state_key", void 0);
|
|
1549
|
+
$b8hua$babelruntimehelpersdefineProperty(this, "navigate_", {
|
|
1550
|
+
/**
|
|
1551
|
+
* Call this if you *just* want to replace the state object in history.state
|
|
1552
|
+
*/
|
|
1553
|
+
replace_state_: new_state => {
|
|
1554
|
+
var _globalThis$history;
|
|
1555
|
+
// This doesn't break any router, so we just do this directly for now, since many don't expose an interface for changing the state
|
|
1556
|
+
globalThis === null || globalThis === void 0 || (_globalThis$history = globalThis.history) === null || _globalThis$history === void 0 || _globalThis$history.replaceState(new_state, "");
|
|
1557
|
+
},
|
|
1558
|
+
/**
|
|
1559
|
+
* Call this to change the URL
|
|
1560
|
+
* @param new_url_ new URL to go to
|
|
1561
|
+
* @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
|
|
1562
|
+
* @param force_spa_navigation_ if you want to force SPA navigation even if on_navigation_ is set to "hard_navigation". You should only set this to true for inter-SDK-page navigations
|
|
1563
|
+
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
1564
|
+
* @param listing_id_ If you are navigating to a category and know the listing_id of, please provide it. This is for making a better devEx in js-ui
|
|
1565
|
+
*/
|
|
1566
|
+
go_to_: $b8hua$catchify(async _ref => {
|
|
1567
|
+
let {
|
|
1568
|
+
new_url_: raw_new_url,
|
|
1569
|
+
event_: event_,
|
|
1570
|
+
force_spa_navigation_: force_spa_navigation_,
|
|
1571
|
+
is_replace_: is_replace_,
|
|
1572
|
+
listing_query_: listing_query_,
|
|
1573
|
+
scroll = true
|
|
1574
|
+
} = _ref;
|
|
1575
|
+
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
1576
|
+
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
1577
|
+
if ($9b35d1384e31813a$export$29d28dadc2d6b631(event_)) return;
|
|
1578
|
+
const different_origin = new_url_.origin !== location.origin;
|
|
1579
|
+
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
1580
|
+
if (force_spa_navigation_ && different_origin)
|
|
1581
|
+
// If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
|
|
1582
|
+
$b8hua$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
|
|
1583
|
+
if (!event_)
|
|
1584
|
+
// If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
|
|
1585
|
+
location.assign(new_url_);
|
|
1586
|
+
return;
|
|
1587
|
+
}
|
|
1588
|
+
event_ === null || event_ === void 0 || event_.preventDefault();
|
|
1589
|
+
const promise = $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_get_navigation_happened_promise, $ac571292d606f30b$var$_get_navigation_happened_promise2).call(this, true);
|
|
1590
|
+
if (force_spa_navigation_ && wants_hard_navigation) {
|
|
1591
|
+
// Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
|
|
1592
|
+
const new_state = history.state;
|
|
1593
|
+
if (listing_query_) {
|
|
1594
|
+
// In JS-UI we need to know the listing_id of the current category, therefore push it into state
|
|
1595
|
+
if (!this.listing_query_state_key) $b8hua$report(new Error("listing_query_state_key is not set"), "error");
|
|
1596
|
+
new_state[this.listing_query_state_key] = listing_query_;
|
|
1597
|
+
}
|
|
1598
|
+
history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
|
|
1599
|
+
} else $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_throwing_on_navigation, $ac571292d606f30b$var$_throwing_on_navigation2).call(this, {
|
|
1600
|
+
is_replace: is_replace_,
|
|
1601
|
+
new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
|
|
1602
|
+
scroll: scroll
|
|
1603
|
+
});
|
|
1604
|
+
await promise;
|
|
1605
|
+
})
|
|
1606
|
+
});
|
|
1607
|
+
this.listing_query_state_key = listing_query_state_key;
|
|
1608
|
+
this.on_navigation_ = on_navigation;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
function $ac571292d606f30b$var$_throwing_on_navigation2() {
|
|
1612
|
+
const {
|
|
1613
|
+
on_navigation_: on_navigation_
|
|
1614
|
+
} = this;
|
|
1615
|
+
if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
|
|
1616
|
+
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
1617
|
+
try {
|
|
1618
|
+
return on_navigation_(...arguments);
|
|
1619
|
+
} catch (e) {
|
|
1620
|
+
queueMicrotask(() => {
|
|
1621
|
+
throw e;
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
1626
|
+
return new Promise(resolve => {
|
|
1627
|
+
const handler = what_happened => {
|
|
1628
|
+
if (what_happened === (is_replace ? "replaceState" : "pushState")) {
|
|
1629
|
+
resolve();
|
|
1630
|
+
(0, $b8hua$instant_exec_on_suspect_history_change).delete(handler);
|
|
1631
|
+
}
|
|
1632
|
+
};
|
|
1633
|
+
(0, $b8hua$instant_exec_on_suspect_history_change).add(handler);
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1488
1636
|
var $cee56a95f722f55f$var$_tmpl$ = ["<div", ' class="depict recommendations looks" style="', '">', "</div>"];
|
|
1489
1637
|
let $cee56a95f722f55f$var$expandedLooksSignal_;
|
|
1490
1638
|
function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
@@ -1493,6 +1641,7 @@ function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
|
1493
1641
|
equals: false
|
|
1494
1642
|
}));
|
|
1495
1643
|
const expandingAnimationDuration = 240;
|
|
1644
|
+
const pseudoRouter = new (0, $ac571292d606f30b$export$7e1297a3a19f10d8)("hard_navigation");
|
|
1496
1645
|
const grid_spacing_override = $b8hua$createMemo(() => {
|
|
1497
1646
|
const {
|
|
1498
1647
|
gridSpacing_: gridSpacing_
|
|
@@ -1520,19 +1669,35 @@ function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
|
1520
1669
|
});
|
|
1521
1670
|
const decoded = await (response === null || response === void 0 ? void 0 : (_json = (_ref2 = response).json) === null || _json === void 0 ? void 0 : _json.call(_ref2).catch(() => false));
|
|
1522
1671
|
if (!decoded)
|
|
1523
|
-
// If network fails, make sure to return empty array
|
|
1672
|
+
// If network fails, make sure to return empty array and SolidRecommendationSlider will remove its elements
|
|
1524
1673
|
return [];
|
|
1525
|
-
|
|
1674
|
+
const {
|
|
1675
|
+
listings: listings
|
|
1676
|
+
} = decoded;
|
|
1677
|
+
const baseData = {
|
|
1678
|
+
merchant: merchant,
|
|
1679
|
+
market: market,
|
|
1680
|
+
locale: locale
|
|
1681
|
+
};
|
|
1682
|
+
return $cee56a95f722f55f$var$runDisplayTransformersForLooks(baseData, listings, props.displayTransformers_);
|
|
1683
|
+
});
|
|
1684
|
+
$b8hua$createEffect(() => {
|
|
1685
|
+
const {
|
|
1686
|
+
onNavigation_: onNavigation_
|
|
1687
|
+
} = props;
|
|
1688
|
+
if (onNavigation_) pseudoRouter.on_navigation_ = onNavigation_;
|
|
1526
1689
|
});
|
|
1527
1690
|
return $b8hua$ssr($cee56a95f722f55f$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrStyle("--animation-duration: ".concat(expandingAnimationDuration, "ms")), $b8hua$escape($b8hua$createComponent((0, $5441862cd2f5e111$export$e68cff63f76bd15b), {
|
|
1528
1691
|
get children() {
|
|
1529
1692
|
return $39ddb986053fb759$export$d41d19e89346fa2({
|
|
1530
|
-
product_card_template_:
|
|
1693
|
+
product_card_template_: display => $697d8713dc82b9ab$export$44809a8a3e867e30({
|
|
1531
1694
|
display_: display,
|
|
1532
1695
|
FavoriteButton_: props.FavoriteButton_,
|
|
1533
1696
|
placeholderImageAspectRatio_: props.imagePlaceholderAspectRatio_,
|
|
1534
1697
|
animationDuration_: expandingAnimationDuration,
|
|
1535
|
-
expandedLooksSignal_: $cee56a95f722f55f$var$expandedLooksSignal_
|
|
1698
|
+
expandedLooksSignal_: $cee56a95f722f55f$var$expandedLooksSignal_,
|
|
1699
|
+
priceFormatting_: () => props.priceFormatting_,
|
|
1700
|
+
pseudoRouter_: pseudoRouter
|
|
1536
1701
|
}),
|
|
1537
1702
|
recommendations_resource_: looksResource,
|
|
1538
1703
|
title_: () => props.title_,
|
|
@@ -1545,6 +1710,58 @@ function $cee56a95f722f55f$export$1935e6bdfc5ed8ce(props) {
|
|
|
1545
1710
|
})));
|
|
1546
1711
|
}, "LookSlider failed");
|
|
1547
1712
|
}
|
|
1713
|
+
async function $cee56a95f722f55f$var$runDisplayTransformersForLooks(baseData, listings, displayTransformers) {
|
|
1714
|
+
try {
|
|
1715
|
+
const {
|
|
1716
|
+
products: productTransformer,
|
|
1717
|
+
categories: providedListingTransformer
|
|
1718
|
+
} = displayTransformers || {};
|
|
1719
|
+
if (!productTransformer && !providedListingTransformer) return listings;
|
|
1720
|
+
const listingTransformer = providedListingTransformer || (_ref3 => {
|
|
1721
|
+
let {
|
|
1722
|
+
data: data
|
|
1723
|
+
} = _ref3;
|
|
1724
|
+
return data;
|
|
1725
|
+
});
|
|
1726
|
+
const displaysToTransform = [];
|
|
1727
|
+
const displayIdsPerListingId = {};
|
|
1728
|
+
const transformedListingsPromise = listingTransformer({
|
|
1729
|
+
...baseData,
|
|
1730
|
+
data: listings.map(_ref4 => {
|
|
1731
|
+
let {
|
|
1732
|
+
displays: displays,
|
|
1733
|
+
...listing
|
|
1734
|
+
} = _ref4;
|
|
1735
|
+
// Populate our displays by id and displayIdToListings object in the .map where we add ancestors to the listings, for peak efficiency
|
|
1736
|
+
for (let i = 0; i < displays.length; i++) {
|
|
1737
|
+
var _listing$listing_id;
|
|
1738
|
+
const display = displays[i];
|
|
1739
|
+
const uniqueIdOfDisplay = $6a4c7ed6d005505c$export$548d053aba053d79(display);
|
|
1740
|
+
displaysToTransform.push(display);
|
|
1741
|
+
(displayIdsPerListingId[_listing$listing_id = listing.listing_id] || (displayIdsPerListingId[_listing$listing_id] = [])).push(uniqueIdOfDisplay);
|
|
1742
|
+
}
|
|
1743
|
+
return {
|
|
1744
|
+
...listing,
|
|
1745
|
+
ancestors: []
|
|
1746
|
+
};
|
|
1747
|
+
})
|
|
1748
|
+
});
|
|
1749
|
+
// This allows the person providing the displayTransformer to re-order and remove displays
|
|
1750
|
+
const transformedProducts = productTransformer ? await productTransformer({
|
|
1751
|
+
...baseData,
|
|
1752
|
+
displays: displaysToTransform
|
|
1753
|
+
}) : displaysToTransform;
|
|
1754
|
+
const transformedListings = await transformedListingsPromise;
|
|
1755
|
+
const transformedDisplayById = Object.fromEntries(transformedProducts.map(display => [$6a4c7ed6d005505c$export$548d053aba053d79(display), display]));
|
|
1756
|
+
return transformedListings.map(listing => $b8hua$mergeProps(listing, {
|
|
1757
|
+
// use mergeProps because in preview browser we add getters in this object, that would be called too early otherwise
|
|
1758
|
+
displays: (displayIdsPerListingId[listing.listing_id] || []).map(displayId => transformedDisplayById[displayId]).filter(v => v)
|
|
1759
|
+
}));
|
|
1760
|
+
} catch (e) {
|
|
1761
|
+
$b8hua$dwarn("Displaytransformers threw", e);
|
|
1762
|
+
return [];
|
|
1763
|
+
}
|
|
1764
|
+
}
|
|
1548
1765
|
const $68e6625c8d51f847$export$3064e1e8c6513da3 = new Set();
|
|
1549
1766
|
let $68e6625c8d51f847$var$has_ran = false;
|
|
1550
1767
|
function $68e6625c8d51f847$export$5162a71f252e6122() {
|
|
@@ -1586,15 +1803,6 @@ function $68e6625c8d51f847$var$starts_with_any_prefix(key) {
|
|
|
1586
1803
|
}
|
|
1587
1804
|
}
|
|
1588
1805
|
|
|
1589
|
-
/**
|
|
1590
|
-
* This function is used to determine if the user is trying to open a link in a new tab or window, and we therefore should not single page navigate
|
|
1591
|
-
* @param clickEvent The click event that triggered the navigation
|
|
1592
|
-
*/
|
|
1593
|
-
function $9b35d1384e31813a$export$29d28dadc2d6b631(clickEvent) {
|
|
1594
|
-
return (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.button) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.metaKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.ctrlKey) || (clickEvent === null || clickEvent === void 0 ? void 0 : clickEvent.shiftKey // if true, shift button on windows, linux or macOS which opens in a new window
|
|
1595
|
-
);
|
|
1596
|
-
}
|
|
1597
|
-
|
|
1598
1806
|
/**
|
|
1599
1807
|
* Symbol used to identify the version of a SearchModal function. Values right now: 1 = 1st gen classic modal, 2 = second gen modal
|
|
1600
1808
|
*/
|
|
@@ -1635,12 +1843,6 @@ function $01c33966d9ddb108$export$f50b88e2a00918b5(fn) {
|
|
|
1635
1843
|
}
|
|
1636
1844
|
};
|
|
1637
1845
|
}
|
|
1638
|
-
function $60ec7a29849d81db$export$a71e92cfbb498adc(props) {
|
|
1639
|
-
return $b8hua$createMemo(() => {
|
|
1640
|
-
const price_formatting = props.price_formatting_;
|
|
1641
|
-
return $b8hua$standard_price_format(props.price_, price_formatting.places_after_comma_, price_formatting.decimal_places_delimiter_, price_formatting.thousands_delimiter_);
|
|
1642
|
-
});
|
|
1643
|
-
}
|
|
1644
1846
|
function $d0883254246d3eb6$export$fb40a80c530e5f2b(selectedIndex, groupIndex, indexInGroup) {
|
|
1645
1847
|
const isSelected = $b8hua$createMemo(() => {
|
|
1646
1848
|
const selectedValue = selectedIndex();
|
|
@@ -1970,7 +2172,7 @@ function $6d95ef50ee01d5a1$export$5d2caaa6b530761c() {
|
|
|
1970
2172
|
var $9783d437ad61594c$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>';
|
|
1971
2173
|
function $9783d437ad61594c$export$3b621d86b1566b2() {
|
|
1972
2174
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1973
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
2175
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
1974
2176
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1975
2177
|
width: "21.064",
|
|
1976
2178
|
height: "21.064",
|
|
@@ -2076,7 +2278,7 @@ function $02b6641aa50ce528$export$ba17c5b7e6dda39f(_ref) {
|
|
|
2076
2278
|
var $ef0f18a578b32578$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>';
|
|
2077
2279
|
function $ef0f18a578b32578$export$82eafebb825fc23f() {
|
|
2078
2280
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2079
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
2281
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
2080
2282
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2081
2283
|
width: "20",
|
|
2082
2284
|
height: "22",
|
|
@@ -2086,7 +2288,7 @@ function $ef0f18a578b32578$export$82eafebb825fc23f() {
|
|
|
2086
2288
|
var $3c5e15c6ee4227a9$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>';
|
|
2087
2289
|
function $3c5e15c6ee4227a9$export$605674723bcc715c() {
|
|
2088
2290
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2089
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
2291
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
2090
2292
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2091
2293
|
width: "32",
|
|
2092
2294
|
height: "32",
|
|
@@ -2674,7 +2876,7 @@ function $584c06c09cf4609d$export$b94867ecbd698f21(_ref) {
|
|
|
2674
2876
|
get children() {
|
|
2675
2877
|
return $b8hua$ssr($584c06c09cf4609d$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.back_(), true), false), $b8hua$escape($b8hua$createComponent(BackIcon_, {})));
|
|
2676
2878
|
}
|
|
2677
|
-
})), "query ".concat(!!on_back_ ? "has-adjacent-back-button" : ""), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_field_field_aria_label_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(search_field_value_[0](), true), false) + $b8hua$ssrAttribute("placeholder", $b8hua$escape(i18n_.placeholder_text_(), true), false), $b8hua$ssrAttribute("title", $b8hua$escape(i18n_.clear_filters_query_sorting_after_submit_(), true), false), $b8hua$ssrStyle($b8hua$createMemo(() => search_field_value_[0]() ? "" : "display: none")()), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$ssrElement("button", $b8hua$
|
|
2879
|
+
})), "query ".concat(!!on_back_ ? "has-adjacent-back-button" : ""), $b8hua$ssrAttribute("aria-label", $b8hua$escape(i18n_.search_field_field_aria_label_(), true), false) + $b8hua$ssrAttribute("value", $b8hua$escape(search_field_value_[0](), true), false) + $b8hua$ssrAttribute("placeholder", $b8hua$escape(i18n_.placeholder_text_(), true), false), $b8hua$ssrAttribute("title", $b8hua$escape(i18n_.clear_filters_query_sorting_after_submit_(), true), false), $b8hua$ssrStyle($b8hua$createMemo(() => search_field_value_[0]() ? "" : "display: none")()), $b8hua$escape($b8hua$createComponent((0, $9783d437ad61594c$export$3b621d86b1566b2), {})), $b8hua$ssrElement("button", $b8hua$mergeProps1({
|
|
2678
2880
|
"class": "submit major",
|
|
2679
2881
|
type: "button"
|
|
2680
2882
|
}, () => isNewModal ? {
|
|
@@ -3212,7 +3414,7 @@ function $26db6925469636a4$export$67152d26d4f56ee8(_ref) {
|
|
|
3212
3414
|
var _listing_;
|
|
3213
3415
|
return (_listing_ = listing_()) === null || _listing_ === void 0 ? void 0 : _listing_.page_url;
|
|
3214
3416
|
}); // <- 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
|
|
3215
|
-
const LinkToListing = props => $b8hua$ssrElement("a", $b8hua$
|
|
3417
|
+
const LinkToListing = props => $b8hua$ssrElement("a", $b8hua$mergeProps1(props, {
|
|
3216
3418
|
get href() {
|
|
3217
3419
|
return href();
|
|
3218
3420
|
}
|
|
@@ -3523,7 +3725,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
3523
3725
|
$b8hua$createComputed($b8hua$on(search_field_value_[0], () => !suggestions_updating_blocked() && set_selected_index(undefined), {
|
|
3524
3726
|
defer: true
|
|
3525
3727
|
})); // reset autocomplete position if query changes
|
|
3526
|
-
return [$b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$
|
|
3728
|
+
return [$b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$mergeProps1(sharedSuggestionProps, {
|
|
3527
3729
|
get title_() {
|
|
3528
3730
|
return i18n_.popular_;
|
|
3529
3731
|
},
|
|
@@ -3533,7 +3735,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
3533
3735
|
return itemIndexes_.suggestionsIndex_;
|
|
3534
3736
|
},
|
|
3535
3737
|
showPlaceholders_: () => showPlaceholders() || noResults_() && !noResultsPopularSuggestions.latest
|
|
3536
|
-
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$
|
|
3738
|
+
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$mergeProps1(sharedSuggestionProps, {
|
|
3537
3739
|
get title_() {
|
|
3538
3740
|
return i18n_.previous_;
|
|
3539
3741
|
},
|
|
@@ -3544,7 +3746,7 @@ function $4acc866f8fdfc002$export$af1fb307bbba2417(_ref) {
|
|
|
3544
3746
|
},
|
|
3545
3747
|
extraTitleRowElements_: () => $b8hua$ssr($4acc866f8fdfc002$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(i18n_.clear_all_from_filter_crumbs_())),
|
|
3546
3748
|
showPlaceholders_: () => false
|
|
3547
|
-
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$
|
|
3749
|
+
})), $b8hua$createComponent((0, $5175a47d13b7c228$export$d4994a86c6235f72), $b8hua$mergeProps1(sharedSuggestionProps, {
|
|
3548
3750
|
get title_() {
|
|
3549
3751
|
return i18n_.content_;
|
|
3550
3752
|
},
|
|
@@ -3957,7 +4159,7 @@ function $6a439680ae7e9ba3$export$b2539bed5023c21c(props) {
|
|
|
3957
4159
|
return $b8hua$createComponent($6a439680ae7e9ba3$var$TabsContext.Provider, {
|
|
3958
4160
|
value: new (0, $b8hua$ListenableSet)(),
|
|
3959
4161
|
get children() {
|
|
3960
|
-
return $b8hua$createComponent($6a439680ae7e9ba3$var$ActualTabs, $b8hua$
|
|
4162
|
+
return $b8hua$createComponent($6a439680ae7e9ba3$var$ActualTabs, $b8hua$mergeProps1(props, {
|
|
3961
4163
|
get children() {
|
|
3962
4164
|
return props.children;
|
|
3963
4165
|
}
|
|
@@ -3987,7 +4189,7 @@ function $6a439680ae7e9ba3$var$ActualTabs(props) {
|
|
|
3987
4189
|
},
|
|
3988
4190
|
children: item => {
|
|
3989
4191
|
const weSelected = $b8hua$createMemo(() => isSelected(item().id));
|
|
3990
|
-
return $b8hua$createComponent((0, $b8hua$Dynamic), $b8hua$
|
|
4192
|
+
return $b8hua$createComponent((0, $b8hua$Dynamic), $b8hua$mergeProps1({
|
|
3991
4193
|
get component() {
|
|
3992
4194
|
return props.AnchorComponent;
|
|
3993
4195
|
},
|
|
@@ -4070,7 +4272,7 @@ function $6a439680ae7e9ba3$export$3e41faf802a29e71(props) {
|
|
|
4070
4272
|
if (!currentTabs) throw new Error("Tab must be a child of Tabs");
|
|
4071
4273
|
const id = $b8hua$createUniqueId();
|
|
4072
4274
|
const ourSet = currentTabs;
|
|
4073
|
-
const extendedProps = $b8hua$
|
|
4275
|
+
const extendedProps = $b8hua$mergeProps({
|
|
4074
4276
|
id: id
|
|
4075
4277
|
}, props);
|
|
4076
4278
|
ourSet.add(extendedProps);
|
|
@@ -4190,120 +4392,6 @@ function $972f6bce0f9d61be$var$history_state_change(signals, entries, state) {
|
|
|
4190
4392
|
}
|
|
4191
4393
|
});
|
|
4192
4394
|
}
|
|
4193
|
-
function $ac571292d606f30b$var$_classPrivateMethodInitSpec(obj, privateSet) {
|
|
4194
|
-
$ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateSet);
|
|
4195
|
-
privateSet.add(obj);
|
|
4196
|
-
}
|
|
4197
|
-
function $ac571292d606f30b$var$_checkPrivateRedeclaration(obj, privateCollection) {
|
|
4198
|
-
if (privateCollection.has(obj)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
4199
|
-
}
|
|
4200
|
-
function $ac571292d606f30b$var$_classPrivateMethodGet(receiver, privateSet, fn) {
|
|
4201
|
-
if (!privateSet.has(receiver)) throw new TypeError("attempted to get private field on non-instance");
|
|
4202
|
-
return fn;
|
|
4203
|
-
}
|
|
4204
|
-
var $ac571292d606f30b$var$_throwing_on_navigation = /*#__PURE__*/new WeakSet();
|
|
4205
|
-
var $ac571292d606f30b$var$_get_navigation_happened_promise = /*#__PURE__*/new WeakSet();
|
|
4206
|
-
class $ac571292d606f30b$export$7e1297a3a19f10d8 {
|
|
4207
|
-
/**
|
|
4208
|
-
* Function that will be called when we want to navigate, or a string saying it's not an SPA. You can change this OTG
|
|
4209
|
-
*/ /**
|
|
4210
|
-
* We store listing_id in history.state and do operate on this both here and in js-ui, this is the key to be used which js-ui provides
|
|
4211
|
-
*/ /**
|
|
4212
|
-
* Vue has async router that needs to be awaited (it navigates after a microtask)
|
|
4213
|
-
* This standardises waiting for all kinds of routers
|
|
4214
|
-
*/
|
|
4215
|
-
constructor(on_navigation, listing_query_state_key) {
|
|
4216
|
-
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_get_navigation_happened_promise);
|
|
4217
|
-
$ac571292d606f30b$var$_classPrivateMethodInitSpec(this, $ac571292d606f30b$var$_throwing_on_navigation);
|
|
4218
|
-
$b8hua$babelruntimehelpersdefineProperty(this, "on_navigation_", void 0);
|
|
4219
|
-
$b8hua$babelruntimehelpersdefineProperty(this, "listing_query_state_key", void 0);
|
|
4220
|
-
$b8hua$babelruntimehelpersdefineProperty(this, "navigate_", {
|
|
4221
|
-
/**
|
|
4222
|
-
* Call this if you *just* want to replace the state object in history.state
|
|
4223
|
-
*/
|
|
4224
|
-
replace_state_: new_state => {
|
|
4225
|
-
var _globalThis$history;
|
|
4226
|
-
// This doesn't break any router, so we just do this directly for now, since many don't expose an interface for changing the state
|
|
4227
|
-
globalThis === null || globalThis === void 0 || (_globalThis$history = globalThis.history) === null || _globalThis$history === void 0 || _globalThis$history.replaceState(new_state, "");
|
|
4228
|
-
},
|
|
4229
|
-
/**
|
|
4230
|
-
* Call this to change the URL
|
|
4231
|
-
* @param new_url_ new URL to go to
|
|
4232
|
-
* @param event_ event if you have this in a click handler, will not do anything on cmd/ctrl or non-left click then
|
|
4233
|
-
* @param force_spa_navigation_ if you want to force SPA navigation even if on_navigation_ is set to "hard_navigation". You should only set this to true for inter-SDK-page navigations
|
|
4234
|
-
* @param is_replace_ if you want to replace the current URL in history instead of pushing a new one
|
|
4235
|
-
* @param listing_id_ If you are navigating to a category and know the listing_id of, please provide it. This is for making a better devEx in js-ui
|
|
4236
|
-
*/
|
|
4237
|
-
go_to_: $b8hua$catchify(async _ref => {
|
|
4238
|
-
let {
|
|
4239
|
-
new_url_: raw_new_url,
|
|
4240
|
-
event_: event_,
|
|
4241
|
-
force_spa_navigation_: force_spa_navigation_,
|
|
4242
|
-
is_replace_: is_replace_,
|
|
4243
|
-
listing_query_: listing_query_,
|
|
4244
|
-
scroll = true
|
|
4245
|
-
} = _ref;
|
|
4246
|
-
const new_url_ = raw_new_url instanceof URL ? raw_new_url : new URL(raw_new_url, location.origin);
|
|
4247
|
-
const wants_hard_navigation = this.on_navigation_ === "hard_navigation";
|
|
4248
|
-
if ($9b35d1384e31813a$export$29d28dadc2d6b631(event_)) return;
|
|
4249
|
-
const different_origin = new_url_.origin !== location.origin;
|
|
4250
|
-
if (wants_hard_navigation && (!force_spa_navigation_ || different_origin)) {
|
|
4251
|
-
if (force_spa_navigation_ && different_origin)
|
|
4252
|
-
// If we call history.pushState on a different origin, it will throw an error, so fallback to hard navigations
|
|
4253
|
-
$b8hua$dwarn("Can't single page navigate to", new_url_.href, "due to different origin, this MIGHT mean you should fix the URLs");
|
|
4254
|
-
if (!event_)
|
|
4255
|
-
// If we haven't gotten an event, nothing will happen by not calling prevent default, so we need to change the URL
|
|
4256
|
-
location.assign(new_url_);
|
|
4257
|
-
return;
|
|
4258
|
-
}
|
|
4259
|
-
event_ === null || event_ === void 0 || event_.preventDefault();
|
|
4260
|
-
const promise = $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_get_navigation_happened_promise, $ac571292d606f30b$var$_get_navigation_happened_promise2).call(this, true);
|
|
4261
|
-
if (force_spa_navigation_ && wants_hard_navigation) {
|
|
4262
|
-
// Don't allow hard navigation if we're forcing SPA navigation, which we do for things where PageReplacer can be used for performance
|
|
4263
|
-
const new_state = history.state;
|
|
4264
|
-
if (listing_query_) {
|
|
4265
|
-
// In JS-UI we need to know the listing_id of the current category, therefore push it into state
|
|
4266
|
-
if (!this.listing_query_state_key) $b8hua$report(new Error("listing_query_state_key is not set"), "error");
|
|
4267
|
-
new_state[this.listing_query_state_key] = listing_query_;
|
|
4268
|
-
}
|
|
4269
|
-
history[is_replace_ ? "replaceState" : "pushState"](new_state, "", new_url_);
|
|
4270
|
-
} else $ac571292d606f30b$var$_classPrivateMethodGet(this, $ac571292d606f30b$var$_throwing_on_navigation, $ac571292d606f30b$var$_throwing_on_navigation2).call(this, {
|
|
4271
|
-
is_replace: is_replace_,
|
|
4272
|
-
new_url: new_url_ instanceof URL ? new_url_ : new URL(new_url_, location.origin),
|
|
4273
|
-
scroll: scroll
|
|
4274
|
-
});
|
|
4275
|
-
await promise;
|
|
4276
|
-
})
|
|
4277
|
-
});
|
|
4278
|
-
this.listing_query_state_key = listing_query_state_key;
|
|
4279
|
-
this.on_navigation_ = on_navigation;
|
|
4280
|
-
}
|
|
4281
|
-
}
|
|
4282
|
-
function $ac571292d606f30b$var$_throwing_on_navigation2() {
|
|
4283
|
-
const {
|
|
4284
|
-
on_navigation_: on_navigation_
|
|
4285
|
-
} = this;
|
|
4286
|
-
if (typeof on_navigation_ !== "function") throw new Error("on_navigation_ is not a function");
|
|
4287
|
-
// make sure that we don't accidentally catchify if the SDK consumer has fucked up
|
|
4288
|
-
try {
|
|
4289
|
-
return on_navigation_(...arguments);
|
|
4290
|
-
} catch (e) {
|
|
4291
|
-
queueMicrotask(() => {
|
|
4292
|
-
throw e;
|
|
4293
|
-
});
|
|
4294
|
-
}
|
|
4295
|
-
}
|
|
4296
|
-
function $ac571292d606f30b$var$_get_navigation_happened_promise2(is_replace) {
|
|
4297
|
-
return new Promise(resolve => {
|
|
4298
|
-
const handler = what_happened => {
|
|
4299
|
-
if (what_happened === (is_replace ? "replaceState" : "pushState")) {
|
|
4300
|
-
resolve();
|
|
4301
|
-
(0, $b8hua$instant_exec_on_suspect_history_change).delete(handler);
|
|
4302
|
-
}
|
|
4303
|
-
};
|
|
4304
|
-
(0, $b8hua$instant_exec_on_suspect_history_change).add(handler);
|
|
4305
|
-
});
|
|
4306
|
-
}
|
|
4307
4395
|
var $b652875d5a5139ec$var$_tmpl$ = ["<div", ' class="image-container">', "</div>"];
|
|
4308
4396
|
function $b652875d5a5139ec$export$41e1a079d40a0d58(props) {
|
|
4309
4397
|
const [display] = $b8hua$createResource(() => ({
|
|
@@ -4403,7 +4491,7 @@ function $e3efeb558d952696$export$7da560f849543dff(_ref) {
|
|
|
4403
4491
|
get children() {
|
|
4404
4492
|
return $b8hua$ssr($e3efeb558d952696$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(title()));
|
|
4405
4493
|
}
|
|
4406
|
-
}), $b8hua$ssr($e3efeb558d952696$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$
|
|
4494
|
+
}), $b8hua$ssr($e3efeb558d952696$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$mergeProps1({
|
|
4407
4495
|
get rows() {
|
|
4408
4496
|
return rows_object_();
|
|
4409
4497
|
},
|
|
@@ -4699,7 +4787,7 @@ function $6b0fd8fd20df8ccf$var$ActualShopTheLookButton(props) {
|
|
|
4699
4787
|
}, true);
|
|
4700
4788
|
$b8hua$createEffect(() => button.style.display = displayStyleValue()); // Set our attributes like this, so we allow total control over the button from the outside via buttonAttributes
|
|
4701
4789
|
$b8hua$createEffect(() => !hasAnythingToShow() && closeModal()); // close modal if we ever get into the state of having it open and not having anything to show
|
|
4702
|
-
$6b0fd8fd20df8ccf$var$modalProps = $b8hua$
|
|
4790
|
+
$6b0fd8fd20df8ccf$var$modalProps = $b8hua$mergeProps(partForModal, {
|
|
4703
4791
|
products_to_shop_: products_to_shop_
|
|
4704
4792
|
});
|
|
4705
4793
|
button.addEventListener("click", openModal);
|
|
@@ -5135,7 +5223,7 @@ const $19e828709c7723a0$export$48513f6b9f8ce62d = props => {
|
|
|
5135
5223
|
};
|
|
5136
5224
|
var $ff3225aef892a467$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>';
|
|
5137
5225
|
function $ff3225aef892a467$export$f21ab0717a89c77f(props) {
|
|
5138
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
5226
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1(props, {
|
|
5139
5227
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5140
5228
|
width: "11",
|
|
5141
5229
|
height: "12"
|
|
@@ -6403,7 +6491,7 @@ const $830ea8efda59884e$export$414f6a19d38e655c = _ref => {
|
|
|
6403
6491
|
const MakeButton = attributes => {
|
|
6404
6492
|
const label = $b8hua$createMemo(() => value().name_ || value().value_ + "");
|
|
6405
6493
|
const count_zero = $b8hua$createMemo(() => value().count_ === 0);
|
|
6406
|
-
return $b8hua$ssrElement("button", $b8hua$
|
|
6494
|
+
return $b8hua$ssrElement("button", $b8hua$mergeProps1(attributes, {
|
|
6407
6495
|
get disabled() {
|
|
6408
6496
|
return count_zero() && !is_selected();
|
|
6409
6497
|
},
|
|
@@ -6713,7 +6801,7 @@ var $d2988f745661df9c$export$2e2bcd8739ae039 = {
|
|
|
6713
6801
|
var $905f44be08b7378e$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>';
|
|
6714
6802
|
function $905f44be08b7378e$export$f2ca6fc699ca1fb4() {
|
|
6715
6803
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
6716
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
6804
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
6717
6805
|
xmlns: "http://www.w3.org/2000/svg",
|
|
6718
6806
|
width: "16.8",
|
|
6719
6807
|
height: "14"
|
|
@@ -7856,7 +7944,7 @@ async function $284849364a6ef73a$var$_run_url_creator_for_suggest2(merchant, mar
|
|
|
7856
7944
|
// Filter out our transformed ancestors
|
|
7857
7945
|
const transformedAncestors = Object.fromEntries(transformerResult.filter(item => item.is_suggestion === false).map(item => [item.listing_id, item]));
|
|
7858
7946
|
// Add the now transformed ancestors into the ancestors of the listing suggestions
|
|
7859
|
-
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $b8hua$
|
|
7947
|
+
const transformedSuggestions = transformerResult.filter(item => item.is_suggestion !== false).map(item => $b8hua$mergeProps(item, {
|
|
7860
7948
|
// Use mergeProps instead of spread since page_url and other properties could be a getter that solid components should call
|
|
7861
7949
|
ancestors: item.ancestors.map(ancestor => {
|
|
7862
7950
|
const newAncestor = transformedAncestors[ancestor.listing_id];
|
|
@@ -8363,7 +8451,7 @@ function $8ef6232475d44150$export$7de92c4c2205ebf3(_ref) {
|
|
|
8363
8451
|
return (0, $981356a8bf29ad72$export$6c9030e511152266) + get_showing_recommendation_rows() * Math.max(...possible_num_columns);
|
|
8364
8452
|
});
|
|
8365
8453
|
// Don't tear down elements every time one updates the page - don't put them within <Show>
|
|
8366
|
-
const elements = $b8hua$ssr($8ef6232475d44150$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(i18n_.search_recs_title_()), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$
|
|
8454
|
+
const elements = $b8hua$ssr($8ef6232475d44150$var$_tmpl$, $b8hua$ssrHydrationKey(), $b8hua$escape(i18n_.search_recs_title_()), $b8hua$escape($ca55612a53dbbdd2$export$a2cc176055f8f08()), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$mergeProps1({
|
|
8367
8455
|
rows: rows_object,
|
|
8368
8456
|
layout: "grid",
|
|
8369
8457
|
element_attributes: {
|
|
@@ -9220,7 +9308,7 @@ var $64d94dcaa058dc7b$var$_tmpl$ = ["<style", ' type="text/css">', "</style>"];
|
|
|
9220
9308
|
const $64d94dcaa058dc7b$export$c500183c31c2b22e = "--spans-columns";
|
|
9221
9309
|
function $64d94dcaa058dc7b$export$ab6b147eec64fea5(props) {
|
|
9222
9310
|
const container_class = "x" + $b8hua$createUniqueId();
|
|
9223
|
-
const container_element_ = $b8hua$ssrElement("div", $b8hua$
|
|
9311
|
+
const container_element_ = $b8hua$ssrElement("div", $b8hua$mergeProps1(() => props.element_attributes, {
|
|
9224
9312
|
classList: {
|
|
9225
9313
|
[container_class]: true
|
|
9226
9314
|
}
|
|
@@ -9490,7 +9578,7 @@ function $ff7feae4dddd6073$var$wrap_blocks_in_div(rendered_content_blocks, max_s
|
|
|
9490
9578
|
})));
|
|
9491
9579
|
}
|
|
9492
9580
|
});
|
|
9493
|
-
return $b8hua$
|
|
9581
|
+
return $b8hua$mergeProps(block, {
|
|
9494
9582
|
// Create content divs for the blocks with as much fine-grained diffing as possible?
|
|
9495
9583
|
content: () => {
|
|
9496
9584
|
// 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
|
|
@@ -9732,7 +9820,7 @@ function $7faea0096f14b59b$export$3925f87b1545cfc6(_ref) {
|
|
|
9732
9820
|
} = slider;
|
|
9733
9821
|
const Layout = props => $63f1f8dbcd07d3b0$export$445d8d3f5f706a40(props, insert_here, true);
|
|
9734
9822
|
// Do like this, so we don't have to call mergeProps ourselves
|
|
9735
|
-
$b8hua$createComponent(Layout, $b8hua$
|
|
9823
|
+
$b8hua$createComponent(Layout, $b8hua$mergeProps1(layout_options_, {
|
|
9736
9824
|
rows: "all",
|
|
9737
9825
|
get cols_at_size() {
|
|
9738
9826
|
return modified_cols_at_size();
|
|
@@ -9893,7 +9981,7 @@ var $79af35736fe8e5c8$var$_tmpl$ = '<path d="M6.199 10.254a.35.35 0 0 0-.496 0L3
|
|
|
9893
9981
|
$79af35736fe8e5c8$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>';
|
|
9894
9982
|
function $79af35736fe8e5c8$export$da32f7add8a22e86() {
|
|
9895
9983
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9896
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
9984
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
9897
9985
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9898
9986
|
width: "14",
|
|
9899
9987
|
height: "14",
|
|
@@ -9903,7 +9991,7 @@ function $79af35736fe8e5c8$export$da32f7add8a22e86() {
|
|
|
9903
9991
|
var $73e3c96bc365e0e9$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>';
|
|
9904
9992
|
function $73e3c96bc365e0e9$export$d10e63059ddb9fd4() {
|
|
9905
9993
|
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9906
|
-
return $b8hua$ssrElement("svg", $b8hua$
|
|
9994
|
+
return $b8hua$ssrElement("svg", $b8hua$mergeProps1({
|
|
9907
9995
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9908
9996
|
width: "14",
|
|
9909
9997
|
height: "14",
|
|
@@ -10019,7 +10107,7 @@ function $082c4ed3e22f8d71$export$9bf11afa910f536e(_ref) {
|
|
|
10019
10107
|
})));
|
|
10020
10108
|
},
|
|
10021
10109
|
get children() {
|
|
10022
|
-
return $b8hua$ssr($082c4ed3e22f8d71$var$_tmpl$5, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), $b8hua$
|
|
10110
|
+
return $b8hua$ssr($082c4ed3e22f8d71$var$_tmpl$5, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent((0, $f6b0500577e1b210$export$3f1a388cc0d8fed7), $b8hua$mergeProps1(args_for_filtering_, {
|
|
10023
10111
|
are_in_modal_: true
|
|
10024
10112
|
}))));
|
|
10025
10113
|
}
|
|
@@ -10615,7 +10703,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
10615
10703
|
if (content_result_) return $b8hua$ssrElement("a", attributes, () => $b8hua$escape(children), true);
|
|
10616
10704
|
return $b8hua$ssrElement("div", attributes, () => $b8hua$escape(children), true);
|
|
10617
10705
|
};
|
|
10618
|
-
return $b8hua$ssr($22470de5f42cc35d$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$
|
|
10706
|
+
return $b8hua$ssr($22470de5f42cc35d$var$_tmpl$2, $b8hua$ssrHydrationKey(), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$mergeProps1(make_link_attributes, {
|
|
10619
10707
|
tabIndex: "-1",
|
|
10620
10708
|
get children() {
|
|
10621
10709
|
return $b8hua$createComponent((0, $3c5e15c6ee4227a9$export$605674723bcc715c), {
|
|
@@ -10623,7 +10711,7 @@ function $22470de5f42cc35d$export$f631859cab12b342(_ref) {
|
|
|
10623
10711
|
height: "28"
|
|
10624
10712
|
});
|
|
10625
10713
|
}
|
|
10626
|
-
}))), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$
|
|
10714
|
+
}))), $b8hua$escape($b8hua$createComponent(LinkIfPossible, $b8hua$mergeProps1({
|
|
10627
10715
|
"class": "content-title line-clamp"
|
|
10628
10716
|
}, make_link_attributes, {
|
|
10629
10717
|
get title() {
|
|
@@ -10778,7 +10866,7 @@ function $d53ebed6f63304e4$export$6d0c9c22f6652669(_ref) {
|
|
|
10778
10866
|
return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).content;
|
|
10779
10867
|
},
|
|
10780
10868
|
number_of_results_: num_results
|
|
10781
|
-
})), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$
|
|
10869
|
+
})), $b8hua$escape($b8hua$createComponent((0, $63f1f8dbcd07d3b0$export$d21e32dfedac04be), $b8hua$mergeProps1({
|
|
10782
10870
|
layout: "grid",
|
|
10783
10871
|
element_attributes: {
|
|
10784
10872
|
class: "cards"
|
|
@@ -11171,7 +11259,7 @@ function $da279c5a540c6846$export$a54ec244c8863715(_ref) {
|
|
|
11171
11259
|
var _search_results_4, _search_results_4$con;
|
|
11172
11260
|
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_)();
|
|
11173
11261
|
});
|
|
11174
|
-
const results_for = $b8hua$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $b8hua$
|
|
11262
|
+
const results_for = $b8hua$createComponent((0, $69602b3d8fd54c38$export$9dd50d35b9d94fdf), $b8hua$mergeProps1({
|
|
11175
11263
|
get type() {
|
|
11176
11264
|
return (0, $69602b3d8fd54c38$export$2452208c79fe93ea).products;
|
|
11177
11265
|
},
|
|
@@ -13143,7 +13231,7 @@ function $4b4b262708b516ee$var$add_us_to_crumbs(plp_meta) {
|
|
|
13143
13231
|
var _plp_meta3;
|
|
13144
13232
|
const api_value = (_plp_meta3 = plp_meta()) === null || _plp_meta3 === void 0 ? void 0 : _plp_meta3.breadcrumbs;
|
|
13145
13233
|
if (!api_value) return api_value;
|
|
13146
|
-
return [...api_value, $b8hua$
|
|
13234
|
+
return [...api_value, $b8hua$mergeProps(plp_meta(), {
|
|
13147
13235
|
get page_url() {
|
|
13148
13236
|
return href_accessor();
|
|
13149
13237
|
}
|