vviinn-widgets 2.89.1 → 2.91.0

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 (57) hide show
  1. package/dist/cjs/{package-fdeeca23.js → package-f18ef9b9.js} +1 -1
  2. package/dist/cjs/search-filters_19.cjs.entry.js +5 -3
  3. package/dist/cjs/vviinn-carousel_8.cjs.entry.js +1 -1
  4. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +10 -5
  5. package/dist/cjs/vviinn-vps-button.cjs.entry.js +21 -3
  6. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +1 -1
  7. package/dist/collection/components/vviinn-icons/icons/SearchModalCameraIcon.js +2 -0
  8. package/dist/collection/components/vviinn-icons/icons/SearchModalFullSearchIcon.js +2 -0
  9. package/dist/collection/components/vviinn-icons/icons/SearchModalImageSearchIcon.js +2 -0
  10. package/dist/collection/components/vviinn-icons/icons/SearchModalUploadIcon.js +2 -0
  11. package/dist/collection/components/vviinn-icons/icons/SimilarProductsIcon.js +1 -1
  12. package/dist/collection/components/vviinn-icons/index.js +4 -4
  13. package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +2 -2
  14. package/dist/esm/{package-317e4435.js → package-ab978025.js} +1 -1
  15. package/dist/esm/search-filters_19.entry.js +4 -2
  16. package/dist/esm/vviinn-carousel_8.entry.js +1 -1
  17. package/dist/esm/vviinn-vpr-button.entry.js +10 -5
  18. package/dist/esm/vviinn-vps-button.entry.js +22 -4
  19. package/dist/esm/vviinn-vps-widget.entry.js +1 -1
  20. package/dist/types/components/vviinn-icons/icons/SearchModalCameraIcon.d.ts +1 -0
  21. package/dist/types/components/vviinn-icons/icons/SearchModalFullSearchIcon.d.ts +1 -0
  22. package/dist/types/components/vviinn-icons/icons/SearchModalImageSearchIcon.d.ts +1 -0
  23. package/dist/types/components/vviinn-icons/icons/SearchModalUploadIcon.d.ts +1 -0
  24. package/dist/types/components/vviinn-icons/index.d.ts +4 -4
  25. package/dist/vviinn-widgets/{p-62f6608e.entry.js → p-222722c1.entry.js} +1 -1
  26. package/dist/vviinn-widgets/{p-ab18d2e3.entry.js → p-3aa0bc53.entry.js} +2 -2
  27. package/dist/vviinn-widgets/p-59014f1e.js +1 -0
  28. package/dist/vviinn-widgets/p-971e3fee.entry.js +1 -0
  29. package/dist/vviinn-widgets/{p-8e8c7b7c.entry.js → p-d4a61e2e.entry.js} +1 -1
  30. package/dist/vviinn-widgets/p-dc46034c.entry.js +1 -0
  31. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  32. package/package.json +1 -1
  33. package/www/build/{p-62f6608e.entry.js → p-222722c1.entry.js} +1 -1
  34. package/www/build/{p-ab18d2e3.entry.js → p-3aa0bc53.entry.js} +2 -2
  35. package/www/build/p-59014f1e.js +1 -0
  36. package/www/build/p-971e3fee.entry.js +1 -0
  37. package/www/build/{p-8e8c7b7c.entry.js → p-d4a61e2e.entry.js} +1 -1
  38. package/www/build/p-dc46034c.entry.js +1 -0
  39. package/www/build/vviinn-widgets.esm.js +1 -1
  40. package/dist/cjs/CameraIcon-5b8efacb.js +0 -8
  41. package/dist/collection/components/vviinn-icons/icons/CloseIcon.js +0 -2
  42. package/dist/collection/components/vviinn-icons/icons/GalleryActionIcon.js +0 -2
  43. package/dist/collection/components/vviinn-icons/icons/LoaderIcon.js +0 -2
  44. package/dist/collection/components/vviinn-icons/icons/StarsIcon.js +0 -2
  45. package/dist/esm/CameraIcon-785208d2.js +0 -6
  46. package/dist/types/components/vviinn-icons/icons/CloseIcon.d.ts +0 -1
  47. package/dist/types/components/vviinn-icons/icons/GalleryActionIcon.d.ts +0 -1
  48. package/dist/types/components/vviinn-icons/icons/LoaderIcon.d.ts +0 -1
  49. package/dist/types/components/vviinn-icons/icons/StarsIcon.d.ts +0 -1
  50. package/dist/vviinn-widgets/p-171fa6da.js +0 -1
  51. package/dist/vviinn-widgets/p-54789d13.entry.js +0 -1
  52. package/dist/vviinn-widgets/p-8e3531b6.entry.js +0 -1
  53. package/dist/vviinn-widgets/p-d6cb79c1.js +0 -1
  54. package/www/build/p-171fa6da.js +0 -1
  55. package/www/build/p-54789d13.entry.js +0 -1
  56. package/www/build/p-8e3531b6.entry.js +0 -1
  57. package/www/build/p-d6cb79c1.js +0 -1
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "2.89.1";
3
+ const version = "2.91.0";
4
4
 
5
5
  exports.version = version;
@@ -7,12 +7,14 @@ const search_store = require('./search.store-d2b420fd.js');
7
7
  const index$1 = require('./index-105aee62.js');
8
8
  const customizedSlots = require('./customized-slots-ee9418c1.js');
9
9
  const emitRequestFiltersMore = require('./emitRequestFiltersMore-dd0b6262.js');
10
- const _package = require('./package-fdeeca23.js');
11
- const CameraIcon = require('./CameraIcon-5b8efacb.js');
10
+ const _package = require('./package-f18ef9b9.js');
12
11
 
13
12
  const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14
13
  index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
15
14
 
15
+ const CameraIcon = () => (index.h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
16
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16.567 3H19A3.01 3.01 0 0 1 22 6v7.69h-2V6c0-.55-.451-1-1.001-1h-3.502l-2.03-3H8.543L6.603 5H3.001c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h5.933v2H3.001A3.01 3.01 0 0 1 0 17V6c0-1.65 1.35-3 3.001-3h2.522l1.94-3h7.074l2.03 3Zm-5.562 3c1.28 0 2.561.48 3.542 1.46h-.01a4.992 4.992 0 0 1 .64 6.29l3.051 3.05-1.41 1.41-3.052-3.05c-.84.55-1.8.83-2.76.83-1.282 0-2.562-.48-3.543-1.46a5.002 5.002 0 0 1 0-7.07A5.026 5.026 0 0 1 11.005 6Zm-2.771 5a2.763 2.763 0 0 0 2.771 2.77A2.763 2.763 0 0 0 13.776 11a2.763 2.763 0 0 0-2.771-2.77A2.763 2.763 0 0 0 8.234 11Z", fill: "#161616" })));
17
+
16
18
  const MinusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
17
19
  index.h("path", { d: "M8.00001 17.3333C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H8.00001Z", fill: "currentColor" })));
18
20
 
@@ -4464,7 +4466,7 @@ const VviinnTextSearch = class {
4464
4466
  "text-search-input--with-icon": this.mode === "textAndImage",
4465
4467
  }, part: "text-search-input", type: "text", placeholder: index$1.instance.t("textSearchPlaceholder"), value: this.searchQuery, onInput: (event) => this.handleInputChange(event), onKeyUp: (event) => this.handleKeyPress(event) }), index.h("button", { class: "text-search-button", onClick: () => this.handleTextSearch(), disabled: search_store.searchState.loading }, search_store.searchState.loading &&
4466
4468
  search_store.searchState.searchType === "text" &&
4467
- this.showInWidget ? (index.h("vviinn-preloader", null)) : (index.h("slot", { name: "vviinn-text-search-icon" }, index.h(TextSearchIcon, null)))), this.mode === "textAndImage" && (index.h("vviinn-image-selector", { token: this.token, apiPath: this.apiPath, showInTextSearch: true }, index.h("span", { slot: "upload-button-text" }, index.h(CameraIcon.CameraIcon, null))))));
4469
+ this.showInWidget ? (index.h("vviinn-preloader", null)) : (index.h("slot", { name: "vviinn-text-search-icon" }, index.h(TextSearchIcon, null)))), this.mode === "textAndImage" && (index.h("vviinn-image-selector", { token: this.token, apiPath: this.apiPath, showInTextSearch: true }, index.h("span", { slot: "upload-button-text" }, index.h(CameraIcon, null))))));
4468
4470
  }
4469
4471
  get el() { return index.getElement(this); }
4470
4472
  };
@@ -7,7 +7,7 @@ const search_store = require('./search.store-d2b420fd.js');
7
7
  const customizedSlots = require('./customized-slots-ee9418c1.js');
8
8
  const emitRequestFiltersMore = require('./emitRequestFiltersMore-dd0b6262.js');
9
9
  const index$1 = require('./index-105aee62.js');
10
- const _package = require('./package-fdeeca23.js');
10
+ const _package = require('./package-f18ef9b9.js');
11
11
 
12
12
  const BasketIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13
13
  index.h("g", { id: "shopping-bag" },
@@ -3,12 +3,17 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const _package = require('./package-fdeeca23.js');
6
+ const _package = require('./package-f18ef9b9.js');
7
7
 
8
- const SimilarProductsIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
9
- index.h("path", { d: "M20.8 2H11.2C10.54 2 10 2.54 10 3.2C10 3.86 10.54 4.4 11.2 4.4H19.6V12.8C19.6 13.46 20.14 14 20.8 14C21.46 14 22 13.46 22 12.8V3.2C22 2.54 21.46 2 20.8 2Z", fill: "#161616" }),
10
- index.h("path", { d: "M12.8 19.6H4.4V11.2C4.4 10.54 3.86 10 3.2 10C2.54 10 2 10.54 2 11.2V20.8C2 21.46 2.54 22 3.2 22H12.8C13.46 22 14 21.46 14 20.8C14 20.14 13.46 19.6 12.8 19.6Z", fill: "#161616" }),
11
- index.h("path", { d: "M14.8571 10.8571H13.1429V9.14286C13.1429 8.51429 12.6286 8 12 8C11.3714 8 10.8571 8.51429 10.8571 9.14286V10.8571H9.14286C8.51429 10.8571 8 11.3714 8 12C8 12.6286 8.51429 13.1429 9.14286 13.1429H10.8571V14.8571C10.8571 15.4857 11.3714 16 12 16C12.6286 16 13.1429 15.4857 13.1429 14.8571V13.1429H14.8571C15.4857 13.1429 16 12.6286 16 12C16 11.3714 15.4857 10.8571 14.8571 10.8571Z", fill: "#161616" })));
8
+ const SimilarProductsIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
9
+ index.h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
10
+ index.h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }),
11
+ index.h("path", { d: "M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z", fill: "#161616" }),
12
+ index.h("path", { d: "M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z", fill: "#161616" }),
13
+ index.h("path", { d: "M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z", fill: "#161616" }),
14
+ index.h("path", { d: "M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z", fill: "#161616" }),
15
+ index.h("path", { d: "M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z", fill: "#161616" }),
16
+ index.h("path", { d: "M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z", fill: "#161616" })));
12
17
 
13
18
  const CrossSellingIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14
19
  index.h("path", { d: "M18.25 2H10.75C8.6875 2 7 3.6875 7 5.75V7H5.75C3.6875 7 2 8.6875 2 10.75V18.25C2 20.3125 3.6875 22 5.75 22H13.25C15.3125 22 17 20.3125 17 18.25H14.5C14.5 18.9375 13.9375 19.5 13.25 19.5H5.75C5.0625 19.5 4.5 18.9375 4.5 18.25V10.75C4.5 10.0625 5.0625 9.5 5.75 9.5H7V13.25C7 15.3125 8.6875 17 10.75 17H18.25C20.3125 17 22 15.3125 22 13.25V5.75C22 3.6875 20.3125 2 18.25 2ZM10.75 14.5C10.0625 14.5 9.5 13.9375 9.5 13.25V9.5H13.25C13.9375 9.5 14.5 10.0625 14.5 10.75V14.5H10.75ZM19.5 13.25C19.5 13.9375 18.9375 14.5 18.25 14.5H17V10.75C17 8.6875 15.3125 7 13.25 7H9.5V5.75C9.5 5.0625 10.0625 4.5 10.75 4.5H18.25C18.9375 4.5 19.5 5.0625 19.5 5.75V13.25Z", fill: "#161616" })));
@@ -3,11 +3,29 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const _package = require('./package-fdeeca23.js');
7
- const CameraIcon = require('./CameraIcon-5b8efacb.js');
6
+ const _package = require('./package-f18ef9b9.js');
8
7
  const customizedSlots = require('./customized-slots-ee9418c1.js');
9
8
  const constants = require('./constants-7684cbfc.js');
10
9
 
10
+ const SearchModalCameraIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
11
+ index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18 4H20C22.21 4 24 5.79 24 8V16H22V8C22 6.9 21.1 6 20 6H16.93L16.34 5.11L14.93 3H9.07L7.66 5.11L7.07 6H4C2.9 6 2 6.9 2 8V18C2 19.1 2.9 20 4 20H9V22H4C1.79 22 0 20.21 0 18V8C0 5.79 1.79 4 4 4H6L8 1H16L18 4ZM12 8C14.76 8 17 10.24 17 13L16.99 13.01C16.99 14.02 16.68 14.97 16.16 15.76L20.7 20.3L19.29 21.71L14.75 17.17C13.96 17.69 13.02 18 12 18C9.24 18 7 15.76 7 13C7 10.24 9.24 8 12 8ZM9 13C9 14.65 10.35 16 12 16C13.65 16 15 14.65 15 13C15 11.35 13.65 10 12 10C10.35 10 9 11.35 9 13Z", fill: "#161616" })));
12
+
13
+ const SearchModalUploadIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
14
+ index.h("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H13C13.2833 3 13.5208 3.09583 13.7125 3.2875C13.9042 3.47917 14 3.71667 14 4C14 4.28333 13.9042 4.52083 13.7125 4.7125C13.5208 4.90417 13.2833 5 13 5H5V19H19V11C19 10.7167 19.0958 10.4792 19.2875 10.2875C19.4792 10.0958 19.7167 10 20 10C20.2833 10 20.5208 10.0958 20.7125 10.2875C20.9042 10.4792 21 10.7167 21 11V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM17 7H16C15.7167 7 15.4792 6.90417 15.2875 6.7125C15.0958 6.52083 15 6.28333 15 6C15 5.71667 15.0958 5.47917 15.2875 5.2875C15.4792 5.09583 15.7167 5 16 5H17V4C17 3.71667 17.0958 3.47917 17.2875 3.2875C17.4792 3.09583 17.7167 3 18 3C18.2833 3 18.5208 3.09583 18.7125 3.2875C18.9042 3.47917 19 3.71667 19 4V5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H19V8C19 8.28333 18.9042 8.52083 18.7125 8.7125C18.5208 8.90417 18.2833 9 18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V7ZM11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16Z", fill: "#161616" })));
15
+
16
+ const SearchModalFullSearchIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
17
+ index.h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }),
18
+ index.h("path", { d: "M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z", fill: "#161616" }),
19
+ index.h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
20
+ index.h("path", { d: "M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C13.02 17 13.96 16.69 14.75 16.17L19.29 20.71L20.7 19.3L16.16 14.76C16.68 13.97 16.99 13.02 16.99 12.01L17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z", fill: "#161616" })));
21
+
22
+ const SearchModalImageSearchIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
23
+ index.h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }),
24
+ index.h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
25
+ index.h("path", { d: "M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z", fill: "#161616" }),
26
+ index.h("path", { d: "M16 2H15V4H16C18.21 4 20 5.79 20 8V9H22V8C22 4.69 19.31 2 16 2Z", fill: "#161616" }),
27
+ index.h("path", { d: "M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z", fill: "#161616" })));
28
+
11
29
  const vviinnVpsButtonCss = ":host{display:block;line-height:0}";
12
30
 
13
31
  const VviinnVpsButton = class {
@@ -73,7 +91,7 @@ const VviinnVpsButton = class {
73
91
  render() {
74
92
  return (index.h(index.Host, { tabindex: "0", role: "button" }, index.h("vviinn-button", { onClick: () => {
75
93
  this.handleClick();
76
- }, addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, index.h(CameraIcon.CameraIcon, null))), customizedSlots.SlotSkeleton("vps"), index.h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
94
+ }, addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", null, this.mode === "camera" ? (index.h(SearchModalCameraIcon, null)) : this.mode === "upload" ? (index.h(SearchModalUploadIcon, null)) : this.textSearchShow ? (index.h(SearchModalFullSearchIcon, null)) : (index.h(SearchModalImageSearchIcon, null)))), customizedSlots.SlotSkeleton("vps"), index.h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
77
95
  (this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this) })));
78
96
  }
79
97
  get el() { return index.getElement(this); }
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-4474431a.js');
6
6
  const search_store = require('./search.store-d2b420fd.js');
7
7
  const index$1 = require('./index-105aee62.js');
8
- const _package = require('./package-fdeeca23.js');
8
+ const _package = require('./package-f18ef9b9.js');
9
9
  const customizedSlots = require('./customized-slots-ee9418c1.js');
10
10
  const constants = require('./constants-7684cbfc.js');
11
11
 
@@ -0,0 +1,2 @@
1
+ import { h } from "@stencil/core";
2
+ export const SearchModalCameraIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18 4H20C22.21 4 24 5.79 24 8V16H22V8C22 6.9 21.1 6 20 6H16.93L16.34 5.11L14.93 3H9.07L7.66 5.11L7.07 6H4C2.9 6 2 6.9 2 8V18C2 19.1 2.9 20 4 20H9V22H4C1.79 22 0 20.21 0 18V8C0 5.79 1.79 4 4 4H6L8 1H16L18 4ZM12 8C14.76 8 17 10.24 17 13L16.99 13.01C16.99 14.02 16.68 14.97 16.16 15.76L20.7 20.3L19.29 21.71L14.75 17.17C13.96 17.69 13.02 18 12 18C9.24 18 7 15.76 7 13C7 10.24 9.24 8 12 8ZM9 13C9 14.65 10.35 16 12 16C13.65 16 15 14.65 15 13C15 11.35 13.65 10 12 10C10.35 10 9 11.35 9 13Z", fill: "#161616" })));
@@ -0,0 +1,2 @@
1
+ import { h } from "@stencil/core";
2
+ export const SearchModalFullSearchIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }), h("path", { d: "M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z", fill: "#161616" }), h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }), h("path", { d: "M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C13.02 17 13.96 16.69 14.75 16.17L19.29 20.71L20.7 19.3L16.16 14.76C16.68 13.97 16.99 13.02 16.99 12.01L17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z", fill: "#161616" })));
@@ -0,0 +1,2 @@
1
+ import { h } from "@stencil/core";
2
+ export const SearchModalImageSearchIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }), h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }), h("path", { d: "M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z", fill: "#161616" }), h("path", { d: "M16 2H15V4H16C18.21 4 20 5.79 20 8V9H22V8C22 4.69 19.31 2 16 2Z", fill: "#161616" }), h("path", { d: "M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z", fill: "#161616" })));
@@ -0,0 +1,2 @@
1
+ import { h } from "@stencil/core";
2
+ export const SearchModalUploadIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H13C13.2833 3 13.5208 3.09583 13.7125 3.2875C13.9042 3.47917 14 3.71667 14 4C14 4.28333 13.9042 4.52083 13.7125 4.7125C13.5208 4.90417 13.2833 5 13 5H5V19H19V11C19 10.7167 19.0958 10.4792 19.2875 10.2875C19.4792 10.0958 19.7167 10 20 10C20.2833 10 20.5208 10.0958 20.7125 10.2875C20.9042 10.4792 21 10.7167 21 11V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM17 7H16C15.7167 7 15.4792 6.90417 15.2875 6.7125C15.0958 6.52083 15 6.28333 15 6C15 5.71667 15.0958 5.47917 15.2875 5.2875C15.4792 5.09583 15.7167 5 16 5H17V4C17 3.71667 17.0958 3.47917 17.2875 3.2875C17.4792 3.09583 17.7167 3 18 3C18.2833 3 18.5208 3.09583 18.7125 3.2875C18.9042 3.47917 19 3.71667 19 4V5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H19V8C19 8.28333 18.9042 8.52083 18.7125 8.7125C18.5208 8.90417 18.2833 9 18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V7ZM11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16Z", fill: "#161616" })));
@@ -1,2 +1,2 @@
1
1
  import { h } from "@stencil/core";
2
- export const SimilarProductsIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.8 2H11.2C10.54 2 10 2.54 10 3.2C10 3.86 10.54 4.4 11.2 4.4H19.6V12.8C19.6 13.46 20.14 14 20.8 14C21.46 14 22 13.46 22 12.8V3.2C22 2.54 21.46 2 20.8 2Z", fill: "#161616" }), h("path", { d: "M12.8 19.6H4.4V11.2C4.4 10.54 3.86 10 3.2 10C2.54 10 2 10.54 2 11.2V20.8C2 21.46 2.54 22 3.2 22H12.8C13.46 22 14 21.46 14 20.8C14 20.14 13.46 19.6 12.8 19.6Z", fill: "#161616" }), h("path", { d: "M14.8571 10.8571H13.1429V9.14286C13.1429 8.51429 12.6286 8 12 8C11.3714 8 10.8571 8.51429 10.8571 9.14286V10.8571H9.14286C8.51429 10.8571 8 11.3714 8 12C8 12.6286 8.51429 13.1429 9.14286 13.1429H10.8571V14.8571C10.8571 15.4857 11.3714 16 12 16C12.6286 16 13.1429 15.4857 13.1429 14.8571V13.1429H14.8571C15.4857 13.1429 16 12.6286 16 12C16 11.3714 15.4857 10.8571 14.8571 10.8571Z", fill: "#161616" })));
2
+ export const SimilarProductsIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }), h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }), h("path", { d: "M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z", fill: "#161616" }), h("path", { d: "M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z", fill: "#161616" }), h("path", { d: "M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z", fill: "#161616" }), h("path", { d: "M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z", fill: "#161616" }), h("path", { d: "M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z", fill: "#161616" }), h("path", { d: "M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z", fill: "#161616" })));
@@ -4,10 +4,7 @@ export { CameraActionIcon } from "./icons/CameraActionIcon";
4
4
  export { CameraIcon } from "./icons/CameraIcon";
5
5
  export { CheckCircleIcon } from "./icons/CheckCircleIcon";
6
6
  export { ChevronIcon } from "./icons/ChevronIcon";
7
- export { CloseIcon } from "./icons/CloseIcon";
8
7
  export { CrossIcon } from "./icons/CrossIcon";
9
- export { GalleryActionIcon } from "./icons/GalleryActionIcon";
10
- export { LoaderIcon } from "./icons/LoaderIcon";
11
8
  export { MinusIcon } from "./icons/MinusIcon";
12
9
  export { PlusIcon } from "./icons/PlusIcon";
13
10
  export { RoundCameraIcon } from "./icons/RoundCameraIcon";
@@ -20,9 +17,12 @@ export { WarningIcon } from "./icons/WarningIcon";
20
17
  export { PhotoFrameCorner } from "./icons/PhotoFrameCorner";
21
18
  export { FiltersIcon } from "./icons/FiltersIcon";
22
19
  export { NewCloseIcon } from "./icons/NewCloseIcon";
23
- export { StarsIcon } from "./icons/StarsIcon";
24
20
  export { CheckFilterIcon } from "./icons/CheckFilterIcon";
25
21
  export { CloseFilterIcon } from "./icons/CloseFilterIcon";
26
22
  export { SquareFilterIcon } from "./icons/SquareFilterIcon";
27
23
  export { SimilarProductsIcon } from "./icons/SimilarProductsIcon";
28
24
  export { CrossSellingIcon } from "./icons/CrossSellingIcon";
25
+ export { SearchModalCameraIcon } from "./icons/SearchModalCameraIcon";
26
+ export { SearchModalUploadIcon } from "./icons/SearchModalUploadIcon";
27
+ export { SearchModalFullSearchIcon } from "./icons/SearchModalFullSearchIcon";
28
+ export { SearchModalImageSearchIcon } from "./icons/SearchModalImageSearchIcon";
@@ -1,6 +1,6 @@
1
1
  import { Host, h, } from "@stencil/core";
2
2
  import { version } from "../../../package.json";
3
- import { CameraIcon } from "../vviinn-icons";
3
+ import { SearchModalCameraIcon, SearchModalUploadIcon, SearchModalFullSearchIcon, SearchModalImageSearchIcon, } from "../vviinn-icons";
4
4
  import { SlotSkeleton } from "../customized-slots";
5
5
  import { campaignTypeNames } from "../../campaign/Campaign";
6
6
  import { DEFAULT_EXAMPLE_IMAGE } from "../../assets/constants";
@@ -89,7 +89,7 @@ export class VviinnVpsButton {
89
89
  render() {
90
90
  return (h(Host, { tabindex: "0", role: "button" }, h("vviinn-button", { onClick: () => {
91
91
  this.handleClick();
92
- }, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), SlotSkeleton("vps"), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
92
+ }, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, this.mode === "camera" ? (h(SearchModalCameraIcon, null)) : this.mode === "upload" ? (h(SearchModalUploadIcon, null)) : this.textSearchShow ? (h(SearchModalFullSearchIcon, null)) : (h(SearchModalImageSearchIcon, null)))), SlotSkeleton("vps"), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
93
93
  (this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this) })));
94
94
  }
95
95
  static get is() { return "vviinn-vps-button"; }
@@ -1,3 +1,3 @@
1
- const version = "2.89.1";
1
+ const version = "2.91.0";
2
2
 
3
3
  export { version as v };
@@ -3,12 +3,14 @@ import { s as searchState, _ as _function, O as Option, k as fromAlt, l as foldV
3
3
  import { i as instance, r as resources, c as createTrackingApi, v as v4, n as createResultVpsEventByType, o as createProductVpsEventByType } from './index-279b5fe1.js';
4
4
  import { s as slotChangeListener, c as campaignTypeNames } from './customized-slots-7fa3856f.js';
5
5
  import { d as PlusIcon, c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, a as showActiveOnSubButton, R as RenderButton } from './emitRequestFiltersMore-35557c91.js';
6
- import { v as version } from './package-317e4435.js';
7
- import { C as CameraIcon } from './CameraIcon-785208d2.js';
6
+ import { v as version } from './package-ab978025.js';
8
7
 
9
8
  const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
10
9
  h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
11
10
 
11
+ const CameraIcon = () => (h("svg", { width: "22", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
12
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M16.567 3H19A3.01 3.01 0 0 1 22 6v7.69h-2V6c0-.55-.451-1-1.001-1h-3.502l-2.03-3H8.543L6.603 5H3.001c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h5.933v2H3.001A3.01 3.01 0 0 1 0 17V6c0-1.65 1.35-3 3.001-3h2.522l1.94-3h7.074l2.03 3Zm-5.562 3c1.28 0 2.561.48 3.542 1.46h-.01a4.992 4.992 0 0 1 .64 6.29l3.051 3.05-1.41 1.41-3.052-3.05c-.84.55-1.8.83-2.76.83-1.282 0-2.562-.48-3.543-1.46a5.002 5.002 0 0 1 0-7.07A5.026 5.026 0 0 1 11.005 6Zm-2.771 5a2.763 2.763 0 0 0 2.771 2.77A2.763 2.763 0 0 0 13.776 11a2.763 2.763 0 0 0-2.771-2.77A2.763 2.763 0 0 0 8.234 11Z", fill: "#161616" })));
13
+
12
14
  const MinusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13
15
  h("path", { d: "M8.00001 17.3333C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H8.00001Z", fill: "currentColor" })));
14
16
 
@@ -3,7 +3,7 @@ import { h as has, t as tuple, s as searchState, _ as _function, a as _Array, O
3
3
  import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton, f as fromString, a as fold } from './customized-slots-7fa3856f.js';
4
4
  import { c as calculatePriceLabel, s as subFilterSelection, e as emitRequestFiltersMore, C as CheckFilterIcon, S as SquareFilterIcon, a as showActiveOnSubButton, R as RenderButton, b as ResponsiveImage, I as Image, L as Linked, P as Price } from './emitRequestFiltersMore-35557c91.js';
5
5
  import { i as instance, r as resources, v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, j as createProductVprEventByType } from './index-279b5fe1.js';
6
- import { v as version } from './package-317e4435.js';
6
+ import { v as version } from './package-ab978025.js';
7
7
 
8
8
  const BasketIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
9
9
  h("g", { id: "shopping-bag" },
@@ -1,10 +1,15 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { v as version } from './package-317e4435.js';
2
+ import { v as version } from './package-ab978025.js';
3
3
 
4
- const SimilarProductsIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
5
- h("path", { d: "M20.8 2H11.2C10.54 2 10 2.54 10 3.2C10 3.86 10.54 4.4 11.2 4.4H19.6V12.8C19.6 13.46 20.14 14 20.8 14C21.46 14 22 13.46 22 12.8V3.2C22 2.54 21.46 2 20.8 2Z", fill: "#161616" }),
6
- h("path", { d: "M12.8 19.6H4.4V11.2C4.4 10.54 3.86 10 3.2 10C2.54 10 2 10.54 2 11.2V20.8C2 21.46 2.54 22 3.2 22H12.8C13.46 22 14 21.46 14 20.8C14 20.14 13.46 19.6 12.8 19.6Z", fill: "#161616" }),
7
- h("path", { d: "M14.8571 10.8571H13.1429V9.14286C13.1429 8.51429 12.6286 8 12 8C11.3714 8 10.8571 8.51429 10.8571 9.14286V10.8571H9.14286C8.51429 10.8571 8 11.3714 8 12C8 12.6286 8.51429 13.1429 9.14286 13.1429H10.8571V14.8571C10.8571 15.4857 11.3714 16 12 16C12.6286 16 13.1429 15.4857 13.1429 14.8571V13.1429H14.8571C15.4857 13.1429 16 12.6286 16 12C16 11.3714 15.4857 10.8571 14.8571 10.8571Z", fill: "#161616" })));
4
+ const SimilarProductsIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
5
+ h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
6
+ h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }),
7
+ h("path", { d: "M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z", fill: "#161616" }),
8
+ h("path", { d: "M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z", fill: "#161616" }),
9
+ h("path", { d: "M9 8H7C6.45 8 6 8.45 6 9C6 9.55 6.45 10 7 10H9V11C9 11.55 9.45 12 10 12C10.55 12 11 11.55 11 11V7C11 6.45 10.55 6 10 6C9.45 6 9 6.45 9 7V8Z", fill: "#161616" }),
10
+ h("path", { d: "M15 16H17C17.55 16 18 15.55 18 15C18 14.45 17.55 14 17 14H15V13C15 12.45 14.55 12 14 12C13.45 12 13 12.45 13 13V17C13 17.55 13.45 18 14 18C14.55 18 15 17.55 15 17V16Z", fill: "#161616" }),
11
+ h("path", { d: "M16 9C16 8.45 15.55 8 15 8H12V10H15C15.55 10 16 9.55 16 9Z", fill: "#161616" }),
12
+ h("path", { d: "M6 15C6 15.55 6.45 16 7 16H12V14H7C6.45 14 6 14.45 6 15Z", fill: "#161616" })));
8
13
 
9
14
  const CrossSellingIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
10
15
  h("path", { d: "M18.25 2H10.75C8.6875 2 7 3.6875 7 5.75V7H5.75C3.6875 7 2 8.6875 2 10.75V18.25C2 20.3125 3.6875 22 5.75 22H13.25C15.3125 22 17 20.3125 17 18.25H14.5C14.5 18.9375 13.9375 19.5 13.25 19.5H5.75C5.0625 19.5 4.5 18.9375 4.5 18.25V10.75C4.5 10.0625 5.0625 9.5 5.75 9.5H7V13.25C7 15.3125 8.6875 17 10.75 17H18.25C20.3125 17 22 15.3125 22 13.25V5.75C22 3.6875 20.3125 2 18.25 2ZM10.75 14.5C10.0625 14.5 9.5 13.9375 9.5 13.25V9.5H13.25C13.9375 9.5 14.5 10.0625 14.5 10.75V14.5H10.75ZM19.5 13.25C19.5 13.9375 18.9375 14.5 18.25 14.5H17V10.75C17 8.6875 15.3125 7 13.25 7H9.5V5.75C9.5 5.0625 10.0625 4.5 10.75 4.5H18.25C18.9375 4.5 19.5 5.0625 19.5 5.75V13.25Z", fill: "#161616" })));
@@ -1,9 +1,27 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { v as version } from './package-317e4435.js';
3
- import { C as CameraIcon } from './CameraIcon-785208d2.js';
1
+ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
+ import { v as version } from './package-ab978025.js';
4
3
  import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-7fa3856f.js';
5
4
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
6
5
 
6
+ const SearchModalCameraIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
7
+ h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M18 4H20C22.21 4 24 5.79 24 8V16H22V8C22 6.9 21.1 6 20 6H16.93L16.34 5.11L14.93 3H9.07L7.66 5.11L7.07 6H4C2.9 6 2 6.9 2 8V18C2 19.1 2.9 20 4 20H9V22H4C1.79 22 0 20.21 0 18V8C0 5.79 1.79 4 4 4H6L8 1H16L18 4ZM12 8C14.76 8 17 10.24 17 13L16.99 13.01C16.99 14.02 16.68 14.97 16.16 15.76L20.7 20.3L19.29 21.71L14.75 17.17C13.96 17.69 13.02 18 12 18C9.24 18 7 15.76 7 13C7 10.24 9.24 8 12 8ZM9 13C9 14.65 10.35 16 12 16C13.65 16 15 14.65 15 13C15 11.35 13.65 10 12 10C10.35 10 9 11.35 9 13Z", fill: "#161616" })));
8
+
9
+ const SearchModalUploadIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
10
+ h("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H13C13.2833 3 13.5208 3.09583 13.7125 3.2875C13.9042 3.47917 14 3.71667 14 4C14 4.28333 13.9042 4.52083 13.7125 4.7125C13.5208 4.90417 13.2833 5 13 5H5V19H19V11C19 10.7167 19.0958 10.4792 19.2875 10.2875C19.4792 10.0958 19.7167 10 20 10C20.2833 10 20.5208 10.0958 20.7125 10.2875C20.9042 10.4792 21 10.7167 21 11V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM17 7H16C15.7167 7 15.4792 6.90417 15.2875 6.7125C15.0958 6.52083 15 6.28333 15 6C15 5.71667 15.0958 5.47917 15.2875 5.2875C15.4792 5.09583 15.7167 5 16 5H17V4C17 3.71667 17.0958 3.47917 17.2875 3.2875C17.4792 3.09583 17.7167 3 18 3C18.2833 3 18.5208 3.09583 18.7125 3.2875C18.9042 3.47917 19 3.71667 19 4V5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H19V8C19 8.28333 18.9042 8.52083 18.7125 8.7125C18.5208 8.90417 18.2833 9 18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V7ZM11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16Z", fill: "#161616" })));
11
+
12
+ const SearchModalFullSearchIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
13
+ h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }),
14
+ h("path", { d: "M20 8C20 5.79 18.21 4 16 4H15V2H16C19.31 2 22 4.69 22 8V9H20V8Z", fill: "#161616" }),
15
+ h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
16
+ h("path", { d: "M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C13.02 17 13.96 16.69 14.75 16.17L19.29 20.71L20.7 19.3L16.16 14.76C16.68 13.97 16.99 13.02 16.99 12.01L17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z", fill: "#161616" })));
17
+
18
+ const SearchModalImageSearchIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
19
+ h("path", { d: "M4 8C4 5.79 5.79 4 8 4H9V2H8C4.69 2 2 4.69 2 8V9H4V8Z", fill: "#161616" }),
20
+ h("path", { d: "M4 16V15H2V16C2 19.31 4.69 22 8 22H9V20H8C5.79 20 4 18.21 4 16Z", fill: "#161616" }),
21
+ h("path", { d: "M20 16C20 18.21 18.21 20 16 20H15V22H16C19.31 22 22 19.31 22 16V15H20V16Z", fill: "#161616" }),
22
+ h("path", { d: "M16 2H15V4H16C18.21 4 20 5.79 20 8V9H22V8C22 4.69 19.31 2 16 2Z", fill: "#161616" }),
23
+ h("path", { d: "M17 12C17 9.24 14.76 7 12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12ZM12 15C10.35 15 9 13.65 9 12C9 10.35 10.35 9 12 9C13.65 9 15 10.35 15 12C15 13.65 13.65 15 12 15Z", fill: "#161616" })));
24
+
7
25
  const vviinnVpsButtonCss = ":host{display:block;line-height:0}";
8
26
 
9
27
  const VviinnVpsButton = class {
@@ -69,7 +87,7 @@ const VviinnVpsButton = class {
69
87
  render() {
70
88
  return (h(Host, { tabindex: "0", role: "button" }, h("vviinn-button", { onClick: () => {
71
89
  this.handleClick();
72
- }, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, h(CameraIcon, null))), SlotSkeleton("vps"), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
90
+ }, addStyle: this.addStyle, part: "vviinn-button" }, h("slot", null, this.mode === "camera" ? (h(SearchModalCameraIcon, null)) : this.mode === "upload" ? (h(SearchModalUploadIcon, null)) : this.textSearchShow ? (h(SearchModalFullSearchIcon, null)) : (h(SearchModalImageSearchIcon, null)))), SlotSkeleton("vps"), h("vviinn-vps-widget", { mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, apiPath: this.apiPath, campaignId: this.campaignId, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton.bind(this), buttonElementId: this.el.id, active: this.buttonPressed &&
73
91
  (this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this) })));
74
92
  }
75
93
  get el() { return getElement(this); }
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-abf408d8.js';
2
2
  import { s as searchState, d as state, j as parseExcludedToParams, O as Option } from './search.store-24896fcf.js';
3
3
  import { i as instance, r as resources, k as createSearchEvent, l as createFilterEvent, v as v4, c as createTrackingApi, m as createWidgetVpsEvent } from './index-279b5fe1.js';
4
- import { v as version } from './package-317e4435.js';
4
+ import { v as version } from './package-ab978025.js';
5
5
  import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-7fa3856f.js';
6
6
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
7
7
 
@@ -0,0 +1 @@
1
+ export declare const SearchModalCameraIcon: () => any;
@@ -0,0 +1 @@
1
+ export declare const SearchModalFullSearchIcon: () => any;
@@ -0,0 +1 @@
1
+ export declare const SearchModalImageSearchIcon: () => any;
@@ -0,0 +1 @@
1
+ export declare const SearchModalUploadIcon: () => any;
@@ -4,10 +4,7 @@ export { CameraActionIcon } from "./icons/CameraActionIcon";
4
4
  export { CameraIcon } from "./icons/CameraIcon";
5
5
  export { CheckCircleIcon } from "./icons/CheckCircleIcon";
6
6
  export { ChevronIcon } from "./icons/ChevronIcon";
7
- export { CloseIcon } from "./icons/CloseIcon";
8
7
  export { CrossIcon } from "./icons/CrossIcon";
9
- export { GalleryActionIcon } from "./icons/GalleryActionIcon";
10
- export { LoaderIcon } from "./icons/LoaderIcon";
11
8
  export { MinusIcon } from "./icons/MinusIcon";
12
9
  export { PlusIcon } from "./icons/PlusIcon";
13
10
  export { RoundCameraIcon } from "./icons/RoundCameraIcon";
@@ -20,9 +17,12 @@ export { WarningIcon } from "./icons/WarningIcon";
20
17
  export { PhotoFrameCorner } from "./icons/PhotoFrameCorner";
21
18
  export { FiltersIcon } from "./icons/FiltersIcon";
22
19
  export { NewCloseIcon } from "./icons/NewCloseIcon";
23
- export { StarsIcon } from "./icons/StarsIcon";
24
20
  export { CheckFilterIcon } from "./icons/CheckFilterIcon";
25
21
  export { CloseFilterIcon } from "./icons/CloseFilterIcon";
26
22
  export { SquareFilterIcon } from "./icons/SquareFilterIcon";
27
23
  export { SimilarProductsIcon } from "./icons/SimilarProductsIcon";
28
24
  export { CrossSellingIcon } from "./icons/CrossSellingIcon";
25
+ export { SearchModalCameraIcon } from "./icons/SearchModalCameraIcon";
26
+ export { SearchModalUploadIcon } from "./icons/SearchModalUploadIcon";
27
+ export { SearchModalFullSearchIcon } from "./icons/SearchModalFullSearchIcon";
28
+ export { SearchModalImageSearchIcon } from "./icons/SearchModalImageSearchIcon";
@@ -1 +1 @@
1
- import{h as t,r as i,c as e,F as s,H as o,g as r}from"./p-1c863deb.js";import{s as a,d as n,j as c,O as l}from"./p-042b091b.js";import{i as h,r as d,k as p,l as g,v as u,c as v,m as f}from"./p-707f4189.js";import{v as b}from"./p-d6cb79c1.js";import{c as m,s as x,S as y}from"./p-499b1c72.js";import{D as w}from"./p-cc013cd2.js";const C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M12 17.5C13.25 17.5 14.3125 17.0625 15.1875 16.1875C16.0625 15.3125 16.5 14.25 16.5 13C16.5 11.75 16.0625 10.6875 15.1875 9.8125C14.3125 8.9375 13.25 8.5 12 8.5C10.75 8.5 9.6875 8.9375 8.8125 9.8125C7.9375 10.6875 7.5 11.75 7.5 13C7.5 14.25 7.9375 15.3125 8.8125 16.1875C9.6875 17.0625 10.75 17.5 12 17.5ZM12 15.5C11.3 15.5 10.7083 15.2583 10.225 14.775C9.74167 14.2917 9.5 13.7 9.5 13C9.5 12.3 9.74167 11.7083 10.225 11.225C10.7083 10.7417 11.3 10.5 12 10.5C12.7 10.5 13.2917 10.7417 13.775 11.225C14.2583 11.7083 14.5 12.3 14.5 13C14.5 13.7 14.2583 14.2917 13.775 14.775C13.2917 15.2583 12.7 15.5 12 15.5ZM4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V7C2 6.45 2.19583 5.97917 2.5875 5.5875C2.97917 5.19583 3.45 5 4 5H7.15L8.4 3.65C8.58333 3.45 8.80417 3.29167 9.0625 3.175C9.32083 3.05833 9.59167 3 9.875 3H14.125C14.4083 3 14.6792 3.05833 14.9375 3.175C15.1958 3.29167 15.4167 3.45 15.6 3.65L16.85 5H20C20.55 5 21.0208 5.19583 21.4125 5.5875C21.8042 5.97917 22 6.45 22 7V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4Z",fill:"currentColor"})),k=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4.5 21C4.1 21 3.75 20.85 3.45 20.55C3.15 20.25 3 19.9 3 19.5V4.5C3 4.1 3.15 3.75 3.45 3.45C3.75 3.15 4.1 3 4.5 3H19.5C19.9 3 20.25 3.15 20.55 3.45C20.85 3.75 21 4.1 21 4.5V19.5C21 19.9 20.85 20.25 20.55 20.55C20.25 20.85 19.9 21 19.5 21H4.5ZM6.65 17.075H17.375C17.525 17.075 17.6333 17.0083 17.7 16.875C17.7667 16.7417 17.7583 16.6083 17.675 16.475L14.75 12.575C14.6667 12.475 14.5667 12.425 14.45 12.425C14.3333 12.425 14.2333 12.475 14.15 12.575L11.15 16.45L9.125 13.675C9.04167 13.575 8.94167 13.525 8.825 13.525C8.70833 13.525 8.60833 13.575 8.525 13.675L6.375 16.475C6.275 16.6083 6.25833 16.7417 6.325 16.875C6.39167 17.0083 6.5 17.075 6.65 17.075Z",fill:"currentColor"})),S={facingMode:"environment",width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}};var I=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)i.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(e[s[o]]=t[s[o]])}return e};const j=class{constructor(s){i(this,s),this.globalSlotsChanged=e(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=e(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=e(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.vviinnImageCrop=e(this,"vviinnImageCrop",7),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.imageSource=null,this.cameraAvailable=!1,this.isDesktop=!1,this.videoTrack=null,this.handleVviinnImageUpload=t=>{this.trackInitialSearch(),this.uploadSource=t},this.handleVviinnImageUploadFinished=()=>{this.handleImageSelection(),"upload"===this.mode&&this.showingInButton&&(this.active=!0)},this.handleVviinnNoResult=t=>{"client"===t.reason&&(this.wrongImageFormat=!0)},this.adjustCameraSettings=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};if("focusMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{focusMode:"continuous"}]})}catch(t){console.error("Failed to apply focus mode constraints",t)}if("exposureMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{exposureMode:"continuous"}]})}catch(t){console.error("Failed to apply exposure mode constraints",t)}if("whiteBalanceMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{whiteBalanceMode:"continuous"}]})}catch(t){console.error("Failed to apply white balance mode constraints",t)}},this.handleStartCameraClick=async()=>{this.stream?this.resetState():(this.cameraInitializing=!0,setTimeout((async()=>{this.cameraButtonClicked=!0;try{const t=await navigator.mediaDevices.getUserMedia({video:S});this.videoTrack=t.getVideoTracks()[0],this.adjustCameraSettings(),this.stream=t,this.uploadSource="startCamera"}catch(t){console.log("Error accessing camera: ",t.message),this.resetState(),this.cameraInitializing=!1}}),500))},this.setShowAspectRatioError=t=>{this.showAspectRatioError=t},this.setTrackingDeactivated=t=>{"rejected"===t.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var t;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:m.VPS,widgetId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.widgetElementId,widgetVersion:b}},this.LinkText=({href:i,children:e})=>t("a",{href:i||""},e),this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=250,this.exampleImageSource=w,this.textSearchShow=!1,this.apiPath="https://api.vviinn.com",this.showingInButton=!1,this.buttonElementId=void 0,this.buttonPressed=void 0,this.mode="modal",this.resetVpsButton=void 0,this.replaceSlotsContentInButton=void 0,this.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.trackingDeactivated=!1,this.stream=null,this.cameraInitializing=!1,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.uploadSource=void 0,this.showAspectRatioError=!1,this.products=[],this.searchQuery=""}initResultEvents(){a.resultLoaded=!1,a.resultViewed=!1}replaceSlotsContent(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit({slots:Array.from(t),element:this.el})}stopStreamTracks(){var t;null===(t=this.stream)||void 0===t||t.getTracks().forEach((t=>{t.stop()}))}isOnboardingSlide(){return 0===this.slidePosition}isResultSlide(){return 1===this.slidePosition}async componentWillLoad(){await h.init({lng:this.locale,fallbackLng:"en",resources:d}),x(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData()),this.trackWidgetEvent("load")}componentDidLoad(){this.replaceSlotsContent()}activeWatcher(t){t?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.vviinnWidgetOpen.emit(this.getBasicEventData()),"camera"===this.mode&&this.handleStartCameraClick(),this.trackWidgetEvent("open")):(document.body.style.overflow=this.overflow,this.initResultEvents())}textSearchFinishedHandler({detail:t}){this.searchQuery=t.query,this.slidePosition=1}resultLoadHandler(){a.resultLoaded=!0}resultViewHandler(){a.resultViewed=!0}trackCameraEnabled({detail:t}){this.cameraEnabled=t,this.cameraInitializing=!1}trachSearchAreaChanges(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=p(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=p(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackFilterSelected({detail:t}){if(this.initResultEvents(),this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId"]),s=g(Object.assign({session_id:this.uiSessionId,source:this.imageSource,kind:t.kind,action:t.action},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}connectedCallback(){this.isDesktop="desktop"===(()=>{const t=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(t)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(t)?"mobile":"desktop"})(),n.apiPath=this.apiPath,n.currencySign=this.currencySign,n.locale=this.locale,this.cameraAvailable=!!navigator.mediaDevices&&!!navigator.mediaDevices.getUserMedia,this.excluded&&(this.excluded=c(this.excluded)),a.token=this.token,a.campaignId=this.campaignId,a.excluded=this.excluded,this.uiSessionId=u(),this.trackingApi=v(this.apiPath,this.token),this.widgetElementId=this.el.id}trackWidgetEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]),s=Object.assign({action:t,session_id:this.uiSessionId},e),o=f(s);this.trackingApi.trackEvent(o).then(this.setTrackingDeactivated)}trackInitialSearch(){if(this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId","widgetType"]),e=p(Object.assign({session_id:this.uiSessionId,search_area:"full",source:"upload"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}handleImageSelection(){this.imageSource="upload",this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.stopStreamTracks()}renderButtons(){const i=a.loading&&"image"===a.searchType&&"startCamera"===this.uploadSource||this.cameraInitializing,e=[this.cameraAvailable&&t("button",{class:"action-button",part:"start-camera_button",onClick:()=>{this.handleStartCameraClick()}},t("vviinn-preloader",{class:{hidden:!i}}),t("span",{class:{"action-button-content":!0,hidden:i}},t("slot",{name:"vviinn-camera-icon"},t(C,null)),t("span",{class:{hidden:!this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-stop"},h.t("cameraButtonTextStop"))),t("span",{class:{hidden:this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-start"},h.t("cameraButtonTextStart"))))),t("vviinn-image-selector",{class:"action-button",onClick:()=>this.uploadSource="uploadPhoto",onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("uploadPhoto")},onVviinnNoResult:({detail:t})=>this.handleVviinnNoResult(t),resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"upload-photo_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode,loading:a.loading&&"image"===a.searchType&&"uploadPhoto"===this.uploadSource},t("span",{slot:"upload-button-text",class:"action-button-content"},t("slot",{name:"vviinn-image-upload-icon"},t(k,null)),t("slot",{name:"vviinn-image-upload-button-text"},t("span",null,h.t("imageUploadButtonText")))))];return this.isDesktop?e.reverse():e}resetState(){this.resetScroll("start-page_block"),this.slidePosition=0,a.resetCategoryLink=void 0,a.activeIonLink=void 0,a.image=l.none,a.imageUrl=l.none,a.imageBounds=l.none,a.searchArea=l.none,a.results=[],a.filters=[],a.textSearchFilters=[],a.detectedObjects=[],a.rectangleSearchForm=void 0,a.loading=!1,a.serverError=!1,a.searchType=void 0,this.searchQuery="",this.wrongImageFormat=!1,this.resetScroll("results-block"),this.stopStreamTracks(),this.initResultEvents(),this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.cameraInitializing=!1,this.setShowAspectRatioError(!1)}haveErrors(){return this.wrongImageFormat||a.serverError}resetScroll(t,i="auto"){const e=this.el.shadowRoot.getElementById(t);null==e||e.scroll({top:0,left:0,behavior:i})}handleModalClose(){this.active=!1,this.resetState(),["start-page_block","results-block"].forEach((t=>this.resetScroll(t))),this.trackWidgetEvent("close")}render(){var i,e;return t(o,{exportparts:"brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, upload-photo_button, show-files_button, start-camera_button, text-search-input, close-button, secondary-action, close-button"},!this.showingInButton&&y("vps"),t("vviinn-overlayed-modal",{class:{"first-screen":this.isOnboardingSlide()},isFirstScreen:this.isOnboardingSlide(),active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.widgetElementId,widgetVersion:b,hideBackButton:"upload"===this.mode&&this.showingInButton||!this.cameraEnabled&&this.isOnboardingSlide(),exportparts:"secondary-action, title, close-button"},t("vviinn-slider",{showBullets:!1,position:this.slidePosition},t("vviinn-slide",{class:{"start-page":!0,"camera-enabled":this.cameraEnabled}},t("vviinn-example-image",{onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("startCamera")},basicEventData:this.getBasicEventData(),srcObject:this.stream,cameraButtonClicked:this.cameraButtonClicked,exampleImageSource:this.exampleImageSource}),t("div",{class:{error:this.haveErrors()},id:"start-page_block"},t("div",{class:"start-page_main-content"},t("div",{class:{"start-page_errors-block":!0,hidden:!this.wrongImageFormat&&!a.serverError}},t("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.resetState()}),t("vviinn-server-error",{class:{hidden:!a.serverError},handler:()=>this.resetState()})),!this.haveErrors()&&t(s,null,t("vviinn-teaser",null),t("div",{class:"buttons-group"},this.renderButtons()),this.textSearchShow&&t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}))),t("vviinn-privacy-badge",{privacyBadgeText:h.t("privacyBadgeText",{interpolation:{escapeValue:!1}}),class:{invisible:this.haveErrors()}}))),t("vviinn-slide",{class:{"results-page":!0,active:this.isResultSlide()}},this.isResultSlide()&&"image"===a.searchType&&t("div",{class:"source-wrapper image-wrapper"},t("vviinn-image-view",{basicEventData:this.getBasicEventData(),setShowAspectRatioError:this.setShowAspectRatioError,showAspectRatioError:this.showAspectRatioError}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"filters"},a.filters.map((i=>t("search-filters",{filter:i,basicEventData:this.getBasicEventData()})))))),this.isResultSlide()&&"text"===a.searchType&&t("div",{class:"source-wrapper text-search-wrapper"},t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"vviinn-filters-container"},t("vviinn-filters",{filters:a.textSearchFilters,showInWidget:!0}),t("vviinn-selected-filters",{showInWidget:!0})))),this.isResultSlide()&&t("vviinn-results",{token:this.token,uiSessionId:this.uiSessionId,apiPath:this.apiPath,widgetElementId:null!==(e=this.buttonElementId)&&void 0!==e?e:this.widgetElementId,showInWidget:!0,buttonElementId:this.buttonElementId,imageResolutionWidth:this.imageResolutionWidth,"currency-sign":this.currencySign,locale:this.locale,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,showAspectRatioError:this.showAspectRatioError,trackingDeactivated:this.trackingDeactivated,resetState:this.resetState.bind(this),replaceSlotsContentInWidget:this.replaceSlotsContent.bind(this),replaceSlotsContentInButton:this.replaceSlotsContentInButton,textSearchQuery:this.searchQuery})))))}get el(){return r(this)}static get watchers(){return{active:["activeWatcher"]}}};j.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;--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-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:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--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:#525252;--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;--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;--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;}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:40px 62px}#start-page_block.error{align-content:center}#start-page_block vviinn-text-search{margin-top:12px}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{font-family:inherit;display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--button-bg-color-primary));border-color:var(--color-primary, var(--button-bg-color-primary));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--button-bg-color-primary-hover));border-color:var(\n --color-primary-hover,\n var(--button-bg-color-primary-hover)\n )}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.source-wrapper{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.source-wrapper.text-search-wrapper{padding:24px 24px 0 24px}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--button-bg-color-primary));color:white}.results-page:not(.active){display:none}.results-page vviinn-text-search{width:calc(100% + 24px)}vviinn-preloader{--preloader-size:24px;display:flex}@media (max-width: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.results-page vviinn-text-search{width:auto}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.source-wrapper{grid-template-rows:min-content auto;width:100%;padding:0}.source-wrapper.image-wrapper .filters-wrapper{padding-left:24px;min-width:100%}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px 20px}}@media (max-width: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{j as vviinn_vps_widget}
1
+ import{h as t,r as i,c as e,F as s,H as o,g as r}from"./p-1c863deb.js";import{s as a,d as n,j as l,O as c}from"./p-042b091b.js";import{i as h,r as d,k as p,l as g,v as u,c as v,m as f}from"./p-707f4189.js";import{v as b}from"./p-59014f1e.js";import{c as m,s as x,S as y}from"./p-499b1c72.js";import{D as w}from"./p-cc013cd2.js";const C=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M12 17.5C13.25 17.5 14.3125 17.0625 15.1875 16.1875C16.0625 15.3125 16.5 14.25 16.5 13C16.5 11.75 16.0625 10.6875 15.1875 9.8125C14.3125 8.9375 13.25 8.5 12 8.5C10.75 8.5 9.6875 8.9375 8.8125 9.8125C7.9375 10.6875 7.5 11.75 7.5 13C7.5 14.25 7.9375 15.3125 8.8125 16.1875C9.6875 17.0625 10.75 17.5 12 17.5ZM12 15.5C11.3 15.5 10.7083 15.2583 10.225 14.775C9.74167 14.2917 9.5 13.7 9.5 13C9.5 12.3 9.74167 11.7083 10.225 11.225C10.7083 10.7417 11.3 10.5 12 10.5C12.7 10.5 13.2917 10.7417 13.775 11.225C14.2583 11.7083 14.5 12.3 14.5 13C14.5 13.7 14.2583 14.2917 13.775 14.775C13.2917 15.2583 12.7 15.5 12 15.5ZM4 21C3.45 21 2.97917 20.8042 2.5875 20.4125C2.19583 20.0208 2 19.55 2 19V7C2 6.45 2.19583 5.97917 2.5875 5.5875C2.97917 5.19583 3.45 5 4 5H7.15L8.4 3.65C8.58333 3.45 8.80417 3.29167 9.0625 3.175C9.32083 3.05833 9.59167 3 9.875 3H14.125C14.4083 3 14.6792 3.05833 14.9375 3.175C15.1958 3.29167 15.4167 3.45 15.6 3.65L16.85 5H20C20.55 5 21.0208 5.19583 21.4125 5.5875C21.8042 5.97917 22 6.45 22 7V19C22 19.55 21.8042 20.0208 21.4125 20.4125C21.0208 20.8042 20.55 21 20 21H4Z",fill:"currentColor"})),k=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M4.5 21C4.1 21 3.75 20.85 3.45 20.55C3.15 20.25 3 19.9 3 19.5V4.5C3 4.1 3.15 3.75 3.45 3.45C3.75 3.15 4.1 3 4.5 3H19.5C19.9 3 20.25 3.15 20.55 3.45C20.85 3.75 21 4.1 21 4.5V19.5C21 19.9 20.85 20.25 20.55 20.55C20.25 20.85 19.9 21 19.5 21H4.5ZM6.65 17.075H17.375C17.525 17.075 17.6333 17.0083 17.7 16.875C17.7667 16.7417 17.7583 16.6083 17.675 16.475L14.75 12.575C14.6667 12.475 14.5667 12.425 14.45 12.425C14.3333 12.425 14.2333 12.475 14.15 12.575L11.15 16.45L9.125 13.675C9.04167 13.575 8.94167 13.525 8.825 13.525C8.70833 13.525 8.60833 13.575 8.525 13.675L6.375 16.475C6.275 16.6083 6.25833 16.7417 6.325 16.875C6.39167 17.0083 6.5 17.075 6.65 17.075Z",fill:"currentColor"})),S={facingMode:"environment",width:{ideal:1920},height:{ideal:1080},frameRate:{ideal:30}};var I=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(s=Object.getOwnPropertySymbols(t);o<s.length;o++)i.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(t,s[o])&&(e[s[o]]=t[s[o]])}return e};const j=class{constructor(s){i(this,s),this.globalSlotsChanged=e(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=e(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=e(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=e(this,"vviinnWidgetClose",7),this.vviinnImageCrop=e(this,"vviinnImageCrop",7),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.imageSource=null,this.cameraAvailable=!1,this.isDesktop=!1,this.videoTrack=null,this.handleVviinnImageUpload=t=>{this.trackInitialSearch(),this.uploadSource=t},this.handleVviinnImageUploadFinished=()=>{this.handleImageSelection(),"upload"===this.mode&&this.showingInButton&&(this.active=!0)},this.handleVviinnNoResult=t=>{"client"===t.reason&&(this.wrongImageFormat=!0)},this.adjustCameraSettings=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};if("focusMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{focusMode:"continuous"}]})}catch(t){console.error("Failed to apply focus mode constraints",t)}if("exposureMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{exposureMode:"continuous"}]})}catch(t){console.error("Failed to apply exposure mode constraints",t)}if("whiteBalanceMode"in i)try{await this.videoTrack.applyConstraints({advanced:[{whiteBalanceMode:"continuous"}]})}catch(t){console.error("Failed to apply white balance mode constraints",t)}},this.handleStartCameraClick=async()=>{this.stream?this.resetState():(this.cameraInitializing=!0,setTimeout((async()=>{this.cameraButtonClicked=!0;try{const t=await navigator.mediaDevices.getUserMedia({video:S});this.videoTrack=t.getVideoTracks()[0],this.adjustCameraSettings(),this.stream=t,this.uploadSource="startCamera"}catch(t){console.log("Error accessing camera: ",t.message),this.resetState(),this.cameraInitializing=!1}}),500))},this.setShowAspectRatioError=t=>{this.showAspectRatioError=t},this.setTrackingDeactivated=t=>{"rejected"===t.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var t;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:m.VPS,widgetId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.widgetElementId,widgetVersion:b}},this.LinkText=({href:i,children:e})=>t("a",{href:i||""},e),this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=250,this.exampleImageSource=w,this.textSearchShow=!1,this.apiPath="https://api.vviinn.com",this.showingInButton=!1,this.buttonElementId=void 0,this.buttonPressed=void 0,this.mode="modal",this.resetVpsButton=void 0,this.replaceSlotsContentInButton=void 0,this.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.trackingDeactivated=!1,this.stream=null,this.cameraInitializing=!1,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.uploadSource=void 0,this.showAspectRatioError=!1,this.products=[],this.searchQuery=""}initResultEvents(){a.resultLoaded=!1,a.resultViewed=!1}replaceSlotsContent(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit({slots:Array.from(t),element:this.el})}stopStreamTracks(){var t;null===(t=this.stream)||void 0===t||t.getTracks().forEach((t=>{t.stop()}))}isOnboardingSlide(){return 0===this.slidePosition}isResultSlide(){return 1===this.slidePosition}async componentWillLoad(){await h.init({lng:this.locale,fallbackLng:"en",resources:d}),x(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData()),this.trackWidgetEvent("load")}componentDidLoad(){this.replaceSlotsContent()}activeWatcher(t){t?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.vviinnWidgetOpen.emit(this.getBasicEventData()),"camera"===this.mode&&this.handleStartCameraClick(),this.trackWidgetEvent("open")):(document.body.style.overflow=this.overflow,this.initResultEvents())}textSearchFinishedHandler({detail:t}){this.searchQuery=t.query,this.slidePosition=1}resultLoadHandler(){a.resultLoaded=!0}resultViewHandler(){a.resultViewed=!0}trackCameraEnabled({detail:t}){this.cameraEnabled=t,this.cameraInitializing=!1}trachSearchAreaChanges(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=p(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=p(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackFilterSelected({detail:t}){if(this.initResultEvents(),this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId"]),s=g(Object.assign({session_id:this.uiSessionId,source:this.imageSource,kind:t.kind,action:t.action},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}connectedCallback(){this.isDesktop="desktop"===(()=>{const t=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(t)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(t)?"mobile":"desktop"})(),n.apiPath=this.apiPath,n.currencySign=this.currencySign,n.locale=this.locale,this.cameraAvailable=!!navigator.mediaDevices&&!!navigator.mediaDevices.getUserMedia,this.excluded&&(this.excluded=l(this.excluded)),a.token=this.token,a.campaignId=this.campaignId,a.excluded=this.excluded,this.uiSessionId=u(),this.trackingApi=v(this.apiPath,this.token),this.widgetElementId=this.el.id}trackWidgetEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]),s=Object.assign({action:t,session_id:this.uiSessionId},e),o=f(s);this.trackingApi.trackEvent(o).then(this.setTrackingDeactivated)}trackInitialSearch(){if(this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId","widgetType"]),e=p(Object.assign({session_id:this.uiSessionId,search_area:"full",source:"upload"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}handleImageSelection(){this.imageSource="upload",this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.stopStreamTracks()}renderButtons(){const i=a.loading&&"image"===a.searchType&&"startCamera"===this.uploadSource||this.cameraInitializing,e=[this.cameraAvailable&&t("button",{class:"action-button",part:"start-camera_button",onClick:()=>{this.handleStartCameraClick()}},t("vviinn-preloader",{class:{hidden:!i}}),t("span",{class:{"action-button-content":!0,hidden:i}},t("slot",{name:"vviinn-camera-icon"},t(C,null)),t("span",{class:{hidden:!this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-stop"},h.t("cameraButtonTextStop"))),t("span",{class:{hidden:this.cameraEnabled}},t("slot",{name:"vviinn-camera-button-text-start"},h.t("cameraButtonTextStart"))))),t("vviinn-image-selector",{class:"action-button",onClick:()=>this.uploadSource="uploadPhoto",onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("uploadPhoto")},onVviinnNoResult:({detail:t})=>this.handleVviinnNoResult(t),resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"upload-photo_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode,loading:a.loading&&"image"===a.searchType&&"uploadPhoto"===this.uploadSource},t("span",{slot:"upload-button-text",class:"action-button-content"},t("slot",{name:"vviinn-image-upload-icon"},t(k,null)),t("slot",{name:"vviinn-image-upload-button-text"},t("span",null,h.t("imageUploadButtonText")))))];return this.isDesktop?e.reverse():e}resetState(){this.resetScroll("start-page_block"),this.slidePosition=0,a.resetCategoryLink=void 0,a.activeIonLink=void 0,a.image=c.none,a.imageUrl=c.none,a.imageBounds=c.none,a.searchArea=c.none,a.results=[],a.filters=[],a.textSearchFilters=[],a.detectedObjects=[],a.rectangleSearchForm=void 0,a.loading=!1,a.serverError=!1,a.searchType=void 0,this.searchQuery="",this.wrongImageFormat=!1,this.resetScroll("results-block"),this.stopStreamTracks(),this.initResultEvents(),this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.cameraInitializing=!1,this.setShowAspectRatioError(!1)}haveErrors(){return this.wrongImageFormat||a.serverError}resetScroll(t,i="auto"){const e=this.el.shadowRoot.getElementById(t);null==e||e.scroll({top:0,left:0,behavior:i})}handleModalClose(){this.active=!1,this.resetState(),["start-page_block","results-block"].forEach((t=>this.resetScroll(t))),this.trackWidgetEvent("close")}render(){var i,e;return t(o,{exportparts:"brand, deeplink, currency, image, image-link, price-amount-sale, price-amount-outdated, price-amount-regular, price-container, price-outdated, price-regular, price-sale, price-prefix, title, product-card, upload-photo_button, show-files_button, start-camera_button, text-search-input, close-button, secondary-action, close-button"},!this.showingInButton&&y("vps"),t("vviinn-overlayed-modal",{class:{"first-screen":this.isOnboardingSlide()},isFirstScreen:this.isOnboardingSlide(),active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.widgetElementId,widgetVersion:b,hideBackButton:"upload"===this.mode&&this.showingInButton||!this.cameraEnabled&&this.isOnboardingSlide(),exportparts:"secondary-action, title, close-button"},t("vviinn-slider",{showBullets:!1,position:this.slidePosition},t("vviinn-slide",{class:{"start-page":!0,"camera-enabled":this.cameraEnabled}},t("vviinn-example-image",{onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("startCamera")},basicEventData:this.getBasicEventData(),srcObject:this.stream,cameraButtonClicked:this.cameraButtonClicked,exampleImageSource:this.exampleImageSource}),t("div",{class:{error:this.haveErrors()},id:"start-page_block"},t("div",{class:"start-page_main-content"},t("div",{class:{"start-page_errors-block":!0,hidden:!this.wrongImageFormat&&!a.serverError}},t("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.resetState()}),t("vviinn-server-error",{class:{hidden:!a.serverError},handler:()=>this.resetState()})),!this.haveErrors()&&t(s,null,t("vviinn-teaser",null),t("div",{class:"buttons-group"},this.renderButtons()),this.textSearchShow&&t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}))),t("vviinn-privacy-badge",{privacyBadgeText:h.t("privacyBadgeText",{interpolation:{escapeValue:!1}}),class:{invisible:this.haveErrors()}}))),t("vviinn-slide",{class:{"results-page":!0,active:this.isResultSlide()}},this.isResultSlide()&&"image"===a.searchType&&t("div",{class:"source-wrapper image-wrapper"},t("vviinn-image-view",{basicEventData:this.getBasicEventData(),setShowAspectRatioError:this.setShowAspectRatioError,showAspectRatioError:this.showAspectRatioError}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"filters"},a.filters.map((i=>t("search-filters",{filter:i,basicEventData:this.getBasicEventData()})))))),this.isResultSlide()&&"text"===a.searchType&&t("div",{class:"source-wrapper text-search-wrapper"},t("vviinn-text-search",{token:this.token,showInWidget:!0,searchQuery:this.searchQuery,apiPath:this.apiPath,locale:this.locale}),t("div",{class:{"filters-wrapper":!0,hidden:this.showAspectRatioError}},t("div",{class:"vviinn-filters-container"},t("vviinn-filters",{filters:a.textSearchFilters,showInWidget:!0}),t("vviinn-selected-filters",{showInWidget:!0})))),this.isResultSlide()&&t("vviinn-results",{token:this.token,uiSessionId:this.uiSessionId,apiPath:this.apiPath,widgetElementId:null!==(e=this.buttonElementId)&&void 0!==e?e:this.widgetElementId,showInWidget:!0,buttonElementId:this.buttonElementId,imageResolutionWidth:this.imageResolutionWidth,"currency-sign":this.currencySign,locale:this.locale,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,showAspectRatioError:this.showAspectRatioError,trackingDeactivated:this.trackingDeactivated,resetState:this.resetState.bind(this),replaceSlotsContentInWidget:this.replaceSlotsContent.bind(this),replaceSlotsContentInButton:this.replaceSlotsContentInButton,textSearchQuery:this.searchQuery})))))}get el(){return r(this)}static get watchers(){return{active:["activeWatcher"]}}};j.style=":host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;--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-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:130px;--product-card-results-min-width:250px;--image-set-mode-min-size:155px;--product-card-set-mode-max-width:300px;--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:#525252;--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;--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;--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;}:host{display:block}.hidden{visibility:hidden;height:1px}vviinn-overlayed-modal.first-screen::part(title),vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:hidden}.start-page{display:grid;grid-template-columns:repeat(2, 1fr);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:40px 62px}#start-page_block.error{align-content:center}#start-page_block vviinn-text-search{margin-top:12px}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin-top:24px}.action-button{font-family:inherit;display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--button-bg-color-primary));border-color:var(--color-primary, var(--button-bg-color-primary));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--button-bg-color-primary-hover));border-color:var(\n --color-primary-hover,\n var(--button-bg-color-primary-hover)\n )}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.action-button .hidden{display:none}.results-page{margin-top:64px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.source-wrapper{display:grid;grid-template-rows:min-content 1fr;min-width:100%}.source-wrapper.text-search-wrapper{padding:24px 24px 0 24px}.filters-wrapper{margin-top:24px;overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--button-bg-color-primary));color:white}.results-page:not(.active){display:none}.results-page vviinn-text-search{width:calc(100% + 24px)}vviinn-preloader{--preloader-size:24px;display:flex}@media (max-width: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.results-page vviinn-text-search{width:auto}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:12px 24px 24px}.source-wrapper{grid-template-rows:min-content auto;width:100%;padding:0}.source-wrapper.image-wrapper .filters-wrapper{padding-left:24px;min-width:100%}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px 20px}}@media (max-width: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{j as vviinn_vps_widget}