vviinn-widgets 2.224.2 → 2.224.3

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 (40) hide show
  1. package/dist/cjs/{index-Gis6OpXe.js → index-DlHrlk74.js} +1 -1
  2. package/dist/cjs/{search.store-CtE3Jk2p.js → search.store-CO7LSZ3e.js} +14 -9
  3. package/dist/cjs/vviinn-button_6.cjs.entry.js +1 -1
  4. package/dist/cjs/vviinn-camera_12.cjs.entry.js +5 -5
  5. package/dist/cjs/vviinn-carousel_10.cjs.entry.js +2 -2
  6. package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +1 -1
  7. package/dist/cjs/vviinn-text-search.cjs.entry.js +1 -1
  8. package/dist/collection/Image/toFile.js +13 -8
  9. package/dist/collection/components/vviinn-camera/vviinn-camera.js +3 -3
  10. package/dist/esm/{index-Ct288jzK.js → index-Bl962PMi.js} +1 -1
  11. package/dist/esm/{search.store-ByZooyts.js → search.store-C8EQW2k5.js} +14 -9
  12. package/dist/esm/vviinn-button_6.entry.js +1 -1
  13. package/dist/esm/vviinn-camera_12.entry.js +5 -5
  14. package/dist/esm/vviinn-carousel_10.entry.js +2 -2
  15. package/dist/esm/vviinn-shop-the-look.entry.js +1 -1
  16. package/dist/esm/vviinn-text-search.entry.js +1 -1
  17. package/dist/types/Image/toFile.d.ts +1 -1
  18. package/dist/vviinn-widgets/{p-7fa5f86c.entry.js → p-0c18ef91.entry.js} +1 -1
  19. package/{www/build/p-e2f82bff.entry.js → dist/vviinn-widgets/p-136a262d.entry.js} +1 -1
  20. package/{www/build/p-a3b6bc3e.entry.js → dist/vviinn-widgets/p-4c20f06f.entry.js} +1 -1
  21. package/dist/vviinn-widgets/p-66dae8b2.entry.js +1 -0
  22. package/dist/vviinn-widgets/{p-fKKtvpU_.js → p-BZ0btFgY.js} +1 -1
  23. package/dist/vviinn-widgets/{p-CT9gILHL.js → p-BqP5a29D.js} +1 -1
  24. package/dist/vviinn-widgets/{p-6c240256.entry.js → p-fab45e12.entry.js} +1 -1
  25. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  26. package/package.json +1 -1
  27. package/www/build/{p-5ecd6e9e.js → p-04624ba4.js} +1 -1
  28. package/www/build/{p-7fa5f86c.entry.js → p-0c18ef91.entry.js} +1 -1
  29. package/{dist/vviinn-widgets/p-e2f82bff.entry.js → www/build/p-136a262d.entry.js} +1 -1
  30. package/{dist/vviinn-widgets/p-a3b6bc3e.entry.js → www/build/p-4c20f06f.entry.js} +1 -1
  31. package/www/build/p-66dae8b2.entry.js +1 -0
  32. package/www/build/{p-fKKtvpU_.js → p-BZ0btFgY.js} +1 -1
  33. package/www/build/{p-CT9gILHL.js → p-BqP5a29D.js} +1 -1
  34. package/www/build/{p-6c240256.entry.js → p-fab45e12.entry.js} +1 -1
  35. package/www/build/vviinn-widgets.esm.js +1 -1
  36. package/www/index.html +1 -1
  37. package/dist/collection/Image/upload.js +0 -10
  38. package/dist/types/Image/upload.d.ts +0 -4
  39. package/dist/vviinn-widgets/p-a7b8d639.entry.js +0 -1
  40. package/www/build/p-a7b8d639.entry.js +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-BU8FMTXn.js');
4
- var search_store = require('./search.store-CtE3Jk2p.js');
4
+ var search_store = require('./search.store-CO7LSZ3e.js');
5
5
  var store = require('./store-jPZ4ROqV.js');
6
6
 
7
7
  const PlusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
@@ -8094,17 +8094,22 @@ const imageFromFileTask = (f) => () => new Promise((resolve, reject) => {
8094
8094
  reader.readAsDataURL(f);
8095
8095
  });
8096
8096
 
8097
- const toFile = async (b64data) => {
8098
- const request = await fetch(b64data);
8099
- const blob = await request.blob();
8100
- return new File([blob], "image", {
8101
- type: blob.type,
8097
+ // Expects a data URL as produced by canvas.toDataURL() other formats decode with an empty mime type.
8098
+ const toFile = (b64data) => {
8099
+ var _a, _b;
8100
+ const [header, base64] = b64data.split(",");
8101
+ const mime = (_b = (_a = header.match(/data:(.*?);base64/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : "";
8102
+ const binary = atob(base64);
8103
+ const bytes = new Uint8Array(binary.length);
8104
+ for (let i = 0; i < binary.length; i++) {
8105
+ bytes[i] = binary.charCodeAt(i);
8106
+ }
8107
+ return new File([bytes], "image", {
8108
+ type: mime,
8102
8109
  lastModified: Date.now(),
8103
8110
  });
8104
8111
  };
8105
- const convertB64toFileTask = (b64data) => () => {
8106
- return new Promise(async (resolve, _) => resolve(toFile(b64data)));
8107
- };
8112
+ const convertB64toFileTask = (b64data) => () => Promise.resolve(toFile(b64data));
8108
8113
 
8109
8114
  var dist$2 = {};
8110
8115
 
@@ -8625,7 +8630,7 @@ const startSearch = (store) => {
8625
8630
  return () => latestSearch.get(store) !== sequence;
8626
8631
  };
8627
8632
 
8628
- const version = "2.224.2";
8633
+ const version = "2.224.3";
8629
8634
 
8630
8635
  const appStateGlobalDefaults = {
8631
8636
  excluded: null,
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-BU8FMTXn.js');
4
4
  var store = require('./store-jPZ4ROqV.js');
5
- var search_store = require('./search.store-CtE3Jk2p.js');
5
+ var search_store = require('./search.store-CO7LSZ3e.js');
6
6
  var index$1 = require('./index-CP1QUrJT.js');
7
7
  var SecondaryActionIcon = require('./SecondaryActionIcon-CuNEBTWD.js');
8
8
  var index$2 = require('./index-BF9aENF8.js');
@@ -2,9 +2,9 @@
2
2
 
3
3
  var index = require('./index-BU8FMTXn.js');
4
4
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
5
- var search_store = require('./search.store-CtE3Jk2p.js');
5
+ var search_store = require('./search.store-CO7LSZ3e.js');
6
6
  var index$2 = require('./index-CP1QUrJT.js');
7
- var index$1 = require('./index-Gis6OpXe.js');
7
+ var index$1 = require('./index-DlHrlk74.js');
8
8
  var store = require('./store-jPZ4ROqV.js');
9
9
  var cropperUtils = require('./cropperUtils-s4RL8x1I.js');
10
10
  var cssUrlHelper = require('./cssUrlHelper-B5A2BBm7.js');
@@ -176,7 +176,7 @@ const VviinnExampleImage = class {
176
176
  const ctx = canvas.getContext("2d");
177
177
  ctx.drawImage(video, dx, dy, cropDimension, cropDimension, 0, 0, canvas.width, canvas.height);
178
178
  const dataURI = canvas.toDataURL("image/jpeg");
179
- file = await search_store.toFile(dataURI);
179
+ file = search_store.toFile(dataURI);
180
180
  Rectangle._functionExports.pipe(await search_store.makeUploadFileRequest(this.storeName, this.token, this.apiPath)(file), Rectangle.EitherExports.match(() => {
181
181
  this.vviinnNoResult.emit(this.basicEventData);
182
182
  }, (response) => {
@@ -211,9 +211,9 @@ const VviinnExampleImage = class {
211
211
  };
212
212
  }
213
213
  render() {
214
- return (index.h(index.Host, { key: '8d38b46c42effd104d42cf207e3540e724c33bda', onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, index.h("video", { key: '8f1402f859e78f62c2a52c5aeb24e32277156618', id: "camera-preview", class: {
214
+ return (index.h(index.Host, { key: '86700ba180e1ae7d957e5fa14e1a261a2602a5a2', onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, index.h("video", { key: 'f4de85ab700fe1ba81812de608627e9c57686311', id: "camera-preview", class: {
215
215
  hidden: !this.videoInitialized || this.selected,
216
- }, autoplay: true, playsinline: true, muted: true }), index.h("img", { key: '8e3c97cefc87be19b9cedbb27ae42a83f3ea1553', src: this.exampleImageSource, alt: store.instance.t("a11y.cameraExampleImage"), width: this.width, height: this.height, class: { hidden: this.videoInitialized || this.selected } }), index.h("img", { key: '0b4e904612009c5c9a971049db3305b6af556813', id: "captured-image-placeholder", alt: store.instance.t("a11y.capturedImage"), class: { hidden: !this.selected } }), index.h("div", { key: '6c890bcdb8d4f9a0700644d797ffbf2a83e0286e', class: { container: true, hidden: !this.videoInitialized } }, index.h("div", { key: '15efdb714c09f4b089b6a6996766dd3d40ce92a6', class: "photo-frame-container" }, index.h("div", { key: '0d0ac5e5e72025923fad86272159781f384e84b0', id: "photo-frame" }, index.h(PhotoFrameCorner, { key: 'a66e2503b6e1bb8a59e09720b6fba0a3edd472a1', className: "photo-frame-corner top-left" }), index.h(PhotoFrameCorner, { key: 'ee2bd8d533bbb1d0853c75cc58b318d92dae99cd', className: "photo-frame-corner top-right" }), index.h(PhotoFrameCorner, { key: 'd557fbe6d06bfe2cb6667939150ad289289ba2a7', className: "photo-frame-corner bottom-left" }), index.h(PhotoFrameCorner, { key: '779195f468ff7546bb6a34b23f4ff4e546caf77a', className: "photo-frame-corner bottom-right" })), index.h("div", { key: '79de5a2d195eac365f1822d868646c978c01f1c6', class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, index.h("button", { key: '4b7172d3a4845917fcc517a7dc7be47779dce6de', "aria-label": store.instance.t("a11y.zoomOut"), onClick: () => this.onZoom("out") }, index.h(MinusIcon, { key: 'afd2782b0bf0c635698201aae081fe4d1dc90fba' })), index.h("button", { key: '25bc101b8797ba5816de5ed6becc07aeba47226d', "aria-label": store.instance.t("a11y.zoomIn"), onClick: () => this.onZoom("in") }, index.h(index$1.PlusIcon, { key: 'ab3c861c1b30f3f32550147e8e60c980fcfd8e1b' })))), index.h("div", { key: '91d05947eb6da549114c2a74e86bce7acccc4186', class: "photo-button-container" }, index.h("button", { key: 'a9c6d0a259516e03ea8d211b4ee369034e56a171', class: "photo-button", "aria-label": store.instance.t("a11y.takePicture"), onClick: () => this.selectImage() }, index.h(RoundCameraIcon, { key: '103e9967c7fc6ee839292424452c40557f030ad0' }))))));
216
+ }, autoplay: true, playsinline: true, muted: true }), index.h("img", { key: '22cc3ba84282941cb6a4d41364cb4a04f3b3b0f3', src: this.exampleImageSource, alt: store.instance.t("a11y.cameraExampleImage"), width: this.width, height: this.height, class: { hidden: this.videoInitialized || this.selected } }), index.h("img", { key: '799ecac4e9fe6006126fa0017b7bb51e2838fdf5', id: "captured-image-placeholder", alt: store.instance.t("a11y.capturedImage"), class: { hidden: !this.selected } }), index.h("div", { key: '2309b225a7b2c3d02e96f7477d395b1698b61877', class: { container: true, hidden: !this.videoInitialized } }, index.h("div", { key: 'e207a1517570cc676a4cb441a1acd60af2340a96', class: "photo-frame-container" }, index.h("div", { key: '7589da472a9e02456274de41640ae3c9b9de6fe8', id: "photo-frame" }, index.h(PhotoFrameCorner, { key: '140f0552a4d52c565c6fa690c404b9d4467ea8ee', className: "photo-frame-corner top-left" }), index.h(PhotoFrameCorner, { key: 'c3262b110cd7ecae4a7a45f750779e6857131d85', className: "photo-frame-corner top-right" }), index.h(PhotoFrameCorner, { key: '19ba8d3a4fcd78099d051fc3eb3ca35277388d4c', className: "photo-frame-corner bottom-left" }), index.h(PhotoFrameCorner, { key: '03988144b8abb8d65c976fde23f3d0b0e3ef8ea7', className: "photo-frame-corner bottom-right" })), index.h("div", { key: '68d87a529d40e7d654fd578059941f6caa0918ed', class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, index.h("button", { key: '37edae86c3402a1f2913e5cf3f08f0e93c793e2e', "aria-label": store.instance.t("a11y.zoomOut"), onClick: () => this.onZoom("out") }, index.h(MinusIcon, { key: '3b10f8ff52ce4da97ba224357f18fc0c9af2f4d1' })), index.h("button", { key: '916a7d7e66e8899b3e20b52309a6356b53dfec90', "aria-label": store.instance.t("a11y.zoomIn"), onClick: () => this.onZoom("in") }, index.h(index$1.PlusIcon, { key: '2d7ca2ae82636298c14067d0b8f6cc9be5f0af39' })))), index.h("div", { key: '7fd64daa8eeceb60ec14f39847a3d01a22a9347c', class: "photo-button-container" }, index.h("button", { key: 'e05aedeb1c6c80781afc89a5f81bb77d768e8e32', class: "photo-button", "aria-label": store.instance.t("a11y.takePicture"), onClick: () => this.selectImage() }, index.h(RoundCameraIcon, { key: '68df03db0496f1cfdaf1b10dbecf69b1053057f5' }))))));
217
217
  }
218
218
  get el() { return index.getElement(this); }
219
219
  static get watchers() { return {
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-BU8FMTXn.js');
4
- var search_store = require('./search.store-CtE3Jk2p.js');
4
+ var search_store = require('./search.store-CO7LSZ3e.js');
5
5
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
6
6
  var store = require('./store-jPZ4ROqV.js');
7
- var index$1 = require('./index-Gis6OpXe.js');
7
+ var index$1 = require('./index-DlHrlk74.js');
8
8
  var constants = require('./constants-BlwqMvns.js');
9
9
  var index$2 = require('./index-CP1QUrJT.js');
10
10
  var index$3 = require('./index-BF9aENF8.js');
@@ -4,7 +4,7 @@ var index = require('./index-BU8FMTXn.js');
4
4
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
5
5
  var cropperUtils = require('./cropperUtils-s4RL8x1I.js');
6
6
  var swiperElement = require('./swiper-element-DjtzojCR.js');
7
- var search_store = require('./search.store-CtE3Jk2p.js');
7
+ var search_store = require('./search.store-CO7LSZ3e.js');
8
8
  var SecondaryActionIcon = require('./SecondaryActionIcon-CuNEBTWD.js');
9
9
  var index$1 = require('./index-BF9aENF8.js');
10
10
  var store = require('./store-jPZ4ROqV.js');
@@ -2,7 +2,7 @@
2
2
 
3
3
  var index = require('./index-BU8FMTXn.js');
4
4
  var Rectangle = require('./Rectangle-7dF6_xf3.js');
5
- var search_store = require('./search.store-CtE3Jk2p.js');
5
+ var search_store = require('./search.store-CO7LSZ3e.js');
6
6
  var index$2 = require('./index-CP1QUrJT.js');
7
7
  var store = require('./store-jPZ4ROqV.js');
8
8
  var index$1 = require('./index-BF9aENF8.js');
@@ -1,11 +1,16 @@
1
- export const toFile = async (b64data) => {
2
- const request = await fetch(b64data);
3
- const blob = await request.blob();
4
- return new File([blob], "image", {
5
- type: blob.type,
1
+ // Expects a data URL as produced by canvas.toDataURL() other formats decode with an empty mime type.
2
+ export const toFile = (b64data) => {
3
+ var _a, _b;
4
+ const [header, base64] = b64data.split(",");
5
+ const mime = (_b = (_a = header.match(/data:(.*?);base64/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : "";
6
+ const binary = atob(base64);
7
+ const bytes = new Uint8Array(binary.length);
8
+ for (let i = 0; i < binary.length; i++) {
9
+ bytes[i] = binary.charCodeAt(i);
10
+ }
11
+ return new File([bytes], "image", {
12
+ type: mime,
6
13
  lastModified: Date.now(),
7
14
  });
8
15
  };
9
- export const convertB64toFileTask = (b64data) => () => {
10
- return new Promise(async (resolve, _) => resolve(toFile(b64data)));
11
- };
16
+ export const convertB64toFileTask = (b64data) => () => Promise.resolve(toFile(b64data));
@@ -100,7 +100,7 @@ export class VviinnExampleImage {
100
100
  const ctx = canvas.getContext("2d");
101
101
  ctx.drawImage(video, dx, dy, cropDimension, cropDimension, 0, 0, canvas.width, canvas.height);
102
102
  const dataURI = canvas.toDataURL("image/jpeg");
103
- file = await toFile(dataURI);
103
+ file = toFile(dataURI);
104
104
  pipe(await makeUploadFileRequest(this.storeName, this.token, this.apiPath)(file), E.match(() => {
105
105
  this.vviinnNoResult.emit(this.basicEventData);
106
106
  }, (response) => {
@@ -135,9 +135,9 @@ export class VviinnExampleImage {
135
135
  };
136
136
  }
137
137
  render() {
138
- return (h(Host, { key: '8d38b46c42effd104d42cf207e3540e724c33bda', onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, h("video", { key: '8f1402f859e78f62c2a52c5aeb24e32277156618', id: "camera-preview", class: {
138
+ return (h(Host, { key: '86700ba180e1ae7d957e5fa14e1a261a2602a5a2', onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, h("video", { key: 'f4de85ab700fe1ba81812de608627e9c57686311', id: "camera-preview", class: {
139
139
  hidden: !this.videoInitialized || this.selected,
140
- }, autoplay: true, playsinline: true, muted: true }), h("img", { key: '8e3c97cefc87be19b9cedbb27ae42a83f3ea1553', src: this.exampleImageSource, alt: i18next.t("a11y.cameraExampleImage"), width: this.width, height: this.height, class: { hidden: this.videoInitialized || this.selected } }), h("img", { key: '0b4e904612009c5c9a971049db3305b6af556813', id: "captured-image-placeholder", alt: i18next.t("a11y.capturedImage"), class: { hidden: !this.selected } }), h("div", { key: '6c890bcdb8d4f9a0700644d797ffbf2a83e0286e', class: { container: true, hidden: !this.videoInitialized } }, h("div", { key: '15efdb714c09f4b089b6a6996766dd3d40ce92a6', class: "photo-frame-container" }, h("div", { key: '0d0ac5e5e72025923fad86272159781f384e84b0', id: "photo-frame" }, h(PhotoFrameCorner, { key: 'a66e2503b6e1bb8a59e09720b6fba0a3edd472a1', className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { key: 'ee2bd8d533bbb1d0853c75cc58b318d92dae99cd', className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { key: 'd557fbe6d06bfe2cb6667939150ad289289ba2a7', className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { key: '779195f468ff7546bb6a34b23f4ff4e546caf77a', className: "photo-frame-corner bottom-right" })), h("div", { key: '79de5a2d195eac365f1822d868646c978c01f1c6', class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { key: '4b7172d3a4845917fcc517a7dc7be47779dce6de', "aria-label": i18next.t("a11y.zoomOut"), onClick: () => this.onZoom("out") }, h(MinusIcon, { key: 'afd2782b0bf0c635698201aae081fe4d1dc90fba' })), h("button", { key: '25bc101b8797ba5816de5ed6becc07aeba47226d', "aria-label": i18next.t("a11y.zoomIn"), onClick: () => this.onZoom("in") }, h(PlusIcon, { key: 'ab3c861c1b30f3f32550147e8e60c980fcfd8e1b' })))), h("div", { key: '91d05947eb6da549114c2a74e86bce7acccc4186', class: "photo-button-container" }, h("button", { key: 'a9c6d0a259516e03ea8d211b4ee369034e56a171', class: "photo-button", "aria-label": i18next.t("a11y.takePicture"), onClick: () => this.selectImage() }, h(RoundCameraIcon, { key: '103e9967c7fc6ee839292424452c40557f030ad0' }))))));
140
+ }, autoplay: true, playsinline: true, muted: true }), h("img", { key: '22cc3ba84282941cb6a4d41364cb4a04f3b3b0f3', src: this.exampleImageSource, alt: i18next.t("a11y.cameraExampleImage"), width: this.width, height: this.height, class: { hidden: this.videoInitialized || this.selected } }), h("img", { key: '799ecac4e9fe6006126fa0017b7bb51e2838fdf5', id: "captured-image-placeholder", alt: i18next.t("a11y.capturedImage"), class: { hidden: !this.selected } }), h("div", { key: '2309b225a7b2c3d02e96f7477d395b1698b61877', class: { container: true, hidden: !this.videoInitialized } }, h("div", { key: 'e207a1517570cc676a4cb441a1acd60af2340a96', class: "photo-frame-container" }, h("div", { key: '7589da472a9e02456274de41640ae3c9b9de6fe8', id: "photo-frame" }, h(PhotoFrameCorner, { key: '140f0552a4d52c565c6fa690c404b9d4467ea8ee', className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { key: 'c3262b110cd7ecae4a7a45f750779e6857131d85', className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { key: '19ba8d3a4fcd78099d051fc3eb3ca35277388d4c', className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { key: '03988144b8abb8d65c976fde23f3d0b0e3ef8ea7', className: "photo-frame-corner bottom-right" })), h("div", { key: '68d87a529d40e7d654fd578059941f6caa0918ed', class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { key: '37edae86c3402a1f2913e5cf3f08f0e93c793e2e', "aria-label": i18next.t("a11y.zoomOut"), onClick: () => this.onZoom("out") }, h(MinusIcon, { key: '3b10f8ff52ce4da97ba224357f18fc0c9af2f4d1' })), h("button", { key: '916a7d7e66e8899b3e20b52309a6356b53dfec90', "aria-label": i18next.t("a11y.zoomIn"), onClick: () => this.onZoom("in") }, h(PlusIcon, { key: '2d7ca2ae82636298c14067d0b8f6cc9be5f0af39' })))), h("div", { key: '7fd64daa8eeceb60ec14f39847a3d01a22a9347c', class: "photo-button-container" }, h("button", { key: 'e05aedeb1c6c80781afc89a5f81bb77d768e8e32', class: "photo-button", "aria-label": i18next.t("a11y.takePicture"), onClick: () => this.selectImage() }, h(RoundCameraIcon, { key: '68df03db0496f1cfdaf1b10dbecf69b1053057f5' }))))));
141
141
  }
142
142
  static get is() { return "vviinn-camera"; }
143
143
  static get encapsulation() { return "shadow"; }
@@ -1,5 +1,5 @@
1
1
  import { h } from './index-B89nCb_F.js';
2
- import { h as addIfNotEmpty, p as parseStringToExcluded, n as isValueMatch, o as isIntervalMatch, q as valueToString, r as extractFilterValue } from './search.store-ByZooyts.js';
2
+ import { h as addIfNotEmpty, p as parseStringToExcluded, n as isValueMatch, o as isIntervalMatch, q as valueToString, r as extractFilterValue } from './search.store-C8EQW2k5.js';
3
3
  import { i as instance } from './store-BJxQCbNV.js';
4
4
 
5
5
  const PlusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
@@ -8092,17 +8092,22 @@ const imageFromFileTask = (f) => () => new Promise((resolve, reject) => {
8092
8092
  reader.readAsDataURL(f);
8093
8093
  });
8094
8094
 
8095
- const toFile = async (b64data) => {
8096
- const request = await fetch(b64data);
8097
- const blob = await request.blob();
8098
- return new File([blob], "image", {
8099
- type: blob.type,
8095
+ // Expects a data URL as produced by canvas.toDataURL() other formats decode with an empty mime type.
8096
+ const toFile = (b64data) => {
8097
+ var _a, _b;
8098
+ const [header, base64] = b64data.split(",");
8099
+ const mime = (_b = (_a = header.match(/data:(.*?);base64/)) === null || _a === void 0 ? void 0 : _a[1]) !== null && _b !== void 0 ? _b : "";
8100
+ const binary = atob(base64);
8101
+ const bytes = new Uint8Array(binary.length);
8102
+ for (let i = 0; i < binary.length; i++) {
8103
+ bytes[i] = binary.charCodeAt(i);
8104
+ }
8105
+ return new File([bytes], "image", {
8106
+ type: mime,
8100
8107
  lastModified: Date.now(),
8101
8108
  });
8102
8109
  };
8103
- const convertB64toFileTask = (b64data) => () => {
8104
- return new Promise(async (resolve, _) => resolve(toFile(b64data)));
8105
- };
8110
+ const convertB64toFileTask = (b64data) => () => Promise.resolve(toFile(b64data));
8106
8111
 
8107
8112
  var dist$2 = {};
8108
8113
 
@@ -8623,7 +8628,7 @@ const startSearch = (store) => {
8623
8628
  return () => latestSearch.get(store) !== sequence;
8624
8629
  };
8625
8630
 
8626
- const version = "2.224.2";
8631
+ const version = "2.224.3";
8627
8632
 
8628
8633
  const appStateGlobalDefaults = {
8629
8634
  excluded: null,
@@ -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-B89nCb_F.js';
2
2
  import { i as instance } from './store-BJxQCbNV.js';
3
- import { k as getAcceptableFileFormatsForDisplay, f as campaignTypeNames, h as addIfNotEmpty, l as searchState, u as useSearchStore, v as version } from './search.store-ByZooyts.js';
3
+ import { k as getAcceptableFileFormatsForDisplay, f as campaignTypeNames, h as addIfNotEmpty, l as searchState, u as useSearchStore, v as version } from './search.store-C8EQW2k5.js';
4
4
  import { s as slotChangeListener, a as addEventListenersWithSignal } from './index-C1-PYhS4.js';
5
5
  import { S as SecondaryActionIcon } from './SecondaryActionIcon-D4f3aMUD.js';
6
6
  import { m as modalParts, c as carouselParts, p as productCardParts, r as recommendationsParts, i as initializeLocale } from './index-BCrstDkj.js';
@@ -1,8 +1,8 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-B89nCb_F.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 { t as toFile, c as makeUploadFileRequest, w as extractSelectedFilters, x as resetResultEvents, y as getImageSizes, v as version, f as campaignTypeNames, h as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, z as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, A as resetStore, j as makeTextSearchRequest, B as makeProductListingPageRequest, C as checkDeviceType, p as parseStringToExcluded } from './search.store-ByZooyts.js';
3
+ import { t as toFile, c as makeUploadFileRequest, w as extractSelectedFilters, x as resetResultEvents, y as getImageSizes, v as version, f as campaignTypeNames, h as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, z as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, A as resetStore, j as makeTextSearchRequest, B as makeProductListingPageRequest, C as checkDeviceType, p as parseStringToExcluded } from './search.store-C8EQW2k5.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-C1-PYhS4.js';
5
- import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, v as v4, c as createImageSearchEvent, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, a as createWidgetEvent, b as createFilterEvent, d as createAddToBasketEvent, e as createAddToWishlistEvent, f as createResultEventByType, h as createProductEventByType, i as getCustomLabels, t as triggerFilter, j as triggerRemoveIntervalFilter, k as announceToScreenReader, s as syncRequestFilters, l as isSubFilterActive, m as RenderFilterButton, n as getSelectedInterval, o as getIntervalLabel } from './index-Ct288jzK.js';
5
+ import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, v as v4, c as createImageSearchEvent, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, a as createWidgetEvent, b as createFilterEvent, d as createAddToBasketEvent, e as createAddToWishlistEvent, f as createResultEventByType, h as createProductEventByType, i as getCustomLabels, t as triggerFilter, j as triggerRemoveIntervalFilter, k as announceToScreenReader, s as syncRequestFilters, l as isSubFilterActive, m as RenderFilterButton, n as getSelectedInterval, o as getIntervalLabel } from './index-Bl962PMi.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, a as CROP_THUMBNAIL_FILL_COLOR, b as CROP_THUMBNAIL_SIZE, d as CROP_THUMBNAIL_QUALITY, S as SUPPORTED_ASPECT_RATIO, e 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-D0UEAAHl.js';
8
8
  import { r as renderExternalCSS } from './cssUrlHelper-Byz4s-MD.js';
@@ -174,7 +174,7 @@ const VviinnExampleImage = class {
174
174
  const ctx = canvas.getContext("2d");
175
175
  ctx.drawImage(video, dx, dy, cropDimension, cropDimension, 0, 0, canvas.width, canvas.height);
176
176
  const dataURI = canvas.toDataURL("image/jpeg");
177
- file = await toFile(dataURI);
177
+ file = toFile(dataURI);
178
178
  _functionExports.pipe(await makeUploadFileRequest(this.storeName, this.token, this.apiPath)(file), EitherExports.match(() => {
179
179
  this.vviinnNoResult.emit(this.basicEventData);
180
180
  }, (response) => {
@@ -209,9 +209,9 @@ const VviinnExampleImage = class {
209
209
  };
210
210
  }
211
211
  render() {
212
- return (h(Host, { key: '8d38b46c42effd104d42cf207e3540e724c33bda', onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, h("video", { key: '8f1402f859e78f62c2a52c5aeb24e32277156618', id: "camera-preview", class: {
212
+ return (h(Host, { key: '86700ba180e1ae7d957e5fa14e1a261a2602a5a2', onKeyUp: (ev) => this.handleKeyPress(ev), class: { "video-expanded": this.cameraButtonClicked } }, h("video", { key: 'f4de85ab700fe1ba81812de608627e9c57686311', id: "camera-preview", class: {
213
213
  hidden: !this.videoInitialized || this.selected,
214
- }, autoplay: true, playsinline: true, muted: true }), h("img", { key: '8e3c97cefc87be19b9cedbb27ae42a83f3ea1553', src: this.exampleImageSource, alt: instance.t("a11y.cameraExampleImage"), width: this.width, height: this.height, class: { hidden: this.videoInitialized || this.selected } }), h("img", { key: '0b4e904612009c5c9a971049db3305b6af556813', id: "captured-image-placeholder", alt: instance.t("a11y.capturedImage"), class: { hidden: !this.selected } }), h("div", { key: '6c890bcdb8d4f9a0700644d797ffbf2a83e0286e', class: { container: true, hidden: !this.videoInitialized } }, h("div", { key: '15efdb714c09f4b089b6a6996766dd3d40ce92a6', class: "photo-frame-container" }, h("div", { key: '0d0ac5e5e72025923fad86272159781f384e84b0', id: "photo-frame" }, h(PhotoFrameCorner, { key: 'a66e2503b6e1bb8a59e09720b6fba0a3edd472a1', className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { key: 'ee2bd8d533bbb1d0853c75cc58b318d92dae99cd', className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { key: 'd557fbe6d06bfe2cb6667939150ad289289ba2a7', className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { key: '779195f468ff7546bb6a34b23f4ff4e546caf77a', className: "photo-frame-corner bottom-right" })), h("div", { key: '79de5a2d195eac365f1822d868646c978c01f1c6', class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { key: '4b7172d3a4845917fcc517a7dc7be47779dce6de', "aria-label": instance.t("a11y.zoomOut"), onClick: () => this.onZoom("out") }, h(MinusIcon, { key: 'afd2782b0bf0c635698201aae081fe4d1dc90fba' })), h("button", { key: '25bc101b8797ba5816de5ed6becc07aeba47226d', "aria-label": instance.t("a11y.zoomIn"), onClick: () => this.onZoom("in") }, h(PlusIcon, { key: 'ab3c861c1b30f3f32550147e8e60c980fcfd8e1b' })))), h("div", { key: '91d05947eb6da549114c2a74e86bce7acccc4186', class: "photo-button-container" }, h("button", { key: 'a9c6d0a259516e03ea8d211b4ee369034e56a171', class: "photo-button", "aria-label": instance.t("a11y.takePicture"), onClick: () => this.selectImage() }, h(RoundCameraIcon, { key: '103e9967c7fc6ee839292424452c40557f030ad0' }))))));
214
+ }, autoplay: true, playsinline: true, muted: true }), h("img", { key: '22cc3ba84282941cb6a4d41364cb4a04f3b3b0f3', src: this.exampleImageSource, alt: instance.t("a11y.cameraExampleImage"), width: this.width, height: this.height, class: { hidden: this.videoInitialized || this.selected } }), h("img", { key: '799ecac4e9fe6006126fa0017b7bb51e2838fdf5', id: "captured-image-placeholder", alt: instance.t("a11y.capturedImage"), class: { hidden: !this.selected } }), h("div", { key: '2309b225a7b2c3d02e96f7477d395b1698b61877', class: { container: true, hidden: !this.videoInitialized } }, h("div", { key: 'e207a1517570cc676a4cb441a1acd60af2340a96', class: "photo-frame-container" }, h("div", { key: '7589da472a9e02456274de41640ae3c9b9de6fe8', id: "photo-frame" }, h(PhotoFrameCorner, { key: '140f0552a4d52c565c6fa690c404b9d4467ea8ee', className: "photo-frame-corner top-left" }), h(PhotoFrameCorner, { key: 'c3262b110cd7ecae4a7a45f750779e6857131d85', className: "photo-frame-corner top-right" }), h(PhotoFrameCorner, { key: '19ba8d3a4fcd78099d051fc3eb3ca35277388d4c', className: "photo-frame-corner bottom-left" }), h(PhotoFrameCorner, { key: '03988144b8abb8d65c976fde23f3d0b0e3ef8ea7', className: "photo-frame-corner bottom-right" })), h("div", { key: '68d87a529d40e7d654fd578059941f6caa0918ed', class: { "zoom-buttons": true, hidden: !this.zoomCapabilities } }, h("button", { key: '37edae86c3402a1f2913e5cf3f08f0e93c793e2e', "aria-label": instance.t("a11y.zoomOut"), onClick: () => this.onZoom("out") }, h(MinusIcon, { key: '3b10f8ff52ce4da97ba224357f18fc0c9af2f4d1' })), h("button", { key: '916a7d7e66e8899b3e20b52309a6356b53dfec90', "aria-label": instance.t("a11y.zoomIn"), onClick: () => this.onZoom("in") }, h(PlusIcon, { key: '2d7ca2ae82636298c14067d0b8f6cc9be5f0af39' })))), h("div", { key: '7fd64daa8eeceb60ec14f39847a3d01a22a9347c', class: "photo-button-container" }, h("button", { key: 'e05aedeb1c6c80781afc89a5f81bb77d768e8e32', class: "photo-button", "aria-label": instance.t("a11y.takePicture"), onClick: () => this.selectImage() }, h(RoundCameraIcon, { key: '68df03db0496f1cfdaf1b10dbecf69b1053057f5' }))))));
215
215
  }
216
216
  get el() { return getElement(this); }
217
217
  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-B89nCb_F.js';
2
- import { f as campaignTypeNames, h as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, D as isMobile, E as fromString, F as fold, v as version } from './search.store-ByZooyts.js';
2
+ import { f as campaignTypeNames, h as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, D as isMobile, E as fromString, F as fold, v as version } from './search.store-C8EQW2k5.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, p as CAROUSEL_IMAGE_WIDTH_CSS_VAR, q as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, r as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, i as getCustomLabels, u as SCROLL_POSITION_TOLERANCE, w as triggerResetFilters, t as triggerFilter, k as announceToScreenReader, o as getIntervalLabel, x as isPriceFilter, n as getSelectedInterval, l as isSubFilterActive, m as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, y as CUSTOM_LABELS_DELIMITER, v as v4, a as createWidgetEvent, f as createResultEventByType, d as createAddToBasketEvent, e as createAddToWishlistEvent, h as createProductEventByType, z as getRecommendationsBody } from './index-Ct288jzK.js';
5
+ import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, p as CAROUSEL_IMAGE_WIDTH_CSS_VAR, q as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, r as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, i as getCustomLabels, u as SCROLL_POSITION_TOLERANCE, w as triggerResetFilters, t as triggerFilter, k as announceToScreenReader, o as getIntervalLabel, x as isPriceFilter, n as getSelectedInterval, l as isSubFilterActive, m as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, y as CUSTOM_LABELS_DELIMITER, v as v4, a as createWidgetEvent, f as createResultEventByType, d as createAddToBasketEvent, e as createAddToWishlistEvent, h as createProductEventByType, z as getRecommendationsBody } from './index-Bl962PMi.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-C1-PYhS4.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-BCrstDkj.js';
@@ -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-D0UEAAHl.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-ByZooyts.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-C8EQW2k5.js';
6
6
  import { S as SecondaryActionIcon } from './SecondaryActionIcon-D4f3aMUD.js';
7
7
  import { i as initializeLocale, a as shopTheLookParts } from './index-BCrstDkj.js';
8
8
  import { d as defaultConfig } from './store-BJxQCbNV.js';
@@ -1,6 +1,6 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-B89nCb_F.js';
2
2
  import { _ as _functionExports, f as fold } from './Rectangle-dmgo4KMB.js';
3
- import { d as setTextSearchQuery, e as makeAutoSuggestRequest, v as version, f as campaignTypeNames, h as addIfNotEmpty, j as makeTextSearchRequest, u as useSearchStore } from './search.store-ByZooyts.js';
3
+ import { d as setTextSearchQuery, e as makeAutoSuggestRequest, v as version, f as campaignTypeNames, h as addIfNotEmpty, j as makeTextSearchRequest, u as useSearchStore } from './search.store-C8EQW2k5.js';
4
4
  import { s as slotChangeListener, f as findSlotElements } from './index-C1-PYhS4.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-BCrstDkj.js';
@@ -1,3 +1,3 @@
1
1
  import { Task } from "fp-ts/Task";
2
- export declare const toFile: (b64data: string) => Promise<File>;
2
+ export declare const toFile: (b64data: string) => File;
3
3
  export declare const convertB64toFileTask: (b64data: string) => Task<File>;
@@ -1 +1 @@
1
- import{h as e,r as t,H as o,c as i,g as r,F as a}from"./p-B89nCb_F.js";import{i as s}from"./p-BJxQCbNV.js";import{k as n,f as d,h as l,l as c,u as h,v as f}from"./p-fKKtvpU_.js";import{s as p,a as b}from"./p-Bq5Hj7Kz.js";import{S as g}from"./p-DvD16Fp_.js";import{m as u,c as m,p as x,r as v,i as y}from"./p-BadZr0hq.js";import{a as w,P as k,D as C,L as z}from"./p-rqiiCPBX.js";import{i as L}from"./p-CrEgr0jU.js";import{r as V}from"./p-BfTXDLup.js";const S=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z",fill:"currentColor"})),B=()=>e("svg",{width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 2C3.35 2 2 3.35 2 5v2H0V5c0-2.76 2.24-5 5-5h2v2H5Zm5 3c1.28 0 2.56.48 3.54 1.46h-.01a4.994 4.994 0 0 1 .64 6.29l3.05 3.05-1.41 1.41-3.05-3.05c-.84.55-1.8.83-2.76.83a4.98 4.98 0 0 1-3.54-1.46 5.003 5.003 0 0 1 0-7.07C7.44 5.49 8.72 5 10 5Zm-2.77 5c0 .74.29 1.44.81 1.96s1.22.81 1.96.81 1.44-.29 1.96-.81.81-1.22.81-1.96-.29-1.44-.81-1.96-1.22-.81-1.96-.81-1.44.29-1.96.81-.81 1.22-.81 1.96ZM2 15v-2H0v2c0 2.76 2.24 5 5 5h2v-2H5c-1.65 0-3-1.35-3-3ZM13 0h2c2.76 0 5 2.24 5 5v2h-2V5c0-1.65-1.35-3-3-3h-2V0Z",fill:"#161616"})),j=()=>e("svg",{width:"48",height:"48",slot:"icon",class:"icon",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M24 34C24.5667 34 25.0417 33.8083 25.425 33.425C25.8083 33.0417 26 32.5667 26 32C26 31.4333 25.8083 30.9583 25.425 30.575C25.0417 30.1917 24.5667 30 24 30C23.4333 30 22.9583 30.1917 22.575 30.575C22.1917 30.9583 22 31.4333 22 32C22 32.5667 22.1917 33.0417 22.575 33.425C22.9583 33.8083 23.4333 34 24 34ZM24 26C24.5667 26 25.0417 25.8083 25.425 25.425C25.8083 25.0417 26 24.5667 26 24V16C26 15.4333 25.8083 14.9583 25.425 14.575C25.0417 14.1917 24.5667 14 24 14C23.4333 14 22.9583 14.1917 22.575 14.575C22.1917 14.9583 22 15.4333 22 16V24C22 24.5667 22.1917 25.0417 22.575 25.425C22.9583 25.8083 23.4333 26 24 26ZM24 44C21.2333 44 18.6333 43.475 16.2 42.425C13.7667 41.375 11.65 39.95 9.85 38.15C8.05 36.35 6.625 34.2333 5.575 31.8C4.525 29.3667 4 26.7667 4 24C4 21.2333 4.525 18.6333 5.575 16.2C6.625 13.7667 8.05 11.65 9.85 9.85C11.65 8.05 13.7667 6.625 16.2 5.575C18.6333 4.525 21.2333 4 24 4C26.7667 4 29.3667 4.525 31.8 5.575C34.2333 6.625 36.35 8.05 38.15 9.85C39.95 11.65 41.375 13.7667 42.425 16.2C43.475 18.6333 44 21.2333 44 24C44 26.7667 43.475 29.3667 42.425 31.8C41.375 34.2333 39.95 36.35 38.15 38.15C36.35 39.95 34.2333 41.375 31.8 42.425C29.3667 43.475 26.7667 44 24 44Z",fill:"#161616"})),H=({width:t=24,height:o=24})=>e("svg",{width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M18 2H11C8.79 2 7 3.79 7 6V7H6C3.79 7 2 8.79 2 11V18C2 20.21 3.79 22 6 22H13C14.86 22 16.41 20.72 16.86 19H14.72C14.37 19.59 13.74 20 13 20H6C4.9 20 4 19.1 4 18V11C4 9.9 4.9 9 6 9H7V13C7 15.21 8.79 17 11 17H18C20.21 17 22 15.21 22 13V6C22 3.79 20.21 2 18 2ZM15 15H11C9.9 15 9 14.1 9 13V9H13C14.1 9 15 9.9 15 11V15ZM20 13C20 14.1 19.1 15 18 15H17V11C17 8.79 15.21 7 13 7H9V6C9 4.9 9.9 4 11 4H18C19.1 4 20 4.9 20 6V13Z",fill:"currentColor"})),T=({width:t=24,height:o=24})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z"})),A=class{constructor(e){t(this,e),this.addStyle=!0}render(){return e(o,{key:"8aa5c9b9a1443967360070b7c3ebc6bb6882e99d",exportparts:"button"},e("div",{key:"0fe27ed1210a83004a8d23918fdaf8b4cefea1dd",class:this.addStyle?"open-button":"raw-open-button",part:"button"},e("slot",{key:"be4ae4abc0ed26c59d45155375d6d5ca4be1b93f"},e(B,{key:"ebf649e150c4e3e291038ac6299fab988bb7b586"}))))}};A.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:block}:host div{border:none;cursor:pointer;color:inherit}.open-button{background-color:var(--button-bg-color-secondary);align-items:center;border-radius:50%;box-sizing:border-box;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:background-color 0.2s ease-in-out}.open-button:hover{background-color:var(--button-bg-color-secondary-hover)}.open-button:active{background-color:var(--button-bg-color-secondary-active)}.raw-open-button{display:contents;background:none}";const I={"empty-results":{i18nKey:"emptyResultsBlock"},"server-error":{i18nKey:"serverErrorBlock"},"wrong-aspect-ratio":{i18nKey:"wrongAspectRatioBlock"},"wrong-format":{i18nKey:"wrongFormatBlock"},"heic-not-supported":{i18nKey:"heicNotSupportedBlock"}},M=class{constructor(e){t(this,e),this.hasBackground=!0}getErrorContent(){if(!this.errorType)return null;const e=I[this.errorType],t="wrong-format"===this.errorType?{formats:n()}:void 0,o=`${e.i18nKey}.text`,i=`${e.i18nKey}.button`;return{title:s.t(`${e.i18nKey}.title`),text:s.exists(o)?s.t(o,t):null,buttonText:this.hasButton()?s.t(i):null}}hasButton(){return!!this.errorType&&(!!s.exists(`${I[this.errorType].i18nKey}.button`)&&!!this.handler)}render(){const t=this.getErrorContent(),i={"error-content":!0,"add-background":this.hasBackground},r=this.errorType?[e(j,null),e("h4",null,null==t?void 0:t.title),(null==t?void 0:t.text)&&e("span",null,t.text),(null==t?void 0:t.buttonText)&&e("button",{onClick:this.handler},t.buttonText)]:[e("slot",{name:"icon"}),e("slot",{name:"title"}),e("slot",{name:"text"}),e("slot",{name:"action"})];return e(o,{key:"9fd42173973878d8d2229b800dc912a74d78b343"},e("div",{key:"f285cdf4bad4dc393cfb798639753fdd3a9da5e7",class:i},r))}};M.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:block;width:100%;font-family:var(--font-family, var(--font-family-base))}:host(.add-background){background:var(--surface-bg-color-01)}:host(.add-top-margin){margin-top:var(--spacing-400)}.error-content{display:grid;grid-gap:var(--spacing-150);text-align:center;justify-items:center;width:100%;max-width:356px;padding:var(--spacing-200);border-radius:var(--border-radius-200);box-sizing:border-box;margin:0 auto}.error-content.add-background{background:var(--surface-bg-color-01)}svg,::slotted(svg){display:grid;align-self:center}h4,::slotted(h4){margin:unset;font-weight:var(--font-weight-600);font-size:var(--font-size-headline);line-height:var(--line-height-headline)}span,::slotted(span){font-size:14px;line-height:20px}button,::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;font-size:var(--font-size-label);font-weight:var(--font-weight-500);background:var(--color-primary, var(--button-bg-color-primary));border-radius:var(--border-radius-100);padding:var(--spacing-100);font-size:var(--font-size-body);color:var(--color-text-inverse);font-family:var(--font-family, var(--font-family-base))}button:hover,::slotted(button:hover){background:var(--button-bg-color-primary-hover)}";const E=class{constructor(e){t(this,e),this.vviinnWidgetClose=i(this,"vviinnWidgetClose"),this.active=!1,this.hideBackButton=!1,this.slider=!1,this.handleEscapeKey=e=>{"Escape"===e.key&&this.active&&(e.preventDefault(),this.close())},this.handleCloseButtonKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.close())},this.handleAnimationEnd=e=>{"fade-in"===e.animationName&&(this.slider=!0)}}handleActiveChange(e){e?document.addEventListener("keydown",this.handleEscapeKey):document.removeEventListener("keydown",this.handleEscapeKey)}componentWillLoad(){p(this,this.el)}disconnectedCallback(){document.removeEventListener("keydown",this.handleEscapeKey)}resetTopScroll(){const e=this.el.shadowRoot.querySelector(".body");null==e||e.scroll({top:0})}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit(Object.assign({campaignTypeId:"VPS",campaignTypeName:d.VPS,widgetVersion:this.widgetVersion},l("widgetId",this.buttonElementId)))}),this.slider?w:0)}render(){return e(o,{key:"a9ddbc40121ee0f9e747460ba826f910376960f1",exportparts:u,class:{closed:!this.active,"first-screen":this.isFirstScreen},onAnimationEnd:this.handleAnimationEnd,role:"dialog","aria-modal":this.active?"true":"false","aria-label":s.t("imageSearchModalTitle"),inert:!this.active||void 0},e("div",{key:"27a1c2d17b975d1bff0c04392b03f850cb1f8cf0",class:"head"},!this.hideBackButton&&e("button",{key:"02d89560819b3b1f19c75569531d670efedf8e54",part:"secondary-action",onClick:()=>{this.resetState(),this.resetTopScroll()},"aria-label":s.t("a11y.backButton")},e(g,{key:"d61a2d35f90c4f64209839c7c738b8afc78131b0"})),e("div",{key:"59530e27b5283104f0296122551752de0456c999",class:"title",part:"results-title"},(t=c.image)?e("img",{width:"28",height:"28",src:t.src,class:"title-image",alt:s.t("a11y.uploadedImage")}):null,e("slot",{key:"81b817f993da5fb1ebb383b19a6c49f5fcb652b3",name:"vviinn-image-search-modal-title"},s.t("imageSearchModalTitle"))),e("button",{key:"7b8b0b319a4d173bd1f6cc3bb9642091e1d25920",onClick:()=>this.close(),onKeyDown:this.handleCloseButtonKeyDown,class:"close-button",part:"close-button","aria-label":s.t("a11y.closeButton")},e("svg",{key:"d2399b4c6cb68169b5fa2c3785fbf4d5417e3d1f",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},e("path",{key:"cfb7d199d0bb7f6d366a246a63e43c22ff1fe19b",d:"M12 13.3892L6.91958 18.4696C6.72248 18.6667 6.49095 18.7653 6.225 18.7653C5.95905 18.7653 5.72753 18.6667 5.53043 18.4696C5.33333 18.2725 5.23478 18.041 5.23478 17.775C5.23478 17.5091 5.33333 17.2776 5.53043 17.0805L10.6109 12L5.53043 6.9196C5.33333 6.7225 5.23478 6.49098 5.23478 6.22503C5.23478 5.95908 5.33333 5.72755 5.53043 5.53045C5.72753 5.33335 5.95905 5.2348 6.225 5.2348C6.49095 5.2348 6.72248 5.33335 6.91958 5.53045L12 10.6109L17.0804 5.53045C17.2775 5.33335 17.5091 5.2348 17.775 5.2348C18.041 5.2348 18.2725 5.33335 18.4696 5.53045C18.6667 5.72755 18.7652 5.95908 18.7652 6.22503C18.7652 6.49098 18.6667 6.7225 18.4696 6.9196L13.3892 12L18.4696 17.0805C18.6667 17.2776 18.7652 17.5091 18.7652 17.775C18.7652 18.041 18.6667 18.2725 18.4696 18.4696C18.2725 18.6667 18.041 18.7653 17.775 18.7653C17.5091 18.7653 17.2775 18.6667 17.0804 18.4696L12 13.3892Z",fill:"currentColor"})))),e("div",{key:"e4649662e7054a5b77ba9e1d72e619ef71cb259d",class:"body"},e("slot",{key:"6b177965d3c98596dfe8e29efc0d6be158eb5d09"})));var t}get el(){return r(this)}static get watchers(){return{active:["handleActiveChange"]}}};E.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{background:white;border-radius:var(--modal-border-radius, var(--border-radius-300));box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{height:64px;font-family:var(--font-family, var(--font-family-base));position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:var(--font-weight-600);font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:slide-up;animation-duration:var(\n --search-modal-animation-duration-mobile,\n var(--search-modal-animation-duration-mobile-default)\n );animation-fill-mode:forwards;animation-timing-function:ease-out;border-radius:var(--modal-border-radius, var(--border-radius-300))\n var(--modal-border-radius, var(--border-radius-300)) 0 0;height:calc(100vh - 64px);width:100vw;max-width:100vw}:host(.closed){animation-name:slide-down;animation-duration:var(\n --search-modal-animation-duration-mobile,\n var(--search-modal-animation-duration-mobile-default)\n );animation-fill-mode:forwards;animation-timing-function:ease-in}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:160px}.title{color:#161616;display:flex;align-items:center;font-weight:500;font-size:16px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;color:#6f6f6f;padding:0}button:hover{color:#000}:host(.first-screen) button,:host(.first-screen) button:hover{color:white}}@keyframes slide-up{from{transform:translateY(calc(100% - 64px))}to{transform:translateY(-64px)}}@keyframes slide-down{from{transform:translateY(-64px)}to{transform:translateY(100%)}}";const R=class{constructor(e){t(this,e),this.active=!1,this.isClosing=!1,this.handleAnimationEnd=e=>{var t;"fade-out"===e.animationName&&this.isClosing&&(this.isClosing=!1,null===(t=this.dialogRef)||void 0===t||t.close())}}handleActiveChange(e){requestAnimationFrame((()=>{this.dialogRef&&(e&&!this.dialogRef.open?(this.isClosing=!1,this.dialogRef.classList.remove("closing"),this.dialogRef.showModal()):e||!this.dialogRef.open||this.isClosing||(this.isClosing=!0,this.dialogRef.classList.add("closing")))}))}componentDidLoad(){this.active&&this.dialogRef&&this.dialogRef.showModal()}render(){return e("dialog",{key:"a35c2023604b1de5f6c38869832a1bc82ada47d3",ref:e=>this.dialogRef=e,onAnimationEnd:this.handleAnimationEnd},e("slot",{key:"f48f9137827b0cbdac4022f1be0a33330f278552"}))}static get watchers(){return{active:["handleActiveChange"]}}};R.style="dialog{border:none;padding:0;margin:0;max-width:100vw;max-height:100vh;width:100vw;height:100vh;background:transparent;overflow:hidden;cursor:default}dialog:not([open]){display:none}dialog[open]{display:grid;align-items:center;justify-items:center;animation:fade-in\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}dialog[open]::backdrop{background:rgba(0, 0, 0, 0.5);animation:fade-in\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}@media (max-width: 768px){dialog[open]{align-items:end;padding-top:64px}}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}@keyframes fade-out{from{opacity:1}to{opacity:0.1}}dialog.closing{animation:fade-out\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}dialog.closing::backdrop{animation:fade-out\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}";const F=class{constructor(e){t(this,e),this.position="bottom",this.widgetScrollbar=!1,this.mode="continuity",this.campaigns="",this.imageWidth=k,this.showMultipleImages=!1,this.addToBasketShow=!1,this.addPriceContainer=!1,this.showFilters=!1,this.setItemsAmount=4,this.favoriteShow=!1,this.useCarousel=!0,this.showInWidget=!1,this.imageResolutionWidth=C,this.showInCustomContainer=!1,this.showInModal=!1,this.isAppended=!1,this.sidebarState="idle",this.showLoadingClass=!1,this.recommendationsLoading=!1,this.hidden=!1,this.setRecommendationsLoading=e=>{this.recommendationsLoading=e},this.isSourceImageValid=()=>{var e;return!!(null===(e=this.sourceProduct)||void 0===e?void 0:e.image)}}updatingAllCardsStarted(){const{height:e}=this.getSidebarRectangle(),t=this.getAsideElement();t.style.height!==`${e}px`&&(t.style.height=`${e}px`)}updatingAllCardsFinished(){const e=this.getAsideElement();"auto"!==e.style.height&&(e.style.height="auto")}bodyClickListener(e){const t=this.getSidebarRectangle();t&&this.showInModal&&!L(e,t)&&(this.sidebarState="closed")}sourceProductReceived(e){this.sourceProduct=e.detail}handleEscape(e){"Escape"!==e.key||"open"!==this.sidebarState||this.isAppended||(this.sidebarState="closed")}handleLoadingChange(e){e?(this.showLoadingClass=!0,clearTimeout(this.loadingClassTimeout)):this.loadingClassTimeout=setTimeout((()=>{this.showLoadingClass=!1}),z)}handleSidebarStateChange(e,t){"open"===e&&"open"!==t?setTimeout((()=>{const e=this.el.shadowRoot.querySelector(".close-sidebar");null==e||e.focus()}),0):"closed"===e&&"open"===t&&this.triggerElement&&this.triggerElement.focus()}getClassMap(){return{[this.position]:!0,[this.sidebarState]:!0,"no-carousel":!this.useCarousel,"no-fixed":this.showInCustomContainer,appended:this.isAppended,loading:this.showLoadingClass}}getAsideElement(){return this.el.shadowRoot.querySelector(".sidebar")}getSidebarRectangle(){var e;return null===(e=this.getAsideElement())||void 0===e?void 0:e.getBoundingClientRect()}componentDidLoad(){const e=this.el.shadowRoot.querySelector("vviinn-vpr-widget");Array.from(this.buttonChildren).forEach((t=>{const o=t.cloneNode(!0);t.hasAttribute("slot")&&e.appendChild(o)}))}disconnectedCallback(){clearTimeout(this.loadingClassTimeout)}render(){var t;return e(o,{key:"1d8e4cd403128aab03e0944fc2e4a5b0233872d0",class:this.getClassMap(),style:{display:this.hidden?"none":void 0},exportparts:`body, close-sidebar, ${m}, ${x}, ${v}`},e("div",{key:"b930c6fd2eb2af705b15fc6a06e87f674a7b4f8b",class:"sidebar",part:"body",onAnimationEnd:e=>this.handleAnimationEnd(e),role:this.showInModal?"dialog":"region","aria-modal":this.showInModal?"true":void 0,"aria-label":s.t("a11y.recommendations")},e("div",{key:"dd428f49ceb3a3b3ef6fa81419de0575df1323ec",class:{"sidebar-header":!0,"contains-source-img":this.isSourceImageValid()},part:"sidebar-header"},"set"!==this.mode&&e(a,{key:"21fafcf398cf1f3edb25cbeffdc80ecc3edc4926"},this.renderSourceImage(),0!==(null===(t=this.sidebarTitle)||void 0===t?void 0:t.length)&&e("span",{key:"1a35ffde2d9360bc50399919bb210f38df6bd906",class:"title",part:"recommendations-title"},this.sidebarTitle||s.t("discoveryWidgetTitle")),!!this.sidebarSubtitle&&e("span",{key:"a97989a713840aabcf5e54ca2b7867a21bc3ddb4",class:"subtitle",part:"recommendations-subtitle"},this.sidebarSubtitle)),e("button",{key:"c41bd72d0344559e9536c62981ffd3e9a123253c",class:"close-sidebar",onClick:()=>{this.sidebarState="closed"},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.sidebarState="closed")},part:"close-sidebar","aria-label":s.t("a11y.closeButton")},e(S,{key:"aaaee4b427d589ba8daacd323b3d3f249f1ac31c"}))),e("div",{key:"0b8861dffd567eb124e5bce8fc813f74227cdcb9",class:"sidebar-content",part:"sidebar-content"},e("vviinn-vpr-widget",{key:"bec924b0073e25b2f57ab3d05c532facd542b0a5",token:this.token,currencySign:this.currencySign,pricePrefix:this.pricePrefix,apiPath:this.apiPath,locale:this.locale,numberLocale:this.numberLocale,productId:this.productId,exportparts:`${m}, ${x}, ${v}`,imageWidth:this.imageWidth,showMultipleImages:this.showMultipleImages,setItemsAmount:this.setItemsAmount,blockTitle:"set"!==this.mode?"":this.sidebarTitle,blockSubtitle:"set"===this.mode?this.sidebarSubtitle:void 0,mode:this.mode,"campaign-type":this.campaignType,useCarousel:this.useCarousel,onVviinnRecommendationsLoaded:()=>{this.hidden=!1,this.sidebarState="open"},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:"closed"===this.sidebarState,opened:"open"===this.sidebarState,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}))))}renderSourceImage(){var t,o,i,r;const a=(null===(o=null===(t=this.sourceProduct)||void 0===t?void 0:t.image)||void 0===o?void 0:o.thumbnail)||(null===(r=null===(i=this.sourceProduct)||void 0===i?void 0:i.image)||void 0===r?void 0:r.original)||null;return a?e("img",{class:"source-image",part:"source-image",src:a,alt:s.t("a11y.sourceProductImage")}):null}handleAnimationEnd({animationName:e}){e.includes("slideOut")&&(this.hidden=!0)}get el(){return r(this)}static get watchers(){return{recommendationsLoading:["handleLoadingChange"],sidebarState:["handleSidebarStateChange"]}}};F.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:flex;box-sizing:border-box;position:fixed;z-index:9999;height:100vh;left:0;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.bottom){flex-direction:column;justify-content:flex-end}:host(.no-fixed){position:unset;display:block;width:100%;height:auto}:host(.no-fixed.no-carousel.appended.loading){min-height:calc((var(--product-card-calculated-height) * 3) + 48px)}:host(.right){flex-direction:row;justify-content:flex-end}:host [slot]{visibility:hidden;position:absolute}.sidebar-header{position:relative;text-align:center;padding:var(--spacing-300);padding-top:0px}.sidebar-header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;padding:6px;border:1px solid var(--color-border-02);-o-object-fit:contain;object-fit:contain}:host(.right) .sidebar-header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}.sidebar-content{padding:0 var(--spacing-300)}:host(.right) .sidebar-content{overflow:auto}.sidebar{background:white;box-sizing:border-box;padding-top:var(--spacing-300);display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.no-fixed) .sidebar{transform:unset !important}:host(.bottom.closed) .sidebar{animation-name:slideOutFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.open){transition:background 0.3s ease-in-out;background:rgba(0, 0, 0, 0.2)}:host(.bottom.open) .sidebar{animation-name:slideInFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{animation-name:slideOutFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.open) .sidebar{animation-name:slideInFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-results){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:var(--spacing-300)}:host(.right) vviinn-vpr-widget{overflow:auto}.title{font-style:normal;font-weight:var(--font-weight-600);font-size:var(--font-size-title);font-family:var(--font-family, var(--font-family-base));line-height:40px;text-align:center;color:#000000}.subtitle{font-size:var(--font-size-body);font-family:var(--font-family, var(--font-family-base));text-align:center}.close-sidebar{position:absolute;background:transparent;border:none;cursor:pointer;margin:0;top:0;color:var(--color-icon-secondary);transition:color 0.1s ease-in-out;padding:var(--spacing-100);right:var(--spacing-200)}.close-sidebar:hover{color:var(--color-icon-primary)}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";const Z=class{constructor(e){t(this,e),this.vviinnWidgetLoad=i(this,"vviinnWidgetLoad"),this.vviinnWidgetOpen=i(this,"vviinnWidgetOpen"),this.vviinnWidgetClose=i(this,"vviinnWidgetClose"),this.vviinnProductLoad=i(this,"vviinnProductLoad"),this.vviinnProductClick=i(this,"vviinnProductClick"),this.vviinnProductView=i(this,"vviinnProductView"),this.vviinnResultLoad=i(this,"vviinnResultLoad"),this.vviinnResultView=i(this,"vviinnResultView"),this.vviinnNoResult=i(this,"vviinnNoResult"),this.vviinnAddToBasket=i(this,"vviinnAddToBasket"),this.vviinnVprButtonActivated=i(this,"vviinnVprButtonActivated"),this.mode="continuity",this.campaigns="",this.excluded="",this.campaignType="set"===this.mode?"VCS":"VPR",this.color="",this.imageWidth=k,this.imageResolutionWidth=C,this.showMultipleImages=!1,this.setItemsAmount=4,this.cssUrl=null,this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.productDetailsNewTab=!1,this.productDetailsRedirect=!0,this.addToBasketShow=!1,this.showFilters=!1,this.addPriceContainer=!1,this.oneClickDiscoveryMode="modal",this.setModeDiscounts="set"===this.mode?"5, 10, 15":"",this.updateButtonLocation="topAndItem",this.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.favoriteShow=!1,this.isStandalone=!0,this.showInWidget=!1,this.sidebar=null,this.removeSidebarFromDOM=()=>{var e;this.sidebar&&((null===(e=this.targetAppendSidebarTo)||void 0===e?void 0:e.contains(this.sidebar))?this.targetAppendSidebarTo.removeChild(this.sidebar):document.body.contains(this.sidebar)&&document.body.removeChild(this.sidebar),this.sidebar=null)},this.sidebarCloseListener=(e=!1)=>{this.sidebar&&(e?this.removeSidebarFromDOM():(this.sidebar.sidebarState="closed",setTimeout((()=>this.removeSidebarFromDOM()),w)))},this.handleButtonClick=()=>{this.vviinnVprButtonActivated.emit(),this.appendSidebarToId&&!this.targetAppendSidebarTo?setTimeout((()=>{this.handleClick()}),250):this.handleClick()},this.handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleButtonClick())}}connectedCallback(){this.iconSideSize=this.isStandalone?24:14;const{onChange:e}=h(this.showInWidget);this.disposeStoreListener=e("searchStatus",(e=>{"loading"===e&&this.sidebarCloseListener()}))}async componentWillLoad(){await y(this.locale),this.appendSidebarToElement?this.targetAppendSidebarTo=this.appendSidebarToElement:this.appendSidebarToId&&(this.targetAppendSidebarTo=document.getElementById(this.appendSidebarToId))}appendSidebarToElementWatcher(){this.appendSidebarToElement&&(this.targetAppendSidebarTo=this.appendSidebarToElement)}getAriaLabel(){try{return s.t("a11y.findSimilarProducts")||"Find similar products"}catch(e){return"Find similar products"}}render(){return e(o,{key:"6edbdcb0f7dc456060d8a87cab4d347fca170165",role:"button",tabindex:"0","aria-label":this.getAriaLabel(),onClick:this.handleButtonClick,onKeyDown:this.handleKeyDown},V(this.cssUrl),e("vviinn-button",{key:"3dbb30111e60d51feb77a2ac9cbeb669f11dd620",addStyle:this.addStyle,part:"vviinn-button"},e("slot",{key:"3dee5fa42088fb238db95b62b7a97aa6cff56b93"},e("VCS"===this.campaignType?T:H,{width:this.iconSideSize,height:this.iconSideSize}))))}handleClick(){const e=document.createElement("vviinn-recommendations-sidebar");e.token=this.token,e.locale=this.locale,e.numberLocale=this.numberLocale,e.currencySign=this.currencySign,e.pricePrefix=this.pricePrefix,e.apiPath=this.apiPath,e.sidebarTitle=this.sidebarTitle,e.sidebarSubtitle=this.sidebarSubtitle,e.productId=this.productId,e.position=this.position,e.widgetScrollbar=this.modalScrollbar,e.campaigns=this.campaigns,e.campaignType=this.campaignType,e.color=this.color,e.imageWidth=this.imageWidth,e.showMultipleImages=this.showMultipleImages,e.buttonElementId=this.el.id,e.noResultText=this.noResultText,e.noResultShow=this.noResultShow,e.gridArrowsDynamic=this.gridArrowsDynamic,e.productDetailsNewTab=this.productDetailsNewTab,e.productDetailsRedirect=this.productDetailsRedirect,e.widgetVersion=f,e.showingInButton=!0,e.excluded=this.excluded,e.addToBasketShow=this.addToBasketShow,e.buttonChildren=this.el.children,e.showFilters=this.showFilters,e.cssUrl=this.cssUrl,e.setItemsAmount=this.setItemsAmount,e.setModeDiscounts=this.setModeDiscounts,e.updateButtonLocation=this.updateButtonLocation,e.addPriceContainer=this.addPriceContainer,e.favoriteShow=this.favoriteShow,e.showInModal="modal"===this.oneClickDiscoveryMode,e.isAppended=!!this.targetAppendSidebarTo||!!this.appendSidebarToElement,e.showInWidget=this.showInWidget,e.uiSessionId=this.uiSessionId,e.triggerElement=this.el,this.targetAppendSidebarTo?(e.mode="grid",e.useCarousel="append-slider"===this.oneClickDiscoveryMode):(e.mode="right"===this.position?"grid":this.mode,e.useCarousel="bottom"===this.position),this.sidebar=e,this.eventAbortController=new AbortController;const{signal:t}=this.eventAbortController;if(b(document,[["vviinnWidgetClose",()=>this.sidebarCloseListener(!1)],["vviinnStorybookStoryChanged",()=>this.sidebarCloseListener(!0)]],t),this.targetAppendSidebarTo)return this.sidebar.showInCustomContainer=!0,this.targetAppendSidebarTo.innerHTML="",void this.targetAppendSidebarTo.append(this.sidebar);document.body.append(this.sidebar)}disconnectedCallback(){var e,t;null===(e=this.eventAbortController)||void 0===e||e.abort(),null===(t=this.disposeStoreListener)||void 0===t||t.call(this)}get el(){return r(this)}static get watchers(){return{appendSidebarToElement:["appendSidebarToElementWatcher"]}}};Z.style=":host{display:inline-block}";export{A as vviinn_button,M as vviinn_error,E as vviinn_modal,R as vviinn_overlay,F as vviinn_recommendations_sidebar,Z as vviinn_vpr_button}
1
+ import{h as e,r as t,H as o,c as i,g as r,F as a}from"./p-B89nCb_F.js";import{i as s}from"./p-BJxQCbNV.js";import{k as n,f as d,h as l,l as c,u as h,v as f}from"./p-BZ0btFgY.js";import{s as p,a as b}from"./p-Bq5Hj7Kz.js";import{S as g}from"./p-DvD16Fp_.js";import{m as u,c as m,p as x,r as v,i as y}from"./p-BadZr0hq.js";import{a as w,P as k,D as C,L as z}from"./p-rqiiCPBX.js";import{i as L}from"./p-CrEgr0jU.js";import{r as V}from"./p-BfTXDLup.js";const S=()=>e("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z",fill:"currentColor"})),B=()=>e("svg",{width:"20",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5 2C3.35 2 2 3.35 2 5v2H0V5c0-2.76 2.24-5 5-5h2v2H5Zm5 3c1.28 0 2.56.48 3.54 1.46h-.01a4.994 4.994 0 0 1 .64 6.29l3.05 3.05-1.41 1.41-3.05-3.05c-.84.55-1.8.83-2.76.83a4.98 4.98 0 0 1-3.54-1.46 5.003 5.003 0 0 1 0-7.07C7.44 5.49 8.72 5 10 5Zm-2.77 5c0 .74.29 1.44.81 1.96s1.22.81 1.96.81 1.44-.29 1.96-.81.81-1.22.81-1.96-.29-1.44-.81-1.96-1.22-.81-1.96-.81-1.44.29-1.96.81-.81 1.22-.81 1.96ZM2 15v-2H0v2c0 2.76 2.24 5 5 5h2v-2H5c-1.65 0-3-1.35-3-3ZM13 0h2c2.76 0 5 2.24 5 5v2h-2V5c0-1.65-1.35-3-3-3h-2V0Z",fill:"#161616"})),j=()=>e("svg",{width:"48",height:"48",slot:"icon",class:"icon",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M24 34C24.5667 34 25.0417 33.8083 25.425 33.425C25.8083 33.0417 26 32.5667 26 32C26 31.4333 25.8083 30.9583 25.425 30.575C25.0417 30.1917 24.5667 30 24 30C23.4333 30 22.9583 30.1917 22.575 30.575C22.1917 30.9583 22 31.4333 22 32C22 32.5667 22.1917 33.0417 22.575 33.425C22.9583 33.8083 23.4333 34 24 34ZM24 26C24.5667 26 25.0417 25.8083 25.425 25.425C25.8083 25.0417 26 24.5667 26 24V16C26 15.4333 25.8083 14.9583 25.425 14.575C25.0417 14.1917 24.5667 14 24 14C23.4333 14 22.9583 14.1917 22.575 14.575C22.1917 14.9583 22 15.4333 22 16V24C22 24.5667 22.1917 25.0417 22.575 25.425C22.9583 25.8083 23.4333 26 24 26ZM24 44C21.2333 44 18.6333 43.475 16.2 42.425C13.7667 41.375 11.65 39.95 9.85 38.15C8.05 36.35 6.625 34.2333 5.575 31.8C4.525 29.3667 4 26.7667 4 24C4 21.2333 4.525 18.6333 5.575 16.2C6.625 13.7667 8.05 11.65 9.85 9.85C11.65 8.05 13.7667 6.625 16.2 5.575C18.6333 4.525 21.2333 4 24 4C26.7667 4 29.3667 4.525 31.8 5.575C34.2333 6.625 36.35 8.05 38.15 9.85C39.95 11.65 41.375 13.7667 42.425 16.2C43.475 18.6333 44 21.2333 44 24C44 26.7667 43.475 29.3667 42.425 31.8C41.375 34.2333 39.95 36.35 38.15 38.15C36.35 39.95 34.2333 41.375 31.8 42.425C29.3667 43.475 26.7667 44 24 44Z",fill:"#161616"})),H=({width:t=24,height:o=24})=>e("svg",{width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"},e("path",{d:"M18 2H11C8.79 2 7 3.79 7 6V7H6C3.79 7 2 8.79 2 11V18C2 20.21 3.79 22 6 22H13C14.86 22 16.41 20.72 16.86 19H14.72C14.37 19.59 13.74 20 13 20H6C4.9 20 4 19.1 4 18V11C4 9.9 4.9 9 6 9H7V13C7 15.21 8.79 17 11 17H18C20.21 17 22 15.21 22 13V6C22 3.79 20.21 2 18 2ZM15 15H11C9.9 15 9 14.1 9 13V9H13C14.1 9 15 9.9 15 11V15ZM20 13C20 14.1 19.1 15 18 15H17V11C17 8.79 15.21 7 13 7H9V6C9 4.9 9.9 4 11 4H18C19.1 4 20 4.9 20 6V13Z",fill:"currentColor"})),T=({width:t=24,height:o=24})=>e("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:o,viewBox:"0 0 24 24",fill:"currentColor"},e("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M20 13C20 13.55 20.45 14 21 14C21.55 14 22 13.55 22 13V5C22 3.35 20.65 2 19 2H11C10.45 2 10 2.45 10 3C10 3.55 10.45 4 11 4H19C19.55 4 20 4.45 20 5V13ZM2 19C2 20.65 3.35 22 5 22H13C13.55 22 14 21.55 14 21C14 20.45 13.55 20 13 20H5C4.45 20 4 19.55 4 19V11C4 10.45 3.55 10 3 10C2.45 10 2 10.45 2 11V19ZM12 16C11.45 16 11 15.55 11 15V13H9C8.45 13 8 12.55 8 12C8 11.45 8.45 11 9 11H11V9C11 8.45 11.45 8 12 8C12.55 8 13 8.45 13 9V11H15C15.55 11 16 11.45 16 12C16 12.55 15.55 13 15 13H13V15C13 15.55 12.55 16 12 16Z"})),A=class{constructor(e){t(this,e),this.addStyle=!0}render(){return e(o,{key:"8aa5c9b9a1443967360070b7c3ebc6bb6882e99d",exportparts:"button"},e("div",{key:"0fe27ed1210a83004a8d23918fdaf8b4cefea1dd",class:this.addStyle?"open-button":"raw-open-button",part:"button"},e("slot",{key:"be4ae4abc0ed26c59d45155375d6d5ca4be1b93f"},e(B,{key:"ebf649e150c4e3e291038ac6299fab988bb7b586"}))))}};A.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:block}:host div{border:none;cursor:pointer;color:inherit}.open-button{background-color:var(--button-bg-color-secondary);align-items:center;border-radius:50%;box-sizing:border-box;display:grid;height:40px;justify-items:center;padding:0;width:40px;transition:background-color 0.2s ease-in-out}.open-button:hover{background-color:var(--button-bg-color-secondary-hover)}.open-button:active{background-color:var(--button-bg-color-secondary-active)}.raw-open-button{display:contents;background:none}";const I={"empty-results":{i18nKey:"emptyResultsBlock"},"server-error":{i18nKey:"serverErrorBlock"},"wrong-aspect-ratio":{i18nKey:"wrongAspectRatioBlock"},"wrong-format":{i18nKey:"wrongFormatBlock"},"heic-not-supported":{i18nKey:"heicNotSupportedBlock"}},M=class{constructor(e){t(this,e),this.hasBackground=!0}getErrorContent(){if(!this.errorType)return null;const e=I[this.errorType],t="wrong-format"===this.errorType?{formats:n()}:void 0,o=`${e.i18nKey}.text`,i=`${e.i18nKey}.button`;return{title:s.t(`${e.i18nKey}.title`),text:s.exists(o)?s.t(o,t):null,buttonText:this.hasButton()?s.t(i):null}}hasButton(){return!!this.errorType&&(!!s.exists(`${I[this.errorType].i18nKey}.button`)&&!!this.handler)}render(){const t=this.getErrorContent(),i={"error-content":!0,"add-background":this.hasBackground},r=this.errorType?[e(j,null),e("h4",null,null==t?void 0:t.title),(null==t?void 0:t.text)&&e("span",null,t.text),(null==t?void 0:t.buttonText)&&e("button",{onClick:this.handler},t.buttonText)]:[e("slot",{name:"icon"}),e("slot",{name:"title"}),e("slot",{name:"text"}),e("slot",{name:"action"})];return e(o,{key:"9fd42173973878d8d2229b800dc912a74d78b343"},e("div",{key:"f285cdf4bad4dc393cfb798639753fdd3a9da5e7",class:i},r))}};M.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:block;width:100%;font-family:var(--font-family, var(--font-family-base))}:host(.add-background){background:var(--surface-bg-color-01)}:host(.add-top-margin){margin-top:var(--spacing-400)}.error-content{display:grid;grid-gap:var(--spacing-150);text-align:center;justify-items:center;width:100%;max-width:356px;padding:var(--spacing-200);border-radius:var(--border-radius-200);box-sizing:border-box;margin:0 auto}.error-content.add-background{background:var(--surface-bg-color-01)}svg,::slotted(svg){display:grid;align-self:center}h4,::slotted(h4){margin:unset;font-weight:var(--font-weight-600);font-size:var(--font-size-headline);line-height:var(--line-height-headline)}span,::slotted(span){font-size:14px;line-height:20px}button,::slotted(button){-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;font-size:var(--font-size-label);font-weight:var(--font-weight-500);background:var(--color-primary, var(--button-bg-color-primary));border-radius:var(--border-radius-100);padding:var(--spacing-100);font-size:var(--font-size-body);color:var(--color-text-inverse);font-family:var(--font-family, var(--font-family-base))}button:hover,::slotted(button:hover){background:var(--button-bg-color-primary-hover)}";const E=class{constructor(e){t(this,e),this.vviinnWidgetClose=i(this,"vviinnWidgetClose"),this.active=!1,this.hideBackButton=!1,this.slider=!1,this.handleEscapeKey=e=>{"Escape"===e.key&&this.active&&(e.preventDefault(),this.close())},this.handleCloseButtonKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.close())},this.handleAnimationEnd=e=>{"fade-in"===e.animationName&&(this.slider=!0)}}handleActiveChange(e){e?document.addEventListener("keydown",this.handleEscapeKey):document.removeEventListener("keydown",this.handleEscapeKey)}componentWillLoad(){p(this,this.el)}disconnectedCallback(){document.removeEventListener("keydown",this.handleEscapeKey)}resetTopScroll(){const e=this.el.shadowRoot.querySelector(".body");null==e||e.scroll({top:0})}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit(Object.assign({campaignTypeId:"VPS",campaignTypeName:d.VPS,widgetVersion:this.widgetVersion},l("widgetId",this.buttonElementId)))}),this.slider?w:0)}render(){return e(o,{key:"a9ddbc40121ee0f9e747460ba826f910376960f1",exportparts:u,class:{closed:!this.active,"first-screen":this.isFirstScreen},onAnimationEnd:this.handleAnimationEnd,role:"dialog","aria-modal":this.active?"true":"false","aria-label":s.t("imageSearchModalTitle"),inert:!this.active||void 0},e("div",{key:"27a1c2d17b975d1bff0c04392b03f850cb1f8cf0",class:"head"},!this.hideBackButton&&e("button",{key:"02d89560819b3b1f19c75569531d670efedf8e54",part:"secondary-action",onClick:()=>{this.resetState(),this.resetTopScroll()},"aria-label":s.t("a11y.backButton")},e(g,{key:"d61a2d35f90c4f64209839c7c738b8afc78131b0"})),e("div",{key:"59530e27b5283104f0296122551752de0456c999",class:"title",part:"results-title"},(t=c.image)?e("img",{width:"28",height:"28",src:t.src,class:"title-image",alt:s.t("a11y.uploadedImage")}):null,e("slot",{key:"81b817f993da5fb1ebb383b19a6c49f5fcb652b3",name:"vviinn-image-search-modal-title"},s.t("imageSearchModalTitle"))),e("button",{key:"7b8b0b319a4d173bd1f6cc3bb9642091e1d25920",onClick:()=>this.close(),onKeyDown:this.handleCloseButtonKeyDown,class:"close-button",part:"close-button","aria-label":s.t("a11y.closeButton")},e("svg",{key:"d2399b4c6cb68169b5fa2c3785fbf4d5417e3d1f",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true"},e("path",{key:"cfb7d199d0bb7f6d366a246a63e43c22ff1fe19b",d:"M12 13.3892L6.91958 18.4696C6.72248 18.6667 6.49095 18.7653 6.225 18.7653C5.95905 18.7653 5.72753 18.6667 5.53043 18.4696C5.33333 18.2725 5.23478 18.041 5.23478 17.775C5.23478 17.5091 5.33333 17.2776 5.53043 17.0805L10.6109 12L5.53043 6.9196C5.33333 6.7225 5.23478 6.49098 5.23478 6.22503C5.23478 5.95908 5.33333 5.72755 5.53043 5.53045C5.72753 5.33335 5.95905 5.2348 6.225 5.2348C6.49095 5.2348 6.72248 5.33335 6.91958 5.53045L12 10.6109L17.0804 5.53045C17.2775 5.33335 17.5091 5.2348 17.775 5.2348C18.041 5.2348 18.2725 5.33335 18.4696 5.53045C18.6667 5.72755 18.7652 5.95908 18.7652 6.22503C18.7652 6.49098 18.6667 6.7225 18.4696 6.9196L13.3892 12L18.4696 17.0805C18.6667 17.2776 18.7652 17.5091 18.7652 17.775C18.7652 18.041 18.6667 18.2725 18.4696 18.4696C18.2725 18.6667 18.041 18.7653 17.775 18.7653C17.5091 18.7653 17.2775 18.6667 17.0804 18.4696L12 13.3892Z",fill:"currentColor"})))),e("div",{key:"e4649662e7054a5b77ba9e1d72e619ef71cb259d",class:"body"},e("slot",{key:"6b177965d3c98596dfe8e29efc0d6be158eb5d09"})));var t}get el(){return r(this)}static get watchers(){return{active:["handleActiveChange"]}}};E.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{background:white;border-radius:var(--modal-border-radius, var(--border-radius-300));box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto;position:relative}.head{height:64px;font-family:var(--font-family, var(--font-family-base));position:absolute;width:100%;box-sizing:border-box;display:flex;align-items:center;z-index:1;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);font-weight:var(--font-weight-600);font-size:18px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:6px;color:#8d8d8d}button:hover{color:#000}@media (max-width: 768px){:host{animation-name:slide-up;animation-duration:var(\n --search-modal-animation-duration-mobile,\n var(--search-modal-animation-duration-mobile-default)\n );animation-fill-mode:forwards;animation-timing-function:ease-out;border-radius:var(--modal-border-radius, var(--border-radius-300))\n var(--modal-border-radius, var(--border-radius-300)) 0 0;height:calc(100vh - 64px);width:100vw;max-width:100vw}:host(.closed){animation-name:slide-down;animation-duration:var(\n --search-modal-animation-duration-mobile,\n var(--search-modal-animation-duration-mobile-default)\n );animation-fill-mode:forwards;animation-timing-function:ease-in}.head{z-index:1}:host(:not(.first-screen)) .head{position:sticky;background:#ffffff}.body{overflow-y:auto}:host(:not(.first-screen)) .body{padding-bottom:160px}.title{color:#161616;display:flex;align-items:center;font-weight:500;font-size:16px;line-height:24px;margin:0 auto}.title-image{border-radius:50%;border:1px solid rgb(244, 244, 244);-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;margin-right:8px}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;color:#6f6f6f;padding:0}button:hover{color:#000}:host(.first-screen) button,:host(.first-screen) button:hover{color:white}}@keyframes slide-up{from{transform:translateY(calc(100% - 64px))}to{transform:translateY(-64px)}}@keyframes slide-down{from{transform:translateY(-64px)}to{transform:translateY(100%)}}";const F=class{constructor(e){t(this,e),this.active=!1,this.isClosing=!1,this.handleAnimationEnd=e=>{var t;"fade-out"===e.animationName&&this.isClosing&&(this.isClosing=!1,null===(t=this.dialogRef)||void 0===t||t.close())}}handleActiveChange(e){requestAnimationFrame((()=>{this.dialogRef&&(e&&!this.dialogRef.open?(this.isClosing=!1,this.dialogRef.classList.remove("closing"),this.dialogRef.showModal()):e||!this.dialogRef.open||this.isClosing||(this.isClosing=!0,this.dialogRef.classList.add("closing")))}))}componentDidLoad(){this.active&&this.dialogRef&&this.dialogRef.showModal()}render(){return e("dialog",{key:"a35c2023604b1de5f6c38869832a1bc82ada47d3",ref:e=>this.dialogRef=e,onAnimationEnd:this.handleAnimationEnd},e("slot",{key:"f48f9137827b0cbdac4022f1be0a33330f278552"}))}static get watchers(){return{active:["handleActiveChange"]}}};F.style="dialog{border:none;padding:0;margin:0;max-width:100vw;max-height:100vh;width:100vw;height:100vh;background:transparent;overflow:hidden;cursor:default}dialog:not([open]){display:none}dialog[open]{display:grid;align-items:center;justify-items:center;animation:fade-in\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}dialog[open]::backdrop{background:rgba(0, 0, 0, 0.5);animation:fade-in\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}@media (max-width: 768px){dialog[open]{align-items:end;padding-top:64px}}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}@keyframes fade-out{from{opacity:1}to{opacity:0.1}}dialog.closing{animation:fade-out\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}dialog.closing::backdrop{animation:fade-out\n var(\n --search-modal-animation-duration,\n var(--search-modal-animation-duration-default)\n )\n ease-in-out}";const R=class{constructor(e){t(this,e),this.position="bottom",this.widgetScrollbar=!1,this.mode="continuity",this.campaigns="",this.imageWidth=k,this.showMultipleImages=!1,this.addToBasketShow=!1,this.addPriceContainer=!1,this.showFilters=!1,this.setItemsAmount=4,this.favoriteShow=!1,this.useCarousel=!0,this.showInWidget=!1,this.imageResolutionWidth=C,this.showInCustomContainer=!1,this.showInModal=!1,this.isAppended=!1,this.sidebarState="idle",this.showLoadingClass=!1,this.recommendationsLoading=!1,this.hidden=!1,this.setRecommendationsLoading=e=>{this.recommendationsLoading=e},this.isSourceImageValid=()=>{var e;return!!(null===(e=this.sourceProduct)||void 0===e?void 0:e.image)}}updatingAllCardsStarted(){const{height:e}=this.getSidebarRectangle(),t=this.getAsideElement();t.style.height!==`${e}px`&&(t.style.height=`${e}px`)}updatingAllCardsFinished(){const e=this.getAsideElement();"auto"!==e.style.height&&(e.style.height="auto")}bodyClickListener(e){const t=this.getSidebarRectangle();t&&this.showInModal&&!L(e,t)&&(this.sidebarState="closed")}sourceProductReceived(e){this.sourceProduct=e.detail}handleEscape(e){"Escape"!==e.key||"open"!==this.sidebarState||this.isAppended||(this.sidebarState="closed")}handleLoadingChange(e){e?(this.showLoadingClass=!0,clearTimeout(this.loadingClassTimeout)):this.loadingClassTimeout=setTimeout((()=>{this.showLoadingClass=!1}),z)}handleSidebarStateChange(e,t){"open"===e&&"open"!==t?setTimeout((()=>{const e=this.el.shadowRoot.querySelector(".close-sidebar");null==e||e.focus()}),0):"closed"===e&&"open"===t&&this.triggerElement&&this.triggerElement.focus()}getClassMap(){return{[this.position]:!0,[this.sidebarState]:!0,"no-carousel":!this.useCarousel,"no-fixed":this.showInCustomContainer,appended:this.isAppended,loading:this.showLoadingClass}}getAsideElement(){return this.el.shadowRoot.querySelector(".sidebar")}getSidebarRectangle(){var e;return null===(e=this.getAsideElement())||void 0===e?void 0:e.getBoundingClientRect()}componentDidLoad(){const e=this.el.shadowRoot.querySelector("vviinn-vpr-widget");Array.from(this.buttonChildren).forEach((t=>{const o=t.cloneNode(!0);t.hasAttribute("slot")&&e.appendChild(o)}))}disconnectedCallback(){clearTimeout(this.loadingClassTimeout)}render(){var t;return e(o,{key:"1d8e4cd403128aab03e0944fc2e4a5b0233872d0",class:this.getClassMap(),style:{display:this.hidden?"none":void 0},exportparts:`body, close-sidebar, ${m}, ${x}, ${v}`},e("div",{key:"b930c6fd2eb2af705b15fc6a06e87f674a7b4f8b",class:"sidebar",part:"body",onAnimationEnd:e=>this.handleAnimationEnd(e),role:this.showInModal?"dialog":"region","aria-modal":this.showInModal?"true":void 0,"aria-label":s.t("a11y.recommendations")},e("div",{key:"dd428f49ceb3a3b3ef6fa81419de0575df1323ec",class:{"sidebar-header":!0,"contains-source-img":this.isSourceImageValid()},part:"sidebar-header"},"set"!==this.mode&&e(a,{key:"21fafcf398cf1f3edb25cbeffdc80ecc3edc4926"},this.renderSourceImage(),0!==(null===(t=this.sidebarTitle)||void 0===t?void 0:t.length)&&e("span",{key:"1a35ffde2d9360bc50399919bb210f38df6bd906",class:"title",part:"recommendations-title"},this.sidebarTitle||s.t("discoveryWidgetTitle")),!!this.sidebarSubtitle&&e("span",{key:"a97989a713840aabcf5e54ca2b7867a21bc3ddb4",class:"subtitle",part:"recommendations-subtitle"},this.sidebarSubtitle)),e("button",{key:"c41bd72d0344559e9536c62981ffd3e9a123253c",class:"close-sidebar",onClick:()=>{this.sidebarState="closed"},onKeyDown:e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.sidebarState="closed")},part:"close-sidebar","aria-label":s.t("a11y.closeButton")},e(S,{key:"aaaee4b427d589ba8daacd323b3d3f249f1ac31c"}))),e("div",{key:"0b8861dffd567eb124e5bce8fc813f74227cdcb9",class:"sidebar-content",part:"sidebar-content"},e("vviinn-vpr-widget",{key:"bec924b0073e25b2f57ab3d05c532facd542b0a5",token:this.token,currencySign:this.currencySign,pricePrefix:this.pricePrefix,apiPath:this.apiPath,locale:this.locale,numberLocale:this.numberLocale,productId:this.productId,exportparts:`${m}, ${x}, ${v}`,imageWidth:this.imageWidth,showMultipleImages:this.showMultipleImages,setItemsAmount:this.setItemsAmount,blockTitle:"set"!==this.mode?"":this.sidebarTitle,blockSubtitle:"set"===this.mode?this.sidebarSubtitle:void 0,mode:this.mode,"campaign-type":this.campaignType,useCarousel:this.useCarousel,onVviinnRecommendationsLoaded:()=>{this.hidden=!1,this.sidebarState="open"},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:"closed"===this.sidebarState,opened:"open"===this.sidebarState,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}))))}renderSourceImage(){var t,o,i,r;const a=(null===(o=null===(t=this.sourceProduct)||void 0===t?void 0:t.image)||void 0===o?void 0:o.thumbnail)||(null===(r=null===(i=this.sourceProduct)||void 0===i?void 0:i.image)||void 0===r?void 0:r.original)||null;return a?e("img",{class:"source-image",part:"source-image",src:a,alt:s.t("a11y.sourceProductImage")}):null}handleAnimationEnd({animationName:e}){e.includes("slideOut")&&(this.hidden=!0)}get el(){return r(this)}static get watchers(){return{recommendationsLoading:["handleLoadingChange"],sidebarState:["handleSidebarStateChange"]}}};R.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:flex;box-sizing:border-box;position:fixed;z-index:9999;height:100vh;left:0;top:0;transition:background 0.1s ease-in-out;width:100vw}:host(.bottom){flex-direction:column;justify-content:flex-end}:host(.no-fixed){position:unset;display:block;width:100%;height:auto}:host(.no-fixed.no-carousel.appended.loading){min-height:calc((var(--product-card-calculated-height) * 3) + 48px)}:host(.right){flex-direction:row;justify-content:flex-end}:host [slot]{visibility:hidden;position:absolute}.sidebar-header{position:relative;text-align:center;padding:var(--spacing-300);padding-top:0px}.sidebar-header.contains-source-img{display:grid;justify-items:center;grid-gap:12px}img.source-image{width:64px;height:64px;border-radius:50%;padding:6px;border:1px solid var(--color-border-02);-o-object-fit:contain;object-fit:contain}:host(.right) .sidebar-header{box-shadow:0px 2px 6px rgba(0, 0, 0, 0.1)}.sidebar-content{padding:0 var(--spacing-300)}:host(.right) .sidebar-content{overflow:auto}.sidebar{background:white;box-sizing:border-box;padding-top:var(--spacing-300);display:flex;flex-direction:column;max-height:100vh;overflow-y:auto}:host(.bottom.idle) .sidebar,:host(.bottom.closed) .sidebar{transform:translateY(100%)}:host(.no-fixed) .sidebar{transform:unset !important}:host(.bottom.closed) .sidebar{animation-name:slideOutFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.open){transition:background 0.3s ease-in-out;background:rgba(0, 0, 0, 0.2)}:host(.bottom.open) .sidebar{animation-name:slideInFromBottom;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.idle) .sidebar{transform:translateX(100%)}:host(.right.closed) .sidebar{animation-name:slideOutFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right.open) .sidebar{animation-name:slideInFromRight;animation-duration:var(\n --sidebar-animation-duration,\n var(--sidebar-animation-duration-default)\n );animation-fill-mode:forwards}:host(.right) .sidebar{max-width:480px}:host(.right) vviinn-vpr-widget::part(recommendations-results){display:grid;grid-template-columns:repeat(2, 1fr);grid-gap:var(--spacing-300)}:host(.right) vviinn-vpr-widget{overflow:auto}.title{font-style:normal;font-weight:var(--font-weight-600);font-size:var(--font-size-title);font-family:var(--font-family, var(--font-family-base));line-height:40px;text-align:center;color:#000000}.subtitle{font-size:var(--font-size-body);font-family:var(--font-family, var(--font-family-base));text-align:center}.close-sidebar{position:absolute;background:transparent;border:none;cursor:pointer;margin:0;top:0;color:var(--color-icon-secondary);transition:color 0.1s ease-in-out;padding:var(--spacing-100);right:var(--spacing-200)}.close-sidebar:hover{color:var(--color-icon-primary)}@keyframes slideInFromBottom{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOutFromBottom{from{transform:translateY(0)}to{transform:translateY(100%)}}@keyframes slideInFromRight{from{transform:translateX(100%)}to{transform:translateX(0)}}@keyframes slideOutFromRight{from{transform:translateX(0)}to{transform:translateX(100%)}}@media (max-width: 768px){:host{--vviinn-carousel-columns:2}}";const Z=class{constructor(e){t(this,e),this.vviinnWidgetLoad=i(this,"vviinnWidgetLoad"),this.vviinnWidgetOpen=i(this,"vviinnWidgetOpen"),this.vviinnWidgetClose=i(this,"vviinnWidgetClose"),this.vviinnProductLoad=i(this,"vviinnProductLoad"),this.vviinnProductClick=i(this,"vviinnProductClick"),this.vviinnProductView=i(this,"vviinnProductView"),this.vviinnResultLoad=i(this,"vviinnResultLoad"),this.vviinnResultView=i(this,"vviinnResultView"),this.vviinnNoResult=i(this,"vviinnNoResult"),this.vviinnAddToBasket=i(this,"vviinnAddToBasket"),this.vviinnVprButtonActivated=i(this,"vviinnVprButtonActivated"),this.mode="continuity",this.campaigns="",this.excluded="",this.campaignType="set"===this.mode?"VCS":"VPR",this.color="",this.imageWidth=k,this.imageResolutionWidth=C,this.showMultipleImages=!1,this.setItemsAmount=4,this.cssUrl=null,this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.productDetailsNewTab=!1,this.productDetailsRedirect=!0,this.addToBasketShow=!1,this.showFilters=!1,this.addPriceContainer=!1,this.oneClickDiscoveryMode="modal",this.setModeDiscounts="set"===this.mode?"5, 10, 15":"",this.updateButtonLocation="topAndItem",this.modalScrollbar=!1,this.position="bottom",this.addStyle=!0,this.favoriteShow=!1,this.isStandalone=!0,this.showInWidget=!1,this.sidebar=null,this.removeSidebarFromDOM=()=>{var e;this.sidebar&&((null===(e=this.targetAppendSidebarTo)||void 0===e?void 0:e.contains(this.sidebar))?this.targetAppendSidebarTo.removeChild(this.sidebar):document.body.contains(this.sidebar)&&document.body.removeChild(this.sidebar),this.sidebar=null)},this.sidebarCloseListener=(e=!1)=>{this.sidebar&&(e?this.removeSidebarFromDOM():(this.sidebar.sidebarState="closed",setTimeout((()=>this.removeSidebarFromDOM()),w)))},this.handleButtonClick=()=>{this.vviinnVprButtonActivated.emit(),this.appendSidebarToId&&!this.targetAppendSidebarTo?setTimeout((()=>{this.handleClick()}),250):this.handleClick()},this.handleKeyDown=e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),this.handleButtonClick())}}connectedCallback(){this.iconSideSize=this.isStandalone?24:14;const{onChange:e}=h(this.showInWidget);this.disposeStoreListener=e("searchStatus",(e=>{"loading"===e&&this.sidebarCloseListener()}))}async componentWillLoad(){await y(this.locale),this.appendSidebarToElement?this.targetAppendSidebarTo=this.appendSidebarToElement:this.appendSidebarToId&&(this.targetAppendSidebarTo=document.getElementById(this.appendSidebarToId))}appendSidebarToElementWatcher(){this.appendSidebarToElement&&(this.targetAppendSidebarTo=this.appendSidebarToElement)}getAriaLabel(){try{return s.t("a11y.findSimilarProducts")||"Find similar products"}catch(e){return"Find similar products"}}render(){return e(o,{key:"6edbdcb0f7dc456060d8a87cab4d347fca170165",role:"button",tabindex:"0","aria-label":this.getAriaLabel(),onClick:this.handleButtonClick,onKeyDown:this.handleKeyDown},V(this.cssUrl),e("vviinn-button",{key:"3dbb30111e60d51feb77a2ac9cbeb669f11dd620",addStyle:this.addStyle,part:"vviinn-button"},e("slot",{key:"3dee5fa42088fb238db95b62b7a97aa6cff56b93"},e("VCS"===this.campaignType?T:H,{width:this.iconSideSize,height:this.iconSideSize}))))}handleClick(){const e=document.createElement("vviinn-recommendations-sidebar");e.token=this.token,e.locale=this.locale,e.numberLocale=this.numberLocale,e.currencySign=this.currencySign,e.pricePrefix=this.pricePrefix,e.apiPath=this.apiPath,e.sidebarTitle=this.sidebarTitle,e.sidebarSubtitle=this.sidebarSubtitle,e.productId=this.productId,e.position=this.position,e.widgetScrollbar=this.modalScrollbar,e.campaigns=this.campaigns,e.campaignType=this.campaignType,e.color=this.color,e.imageWidth=this.imageWidth,e.showMultipleImages=this.showMultipleImages,e.buttonElementId=this.el.id,e.noResultText=this.noResultText,e.noResultShow=this.noResultShow,e.gridArrowsDynamic=this.gridArrowsDynamic,e.productDetailsNewTab=this.productDetailsNewTab,e.productDetailsRedirect=this.productDetailsRedirect,e.widgetVersion=f,e.showingInButton=!0,e.excluded=this.excluded,e.addToBasketShow=this.addToBasketShow,e.buttonChildren=this.el.children,e.showFilters=this.showFilters,e.cssUrl=this.cssUrl,e.setItemsAmount=this.setItemsAmount,e.setModeDiscounts=this.setModeDiscounts,e.updateButtonLocation=this.updateButtonLocation,e.addPriceContainer=this.addPriceContainer,e.favoriteShow=this.favoriteShow,e.showInModal="modal"===this.oneClickDiscoveryMode,e.isAppended=!!this.targetAppendSidebarTo||!!this.appendSidebarToElement,e.showInWidget=this.showInWidget,e.uiSessionId=this.uiSessionId,e.triggerElement=this.el,this.targetAppendSidebarTo?(e.mode="grid",e.useCarousel="append-slider"===this.oneClickDiscoveryMode):(e.mode="right"===this.position?"grid":this.mode,e.useCarousel="bottom"===this.position),this.sidebar=e,this.eventAbortController=new AbortController;const{signal:t}=this.eventAbortController;if(b(document,[["vviinnWidgetClose",()=>this.sidebarCloseListener(!1)],["vviinnStorybookStoryChanged",()=>this.sidebarCloseListener(!0)]],t),this.targetAppendSidebarTo)return this.sidebar.showInCustomContainer=!0,this.targetAppendSidebarTo.innerHTML="",void this.targetAppendSidebarTo.append(this.sidebar);document.body.append(this.sidebar)}disconnectedCallback(){var e,t;null===(e=this.eventAbortController)||void 0===e||e.abort(),null===(t=this.disposeStoreListener)||void 0===t||t.call(this)}get el(){return r(this)}static get watchers(){return{appendSidebarToElement:["appendSidebarToElementWatcher"]}}};Z.style=":host{display:inline-block}";export{A as vviinn_button,M as vviinn_error,E as vviinn_modal,F as vviinn_overlay,R as vviinn_recommendations_sidebar,Z as vviinn_vpr_button}