@getlupa/client 1.17.10 → 1.17.13

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.
@@ -14296,8 +14296,8 @@ const useSearchBoxStore = defineStore("searchBox", () => {
14296
14296
  const _hoisted_1$1i = { id: "lupa-search-box-input-container" };
14297
14297
  const _hoisted_2$T = { class: "lupa-input-clear" };
14298
14298
  const _hoisted_3$C = { id: "lupa-search-box-input" };
14299
- const _hoisted_4$s = ["value"];
14300
- const _hoisted_5$i = ["aria-label", "placeholder"];
14299
+ const _hoisted_4$u = ["value"];
14300
+ const _hoisted_5$k = ["aria-label", "placeholder"];
14301
14301
  const _hoisted_6$9 = /* @__PURE__ */ createBaseVNode("span", { class: "lupa-search-submit-icon" }, null, -1);
14302
14302
  const _hoisted_7$7 = [
14303
14303
  _hoisted_6$9
@@ -14403,7 +14403,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
14403
14403
  "aria-hidden": "true",
14404
14404
  value: showHint.value ? suggestedValue.value.item.suggestion : "",
14405
14405
  disabled: ""
14406
- }, null, 8, _hoisted_4$s),
14406
+ }, null, 8, _hoisted_4$u),
14407
14407
  withDirectives(createBaseVNode("input", mergeProps({
14408
14408
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
14409
14409
  }, inputAttributes.value, {
@@ -14417,7 +14417,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
14417
14417
  placeholder: labels.value.placeholder,
14418
14418
  onInput: handleInput,
14419
14419
  onFocus: handleFocus
14420
- }), null, 16, _hoisted_5$i), [
14420
+ }), null, 16, _hoisted_5$k), [
14421
14421
  [vModelText, inputValue.value]
14422
14422
  ]),
14423
14423
  _ctx.options.showSubmitButton ? (openBlock(), createElementBlock("button", {
@@ -14629,11 +14629,11 @@ const _hoisted_3$B = {
14629
14629
  class: "lupa-suggestion-facet",
14630
14630
  "data-cy": "lupa-suggestion-facet"
14631
14631
  };
14632
- const _hoisted_4$r = {
14632
+ const _hoisted_4$t = {
14633
14633
  class: "lupa-suggestion-facet-label",
14634
14634
  "data-cy": "lupa-suggestion-facet-label"
14635
14635
  };
14636
- const _hoisted_5$h = {
14636
+ const _hoisted_5$j = {
14637
14637
  class: "lupa-suggestion-facet-value",
14638
14638
  "data-cy": "lupa-suggestion-facet-value"
14639
14639
  };
@@ -14675,8 +14675,8 @@ const _sfc_main$1q = /* @__PURE__ */ defineComponent({
14675
14675
  innerHTML: _ctx.suggestion.displayHighlight
14676
14676
  }, null, 8, _hoisted_1$1e)) : (openBlock(), createElementBlock("div", _hoisted_2$R, toDisplayString(_ctx.suggestion.display), 1)),
14677
14677
  _ctx.suggestion.facet ? (openBlock(), createElementBlock("div", _hoisted_3$B, [
14678
- createBaseVNode("span", _hoisted_4$r, toDisplayString(facetLabel.value), 1),
14679
- createBaseVNode("span", _hoisted_5$h, toDisplayString(_ctx.suggestion.facet.title), 1)
14678
+ createBaseVNode("span", _hoisted_4$t, toDisplayString(facetLabel.value), 1),
14679
+ createBaseVNode("span", _hoisted_5$j, toDisplayString(_ctx.suggestion.facet.title), 1)
14680
14680
  ])) : createCommentVNode("", true)
14681
14681
  ]);
14682
14682
  };
@@ -24169,8 +24169,8 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
24169
24169
  const _hoisted_1$18 = ["innerHTML"];
24170
24170
  const _hoisted_2$N = { key: 0 };
24171
24171
  const _hoisted_3$A = { key: 1 };
24172
- const _hoisted_4$q = { class: "lupa-search-box-custom-label" };
24173
- const _hoisted_5$g = { class: "lupa-search-box-custom-text" };
24172
+ const _hoisted_4$s = { class: "lupa-search-box-custom-label" };
24173
+ const _hoisted_5$i = { class: "lupa-search-box-custom-text" };
24174
24174
  const _sfc_main$1h = /* @__PURE__ */ defineComponent({
24175
24175
  __name: "SearchBoxProductCustom",
24176
24176
  props: {
@@ -24202,8 +24202,8 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
24202
24202
  class: [className.value, "lupa-search-box-product-custom"]
24203
24203
  }, toHandlers(_ctx.options.action ? { click: handleClick } : {}, true)), [
24204
24204
  !label.value ? (openBlock(), createElementBlock("div", _hoisted_2$N, toDisplayString(text.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$A, [
24205
- createBaseVNode("div", _hoisted_4$q, toDisplayString(label.value), 1),
24206
- createBaseVNode("div", _hoisted_5$g, toDisplayString(text.value), 1)
24205
+ createBaseVNode("div", _hoisted_4$s, toDisplayString(label.value), 1),
24206
+ createBaseVNode("div", _hoisted_5$i, toDisplayString(text.value), 1)
24207
24207
  ]))
24208
24208
  ], 16));
24209
24209
  };
@@ -24296,13 +24296,11 @@ const useSearchResultStore = defineStore("searchResult", () => {
24296
24296
  const relatedCategoryChildren = ref([]);
24297
24297
  const lastRequestId = ref("");
24298
24298
  const searchRequestResults = ref({});
24299
+ const lastResultsSource = ref(void 0);
24299
24300
  const optionsStore = useOptionsStore();
24300
24301
  const paramsStore = useParamsStore();
24301
24302
  const screenStore = useScreenStore();
24302
24303
  const { searchResultOptions } = storeToRefs(optionsStore);
24303
- computed(
24304
- () => loading.value || loadingFacets.value || loadingRefiners.value
24305
- );
24306
24304
  const facets2 = computed(() => searchResult.value.facets);
24307
24305
  const filters = computed(() => searchResult.value.filters);
24308
24306
  const currentQueryText = computed(() => searchResult.value.searchText);
@@ -24399,13 +24397,14 @@ const useSearchResultStore = defineStore("searchResult", () => {
24399
24397
  });
24400
24398
  searchResult.value = updatedResult;
24401
24399
  });
24402
- const saveRequestResult = (requestId, result2) => {
24400
+ const saveRequestResult = (requestId, result2, source = "items") => {
24403
24401
  var _a;
24404
24402
  const existingResult = (_a = searchRequestResults.value[requestId]) != null ? _a : {};
24405
24403
  const combinedResult = __spreadValues2(__spreadValues2({}, existingResult), result2);
24406
24404
  searchRequestResults.value = __spreadProps2(__spreadValues2({}, searchRequestResults.value), {
24407
24405
  [requestId]: combinedResult
24408
24406
  });
24407
+ lastResultsSource.value = source;
24409
24408
  searchResult.value = combinedResult;
24410
24409
  };
24411
24410
  const setLastRequestId = (requestId) => {
@@ -24431,14 +24430,13 @@ const useSearchResultStore = defineStore("searchResult", () => {
24431
24430
  } else {
24432
24431
  saveRequestResult(requestId, newSearchResult);
24433
24432
  }
24434
- saveRequestResult(requestId, newSearchResult);
24435
24433
  return { searchResult: newSearchResult };
24436
24434
  };
24437
- const addPartial = (requestId, newSearchResult) => {
24435
+ const addPartial = (requestId, newSearchResult, source) => {
24438
24436
  if (lastRequestId.value !== requestId || !newSearchResult) {
24439
24437
  return;
24440
24438
  }
24441
- saveRequestResult(requestId, newSearchResult);
24439
+ saveRequestResult(requestId, newSearchResult, source);
24442
24440
  return { searchResult: searchResult.value };
24443
24441
  };
24444
24442
  const setColumnCount = ({ width, grid }) => {
@@ -24505,6 +24503,7 @@ const useSearchResultStore = defineStore("searchResult", () => {
24505
24503
  hideFiltersOnExactMatchForKeys,
24506
24504
  relatedCategoryChildren,
24507
24505
  searchRequestResults,
24506
+ lastResultsSource,
24508
24507
  setSidebarState,
24509
24508
  queryFacet,
24510
24509
  setLastRequestId,
@@ -24521,14 +24520,17 @@ const useSearchResultStore = defineStore("searchResult", () => {
24521
24520
  });
24522
24521
  const _hoisted_1$16 = { class: "lupa-search-box-add-to-cart-wrapper" };
24523
24522
  const _hoisted_2$M = { class: "lupa-search-box-product-addtocart" };
24524
- const _hoisted_3$z = ["onClick", "disabled"];
24523
+ const _hoisted_3$z = ["disabled"];
24524
+ const _hoisted_4$r = ["href"];
24525
+ const _hoisted_5$h = ["onClick", "disabled"];
24525
24526
  const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24526
24527
  __name: "SearchBoxProductAddToCart",
24527
24528
  props: {
24528
24529
  item: {},
24529
24530
  options: {},
24530
24531
  inStock: { type: Boolean },
24531
- dynamicAttributes: {}
24532
+ dynamicAttributes: {},
24533
+ link: {}
24532
24534
  },
24533
24535
  emits: ["productEvent"],
24534
24536
  setup(__props, { emit: emit2 }) {
@@ -24555,16 +24557,27 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
24555
24557
  emit2("productEvent", { type: "addToCart" });
24556
24558
  loading.value = false;
24557
24559
  });
24560
+ const hasLink = computed(() => {
24561
+ return Boolean(props.link && props.options.link);
24562
+ });
24558
24563
  return (_ctx, _cache) => {
24559
24564
  return openBlock(), createElementBlock("div", _hoisted_1$16, [
24560
24565
  createBaseVNode("div", _hoisted_2$M, [
24561
- createBaseVNode("button", mergeProps({
24566
+ hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
24567
+ key: 0,
24568
+ class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
24569
+ "data-cy": "lupa-add-to-cart",
24570
+ disabled: !inStockValue.value || loading.value
24571
+ }, _ctx.dynamicAttributes, { onClick: handleClick }), [
24572
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$r)
24573
+ ], 16, _hoisted_3$z)) : (openBlock(), createElementBlock("button", mergeProps({
24574
+ key: 1,
24562
24575
  onClick: withModifiers(handleClick, ["stop", "prevent"]),
24563
24576
  class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
24564
24577
  "data-cy": "lupa-add-to-cart",
24565
24578
  type: "button",
24566
24579
  disabled: !inStockValue.value || loading.value
24567
- }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_3$z)
24580
+ }, _ctx.dynamicAttributes), toDisplayString(label.value), 17, _hoisted_5$h))
24568
24581
  ])
24569
24582
  ]);
24570
24583
  };
@@ -24592,7 +24605,8 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
24592
24605
  item: {},
24593
24606
  element: {},
24594
24607
  labels: {},
24595
- isInStock: { type: Boolean }
24608
+ isInStock: { type: Boolean },
24609
+ link: {}
24596
24610
  },
24597
24611
  setup(__props) {
24598
24612
  const props = __props;
@@ -24654,17 +24668,19 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
24654
24668
  labels: _ctx.labels,
24655
24669
  class: { "lupa-loading-dynamic-data": isLoadingDynamicData((_a = _ctx.item) == null ? void 0 : _a.id) },
24656
24670
  inStock: _ctx.isInStock,
24657
- "dynamic-attributes": dynamicAttributes.value
24658
- }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes"])) : createCommentVNode("", true)
24671
+ "dynamic-attributes": dynamicAttributes.value,
24672
+ link: _ctx.link
24673
+ }, renderDynamicAttributesOnParentElement.value && dynamicAttributes.value), null, 16, ["item", "options", "labels", "class", "inStock", "dynamic-attributes", "link"])) : createCommentVNode("", true)
24659
24674
  ], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$15, [
24660
24675
  displayElement.value ? (openBlock(), createBlock(resolveDynamicComponent(elementComponent.value), {
24661
24676
  key: 0,
24662
24677
  item: enhancedItem.value,
24663
24678
  options: _ctx.element,
24664
24679
  labels: _ctx.labels,
24680
+ link: _ctx.link,
24665
24681
  class: normalizeClass({ "lupa-loading-dynamic-data": isLoadingDynamicData((_b = _ctx.item) == null ? void 0 : _b.id) }),
24666
24682
  inStock: _ctx.isInStock
24667
- }, null, 8, ["item", "options", "labels", "class", "inStock"])) : createCommentVNode("", true),
24683
+ }, null, 8, ["item", "options", "labels", "link", "class", "inStock"])) : createCommentVNode("", true),
24668
24684
  renderSlot(_ctx.$slots, "badges")
24669
24685
  ]));
24670
24686
  };
@@ -24673,7 +24689,7 @@ const _sfc_main$1e = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
24673
24689
  const _hoisted_1$14 = { class: "lupa-badge-title" };
24674
24690
  const _hoisted_2$L = ["src"];
24675
24691
  const _hoisted_3$y = { key: 1 };
24676
- const _hoisted_4$p = {
24692
+ const _hoisted_4$q = {
24677
24693
  key: 0,
24678
24694
  class: "lupa-badge-full-text"
24679
24695
  };
@@ -24717,7 +24733,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
24717
24733
  }, null, 8, _hoisted_2$L)) : createCommentVNode("", true),
24718
24734
  hasTitleText.value && showTitle.value ? (openBlock(), createElementBlock("span", _hoisted_3$y, toDisplayString(_ctx.badge.titleText), 1)) : createCommentVNode("", true)
24719
24735
  ]),
24720
- hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$p, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24736
+ hasAdditionalText.value ? (openBlock(), createElementBlock("span", _hoisted_4$q, toDisplayString(_ctx.badge.additionalText), 1)) : createCommentVNode("", true)
24721
24737
  ], 6);
24722
24738
  };
24723
24739
  }
@@ -25361,6 +25377,8 @@ const extractValue = (options) => {
25361
25377
  return extractFromStorage(options);
25362
25378
  case "htmlElementText":
25363
25379
  return extractFromHtmlElementText(options);
25380
+ case "htmlElementAttribute":
25381
+ return extractFromHtmlElementAttribute(options);
25364
25382
  case "cookie":
25365
25383
  return extractFromCookie(options);
25366
25384
  default:
@@ -25404,6 +25422,17 @@ const extractFromHtmlElementText = (options) => {
25404
25422
  const element = document.querySelector(options.querySelector);
25405
25423
  return element ? ((_a = element.textContent) == null ? void 0 : _a.trim()) || options.default : options.default;
25406
25424
  };
25425
+ const extractFromHtmlElementAttribute = (options) => {
25426
+ const element = document.querySelector(options.querySelector);
25427
+ if (!element) {
25428
+ return options.default;
25429
+ }
25430
+ const attr = options.attribute;
25431
+ if (attr === "value" && (element == null ? void 0 : element.value)) {
25432
+ return element.value;
25433
+ }
25434
+ return element.getAttribute(attr) || options.default;
25435
+ };
25407
25436
  const getValueFromPath = (obj, path) => {
25408
25437
  return path.split(".").reduce((value, key) => value && value[key] || null, obj);
25409
25438
  };
@@ -25619,11 +25648,11 @@ const _hoisted_3$w = {
25619
25648
  key: 0,
25620
25649
  class: "lupa-panel-title lupa-panel-title-top-results"
25621
25650
  };
25622
- const _hoisted_4$o = {
25651
+ const _hoisted_4$p = {
25623
25652
  key: 1,
25624
25653
  class: "lupa-panel-title"
25625
25654
  };
25626
- const _hoisted_5$f = {
25655
+ const _hoisted_5$g = {
25627
25656
  key: 1,
25628
25657
  id: "lupa-search-box-panel"
25629
25658
  };
@@ -25812,7 +25841,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
25812
25841
  "data-cy": "lupa-panel-" + panel.type + "-index"
25813
25842
  }, [
25814
25843
  ((_a = panel.labels) == null ? void 0 : _a.topResultsTitle) && showTopResultsPanelTitle(panel.queryKey) ? (openBlock(), createElementBlock("div", _hoisted_3$w, toDisplayString((_b = panel.labels) == null ? void 0 : _b.topResultsTitle), 1)) : createCommentVNode("", true),
25815
- ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$o, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
25844
+ ((_c = panel.labels) == null ? void 0 : _c.title) && showPanelTitle(panel) ? (openBlock(), createElementBlock("div", _hoisted_4$p, toDisplayString((_d = panel.labels) == null ? void 0 : _d.title), 1)) : createCommentVNode("", true),
25816
25845
  panel.queryKey && canShowPanel(panel) ? (openBlock(), createBlock(resolveDynamicComponent(getComponent(panel.type)), {
25817
25846
  key: 2,
25818
25847
  panel,
@@ -25847,7 +25876,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent(__spreadProps2(__spreadValu
25847
25876
  options: _ctx.options,
25848
25877
  onGoToResults: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("go-to-results"))
25849
25878
  }, null, 8, ["labels", "options"])) : createCommentVNode("", true)
25850
- ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$f, [
25879
+ ])) : displayHistory.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
25851
25880
  createVNode(_sfc_main$1s, {
25852
25881
  options: _ctx.options.history,
25853
25882
  history: history.value,
@@ -26310,7 +26339,7 @@ const _hoisted_3$v = {
26310
26339
  key: 1,
26311
26340
  "data-cy": "did-you-mean-label"
26312
26341
  };
26313
- const _hoisted_4$n = { key: 1 };
26342
+ const _hoisted_4$o = { key: 1 };
26314
26343
  const _sfc_main$$ = /* @__PURE__ */ defineComponent({
26315
26344
  __name: "SearchResultsDidYouMean",
26316
26345
  props: {
@@ -26361,7 +26390,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
26361
26390
  class: "lupa-did-you-mean lupa-highlighted-search-text",
26362
26391
  "data-cy": "did-you-mean-value",
26363
26392
  onClick: _cache[0] || (_cache[0] = ($event) => goToResults({ searchText: didYouMeanValue.value }))
26364
- }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$n, toDisplayString(label) + " ", 1))
26393
+ }, toDisplayString(didYouMeanValue.value) + " ", 1)) : (openBlock(), createElementBlock("span", _hoisted_4$o, toDisplayString(label) + " ", 1))
26365
26394
  ]);
26366
26395
  }), 128))
26367
26396
  ])) : createCommentVNode("", true)
@@ -26411,8 +26440,8 @@ const _hoisted_3$u = {
26411
26440
  key: 1,
26412
26441
  class: "lupa-results-total-count"
26413
26442
  };
26414
- const _hoisted_4$m = { class: "lupa-results-total-count-number" };
26415
- const _hoisted_5$e = ["innerHTML"];
26443
+ const _hoisted_4$n = { class: "lupa-results-total-count-number" };
26444
+ const _hoisted_5$f = ["innerHTML"];
26416
26445
  const _sfc_main$Z = /* @__PURE__ */ defineComponent({
26417
26446
  __name: "SearchResultsTitle",
26418
26447
  props: {
@@ -26461,7 +26490,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
26461
26490
  queryText.value && !searchResultsTitleTemplate.value ? (openBlock(), createElementBlock("span", _hoisted_2$E, "'" + toDisplayString(queryText.value) + "'", 1)) : createCommentVNode("", true),
26462
26491
  showProductCount.value ? (openBlock(), createElementBlock("span", _hoisted_3$u, [
26463
26492
  createTextVNode("(" + toDisplayString(searchResultsCountLabel.value), 1),
26464
- createBaseVNode("span", _hoisted_4$m, toDisplayString(unref(totalItems)), 1),
26493
+ createBaseVNode("span", _hoisted_4$n, toDisplayString(unref(totalItems)), 1),
26465
26494
  createTextVNode(")")
26466
26495
  ])) : createCommentVNode("", true)
26467
26496
  ])) : createCommentVNode("", true),
@@ -26473,7 +26502,7 @@ const _sfc_main$Z = /* @__PURE__ */ defineComponent({
26473
26502
  key: 2,
26474
26503
  class: "lupa-result-page-description-top",
26475
26504
  innerHTML: descriptionTop.value
26476
- }, null, 8, _hoisted_5$e)) : createCommentVNode("", true)
26505
+ }, null, 8, _hoisted_5$f)) : createCommentVNode("", true)
26477
26506
  ]);
26478
26507
  };
26479
26508
  }
@@ -26523,7 +26552,7 @@ const _hoisted_3$t = {
26523
26552
  key: 0,
26524
26553
  class: "filter-values"
26525
26554
  };
26526
- const _hoisted_4$l = { class: "lupa-current-filter-list" };
26555
+ const _hoisted_4$m = { class: "lupa-current-filter-list" };
26527
26556
  const _sfc_main$X = /* @__PURE__ */ defineComponent({
26528
26557
  __name: "CurrentFilters",
26529
26558
  props: {
@@ -26607,7 +26636,7 @@ const _sfc_main$X = /* @__PURE__ */ defineComponent({
26607
26636
  }, null, 2)) : createCommentVNode("", true)
26608
26637
  ]),
26609
26638
  !_ctx.expandable || isOpen.value ? (openBlock(), createElementBlock("div", _hoisted_3$t, [
26610
- createBaseVNode("div", _hoisted_4$l, [
26639
+ createBaseVNode("div", _hoisted_4$m, [
26611
26640
  (openBlock(true), createElementBlock(Fragment, null, renderList(currentDisplayFilters.value, (filter2) => {
26612
26641
  return openBlock(), createBlock(_sfc_main$Y, {
26613
26642
  key: filter2.key + "_" + filter2.value,
@@ -26675,8 +26704,8 @@ const _hoisted_1$P = {
26675
26704
  };
26676
26705
  const _hoisted_2$B = { class: "lupa-category-back" };
26677
26706
  const _hoisted_3$s = ["href"];
26678
- const _hoisted_4$k = ["href"];
26679
- const _hoisted_5$d = { class: "lupa-child-category-list" };
26707
+ const _hoisted_4$l = ["href"];
26708
+ const _hoisted_5$e = { class: "lupa-child-category-list" };
26680
26709
  const _sfc_main$V = /* @__PURE__ */ defineComponent({
26681
26710
  __name: "CategoryFilter",
26682
26711
  props: {
@@ -26782,9 +26811,9 @@ const _sfc_main$V = /* @__PURE__ */ defineComponent({
26782
26811
  href: parentUrlLink.value,
26783
26812
  class: normalizeClass({ "lupa-title-category": !hasBackButton.value }),
26784
26813
  onClick: handleNavigationParent
26785
- }, toDisplayString(parentTitle.value), 11, _hoisted_4$k)
26814
+ }, toDisplayString(parentTitle.value), 11, _hoisted_4$l)
26786
26815
  ], 2),
26787
- createBaseVNode("div", _hoisted_5$d, [
26816
+ createBaseVNode("div", _hoisted_5$e, [
26788
26817
  (openBlock(true), createElementBlock(Fragment, null, renderList(categoryChildren.value, (child) => {
26789
26818
  return openBlock(), createBlock(_sfc_main$W, {
26790
26819
  key: getCategoryKey(child),
@@ -26803,8 +26832,8 @@ const _hoisted_1$O = {
26803
26832
  };
26804
26833
  const _hoisted_2$A = ["placeholder"];
26805
26834
  const _hoisted_3$r = { class: "lupa-terms-list" };
26806
- const _hoisted_4$j = ["onClick"];
26807
- const _hoisted_5$c = { class: "lupa-term-checkbox-wrapper" };
26835
+ const _hoisted_4$k = ["onClick"];
26836
+ const _hoisted_5$d = { class: "lupa-term-checkbox-wrapper" };
26808
26837
  const _hoisted_6$8 = { class: "lupa-term-label" };
26809
26838
  const _hoisted_7$6 = {
26810
26839
  key: 0,
@@ -26919,7 +26948,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
26919
26948
  key: item.title,
26920
26949
  onClick: ($event) => handleFacetClick(item)
26921
26950
  }, [
26922
- createBaseVNode("div", _hoisted_5$c, [
26951
+ createBaseVNode("div", _hoisted_5$d, [
26923
26952
  createBaseVNode("span", {
26924
26953
  class: normalizeClass(["lupa-term-checkbox", { checked: isChecked(item) }])
26925
26954
  }, null, 2)
@@ -26930,7 +26959,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
26930
26959
  createBaseVNode("span", _hoisted_6$8, toDisplayString(getItemLabel(item)), 1),
26931
26960
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_7$6, "(" + toDisplayString(item.count) + ")", 1)) : createCommentVNode("", true)
26932
26961
  ], 2)
26933
- ], 10, _hoisted_4$j);
26962
+ ], 10, _hoisted_4$k);
26934
26963
  }), 128))
26935
26964
  ]),
26936
26965
  displayShowMore.value ? (openBlock(), createElementBlock("div", {
@@ -27930,11 +27959,11 @@ const _hoisted_3$q = {
27930
27959
  key: 1,
27931
27960
  class: "lupa-stats-facet-summary-input"
27932
27961
  };
27933
- const _hoisted_4$i = {
27962
+ const _hoisted_4$j = {
27934
27963
  key: 0,
27935
27964
  class: "lupa-stats-range-label"
27936
27965
  };
27937
- const _hoisted_5$b = { class: "lupa-stats-from" };
27966
+ const _hoisted_5$c = { class: "lupa-stats-from" };
27938
27967
  const _hoisted_6$7 = ["max", "min", "pattern", "aria-label"];
27939
27968
  const _hoisted_7$5 = { key: 0 };
27940
27969
  const _hoisted_8$1 = /* @__PURE__ */ createBaseVNode("div", { class: "lupa-stats-separator" }, null, -1);
@@ -28133,8 +28162,8 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
28133
28162
  return openBlock(), createElementBlock("div", _hoisted_1$N, [
28134
28163
  !isInputVisible.value ? (openBlock(), createElementBlock("div", _hoisted_2$z, toDisplayString(statsSummary.value), 1)) : (openBlock(), createElementBlock("div", _hoisted_3$q, [
28135
28164
  createBaseVNode("div", null, [
28136
- rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28137
- createBaseVNode("div", _hoisted_5$b, [
28165
+ rangeLabelFrom.value ? (openBlock(), createElementBlock("div", _hoisted_4$j, toDisplayString(rangeLabelFrom.value), 1)) : createCommentVNode("", true),
28166
+ createBaseVNode("div", _hoisted_5$c, [
28138
28167
  withDirectives(createBaseVNode("input", {
28139
28168
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => fromValue.value = $event),
28140
28169
  type: "text",
@@ -28203,7 +28232,7 @@ const _hoisted_3$p = {
28203
28232
  key: 0,
28204
28233
  class: "lupa-term-count"
28205
28234
  };
28206
- const _hoisted_4$h = {
28235
+ const _hoisted_4$i = {
28207
28236
  key: 0,
28208
28237
  class: "lupa-facet-level"
28209
28238
  };
@@ -28272,7 +28301,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
28272
28301
  _ctx.options.showDocumentCount ? (openBlock(), createElementBlock("span", _hoisted_3$p, "(" + toDisplayString(_ctx.item.count) + ")", 1)) : createCommentVNode("", true)
28273
28302
  ], 2)
28274
28303
  ]),
28275
- showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$h, [
28304
+ showChildren.value ? (openBlock(), createElementBlock("div", _hoisted_4$i, [
28276
28305
  (openBlock(true), createElementBlock(Fragment, null, renderList(treeItem.value.children, (itemChild) => {
28277
28306
  return openBlock(), createBlock(_component_HierarchyFacetLevel, {
28278
28307
  key: itemChild.title,
@@ -28805,8 +28834,8 @@ const _hoisted_1$F = {
28805
28834
  };
28806
28835
  const _hoisted_2$u = ["onClick"];
28807
28836
  const _hoisted_3$n = { class: "lupa-mobile-sidebar-content" };
28808
- const _hoisted_4$g = { class: "lupa-sidebar-top" };
28809
- const _hoisted_5$a = { class: "lupa-sidebar-title" };
28837
+ const _hoisted_4$h = { class: "lupa-sidebar-top" };
28838
+ const _hoisted_5$b = { class: "lupa-sidebar-title" };
28810
28839
  const _hoisted_6$6 = {
28811
28840
  key: 0,
28812
28841
  class: "lupa-sidebar-filter-count"
@@ -28849,8 +28878,8 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
28849
28878
  onClick: withModifiers(handleMobileToggle, ["stop"])
28850
28879
  }, null, 8, _hoisted_2$u),
28851
28880
  createBaseVNode("div", _hoisted_3$n, [
28852
- createBaseVNode("div", _hoisted_4$g, [
28853
- createBaseVNode("div", _hoisted_5$a, [
28881
+ createBaseVNode("div", _hoisted_4$h, [
28882
+ createBaseVNode("div", _hoisted_5$b, [
28854
28883
  createTextVNode(toDisplayString(sidebarTitle.value) + " ", 1),
28855
28884
  isFilterCountVisible.value ? (openBlock(), createElementBlock("span", _hoisted_6$6, toDisplayString(unref(currentFilterCount)), 1)) : createCommentVNode("", true)
28856
28885
  ]),
@@ -28877,7 +28906,7 @@ const _hoisted_3$m = {
28877
28906
  key: 1,
28878
28907
  class: "lupa-search-results-breadcrumb-text"
28879
28908
  };
28880
- const _hoisted_4$f = { key: 2 };
28909
+ const _hoisted_4$g = { key: 2 };
28881
28910
  const _sfc_main$K = /* @__PURE__ */ defineComponent({
28882
28911
  __name: "SearchResultsBreadcrumbs",
28883
28912
  props: {
@@ -28919,7 +28948,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
28919
28948
  return handleNavigation(e2, (_a2 = breadcrumb == null ? void 0 : breadcrumb.link) != null ? _a2 : "");
28920
28949
  }
28921
28950
  }, toDisplayString(getLabel(breadcrumb.label)), 9, _hoisted_2$t)) : (openBlock(), createElementBlock("span", _hoisted_3$m, toDisplayString(getLabel(breadcrumb.label)), 1)),
28922
- index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$f, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
28951
+ index < breadcrumbsValue.value.length - 1 ? (openBlock(), createElementBlock("span", _hoisted_4$g, toDisplayString((_a = breadcrumb.separator) != null ? _a : "/"), 1)) : createCommentVNode("", true)
28923
28952
  ]);
28924
28953
  }), 128))
28925
28954
  ]);
@@ -29081,7 +29110,7 @@ const _hoisted_2$s = {
29081
29110
  class: "lupa-page-number-separator"
29082
29111
  };
29083
29112
  const _hoisted_3$l = ["onClick"];
29084
- const _hoisted_4$e = {
29113
+ const _hoisted_4$f = {
29085
29114
  key: 0,
29086
29115
  class: "lupa-page-number-separator"
29087
29116
  };
@@ -29187,7 +29216,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
29187
29216
  }, toDisplayString(page), 11, _hoisted_3$l);
29188
29217
  }), 128)),
29189
29218
  showLastPage.value ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
29190
- showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$e, "...")) : createCommentVNode("", true),
29219
+ showLastPageSeparator.value ? (openBlock(), createElementBlock("div", _hoisted_4$f, "...")) : createCommentVNode("", true),
29191
29220
  createBaseVNode("div", {
29192
29221
  class: "lupa-page-number lupa-page-number-last",
29193
29222
  onClick: _cache[2] || (_cache[2] = () => {
@@ -29212,8 +29241,8 @@ const _hoisted_1$z = {
29212
29241
  };
29213
29242
  const _hoisted_2$r = { id: "lupa-select" };
29214
29243
  const _hoisted_3$k = { class: "lupa-select-label" };
29215
- const _hoisted_4$d = ["aria-label"];
29216
- const _hoisted_5$9 = ["value"];
29244
+ const _hoisted_4$e = ["aria-label"];
29245
+ const _hoisted_5$a = ["value"];
29217
29246
  const _sfc_main$E = /* @__PURE__ */ defineComponent({
29218
29247
  __name: "SearchResultsPageSize",
29219
29248
  props: {
@@ -29257,9 +29286,9 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
29257
29286
  return openBlock(), createElementBlock("option", {
29258
29287
  key: option,
29259
29288
  value: option
29260
- }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$9);
29289
+ }, toDisplayString(prefixLabel.value) + toDisplayString(option), 9, _hoisted_5$a);
29261
29290
  }), 128))
29262
- ], 40, _hoisted_4$d)
29291
+ ], 40, _hoisted_4$e)
29263
29292
  ])
29264
29293
  ]);
29265
29294
  };
@@ -29271,8 +29300,8 @@ const _hoisted_1$y = {
29271
29300
  };
29272
29301
  const _hoisted_2$q = { id: "lupa-select" };
29273
29302
  const _hoisted_3$j = { class: "lupa-select-label" };
29274
- const _hoisted_4$c = ["aria-label"];
29275
- const _hoisted_5$8 = ["value"];
29303
+ const _hoisted_4$d = ["aria-label"];
29304
+ const _hoisted_5$9 = ["value"];
29276
29305
  const _sfc_main$D = /* @__PURE__ */ defineComponent({
29277
29306
  __name: "SearchResultsSort",
29278
29307
  props: {
@@ -29337,9 +29366,9 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
29337
29366
  return openBlock(), createElementBlock("option", {
29338
29367
  key: option.key,
29339
29368
  value: option.key
29340
- }, toDisplayString(option.label), 9, _hoisted_5$8);
29369
+ }, toDisplayString(option.label), 9, _hoisted_5$9);
29341
29370
  }), 128))
29342
- ], 40, _hoisted_4$c), [
29371
+ ], 40, _hoisted_4$d), [
29343
29372
  [vModelSelect, selectedKey.value]
29344
29373
  ])
29345
29374
  ])
@@ -29353,8 +29382,8 @@ const _hoisted_2$p = {
29353
29382
  class: "lupa-toolbar-right-title"
29354
29383
  };
29355
29384
  const _hoisted_3$i = { key: 2 };
29356
- const _hoisted_4$b = { key: 4 };
29357
- const _hoisted_5$7 = { key: 6 };
29385
+ const _hoisted_4$c = { key: 4 };
29386
+ const _hoisted_5$8 = { key: 6 };
29358
29387
  const _hoisted_6$5 = { class: "lupa-toolbar-right" };
29359
29388
  const _hoisted_7$3 = {
29360
29389
  key: 0,
@@ -29481,13 +29510,13 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
29481
29510
  label: searchSummaryLabel.value,
29482
29511
  clearable: unref(hasAnyFilter) && showFilterClear.value,
29483
29512
  onClear: handleClearAll
29484
- }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$b)),
29513
+ }, null, 8, ["label", "clearable"])) : (openBlock(), createElementBlock("div", _hoisted_4$c)),
29485
29514
  displayPageSelect.value ? (openBlock(), createBlock(_sfc_main$F, {
29486
29515
  key: 5,
29487
29516
  options: paginationOptions.value.pageSelect,
29488
29517
  "last-page-label": paginationOptions.value.labels.showMore,
29489
29518
  "first-page-label": paginationOptions.value.labels.showLess
29490
- }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$7))
29519
+ }, null, 8, ["options", "last-page-label", "first-page-label"])) : (openBlock(), createElementBlock("div", _hoisted_5$8))
29491
29520
  ]),
29492
29521
  createBaseVNode("div", _hoisted_6$5, [
29493
29522
  toolbarRightLabel.value ? (openBlock(), createElementBlock("div", _hoisted_7$3, toDisplayString(toolbarRightLabel.value), 1)) : createCommentVNode("", true),
@@ -29534,8 +29563,8 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
29534
29563
  const _hoisted_1$w = ["title", "innerHTML"];
29535
29564
  const _hoisted_2$o = ["title"];
29536
29565
  const _hoisted_3$h = ["href", "innerHTML"];
29537
- const _hoisted_4$a = ["title"];
29538
- const _hoisted_5$6 = {
29566
+ const _hoisted_4$b = ["title"];
29567
+ const _hoisted_5$7 = {
29539
29568
  key: 0,
29540
29569
  class: "lupa-search-results-product-title-text"
29541
29570
  };
@@ -29595,14 +29624,14 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
29595
29624
  style: normalizeStyle(`-webkit-line-clamp: ${maxLines.value}`),
29596
29625
  title: title.value
29597
29626
  }, [
29598
- !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$6, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29627
+ !_ctx.options.link ? (openBlock(), createElementBlock("span", _hoisted_5$7, toDisplayString(title.value), 1)) : createCommentVNode("", true),
29599
29628
  _ctx.options.link ? (openBlock(), createElementBlock("a", {
29600
29629
  key: 1,
29601
29630
  href: _ctx.link,
29602
29631
  class: "lupa-search-results-product-title-text lupa-title-link",
29603
29632
  onClick: handleNavigation
29604
29633
  }, toDisplayString(title.value), 9, _hoisted_6$4)) : createCommentVNode("", true)
29605
- ], 12, _hoisted_4$a));
29634
+ ], 12, _hoisted_4$b));
29606
29635
  };
29607
29636
  }
29608
29637
  });
@@ -29645,8 +29674,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
29645
29674
  const _hoisted_1$u = { id: "lupa-search-results-rating" };
29646
29675
  const _hoisted_2$n = { class: "lupa-ratings" };
29647
29676
  const _hoisted_3$g = { class: "lupa-ratings-base" };
29648
- const _hoisted_4$9 = ["innerHTML"];
29649
- const _hoisted_5$5 = { class: "lupa-rating-wrapper" };
29677
+ const _hoisted_4$a = ["innerHTML"];
29678
+ const _hoisted_5$6 = { class: "lupa-rating-wrapper" };
29650
29679
  const _hoisted_6$3 = ["innerHTML"];
29651
29680
  const _hoisted_7$2 = ["href"];
29652
29681
  const STAR_COUNT = 5;
@@ -29695,10 +29724,10 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
29695
29724
  key: index,
29696
29725
  innerHTML: star,
29697
29726
  class: "lupa-rating lupa-rating-not-highlighted"
29698
- }, null, 8, _hoisted_4$9);
29727
+ }, null, 8, _hoisted_4$a);
29699
29728
  }), 128))
29700
29729
  ]),
29701
- createBaseVNode("div", _hoisted_5$5, [
29730
+ createBaseVNode("div", _hoisted_5$6, [
29702
29731
  createBaseVNode("div", {
29703
29732
  class: "lupa-ratings-highlighted",
29704
29733
  style: normalizeStyle({ width: ratingPercentage.value + "%" })
@@ -29781,14 +29810,17 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
29781
29810
  });
29782
29811
  const _hoisted_1$s = { class: "lupa-search-results-add-to-cart-wrapper" };
29783
29812
  const _hoisted_2$m = { class: "lupa-search-results-product-addtocart" };
29784
- const _hoisted_3$f = ["id", "disabled", "onClick"];
29813
+ const _hoisted_3$f = ["disabled"];
29814
+ const _hoisted_4$9 = ["href"];
29815
+ const _hoisted_5$5 = ["id", "disabled", "onClick"];
29785
29816
  const _sfc_main$v = /* @__PURE__ */ defineComponent({
29786
29817
  __name: "SearchResultsProductAddToCart",
29787
29818
  props: {
29788
29819
  item: {},
29789
29820
  options: {},
29790
29821
  inStock: { type: Boolean },
29791
- dynamicAttributes: {}
29822
+ dynamicAttributes: {},
29823
+ link: {}
29792
29824
  },
29793
29825
  emits: ["productEvent"],
29794
29826
  setup(__props, { emit: emit2 }) {
@@ -29820,17 +29852,28 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
29820
29852
  emit2("productEvent", { type: "addToCart" });
29821
29853
  loading.value = false;
29822
29854
  });
29855
+ const hasLink = computed(() => {
29856
+ return Boolean(props.link && props.options.link);
29857
+ });
29823
29858
  return (_ctx, _cache) => {
29824
29859
  return openBlock(), createElementBlock("div", _hoisted_1$s, [
29825
29860
  createBaseVNode("div", _hoisted_2$m, [
29826
- createBaseVNode("button", mergeProps({
29861
+ hasLink.value ? (openBlock(), createElementBlock("button", mergeProps({
29862
+ key: 0,
29863
+ class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
29864
+ "data-cy": "lupa-add-to-cart",
29865
+ disabled: !inStockValue.value || loading.value
29866
+ }, _ctx.dynamicAttributes, { onClick: handleClick }), [
29867
+ createBaseVNode("a", { href: _ctx.link }, toDisplayString(label.value), 9, _hoisted_4$9)
29868
+ ], 16, _hoisted_3$f)) : (openBlock(), createElementBlock("button", mergeProps({
29869
+ key: 1,
29827
29870
  id: id.value,
29828
29871
  class: loading.value ? "lupa-add-to-cart-loading" : "lupa-add-to-cart",
29829
29872
  "data-cy": "lupa-add-to-cart",
29830
29873
  disabled: !inStockValue.value || loading.value
29831
29874
  }, _ctx.dynamicAttributes, {
29832
29875
  onClick: withModifiers(handleClick, ["stop"])
29833
- }), toDisplayString(label.value), 17, _hoisted_3$f)
29876
+ }), toDisplayString(label.value), 17, _hoisted_5$5))
29834
29877
  ])
29835
29878
  ]);
29836
29879
  };
@@ -30843,7 +30886,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
30843
30886
  const searchResultStore = useSearchResultStore();
30844
30887
  const paramsStore = useParamsStore();
30845
30888
  const optionsStore = useOptionsStore();
30846
- const { searchResult } = storeToRefs(searchResultStore);
30889
+ const { searchResult, lastResultsSource } = storeToRefs(searchResultStore);
30847
30890
  const { searchResultOptions } = storeToRefs(optionsStore);
30848
30891
  const relatedQueries = ref([]);
30849
30892
  const allDisplayItems = ref({});
@@ -30869,8 +30912,12 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
30869
30912
  return filters;
30870
30913
  });
30871
30914
  watch(searchResult, () => __async2(this, null, function* () {
30915
+ var _a;
30872
30916
  allDisplayItems.value = {};
30873
30917
  querySourceResultMap.value = {};
30918
+ if (((_a = searchResult.value) == null ? void 0 : _a.searchText) === void 0 || lastResultsSource.value !== "items") {
30919
+ return;
30920
+ }
30874
30921
  if (!props.options || !searchResult.value) {
30875
30922
  relatedQueries.value = [];
30876
30923
  }
@@ -31530,7 +31577,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31530
31577
  if (!res.success) {
31531
31578
  return;
31532
31579
  }
31533
- searchResultStore.addPartial(requestId, __spreadValues2({}, res));
31580
+ searchResultStore.addPartial(requestId, __spreadValues2({}, res), "facets");
31534
31581
  }).catch((err) => {
31535
31582
  console.error(err);
31536
31583
  }).finally(() => {
@@ -31548,7 +31595,11 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
31548
31595
  if (!res.success) {
31549
31596
  return;
31550
31597
  }
31551
- searchResultStore.addPartial(requestId, __spreadValues2({}, res));
31598
+ searchResultStore.addPartial(
31599
+ requestId,
31600
+ __spreadValues2({}, res),
31601
+ "refiners"
31602
+ );
31552
31603
  }).catch((err) => {
31553
31604
  console.error(err);
31554
31605
  }).finally(() => {