vviinn-widgets 2.39.0 → 2.40.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{package-5d9e2140.js → package-b7055a33.js} +1 -1
- package/dist/cjs/search-filters_15.cjs.entry.js +2 -2
- package/dist/cjs/vviinn-carousel_4.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vpr-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-widget.cjs.entry.js +1 -1
- package/dist/collection/components/vviinn-image-view/vviinn-detected-object/vviinn-detected-object.css +36 -31
- package/dist/collection/components/vviinn-image-view/vviinn-image-view.css +22 -17
- package/dist/esm/{package-d8512946.js → package-c86b0c72.js} +1 -1
- package/dist/esm/search-filters_15.entry.js +2 -2
- package/dist/esm/vviinn-carousel_4.entry.js +1 -1
- package/dist/esm/vviinn-vpr-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +1 -1
- package/dist/esm/vviinn-vps-widget.entry.js +1 -1
- package/dist/vviinn-widgets/p-174af354.js +1 -0
- package/dist/vviinn-widgets/{p-6411677e.entry.js → p-259d0fb7.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-291c8979.entry.js → p-5f1d472f.entry.js} +1 -1
- package/dist/vviinn-widgets/{p-ba8c9a49.entry.js → p-7df7145f.entry.js} +1 -1
- package/{www/build/p-2833a4b9.entry.js → dist/vviinn-widgets/p-84d2571e.entry.js} +1 -1
- package/dist/vviinn-widgets/p-ef30d0e4.entry.js +11 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/p-174af354.js +1 -0
- package/www/build/{p-6411677e.entry.js → p-259d0fb7.entry.js} +1 -1
- package/www/build/{p-291c8979.entry.js → p-5f1d472f.entry.js} +1 -1
- package/www/build/{p-ba8c9a49.entry.js → p-7df7145f.entry.js} +1 -1
- package/{dist/vviinn-widgets/p-2833a4b9.entry.js → www/build/p-84d2571e.entry.js} +1 -1
- package/www/build/p-ef30d0e4.entry.js +11 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/dist/vviinn-widgets/p-1f859653.js +0 -1
- package/dist/vviinn-widgets/p-7532dc71.entry.js +0 -11
- package/www/build/p-1f859653.js +0 -1
- package/www/build/p-7532dc71.entry.js +0 -11
|
@@ -140,7 +140,7 @@ const SearchFilters = class {
|
|
|
140
140
|
};
|
|
141
141
|
SearchFilters.style = searchFiltersCss;
|
|
142
142
|
|
|
143
|
-
const vviinnDetectedObjectCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{
|
|
143
|
+
const vviinnDetectedObjectCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position))}:host::before,:host::after{content:\"\";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}";
|
|
144
144
|
|
|
145
145
|
const VviinnDetectedObject = class {
|
|
146
146
|
constructor(hostRef) {
|
|
@@ -3566,7 +3566,7 @@ var cropper = imageSearch_store.createCommonjsModule(function (module, exports)
|
|
|
3566
3566
|
}));
|
|
3567
3567
|
});
|
|
3568
3568
|
|
|
3569
|
-
const vviinnImageViewCss = ":host {\n display: grid;\n position: relative;\n justify-self: center;\n direction: ltr;\n}\n\n.image-container > img {\n display: block;\n max-width: 100%;\n}\n\n.image-preloader {\n background: rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n bottom: 18px;\n padding: 4px 6px;\n pointer-events: none;\n color: white;\n position: absolute;\n right: 18px;\n z-index: 4;\n}\n\nvviinn-preloader {\n --preloader-size: 12px;\n}\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n\n & img {\n backface-visibility: hidden;\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.4;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-face,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-point {\n height: 30px;\n width: 30px;\n opacity: 1;\n}\n\n.point-e,\n.point-s,\n.point-w,\n.point-n {\n display: none;\n}\n\n.point-ne {\n cursor: nesw-resize;\n right: -
|
|
3569
|
+
const vviinnImageViewCss = ":host {\n display: grid;\n position: relative;\n justify-self: center;\n direction: ltr;\n}\n\n.image-container > img {\n display: block;\n max-width: 100%;\n}\n\n.image-preloader {\n background: rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n bottom: 18px;\n padding: 4px 6px;\n pointer-events: none;\n color: white;\n position: absolute;\n right: 18px;\n z-index: 4;\n}\n\nvviinn-preloader {\n --preloader-size: 12px;\n}\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n\n & img {\n backface-visibility: hidden;\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.4;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-view-box,\n.cropper-face {\n border-radius: 5px;\n}\n\n.cropper-face,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-point {\n height: 30px;\n width: 30px;\n opacity: 1;\n}\n\n.point-e,\n.point-s,\n.point-w,\n.point-n {\n display: none;\n}\n\n.point-ne {\n cursor: nesw-resize;\n right: -15px;\n top: -15px;\n}\n\n.point-nw {\n cursor: nwse-resize;\n left: -15px;\n top: -15px;\n}\n\n.point-sw {\n cursor: nesw-resize;\n bottom: -15px;\n left: -15px;\n}\n\n.point-se {\n cursor: nwse-resize;\n bottom: -15px;\n right: -15px;\n}\n\n.cropper-point::before {\n position: absolute;\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38' viewBox='0 0 38 38' fill='none'%3E%3Cpath d='M3 35H23C29.6274 35 35 29.6274 35 23V3' stroke='white' stroke-width='6' stroke-linecap='square'/%3E%3C/svg%3E\");\n display: block;\n poiter-events: none;\n}\n\n.point-ne::before {\n transform: rotate(-90deg);\n left: -20px;\n top: 12px;\n}\n\n.point-nw::before {\n transform: rotate(180deg);\n left: 12px;\n top: 12px;\n}\n\n.point-sw::before {\n transform: rotate(90deg);\n left: 12px;\n top: -20px;\n}\n\n.point-se::before {\n left: -20px;\n top: -20px;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n";
|
|
3570
3570
|
|
|
3571
3571
|
const INITIAL_CROP_AREA = 0.91;
|
|
3572
3572
|
const INITIAL_CROP_AREA_OFFSET = 1 - INITIAL_CROP_AREA;
|
|
@@ -7,7 +7,7 @@ const imageSearch_store = require('./imageSearch.store-dc4e98b3.js');
|
|
|
7
7
|
const index$1 = require('./index-294899ca.js');
|
|
8
8
|
const i18next = require('./i18next-74ff3413.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-e6b1235d.js');
|
|
10
|
-
const _package = require('./package-
|
|
10
|
+
const _package = require('./package-b7055a33.js');
|
|
11
11
|
const index$2 = require('./index-7ff2ab5f.js');
|
|
12
12
|
|
|
13
13
|
const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) .prev,:host(.continuity) .next{border-radius:2px}:host(.grid) .prev,:host(.grid) .next{border-radius:50%}.prev,.next{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);fill:#525252;cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}.next:disabled,.prev:disabled{display:none}.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-b7055a33.js');
|
|
7
7
|
const index$1 = require('./index-294899ca.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-5619b5ec.js');
|
|
6
|
-
const _package = require('./package-
|
|
6
|
+
const _package = require('./package-b7055a33.js');
|
|
7
7
|
const index$1 = require('./index-294899ca.js');
|
|
8
8
|
const customizedSlots = require('./customized-slots-e6b1235d.js');
|
|
9
9
|
const constants = require('./constants-7684cbfc.js');
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
const index = require('./index-5619b5ec.js');
|
|
6
6
|
const imageSearch_store = require('./imageSearch.store-dc4e98b3.js');
|
|
7
7
|
const i18next = require('./i18next-74ff3413.js');
|
|
8
|
-
const _package = require('./package-
|
|
8
|
+
const _package = require('./package-b7055a33.js');
|
|
9
9
|
const customizedSlots = require('./customized-slots-e6b1235d.js');
|
|
10
10
|
const index$1 = require('./index-7ff2ab5f.js');
|
|
11
11
|
const index$2 = require('./index-294899ca.js');
|
|
@@ -7,49 +7,54 @@
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
:host {
|
|
10
|
-
--size: 40px;
|
|
11
|
-
--x-position: 0;
|
|
12
|
-
--y-position: 0;
|
|
13
|
-
background: rgba(0, 0, 0, 0.16);
|
|
14
|
-
-webkit-backdrop-filter: blur(4px);
|
|
15
|
-
backdrop-filter: blur(4px);
|
|
16
|
-
border-radius: 50%;
|
|
17
|
-
cursor: pointer;
|
|
18
10
|
display: block;
|
|
19
11
|
position: absolute;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
height: var(--size);
|
|
23
|
-
z-index: 2;
|
|
24
|
-
transform: translate(calc(var(--x-position) - (var(--size) * 0.5)), calc(var(--y-position) - (var(--size) * 0.5)));
|
|
25
|
-
transition: background 0.1 ease-in-out;
|
|
12
|
+
left: calc(var(--x-position));
|
|
13
|
+
top: calc(var(--y-position));
|
|
26
14
|
}
|
|
27
15
|
|
|
28
|
-
:host
|
|
29
|
-
|
|
16
|
+
:host::before,
|
|
17
|
+
:host::after {
|
|
18
|
+
content: "";
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
position: absolute;
|
|
21
|
+
height: var(--size);
|
|
22
|
+
width: var(--size);
|
|
23
|
+
left: calc(-1 * var(--size) / 2);
|
|
24
|
+
top: calc(-1 * var(--size) / 2);
|
|
30
25
|
}
|
|
31
26
|
|
|
32
|
-
:host
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
:host::before {
|
|
28
|
+
--size: 36px;
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
z-index: 0;
|
|
31
|
+
background: rgba(0, 0, 0, 0.16);
|
|
32
|
+
-webkit-backdrop-filter: blur(4px);
|
|
33
|
+
backdrop-filter: blur(4px);
|
|
34
|
+
transition: transform 0.07s ease-in-out;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
37
|
:host::after {
|
|
40
|
-
--size:
|
|
38
|
+
--size: 13px;
|
|
41
39
|
border-radius: 50%;
|
|
42
|
-
|
|
43
|
-
cursor: pointer;
|
|
44
|
-
display: block;
|
|
45
|
-
height: calc(var(--size) * 0.5);
|
|
46
|
-
transform: translate(calc(-25% + var(--size) * 0.5), calc(-25% + var(--size) * 0.5));
|
|
47
|
-
width: calc(var(--size) * 0.5);
|
|
40
|
+
z-index: 1;
|
|
48
41
|
background: white;
|
|
42
|
+
box-shadow: 0px 2px 2px 0px rgba(0, 0, 0, 0.15);
|
|
43
|
+
transition: transform 0.07s ease-in-out;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host(.active)::before {
|
|
47
|
+
transform: scale(0.88);
|
|
48
|
+
background: rgba(0, 0, 0, 0.4);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
:host(.active)::after {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
transform: scale(0.67);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@media (min-width: 768px) {
|
|
56
|
+
:host(:not(.active):hover)::before {
|
|
57
|
+
transform: scale(1.08);
|
|
58
|
+
background: rgba(0, 0, 0, 0.32);
|
|
59
|
+
}
|
|
55
60
|
}
|
|
@@ -83,6 +83,11 @@ vviinn-preloader {
|
|
|
83
83
|
width: 100%;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
.cropper-view-box,
|
|
87
|
+
.cropper-face {
|
|
88
|
+
border-radius: 5px;
|
|
89
|
+
}
|
|
90
|
+
|
|
86
91
|
.cropper-face,
|
|
87
92
|
.cropper-point {
|
|
88
93
|
display: block;
|
|
@@ -113,56 +118,56 @@ vviinn-preloader {
|
|
|
113
118
|
|
|
114
119
|
.point-ne {
|
|
115
120
|
cursor: nesw-resize;
|
|
116
|
-
right: -
|
|
117
|
-
top: -
|
|
121
|
+
right: -15px;
|
|
122
|
+
top: -15px;
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
.point-nw {
|
|
121
126
|
cursor: nwse-resize;
|
|
122
|
-
left: -
|
|
123
|
-
top: -
|
|
127
|
+
left: -15px;
|
|
128
|
+
top: -15px;
|
|
124
129
|
}
|
|
125
130
|
|
|
126
131
|
.point-sw {
|
|
127
|
-
bottom: -5.5px;
|
|
128
132
|
cursor: nesw-resize;
|
|
129
|
-
|
|
133
|
+
bottom: -15px;
|
|
134
|
+
left: -15px;
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
.point-se {
|
|
133
|
-
bottom: -5.5px;
|
|
134
138
|
cursor: nwse-resize;
|
|
135
|
-
|
|
139
|
+
bottom: -15px;
|
|
140
|
+
right: -15px;
|
|
136
141
|
}
|
|
137
142
|
|
|
138
143
|
.cropper-point::before {
|
|
139
144
|
position: absolute;
|
|
140
|
-
content: url("data:image/svg+xml
|
|
145
|
+
content: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38' viewBox='0 0 38 38' fill='none'%3E%3Cpath d='M3 35H23C29.6274 35 35 29.6274 35 23V3' stroke='white' stroke-width='6' stroke-linecap='square'/%3E%3C/svg%3E");
|
|
141
146
|
display: block;
|
|
142
147
|
poiter-events: none;
|
|
143
148
|
}
|
|
144
149
|
|
|
145
150
|
.point-ne::before {
|
|
146
151
|
transform: rotate(-90deg);
|
|
147
|
-
left: -
|
|
148
|
-
top:
|
|
152
|
+
left: -20px;
|
|
153
|
+
top: 12px;
|
|
149
154
|
}
|
|
150
155
|
|
|
151
156
|
.point-nw::before {
|
|
152
157
|
transform: rotate(180deg);
|
|
153
|
-
left:
|
|
154
|
-
top:
|
|
158
|
+
left: 12px;
|
|
159
|
+
top: 12px;
|
|
155
160
|
}
|
|
156
161
|
|
|
157
162
|
.point-sw::before {
|
|
158
163
|
transform: rotate(90deg);
|
|
159
|
-
left:
|
|
160
|
-
top: -
|
|
164
|
+
left: 12px;
|
|
165
|
+
top: -20px;
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
.point-se::before {
|
|
164
|
-
left: -
|
|
165
|
-
top: -
|
|
169
|
+
left: -20px;
|
|
170
|
+
top: -20px;
|
|
166
171
|
}
|
|
167
172
|
|
|
168
173
|
.cropper-invisible {
|
|
@@ -136,7 +136,7 @@ const SearchFilters = class {
|
|
|
136
136
|
};
|
|
137
137
|
SearchFilters.style = searchFiltersCss;
|
|
138
138
|
|
|
139
|
-
const vviinnDetectedObjectCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{
|
|
139
|
+
const vviinnDetectedObjectCss = ":host{--color-primary-system:#0F62FE;--color-primary-hover-system:#014CDA;--color-icons-system:#2F8EDF;--spacer:8px}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position))}:host::before,:host::after{content:\"\";cursor:pointer;position:absolute;height:var(--size);width:var(--size);left:calc(-1 * var(--size) / 2);top:calc(-1 * var(--size) / 2)}:host::before{--size:36px;border-radius:50%;z-index:0;background:rgba(0, 0, 0, 0.16);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);transition:transform 0.07s ease-in-out}:host::after{--size:13px;border-radius:50%;z-index:1;background:white;box-shadow:0px 2px 2px 0px rgba(0, 0, 0, 0.15);transition:transform 0.07s ease-in-out}:host(.active)::before{transform:scale(0.88);background:rgba(0, 0, 0, 0.4)}:host(.active)::after{transform:scale(0.67)}@media (min-width: 768px){:host(:not(.active):hover)::before{transform:scale(1.08);background:rgba(0, 0, 0, 0.32)}}";
|
|
140
140
|
|
|
141
141
|
const VviinnDetectedObject = class {
|
|
142
142
|
constructor(hostRef) {
|
|
@@ -3562,7 +3562,7 @@ var cropper = createCommonjsModule(function (module, exports) {
|
|
|
3562
3562
|
}));
|
|
3563
3563
|
});
|
|
3564
3564
|
|
|
3565
|
-
const vviinnImageViewCss = ":host {\n display: grid;\n position: relative;\n justify-self: center;\n direction: ltr;\n}\n\n.image-container > img {\n display: block;\n max-width: 100%;\n}\n\n.image-preloader {\n background: rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n bottom: 18px;\n padding: 4px 6px;\n pointer-events: none;\n color: white;\n position: absolute;\n right: 18px;\n z-index: 4;\n}\n\nvviinn-preloader {\n --preloader-size: 12px;\n}\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n\n & img {\n backface-visibility: hidden;\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.4;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-face,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-point {\n height: 30px;\n width: 30px;\n opacity: 1;\n}\n\n.point-e,\n.point-s,\n.point-w,\n.point-n {\n display: none;\n}\n\n.point-ne {\n cursor: nesw-resize;\n right: -
|
|
3565
|
+
const vviinnImageViewCss = ":host {\n display: grid;\n position: relative;\n justify-self: center;\n direction: ltr;\n}\n\n.image-container > img {\n display: block;\n max-width: 100%;\n}\n\n.image-preloader {\n background: rgba(0, 0, 0, 0.25);\n border-radius: 4px;\n bottom: 18px;\n padding: 4px 6px;\n pointer-events: none;\n color: white;\n position: absolute;\n right: 18px;\n z-index: 4;\n}\n\nvviinn-preloader {\n --preloader-size: 12px;\n}\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n\n & img {\n backface-visibility: hidden;\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n }\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.4;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-view-box,\n.cropper-face {\n border-radius: 5px;\n}\n\n.cropper-face,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-point {\n height: 30px;\n width: 30px;\n opacity: 1;\n}\n\n.point-e,\n.point-s,\n.point-w,\n.point-n {\n display: none;\n}\n\n.point-ne {\n cursor: nesw-resize;\n right: -15px;\n top: -15px;\n}\n\n.point-nw {\n cursor: nwse-resize;\n left: -15px;\n top: -15px;\n}\n\n.point-sw {\n cursor: nesw-resize;\n bottom: -15px;\n left: -15px;\n}\n\n.point-se {\n cursor: nwse-resize;\n bottom: -15px;\n right: -15px;\n}\n\n.cropper-point::before {\n position: absolute;\n content: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='38' height='38' viewBox='0 0 38 38' fill='none'%3E%3Cpath d='M3 35H23C29.6274 35 35 29.6274 35 23V3' stroke='white' stroke-width='6' stroke-linecap='square'/%3E%3C/svg%3E\");\n display: block;\n poiter-events: none;\n}\n\n.point-ne::before {\n transform: rotate(-90deg);\n left: -20px;\n top: 12px;\n}\n\n.point-nw::before {\n transform: rotate(180deg);\n left: 12px;\n top: 12px;\n}\n\n.point-sw::before {\n transform: rotate(90deg);\n left: 12px;\n top: -20px;\n}\n\n.point-se::before {\n left: -20px;\n top: -20px;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n";
|
|
3566
3566
|
|
|
3567
3567
|
const INITIAL_CROP_AREA = 0.91;
|
|
3568
3568
|
const INITIAL_CROP_AREA_OFFSET = 1 - INITIAL_CROP_AREA;
|
|
@@ -3,7 +3,7 @@ import { _ as _Array, O as Option, S as Semigroup, a as _function, h as has, t a
|
|
|
3
3
|
import { C as ChevronIcon, U as UpdateIcon } from './index-dac5d1c8.js';
|
|
4
4
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
5
5
|
import { s as slotChangeListener, c as campaignTypeNames, f as fromString, a as fold, S as SlotSkeleton } from './customized-slots-6b70a8f6.js';
|
|
6
|
-
import { v as version } from './package-
|
|
6
|
+
import { v as version } from './package-c86b0c72.js';
|
|
7
7
|
import { v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, i as createProductVprEventByType } from './index-53105ad4.js';
|
|
8
8
|
|
|
9
9
|
const vviinnCarouselCss = ":host{--vviinn-progressbar-width:0;--vviinn-carousel-item-width:150px;--vviinn-carousel-columns-internal:var(--vviinn-carousel-columns, 4);--vviinn-carousel-image-width-system:140px}.body{display:flex;position:relative;width:var(--vviinn-carousel-content-width);flex-direction:column}.content-wrapper *{box-sizing:border-box}.content-wrapper{overflow-y:hidden;overflow-x:auto;flex-grow:1}.bullets{margin-top:16px;display:flex;flex-direction:row;grid-gap:24px;justify-content:center}.bullet{width:10px;height:10px;background:#e0e0e0;border-radius:50%;cursor:pointer}.bullet.active{background:#161616}.content:not(.show-scrollbar),.content.grid{scrollbar-color:#fff0 #fff0}.content:not(.show-scrollbar)::-webkit-scrollbar,.content.grid::-webkit-scrollbar{opacity:0}.content{display:flex;flex-direction:row;grid-gap:8px;overflow-y:hidden;overflow-x:auto;flex-grow:1;padding-bottom:16px}.content.left>*{scroll-snap-align:start}.content.right>*{scroll-snap-align:end}:host(.continuity) .prev,:host(.continuity) .next{border-radius:2px}:host(.grid) .prev,:host(.grid) .next{border-radius:50%}.prev,.next{align-items:center;background-color:white;border:none;box-shadow:0px 2px 6px rgba(0, 0, 0, 0.15);fill:#525252;cursor:pointer;display:grid;height:40px;justify-items:center;position:absolute;top:calc(50% - 20px);width:40px;z-index:1;padding:0;margin:0}.next:disabled,.prev:disabled{display:none}.prev svg{transform:rotate(180deg);margin-left:-5px}.prev{left:0}.next{right:0}.items-group{display:grid;grid-gap:16px;grid-template-columns:repeat(var(--vviinn-carousel-columns-internal), 1fr);min-width:100%}vviinn-product-card::part(price-container){text-align:center}:host(.classic) vviinn-product-card::part(title),:host(.classic) vviinn-product-card::part(brand),:host(.classic) vviinn-product-card::part(type){text-align:center}@media (max-width: 480px){:host(.modern) button{display:none}.items-group{grid-template-columns:repeat(2, 1fr)}}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-1f3eaf12.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-c86b0c72.js';
|
|
3
3
|
import { V as VisualSearchIcon } from './index-dac5d1c8.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-1f3eaf12.js';
|
|
2
|
-
import { v as version } from './package-
|
|
2
|
+
import { v as version } from './package-c86b0c72.js';
|
|
3
3
|
import { a as CameraIcon } from './index-dac5d1c8.js';
|
|
4
4
|
import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-6b70a8f6.js';
|
|
5
5
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-1f3eaf12.js';
|
|
2
2
|
import { i as imageSearchState, s as state, a as _function, O as Option, k as parseExcluded, q as isEmpty } from './imageSearch.store-c0f2a178.js';
|
|
3
3
|
import { i as instance } from './i18next-387f2b0a.js';
|
|
4
|
-
import { v as version } from './package-
|
|
4
|
+
import { v as version } from './package-c86b0c72.js';
|
|
5
5
|
import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-6b70a8f6.js';
|
|
6
6
|
import { j as createSearchEvent, k as createFilterEvent, v as v4, c as createTrackingApi, l as createWidgetVpsEvent, m as createProductVpsEventByType, n as createResultVpsEventByType } from './index-53105ad4.js';
|
|
7
7
|
import { c as CameraActionIcon, d as UploadActionIcon } from './index-dac5d1c8.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o="2.40.1";export{o as v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as e,H as s,g as a}from"./p-1e83e6ba.js";import{i as n,s as r,a as o,O as l,k as d,q as h}from"./p-987a8e9f.js";import{i as c}from"./p-2e76a5c3.js";import{v as p}from"./p-1f859653.js";import{c as u,s as g,S as v}from"./p-caf46c2b.js";import{j as m,k as b,v as x,c as f,l as y,m as w,n as k}from"./p-da7273ce.js";import{c as T,d as B}from"./p-74f46a18.js";import{D as S}from"./p-cc013cd2.js";const j={de:{translation:{exampleImagesTitle:"Mit den Beispielbildern die Suche direkt ausprobieren",imageUploadButtonText:"Bild Hochladen",cameraButtonTextStart:"Kamera Starten",cameraButtonTextStop:"Kamera Stop",showFilesButtonText:"Dateien anzeigen",galleryButtonText:"Galerie Anzeigen",privacyBadgeText:"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.",teaserText:"Finde Produkte auf \n einem Foto",imageSearchModalTitle:"Bildsuche",emptyResultsBlock:{title:"Leider nichts gefunden",button:"Neues Bild hochladen"},serverErrorBlock:{title:"Keine Verbindung",button:"Erneut versuchen"},wrongFormatBlock:{title:"Dateityp wird nicht unterstützt",text:"Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch.",button:"Neues Bild hochladen"}}},en:{translation:{exampleImagesTitle:"Try out the search with the example images",imageUploadButtonText:"Upload Photo",cameraButtonTextStart:"Start Camera",cameraButtonTextStop:"Stop Camera",showFilesButtonText:"Show Files",galleryButtonText:"Show Gallery",privacyBadgeText:"By uploading a picture you agree to the processing by our partner Vviinn. The image will be deleted after one hour of inactivity.",teaserText:"Find Product by Photo",imageSearchModalTitle:"Visual Search",emptyResultsBlock:{title:"Sorry, nothing found",button:"Upload another image"},serverErrorBlock:{title:"Something went wrong",button:"Try again"},wrongFormatBlock:{title:"Wrong file format",text:"Please upload a .jpg, .png or .webp image file.",button:"Upload another file"}}}};var I=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(t);a<s.length;a++)i.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(e[s[a]]=t[s[a]])}return e};const _=t=>/^[-+]?(\d+|Infinity)$/.test(t)?Number(t):NaN,E=t=>!h(t),P=t=>!isNaN(t),V=class{constructor(e){t(this,e),this.globalSlotsChanged=i(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=i(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=i(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=i(this,"vviinnWidgetClose",7),this.vviinnImageUpload=i(this,"vviinnImageUpload",7),this.vviinnProductLoad=i(this,"vviinnProductLoad",7),this.vviinnProductView=i(this,"vviinnProductView",7),this.vviinnProductClick=i(this,"vviinnProductClick",7),this.vviinnResultLoad=i(this,"vviinnResultLoad",7),this.vviinnResultView=i(this,"vviinnResultView",7),this.vviinnNoResult=i(this,"vviinnNoResult",7),this.vviinnImageCrop=i(this,"vviinnImageCrop",7),this.vviinnSelectObject=i(this,"vviinnSelectObject",7),this.vviinnSelectFilter=i(this,"vviinnSelectFilter",7),this.imageSource=null,this.resultLoaded=!1,this.resultViewed=!1,this.cameraAvailable=!1,this.isDesktop=!1,this.handleVviinnImageUpload=t=>{this.trackInitialSearch(),this.uploadSource=t},this.handleVviinnImageUploadFinished=()=>{this.handleImageSelection(),"upload"===this.mode&&this.showingInButton&&(this.active=!0)},this.handleVviinnNoResult=t=>{"client"===t.reason&&(this.wrongImageFormat=!0)},this.handleStartCameraClick=async()=>{if(this.stream)this.resetState();else{this.cameraButtonClicked=!0;try{const t=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}});this.stream=t}catch(t){console.log("Error accessing camera: ",t.message),this.resetState()}}},this.setTrackingDeactivated=t=>{"rejected"===t.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var t;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:u.VPS,widgetId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.id,widgetVersion:p}},this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailNewTab=!0,this.imageResolutionWidth=250,this.exampleImageSource=S,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,this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.uploadSource=void 0}initResultEvents(){this.resultLoaded=!1,this.resultViewed=!1}stopStreamTracks(){var t;null===(t=this.stream)||void 0===t||t.getTracks().forEach((t=>{t.stop()}))}isOnboardingSlide(){return 0===this.slidePosition}isResultSlide(){return 1===this.slidePosition}handleOpenLink(t,i){if(this.productDetailNewTab||i.ctrlKey||i.metaKey){let i=window.open();i?i.location.href=t:window.location.href=t}else window.location.href=t}componentDidLoad(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(t))}activeWatcher(t){t?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.vviinnWidgetOpen.emit(this.getBasicEventData()),this.trackWidgetEvent("open")):(document.body.style.overflow=this.overflow,this.initResultEvents())}buttonPressedWatcher(t){t&&"modal"===this.mode&&(this.active=!0)}trackCameraEnabled({detail:t}){this.cameraEnabled=t}trackProductLoad({detail:t}){const i=this.getProductTrackEvent(t,"load");this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackProductView({detail:t}){this.resultViewed||(this.resultViewed=!0,this.vviinnResultView.emit(this.getBasicEventData()),this.trackResultEvent("view"));const i=this.getProductTrackEvent(t,"view");this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}async trackProductClick({detail:t}){const{productId:i,clickEvent:e}=t,s=this.getProductTrackEvent(t,"click"),a=n.results.find((t=>t.productId===i));a&&a.deeplink&&(this.trackingDeactivated?this.handleOpenLink(a.deeplink,e):await this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated).finally((()=>{this.handleOpenLink(a.deeplink,e)})))}async trackAuxClick({detail:t}){const{productId:i}=t,e=this.getProductTrackEvent(t,"click"),s=n.results.find((t=>t.productId===i));s&&s.deeplink&&(this.trackingDeactivated||await this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated))}trachSearchAreaChanges(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=m(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=m(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackFilter({detail:t}){if(this.initResultEvents(),this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId"]),s=b(Object.assign({session_id:this.uiSessionId,source:this.imageSource,kind:t.kind,action:t.action},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}connectedCallback(){this.isDesktop="desktop"===(()=>{const t=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(t)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(t)?"mobile":"desktop"})(),r.apiPath=this.apiPath,r.currencySign=this.currencySign,r.locale=this.locale,c.init({lng:this.locale,fallbackLng:"de-DE",resources:j}),this.cameraAvailable=!!navigator.mediaDevices&&!!navigator.mediaDevices.getUserMedia,n.token=this.token,n.campaignId=o.pipe(this.campaignId,l.fromNullable,l.chain(l.fromPredicate(E)),l.map(_),l.chain(l.fromPredicate(P)),l.map((t=>`${t}`))),this.excluded&&(this.excluded=d(this.excluded)),n.excluded=this.excluded,this.uiSessionId=x(),this.trackingApi=f(this.apiPath,this.token),this.id=this.el.id}componentWillLoad(){g(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData()),this.trackWidgetEvent("load")}trackWidgetEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]),s=Object.assign({action:t,session_id:this.uiSessionId},e),a=y(s);this.trackingApi.trackEvent(a).then(this.setTrackingDeactivated)}getProductTrackEvent(t,i){if(this.trackingDeactivated)return null;const{productRank:e,productId:s}=t,a=I(t,["productRank","productId","campaignTypeId","widgetType","clickEvent"]),n=Object.assign({session_id:this.uiSessionId,rank:e,product:s},a);return w(i)(n)}trackResultEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]);let s=k(t)(Object.assign({session_id:this.uiSessionId},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}trackInitialSearch(){if(this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId","widgetType"]),e=m(Object.assign({session_id:this.uiSessionId,search_area:"full",source:"upload"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}handleImageSelection(){this.imageSource="upload",this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.stopStreamTracks()}renderButtons(){const t=[this.cameraAvailable&&e("button",{class:"action-button",part:"start-camera_button",onClick:()=>{this.handleStartCameraClick(),this.uploadSource="startCamera"}},n.loading&&"startCamera"===this.uploadSource?e("vviinn-preloader",null):e("span",{class:"action-button-content"},e(T,null),this.cameraEnabled?e("slot",{name:"vviinn-camera-button-text-stop"},e("span",null,c.t("cameraButtonTextStop"))):e("slot",{name:"vviinn-camera-button-text-start"},e("span",null,c.t("cameraButtonTextStart"))))),e("vviinn-image-selector",{class:"action-button",onClick:()=>this.uploadSource="uploadPhoto",onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("uploadPhoto")},onVviinnNoResult:({detail:t})=>this.handleVviinnNoResult(t),resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"upload-photo_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode,loading:n.loading&&"uploadPhoto"===this.uploadSource},e("span",{slot:"upload-button-text",class:"action-button-content"},e(B,null),e("slot",{name:"vviinn-image-upload-button-text"},e("span",null,c.t("imageUploadButtonText")))))];return this.isDesktop?t.reverse():t}renderResults(){return 0===n.results.length?null:(this.resultLoaded||(this.vviinnResultLoad.emit(this.getBasicEventData()),this.trackResultEvent("load"),this.resultLoaded=!0),n.results.map(((t,i)=>{var s;return e("vviinn-product-card",{key:t.productId,hidden:!0,productTitle:t.title,productId:t.productId,productType:t.productType,brand:t.brand,deeplink:t.deeplink,price:t.price.actual,salePrice:t.price.sale,responsive:!0,imageWidth:this.imageResolutionWidth,image:null!==(s=t.image.thumbnail)&&void 0!==s?s:t.image.original,part:"product-card",campaignTypeId:"VPS",index:i,widgetElementId:this.id,buttonElementId:this.buttonElementId,widgetVersion:p})})))}resetState(){this.resetScroll("start-page_block"),this.slidePosition=0,n.resetCategoryLink=void 0,n.activeIonLink=void 0,n.image=l.none,n.imageUrl=l.none,n.imageBounds=l.none,n.searchArea=l.none,n.results=[],n.filters=[],n.detectedObjects=[],n.rectangleSearchForm=void 0,n.loading=!1,n.serverError=!1,this.wrongImageFormat=!1,this.resetScroll("results-block"),this.stopStreamTracks(),this.initResultEvents(),this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1}haveErrors(){return this.wrongImageFormat||n.serverError}resetScroll(t,i="auto"){this.el.shadowRoot.getElementById(t).scroll({top:0,left:0,behavior:i})}handleModalClose(){this.active=!1,this.resetState(),["start-page_block","results-block"].forEach((t=>this.resetScroll(t))),this.trackWidgetEvent("close")}render(){var t;return e(s,null,!this.showingInButton&&e(v,null),e("vviinn-overlayed-modal",{class:{"first-screen":this.isOnboardingSlide()},isFirstScreen:this.isOnboardingSlide(),active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.id,widgetVersion:p,hideBackButton:"upload"===this.mode&&this.showingInButton||!this.cameraEnabled&&this.isOnboardingSlide(),exportparts:"secondary-action, title, close-button"},e("vviinn-slider",{showBullets:!1,position:this.slidePosition},e("vviinn-slide",{class:{"start-page":!0,"camera-enabled":this.cameraEnabled}},e("vviinn-example-image",{onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("startCamera")},basicEventData:this.getBasicEventData(),srcObject:this.stream,cameraButtonClicked:this.cameraButtonClicked,exampleImageSource:this.exampleImageSource}),e("div",{class:{error:this.haveErrors()},id:"start-page_block"},e("div",{class:"start-page_main-content"},e("div",{class:{"start-page_errors-block":!0,hidden:!this.wrongImageFormat&&!n.serverError}},e("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.resetState()}),e("vviinn-server-error",{class:{hidden:!n.serverError},handler:()=>this.resetState()})),!this.haveErrors()&&e("vviinn-teaser",null),!this.haveErrors()&&e("div",{class:"buttons-group"},this.renderButtons())),e("vviinn-privacy-badge",{privacyBadgeText:c.t("privacyBadgeText"),class:{invisible:this.haveErrors()}}))),e("vviinn-slide",{class:{"results-page":!0,active:this.isResultSlide()}},e("div",{class:"image-wrapper"},this.isResultSlide()&&e("vviinn-image-view",{basicEventData:this.getBasicEventData()}),e("div",{class:"filters-wrapper"},e("div",{class:"filters"},n.filters.map((t=>e("search-filters",{filter:t,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",{handler:()=>this.resetState()}),e("vviinn-onboarding",null)),e("div",{class:{hidden:n.results.length<=0,products:!0}},this.active&&this.renderResults()))))))}get el(){return a(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);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:42px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin:24px 0}.action-button{display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;color:white;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.results-page{margin-top:60px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{width:100%;align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(130px, 1fr));justify-items:center;padding:24px;position:absolute}.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{display:grid;grid-template-rows:min-content 1fr;grid-gap:24px;min-width:100%}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;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--color-primary-system));color:white}.filters-wrapper{overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}.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: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:0 24px 24px}.filters-wrapper{min-width:calc(100% + 40px)}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px}.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: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}@media (max-width: 380px){.results-page>*{padding:12px}.products{grid-gap:24px 10px}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{V as vviinn_vps_widget}
|
|
1
|
+
import{r as t,c as i,h as e,H as s,g as a}from"./p-1e83e6ba.js";import{i as n,s as r,a as o,O as l,k as d,q as h}from"./p-987a8e9f.js";import{i as c}from"./p-2e76a5c3.js";import{v as p}from"./p-174af354.js";import{c as u,s as g,S as v}from"./p-caf46c2b.js";import{j as m,k as b,v as x,c as f,l as y,m as w,n as k}from"./p-da7273ce.js";import{c as T,d as B}from"./p-74f46a18.js";import{D as S}from"./p-cc013cd2.js";const j={de:{translation:{exampleImagesTitle:"Mit den Beispielbildern die Suche direkt ausprobieren",imageUploadButtonText:"Bild Hochladen",cameraButtonTextStart:"Kamera Starten",cameraButtonTextStop:"Kamera Stop",showFilesButtonText:"Dateien anzeigen",galleryButtonText:"Galerie Anzeigen",privacyBadgeText:"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.",teaserText:"Finde Produkte auf \n einem Foto",imageSearchModalTitle:"Bildsuche",emptyResultsBlock:{title:"Leider nichts gefunden",button:"Neues Bild hochladen"},serverErrorBlock:{title:"Keine Verbindung",button:"Erneut versuchen"},wrongFormatBlock:{title:"Dateityp wird nicht unterstützt",text:"Bitte laden Sie eine .jpg, .png oder .webp Bilddatei hoch.",button:"Neues Bild hochladen"}}},en:{translation:{exampleImagesTitle:"Try out the search with the example images",imageUploadButtonText:"Upload Photo",cameraButtonTextStart:"Start Camera",cameraButtonTextStop:"Stop Camera",showFilesButtonText:"Show Files",galleryButtonText:"Show Gallery",privacyBadgeText:"By uploading a picture you agree to the processing by our partner Vviinn. The image will be deleted after one hour of inactivity.",teaserText:"Find Product by Photo",imageSearchModalTitle:"Visual Search",emptyResultsBlock:{title:"Sorry, nothing found",button:"Upload another image"},serverErrorBlock:{title:"Something went wrong",button:"Try again"},wrongFormatBlock:{title:"Wrong file format",text:"Please upload a .jpg, .png or .webp image file.",button:"Upload another file"}}}};var I=function(t,i){var e={};for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&i.indexOf(s)<0&&(e[s]=t[s]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(t);a<s.length;a++)i.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(t,s[a])&&(e[s[a]]=t[s[a]])}return e};const _=t=>/^[-+]?(\d+|Infinity)$/.test(t)?Number(t):NaN,E=t=>!h(t),P=t=>!isNaN(t),V=class{constructor(e){t(this,e),this.globalSlotsChanged=i(this,"globalSlotsChanged",7),this.vviinnWidgetLoad=i(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=i(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=i(this,"vviinnWidgetClose",7),this.vviinnImageUpload=i(this,"vviinnImageUpload",7),this.vviinnProductLoad=i(this,"vviinnProductLoad",7),this.vviinnProductView=i(this,"vviinnProductView",7),this.vviinnProductClick=i(this,"vviinnProductClick",7),this.vviinnResultLoad=i(this,"vviinnResultLoad",7),this.vviinnResultView=i(this,"vviinnResultView",7),this.vviinnNoResult=i(this,"vviinnNoResult",7),this.vviinnImageCrop=i(this,"vviinnImageCrop",7),this.vviinnSelectObject=i(this,"vviinnSelectObject",7),this.vviinnSelectFilter=i(this,"vviinnSelectFilter",7),this.imageSource=null,this.resultLoaded=!1,this.resultViewed=!1,this.cameraAvailable=!1,this.isDesktop=!1,this.handleVviinnImageUpload=t=>{this.trackInitialSearch(),this.uploadSource=t},this.handleVviinnImageUploadFinished=()=>{this.handleImageSelection(),"upload"===this.mode&&this.showingInButton&&(this.active=!0)},this.handleVviinnNoResult=t=>{"client"===t.reason&&(this.wrongImageFormat=!0)},this.handleStartCameraClick=async()=>{if(this.stream)this.resetState();else{this.cameraButtonClicked=!0;try{const t=await navigator.mediaDevices.getUserMedia({video:{facingMode:"environment"}});this.stream=t}catch(t){console.log("Error accessing camera: ",t.message),this.resetState()}}},this.setTrackingDeactivated=t=>{"rejected"===t.status&&(this.trackingDeactivated=!0)},this.getBasicEventData=()=>{var t;return{widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:u.VPS,widgetId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.id,widgetVersion:p}},this.token=void 0,this.active=!0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.excluded="",this.productDetailNewTab=!0,this.imageResolutionWidth=250,this.exampleImageSource=S,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,this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1,this.uploadSource=void 0}initResultEvents(){this.resultLoaded=!1,this.resultViewed=!1}stopStreamTracks(){var t;null===(t=this.stream)||void 0===t||t.getTracks().forEach((t=>{t.stop()}))}isOnboardingSlide(){return 0===this.slidePosition}isResultSlide(){return 1===this.slidePosition}handleOpenLink(t,i){if(this.productDetailNewTab||i.ctrlKey||i.metaKey){let i=window.open();i?i.location.href=t:window.location.href=t}else window.location.href=t}componentDidLoad(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(t))}activeWatcher(t){t?(this.overflow=document.body.style.overflow,document.body.style.overflow="hidden",this.vviinnWidgetOpen.emit(this.getBasicEventData()),this.trackWidgetEvent("open")):(document.body.style.overflow=this.overflow,this.initResultEvents())}buttonPressedWatcher(t){t&&"modal"===this.mode&&(this.active=!0)}trackCameraEnabled({detail:t}){this.cameraEnabled=t}trackProductLoad({detail:t}){const i=this.getProductTrackEvent(t,"load");this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}trackProductView({detail:t}){this.resultViewed||(this.resultViewed=!0,this.vviinnResultView.emit(this.getBasicEventData()),this.trackResultEvent("view"));const i=this.getProductTrackEvent(t,"view");this.trackingApi.trackEvent(i).then(this.setTrackingDeactivated)}async trackProductClick({detail:t}){const{productId:i,clickEvent:e}=t,s=this.getProductTrackEvent(t,"click"),a=n.results.find((t=>t.productId===i));a&&a.deeplink&&(this.trackingDeactivated?this.handleOpenLink(a.deeplink,e):await this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated).finally((()=>{this.handleOpenLink(a.deeplink,e)})))}async trackAuxClick({detail:t}){const{productId:i}=t,e=this.getProductTrackEvent(t,"click"),s=n.results.find((t=>t.productId===i));s&&s.deeplink&&(this.trackingDeactivated||await this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated))}trachSearchAreaChanges(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=m(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"manual-selection"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackDetectedObject(){if(this.initResultEvents(),this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId"]),e=m(Object.assign({session_id:this.uiSessionId,source:this.imageSource,search_area:"attention-point"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}trackFilter({detail:t}){if(this.initResultEvents(),this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId"]),s=b(Object.assign({session_id:this.uiSessionId,source:this.imageSource,kind:t.kind,action:t.action},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}connectedCallback(){this.isDesktop="desktop"===(()=>{const t=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(t)?"tablet":/Mobile|Android|iP(hone|od)|IEMobile|BlackBerry|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(t)?"mobile":"desktop"})(),r.apiPath=this.apiPath,r.currencySign=this.currencySign,r.locale=this.locale,c.init({lng:this.locale,fallbackLng:"de-DE",resources:j}),this.cameraAvailable=!!navigator.mediaDevices&&!!navigator.mediaDevices.getUserMedia,n.token=this.token,n.campaignId=o.pipe(this.campaignId,l.fromNullable,l.chain(l.fromPredicate(E)),l.map(_),l.chain(l.fromPredicate(P)),l.map((t=>`${t}`))),this.excluded&&(this.excluded=d(this.excluded)),n.excluded=this.excluded,this.uiSessionId=x(),this.trackingApi=f(this.apiPath,this.token),this.id=this.el.id}componentWillLoad(){g(this,this.el),this.vviinnWidgetLoad.emit(this.getBasicEventData()),this.trackWidgetEvent("load")}trackWidgetEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]),s=Object.assign({action:t,session_id:this.uiSessionId},e),a=y(s);this.trackingApi.trackEvent(a).then(this.setTrackingDeactivated)}getProductTrackEvent(t,i){if(this.trackingDeactivated)return null;const{productRank:e,productId:s}=t,a=I(t,["productRank","productId","campaignTypeId","widgetType","clickEvent"]),n=Object.assign({session_id:this.uiSessionId,rank:e,product:s},a);return w(i)(n)}trackResultEvent(t){if(this.trackingDeactivated)return;const i=this.getBasicEventData(),e=I(i,["campaignTypeId","widgetType"]);let s=k(t)(Object.assign({session_id:this.uiSessionId},e));this.trackingApi.trackEvent(s).then(this.setTrackingDeactivated)}trackInitialSearch(){if(this.trackingDeactivated)return;const t=this.getBasicEventData(),i=I(t,["campaignTypeId","widgetType"]),e=m(Object.assign({session_id:this.uiSessionId,search_area:"full",source:"upload"},i));this.trackingApi.trackEvent(e).then(this.setTrackingDeactivated)}handleImageSelection(){this.imageSource="upload",this.slidePosition=1,this.el.shadowRoot.querySelector("vviinn-overlayed-modal").shadowRoot.querySelector("vviinn-overlay").querySelector("vviinn-modal").shadowRoot.querySelector(".body").scrollTop=0,this.stopStreamTracks()}renderButtons(){const t=[this.cameraAvailable&&e("button",{class:"action-button",part:"start-camera_button",onClick:()=>{this.handleStartCameraClick(),this.uploadSource="startCamera"}},n.loading&&"startCamera"===this.uploadSource?e("vviinn-preloader",null):e("span",{class:"action-button-content"},e(T,null),this.cameraEnabled?e("slot",{name:"vviinn-camera-button-text-stop"},e("span",null,c.t("cameraButtonTextStop"))):e("slot",{name:"vviinn-camera-button-text-start"},e("span",null,c.t("cameraButtonTextStart"))))),e("vviinn-image-selector",{class:"action-button",onClick:()=>this.uploadSource="uploadPhoto",onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("uploadPhoto")},onVviinnNoResult:({detail:t})=>this.handleVviinnNoResult(t),resetVpsButton:this.resetVpsButton,basicEventData:this.getBasicEventData(),part:"upload-photo_button",startUpload:this.buttonPressed&&this.showingInButton&&"upload"===this.mode,loading:n.loading&&"uploadPhoto"===this.uploadSource},e("span",{slot:"upload-button-text",class:"action-button-content"},e(B,null),e("slot",{name:"vviinn-image-upload-button-text"},e("span",null,c.t("imageUploadButtonText")))))];return this.isDesktop?t.reverse():t}renderResults(){return 0===n.results.length?null:(this.resultLoaded||(this.vviinnResultLoad.emit(this.getBasicEventData()),this.trackResultEvent("load"),this.resultLoaded=!0),n.results.map(((t,i)=>{var s;return e("vviinn-product-card",{key:t.productId,hidden:!0,productTitle:t.title,productId:t.productId,productType:t.productType,brand:t.brand,deeplink:t.deeplink,price:t.price.actual,salePrice:t.price.sale,responsive:!0,imageWidth:this.imageResolutionWidth,image:null!==(s=t.image.thumbnail)&&void 0!==s?s:t.image.original,part:"product-card",campaignTypeId:"VPS",index:i,widgetElementId:this.id,buttonElementId:this.buttonElementId,widgetVersion:p})})))}resetState(){this.resetScroll("start-page_block"),this.slidePosition=0,n.resetCategoryLink=void 0,n.activeIonLink=void 0,n.image=l.none,n.imageUrl=l.none,n.imageBounds=l.none,n.searchArea=l.none,n.results=[],n.filters=[],n.detectedObjects=[],n.rectangleSearchForm=void 0,n.loading=!1,n.serverError=!1,this.wrongImageFormat=!1,this.resetScroll("results-block"),this.stopStreamTracks(),this.initResultEvents(),this.stream=null,this.cameraEnabled=!1,this.cameraButtonClicked=!1}haveErrors(){return this.wrongImageFormat||n.serverError}resetScroll(t,i="auto"){this.el.shadowRoot.getElementById(t).scroll({top:0,left:0,behavior:i})}handleModalClose(){this.active=!1,this.resetState(),["start-page_block","results-block"].forEach((t=>this.resetScroll(t))),this.trackWidgetEvent("close")}render(){var t;return e(s,null,!this.showingInButton&&e(v,null),e("vviinn-overlayed-modal",{class:{"first-screen":this.isOnboardingSlide()},isFirstScreen:this.isOnboardingSlide(),active:this.active,resetState:this.resetState.bind(this),onVviinnWidgetClose:()=>this.handleModalClose(),buttonElementId:null!==(t=this.buttonElementId)&&void 0!==t?t:this.id,widgetVersion:p,hideBackButton:"upload"===this.mode&&this.showingInButton||!this.cameraEnabled&&this.isOnboardingSlide(),exportparts:"secondary-action, title, close-button"},e("vviinn-slider",{showBullets:!1,position:this.slidePosition},e("vviinn-slide",{class:{"start-page":!0,"camera-enabled":this.cameraEnabled}},e("vviinn-example-image",{onVviinnImageUploadFinished:this.handleVviinnImageUploadFinished,onVviinnImageUpload:()=>{this.handleVviinnImageUpload("startCamera")},basicEventData:this.getBasicEventData(),srcObject:this.stream,cameraButtonClicked:this.cameraButtonClicked,exampleImageSource:this.exampleImageSource}),e("div",{class:{error:this.haveErrors()},id:"start-page_block"},e("div",{class:"start-page_main-content"},e("div",{class:{"start-page_errors-block":!0,hidden:!this.wrongImageFormat&&!n.serverError}},e("vviinn-wrong-format",{class:{hidden:!this.wrongImageFormat},handler:()=>this.resetState()}),e("vviinn-server-error",{class:{hidden:!n.serverError},handler:()=>this.resetState()})),!this.haveErrors()&&e("vviinn-teaser",null),!this.haveErrors()&&e("div",{class:"buttons-group"},this.renderButtons())),e("vviinn-privacy-badge",{privacyBadgeText:c.t("privacyBadgeText"),class:{invisible:this.haveErrors()}}))),e("vviinn-slide",{class:{"results-page":!0,active:this.isResultSlide()}},e("div",{class:"image-wrapper"},this.isResultSlide()&&e("vviinn-image-view",{basicEventData:this.getBasicEventData()}),e("div",{class:"filters-wrapper"},e("div",{class:"filters"},n.filters.map((t=>e("search-filters",{filter:t,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",{handler:()=>this.resetState()}),e("vviinn-onboarding",null)),e("div",{class:{hidden:n.results.length<=0,products:!0}},this.active&&this.renderResults()))))))}get el(){return a(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);height:640px}#start-page_block{box-sizing:border-box;display:flex;overflow-y:auto;flex-direction:column;justify-content:center;padding:42px 62px}#start-page_block.error{align-content:center}.start-page_main-content{flex-grow:1;display:flex;flex-direction:column;justify-content:center}.start-page_errors-block{display:flex;flex-direction:column;justify-content:center;gap:12px}.buttons-group{display:flex;flex-direction:column;gap:12px;margin:24px 0}.action-button{display:grid;border:none;cursor:pointer;align-items:center;border-radius:8px;color:white;font-size:16px;height:48px;justify-items:center;transition:background 0.1s ease-in-out;color:#525252;background-color:#f4f4f4}.action-button:hover{background-color:#eaeaea}.action-button:first-child{background:var(--color-primary, var(--color-primary-system));border-color:var(--color-primary, var(--color-primary-system));color:white}.action-button:first-child:hover{background:var(--color-primary-hover, var(--color-primary-hover-system));border-color:var(--color-primary-hover, var(--color-primary-hover-system))}.action-button:active{border-color:black}.action-button-content{display:grid;align-items:center;justify-items:start;justify-content:center;grid-template-columns:max-content auto;grid-gap:8px}.results-page{margin-top:60px;display:grid;grid-template-columns:336px auto;box-sizing:border-box}.results-page>*{padding:24px;box-sizing:border-box}.products{width:100%;align-content:center;align-items:start;box-sizing:border-box;display:grid;grid-gap:32px 16px;grid-template-columns:repeat(auto-fill, minmax(130px, 1fr));justify-items:center;padding:24px;position:absolute}.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{display:grid;grid-template-rows:min-content 1fr;grid-gap:24px;min-width:100%}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;font-size:14px;font-weight:400;line-height:20px}search-filters::part(show-more-filters){display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid #f4f4f4;min-width:40px;height:40px;border-radius:100px;box-sizing:border-box;color:#161616}search-filters::part(show-more-filters):hover{background:#eaeaea}search-filters::part(filter active){background:var(--color-primary, var(--color-primary-system));color:white}.filters-wrapper{overflow-x:auto;transform:translateX(-24px);min-width:calc(100% + 48px)}.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: 1080px){#start-page_block{padding:24px 36px}}@media (max-width: 768px){.start-page{display:flex;flex-direction:column;height:100%}vviinn-overlayed-modal.first-screen::part(secondary-action){visibility:visible}.start-page.active{height:calc(100vh - 64px);height:calc(100svh - 64px)}.start-page:not(.active){overflow:hidden}.results-page{margin-top:0}.results-page>*{box-sizing:border-box;padding:0 24px 24px}.filters-wrapper{min-width:calc(100% + 40px)}.results-page{grid-template-rows:min-content;grid-template-columns:unset}#start-page_block{overflow-y:unset;min-height:-moz-fit-content;min-height:fit-content;padding:24px 20px}.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: 480px){.start-page{padding-top:0}.action-button-content{grid-gap:10px}}@media (max-width: 380px){.results-page>*{padding:12px}.products{grid-gap:24px 10px}}vviinn-wrong-format,vviinn-server-error{width:280px;align-self:center;justify-self:center}.visually-hidden{clip:rect(0 0 0 0);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}";export{V as vviinn_vps_widget}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as n}from"./p-1e83e6ba.js";import{v as h}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as n}from"./p-1e83e6ba.js";import{v as h}from"./p-174af354.js";import{a as o}from"./p-74f46a18.js";import{c as a,S as r}from"./p-caf46c2b.js";import{D as d}from"./p-cc013cd2.js";const l=class{constructor(s){t(this,s),this.vviinnWidgetLoad=i(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=i(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=i(this,"vviinnWidgetClose",7),this.vviinnImageUpload=i(this,"vviinnImageUpload",7),this.vviinnProductLoad=i(this,"vviinnProductLoad",7),this.vviinnProductClick=i(this,"vviinnProductClick",7),this.vviinnProductView=i(this,"vviinnProductView",7),this.vviinnResultLoad=i(this,"vviinnResultLoad",7),this.vviinnResultView=i(this,"vviinnResultView",7),this.vviinnNoResult=i(this,"vviinnNoResult",7),this.vviinnImageCrop=i(this,"vviinnImageCrop",7),this.vviinnSelectObject=i(this,"vviinnSelectObject",7),this.vviinnSelectFilter=i(this,"vviinnSelectFilter",7),this.globalSlotsChanged=i(this,"globalSlotsChanged",7),this.getBasicEventData=()=>({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:a.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.imageResolutionWidth=250,this.exampleImageSource=d,this.apiPath=void 0,this.buttonPressed=!1}handleModalClosed(){this.buttonPressed=!1}componentDidLoad(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit(Array.from(t))}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(r,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, upload-photo_button, show-files_button, start-camera_button",campaignId:this.campaignId,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed&&"modal"===this.mode,excluded:this.excluded,productDetailNewTab:this.productDetailNewTab,imageResolutionWidth:this.imageResolutionWidth,exampleImageSource:this.exampleImageSource}))}get el(){return n(this)}};l.style=":host{display:block}";export{l as vviinn_vps_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,c as t,h as s,H as h,g as n}from"./p-1e83e6ba.js";import{v as o}from"./p-
|
|
1
|
+
import{r as i,c as t,h as s,H as h,g as n}from"./p-1e83e6ba.js";import{v as o}from"./p-174af354.js";import{V as e}from"./p-74f46a18.js";const v=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.vviinnProductLoad=t(this,"vviinnProductLoad",7),this.vviinnProductClick=t(this,"vviinnProductClick",7),this.vviinnProductView=t(this,"vviinnProductView",7),this.vviinnResultLoad=t(this,"vviinnResultLoad",7),this.vviinnResultView=t(this,"vviinnResultView",7),this.vviinnNoResult=t(this,"vviinnNoResult",7),this.vviinnAddToBasket=t(this,"vviinnAddToBasket",7),this.sidebar=null,this.sidebarCloseListener=()=>{document.body.removeChild(this.sidebar)},this.token=void 0,this.productId=void 0,this.position="bottom",this.sourceImage=null,this.sidebarTitle="Visually similar products",this.modalScrollbar=!1,this.campaigns="",this.campaignType="VPR",this.locale="de-DE",this.color="",this.addStyle=!0,this.mode="continuity",this.imageWidth=300,this.currencySign="€",this.noResultText="",this.noResultShow=!0,this.gridArrowsDynamic=!1,this.excluded="",this.productDetailNewTab=!1,this.addToBasketShow=!1,this.apiPath="https://api.vviinn.com"}render(){return s(h,{onClick:()=>{this.handleClick()},role:"button",tabindex:"0"},s("vviinn-button",{addStyle:this.addStyle,part:"vviinn-button"},s("slot",null,s(e,null))))}handleClick(){const i=document.createElement("vviinn-recommendations-sidebar");i.sidebarTitle=this.sidebarTitle,i.productId=this.productId,i.token=this.token,i.position=this.position,i.sourceImage=this.sourceImage,i.widgetScrollbar=this.modalScrollbar,i.campaigns=this.campaigns,i.campaignType=this.campaignType,i.color=this.color,i.locale=this.locale,i.mode="right"===this.position?"grid":this.mode,i.imageWidth=this.imageWidth,i.currencySign=this.currencySign,i.apiPath=this.apiPath,i.buttonElementId=this.el.id,i.noResultText=this.noResultText,i.noResultShow=this.noResultShow,i.gridArrowsDynamic=this.gridArrowsDynamic,i.productDetailNewTab=this.productDetailNewTab,i.widgetVersion=o,i.showingInButton=!0,i.excluded=this.excluded,i.addToBasketShow=this.addToBasketShow,i.buttonChildren=this.el.children,this.sidebar=i,i.addEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.append(this.sidebar)}disconnectedCallback(){this.sidebar&&(this.sidebar.removeEventListener("vviinnWidgetClose",this.sidebarCloseListener),document.body.removeChild(this.sidebar))}get el(){return n(this)}};v.style=":host{display:block}";export{v as vviinn_vpr_button}
|