vviinn-widgets 2.20.21 → 2.20.25

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/highlight-box_22.cjs.entry.js +8 -2
  2. package/dist/cjs/{package-1c24894e.js → package-878998c1.js} +1 -1
  3. package/dist/cjs/vviinn-carousel_3.cjs.entry.js +1 -1
  4. package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
  5. package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
  6. package/dist/cjs/vviinn-vps-widget.cjs.entry.js +1 -1
  7. package/dist/collection/components/vviinn-modal/vviinn-modal.css +20 -2
  8. package/dist/collection/components/vviinn-modal/vviinn-modal.js +11 -1
  9. package/dist/esm/highlight-box_22.entry.js +8 -2
  10. package/dist/esm/package-39382be9.js +3 -0
  11. package/dist/esm/vviinn-carousel_3.entry.js +1 -1
  12. package/dist/esm/vviinn-vpr-button.entry.js +1 -1
  13. package/dist/esm/vviinn-vps-button.entry.js +1 -1
  14. package/dist/esm/vviinn-vps-widget.entry.js +1 -1
  15. package/dist/types/components/vviinn-modal/vviinn-modal.d.ts +1 -0
  16. package/{www/build/p-1aa66c1a.entry.js → dist/vviinn-widgets/p-43ed48b7.entry.js} +1 -1
  17. package/dist/vviinn-widgets/{p-e5fbf695.entry.js → p-4be72c1f.entry.js} +1 -1
  18. package/dist/vviinn-widgets/p-6c073c50.js +1 -0
  19. package/dist/vviinn-widgets/p-a7dc9a99.entry.js +1 -0
  20. package/{www/build/p-4cb106e3.entry.js → dist/vviinn-widgets/p-bf744768.entry.js} +1 -1
  21. package/dist/vviinn-widgets/{p-ab973311.entry.js → p-fc8609e7.entry.js} +1 -1
  22. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  23. package/package.json +2 -2
  24. package/www/build/p-2ff379a7.js +161 -0
  25. package/{dist/vviinn-widgets/p-1aa66c1a.entry.js → www/build/p-43ed48b7.entry.js} +1 -1
  26. package/www/build/{p-e5fbf695.entry.js → p-4be72c1f.entry.js} +1 -1
  27. package/www/build/p-6c073c50.js +1 -0
  28. package/www/build/p-a7dc9a99.entry.js +1 -0
  29. package/{dist/vviinn-widgets/p-4cb106e3.entry.js → www/build/p-bf744768.entry.js} +1 -1
  30. package/www/build/p-e0153ae2.css +6 -0
  31. package/www/build/{p-ab973311.entry.js → p-fc8609e7.entry.js} +1 -1
  32. package/www/build/vviinn-widgets.esm.js +1 -1
  33. package/www/index.html +1 -1
  34. package/dist/esm/package-4909a9ed.js +0 -3
  35. package/dist/vviinn-widgets/p-6a189f8f.js +0 -1
  36. package/dist/vviinn-widgets/p-a1c3ccce.entry.js +0 -1
  37. package/www/build/p-3fe5816c.js +0 -1
  38. package/www/build/p-6a189f8f.js +0 -1
  39. package/www/build/p-a1c3ccce.entry.js +0 -1
  40. package/www/build/p-a67898be.css +0 -1
@@ -485,7 +485,7 @@ const VviinnImageView = class {
485
485
  };
486
486
  VviinnImageView.style = vviinnImageViewCss;
487
487
 
488
- const vviinnModalCss = ":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{align-items:center;border-bottom:1px solid #f4f4f4;display:flex;padding:16px}.title{font-weight:600;font-size:18px;line-height:24px;margin:0 auto}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:unset}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
488
+ const vviinnModalCss = ":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{display:flex;align-items:center;border-bottom:1px solid #f4f4f4;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);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:4px;color:#c6c6c6}button:hover{color:#000}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
489
489
 
490
490
  const VviinnModal = class {
491
491
  constructor(hostRef) {
@@ -518,8 +518,14 @@ const VviinnModal = class {
518
518
  return;
519
519
  this.slider = true;
520
520
  }
521
+ renderImage() {
522
+ return imageSearch_store._function.pipe(imageSearch_store.sequenceToOption(imageSearch_store.imageSearchState.imageUrl, imageSearch_store.imageSearchState.image), imageSearch_store.Option.map(([url]) => {
523
+ const image = (index.h("img", { width: "32", height: "32", src: url, class: "title-image" }));
524
+ return image;
525
+ }), imageSearch_store.Option.getOrElse(() => null));
526
+ }
521
527
  render() {
522
- return (index.h(index.Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, index.h("div", { class: "head" }, !this.hideBackButton && (index.h("button", { part: "secondary-action", onClick: () => this.resetState() }, index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M20.25 12H3.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), index.h("div", { class: "title", part: "title" }, index.h("slot", { name: "vviinn-image-search-modal-title" }, "Bildsuche")), index.h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("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: "#333333" })))), index.h("div", { class: "body" }, index.h("slot", null))));
528
+ return (index.h(index.Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, index.h("div", { class: "head" }, !this.hideBackButton && (index.h("button", { part: "secondary-action", onClick: () => this.resetState() }, index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("path", { d: "M20.25 12H3.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), index.h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), index.h("div", { class: "title", part: "title" }, this.renderImage(), index.h("slot", { name: "vviinn-image-search-modal-title" }, "Bildsuche")), index.h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, index.h("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" })))), index.h("div", { class: "body" }, index.h("slot", null))));
523
529
  }
524
530
  get el() { return index.getElement(this); }
525
531
  };
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "2.20.21";
3
+ const version = "2.20.25";
4
4
 
5
5
  exports.version = version;
@@ -6,7 +6,7 @@ const index = require('./index-a4becaff.js');
6
6
  const imageSearch_store = require('./imageSearch.store-967326bd.js');
7
7
  const index$1 = require('./index-6cfe5293.js');
8
8
  const Campaign = require('./Campaign-778b5b2c.js');
9
- const _package = require('./package-1c24894e.js');
9
+ const _package = require('./package-878998c1.js');
10
10
  const Handler = require('./Handler-de64afa5.js');
11
11
  const index$2 = require('./index-d33baba2.js');
12
12
 
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a4becaff.js');
6
- const _package = require('./package-1c24894e.js');
6
+ const _package = require('./package-878998c1.js');
7
7
  const index$1 = require('./index-6cfe5293.js');
8
8
 
9
9
  const vviinnVprButtonCss = ":host{display:block}";
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a4becaff.js');
6
- const _package = require('./package-1c24894e.js');
6
+ const _package = require('./package-878998c1.js');
7
7
  const index$1 = require('./index-6cfe5293.js');
8
8
  const customizedSlots = require('./customized-slots-aee3f39d.js');
9
9
  const Campaign = require('./Campaign-778b5b2c.js');
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-a4becaff.js');
6
- const _package = require('./package-1c24894e.js');
6
+ const _package = require('./package-878998c1.js');
7
7
  const imageSearch_store = require('./imageSearch.store-967326bd.js');
8
8
  const customizedSlots = require('./customized-slots-aee3f39d.js');
9
9
  const index$1 = require('./index-d33baba2.js');
@@ -26,19 +26,32 @@
26
26
  }
27
27
 
28
28
  .head {
29
+ display: flex;
29
30
  align-items: center;
30
31
  border-bottom: 1px solid #f4f4f4;
31
- display: flex;
32
32
  padding: 16px;
33
33
  }
34
34
 
35
35
  .title {
36
+ display: flex;
37
+ align-items: center;
38
+ transform: translateX(-6px);
36
39
  font-weight: 600;
37
40
  font-size: 18px;
38
41
  line-height: 24px;
39
42
  margin: 0 auto;
40
43
  }
41
44
 
45
+ .title-image {
46
+ border-radius: 50%;
47
+ border: 1px solid rgb(244, 244, 244);
48
+ -o-object-fit: cover;
49
+ object-fit: cover;
50
+ -o-object-position: center;
51
+ object-position: center;
52
+ margin-right: 8px;
53
+ }
54
+
42
55
  button {
43
56
  -webkit-appearance: none;
44
57
  -moz-appearance: none;
@@ -47,7 +60,12 @@ button {
47
60
  border: none;
48
61
  cursor: pointer;
49
62
  display: grid;
50
- padding: unset;
63
+ padding: 4px;
64
+ color: #c6c6c6;
65
+ }
66
+
67
+ button:hover {
68
+ color: #000;
51
69
  }
52
70
 
53
71
  @keyframes fade-in {
@@ -1,6 +1,10 @@
1
1
  import { Host, h, } from "@stencil/core";
2
2
  import { slotChangeListener } from "../customized-slots";
3
3
  import { campaignTypeNames } from "../../campaign/Campaign";
4
+ import { imageSearchState } from "../../store/imageSearch.store";
5
+ import * as O from "fp-ts/lib/Option";
6
+ import { pipe } from "fp-ts/lib/function";
7
+ import { sequenceToOption } from "../../utils/option/option";
4
8
  export class VviinnModal {
5
9
  constructor() {
6
10
  this.active = false;
@@ -30,8 +34,14 @@ export class VviinnModal {
30
34
  return;
31
35
  this.slider = true;
32
36
  }
37
+ renderImage() {
38
+ return pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), O.map(([url]) => {
39
+ const image = (h("img", { width: "32", height: "32", src: url, class: "title-image" }));
40
+ return image;
41
+ }), O.getOrElse(() => null));
42
+ }
33
43
  render() {
34
- return (h(Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, h("div", { class: "head" }, !this.hideBackButton && (h("button", { part: "secondary-action", onClick: () => this.resetState() }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.25 12H3.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { class: "title", part: "title" }, h("slot", { name: "vviinn-image-search-modal-title" }, "Bildsuche")), h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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: "#333333" })))), h("div", { class: "body" }, h("slot", null))));
44
+ return (h(Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, h("div", { class: "head" }, !this.hideBackButton && (h("button", { part: "secondary-action", onClick: () => this.resetState() }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.25 12H3.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { class: "title", part: "title" }, this.renderImage(), h("slot", { name: "vviinn-image-search-modal-title" }, "Bildsuche")), h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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" })))), h("div", { class: "body" }, h("slot", null))));
35
45
  }
36
46
  static get is() { return "vviinn-modal"; }
37
47
  static get encapsulation() { return "shadow"; }
@@ -481,7 +481,7 @@ const VviinnImageView = class {
481
481
  };
482
482
  VviinnImageView.style = vviinnImageViewCss;
483
483
 
484
- const vviinnModalCss = ":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{align-items:center;border-bottom:1px solid #f4f4f4;display:flex;padding:16px}.title{font-weight:600;font-size:18px;line-height:24px;margin:0 auto}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:unset}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
484
+ const vviinnModalCss = ":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{display:flex;align-items:center;border-bottom:1px solid #f4f4f4;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);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:4px;color:#c6c6c6}button:hover{color:#000}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";
485
485
 
486
486
  const VviinnModal = class {
487
487
  constructor(hostRef) {
@@ -514,8 +514,14 @@ const VviinnModal = class {
514
514
  return;
515
515
  this.slider = true;
516
516
  }
517
+ renderImage() {
518
+ return _function.pipe(sequenceToOption(imageSearchState.imageUrl, imageSearchState.image), Option.map(([url]) => {
519
+ const image = (h("img", { width: "32", height: "32", src: url, class: "title-image" }));
520
+ return image;
521
+ }), Option.getOrElse(() => null));
522
+ }
517
523
  render() {
518
- return (h(Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, h("div", { class: "head" }, !this.hideBackButton && (h("button", { part: "secondary-action", onClick: () => this.resetState() }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.25 12H3.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "#161616", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { class: "title", part: "title" }, h("slot", { name: "vviinn-image-search-modal-title" }, "Bildsuche")), h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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: "#333333" })))), h("div", { class: "body" }, h("slot", null))));
524
+ return (h(Host, { exportparts: "secondary-action, title, close-button", class: { closed: !this.active }, onAnimationEnd: (ev) => this.handleAnimationEnd(ev) }, h("div", { class: "head" }, !this.hideBackButton && (h("button", { part: "secondary-action", onClick: () => this.resetState() }, h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M20.25 12H3.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }), h("path", { d: "M10.5 5.25L3.75 12L10.5 18.75", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" })))), h("div", { class: "title", part: "title" }, this.renderImage(), h("slot", { name: "vviinn-image-search-modal-title" }, "Bildsuche")), h("button", { onClick: () => this.close(), class: "close-button", part: "close-button" }, h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("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" })))), h("div", { class: "body" }, h("slot", null))));
519
525
  }
520
526
  get el() { return getElement(this); }
521
527
  };
@@ -0,0 +1,3 @@
1
+ const version = "2.20.25";
2
+
3
+ export { version as v };
@@ -2,7 +2,7 @@ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent,
2
2
  import { _ as _Array, O as Option, S as Semigroup, a as _function, E as Either, i as imageSearchState, s as state, c as chainW, m as makeRequest, f as fromEither, g as getApiPath, b as createInitGetRequest, A as Apply, d as map, e as match, h as arrayToQueryString, p as parseExcluded, T as TaskEither, j as checkEmpryString } from './imageSearch.store-7c025e20.js';
3
3
  import { C as ChevronIcon } from './index-33bc6d2c.js';
4
4
  import { c as campaignTypeNames, f as fromString, a as fold } from './Campaign-1af6ed38.js';
5
- import { v as version } from './package-4909a9ed.js';
5
+ import { v as version } from './package-39382be9.js';
6
6
  import { h as has, t as tuple, p as pipe } from './Handler-7bfee84f.js';
7
7
  import { c as createProductViewVprEvent, a as createProductClickVprEvent, v as v4, b as createTrackingApi, d as createWidgetVprEvent } from './index-b6bd61ae.js';
8
8
 
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-48ef9564.js';
2
- import { v as version } from './package-4909a9ed.js';
2
+ import { v as version } from './package-39382be9.js';
3
3
  import { V as VisualSearchIcon } from './index-33bc6d2c.js';
4
4
 
5
5
  const vviinnVprButtonCss = ":host{display:block}";
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-48ef9564.js';
2
- import { v as version } from './package-4909a9ed.js';
2
+ import { v as version } from './package-39382be9.js';
3
3
  import { a as CameraIcon } from './index-33bc6d2c.js';
4
4
  import { S as SlotSkeleton } from './customized-slots-b372eaed.js';
5
5
  import { c as campaignTypeNames } from './Campaign-1af6ed38.js';
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-48ef9564.js';
2
- import { v as version } from './package-4909a9ed.js';
2
+ import { v as version } from './package-39382be9.js';
3
3
  import { i as imageSearchState, s as state, a as _function, O as Option, p as parseExcluded, n as isEmpty } from './imageSearch.store-7c025e20.js';
4
4
  import { s as slotChangeListener, S as SlotSkeleton } from './customized-slots-b372eaed.js';
5
5
  import { e as createProductViewVpsEvent, f as createProductClickVpsEvent, g as createSearchEvent, h as createFilterEvent, v as v4, b as createTrackingApi, i as createWidgetVpsEvent } from './index-b6bd61ae.js';
@@ -16,5 +16,6 @@ export declare class VviinnModal {
16
16
  componentWillLoad(): void;
17
17
  private close;
18
18
  private handleAnimationEnd;
19
+ private renderImage;
19
20
  render(): any;
20
21
  }
@@ -1 +1 @@
1
- import{r as t,h as i,H as e,c as s,g as n}from"./p-fa17e81f.js";import{O as r,o,i as a,a as l,t as h,q as c,r as d,u as p,v as u,w as g,x as v,y as m,z as b,B as x,E as f,C as w,D as y,F as k,G as z,N as C}from"./p-90e24b10.js";import{p as L,q as D,u as _}from"./p-3b99c62d.js";import{s as F}from"./p-53eacbe3.js";import{c as j}from"./p-badde98c.js";import{O as S,c as E,d as W,A as M}from"./p-60ea7665.js";const B=class{constructor(i){t(this,i)}getInsetValue(){return L(o(a.searchArea,a.imageBounds),r.map((([t,i])=>{return`inset(${(e=t,s=i,n={top:`${e.y}px`,right:s.width-(e.x+e.width)+"px",bottom:s.height-(e.y+e.height)+"px",left:`${e.x}px`}).top} ${n.right} ${n.bottom} ${n.left})`;var e,s,n})),r.getOrElse((()=>"")))}renderImage(){return L(o(a.imageUrl,a.imageBounds),r.map((([t,e])=>i("img",{src:t,width:e.width,height:e.height,style:{"clip-path":`${this.getInsetValue()}`}}))),r.getOrElse((()=>"")))}render(){return i(e,null,this.renderImage())}};B.style=':host{display:grid;position:absolute;box-sizing:border-box;border:none;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--size:10px;--x-position:0;--y-position:0}img{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pointer{position:absolute;width:var(--size);height:var(--size);background:black;border-radius:50%;z-index:2;cursor:pointer;transform:translate(var(--x-position), var(--y-position)) scale(0);animation:0.25s linear fadein;animation-fill-mode:forwards}.pointer::after{content:"";cursor:pointer;border:5px solid black;border-radius:50%;width:var(--size);height:var(--size);display:block;transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));padding:calc(var(--size) * 0.5);opacity:.75}@keyframes fadein{from{transform:translate(var(--x-position), var(--y-position)) scale(0)}to{transform:translate(var(--x-position), var(--y-position)) scale(1)}}';const I=class{constructor(i){t(this,i),this.vviinnImageCrop=s(this,"vviinnImageCrop",7),this.mouseStartPoint=void 0,this.bounds=void 0,this.resizeObserver=new ResizeObserver((()=>{this.bounds=this.el.getBoundingClientRect()})),this.disabled=!1,this.basicEventData=void 0,this.handleMove=!1}componentDidLoad(){this.resizeObserver.observe(this.el)}disconnectedCallback(){this.resizeObserver.disconnect()}handleHandlerMove(t){t.preventDefault(),t.stopPropagation();const i=_(t),e={position:D.concat(i,this.mouseStartPoint),direction:this.handlerMoveDirection};l.pipe(a.searchArea,r.map((t=>{const s=h(t,e);this.outOfBounds(s)||(a.searchArea=r.some(s),this.mouseStartPoint=i,a.detectedObject=void 0)})))}outOfBounds(t){return t.width<40||t.height<40||t.x<0||t.y<0||this.bounds.height-(t.y+t.height)<0||this.bounds.width-(t.x+t.width)<0}handleCropperMove(t){t.preventDefault(),t.stopPropagation();const i=_(t),e=D.concat(i,this.mouseStartPoint);l.pipe(a.searchArea,r.map((t=>{const s=c(t,e);s.x<0||s.y<0||this.bounds.height-(s.y+s.height)<0||this.bounds.width-(s.x+s.width)<0||(a.detectedObject=void 0,a.searchArea=r.some(s),this.mouseStartPoint=i)})))}handlePointerDown(t){t.stopPropagation(),this.mouseStartPoint=_(t);const i=t.target;"cropper-handler"===i.localName?(this.handlerMoveDirection=i.handler.direction,this.pointerMoveListener=this.handleHandlerMove.bind(this)):this.pointerMoveListener=this.handleCropperMove.bind(this),this.pointerReleaseListener=this.handleSearchAreaRelease.bind(this),this.el.addEventListener("pointermove",this.pointerMoveListener),window.addEventListener("pointerup",this.pointerReleaseListener,{once:!0})}handleSearchAreaRelease(){this.el.removeEventListener("pointermove",this.pointerMoveListener),document.removeEventListener("pointerup",this.pointerReleaseListener),this.mouseStartPoint=void 0,d(),this.vviinnImageCrop.emit(this.basicEventData)}getStyleMap(){return l.pipe(a.searchArea,r.map((t=>({width:`${t.width}px`,height:`${t.height}px`,transform:`translate3d(${t.x}px, ${t.y}px, 0)`,cursor:this.handleMove?"move":"default"}))),r.getOrElse((()=>({}))))}render(){return i(e,{exportparts:"handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize"},i("div",{class:{"crop-area":!0,active:this.handleMove,disabled:this.disabled},draggable:!1,style:this.getStyleMap(),onContextMenu:()=>!1,onPointerDown:t=>this.handlePointerDown(t)},a.cropperHandlers.map((t=>i("cropper-handler",{disabled:this.disabled,handler:t,onPointerDown:t=>this.handlePointerDown(t)})))))}get el(){return n(this)}};I.style=":host{display:block;height:100%;left:0;position:absolute;top:0;width:100%}:host(.hidden){visibility:hidden}.crop-area{border:1px solid white;box-sizing:border-box;position:absolute;touch-action:none;transition-property:border-color, opacity;transition-duration:.25s;transition-timing-function:ease-in-out;z-index:2;position:relative;will-change:transform}.crop-area.active{border-color:whitesmoke}.crop-area.disabled{opacity:0.25}";const O=(t,i)=>{if(!t)return"";const e={};return t.href.split("?")[1].split("included[]=").join("").split("&").forEach((t=>{const[i,s]=t.split("%3A");e[i]=s})),"categories"===i?e.product_type:e[i]},G=class{constructor(i){t(this,i),this.vviinnSelectFilter=s(this,"vviinnSelectFilter",7),this.filterType=this.filter.name,this.filter=null,this.basicEventData=void 0,this.selectedFilter="",this.hideFilters=!0}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter(t):this.selectFilter(t)}selectFilter(t){a.activeIonLink=t,this.selectedFilter=O(t,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"select",filterName:t.name}))}clearSelectedFilter(t){a.activeIonLink=t.clear,this.selectedFilter=O(t.clear,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"deselect"}))}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,i){"Enter"===t.key&&this.handleFilterSelection(i)}isFilterSelected(t){return"categories"===this.filterType?this.selectedFilter===O(t,"categories"):this.selectedFilter===t.name}render(){if(!this.filter)return null;const{name:t,filters:s}=this.filter;return i(e,{exportparts:"filter, show-more-filters"},i("div",{class:{filters:!0,"no-scrollbar-mobile":"categories"===this.filterType,"no-scrollbar":"categories"!==this.filterType}},s.filter(((t,i)=>!this.hideFilters||i<5)).map(((e,s)=>{const n="categories"===t?this.selectedFilter===O(e,"categories"):this.selectedFilter===e.name;return i("div",{role:"button",tabindex:"0",key:s,part:n?"filter active":"filter",class:{filter:!0,active:n},style:{"animation-delay":10*s+"ms"},onPointerUp:t=>{a.loading||(t.stopPropagation(),this.handleFilterSelection(e))},onKeyPress:t=>{a.loading||this.handleEnter(t,e)}},e.name)})),this.hideFilters&&i("div",{class:{"show-more":!0,hidden:s.length<=5,active:!this.hideFilters},role:"button",tabindex:"0","aria-role":"button",onClick:()=>{setTimeout((()=>this.toggleFilters()),300)},onKeyPress:t=>{"Enter"===t.key&&this.toggleFilters()},part:"show-more-filters"})))}get el(){return n(this)}};G.style=".filters{display:flex;flex-direction:row;overflow-x:auto;padding-left:24px;padding-right:12px;margin-bottom:12px}.filter{align-items:center;color:#525252;cursor:pointer;display:flex;margin-right:12px;height:-moz-max-content;height:max-content;min-width:-moz-max-content;min-width:max-content;transition-property:background;transition-duration:0.5s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:10px 12px}.show-more{display:flex}.show-more.hidden{display:none !important}.show-more::after{position:relative;content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;transform:rotate(-90deg);left:2px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 640px){.no-scrollbar-mobile{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar-mobile::-webkit-scrollbar{display:none}}";const P=class{constructor(i){t(this,i),this.vviinnSelectObject=s(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.basicEventData=void 0,this.position=["0","0"]}getObjectPosition(){return l.pipe(a.imageBounds,r.map((t=>{const i=p(u(this.detectedObject).rectangle),{x:e,y:s}=l.pipe(i,g(t),v);return[`${e}px`,`${s}px`]})),r.getOrElse((()=>["0","0"])))}selectDetectedObject(){l.pipe(a.imageBounds,r.map((t=>{const i=u(this.detectedObject).rectangle,e=p(i),s=g(t)(e);a.detectedObject=this.detectedObject,a.searchArea=r.some(s)}))),d(),this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject}))}isActive(){if(!this.detectedObject)return!1;if(!a.detectedObject)return!1;const t=u(this.detectedObject),i=u(a.detectedObject);return m.equals(t,i)}render(){return i(e,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};P.style=':host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--size:32px;--x-position:0;--y-position:0;background:rgba(22, 22, 22, 0.5);border-radius:50%;border:none;cursor:pointer;display:block;height:var(--size);position:absolute;transition:opacity 0.25s;width:var(--size);z-index:2;transform:translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));transition:background 0.1 ease-in-out}:host(:hover){background:rgba(22, 22, 22, 0.75)}:host(.active){background:var(--color-primary, var(--color-primary-system))!important;border:2px solid white}:host::after{--size:32px;border-radius:50%;content:"";cursor:pointer;display:block;height:calc(var(--size) * 0.25);transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));width:calc(var(--size) * 0.25);background:white}';const T=class{constructor(i){t(this,i)}render(){return i(e,null,i("vviinn-error",null,i("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z",fill:"#525252"}),i("path",{d:"M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",fill:"#525252"})),i("h4",{slot:"title"},"Leider nichts gefunden"),i("span",{slot:"text"},"Leider konnten wir keine passenden Produkte finden. Bitte versuche es mit einem anderen Bildausschnitt noch einmal.")))}};T.style=":host{display:grid}vviinn-error{justify-items:center}";const $=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.src="",this.width=0,this.height=0,this.basicEventData=void 0,this.selected=!1}async selectImage(){this.selected=!0;const t=await b(this.src),i=await x(t);l.pipe(i,f.match((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUpload.emit(this.basicEventData)))),this.selected=!1}handleKeyPress({key:t}){"Enter"!==t&&" "!==t||this.selectImage()}showPreloader(){return(a.objectDetectionInProgress||a.loading)&&this.selected}render(){return i(e,{onClick:()=>this.selectImage(),onKeyUp:t=>this.handleKeyPress(t)},this.showPreloader()?i("div",{class:"image-preloader"},i("vviinn-preloader",null)):null,i("img",{src:this.src,width:this.width,height:this.height,tabindex:1}))}};$.style=":host{display:block;margin-bottom:8px;position:relative}:host(:focus){border:2px solid var(--color-primary)}img{width:100%;height:auto;cursor:pointer}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;position:absolute;right:12px;z-index:4}vviinn-preloader{--preloader-size:12px}@media (max-width: 640px){.image-preloader{display:block}}";const A=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.basicEventData=void 0}componentWillLoad(){F(this,this.el)}delegateFocus(){this.imagesBlock.childNodes[0].childNodes[0].focus()}render(){return i(e,{onFocus:()=>this.delegateFocus()},i("slot",{name:"vviinn-example-images-title"},i("h3",null,"Mit den Beispielbildern die Suche direkt ausprobieren")),i("div",{class:"images",ref:t=>this.imagesBlock=t},i("slot",{name:"vviinn-example-images-1"},i("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-2"},i("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-3"},i("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-4"},i("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=",basicEventData:this.basicEventData}))))}get el(){return n(this)}};A.style="h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}.images{display:block;-moz-column-count:2;column-count:2;-moz-column-gap:16px;column-gap:16px}";const V=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.basicEventData=void 0,this.startUpload=void 0,this.resetVpsButton=void 0}async handleInputChange(t){const i=t.target,e=await x(i.files[0]);l.pipe(e,w((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUpload.emit(this.basicEventData)))),i.value=null}isLoading(){return a.loading}startUploadWatcher(t){t&&(this.fileInput.click(),this.resetVpsButton())}render(){return i(e,{exportparts:"button"},this.isLoading()?i("vviinn-preloader",null):null,this.isLoading()?null:i("label",{htmlFor:"fileInput",part:"button"},i("slot",{name:"upload-button-text"},"Upload image")),i("input",{id:"fileInput",class:"visually-hidden",type:"file",accept:"image/*",onChange:t=>this.handleInputChange(t),ref:t=>this.fileInput=t}))}static get watchers(){return{startUpload:["startUploadWatcher"]}}};V.style=":host{display:block}:host(::hover){background:whitesmoke}.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}label{cursor:pointer;display:grid;width:100%;height:100%;transition:background 0.1s ease-in-out}";const H=class{constructor(i){t(this,i),this.basicEventData=void 0}handleInitialImageLoad(t){const i=y(t.target),{x:e,y:s}=c(i,{x:12,y:12}),n={x:e,y:s,width:i.width-24,height:i.height-24};a.imageBounds=r.some(i),a.searchArea=r.some(n)}renderDetectedObject(t){return i("vviinn-detected-object",{detectedObject:t,basicEventData:this.basicEventData})}renderImage(){return l.pipe(o(a.imageUrl,a.image),r.map((([t,e])=>{const[s,n]=(t=>{const i=k(t),e=z(288)(i).map((t=>t.size));return[e[0],e[1]]})(e);return i("img",{decoding:"async",width:s,height:n,src:t,onLoad:t=>this.handleInitialImageLoad(t),draggable:!1})})),r.getOrElse((()=>null)))}renderCropper(){return l.pipe(a.imageUrl,r.map((()=>i("image-cropper",{basicEventData:this.basicEventData}))),r.getOrElse((()=>null)))}render(){return i(e,null,a.loading||a.objectDetectionInProgress?i("div",{class:"image-preloader"},i("vviinn-preloader",null)):null,i("highlight-box",null),this.renderImage(),this.renderCropper(),a.detectedObjects.map((t=>this.renderDetectedObject(t))))}};H.style=":host{display:grid;position:relative;justify-self:center;direction:ltr}img{box-sizing:border-box;filter:brightness(60%);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:-1}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:18px;padding:4px 6px;pointer-events:none;position:absolute;right:18px;z-index:4}vviinn-preloader{--preloader-size:12px}";const K=class{constructor(i){t(this,i),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.widgetVersion=void 0,this.hideBackButton=!1,this.slider=!1}componentWillLoad(){F(this,this.el)}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:j.VPS,widgetId:this.buttonElementId,widgetVersion:this.widgetVersion})}),this.slider?500:0)}handleAnimationEnd(t){"fade-in"===t.animationName&&(this.slider=!0)}render(){return i(e,{exportparts:"secondary-action, title, close-button",class:{closed:!this.active},onAnimationEnd:t=>this.handleAnimationEnd(t)},i("div",{class:"head"},!this.hideBackButton&&i("button",{part:"secondary-action",onClick:()=>this.resetState()},i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M20.25 12H3.75",stroke:"#161616","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M10.5 5.25L3.75 12L10.5 18.75",stroke:"#161616","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{class:"title",part:"title"},i("slot",{name:"vviinn-image-search-modal-title"},"Bildsuche")),i("button",{onClick:()=>this.close(),class:"close-button",part:"close-button"},i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("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:"#333333"})))),i("div",{class:"body"},i("slot",null)))}get el(){return n(this)}};K.style=":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{align-items:center;border-bottom:1px solid #f4f4f4;display:flex;padding:16px}.title{font-weight:600;font-size:18px;line-height:24px;margin:0 auto}button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:none;cursor:pointer;display:grid;padding:unset}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";const N=class{constructor(i){t(this,i)}componentWillLoad(){F(this,this.el)}render(){return i(e,null,i("slot",{name:"vviinn-onboarding-title"},i("h3",null,"So funktioniert es")),i("vviinn-slider",{showArrows:!0},i("vviinn-slide",null,i("vviinn-onboarding-card-1",null)),i("vviinn-slide",null,i("vviinn-onboarding-card-2",null)),i("vviinn-slide",null,i("vviinn-onboarding-card-3",null))))}get el(){return n(this)}};N.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}::host{display:block}h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}vviinn-slide{background:#f4f4f4;padding:24px}svg{padding:16px 0}.text{display:grid;grid-gap:8px}.text>h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}.text>p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}";const R=class{constructor(i){t(this,i)}componentWillLoad(){F(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-1-icon"},i(S,null)),i("slot",{name:"onboarding-card-1-text"},i("div",{class:"text"},i("h4",null,"Starte die Bildsuche"),i("p",null,"Lade ein Bild aus Deiner Galerie hoch oder fotografiere ein Produkt mit Deiner Kamera."))))}get el(){return n(this)}};R.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const U=class{constructor(i){t(this,i)}componentWillLoad(){F(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-2-icon"},i(E,null)),i("slot",{name:"onboarding-card-2-text"},i("div",{class:"text"},i("h4",null,"Verfeiner Deine Suche"),i("p",null,"Du kannst den Bildrahmen selber festlegen und so die Produkte genau auswählen."))))}get el(){return n(this)}};U.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const Y=class{constructor(i){t(this,i)}componentWillLoad(){F(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-3-icon"},i(W,null)),i("slot",{name:"onboarding-card-3-text"},i("div",{class:"text"},i("h4",null,"Ohne Hintergrund"),i("p",null,"Die besten Ergebnisse erhältst Du, wenn das gesuchte Objekt mit einfarbigem und hellem Hintergrund zu sehen ist."))))}get el(){return n(this)}};Y.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const Z=class{constructor(i){t(this,i)}render(){return i(e,null,i("slot",null))}};Z.style=":host{animation:fade-in 0.5s ease-in-out;background:rgba(0, 0, 0, 0.5);display:block;height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100vw;z-index:9999}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}";const q=class{constructor(i){t(this,i),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.hideBackButton=!1,this.widgetVersion=void 0}render(){return i(e,{class:{active:this.active}},i("vviinn-overlay",null,i("vviinn-modal",{resetState:this.resetState,active:this.active,buttonElementId:this.buttonElementId,hideBackButton:this.hideBackButton,widgetVersion:this.widgetVersion},i("slot",null,"CONTENT"))))}};q.style=":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center;cursor:default}@media (max-width: 640px){vviinn-modal{border-radius:4px 4px 0 0;height:100vh;margin-top:32px;transform:translateY(100%);width:100vw}vviinn-overlay{align-items:end;display:grid;justify-items:center}}";const X=class{constructor(i){t(this,i)}componentWillLoad(){F(this,this.el)}render(){return i(e,null,i("slot",null,i("div",{class:"content"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},i("defs",null),i("path",{fill:"#525252",d:"M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z"}),i("path",{fill:"#525252",d:"M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z"})),i("slot",{name:"vviinn-privacy-badge-text"},i("p",null,"Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner Vviinn ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.")))))}get el(){return n(this)}};X.style=":host{display:block;background:#F4F4F4;padding:17px}.content{display:grid;grid-template-columns:min-content auto;grid-gap:9px}.content p{color:#525252;font-size:12px;line-height:16px;margin:unset}";const Q=class{constructor(i){t(this,i),this.handler=void 0}render(){return i(e,null,i("vviinn-error",null,i("h4",{slot:"title"},"Keine Verbindung"),i("span",{slot:"text"},"Etwas hat leider nicht funktioniert. Bitte prüfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."),i("button",{slot:"action",onClick:this.handler},"Erneut versuchen")))}};Q.style=":host{display:block}";const J=class{constructor(i){t(this,i)}render(){return i(e,null,i("slot",null))}};J.style=":host{display:grid;justify-items:center}";const tt=({kind:t,tabindex:e,disabled:s,onClick:n,onKeyDown:r})=>{return i("div",{class:(o={kind:t,disabled:s},{"arrow-wrapper":!0,[o.kind]:!0,disabled:o.disabled}),onClick:n,tabindex:e,onKeyDown:r},i(M,null));var o},it=class{constructor(i){t(this,i),this.elementsCount=0,this.internalPosition=0,this.swipeStartPosition=r.none,this.isRTL=!1,this.showBullets=!0,this.position=0,this.showArrows=!1}positionWatchHandler(t){this.internalPosition=t,this.el.style.setProperty("--position",`${this.calculatePosition(t)}`),this.setActiveCssClassToSlide(t)}componentWillLoad(){this.isRTL="rtl"===document.dir}connectedCallback(){this.handleDomContentChanges()}handleDomContentChanges(){const t=this.el.querySelectorAll("vviinn-slide");this.elementsCount=t.length,this.el.style.setProperty("--num-items",`${this.elementsCount}`),this.setActiveCssClassToSlide(0)}setActiveCssClassToSlide(t){const i=this.el.querySelectorAll("vviinn-slide");i.forEach((t=>t.classList.remove("active"))),i[t].classList.add("active")}goToSlide(t){this.internalPosition=t,this.el.style.setProperty("--position",`${t}`),this.setActiveCssClassToSlide(t)}renderBullets(){return this.showBullets?i("div",{class:"controls"},C.range(0,this.elementsCount-1).map((t=>i("div",{class:{bullet:!0,active:t==Math.abs(this.internalPosition)%this.elementsCount},onClick:()=>this.goToSlide(t)})))):null}nextSlide(){this.internalPosition++,this.renderSlidePosition()}prevSlide(){const t=this.internalPosition-1;this.internalPosition=t>-1?t:this.elementsCount-1,this.renderSlidePosition()}renderSlidePosition(){const t=this.internalPosition%this.elementsCount;requestAnimationFrame((()=>{this.el.style.setProperty("--position",`${this.calculatePosition(t)}`)}))}calculatePosition(t){return this.isRTL?-1*t:t}handleKeyDown(t){if("Space"===t.key||"Enter"===t.key)switch(t.target.className.includes("prev")?"prev":"next"){case"prev":this.prevSlide();break;case"next":this.nextSlide()}}handleTouchStart(t){this.showBullets&&(this.swipeStartPosition=l.pipe(t.touches[0],r.fromNullable,r.map((t=>t.clientX))))}handleTouchEnd(t){if(!this.showBullets)return;const i=l.pipe(t.changedTouches[0],r.fromNullable,r.map((t=>t.clientX)));l.pipe(o(this.swipeStartPosition,i),r.map((([t,i])=>{return(e=t)<(s=i)?-1:e>s?1:0;var e,s})),r.map((t=>{switch(t){case 1:return this.nextSlide();case-1:return this.prevSlide()}})))}render(){return i(e,null,i("div",{class:"items-wrapper"},i("div",{class:"items",onTouchStart:t=>this.handleTouchStart(t),onTouchEnd:t=>this.handleTouchEnd(t)},i("slot",null))),this.showArrows?[i(tt,{kind:"prev",onClick:()=>this.isRTL?this.nextSlide():this.prevSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:1,disabled:!1}),i(tt,{kind:"next",onClick:()=>this.isRTL?this.prevSlide():this.nextSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:0,disabled:!1})]:null,this.renderBullets())}get el(){return n(this)}static get watchers(){return{position:["positionWatchHandler"]}}};it.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--num-items:0;--position:0;display:grid;grid-gap:20px;justify-items:center;position:relative}.items-wrapper{overflow:hidden;width:100%}.items{box-sizing:border-box;display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--num-items), 100%);transform:translateX(calc(-100% * var(--position)));transition:transform 0.33s ease-in-out}.controls{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--num-items), min-content)}.bullet{background:#e0e0e0;border-radius:50%;box-sizing:border-box;cursor:pointer;height:8px;width:8px;transition:background 0.1s ease-in-out}.bullet:hover{background:#c6c6c6}.bullet.active{background:var(--color-primary, var(--color-primary-system))}.bullet:active{background:transparent;border:2px solid var(--color-primary, var(--color-primary-system))}.arrow-wrapper{align-items:center;cursor:pointer;background:white;border:2px solid white;bottom:0;box-sizing:border-box;display:grid;height:calc(var(--spacer) * 6);justify-items:center;margin:auto;position:absolute;top:0;transform:translate3d(0, -50%, 0);transition:border 0.25ms ease-in-out;width:calc(var(--spacer) * 4)}.arrow-wrapper:active{border-color:var(--color-primary, var(--color-primary-system));opacity:0.75}.arrow-wrapper:focus{border-color:var(--color-primary, var(--color-primary-system));opacity:0.5;outline:none}.prev{left:0}.next{right:0}.next>svg{transform:rotate3d(0, 1, 0, 180deg)}.arrow-wrapper>svg{transition:fill 0.25ms ease-in-out;fill:#a8a8a8}.arrow-wrapper:hover>svg{fill:#8d8d8d}";const et=class{constructor(i){t(this,i)}componentWillLoad(){F(this,this.el)}render(){return i(e,null,i("slot",null,i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none"},i("defs",null),i("path",{fill:"#C6C6C6",d:"M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z"}),i("path",{fill:"#C6C6C6",d:"M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z"})),i("span",{class:"vviinn-teaser-text"},i("slot",{name:"vviinn-teaser-text"},"Finde Produkte auf ",i("br",null)," einem Foto"))))}get el(){return n(this)}};et.style=":host{align-items:center;display:grid;justify-items:center;grid-gap:16px}.vviinn-teaser-text{font-size:28px;font-weight:600;line-height:40px;size:28px;text-align:center}";const st=class{constructor(i){t(this,i),this.handler=void 0}render(){return i(e,null,i("vviinn-error",null,i("h4",{slot:"title"},"Dateityp wird nicht unterstützt"),i("span",{slot:"text"},"Leider unterstützen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."),i("button",{slot:"action",onClick:this.handler},"Neues Bild hochladen")))}};st.style=":host{display:block}";export{B as highlight_box,I as image_cropper,G as search_filters,P as vviinn_detected_object,T as vviinn_empty_results,$ as vviinn_example_image,A as vviinn_example_images,V as vviinn_image_selector,H as vviinn_image_view,K as vviinn_modal,N as vviinn_onboarding,R as vviinn_onboarding_card_1,U as vviinn_onboarding_card_2,Y as vviinn_onboarding_card_3,Z as vviinn_overlay,q as vviinn_overlayed_modal,X as vviinn_privacy_badge,Q as vviinn_server_error,J as vviinn_slide,it as vviinn_slider,et as vviinn_teaser,st as vviinn_wrong_format}
1
+ import{r as t,h as i,H as e,c as s,g as n}from"./p-fa17e81f.js";import{O as r,o,i as a,a as l,t as h,q as c,r as d,u as p,v as u,w as g,x as m,y as v,z as b,B as x,E as f,C as w,D as y,F as k,G as z,N as C}from"./p-90e24b10.js";import{p as L,q as j,u as D}from"./p-3b99c62d.js";import{s as _}from"./p-53eacbe3.js";import{c as F}from"./p-badde98c.js";import{O as S,c as E,d as W,A as M}from"./p-60ea7665.js";const B=class{constructor(i){t(this,i)}getInsetValue(){return L(o(a.searchArea,a.imageBounds),r.map((([t,i])=>{return`inset(${(e=t,s=i,n={top:`${e.y}px`,right:s.width-(e.x+e.width)+"px",bottom:s.height-(e.y+e.height)+"px",left:`${e.x}px`}).top} ${n.right} ${n.bottom} ${n.left})`;var e,s,n})),r.getOrElse((()=>"")))}renderImage(){return L(o(a.imageUrl,a.imageBounds),r.map((([t,e])=>i("img",{src:t,width:e.width,height:e.height,style:{"clip-path":`${this.getInsetValue()}`}}))),r.getOrElse((()=>"")))}render(){return i(e,null,this.renderImage())}};B.style=':host{display:grid;position:absolute;box-sizing:border-box;border:none;width:100%;height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;--size:10px;--x-position:0;--y-position:0}img{-webkit-user-select:none;-moz-user-select:none;user-select:none}.pointer{position:absolute;width:var(--size);height:var(--size);background:black;border-radius:50%;z-index:2;cursor:pointer;transform:translate(var(--x-position), var(--y-position)) scale(0);animation:0.25s linear fadein;animation-fill-mode:forwards}.pointer::after{content:"";cursor:pointer;border:5px solid black;border-radius:50%;width:var(--size);height:var(--size);display:block;transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));padding:calc(var(--size) * 0.5);opacity:.75}@keyframes fadein{from{transform:translate(var(--x-position), var(--y-position)) scale(0)}to{transform:translate(var(--x-position), var(--y-position)) scale(1)}}';const I=class{constructor(i){t(this,i),this.vviinnImageCrop=s(this,"vviinnImageCrop",7),this.mouseStartPoint=void 0,this.bounds=void 0,this.resizeObserver=new ResizeObserver((()=>{this.bounds=this.el.getBoundingClientRect()})),this.disabled=!1,this.basicEventData=void 0,this.handleMove=!1}componentDidLoad(){this.resizeObserver.observe(this.el)}disconnectedCallback(){this.resizeObserver.disconnect()}handleHandlerMove(t){t.preventDefault(),t.stopPropagation();const i=D(t),e={position:j.concat(i,this.mouseStartPoint),direction:this.handlerMoveDirection};l.pipe(a.searchArea,r.map((t=>{const s=h(t,e);this.outOfBounds(s)||(a.searchArea=r.some(s),this.mouseStartPoint=i,a.detectedObject=void 0)})))}outOfBounds(t){return t.width<40||t.height<40||t.x<0||t.y<0||this.bounds.height-(t.y+t.height)<0||this.bounds.width-(t.x+t.width)<0}handleCropperMove(t){t.preventDefault(),t.stopPropagation();const i=D(t),e=j.concat(i,this.mouseStartPoint);l.pipe(a.searchArea,r.map((t=>{const s=c(t,e);s.x<0||s.y<0||this.bounds.height-(s.y+s.height)<0||this.bounds.width-(s.x+s.width)<0||(a.detectedObject=void 0,a.searchArea=r.some(s),this.mouseStartPoint=i)})))}handlePointerDown(t){t.stopPropagation(),this.mouseStartPoint=D(t);const i=t.target;"cropper-handler"===i.localName?(this.handlerMoveDirection=i.handler.direction,this.pointerMoveListener=this.handleHandlerMove.bind(this)):this.pointerMoveListener=this.handleCropperMove.bind(this),this.pointerReleaseListener=this.handleSearchAreaRelease.bind(this),this.el.addEventListener("pointermove",this.pointerMoveListener),window.addEventListener("pointerup",this.pointerReleaseListener,{once:!0})}handleSearchAreaRelease(){this.el.removeEventListener("pointermove",this.pointerMoveListener),document.removeEventListener("pointerup",this.pointerReleaseListener),this.mouseStartPoint=void 0,d(),this.vviinnImageCrop.emit(this.basicEventData)}getStyleMap(){return l.pipe(a.searchArea,r.map((t=>({width:`${t.width}px`,height:`${t.height}px`,transform:`translate3d(${t.x}px, ${t.y}px, 0)`,cursor:this.handleMove?"move":"default"}))),r.getOrElse((()=>({}))))}render(){return i(e,{exportparts:"handle, e-resize, n-resize, ne-resize, nw-resize, s-resize, se-resize, sw-resize, w-resize"},i("div",{class:{"crop-area":!0,active:this.handleMove,disabled:this.disabled},draggable:!1,style:this.getStyleMap(),onContextMenu:()=>!1,onPointerDown:t=>this.handlePointerDown(t)},a.cropperHandlers.map((t=>i("cropper-handler",{disabled:this.disabled,handler:t,onPointerDown:t=>this.handlePointerDown(t)})))))}get el(){return n(this)}};I.style=":host{display:block;height:100%;left:0;position:absolute;top:0;width:100%}:host(.hidden){visibility:hidden}.crop-area{border:1px solid white;box-sizing:border-box;position:absolute;touch-action:none;transition-property:border-color, opacity;transition-duration:.25s;transition-timing-function:ease-in-out;z-index:2;position:relative;will-change:transform}.crop-area.active{border-color:whitesmoke}.crop-area.disabled{opacity:0.25}";const O=(t,i)=>{if(!t)return"";const e={};return t.href.split("?")[1].split("included[]=").join("").split("&").forEach((t=>{const[i,s]=t.split("%3A");e[i]=s})),"categories"===i?e.product_type:e[i]},G=class{constructor(i){t(this,i),this.vviinnSelectFilter=s(this,"vviinnSelectFilter",7),this.filterType=this.filter.name,this.filter=null,this.basicEventData=void 0,this.selectedFilter="",this.hideFilters=!0}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter(t):this.selectFilter(t)}selectFilter(t){a.activeIonLink=t,this.selectedFilter=O(t,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"select",filterName:t.name}))}clearSelectedFilter(t){a.activeIonLink=t.clear,this.selectedFilter=O(t.clear,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"deselect"}))}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,i){"Enter"===t.key&&this.handleFilterSelection(i)}isFilterSelected(t){return"categories"===this.filterType?this.selectedFilter===O(t,"categories"):this.selectedFilter===t.name}render(){if(!this.filter)return null;const{name:t,filters:s}=this.filter;return i(e,{exportparts:"filter, show-more-filters"},i("div",{class:{filters:!0,"no-scrollbar-mobile":"categories"===this.filterType,"no-scrollbar":"categories"!==this.filterType}},s.filter(((t,i)=>!this.hideFilters||i<5)).map(((e,s)=>{const n="categories"===t?this.selectedFilter===O(e,"categories"):this.selectedFilter===e.name;return i("div",{role:"button",tabindex:"0",key:s,part:n?"filter active":"filter",class:{filter:!0,active:n},style:{"animation-delay":10*s+"ms"},onPointerUp:t=>{a.loading||(t.stopPropagation(),this.handleFilterSelection(e))},onKeyPress:t=>{a.loading||this.handleEnter(t,e)}},e.name)})),this.hideFilters&&i("div",{class:{"show-more":!0,hidden:s.length<=5,active:!this.hideFilters},role:"button",tabindex:"0","aria-role":"button",onClick:()=>{setTimeout((()=>this.toggleFilters()),300)},onKeyPress:t=>{"Enter"===t.key&&this.toggleFilters()},part:"show-more-filters"})))}get el(){return n(this)}};G.style=".filters{display:flex;flex-direction:row;overflow-x:auto;padding-left:24px;padding-right:12px;margin-bottom:12px}.filter{align-items:center;color:#525252;cursor:pointer;display:flex;margin-right:12px;height:-moz-max-content;height:max-content;min-width:-moz-max-content;min-width:max-content;transition-property:background;transition-duration:0.5s;transition-timing-function:ease-in-out;-webkit-user-select:none;-moz-user-select:none;user-select:none;padding:10px 12px}.show-more{display:flex}.show-more.hidden{display:none !important}.show-more::after{position:relative;content:url(\"data:image/svg+xml,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 12.2l-6-6L3.2 5 8 9.8 12.8 5 14 6.2l-6 6z' fill='%23525252'/%3E%3C/svg%3E\");display:block;transform:rotate(-90deg);left:2px}.no-scrollbar::-webkit-scrollbar{display:none}.no-scrollbar{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 640px){.no-scrollbar-mobile{-ms-overflow-style:none;scrollbar-width:none}.no-scrollbar-mobile::-webkit-scrollbar{display:none}}";const P=class{constructor(i){t(this,i),this.vviinnSelectObject=s(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.basicEventData=void 0,this.position=["0","0"]}getObjectPosition(){return l.pipe(a.imageBounds,r.map((t=>{const i=p(u(this.detectedObject).rectangle),{x:e,y:s}=l.pipe(i,g(t),m);return[`${e}px`,`${s}px`]})),r.getOrElse((()=>["0","0"])))}selectDetectedObject(){l.pipe(a.imageBounds,r.map((t=>{const i=u(this.detectedObject).rectangle,e=p(i),s=g(t)(e);a.detectedObject=this.detectedObject,a.searchArea=r.some(s)}))),d(),this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject}))}isActive(){if(!this.detectedObject)return!1;if(!a.detectedObject)return!1;const t=u(this.detectedObject),i=u(a.detectedObject);return v.equals(t,i)}render(){return i(e,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};P.style=':host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--size:32px;--x-position:0;--y-position:0;background:rgba(22, 22, 22, 0.5);border-radius:50%;border:none;cursor:pointer;display:block;height:var(--size);position:absolute;transition:opacity 0.25s;width:var(--size);z-index:2;transform:translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));transition:background 0.1 ease-in-out}:host(:hover){background:rgba(22, 22, 22, 0.75)}:host(.active){background:var(--color-primary, var(--color-primary-system))!important;border:2px solid white}:host::after{--size:32px;border-radius:50%;content:"";cursor:pointer;display:block;height:calc(var(--size) * 0.25);transform:translate(calc(-50% + var(--size) * 0.5), calc(-50% + var(--size) * 0.5));width:calc(var(--size) * 0.25);background:white}';const T=class{constructor(i){t(this,i)}render(){return i(e,null,i("vviinn-error",null,i("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28Zm0 26a12 12 0 1 1 0-24 12 12 0 0 1 0 24Z",fill:"#525252"}),i("path",{d:"M17 8h-2v11h2V8Zm-1 14a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z",fill:"#525252"})),i("h4",{slot:"title"},"Leider nichts gefunden"),i("span",{slot:"text"},"Leider konnten wir keine passenden Produkte finden. Bitte versuche es mit einem anderen Bildausschnitt noch einmal.")))}};T.style=":host{display:grid}vviinn-error{justify-items:center}";const $=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.src="",this.width=0,this.height=0,this.basicEventData=void 0,this.selected=!1}async selectImage(){this.selected=!0;const t=await b(this.src),i=await x(t);l.pipe(i,f.match((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUpload.emit(this.basicEventData)))),this.selected=!1}handleKeyPress({key:t}){"Enter"!==t&&" "!==t||this.selectImage()}showPreloader(){return(a.objectDetectionInProgress||a.loading)&&this.selected}render(){return i(e,{onClick:()=>this.selectImage(),onKeyUp:t=>this.handleKeyPress(t)},this.showPreloader()?i("div",{class:"image-preloader"},i("vviinn-preloader",null)):null,i("img",{src:this.src,width:this.width,height:this.height,tabindex:1}))}};$.style=":host{display:block;margin-bottom:8px;position:relative}:host(:focus){border:2px solid var(--color-primary)}img{width:100%;height:auto;cursor:pointer}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:12px;display:none;padding:4px 6px;position:absolute;right:12px;z-index:4}vviinn-preloader{--preloader-size:12px}@media (max-width: 640px){.image-preloader{display:block}}";const A=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.basicEventData=void 0}componentWillLoad(){_(this,this.el)}delegateFocus(){this.imagesBlock.childNodes[0].childNodes[0].focus()}render(){return i(e,{onFocus:()=>this.delegateFocus()},i("slot",{name:"vviinn-example-images-title"},i("h3",null,"Mit den Beispielbildern die Suche direkt ausprobieren")),i("div",{class:"images",ref:t=>this.imagesBlock=t},i("slot",{name:"vviinn-example-images-1"},i("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDEtTC5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-2"},i("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDItTS5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-3"},i("vviinn-example-image",{width:280,height:480,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDMtTS5qcGc=",basicEventData:this.basicEventData})),i("slot",{name:"vviinn-example-images-4"},i("vviinn-example-image",{width:480,height:640,src:"https://cdn.vviinn.com/0/fit/480/0/ce/0/Z3M6Ly9haWFhcy1pbWdwcm94eS9leGFtcGxlcy9pbWctaW5zcGlyYXRpb24tMDQtTC5qcGc=",basicEventData:this.basicEventData}))))}get el(){return n(this)}};A.style="h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}.images{display:block;-moz-column-count:2;column-count:2;-moz-column-gap:16px;column-gap:16px}";const V=class{constructor(i){t(this,i),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.basicEventData=void 0,this.startUpload=void 0,this.resetVpsButton=void 0}async handleInputChange(t){const i=t.target,e=await x(i.files[0]);l.pipe(e,w((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUpload.emit(this.basicEventData)))),i.value=null}isLoading(){return a.loading}startUploadWatcher(t){t&&(this.fileInput.click(),this.resetVpsButton())}render(){return i(e,{exportparts:"button"},this.isLoading()?i("vviinn-preloader",null):null,this.isLoading()?null:i("label",{htmlFor:"fileInput",part:"button"},i("slot",{name:"upload-button-text"},"Upload image")),i("input",{id:"fileInput",class:"visually-hidden",type:"file",accept:"image/*",onChange:t=>this.handleInputChange(t),ref:t=>this.fileInput=t}))}static get watchers(){return{startUpload:["startUploadWatcher"]}}};V.style=":host{display:block}:host(::hover){background:whitesmoke}.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}label{cursor:pointer;display:grid;width:100%;height:100%;transition:background 0.1s ease-in-out}";const H=class{constructor(i){t(this,i),this.basicEventData=void 0}handleInitialImageLoad(t){const i=y(t.target),{x:e,y:s}=c(i,{x:12,y:12}),n={x:e,y:s,width:i.width-24,height:i.height-24};a.imageBounds=r.some(i),a.searchArea=r.some(n)}renderDetectedObject(t){return i("vviinn-detected-object",{detectedObject:t,basicEventData:this.basicEventData})}renderImage(){return l.pipe(o(a.imageUrl,a.image),r.map((([t,e])=>{const[s,n]=(t=>{const i=k(t),e=z(288)(i).map((t=>t.size));return[e[0],e[1]]})(e);return i("img",{decoding:"async",width:s,height:n,src:t,onLoad:t=>this.handleInitialImageLoad(t),draggable:!1})})),r.getOrElse((()=>null)))}renderCropper(){return l.pipe(a.imageUrl,r.map((()=>i("image-cropper",{basicEventData:this.basicEventData}))),r.getOrElse((()=>null)))}render(){return i(e,null,a.loading||a.objectDetectionInProgress?i("div",{class:"image-preloader"},i("vviinn-preloader",null)):null,i("highlight-box",null),this.renderImage(),this.renderCropper(),a.detectedObjects.map((t=>this.renderDetectedObject(t))))}};H.style=":host{display:grid;position:relative;justify-self:center;direction:ltr}img{box-sizing:border-box;filter:brightness(60%);position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none;z-index:-1}.image-preloader{background:rgba(0, 0, 0, 0.25);border-radius:4px;bottom:18px;padding:4px 6px;pointer-events:none;position:absolute;right:18px;z-index:4}vviinn-preloader{--preloader-size:12px}";const K=class{constructor(i){t(this,i),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.widgetVersion=void 0,this.hideBackButton=!1,this.slider=!1}componentWillLoad(){_(this,this.el)}close(){this.active=!1,setTimeout((()=>{this.vviinnWidgetClose.emit({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:F.VPS,widgetId:this.buttonElementId,widgetVersion:this.widgetVersion})}),this.slider?500:0)}handleAnimationEnd(t){"fade-in"===t.animationName&&(this.slider=!0)}renderImage(){return l.pipe(o(a.imageUrl,a.image),r.map((([t])=>i("img",{width:"32",height:"32",src:t,class:"title-image"}))),r.getOrElse((()=>null)))}render(){return i(e,{exportparts:"secondary-action, title, close-button",class:{closed:!this.active},onAnimationEnd:t=>this.handleAnimationEnd(t)},i("div",{class:"head"},!this.hideBackButton&&i("button",{part:"secondary-action",onClick:()=>this.resetState()},i("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("path",{d:"M20.25 12H3.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),i("path",{d:"M10.5 5.25L3.75 12L10.5 18.75",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))),i("div",{class:"title",part:"title"},this.renderImage(),i("slot",{name:"vviinn-image-search-modal-title"},"Bildsuche")),i("button",{onClick:()=>this.close(),class:"close-button",part:"close-button"},i("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},i("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"})))),i("div",{class:"body"},i("slot",null)))}get el(){return n(this)}};K.style=":host{background:white;border-radius:4px;box-sizing:border-box;display:grid;grid-template-rows:min-content auto;max-width:960px;overflow:auto}@media (max-width: 640px){:host{animation-name:fade-in;animation-duration:0.5s;animation-fill-mode:forwards}:host(.closed){animation-name:fade-out;animation-fill-mode:none}.body{overflow-y:auto}}.head{display:flex;align-items:center;border-bottom:1px solid #f4f4f4;padding:16px}.title{display:flex;align-items:center;transform:translateX(-6px);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:4px;color:#c6c6c6}button:hover{color:#000}@keyframes fade-in{from{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes fade-out{from{transform:translateY(0)}to{transform:translateY(100%)}}";const N=class{constructor(i){t(this,i)}componentWillLoad(){_(this,this.el)}render(){return i(e,null,i("slot",{name:"vviinn-onboarding-title"},i("h3",null,"So funktioniert es")),i("vviinn-slider",{showArrows:!0},i("vviinn-slide",null,i("vviinn-onboarding-card-1",null)),i("vviinn-slide",null,i("vviinn-onboarding-card-2",null)),i("vviinn-slide",null,i("vviinn-onboarding-card-3",null))))}get el(){return n(this)}};N.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}::host{display:block}h3{font-size:22px;font-weight:600;line-height:32px;margin:0;margin-bottom:16px;text-align:center}vviinn-slide{background:#f4f4f4;padding:24px}svg{padding:16px 0}.text{display:grid;grid-gap:8px}.text>h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}.text>p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}";const R=class{constructor(i){t(this,i)}componentWillLoad(){_(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-1-icon"},i(S,null)),i("slot",{name:"onboarding-card-1-text"},i("div",{class:"text"},i("h4",null,"Starte die Bildsuche"),i("p",null,"Lade ein Bild aus Deiner Galerie hoch oder fotografiere ein Produkt mit Deiner Kamera."))))}get el(){return n(this)}};R.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const U=class{constructor(i){t(this,i)}componentWillLoad(){_(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-2-icon"},i(E,null)),i("slot",{name:"onboarding-card-2-text"},i("div",{class:"text"},i("h4",null,"Verfeiner Deine Suche"),i("p",null,"Du kannst den Bildrahmen selber festlegen und so die Produkte genau auswählen."))))}get el(){return n(this)}};U.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const Y=class{constructor(i){t(this,i)}componentWillLoad(){_(this,this.el)}render(){return i(e,null,i("slot",{name:"onboarding-card-3-icon"},i(W,null)),i("slot",{name:"onboarding-card-3-text"},i("div",{class:"text"},i("h4",null,"Ohne Hintergrund"),i("p",null,"Die besten Ergebnisse erhältst Du, wenn das gesuchte Objekt mit einfarbigem und hellem Hintergrund zu sehen ist."))))}get el(){return n(this)}};Y.style=":host{align-items:center;background:#f4f4f4;display:grid;grid-template-rows:repeat(2, 1fr);justify-items:center;padding:24px;width:100%}h4{color:#161616;font-size:18px;font-weight:600;line-height:24px;margin:unset;text-align:center}svg{padding:16px 0}p{color:#525252;font-size:14px;font-style:normal;font-weight:normal;line-height:20px;margin:unset;text-align:center}.colored{fill:var(--color-icons, var(--color-icons-system))}.text{display:grid;grid-gap:8px}";const Z=class{constructor(i){t(this,i)}render(){return i(e,null,i("slot",null))}};Z.style=":host{animation:fade-in 0.5s ease-in-out;background:rgba(0, 0, 0, 0.5);display:block;height:100vh;left:0;overflow:hidden;position:fixed;top:0;width:100vw;z-index:9999}@keyframes fade-in{from{opacity:0.1}to{opacity:1}}";const q=class{constructor(i){t(this,i),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.active=!1,this.resetState=void 0,this.buttonElementId=void 0,this.hideBackButton=!1,this.widgetVersion=void 0}render(){return i(e,{class:{active:this.active}},i("vviinn-overlay",null,i("vviinn-modal",{resetState:this.resetState,active:this.active,buttonElementId:this.buttonElementId,hideBackButton:this.hideBackButton,widgetVersion:this.widgetVersion},i("slot",null,"CONTENT"))))}};q.style=":host{display:none}:host(.active){display:block}vviinn-overlay{align-items:center;display:grid;justify-items:center;cursor:default}@media (max-width: 640px){vviinn-modal{border-radius:4px 4px 0 0;height:100vh;margin-top:32px;transform:translateY(100%);width:100vw}vviinn-overlay{align-items:end;display:grid;justify-items:center}}";const X=class{constructor(i){t(this,i)}componentWillLoad(){_(this,this.el)}render(){return i(e,null,i("slot",null,i("div",{class:"content"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"none"},i("defs",null),i("path",{fill:"#525252",d:"M8.5 11V7h-2v1h1v3H6v1h4v-1H8.5zM8 4a.75.75 0 100 1.5A.75.75 0 008 4z"}),i("path",{fill:"#525252",d:"M8 15A7 7 0 118 1a7 7 0 010 14zM8 2a6 6 0 100 12A6 6 0 008 2z"})),i("slot",{name:"vviinn-privacy-badge-text"},i("p",null,"Durch das Hochladen eines Bildes willigst Du in die Verarbeitung durch unseren Partner Vviinn ein. Das Bild wird nach einer Stunde Inaktivität gelöscht.")))))}get el(){return n(this)}};X.style=":host{display:block;background:#F4F4F4;padding:17px}.content{display:grid;grid-template-columns:min-content auto;grid-gap:9px}.content p{color:#525252;font-size:12px;line-height:16px;margin:unset}";const Q=class{constructor(i){t(this,i),this.handler=void 0}render(){return i(e,null,i("vviinn-error",null,i("h4",{slot:"title"},"Keine Verbindung"),i("span",{slot:"text"},"Etwas hat leider nicht funktioniert. Bitte prüfen Sie Ihre Internetverbindung und laden Sie das Bild noch einmal hoch."),i("button",{slot:"action",onClick:this.handler},"Erneut versuchen")))}};Q.style=":host{display:block}";const J=class{constructor(i){t(this,i)}render(){return i(e,null,i("slot",null))}};J.style=":host{display:grid;justify-items:center}";const tt=({kind:t,tabindex:e,disabled:s,onClick:n,onKeyDown:r})=>{return i("div",{class:(o={kind:t,disabled:s},{"arrow-wrapper":!0,[o.kind]:!0,disabled:o.disabled}),onClick:n,tabindex:e,onKeyDown:r},i(M,null));var o},it=class{constructor(i){t(this,i),this.elementsCount=0,this.internalPosition=0,this.swipeStartPosition=r.none,this.isRTL=!1,this.showBullets=!0,this.position=0,this.showArrows=!1}positionWatchHandler(t){this.internalPosition=t,this.el.style.setProperty("--position",`${this.calculatePosition(t)}`),this.setActiveCssClassToSlide(t)}componentWillLoad(){this.isRTL="rtl"===document.dir}connectedCallback(){this.handleDomContentChanges()}handleDomContentChanges(){const t=this.el.querySelectorAll("vviinn-slide");this.elementsCount=t.length,this.el.style.setProperty("--num-items",`${this.elementsCount}`),this.setActiveCssClassToSlide(0)}setActiveCssClassToSlide(t){const i=this.el.querySelectorAll("vviinn-slide");i.forEach((t=>t.classList.remove("active"))),i[t].classList.add("active")}goToSlide(t){this.internalPosition=t,this.el.style.setProperty("--position",`${t}`),this.setActiveCssClassToSlide(t)}renderBullets(){return this.showBullets?i("div",{class:"controls"},C.range(0,this.elementsCount-1).map((t=>i("div",{class:{bullet:!0,active:t==Math.abs(this.internalPosition)%this.elementsCount},onClick:()=>this.goToSlide(t)})))):null}nextSlide(){this.internalPosition++,this.renderSlidePosition()}prevSlide(){const t=this.internalPosition-1;this.internalPosition=t>-1?t:this.elementsCount-1,this.renderSlidePosition()}renderSlidePosition(){const t=this.internalPosition%this.elementsCount;requestAnimationFrame((()=>{this.el.style.setProperty("--position",`${this.calculatePosition(t)}`)}))}calculatePosition(t){return this.isRTL?-1*t:t}handleKeyDown(t){if("Space"===t.key||"Enter"===t.key)switch(t.target.className.includes("prev")?"prev":"next"){case"prev":this.prevSlide();break;case"next":this.nextSlide()}}handleTouchStart(t){this.showBullets&&(this.swipeStartPosition=l.pipe(t.touches[0],r.fromNullable,r.map((t=>t.clientX))))}handleTouchEnd(t){if(!this.showBullets)return;const i=l.pipe(t.changedTouches[0],r.fromNullable,r.map((t=>t.clientX)));l.pipe(o(this.swipeStartPosition,i),r.map((([t,i])=>{return(e=t)<(s=i)?-1:e>s?1:0;var e,s})),r.map((t=>{switch(t){case 1:return this.nextSlide();case-1:return this.prevSlide()}})))}render(){return i(e,null,i("div",{class:"items-wrapper"},i("div",{class:"items",onTouchStart:t=>this.handleTouchStart(t),onTouchEnd:t=>this.handleTouchEnd(t)},i("slot",null))),this.showArrows?[i(tt,{kind:"prev",onClick:()=>this.isRTL?this.nextSlide():this.prevSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:1,disabled:!1}),i(tt,{kind:"next",onClick:()=>this.isRTL?this.prevSlide():this.nextSlide(),onKeyDown:t=>this.handleKeyDown(t),tabindex:0,disabled:!1})]:null,this.renderBullets())}get el(){return n(this)}static get watchers(){return{position:["positionWatchHandler"]}}};it.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{--num-items:0;--position:0;display:grid;grid-gap:20px;justify-items:center;position:relative}.items-wrapper{overflow:hidden;width:100%}.items{box-sizing:border-box;display:grid;grid-auto-flow:column;grid-template-columns:repeat(var(--num-items), 100%);transform:translateX(calc(-100% * var(--position)));transition:transform 0.33s ease-in-out}.controls{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--num-items), min-content)}.bullet{background:#e0e0e0;border-radius:50%;box-sizing:border-box;cursor:pointer;height:8px;width:8px;transition:background 0.1s ease-in-out}.bullet:hover{background:#c6c6c6}.bullet.active{background:var(--color-primary, var(--color-primary-system))}.bullet:active{background:transparent;border:2px solid var(--color-primary, var(--color-primary-system))}.arrow-wrapper{align-items:center;cursor:pointer;background:white;border:2px solid white;bottom:0;box-sizing:border-box;display:grid;height:calc(var(--spacer) * 6);justify-items:center;margin:auto;position:absolute;top:0;transform:translate3d(0, -50%, 0);transition:border 0.25ms ease-in-out;width:calc(var(--spacer) * 4)}.arrow-wrapper:active{border-color:var(--color-primary, var(--color-primary-system));opacity:0.75}.arrow-wrapper:focus{border-color:var(--color-primary, var(--color-primary-system));opacity:0.5;outline:none}.prev{left:0}.next{right:0}.next>svg{transform:rotate3d(0, 1, 0, 180deg)}.arrow-wrapper>svg{transition:fill 0.25ms ease-in-out;fill:#a8a8a8}.arrow-wrapper:hover>svg{fill:#8d8d8d}";const et=class{constructor(i){t(this,i)}componentWillLoad(){_(this,this.el)}render(){return i(e,null,i("slot",null,i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none"},i("defs",null),i("path",{fill:"#C6C6C6",d:"M48 28a11.98 11.98 0 00-9.77 18.942L28 57.172 30.828 60l10.23-10.23A11.994 11.994 0 1048 28zm0 20a8 8 0 118-8 8.009 8.009 0 01-8 8zM34 24a6 6 0 10-6-6 6.006 6.006 0 006 6zm0-8a2 2 0 110 4 2 2 0 010-4z"}),i("path",{fill:"#C6C6C6",d:"M24 48H8V35.993L18 26l11.172 11.172L32 34.336 20.828 23.165a4 4 0 00-5.656 0L8 30.336V8h40v12h4V8a4.004 4.004 0 00-4-4H8a4.004 4.004 0 00-4 4v40a4.005 4.005 0 004 4h16v-4z"})),i("span",{class:"vviinn-teaser-text"},i("slot",{name:"vviinn-teaser-text"},"Finde Produkte auf ",i("br",null)," einem Foto"))))}get el(){return n(this)}};et.style=":host{align-items:center;display:grid;justify-items:center;grid-gap:16px}.vviinn-teaser-text{font-size:28px;font-weight:600;line-height:40px;size:28px;text-align:center}";const st=class{constructor(i){t(this,i),this.handler=void 0}render(){return i(e,null,i("vviinn-error",null,i("h4",{slot:"title"},"Dateityp wird nicht unterstützt"),i("span",{slot:"text"},"Leider unterstützen wir dieses Format nicht. Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch."),i("button",{slot:"action",onClick:this.handler},"Neues Bild hochladen")))}};st.style=":host{display:block}";export{B as highlight_box,I as image_cropper,G as search_filters,P as vviinn_detected_object,T as vviinn_empty_results,$ as vviinn_example_image,A as vviinn_example_images,V as vviinn_image_selector,H as vviinn_image_view,K as vviinn_modal,N as vviinn_onboarding,R as vviinn_onboarding_card_1,U as vviinn_onboarding_card_2,Y as vviinn_onboarding_card_3,Z as vviinn_overlay,q as vviinn_overlayed_modal,X as vviinn_privacy_badge,Q as vviinn_server_error,J as vviinn_slide,it as vviinn_slider,et as vviinn_teaser,st as vviinn_wrong_format}
@@ -1 +1 @@
1
- import{r as i,c as t,h as e,H as s,g as r}from"./p-fa17e81f.js";import{v as a}from"./p-6a189f8f.js";import{i as n,s as o,a as d,O as p,p as l,n as h}from"./p-90e24b10.js";import{s as c,S as g}from"./p-53eacbe3.js";import{e as v,f as u,g as m,h as b,v as f,b as x,i as w}from"./p-c8b070c2.js";import{c as y}from"./p-badde98c.js";import"./p-3b99c62d.js";var k=function(i,t){var e={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&t.indexOf(s)<0&&(e[s]=i[s]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(i);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(i,s[r])&&(e[s[r]]=i[s[r]])}return e};const j=i=>/^[-+]?(\d+|Infinity)$/.test(i)?Number(i):NaN,I=i=>!h(i),_=i=>!isNaN(i),V=class{constructor(e){i(this,e),this.globalSlotsChanged=t(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnImageUpload=t(this,"vviinnImageUpload",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnImageCrop=t(this,"vviinnImageCrop",7),this.vviinnSelectObject=t(this,"vviinnSelectObject",7),this.vviinnSelectFilter=t(this,"vviinnSelectFilter",7),this.imageSource=null,this.setTrackingDeactivated=i=>{"rejected"===i.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var i;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:y.VPS,widgetId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.id,widgetVersion:a}},this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailNewTab=!0,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.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.trackingDeactivated=!1}handleOpenLink(i){this.productDetailNewTab?window.open(i):window.location.href=i}componentDidLoad(){const i=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(i))}activeWatcher(i){i?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.trackOpenEvent()):document.body.style.overflow=this.overflow}buttonPressedWatcher(i){i&&"modal"===this.mode&&(this.active=!0,this.vviinnWidgetOpen.emit(this.getBasicEventData()))}trackProductView({detail:i}){if(this.trackingDeactivated)return;const{productRank:t,productId:e}=i,s=k(i,["productRank","productId","productName","widgetType","widgetId","campaignTypeId","campaignTypeName"]),r=v(Object.assign({session_id:this.uiSessionId,rank:t,product:e},s));this.trackingApi.trackEvent(r).then(this.setTrackingDeactivated)}async trackProductClick({detail:i}){const{productRank:t,productId:e}=i,s=k(i,["productRank","productId","productName","widgetType","widgetId","campaignTypeId","campaignTypeName"]),r=u(Object.assign({session_id:this.uiSessionId,rank:t,product:e},s)),a=n.results.find((t=>t.productId===i.productId));a&&a.deeplink&&(this.trackingDeactivated?this.handleOpenLink(a.deeplink):await this.trackingApi.trackEvent(this.trackingDeactivated?null:r).then(this.setTrackingDeactivated).finally((()=>{this.handleOpenLink(a.deeplink)})))}trachSearchAreaChanges(){if(this.trackingDeactivated)return;const i=m({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.trackingDeactivated)return;const i=m({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackFilter({detail:i}){if(this.trackingDeactivated)return;const t=b({session_id:this.uiSessionId,source:this.imageSource,kind:"category",action:i.action});this.trackingApi.trackEvent(t).then(this.setTrackingDeactivated)}connectedCallback(){o.apiPath=this.apiPath,o.currencySign=this.currencySign,o.locale=this.locale,n.token=this.token,n.campaignId=d.pipe(this.campaignId,p.fromNullable,p.chain(p.fromPredicate(I)),p.map(j),p.chain(p.fromPredicate(_)),p.map((i=>`${i}`))),this.excluded&&(this.excluded=l(this.excluded)),n.excluded=this.excluded,this.uiSessionId=f(),this.trackingApi=x(this.apiPath,this.token),this.id=this.el.id}componentWillLoad(){c(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData())}trackOpenEvent(){if(this.trackingDeactivated)return;const i=w({action:"open",session_id:this.uiSessionId});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}handleImageSelection(i){this.imageSource=i,this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.trackInitialSearch()}trackInitialSearch(){if(this.trackingDeactivated)return;const i=m({session_id:this.uiSessionId,source:this.imageSource,search_area:"full"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}resetState(){this.resetScroll("onboarding-block"),this.slidePosition=0,n.image=p.none,n.imageUrl=p.none,n.imageBounds=p.none,n.searchArea=p.none,n.results=[],n.filters=[],n.detectedObjects=[],n.activeIonLink=void 0,n.rectangleSearchForm=void 0,n.loading=!1,this.resetScroll("results-block")}haveErrors(){return this.wrongImageFormat||n.serverError}resetScroll(i,t="auto"){this.el.shadowRoot.getElementById(i).scroll({top:0,left:0,behavior:t})}handleModalClose(){if(this.active=!1,this.resetState(),["onboarding-block","results-block"].forEach((i=>this.resetScroll(i))),this.trackingDeactivated)return;const i=w({action:"close",session_id:this.uiSessionId});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}render(){var i;return e(s,null,!this.showingInButton&&e(g,null),e("vviinn-overlayed-modal",{class:{"first-screen":0===this.slidePosition},active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.id,widgetVersion:a,hideBackButton:"upload"===this.mode,exportparts:"secondary-action, title, close-button, example-images"},e("vviinn-slider",{showBullets:!1,position:this.slidePosition},e("vviinn-slide",{class:{"start-page":!0}},e("div",{class:{error:this.haveErrors(),"start-page_block":!0}},e("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.wrongImageFormat=!1}),e("vviinn-server-error",{class:{hidden:!n.serverError},handler:()=>n.serverError=!1}),e("vviinn-teaser",{class:{hidden:this.haveErrors()}}),e("vviinn-image-selector",{class:{hidden:this.haveErrors()},onVviinnImageUpload:()=>{this.active=!0,this.handleImageSelection("upload"),"upload"===this.mode&&this.vviinnWidgetOpen.emit(this.getBasicEventData())},onVviinnNoResult:()=>this.wrongImageFormat=!0,resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"select-image_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode},e("span",{slot:"upload-button-text",class:"upload-button-content"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"29",height:"28",fill:"none"},e("defs",null),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z","clip-rule":"evenodd"}),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z","clip-rule":"evenodd"})),e("slot",{name:"vviinn-image-upload-button-text"},e("span",null,"Kamera oder Bild auswählen")))),e("vviinn-privacy-badge",{class:{hidden:this.haveErrors()}})),e("div",{id:"onboarding-block",class:"start-page_block"},e("div",{class:"onboarding-wrapper"},e("vviinn-onboarding",null),e("vviinn-example-images",{part:"example-images",onVviinnImageUpload:()=>this.handleImageSelection("example"),onVviinnNoResult:()=>this.resetScroll("onboarding-block","smooth"),basicEventData:this.getBasicEventData()})))),e("vviinn-slide",{class:{"results-page":!0,active:1==this.slidePosition}},e("div",{class:"image-wrapper"},e("vviinn-image-view",{basicEventData:this.getBasicEventData()}),e("div",{class:"filters-wrapper"},e("div",{class:"filters"},n.filters.map((i=>e("search-filters",{filter:i,basicEventData:this.getBasicEventData()})))))),e("div",{id:"results-block",class:"products-wrapper"},e("div",{class:{"nothing-found":!0,hidden:n.results.length>0}},e("vviinn-empty-results",null),e("vviinn-onboarding",null)),e("div",{class:{hidden:n.results.length<=0,products:!0}},n.results.map(((i,t)=>{var s;return e("vviinn-product-card",{key:i.productId,hidden:!0,productTitle:i.title,productId:i.productId,productType:i.productType,brand:i.brand,deeplink:i.deeplink,price:i.price.actual,salePrice:i.price.sale,imageWidth:160,image:null!==(s=i.image.thumbnail)&&void 0!==s?s:i.image.original,part:"product-card",campaignTypeId:"VPS",index:t,widgetElementId:this.id,buttonElementId:this.buttonElementId,widgetVersion:a})}))))))))}get el(){return r(this)}static get watchers(){return{active:["activeWatcher"],buttonPressed:["buttonPressedWatcher"]}}};V.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}: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);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #f4f4f4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #f4f4f4;display:grid;grid-template-rows:min-content 1fr;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;margin-bottom:4px;font-size:14px;font-weight:400;line-height:20px}search-filters:first-child::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(--color-primary-system));color:white}.filters-wrapper{overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}@media (max-width: 640px){.filters-wrapper{min-width:calc(100% + 40px)}}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";export{V as vviinn_vps_widget}
1
+ import{r as i,c as t,h as e,H as s,g as r}from"./p-fa17e81f.js";import{v as a}from"./p-6c073c50.js";import{i as n,s as o,a as d,O as p,p as l,n as c}from"./p-90e24b10.js";import{s as h,S as g}from"./p-53eacbe3.js";import{e as v,f as u,g as m,h as b,v as f,b as x,i as w}from"./p-c8b070c2.js";import{c as y}from"./p-badde98c.js";import"./p-3b99c62d.js";var k=function(i,t){var e={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&t.indexOf(s)<0&&(e[s]=i[s]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(s=Object.getOwnPropertySymbols(i);r<s.length;r++)t.indexOf(s[r])<0&&Object.prototype.propertyIsEnumerable.call(i,s[r])&&(e[s[r]]=i[s[r]])}return e};const j=i=>/^[-+]?(\d+|Infinity)$/.test(i)?Number(i):NaN,I=i=>!c(i),_=i=>!isNaN(i),V=class{constructor(e){i(this,e),this.globalSlotsChanged=t(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnImageUpload=t(this,"vviinnImageUpload",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnImageCrop=t(this,"vviinnImageCrop",7),this.vviinnSelectObject=t(this,"vviinnSelectObject",7),this.vviinnSelectFilter=t(this,"vviinnSelectFilter",7),this.imageSource=null,this.setTrackingDeactivated=i=>{"rejected"===i.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var i;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:y.VPS,widgetId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.id,widgetVersion:a}},this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailNewTab=!0,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.slidePosition=0,this.width=0,this.wrongImageFormat=!1,this.trackingDeactivated=!1}handleOpenLink(i){this.productDetailNewTab?window.open(i):window.location.href=i}componentDidLoad(){const i=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(i))}activeWatcher(i){i?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.trackOpenEvent()):document.body.style.overflow=this.overflow}buttonPressedWatcher(i){i&&"modal"===this.mode&&(this.active=!0,this.vviinnWidgetOpen.emit(this.getBasicEventData()))}trackProductView({detail:i}){if(this.trackingDeactivated)return;const{productRank:t,productId:e}=i,s=k(i,["productRank","productId","productName","widgetType","widgetId","campaignTypeId","campaignTypeName"]),r=v(Object.assign({session_id:this.uiSessionId,rank:t,product:e},s));this.trackingApi.trackEvent(r).then(this.setTrackingDeactivated)}async trackProductClick({detail:i}){const{productRank:t,productId:e}=i,s=k(i,["productRank","productId","productName","widgetType","widgetId","campaignTypeId","campaignTypeName"]),r=u(Object.assign({session_id:this.uiSessionId,rank:t,product:e},s)),a=n.results.find((t=>t.productId===i.productId));a&&a.deeplink&&(this.trackingDeactivated?this.handleOpenLink(a.deeplink):await this.trackingApi.trackEvent(this.trackingDeactivated?null:r).then(this.setTrackingDeactivated).finally((()=>{this.handleOpenLink(a.deeplink)})))}trachSearchAreaChanges(){if(this.trackingDeactivated)return;const i=m({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.trackingDeactivated)return;const i=m({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackFilter({detail:i}){if(this.trackingDeactivated)return;const t=b({session_id:this.uiSessionId,source:this.imageSource,kind:"category",action:i.action});this.trackingApi.trackEvent(t).then(this.setTrackingDeactivated)}connectedCallback(){o.apiPath=this.apiPath,o.currencySign=this.currencySign,o.locale=this.locale,n.token=this.token,n.campaignId=d.pipe(this.campaignId,p.fromNullable,p.chain(p.fromPredicate(I)),p.map(j),p.chain(p.fromPredicate(_)),p.map((i=>`${i}`))),this.excluded&&(this.excluded=l(this.excluded)),n.excluded=this.excluded,this.uiSessionId=f(),this.trackingApi=x(this.apiPath,this.token),this.id=this.el.id}componentWillLoad(){h(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData())}trackOpenEvent(){if(this.trackingDeactivated)return;const i=w({action:"open",session_id:this.uiSessionId});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}handleImageSelection(i){this.imageSource=i,this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.trackInitialSearch()}trackInitialSearch(){if(this.trackingDeactivated)return;const i=m({session_id:this.uiSessionId,source:this.imageSource,search_area:"full"});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}resetState(){this.resetScroll("onboarding-block"),this.slidePosition=0,n.image=p.none,n.imageUrl=p.none,n.imageBounds=p.none,n.searchArea=p.none,n.results=[],n.filters=[],n.detectedObjects=[],n.activeIonLink=void 0,n.rectangleSearchForm=void 0,n.loading=!1,this.resetScroll("results-block")}haveErrors(){return this.wrongImageFormat||n.serverError}resetScroll(i,t="auto"){this.el.shadowRoot.getElementById(i).scroll({top:0,left:0,behavior:t})}handleModalClose(){if(this.active=!1,this.resetState(),["onboarding-block","results-block"].forEach((i=>this.resetScroll(i))),this.trackingDeactivated)return;const i=w({action:"close",session_id:this.uiSessionId});this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}render(){var i;return e(s,null,!this.showingInButton&&e(g,null),e("vviinn-overlayed-modal",{class:{"first-screen":0===this.slidePosition},active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(i=this.buttonElementId)&&void 0!==i?i:this.id,widgetVersion:a,hideBackButton:"upload"===this.mode,exportparts:"secondary-action, title, close-button, example-images"},e("vviinn-slider",{showBullets:!1,position:this.slidePosition},e("vviinn-slide",{class:{"start-page":!0}},e("div",{class:{error:this.haveErrors(),"start-page_block":!0}},e("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.wrongImageFormat=!1}),e("vviinn-server-error",{class:{hidden:!n.serverError},handler:()=>n.serverError=!1}),e("vviinn-teaser",{class:{hidden:this.haveErrors()}}),e("vviinn-image-selector",{class:{hidden:this.haveErrors()},onVviinnImageUpload:()=>{this.active=!0,this.handleImageSelection("upload"),"upload"===this.mode&&this.vviinnWidgetOpen.emit(this.getBasicEventData())},onVviinnNoResult:()=>this.wrongImageFormat=!0,resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"select-image_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode},e("span",{slot:"upload-button-text",class:"upload-button-content"},e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"29",height:"28",fill:"none"},e("defs",null),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M10.271 3.89A.875.875 0 0111 3.5h7c.293 0 .566.146.728.39l1.49 2.235h3.033a2.625 2.625 0 012.625 2.625V21a2.625 2.625 0 01-2.625 2.625H5.75A2.625 2.625 0 013.125 21V8.75A2.625 2.625 0 015.75 6.125h3.031l1.49-2.235zm1.197 1.36l-1.49 2.235a.875.875 0 01-.729.39H5.75a.875.875 0 00-.875.875V21a.875.875 0 00.875.875h17.5a.875.875 0 00.875-.875V8.75a.875.875 0 00-.875-.875h-3.5a.875.875 0 01-.729-.39l-1.49-2.235h-6.063z","clip-rule":"evenodd"}),e("path",{fill:"#fff","fill-rule":"evenodd",d:"M14.5 11.375a3.062 3.062 0 100 6.125 3.062 3.062 0 000-6.125zm-4.813 3.063a4.812 4.812 0 119.625 0 4.812 4.812 0 01-9.625 0z","clip-rule":"evenodd"})),e("slot",{name:"vviinn-image-upload-button-text"},e("span",null,"Kamera oder Bild auswählen")))),e("vviinn-privacy-badge",{class:{hidden:this.haveErrors()}})),e("div",{id:"onboarding-block",class:"start-page_block"},e("div",{class:"onboarding-wrapper"},e("vviinn-onboarding",null),e("vviinn-example-images",{part:"example-images",onVviinnImageUpload:()=>this.handleImageSelection("example"),onVviinnNoResult:()=>this.resetScroll("onboarding-block","smooth"),basicEventData:this.getBasicEventData()})))),e("vviinn-slide",{class:{"results-page":!0,active:1==this.slidePosition}},e("div",{class:"image-wrapper"},e("vviinn-image-view",{basicEventData:this.getBasicEventData()}),e("div",{class:"filters-wrapper"},e("div",{class:"filters"},n.filters.map((i=>e("search-filters",{filter:i,basicEventData:this.getBasicEventData()})))))),e("div",{id:"results-block",class:"products-wrapper"},e("div",{class:{"nothing-found":!0,hidden:n.results.length>0}},e("vviinn-empty-results",null),e("vviinn-onboarding",null)),e("div",{class:{hidden:n.results.length<=0,products:!0}},n.results.map(((i,t)=>{var s;return e("vviinn-product-card",{key:i.productId,hidden:!0,productTitle:i.title,productId:i.productId,productType:i.productType,brand:i.brand,deeplink:i.deeplink,price:i.price.actual,salePrice:i.price.sale,imageWidth:160,image:null!==(s=i.image.thumbnail)&&void 0!==s?s:i.image.original,part:"product-card",campaignTypeId:"VPS",index:t,widgetElementId:this.id,buttonElementId:this.buttonElementId,widgetVersion:a})}))))))))}get el(){return r(this)}static get watchers(){return{active:["activeWatcher"],buttonPressed:["buttonPressedWatcher"]}}};V.style=":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}: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);min-height:580px}.start-page_block{align-content:start;border-right:1px solid #f4f4f4;display:grid;padding:48px}.start-page_block.error{align-content:center}#onboarding-block{border-right:unset;box-sizing:border-box;grid-gap:24px;overflow-y:auto;position:relative;width:100%}vviinn-teaser{margin-bottom:32px;margin-top:-24px}vviinn-image-selector{align-items:center;background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));border-radius:2px;color:white;display:grid;font-size:16px;font-weight:600;height:56px;justify-items:center;margin-bottom:16px;transition:background 0.1s ease-in-out}vviinn-image-selector:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}vviinn-image-selector:active{border-color:black}.upload-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:16px}.results-page{display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(152px, 1fr));justify-items:center;padding:24px;padding-right:0;position:absolute;width:calc(100% - 16px)}.products.hidden{display:none}vviinn-empty-results{width:280px;align-self:center;justify-self:center}.products-wrapper{display:grid;overflow-y:auto;overflow-x:hidden;padding:unset;position:relative;width:100%}.image-wrapper{border-right:1px solid #f4f4f4;display:grid;grid-template-rows:min-content 1fr;grid-gap:24px;min-width:100%}.onboarding-wrapper{position:absolute;width:100%;padding:48px;box-sizing:border-box;display:grid;grid-gap:64px;padding-bottom:24px}vviinn-product-card{gap:0;width:100%}vviinn-product-card::part(image){border:1px solid #eaeaea;margin-bottom:8px}vviinn-product-card::part(price-container),vviinn-product-card::part(deeplink),vviinn-product-card::part(title){align-self:start}search-filters span{display:none}search-filters::part(filter){background:#f4f4f4;border-radius:8px;box-sizing:border-box;color:#161616;margin-bottom:4px;font-size:14px;font-weight:400;line-height:20px}search-filters:first-child::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(--color-primary-system));color:white}.filters-wrapper{overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}@media (max-width: 640px){.filters-wrapper{min-width:calc(100% + 40px)}}.results-page:not(.active){display:none}.nothing-found{display:grid;grid-gap:64px;justify-self:center;padding-top:64px;padding-bottom:16px;position:absolute;width:60%}@media (max-width: 768px){.start-page_block{padding:24px}.onboarding-wrapper{padding:24px}}@media (max-width: 640px){.start-page{grid-template-rows:min-content;grid-template-columns:unset;grid-gap:48px;padding:24px 0 48px 0}}@media (max-width: 640px){.results-page>*{box-sizing:border-box;padding:24px}vviinn-slide{padding-bottom:48px}.start-page_block:last-of-type{border-right:unset;overflow-y:unset;position:static;box-sizing:border-box;width:unset}.start-page_block{padding:0 24px}vviinn-teaser{margin-top:24px}.onboarding-wrapper{position:static;width:unset;padding:unset;box-sizing:border-box}.results-page{grid-template-columns:unset;grid-template-rows:min-content auto}.image{margin-bottom:8px}.image-wrapper{grid-template-rows:min-content auto;width:100%}.products-wrapper{align-content:start;position:static;overflow-y:unset;width:100%;padding-top:0}.products{position:static;padding:0;width:unset;grid-gap:32px 16px;justify-content:center}.nothing-found{position:static;grid-gap:64px;padding:unset;align-content:start;width:unset}}@media (max-width: 320px){.products{grid-template-columns:unset}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}";export{V as vviinn_vps_widget}
@@ -0,0 +1 @@
1
+ const o="2.20.25";export{o as v}
@@ -0,0 +1 @@
1
+ import{r as i,c as t,h as s,H as e,g as n}from"./p-fa17e81f.js";import{v as h}from"./p-6c073c50.js";import{a as o}from"./p-60ea7665.js";import{S as a}from"./p-53eacbe3.js";import{c as r}from"./p-badde98c.js";const d=class{constructor(s){i(this,s),this.vviinnWidgetLoad=t(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=t(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=t(this,"vviinnWidgetClose",7),this.vviinnImageUpload=t(this,"vviinnImageUpload",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnImageCrop=t(this,"vviinnImageCrop",7),this.vviinnSelectObject=t(this,"vviinnSelectObject",7),this.vviinnSelectFilter=t(this,"vviinnSelectFilter",7),this.globalSlotsChanged=t(this,"globalSlotsChanged",7),this.getBasicEventData=()=>({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:r.VPS,widgetId:this.el.id,widgetVersion:h}),this.token=void 0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.addStyle=!1,this.mode="modal",this.excluded="",this.productDetailNewTab=!0,this.apiPath=void 0,this.buttonPressed=!1}handleModalClosed(){this.buttonPressed=!1}componentDidLoad(){const i=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(i))}handleClick(){this.buttonPressed=!0}resetButton(){this.buttonPressed=!1}render(){return s(e,{tabindex:"0",role:"button"},s("vviinn-button",{onClick:()=>{this.handleClick()},addStyle:this.addStyle,part:"vviinn-button"},s("slot",null,s(o,null))),s(a,null),s("vviinn-vps-widget",{mode:this.mode,"currency-sign":this.currencySign,token:this.token,locale:this.locale,apiPath:this.apiPath,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, example-images",campaignId:this.campaignId,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed,excluded:this.excluded,productDetailNewTab:this.productDetailNewTab}))}get el(){return n(this)}};d.style=":host{display:block}";export{d as vviinn_vps_button}