vviinn-widgets 2.216.2 → 2.217.1

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.
Files changed (76) hide show
  1. package/dist/cjs/{index-BM7VfZ_J.js → index-KB8ruJQe.js} +1 -1
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/resultsPageUrl-Cki7CFQz.js +45 -0
  4. package/dist/cjs/{search.store-DX5IRC4l.js → search.store-C82VhK1A.js} +13 -7
  5. package/dist/cjs/vviinn-button_6.cjs.entry.js +4 -4
  6. package/dist/cjs/vviinn-camera_12.cjs.entry.js +23 -21
  7. package/dist/cjs/vviinn-carousel_10.cjs.entry.js +15 -11
  8. package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +2 -2
  9. package/dist/cjs/vviinn-text-search.cjs.entry.js +21 -15
  10. package/dist/cjs/vviinn-vps-button.cjs.entry.js +3 -3
  11. package/dist/cjs/vviinn-widgets.cjs.js +1 -1
  12. package/dist/collection/components/vviinn-carousel/vviinn-carousel.js +3 -5
  13. package/dist/collection/components/vviinn-results/stories/ResultsTemplate.js +3 -1
  14. package/dist/collection/components/vviinn-results/vviinn-results.js +24 -5
  15. package/dist/collection/components/vviinn-shop-the-look/vviinn-shop-the-look.js +1 -1
  16. package/dist/collection/components/vviinn-suggestions/render-helpers.js +4 -2
  17. package/dist/collection/components/vviinn-text-search/helpers/handleSuggestionsKeyDown.js +1 -1
  18. package/dist/collection/components/vviinn-text-search/helpers/renderSuggestions.js +5 -6
  19. package/dist/collection/components/vviinn-text-search/vviinn-text-search.js +34 -8
  20. package/dist/collection/components/vviinn-vpr-button/recommendations-sidebar/recommendations-sidebar.js +4 -4
  21. package/dist/collection/components/vviinn-vpr-widget/vviinn-vpr-widget.js +10 -4
  22. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +23 -4
  23. package/dist/collection/components/vviinn-vps-widget/vviinn-vps-widget.js +33 -14
  24. package/dist/collection/helpers/url/resultsPageUrl.js +24 -7
  25. package/dist/collection/helpers/url/resultsPageUrl.test.js +63 -1
  26. package/dist/collection/store/search.store.js +13 -6
  27. package/dist/esm/{index-CmCUlnFh.js → index-CMX-QEzm.js} +1 -1
  28. package/dist/esm/loader.js +1 -1
  29. package/dist/esm/resultsPageUrl-DbOxfJSz.js +39 -0
  30. package/dist/esm/{search.store-B0ZhYtWV.js → search.store-Bof_HKxz.js} +13 -7
  31. package/dist/esm/vviinn-button_6.entry.js +4 -4
  32. package/dist/esm/vviinn-camera_12.entry.js +23 -21
  33. package/dist/esm/vviinn-carousel_10.entry.js +15 -11
  34. package/dist/esm/vviinn-shop-the-look.entry.js +2 -2
  35. package/dist/esm/vviinn-text-search.entry.js +21 -15
  36. package/dist/esm/vviinn-vps-button.entry.js +3 -3
  37. package/dist/esm/vviinn-widgets.js +1 -1
  38. package/dist/types/components/vviinn-filters/helpers/syncRequestFilters.d.ts +3 -1
  39. package/dist/types/components/vviinn-results/vviinn-results.d.ts +2 -0
  40. package/dist/types/components/vviinn-text-search/vviinn-text-search.d.ts +2 -0
  41. package/dist/types/components/vviinn-vps-button/vviinn-vps-button.d.ts +3 -1
  42. package/dist/types/components/vviinn-vps-widget/vviinn-vps-widget.d.ts +3 -1
  43. package/dist/types/components.d.ts +36 -4
  44. package/dist/types/helpers/url/resultsPageUrl.d.ts +9 -3
  45. package/dist/types/store/search.store.d.ts +8 -4
  46. package/{www/build/p-a3829a7f.entry.js → dist/vviinn-widgets/p-5ee404fb.entry.js} +1 -1
  47. package/{www/build/p-c64a4923.entry.js → dist/vviinn-widgets/p-756d201c.entry.js} +1 -1
  48. package/dist/vviinn-widgets/{p-1e7d7fc8.entry.js → p-97099d69.entry.js} +1 -1
  49. package/dist/vviinn-widgets/{p-DIMfQtwJ.js → p-DM6fTGU7.js} +1 -1
  50. package/dist/vviinn-widgets/p-DbOxfJSz.js +1 -0
  51. package/dist/vviinn-widgets/p-dcaf6f35.entry.js +1 -0
  52. package/dist/vviinn-widgets/p-e4c19fc9.entry.js +1 -0
  53. package/dist/vviinn-widgets/{p-B--7xBdV.js → p-elxMiKkD.js} +1 -1
  54. package/dist/vviinn-widgets/{p-df67781e.entry.js → p-fbbf34ba.entry.js} +1 -1
  55. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  56. package/package.json +1 -1
  57. package/{dist/vviinn-widgets/p-a3829a7f.entry.js → www/build/p-5ee404fb.entry.js} +1 -1
  58. package/{dist/vviinn-widgets/p-c64a4923.entry.js → www/build/p-756d201c.entry.js} +1 -1
  59. package/www/build/{p-1e7d7fc8.entry.js → p-97099d69.entry.js} +1 -1
  60. package/www/build/{p-DIMfQtwJ.js → p-DM6fTGU7.js} +1 -1
  61. package/www/build/p-DbOxfJSz.js +1 -0
  62. package/www/build/p-dcaf6f35.entry.js +1 -0
  63. package/www/build/p-e4c19fc9.entry.js +1 -0
  64. package/www/build/{p-B--7xBdV.js → p-elxMiKkD.js} +1 -1
  65. package/www/build/{p-df67781e.entry.js → p-fbbf34ba.entry.js} +1 -1
  66. package/www/build/{p-64d1f5a3.js → p-fff4758a.js} +1 -1
  67. package/www/build/vviinn-widgets.esm.js +1 -1
  68. package/www/index.html +1 -1
  69. package/dist/cjs/resultsPageUrl-BMlvrFCW.js +0 -27
  70. package/dist/esm/resultsPageUrl-niHq9WT6.js +0 -22
  71. package/dist/vviinn-widgets/p-137944e9.entry.js +0 -1
  72. package/dist/vviinn-widgets/p-2b96382d.entry.js +0 -1
  73. package/dist/vviinn-widgets/p-niHq9WT6.js +0 -1
  74. package/www/build/p-137944e9.entry.js +0 -1
  75. package/www/build/p-2b96382d.entry.js +0 -1
  76. package/www/build/p-niHq9WT6.js +0 -1
@@ -8591,7 +8591,7 @@ const encodeToBase64UTF8 = (str) => {
8591
8591
  return btoa(String.fromCharCode.apply(null, utf8Array));
8592
8592
  };
8593
8593
 
8594
- const version = "2.216.2";
8594
+ const version = "2.217.1";
8595
8595
 
8596
8596
  const appStateGlobalDefaults = {
8597
8597
  excluded: null,
@@ -8624,10 +8624,15 @@ const receivedDataDefaults = {
8624
8624
  autoSuggestCompletions: [],
8625
8625
  };
8626
8626
  const storeDefaults = Object.assign(Object.assign(Object.assign({}, appStateGlobalDefaults), appStateDefaults), receivedDataDefaults);
8627
- const { state: searchState, onChange: onChangeWidgetState } = createStore(storeDefaults);
8628
- const { state: componentsState, onChange: onChangeComponentsState } = createStore(storeDefaults);
8627
+ const widgetStore = createStore(storeDefaults);
8628
+ const searchState = widgetStore.state;
8629
+ const onChangeWidgetState = widgetStore.onChange;
8630
+ const componentsStore = createStore(storeDefaults);
8631
+ const componentsState = componentsStore.state;
8632
+ const onChangeComponentsState = componentsStore.onChange;
8629
8633
  const shopTheLookDefaults = Object.assign({}, storeDefaults);
8630
- const { state: shopTheLookState} = createStore(shopTheLookDefaults);
8634
+ const shopTheLookStore = createStore(shopTheLookDefaults);
8635
+ const shopTheLookState = shopTheLookStore.state;
8631
8636
  const useStore = (store) => {
8632
8637
  switch (store) {
8633
8638
  case "widget":
@@ -8865,12 +8870,13 @@ const makeAutoSuggestRequest = async (store, query, token, apiPath) => {
8865
8870
  };
8866
8871
  return pipe(getTokenWithBody(token, body), setBodyAndHeaders, fromEither, chain$1((request) => autoSuggestClient(request, apiPath)), map((response) => {
8867
8872
  var _a, _b;
8868
- if (response.data.query.trim().toLowerCase() !== ((_a = state.textSearchQuery) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()))
8873
+ if (response.data.query.trim().toLowerCase() !==
8874
+ ((_a = state.textSearchQuery) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()))
8869
8875
  return response;
8870
8876
  const completions = (_b = response.data.completions) !== null && _b !== void 0 ? _b : [];
8871
8877
  state.autoSuggestCompletions = completions;
8872
- const matchingCompletion = completions.find((completion) => completion.suggestion.trim().toLowerCase() === query.trim().toLowerCase() &&
8873
- (completion === null || completion === void 0 ? void 0 : completion.url));
8878
+ const matchingCompletion = completions.find((completion) => completion.suggestion.trim().toLowerCase() ===
8879
+ query.trim().toLowerCase() && (completion === null || completion === void 0 ? void 0 : completion.url));
8874
8880
  if (matchingCompletion === null || matchingCompletion === void 0 ? void 0 : matchingCompletion.url) {
8875
8881
  state.redirect = { url: matchingCompletion.url, query };
8876
8882
  }
@@ -1,6 +1,6 @@
1
1
  import { h, r as registerInstance, H as Host, c as createEvent, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
2
2
  import { i as instance } from './store-BJxQCbNV.js';
3
- import { l as getAcceptableFileFormatsForDisplay, h as campaignTypeNames, j as addIfNotEmpty, n as searchState, u as useSearchStore, v as version } from './search.store-B0ZhYtWV.js';
3
+ import { l as getAcceptableFileFormatsForDisplay, h as campaignTypeNames, j as addIfNotEmpty, n as searchState, u as useSearchStore, v as version } from './search.store-Bof_HKxz.js';
4
4
  import { s as slotChangeListener, a as addEventListenersWithSignal } from './index-OsoUj2Au.js';
5
5
  import { S as SecondaryActionIcon } from './SecondaryActionIcon-FWFzrhba.js';
6
6
  import { m as modalParts, c as carouselParts, p as productCardParts, r as recommendationsParts, i as initializeLocale } from './index-BtnjaTty.js';
@@ -344,17 +344,17 @@ const RecommendationsSidebar = class {
344
344
  }
345
345
  render() {
346
346
  var _a;
347
- return (h(Host, { key: 'fa22d68e16838a5453bd0de3df7e287469badb5d', class: this.getClassMap(), style: { display: this.hidden ? "none" : undefined }, exportparts: `body, close-sidebar, ${carouselParts}, ${productCardParts}, ${recommendationsParts}` }, h("div", { key: '6a6a949b44787b562eeb93d15f836f2861b37bf4', class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e), role: this.showInModal ? "dialog" : "region", "aria-modal": this.showInModal ? "true" : undefined, "aria-label": instance.t("a11y.recommendations") }, h("div", { key: '9a789c39fcbeabaddcd74821c087082e31027097', class: {
347
+ return (h(Host, { key: '1da9acded2d47540c3a92ef4bfe6c1dfad7ba39b', class: this.getClassMap(), style: { display: this.hidden ? "none" : undefined }, exportparts: `body, close-sidebar, ${carouselParts}, ${productCardParts}, ${recommendationsParts}` }, h("div", { key: 'df6276e5001060d9a5b6507b351997eb8f3aab22', class: "sidebar", part: "body", onAnimationEnd: (e) => this.handleAnimationEnd(e), role: this.showInModal ? "dialog" : "region", "aria-modal": this.showInModal ? "true" : undefined, "aria-label": instance.t("a11y.recommendations") }, h("div", { key: '81f8cb97127186a5ae51d69e6c9d815791f7c7c3', class: {
348
348
  "sidebar-header": true,
349
349
  "contains-source-img": this.isSourceImageValid(),
350
- }, part: "sidebar-header" }, this.mode !== "set" && (h(Fragment, { key: '1567f0dc6dd89dc24f1856d19841b835e147fdbd' }, this.renderSourceImage(), ((_a = this.sidebarTitle) === null || _a === void 0 ? void 0 : _a.length) !== 0 && (h("span", { key: '8b15728814f88c18c472cad3cbe53bd564a1e9d2', class: "title", part: "recommendations-title" }, this.sidebarTitle || instance.t("discoveryWidgetTitle"))), !!this.sidebarSubtitle && (h("span", { key: 'bae0890e349463309352336bc190c6688c03bd92', class: "subtitle", part: "recommendations-subtitle" }, this.sidebarSubtitle)))), h("button", { key: '4b68bed07f7021a18d89c8e974470c6654d64cf2', class: "close-sidebar", onClick: () => {
350
+ }, part: "sidebar-header" }, this.mode !== "set" && (h(Fragment, { key: '65f2c04676e8e75895030d117483a55cfe8431cd' }, this.renderSourceImage(), ((_a = this.sidebarTitle) === null || _a === void 0 ? void 0 : _a.length) !== 0 && (h("span", { key: '1a5949d7ef73e7d8fd54da8852b9f6ac3fb24b67', class: "title", part: "recommendations-title" }, this.sidebarTitle || instance.t("discoveryWidgetTitle"))), !!this.sidebarSubtitle && (h("span", { key: 'b373c3999803fc4b53a40f0f31fb17488dfa7e31', class: "subtitle", part: "recommendations-subtitle" }, this.sidebarSubtitle)))), h("button", { key: 'a11032fd9b99cfecb9be506967714620e100cfd7', class: "close-sidebar", onClick: () => {
351
351
  this.sidebarState = "closed";
352
352
  }, onKeyDown: (event) => {
353
353
  if (event.key === "Enter" || event.key === " ") {
354
354
  event.preventDefault();
355
355
  this.sidebarState = "closed";
356
356
  }
357
- }, part: "close-sidebar", "aria-label": instance.t("a11y.closeButton") }, h(CrossIcon, { key: '47a915a15394f7c76edda5268858dc797d3edad3' }))), h("div", { key: '56d7f788b1537b351c9502d790b4425cce11fa6b', class: "sidebar-content", part: "sidebar-content" }, h("vviinn-vpr-widget", { key: '8fc47c60c4235a83a8dc949659b356d32839e462', token: this.token, currencySign: this.currencySign, pricePrefix: this.pricePrefix, apiPath: this.apiPath, locale: this.locale, numberLocale: this.numberLocale, productId: this.productId, exportparts: `${carouselParts}, ${productCardParts}, ${recommendationsParts}`, imageWidth: this.imageWidth, showMultipleImages: this.showMultipleImages, setItemsAmount: this.setItemsAmount, blockTitle: this.mode !== "set" ? "" : this.sidebarTitle, blockSubtitle: this.mode === "set" ? this.sidebarSubtitle : undefined, mode: this.mode, "campaign-type": this.campaignType, useCarousel: this.useCarousel, onVviinnRecommendationsLoaded: () => {
357
+ }, part: "close-sidebar", "aria-label": instance.t("a11y.closeButton") }, h(CrossIcon, { key: '94a609c658ca36192380ee232d956cfc9e77da15' }))), h("div", { key: '4f62b4e918a084cb7b02141df2bba3d612c382cd', class: "sidebar-content", part: "sidebar-content" }, h("vviinn-vpr-widget", { key: '2ca2caa3da08a59eb7e8d724369f2a8343fe1119', token: this.token, currencySign: this.currencySign, pricePrefix: this.pricePrefix, apiPath: this.apiPath, locale: this.locale, numberLocale: this.numberLocale, productId: this.productId, exportparts: `${carouselParts}, ${productCardParts}, ${recommendationsParts}`, imageWidth: this.imageWidth, showMultipleImages: this.showMultipleImages, setItemsAmount: this.setItemsAmount, blockTitle: this.mode !== "set" ? "" : this.sidebarTitle, blockSubtitle: this.mode === "set" ? this.sidebarSubtitle : undefined, mode: this.mode, "campaign-type": this.campaignType, useCarousel: this.useCarousel, onVviinnRecommendationsLoaded: () => {
358
358
  this.hidden = false;
359
359
  this.sidebarState = "open";
360
360
  }, showScroll: this.widgetScrollbar, campaigns: this.campaigns, color: this.color, buttonElementId: this.buttonElementId, noResultText: this.noResultText, noResultShow: this.noResultShow, gridArrowsDynamic: this.gridArrowsDynamic, showingInButton: this.showingInButton, excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, closed: this.sidebarState === "closed", opened: this.sidebarState === "open", addToBasketShow: this.addToBasketShow, cssUrl: this.cssUrl, showFilters: this.showFilters, setModeDiscounts: this.setModeDiscounts, updateButtonLocation: this.updateButtonLocation, addPriceContainer: this.addPriceContainer, favoriteShow: this.favoriteShow, isAppended: this.isAppended, showInWidget: this.showInWidget, recommendationsLoading: this.recommendationsLoading, setRecommendationsLoading: this.setRecommendationsLoading, imageResolutionWidth: this.imageResolutionWidth, uiSessionId: this.uiSessionId })))));
@@ -1,13 +1,13 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
2
2
  import { _ as _functionExports, E as EitherExports, f as fold, b as fromImage, a as divideOnSized, e as isLeft, m as match, O as OptionExports } from './Rectangle-dmgo4KMB.js';
3
- import { w as toFile, c as makeUploadFileRequest, x as getImageSizes, v as version, h as campaignTypeNames, j as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, y as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, z as resetStore, k as makeTextSearchRequest, A as makeProductListingPageRequest, B as checkDeviceType, p as parseStringToExcluded } from './search.store-B0ZhYtWV.js';
3
+ import { w as toFile, c as makeUploadFileRequest, x as getImageSizes, v as version, h as campaignTypeNames, j as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, y as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, z as resetStore, k as makeTextSearchRequest, A as makeProductListingPageRequest, B as checkDeviceType, p as parseStringToExcluded } from './search.store-Bof_HKxz.js';
4
4
  import { s as slotChangeListener, a as addEventListenersWithSignal, p as productCardSlotNames, v as vprIconSlotName, f as findSlotElements, g as getSlotNames, b as setElementInteractivity, S as SlotSkeleton } from './index-OsoUj2Au.js';
5
- import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as triggerRemoveIntervalFilter, j as announceToScreenReader, s as syncRequestFilters, k as isSubFilterActive, l as RenderFilterButton, m as getIntervalLabel, n as createImageSearchEvent } from './index-CmCUlnFh.js';
5
+ import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as triggerRemoveIntervalFilter, j as announceToScreenReader, s as syncRequestFilters, k as isSubFilterActive, l as RenderFilterButton, m as getIntervalLabel, n as createImageSearchEvent } from './index-CMX-QEzm.js';
6
6
  import { i as instance, t as trackEvent, a as isTrackingEnabled, d as defaultConfig } from './store-BJxQCbNV.js';
7
7
  import { M as MIN_SEARCH_AREA_SIZE, S as SUPPORTED_ASPECT_RATIO, a as MIN_IMAGE_SIDE_FOR_CROPPER, C as Cropper, c as cropperOptions, g as getCropBoxData, i as isCropBoxChangeMinimal, D as DEFAULT_IMAGE_SIZE } from './cropperUtils-CkB6bG3L.js';
8
8
  import { r as renderExternalCSS, o as openProductLink } from './openProductLink-CJ9Wo3Ye.js';
9
9
  import { i as initializeLocale, d as productCardsGridPart, p as productCardParts, l as listCardParts, e as contentCardParts, f as selectedFiltersParts, g as suggestionsParts, h as filtersParts, j as extendedFiltersParts, m as modalParts, b as searchBarParts, k as searchWidgetFilterParts, n as searchWidgetButtonParts } from './index-BtnjaTty.js';
10
- import { i as isOnResultsPage, p as parseResultsPageParams, a as buildImageSearchRedirectUrl } from './resultsPageUrl-niHq9WT6.js';
10
+ import { i as isOnResultsPage, a as parseResultsPageParams, p as parseResultsPageParamNames, c as buildImageSearchRedirectUrl } from './resultsPageUrl-DbOxfJSz.js';
11
11
  import { R as RESULTS_WIDGET_IMAGE_RESOLUTION_WIDTH, b as SCROLL_TO_DISCOVERY_DELAY, S as SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH } from './constants-rqiiCPBX.js';
12
12
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-DOMXsA9W.js';
13
13
 
@@ -832,7 +832,7 @@ const VviinnResults = class {
832
832
  ],
833
833
  ], signal);
834
834
  const urlParams = this.resultsPageUrl && isOnResultsPage(this.resultsPageUrl)
835
- ? parseResultsPageParams()
835
+ ? parseResultsPageParams(window.location.search, parseResultsPageParamNames(this.resultsPageParams))
836
836
  : {};
837
837
  const effectiveSearchId = this.searchId || urlParams.searchId;
838
838
  const effectiveTextSearchQuery = this.textSearchQuery || urlParams.query;
@@ -979,13 +979,13 @@ const VviinnResults = class {
979
979
  render() {
980
980
  var _a;
981
981
  const resultsLength = this.getResults().length;
982
- return (h(Host, { key: 'cbc6688ddadd320131e6610854493d91541d9ea3', id: "results-block", class: {
982
+ return (h(Host, { key: '2ba9c019be5e6d2a70f299ebd4827baefa671cad', id: "results-block", class: {
983
983
  "show-in-widget": this.showInWidget,
984
984
  "matching-discovery": this.oneClickDiscoveryMode === "append-slider",
985
- }, exportparts: `${productCardParts}, ${listCardParts}, ${contentCardParts}, ${productCardsGridPart}` }, renderExternalCSS(this.cssUrl), h("div", { key: 'c70ea00ced61c2f50bcb8314346977b09e0fdce0', class: "nothing-found" }, this.getCurrentErrorType() && (h("vviinn-error", { key: '908f97bf1a2c79165b7b1dbf786c4ca3ec6ed70a', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), h("div", { key: 'c15b9d924297ddc660f332670d7cc6c433095dbb', class: {
985
+ }, exportparts: `${productCardParts}, ${listCardParts}, ${contentCardParts}, ${productCardsGridPart}` }, renderExternalCSS(this.cssUrl), h("div", { key: '8521abb79a86723af8f18cd66558f8cd56d0d725', class: "nothing-found" }, this.getCurrentErrorType() && (h("vviinn-error", { key: '030f376feaa161d598dc60e2deae0bcde368759a', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), h("div", { key: '82a242f74f6a5481b40ec26a977d11465a5c58da', class: {
986
986
  hidden: this.showAspectRatioError || resultsLength === 0,
987
987
  products: true,
988
- }, part: productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), h("div", { key: '349d582923921efb41b9a700df47852feb82a3eb', id: "one-click-discovery-append", style: {
988
+ }, part: productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), h("div", { key: 'ed28c78ddfa0826f8ad8a70639e83386d9297c7c', id: "one-click-discovery-append", style: {
989
989
  order: ((_a = this.oneClickDiscoveryAppendIndex) !== null && _a !== void 0 ? _a : resultsLength).toString(),
990
990
  } }))));
991
991
  }
@@ -1463,7 +1463,9 @@ const splitContentByLocators = (content, annotations) => {
1463
1463
  };
1464
1464
  const getAnnotationFilterKeys = (annotation) => {
1465
1465
  var _a, _b, _c;
1466
- return (_c = (_b = (_a = annotation.interactions) === null || _a === void 0 ? void 0 : _a.dynamicFilters) === null || _b === void 0 ? void 0 : _b.flatMap((filter) => "values" in filter ? filter.values.map((v) => `${filter.column}:${v.value}`) : [])) !== null && _c !== void 0 ? _c : [];
1466
+ return (_c = (_b = (_a = annotation.interactions) === null || _a === void 0 ? void 0 : _a.dynamicFilters) === null || _b === void 0 ? void 0 : _b.flatMap((filter) => "values" in filter
1467
+ ? filter.values.map((v) => `${filter.column}:${v.value}`)
1468
+ : [])) !== null && _c !== void 0 ? _c : [];
1467
1469
  };
1468
1470
  const getAnnotationDeeplink = (annotation) => {
1469
1471
  for (const item of annotation.data.items) {
@@ -1478,7 +1480,7 @@ const renderAnnotatedContent = (content, annotations, onAnnotationClick, applied
1478
1480
  return (h("li", { class: "suggestion-item", part: "suggestion-item", key: key }, segments.map((segment, i) => {
1479
1481
  const segmentKey = `${key}-${i}`;
1480
1482
  if (segment.type === "text") {
1481
- return h("span", { key: segmentKey, innerHTML: g.parseInline(segment.content) });
1483
+ return (h("span", { key: segmentKey, innerHTML: g.parseInline(segment.content) }));
1482
1484
  }
1483
1485
  const deeplink = getAnnotationDeeplink(segment.annotation);
1484
1486
  if (deeplink) {
@@ -1768,7 +1770,7 @@ const VviinnVpsWidget = class {
1768
1770
  this.showIntervalInputs = false;
1769
1771
  /** URL to external CSS file for custom styling */
1770
1772
  this.cssUrl = null;
1771
- /** Show search results in modal or on page */
1773
+ /** Render results in modal. Set false to redirect or show results on the page. */
1772
1774
  this.showResultsInModal = true;
1773
1775
  /** Set true when showing the widget in button */
1774
1776
  /** @internal */
@@ -1954,7 +1956,7 @@ const VviinnVpsWidget = class {
1954
1956
  return this.slidePosition === 1;
1955
1957
  }
1956
1958
  handleImageSearchRedirect(searchId) {
1957
- const url = buildImageSearchRedirectUrl(this.resultsPageUrl, searchId);
1959
+ const url = buildImageSearchRedirectUrl(this.resultsPageUrl, searchId, parseResultsPageParamNames(this.resultsPageParams).searchId);
1958
1960
  const redirectData = Object.assign(Object.assign({}, this.getBasicEventData()), { url, source: "visual-search", searchId });
1959
1961
  const event = this.vviinnRedirect.emit(redirectData);
1960
1962
  if (!event.defaultPrevented) {
@@ -2136,31 +2138,31 @@ const VviinnVpsWidget = class {
2136
2138
  }
2137
2139
  render() {
2138
2140
  var _a, _b, _c;
2139
- return (h(Host, { key: '6aed408d103c9178aa941c2d2b787b3ceb403112', exportparts: `${modalParts}, ${productCardParts}, ${searchBarParts}, ${searchWidgetFilterParts}, ${searchWidgetButtonParts}, ${productCardsGridPart}, ${suggestionsParts}` }, renderExternalCSS(this.cssUrl), !this.showingInButton && SlotSkeleton("search"), h("vviinn-overlayed-modal", { key: '76b8814a2c9a90ad89c0b1307d8af3b2165a2f20', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
2141
+ return (h(Host, { key: '01b4f049543923fb986fc0100118312b076215a1', exportparts: `${modalParts}, ${productCardParts}, ${searchBarParts}, ${searchWidgetFilterParts}, ${searchWidgetButtonParts}, ${productCardsGridPart}, ${suggestionsParts}` }, renderExternalCSS(this.cssUrl), !this.showingInButton && SlotSkeleton("search"), h("vviinn-overlayed-modal", { key: 'c6f39d506801e5b19aedd62d24d7c80ecddf6c0a', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
2140
2142
  if (detail.campaignTypeId !== "VPR")
2141
2143
  this.handleModalClose();
2142
2144
  }, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: version, hideBackButton: this.mode === "upload" ||
2143
- (!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '9871062493a9eb73a435cc00bd0c984e7cb07f99', position: this.slidePosition }, h("vviinn-slide", { key: 'd8bdff5c066124b82933fbdc48351c01e10bed4a', class: {
2145
+ (!this.isCameraEnabled && this.isOnboardingSlide()) }, h("vviinn-slider", { key: '07b98067fda24f46e1b34ea8a27a107b0e7cc925', position: this.slidePosition }, h("vviinn-slide", { key: '373b868d121f435fae72799e1d5aed63719bc44a', class: {
2144
2146
  "start-page": true,
2145
2147
  "camera-enabled": this.isCameraEnabled,
2146
- } }, h("vviinn-camera", { key: 'cc211f0489c8a7015e1e71d6921a603f28b24cd0', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
2148
+ } }, h("vviinn-camera", { key: '57871a635ec0c3f8fe92e0d983b154f659afff01', token: this.token, onVviinnImageUploadFinished: ({ detail }) => this.handleVviinnImageUploadFinished(detail), onVviinnImageUploadStarted: () => {
2147
2149
  this.handleVviinnImageUpload("startCamera");
2148
- }, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: 'ce68792877d657ae8a4be79d1affa448969dc35d', class: {
2150
+ }, apiPath: this.apiPath, basicEventData: this.getBasicEventData(), srcObject: this.stream, cameraButtonClicked: this.isCameraButtonClicked, exampleImageSource: this.exampleImageSource, showInWidget: this.showInWidget, storeName: this.storeName, state: this.state }), h("div", { key: '5999da46ea9baeac815578fb2112af5d9248219a', class: {
2149
2151
  error: this.haveErrors(),
2150
- }, id: "start-page_block" }, h("div", { key: 'e91f0b8ba1150a5a8e71911379666893fe19ac1d', class: "start-page_main-content" }, (this.wrongImageFormat ||
2151
- this.state.searchStatus === "error") && (h("div", { key: '5278752a9838158d26ab74a6e2274e68c0e3694f', class: "start-page_errors-block" }, this.getCurrentErrorType() && (h("vviinn-error", { key: '2244e75a1b13473f4b5b0904a7d505956372279c', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (h(Fragment, { key: 'c40fba405487df607f432a3a61341794f39b9e61' }, h("vviinn-teaser", { key: '246f3b4a349b100f18aa63fd375561daa75c358b' }), h("div", { key: 'c3054a13a601ab5f7977dcc497791c95ac3e4c9d', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (h("vviinn-text-search", { key: '02d3304c0844b3b59323810133359fde23efce1b', token: this.token, apiPath: this.apiPath, locale: this.locale, showInWidget: this.showInWidget, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" }))))), h("vviinn-privacy-badge", { key: '58233bdef25abfda3a3160c6e01ae02310d77825', privacyBadgeText: instance.t("privacyBadgeText", {
2152
+ }, id: "start-page_block" }, h("div", { key: '63c7fbcbffa30eabe9bf6e1cb58b5cd55cd01bd0', class: "start-page_main-content" }, (this.wrongImageFormat ||
2153
+ this.state.searchStatus === "error") && (h("div", { key: '5aa9c7d3d7ff2cb5d3041f680b18a0356d60f61e', class: "start-page_errors-block" }, this.getCurrentErrorType() && (h("vviinn-error", { key: '686db18d4492c958f5236b0b2e76f2d39e9a08d4', errorType: this.getCurrentErrorType(), handler: this.resetState, hasBackground: true, searchType: this.state.searchType })))), !this.haveErrors() && (h(Fragment, { key: 'f0bbc9a11f5595b87b70add2f18169d0e985e4d6' }, h("vviinn-teaser", { key: '41e84754db32d28f8cfe0666c10ffadd96805e61' }), h("div", { key: '575c73b2ddbcb508af636f381b819c2b112d2b06', class: "buttons-group" }, this.renderButtons()), this.textSearchShow && !this.isResultSlide() && (h("vviinn-text-search", { key: 'ccb9709e6a796c29668954ea6988d5111c8ac5e5', token: this.token, apiPath: this.apiPath, locale: this.locale, showInWidget: this.showInWidget, showOnFirstScreen: true, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" }))))), h("vviinn-privacy-badge", { key: '47e8a7b3bec65c2758ecaf65f0cc8d9af6ea188d', privacyBadgeText: instance.t("privacyBadgeText", {
2152
2154
  interpolation: { escapeValue: false },
2153
- }), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: '38d314277f6b56d2b9a938aff67bcf290919fc63', class: {
2155
+ }), class: { invisible: this.haveErrors() } }))), h("vviinn-slide", { key: '90b4dbc609191dc60a723d8c1c76eac581ef0ff7', class: {
2154
2156
  "results-page": true,
2155
2157
  active: this.isResultSlide(),
2156
- } }, this.isResultSlide() && (h("div", { key: '952734e6210be933a987ea7d9c302af207b07918', class: "source-wrapper" }, this.isTextSearch() && (h("vviinn-text-search", { key: '20a6501cff42d1ad9a63b9fafe47eec13217d270', token: this.token, showInWidget: this.showInWidget, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" })), !this.isTextSearch() && (h("vviinn-cropper", { key: '7b2dfe5f2955c0da08015a2631d43bf6e8dc637d', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), h("vviinn-suggestions", { key: 'f33add9678d7888f7e846ddf02425cac63d05047', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), h("vviinn-selected-filters", { key: '1ed93b2b8173ddfb82df91a3306f5a03384c9e6a', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h("div", { key: 'fdc4c607a3a094c14f062c5ba35d1239b851eb2e', class: {
2158
+ } }, this.isResultSlide() && (h("div", { key: '0b4410683c1d777267f6277986675f132d6fb389', class: "source-wrapper" }, this.isTextSearch() && (h("vviinn-text-search", { key: '2084be2aa14b17922a1cfa046df7c646935e0d13', token: this.token, showInWidget: this.showInWidget, apiPath: this.apiPath, locale: this.locale, uiSessionId: this.uiSessionId, basicEventData: this.getBasicEventData(true), resultsPageUrl: this.resultsPageUrl, autoSuggestShow: this.autoSuggestShow, "save-image-mode": "never" })), !this.isTextSearch() && (h("vviinn-cropper", { key: 'de6347c097358595f025e745911d40c166d6c7b1', token: this.token, basicEventData: this.getBasicEventData(), showAspectRatioError: this.showAspectRatioError, apiPath: this.apiPath, showInWidget: this.showInWidget, "save-image-mode": "never" })), h("vviinn-suggestions", { key: '33be481c722028ab35af64b68447ba99c9e3ceb8', showInWidget: this.showInWidget, token: this.token, apiPath: this.apiPath, locale: this.locale }), h("vviinn-selected-filters", { key: '868951037f06f2beb6f8b0f497f15797e166db34', locale: this.locale, currencySign: this.currencySign, showInWidget: this.showInWidget, exportparts: filtersParts }), ((_b = this.state.dynamicFilters) === null || _b === void 0 ? void 0 : _b.length) > 0 && (h("div", { key: '464ce9e0159ac8b5da45122c55953e80d940383b', class: {
2157
2159
  "filters-wrapper": true,
2158
2160
  hidden: this.showAspectRatioError,
2159
- } }, h("vviinn-filters", { key: '410171f7ea209973c1c5943511b7dd7f59545ae5', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters", { key: 'ce86b434f676f7357d197b2daeebe3b523f37de1', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters-button", { key: '5b54b7ae75bdff0c519d946c2016997da4bb8363', class: {
2161
+ } }, h("vviinn-filters", { key: 'd9549d22f88bb270d4e3221faf545caa6a2bcb12', showInWidget: this.showInWidget, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters", { key: 'c1c78c38dd71beab583fa7f68d294d23b2d59c44', mode: "preview", showHeader: false, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }), h("vviinn-extended-filters-button", { key: 'ade4464be96dccd368c4f0e580bb1fec968dbd01', class: {
2160
2162
  "extended-filters-button": true,
2161
2163
  "has-primary-filters": this.state.dynamicFilters.filter((f) => f.isPrimary)
2162
2164
  .length > 0,
2163
- }, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: '6f6bac82cbd34c620a27d0c8b9e7715b211bd5d3' }, h("vviinn-results", { key: '69fcf9486340292f4d86c180c9fab1d9b3602d86', token: this.token, locale: this.locale, numberLocale: this.numberLocale, pricePrefix: this.pricePrefix, "currency-sign": this.currencySign, apiPath: this.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: this.showInWidget, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody }))))), h("vviinn-extended-filters", { key: '7ba8188f7ee5d3338ecbdaac1957505384f7f415', class: "modal-extended-filters", mode: "modal", exportparts: extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
2165
+ }, showInWidget: this.showInWidget }))))), this.isResultSlide() && (h(Fragment, { key: '36a3a9853b096df62fb977a5799cc7c863f93ca5' }, h("vviinn-results", { key: 'd38adf77a1e2988233991fbc7d2d9beedc7e0375', token: this.token, locale: this.locale, numberLocale: this.numberLocale, pricePrefix: this.pricePrefix, "currency-sign": this.currencySign, apiPath: this.apiPath, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, uiSessionId: this.uiSessionId, widgetElementId: (_c = this.buttonElementId) !== null && _c !== void 0 ? _c : this.widgetElementId, showInWidget: this.showInWidget, buttonElementId: this.buttonElementId, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, addToBasketShow: this.addToBasketShow, favoriteShow: this.favoriteShow, showAspectRatioError: this.showAspectRatioError, resetWidgetState: this.resetState, replaceSlotsContentInWidget: this.replaceSlotsContent.bind(this), replaceSlotsContentInButton: this.replaceSlotsContentInButton, addPriceContainer: this.addPriceContainer, oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, parentSlots: [...this.parentSlots, ...this.slots], scrollableModalBody: this.modalBody }))))), h("vviinn-extended-filters", { key: 'e40f196666c92c3813ca883732d6e155b7e181d7', class: "modal-extended-filters", mode: "modal", exportparts: extendedFiltersParts, showInWidget: this.showInWidget, locale: this.locale, currencySign: this.currencySign, showIntervalInputs: this.showIntervalInputs }))));
2164
2166
  }
2165
2167
  get el() { return getElement(this); }
2166
2168
  static get watchers() { return {
@@ -1,8 +1,8 @@
1
1
  import { h, r as registerInstance, c as createEvent, f as forceUpdate, F as Fragment, H as Host, g as getElement } from './index-RkvPN2Rk.js';
2
- import { h as campaignTypeNames, j as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, C as isMobile, D as fromString, E as fold, v as version } from './search.store-B0ZhYtWV.js';
2
+ import { h as campaignTypeNames, j as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, C as isMobile, D as fromString, E as fold, v as version } from './search.store-Bof_HKxz.js';
3
3
  import { X as has, Y as tuple, _ as _functionExports, g as requireSemigroup, O as OptionExports, v as pipe$1, N as chainW, Z as makeRequest, L as fromEither, $ as resolveApiPath, a0 as createInitPostRequest, a1 as Apply, a2 as TaskEitherExports, E as EitherExports } from './Rectangle-dmgo4KMB.js';
4
4
  import { i as instance, d as defaultConfig, t as trackEvent, a as isTrackingEnabled } from './store-BJxQCbNV.js';
5
- import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, q as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels, r as SCROLL_POSITION_TOLERANCE, u as triggerResetFilters, t as triggerFilter, j as announceToScreenReader, m as getIntervalLabel, w as isPriceFilter, k as isSubFilterActive, l as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, x as CUSTOM_LABELS_DELIMITER, v as v4, c as createWidgetEvent, e as createResultEventByType, b as createAddToBasketEvent, d as createAddToWishlistEvent, f as createProductEventByType, y as getRecommendationsBody } from './index-CmCUlnFh.js';
5
+ import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, q as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels, r as SCROLL_POSITION_TOLERANCE, u as triggerResetFilters, t as triggerFilter, j as announceToScreenReader, m as getIntervalLabel, w as isPriceFilter, k as isSubFilterActive, l as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, x as CUSTOM_LABELS_DELIMITER, v as v4, c as createWidgetEvent, e as createResultEventByType, b as createAddToBasketEvent, d as createAddToWishlistEvent, f as createProductEventByType, y as getRecommendationsBody } from './index-CMX-QEzm.js';
6
6
  import { P as PRODUCT_CARD_IMAGE_WIDTH, D as DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH, c as PRODUCT_CARD_IMAGE_RESOLUTION_WIDTH } from './constants-rqiiCPBX.js';
7
7
  import { s as slotChangeListener, a as addEventListenersWithSignal, i as isElementInSelector, S as SlotSkeleton } from './index-OsoUj2Au.js';
8
8
  import { o as energyLabelParts, i as initializeLocale, j as extendedFiltersParts, h as filtersParts, q as imageParts, e as contentCardParts, l as listCardParts, p as productCardParts, t as priceRangeParts } from './index-BtnjaTty.js';
@@ -425,9 +425,7 @@ const VviinnCarousel = class {
425
425
  if (!calculatedColumnsAmount || isNaN(calculatedColumnsAmount)) {
426
426
  const cssColumnsAmount = parseInt(styleSheet.getPropertyValue(CAROUSEL_COLUMNS_CSS_VAR));
427
427
  this.columns =
428
- cssColumnsAmount >= 1
429
- ? cssColumnsAmount
430
- : DEFAULT_COLUMNS_NUMBER;
428
+ cssColumnsAmount >= 1 ? cssColumnsAmount : DEFAULT_COLUMNS_NUMBER;
431
429
  }
432
430
  else {
433
431
  this.columns = calculatedColumnsAmount;
@@ -560,10 +558,10 @@ const VviinnCarousel = class {
560
558
  }
561
559
  render() {
562
560
  var _a, _b, _c, _d, _e;
563
- return (h(Host, { key: 'c5f34b585ae2cf1307d3011db185fcb038a807b6', class: this.getClassMap() }, h("div", { key: '098746eefad49ac0cf2bdac38e74fdc53d3b2313', class: Object.assign(Object.assign({}, this.getClassMap()), this.getBodyClassMap()) }, this.isSetMode && this.crossSellingRecommendations.length > 0 && (h("vviinn-product-card", { key: '3fe540bbe42a9fd21c5fb1a79d8f8949c9ef08a7', class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: (_b = (_a = this.sourceProduct.image) === null || _a === void 0 ? void 0 : _a.thumbnail) !== null && _b !== void 0 ? _b : (_c = this.sourceProduct.image) === null || _c === void 0 ? void 0 : _c.original, images: this.sourceProduct.images, showMultipleImages: this.showMultipleImages, disableMobileSwiper: true, entityType: this.sourceProduct.entityType, price: this.sourceProduct.price.actual, salePrice: this.sourceProduct.price.sale, basePrice: (_d = this.sourceProduct.basePrice) === null || _d === void 0 ? void 0 : _d.actual, baseSalePrice: (_e = this.sourceProduct.basePrice) === null || _e === void 0 ? void 0 : _e.sale, addPriceContainer: this.addPriceContainer, imageWidth: 300, imageResolutionWidth: this.imageResolutionWidth, isSourceProduct: true, currencySign: this.currencySign, pricePrefix: this.pricePrefix, isSetMode: this.isSetMode, locale: this.locale, numberLocale: this.numberLocale, favoriteShow: this.favoriteShow, customLabels: getCustomLabels(this.sourceProduct), responsive: true })), h("div", { key: 'f22aa5a751ee14cdd305193280ec61bbb8fffc8b', class: this.getContentClassMap() }, this.renderRecommendations(), this.showArrowButtons() && (h(Fragment, { key: 'e6a14ce9e7c409cac09d16a0d35b65e70cfff007' }, h("button", { key: '8fb9606e5ba9aecf18252422243f9c4072397a9f', class: {
561
+ return (h(Host, { key: '17df2493a9d19208c12c0655f9a66ac120217a75', class: this.getClassMap() }, h("div", { key: 'e23e8c0b69f6948a1f8cf4f21b774761a745eda5', class: Object.assign(Object.assign({}, this.getClassMap()), this.getBodyClassMap()) }, this.isSetMode && this.crossSellingRecommendations.length > 0 && (h("vviinn-product-card", { key: 'a43b88e69f1a6023deb7bdb85542beabaeb433b8', class: "set-mode product-card--source", productTitle: this.sourceProduct.title, image: (_b = (_a = this.sourceProduct.image) === null || _a === void 0 ? void 0 : _a.thumbnail) !== null && _b !== void 0 ? _b : (_c = this.sourceProduct.image) === null || _c === void 0 ? void 0 : _c.original, images: this.sourceProduct.images, showMultipleImages: this.showMultipleImages, disableMobileSwiper: true, entityType: this.sourceProduct.entityType, price: this.sourceProduct.price.actual, salePrice: this.sourceProduct.price.sale, basePrice: (_d = this.sourceProduct.basePrice) === null || _d === void 0 ? void 0 : _d.actual, baseSalePrice: (_e = this.sourceProduct.basePrice) === null || _e === void 0 ? void 0 : _e.sale, addPriceContainer: this.addPriceContainer, imageWidth: 300, imageResolutionWidth: this.imageResolutionWidth, isSourceProduct: true, currencySign: this.currencySign, pricePrefix: this.pricePrefix, isSetMode: this.isSetMode, locale: this.locale, numberLocale: this.numberLocale, favoriteShow: this.favoriteShow, customLabels: getCustomLabels(this.sourceProduct), responsive: true })), h("div", { key: '9c96c18a6a8baa6fe399b05422d50b4b5e04fe3f', class: this.getContentClassMap() }, this.renderRecommendations(), this.showArrowButtons() && (h(Fragment, { key: 'ecb5092972959988a16a92917c6e66ce8921a182' }, h("button", { key: '2c010f6e44921a9059ba7b4461ef3789a98b8c25', class: {
564
562
  prev: true,
565
563
  "grid-arrows-dynamic": this.gridArrowsDynamic && this.isGridMode,
566
- }, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": instance.t("buttons.previous") }, h(ChevronIcon, { key: '70aeaed3d65ebb2344f964f8bfba34f67de1c97a' })), h("button", { key: 'edd35c95f6404725cdfe9548f24fc555efe5b21d', class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button carousel-button-next", disabled: this.isLast(), "aria-label": instance.t("buttons.next") }, h(ChevronIcon, { key: 'e5af48de0f6c1f95dfaaf577ca930a233f8eb488' })))))), this.showBullets() && (h("div", { key: 'b0957a0f30c6a43c71198780d650413c4c28c1d3', class: "bullets" }, this.renderBullets()))));
564
+ }, onClick: () => this.handleCarouselButtonClick("left"), part: "carousel-button carousel-button-prev", disabled: this.isFirst(), "aria-label": instance.t("buttons.previous") }, h(ChevronIcon, { key: 'ab45bd9d910d09a55687d3f30fa406b3a73447ab' })), h("button", { key: '6abf98f21ab7298eabebc269d536a5a9e1d79b40', class: "next", onClick: () => this.handleCarouselButtonClick("right"), part: "carousel-button carousel-button-next", disabled: this.isLast(), "aria-label": instance.t("buttons.next") }, h(ChevronIcon, { key: '1509f1cebeaf3855c189c1f0739a0248342e72b0' })))))), this.showBullets() && (h("div", { key: '1e550f3d478c4ed419932b228d7266abddd8d9c1', class: "bullets" }, this.renderBullets()))));
567
565
  }
568
566
  get el() { return getElement(this); }
569
567
  static get watchers() { return {
@@ -11712,8 +11710,7 @@ const VviinnVprWidget = class {
11712
11710
  (_a = this.setRecommendationsLoading) === null || _a === void 0 ? void 0 : _a.call(this, loading);
11713
11711
  };
11714
11712
  this.showNoResultText = () => !this.recommendationsLoading &&
11715
- (this.recommendations.length === 0 ||
11716
- this.hasErrorOnLoad);
11713
+ (this.recommendations.length === 0 || this.hasErrorOnLoad);
11717
11714
  this.productCardEventDataToEventBody = (eventData) => {
11718
11715
  const { productRank, productId} = eventData, rest = __rest(eventData, ["productRank", "productId", "campaignTypeId", "discount"]);
11719
11716
  return Object.assign({ session_id: this.uiSessionId, rank: productRank, product: productId }, rest);
@@ -11955,9 +11952,16 @@ const VviinnVprWidget = class {
11955
11952
  empty: this.recommendations.length == 0,
11956
11953
  [this.mode]: true,
11957
11954
  "show-in-widget": this.showInWidget,
11958
- }, role: "region", "aria-label": !this.showingInButton ? instance.t("a11y.recommendations") : undefined, "aria-busy": isLoading ? "true" : "false", "aria-live": isLoading ? "polite" : "off" }, h(Fragment, null, renderExternalCSS(this.cssUrl), SlotSkeleton("discovery"), (this.isSetMode || this.blockTitle !== "" || !!this.blockSubtitle) && (h("div", { class: "widget-header" }, h("div", null, this.blockTitle !== "" && (h("h2", { part: "recommendations-title" }, h("slot", { name: "vviinn-recommendations-title" }, (_a = this.blockTitle) !== null && _a !== void 0 ? _a : (this.isSetMode
11955
+ }, role: "region", "aria-label": !this.showingInButton ? instance.t("a11y.recommendations") : undefined, "aria-busy": isLoading ? "true" : "false", "aria-live": isLoading ? "polite" : "off" }, h(Fragment, null, renderExternalCSS(this.cssUrl), SlotSkeleton("discovery"), (this.isSetMode ||
11956
+ this.blockTitle !== "" ||
11957
+ !!this.blockSubtitle) && (h("div", { class: "widget-header" }, h("div", null, this.blockTitle !== "" && (h("h2", { part: "recommendations-title" }, h("slot", { name: "vviinn-recommendations-title" }, (_a = this.blockTitle) !== null && _a !== void 0 ? _a : (this.isSetMode
11959
11958
  ? instance.t("setMode.widgetTitle")
11960
- : instance.t("discoveryWidgetTitle"))))), (this.isSetMode || !!this.blockSubtitle) && (h("h3", { part: "recommendations-subtitle" }, h("slot", { name: "vviinn-recommendations-subtitle" }, this.blockSubtitle || (this.isSetMode ? instance.t("setMode.widgetSubtitle") : ""))))), this.isSetMode && this.updateButtonLocation !== "onItem" && this.recommendations.length > 0 ? (h("button", { class: "update-button", part: "update-button-top", onClick: () => (this.updatingAllCards = true) }, h("slot", { name: "vviinn-update-button-icon" }, h(UpdateIcon, null)), h("slot", { name: "vviinn-update-button-text" }, h("span", null, instance.t("setMode.updateButtonText"))))) : null)), (this.showFilters || this.showExtendedFilters) && (h("div", { class: "filters-header " }, this.showFilters && h("vviinn-filters", null), this.showExtendedFilters && (h("vviinn-extended-filters", { showingInButton: this.showingInButton, locale: this.locale, currencySign: this.currencySign })))), this.useCarousel ? this.renderCarousel() : this.renderResults(), this.showNoResultText() && (h("div", { class: "no-result-text", role: "status" }, this.noResultText.length
11959
+ : instance.t("discoveryWidgetTitle"))))), (this.isSetMode || !!this.blockSubtitle) && (h("h3", { part: "recommendations-subtitle" }, h("slot", { name: "vviinn-recommendations-subtitle" }, this.blockSubtitle ||
11960
+ (this.isSetMode
11961
+ ? instance.t("setMode.widgetSubtitle")
11962
+ : ""))))), this.isSetMode &&
11963
+ this.updateButtonLocation !== "onItem" &&
11964
+ this.recommendations.length > 0 ? (h("button", { class: "update-button", part: "update-button-top", onClick: () => (this.updatingAllCards = true) }, h("slot", { name: "vviinn-update-button-icon" }, h(UpdateIcon, null)), h("slot", { name: "vviinn-update-button-text" }, h("span", null, instance.t("setMode.updateButtonText"))))) : null)), (this.showFilters || this.showExtendedFilters) && (h("div", { class: "filters-header " }, this.showFilters && h("vviinn-filters", null), this.showExtendedFilters && (h("vviinn-extended-filters", { showingInButton: this.showingInButton, locale: this.locale, currencySign: this.currencySign })))), this.useCarousel ? this.renderCarousel() : this.renderResults(), this.showNoResultText() && (h("div", { class: "no-result-text", role: "status" }, this.noResultText.length
11961
11965
  ? this.noResultText
11962
11966
  : instance.t("noResultText"))))));
11963
11967
  }
@@ -2,7 +2,7 @@ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement
2
2
  import { a as divideOnSized, E as EitherExports } from './Rectangle-dmgo4KMB.js';
3
3
  import { C as Cropper, c as cropperOptions, g as getCropBoxData, i as isCropBoxChangeMinimal } from './cropperUtils-CkB6bG3L.js';
4
4
  import { g as getSwiperStyles, c as configureSwiperElement, r as register, e as extractSlideIndex, s as setupIntersectionObserver } from './swiper-element-Er2KrWw1.js';
5
- import { i as isDesktop$1, s as shopTheLookState, m as makeVisualSearchRequest, a as makeVisualSearchByUrlRequest, b as imageFromFileTask, c as makeUploadFileRequest, g as getAcceptableFileFormats } from './search.store-B0ZhYtWV.js';
5
+ import { i as isDesktop$1, s as shopTheLookState, m as makeVisualSearchRequest, a as makeVisualSearchByUrlRequest, b as imageFromFileTask, c as makeUploadFileRequest, g as getAcceptableFileFormats } from './search.store-Bof_HKxz.js';
6
6
  import { S as SecondaryActionIcon } from './SecondaryActionIcon-FWFzrhba.js';
7
7
  import { i as initializeLocale, a as shopTheLookParts } from './index-BtnjaTty.js';
8
8
  import { d as defaultConfig } from './store-BJxQCbNV.js';
@@ -1377,7 +1377,7 @@ const VviinnShopTheLook = class {
1377
1377
  }, TIMING.SEARCH_DEBOUNCE_DELAY);
1378
1378
  }
1379
1379
  render() {
1380
- return (h(Host, { key: '4734dcdc0c1a7d206970c8baf08e257077e952f9', exportparts: shopTheLookParts }, renderExternalCSS(this.cssUrl), h("div", { key: '129438fdcf114bd903ad6888287e060e5fdc3948', class: `shop-the-look-container ${this.showModal ? "modal-open" : ""} ${this.showCropper ? "with-cropper" : ""} widget-style-${this.widgetStyle}` }, h("div", { key: '04e037ad029930bd366920ca79e0ae7becebaf2c', class: "main-content" }, this.renderSwiperWrapper(), this.showLoadingSpinner && (h("div", { key: '18ca739ed4cf0b1167fd8976fdab0c5e6e0ee410', class: "search-loader" }, h("vviinn-preloader", { key: 'efd47991fa32bf315c4985f98f0c14ccbf6f5a72' })))), this.renderModalWrapper(), h("div", { key: '332adbe2912fb61f82f9cf0488a13f7c9a0a405c', class: "actions-container", part: "shop-the-look-actions-container" }, this.uploadMode && (h("div", { key: '55c748ffeded24b97801683454f9a1b8675f6ed6', class: "upload-button-container" }, h("button", { key: '7cfa399b98e254bd12bff706cf6c4bea42dce684', class: "upload-button", part: "shop-the-look-upload-button", onClick: () => { var _a; return (_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.click(); }, disabled: this.showLoadingSpinner }, h("span", { key: 'a42f68c8d5e0347c7869990b78b13cc06a326542', class: "upload-button-icon", part: "shop-the-look-upload-button-icon" }, h("slot", { key: 'b6a1e877b52110f942892563322256450b17fbdc', name: "vviinn-image-upload-icon" }, h(UploadActionIconVariant, { key: '429d134552e802cf9991d26bd0c9cbfe169e7054' }))), h("span", { key: '4953c1120b4fdd3eec4401804b1eaddde1768bce', class: "upload-button-text", part: "shop-the-look-upload-button-text" }, h("slot", { key: '6e090992822174af61f428d5ae164fe929d6bafe', name: "upload-button-text" }))), h("input", { key: 'bde20d3f752c330277a5162e9662ff2d659db826', type: "file", class: "visually-hidden", accept: getAcceptableFileFormats(), onChange: this.handleFileUpload, ref: (el) => (this.fileInput = el) }))), this.showNavigation() &&
1380
+ return (h(Host, { key: '4734dcdc0c1a7d206970c8baf08e257077e952f9', exportparts: shopTheLookParts }, renderExternalCSS(this.cssUrl), h("div", { key: '129438fdcf114bd903ad6888287e060e5fdc3948', class: `shop-the-look-container ${this.showModal ? "modal-open" : ""} ${this.showCropper ? "with-cropper" : ""} widget-style-${this.widgetStyle}` }, h("div", { key: '04e037ad029930bd366920ca79e0ae7becebaf2c', class: "main-content" }, this.renderSwiperWrapper(), this.showLoadingSpinner && (h("div", { key: '18ca739ed4cf0b1167fd8976fdab0c5e6e0ee410', class: "search-loader" }, h("vviinn-preloader", { key: 'efd47991fa32bf315c4985f98f0c14ccbf6f5a72' })))), this.renderModalWrapper(), h("div", { key: '332adbe2912fb61f82f9cf0488a13f7c9a0a405c', class: "actions-container", part: "shop-the-look-actions-container" }, this.uploadMode && (h("div", { key: '55c748ffeded24b97801683454f9a1b8675f6ed6', class: "upload-button-container" }, h("button", { key: '7cfa399b98e254bd12bff706cf6c4bea42dce684', class: "upload-button", part: "shop-the-look-upload-button", onClick: () => { var _a; return (_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.click(); }, disabled: this.showLoadingSpinner }, h("span", { key: '48b59d82816a50b6f98bbf68c8a6849679437852', class: "upload-button-icon", part: "shop-the-look-upload-button-icon" }, h("slot", { key: '14f12cf7f44a39ba4f1d9cbecb6fa3558ae5fd5d', name: "vviinn-image-upload-icon" }, h(UploadActionIconVariant, { key: '1937cea6010c0a21182e88f365f188a65b0f3a70' }))), h("span", { key: 'd62a5ee1ac2c17a663dda26cb0debd83821510c0', class: "upload-button-text", part: "shop-the-look-upload-button-text" }, h("slot", { key: '42a4910a590a2b258dccb2a3ace5da8f60099791', name: "upload-button-text" }))), h("input", { key: '242e2ed2e319428ebde6dff7df8c37b60d33a8f1', type: "file", class: "visually-hidden", accept: getAcceptableFileFormats(), onChange: this.handleFileUpload, ref: (el) => (this.fileInput = el) }))), this.showNavigation() &&
1381
1381
  renderNavigation(this.swiperActiveIndex, this.totalImages, this.handleNavigatePrev, this.handleNavigateNext)))));
1382
1382
  }
1383
1383
  get el() { return getElement(this); }
@@ -1,10 +1,10 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-RkvPN2Rk.js';
2
2
  import { _ as _functionExports, f as fold } from './Rectangle-dmgo4KMB.js';
3
- import { d as setTextSearchQuery, e as clearAutoSuggestCompletions, f as makeAutoSuggestRequest, v as version, h as campaignTypeNames, j as addIfNotEmpty, k as makeTextSearchRequest, u as useSearchStore } from './search.store-B0ZhYtWV.js';
3
+ import { d as setTextSearchQuery, e as clearAutoSuggestCompletions, f as makeAutoSuggestRequest, v as version, h as campaignTypeNames, j as addIfNotEmpty, k as makeTextSearchRequest, u as useSearchStore } from './search.store-Bof_HKxz.js';
4
4
  import { s as slotChangeListener, f as findSlotElements } from './index-OsoUj2Au.js';
5
5
  import { i as instance, d as defaultConfig } from './store-BJxQCbNV.js';
6
6
  import { i as initializeLocale, b as searchBarParts, s as searchModalFirstScreenParts } from './index-BtnjaTty.js';
7
- import { i as isOnResultsPage, b as buildTextSearchRedirectUrl } from './resultsPageUrl-niHq9WT6.js';
7
+ import { i as isOnResultsPage, b as buildTextSearchRedirectUrl, p as parseResultsPageParamNames } from './resultsPageUrl-DbOxfJSz.js';
8
8
 
9
9
  const TextSearchIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
10
10
  h("path", { d: "M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z", fill: "#525252" }),
@@ -144,16 +144,15 @@ const highlightMatch = (suggestion, query) => {
144
144
  const before = suggestion.slice(0, matchIndex);
145
145
  const match = suggestion.slice(matchIndex, matchIndex + query.length);
146
146
  const after = suggestion.slice(matchIndex + query.length);
147
- return [
148
- before,
149
- h("span", { class: "suggestion-highlight" }, match),
150
- after,
151
- ];
147
+ return [before, h("span", { class: "suggestion-highlight" }, match), after];
152
148
  };
153
149
  const renderSuggestions = (completions, query, activeIndex, onSelect) => {
154
150
  if (!completions.length || !query)
155
151
  return null;
156
- return (h("ul", { class: "suggestions-container", part: "suggestions-container", role: "listbox", id: "suggestions-listbox" }, completions.map((completion, index) => (h("li", { id: `suggestion-${index}`, class: { "suggestion-item": true, "suggestion-item--active": index === activeIndex }, part: "suggestion-item", role: "option", "aria-selected": index === activeIndex ? "true" : "false", onMouseDown: (e) => {
152
+ return (h("ul", { class: "suggestions-container", part: "suggestions-container", role: "listbox", id: "suggestions-listbox" }, completions.map((completion, index) => (h("li", { id: `suggestion-${index}`, class: {
153
+ "suggestion-item": true,
154
+ "suggestion-item--active": index === activeIndex,
155
+ }, part: "suggestion-item", role: "option", "aria-selected": index === activeIndex ? "true" : "false", onMouseDown: (e) => {
157
156
  e.preventDefault();
158
157
  onSelect(completion);
159
158
  } }, highlightMatch(completion.suggestion, query))))));
@@ -280,7 +279,7 @@ const VviinnTextSearch = class {
280
279
  !this.showInWidget &&
281
280
  !isOnResultsPage(this.resultsPageUrl);
282
281
  if (shouldRedirectToResultsPage) {
283
- const redirectUrl = buildTextSearchRedirectUrl(this.resultsPageUrl, queryToUse);
282
+ const redirectUrl = buildTextSearchRedirectUrl(this.resultsPageUrl, queryToUse, parseResultsPageParamNames(this.resultsPageParams).query);
284
283
  this.handleTextSearchRedirect(redirectUrl, "text-search", queryToUse);
285
284
  return;
286
285
  }
@@ -404,15 +403,22 @@ const VviinnTextSearch = class {
404
403
  }
405
404
  }
406
405
  render() {
407
- return (h(Host, { key: '40adcea597cc4fcad1536d339dfa2d796d707a19', exportparts: `${searchBarParts}, ${searchModalFirstScreenParts}` }, h("div", { key: 'de96469072c5878315a5ceaf65fb66e354cc9503', class: "text-search-container", part: "text-search-container" }, h("input", Object.assign({ key: 'f7839a9cf55e1eb69050c8ba754d99819f1ac0de', class: "text-search-input", part: "text-search-input", type: "text", placeholder: this.getPlaceholderText(), value: this.state.textSearchQuery || "", onInput: (event) => this.handleInputChange(event), onKeyDown: this.handleKeyDown, onBlur: this.autoSuggestShow ? this.hideSuggestions : undefined }, (this.autoSuggestShow && {
406
+ return (h(Host, { key: '34d054620af49581af6c5038ccb24fc983394d84', exportparts: `${searchBarParts}, ${searchModalFirstScreenParts}` }, h("div", { key: 'b63cd15fffa92ce9f2783107702b293c087350b3', class: "text-search-container", part: "text-search-container" }, h("input", Object.assign({ key: 'dcb2a15f10e3ce65c5e154472179943a8a2732ea', class: "text-search-input", part: "text-search-input", type: "text", placeholder: this.getPlaceholderText(), value: this.state.textSearchQuery || "", onInput: (event) => this.handleInputChange(event), onKeyDown: this.handleKeyDown, onBlur: this.autoSuggestShow ? this.hideSuggestions : undefined }, (this.autoSuggestShow && {
408
407
  role: "combobox",
409
408
  "aria-autocomplete": "list",
410
- "aria-expanded": this.autoSuggestCompletions.length > 0 && !!this.state.textSearchQuery ? "true" : "false",
409
+ "aria-expanded": this.autoSuggestCompletions.length > 0 &&
410
+ !!this.state.textSearchQuery
411
+ ? "true"
412
+ : "false",
411
413
  "aria-controls": "suggestions-listbox",
412
- "aria-activedescendant": this.activeSuggestionIndex >= 0 ? `suggestion-${this.activeSuggestionIndex}` : undefined,
413
- }))), this.mode === "extended" && (h("vviinn-vps-button", Object.assign({ key: '4db54fd5971aa42ddfe8d9726e2a30db76e52ea2', token: this.token, locale: this.locale, apiPath: this.apiPath, addStyle: false, showResultsInModal: false, resultsPageUrl: this.resultsPageUrl }, (this.exampleImageSource && { exampleImageSource: this.exampleImageSource }), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (h("slot", { key: '1d3b73de7d856483d70cafd2a5296bde3abb2455', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
414
- this.recognition && (h("button", { key: '536ba7e00844f2e9644c202cc732c4f27eae7ac1', class: "speech-button", part: "speech-button", "aria-label": instance.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, h(MicIcon, { key: '6545fda4f3c068fee2ea2fd0822576ec8652a2df' }), this.isShowRecording() && (h("span", { key: '5e15e2f6a91a1e6dac4d73a0f213600c5b1278b9', class: "recording-indicator" })))), h("button", { key: '4358eaa9c64781749eae01e941b10568c0468caa', class: "text-search-button", part: "text-search-button", onClick: () => this.handleTextSearch(), onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleTextSearch), disabled: this.state.searchStatus === "loading", "aria-label": instance.t("a11y.textSearchButton") }, this.isShowPreloader() ? (h("vviinn-preloader", null)) : (h("slot", { name: "vviinn-text-search-icon" }, h(TextSearchIcon, null))))), this.autoSuggestShow &&
415
- renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (h("p", { key: '643af912b5868cb018aa06742bd2b3566e235c3a', class: "text-search-tooltip", part: "text-search-tooltip" }, instance.t(this.tooltipText)))));
414
+ "aria-activedescendant": this.activeSuggestionIndex >= 0
415
+ ? `suggestion-${this.activeSuggestionIndex}`
416
+ : undefined,
417
+ }))), this.mode === "extended" && (h("vviinn-vps-button", Object.assign({ key: '0102857f6f6f800687f17ace2d90aee1d14cb3eb', token: this.token, locale: this.locale, apiPath: this.apiPath, addStyle: false, showResultsInModal: false, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams }, (this.exampleImageSource && {
418
+ exampleImageSource: this.exampleImageSource,
419
+ }), (this.cssUrl != null && { cssUrl: this.cssUrl }), (this.visualSearchMode && { mode: this.visualSearchMode }), { parentSlots: this.slots }))), this.mode === "basic" && (h("slot", { key: '2be782a7f2ec3ec21809c9075f495ca4ed3167e8', name: "vviinn-text-search-actions" })), (this.mode === "extended" || this.showInWidget) &&
420
+ this.recognition && (h("button", { key: '8711e6f5dd1412cef9d9e655f2f9b0e5bebd3272', class: "speech-button", part: "speech-button", "aria-label": instance.t("a11y.speechButton"), onClick: this.handleSpeech, onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleSpeech) }, h(MicIcon, { key: '66f8b01114ed126495208d6db96050d39a6924f9' }), this.isShowRecording() && (h("span", { key: 'afa850af213c41a356aa09dc712e91cf425a4f79', class: "recording-indicator" })))), h("button", { key: '8ce59d9f6214e8db235910359069c005066d4a83', class: "text-search-button", part: "text-search-button", onClick: () => this.handleTextSearch(), onKeyDown: (event) => this.handleButtonKeyDown(event, this.handleTextSearch), disabled: this.state.searchStatus === "loading", "aria-label": instance.t("a11y.textSearchButton") }, this.isShowPreloader() ? (h("vviinn-preloader", null)) : (h("slot", { name: "vviinn-text-search-icon" }, h(TextSearchIcon, null))))), this.autoSuggestShow &&
421
+ renderSuggestions(this.autoSuggestCompletions, this.state.textSearchQuery, this.activeSuggestionIndex, this.selectSuggestion), this.showTooltip && (h("p", { key: 'f82df73e88ba1dbf4c86bb1aa56c9a921ab76ee0', class: "text-search-tooltip", part: "text-search-tooltip" }, instance.t(this.tooltipText)))));
416
422
  }
417
423
  get el() { return getElement(this); }
418
424
  };
@@ -80,7 +80,7 @@ const VviinnVpsButton = class {
80
80
  this.showIntervalInputs = false;
81
81
  /** URL to external CSS file for custom styling */
82
82
  this.cssUrl = null;
83
- /** Show search results in modal or on page */
83
+ /** Render results in modal. Set false to redirect or show results on the page. */
84
84
  this.showResultsInModal = true;
85
85
  /** @internal */
86
86
  this.parentSlots = [];
@@ -152,8 +152,8 @@ const VviinnVpsButton = class {
152
152
  }
153
153
  render() {
154
154
  const { ariaLabel, buttonIcon } = this.getButtonConfig();
155
- return (h(Host, { key: 'd5ba32a4d606b64258b1390a5c7e6cac14a99cd6', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${searchModalFirstScreenParts}` }, h("vviinn-button", { key: 'd8ae79f09cb900f4867aa8eb80879b5aad3277d3', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, h("slot", { key: 'c494e2ca280c158ca518f767d4fc33f5849904a8' }, buttonIcon)), SlotSkeleton("search"), h("vviinn-vps-widget", { key: 'af6d84f3d65ef57da89a654192f460e8e019f576', mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, numberLocale: this.numberLocale, apiPath: this.apiPath, pricePrefix: this.pricePrefix, campaignId: this.campaignId, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton, buttonElementId: this.el.id, active: this.buttonPressed &&
156
- (this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, autoSuggestShow: this.autoSuggestShow, addToBasketShow: this.addToBasketShow, addPriceContainer: this.addPriceContainer, showIntervalInputs: this.showIntervalInputs, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this), oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, favoriteShow: this.favoriteShow, showResultsInModal: this.showResultsInModal, resultsPageUrl: this.resultsPageUrl, parentSlots: [...this.parentSlots, ...this.slots], cssUrl: this.cssUrl })));
155
+ return (h(Host, { key: 'b5274974a697ae4d65dc7204c5c35de228625b89', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${searchModalFirstScreenParts}` }, h("vviinn-button", { key: '7e7f103a1dacc33b385da58fa1e3d33c10369e09', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, h("slot", { key: 'e23e07b5789a62e7d3cadf407adf2b65a376947b' }, buttonIcon)), SlotSkeleton("search"), h("vviinn-vps-widget", { key: 'd092bd2fc87aaba40cc44a13d050cb309b0cd50c', mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, numberLocale: this.numberLocale, apiPath: this.apiPath, pricePrefix: this.pricePrefix, campaignId: this.campaignId, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton, buttonElementId: this.el.id, active: this.buttonPressed &&
156
+ (this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, autoSuggestShow: this.autoSuggestShow, addToBasketShow: this.addToBasketShow, addPriceContainer: this.addPriceContainer, showIntervalInputs: this.showIntervalInputs, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this), oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, favoriteShow: this.favoriteShow, showResultsInModal: this.showResultsInModal, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams, parentSlots: [...this.parentSlots, ...this.slots], cssUrl: this.cssUrl })));
157
157
  }
158
158
  get el() { return getElement(this); }
159
159
  static get watchers() { return {