vviinn-widgets 2.66.0 → 2.66.2

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 (29) hide show
  1. package/dist/cjs/{package-fb9ddd08.js → package-24b541c4.js} +1 -1
  2. package/dist/cjs/search-filters_18.cjs.entry.js +1 -1
  3. package/dist/cjs/vviinn-carousel_6.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/esm/{package-3edb6e3f.js → package-3d14c017.js} +1 -1
  8. package/dist/esm/search-filters_18.entry.js +1 -1
  9. package/dist/esm/vviinn-carousel_6.entry.js +1 -1
  10. package/dist/esm/vviinn-vpr-button.entry.js +1 -1
  11. package/dist/esm/vviinn-vps-button.entry.js +1 -1
  12. package/dist/esm/vviinn-vps-widget.entry.js +1 -1
  13. package/dist/vviinn-widgets/{p-d99e511d.entry.js → p-04c7125e.entry.js} +1 -1
  14. package/{www/build/p-0a02e3de.entry.js → dist/vviinn-widgets/p-128481f0.entry.js} +1 -1
  15. package/dist/vviinn-widgets/{p-d39b0518.entry.js → p-4bae5468.entry.js} +1 -1
  16. package/dist/vviinn-widgets/{p-5913b7eb.entry.js → p-99f7912b.entry.js} +1 -1
  17. package/{www/build/p-037132f7.entry.js → dist/vviinn-widgets/p-ae79ba8c.entry.js} +1 -1
  18. package/dist/vviinn-widgets/p-d07f69eb.js +1 -0
  19. package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
  20. package/package.json +1 -1
  21. package/www/build/{p-d99e511d.entry.js → p-04c7125e.entry.js} +1 -1
  22. package/{dist/vviinn-widgets/p-0a02e3de.entry.js → www/build/p-128481f0.entry.js} +1 -1
  23. package/www/build/{p-d39b0518.entry.js → p-4bae5468.entry.js} +1 -1
  24. package/www/build/{p-5913b7eb.entry.js → p-99f7912b.entry.js} +1 -1
  25. package/{dist/vviinn-widgets/p-037132f7.entry.js → www/build/p-ae79ba8c.entry.js} +1 -1
  26. package/www/build/p-d07f69eb.js +1 -0
  27. package/www/build/vviinn-widgets.esm.js +1 -1
  28. package/dist/vviinn-widgets/p-1fa6349d.js +0 -1
  29. package/www/build/p-1fa6349d.js +0 -1
@@ -1,5 +1,5 @@
1
1
  'use strict';
2
2
 
3
- const version = "2.66.0";
3
+ const version = "2.66.2";
4
4
 
5
5
  exports.version = version;
@@ -7,7 +7,7 @@ const search_store = require('./search.store-53e13410.js');
7
7
  const index$1 = require('./index-d3a4dc7e.js');
8
8
  const customizedSlots = require('./customized-slots-dacb282b.js');
9
9
  const PlusIcon = require('./PlusIcon-835a5dcc.js');
10
- const _package = require('./package-fb9ddd08.js');
10
+ const _package = require('./package-24b541c4.js');
11
11
 
12
12
  const ArrowIcon = () => (index.h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
13
13
  index.h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
@@ -8,7 +8,7 @@ const customizedSlots = require('./customized-slots-dacb282b.js');
8
8
  const index$1 = require('./index-d3a4dc7e.js');
9
9
  const resources = require('./resources-c5fbe419.js');
10
10
  const PlusIcon = require('./PlusIcon-835a5dcc.js');
11
- const _package = require('./package-fb9ddd08.js');
11
+ const _package = require('./package-24b541c4.js');
12
12
 
13
13
  const BasketIcon = () => (index.h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
14
14
  index.h("path", { d: "M7.5 22C6.95 22 6.47917 21.8042 6.0875 21.4125C5.69583 21.0208 5.5 20.55 5.5 20C5.5 19.45 5.69583 18.9792 6.0875 18.5875C6.47917 18.1958 6.95 18 7.5 18C8.05 18 8.52083 18.1958 8.9125 18.5875C9.30417 18.9792 9.5 19.45 9.5 20C9.5 20.55 9.30417 21.0208 8.9125 21.4125C8.52083 21.8042 8.05 22 7.5 22ZM17.5 22C16.95 22 16.4792 21.8042 16.0875 21.4125C15.6958 21.0208 15.5 20.55 15.5 20C15.5 19.45 15.6958 18.9792 16.0875 18.5875C16.4792 18.1958 16.95 18 17.5 18C18.05 18 18.5208 18.1958 18.9125 18.5875C19.3042 18.9792 19.5 19.45 19.5 20C19.5 20.55 19.3042 21.0208 18.9125 21.4125C18.5208 21.8042 18.05 22 17.5 22ZM6.65 6L9.05 11H16.05L18.8 6H6.65ZM5.7 4H20.45C20.8333 4 21.125 4.17083 21.325 4.5125C21.525 4.85417 21.5333 5.2 21.35 5.55L17.8 11.95C17.6167 12.2833 17.3708 12.5417 17.0625 12.725C16.7542 12.9083 16.4167 13 16.05 13H8.6L7.5 15H18.5C18.7833 15 19.0208 15.0958 19.2125 15.2875C19.4042 15.4792 19.5 15.7167 19.5 16C19.5 16.2833 19.4042 16.5208 19.2125 16.7125C19.0208 16.9042 18.7833 17 18.5 17H7.5C6.75 17 6.18333 16.6708 5.8 16.0125C5.41667 15.3542 5.4 14.7 5.75 14.05L7.1 11.6L3.5 4H2.5C2.21667 4 1.97917 3.90417 1.7875 3.7125C1.59583 3.52083 1.5 3.28333 1.5 3C1.5 2.71667 1.59583 2.47917 1.7875 2.2875C1.97917 2.09583 2.21667 2 2.5 2H4.125C4.30833 2 4.48333 2.05 4.65 2.15C4.81667 2.25 4.94167 2.39167 5.025 2.575L5.7 4Z", fill: "#525252" })));
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index = require('./index-4474431a.js');
6
- const _package = require('./package-fb9ddd08.js');
6
+ const _package = require('./package-24b541c4.js');
7
7
  const VisualSearchIcon = require('./VisualSearchIcon-f435f5b0.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-4474431a.js');
6
- const _package = require('./package-fb9ddd08.js');
6
+ const _package = require('./package-24b541c4.js');
7
7
  const customizedSlots = require('./customized-slots-dacb282b.js');
8
8
  const constants = require('./constants-7684cbfc.js');
9
9
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-4474431a.js');
6
6
  const search_store = require('./search.store-53e13410.js');
7
7
  const index$1 = require('./index-d3a4dc7e.js');
8
- const _package = require('./package-fb9ddd08.js');
8
+ const _package = require('./package-24b541c4.js');
9
9
  const customizedSlots = require('./customized-slots-dacb282b.js');
10
10
  const resources = require('./resources-c5fbe419.js');
11
11
  const constants = require('./constants-7684cbfc.js');
@@ -1,3 +1,3 @@
1
- const version = "2.66.0";
1
+ const version = "2.66.2";
2
2
 
3
3
  export { version as v };
@@ -3,7 +3,7 @@ import { s as searchState, _ as _function, O as Option, l as fromAlt, n as foldV
3
3
  import { i as instance, c as createTrackingApi, v as v4, n as createResultVpsEventByType, o as createProductVpsEventByType } from './index-7b10362b.js';
4
4
  import { s as slotChangeListener, c as campaignTypeNames } from './customized-slots-299054d1.js';
5
5
  import { P as PlusIcon } from './PlusIcon-8f8206c3.js';
6
- import { v as version } from './package-3edb6e3f.js';
6
+ import { v as version } from './package-3d14c017.js';
7
7
 
8
8
  const ArrowIcon = () => (h("svg", { width: "12", height: "20", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
9
9
  h("path", { d: "M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z" })));
@@ -4,7 +4,7 @@ import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton, f a
4
4
  import { i as instance, v as v4, c as createTrackingApi, a as createAddToBasketVpcEvent, b as createAddToBasketVprEvent, d as createWidgetVpcEvent, e as createWidgetVprEvent, f as createResultVpcEventByType, g as createResultVprEventByType, h as createProductVpcEventByType, j as createProductVprEventByType } from './index-7b10362b.js';
5
5
  import { r as resources } from './resources-5ad3b316.js';
6
6
  import { P as PlusIcon } from './PlusIcon-8f8206c3.js';
7
- import { v as version } from './package-3edb6e3f.js';
7
+ import { v as version } from './package-3d14c017.js';
8
8
 
9
9
  const BasketIcon = () => (h("svg", { width: "25", height: "24", viewBox: "0 0 25 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
10
10
  h("path", { d: "M7.5 22C6.95 22 6.47917 21.8042 6.0875 21.4125C5.69583 21.0208 5.5 20.55 5.5 20C5.5 19.45 5.69583 18.9792 6.0875 18.5875C6.47917 18.1958 6.95 18 7.5 18C8.05 18 8.52083 18.1958 8.9125 18.5875C9.30417 18.9792 9.5 19.45 9.5 20C9.5 20.55 9.30417 21.0208 8.9125 21.4125C8.52083 21.8042 8.05 22 7.5 22ZM17.5 22C16.95 22 16.4792 21.8042 16.0875 21.4125C15.6958 21.0208 15.5 20.55 15.5 20C15.5 19.45 15.6958 18.9792 16.0875 18.5875C16.4792 18.1958 16.95 18 17.5 18C18.05 18 18.5208 18.1958 18.9125 18.5875C19.3042 18.9792 19.5 19.45 19.5 20C19.5 20.55 19.3042 21.0208 18.9125 21.4125C18.5208 21.8042 18.05 22 17.5 22ZM6.65 6L9.05 11H16.05L18.8 6H6.65ZM5.7 4H20.45C20.8333 4 21.125 4.17083 21.325 4.5125C21.525 4.85417 21.5333 5.2 21.35 5.55L17.8 11.95C17.6167 12.2833 17.3708 12.5417 17.0625 12.725C16.7542 12.9083 16.4167 13 16.05 13H8.6L7.5 15H18.5C18.7833 15 19.0208 15.0958 19.2125 15.2875C19.4042 15.4792 19.5 15.7167 19.5 16C19.5 16.2833 19.4042 16.5208 19.2125 16.7125C19.0208 16.9042 18.7833 17 18.5 17H7.5C6.75 17 6.18333 16.6708 5.8 16.0125C5.41667 15.3542 5.4 14.7 5.75 14.05L7.1 11.6L3.5 4H2.5C2.21667 4 1.97917 3.90417 1.7875 3.7125C1.59583 3.52083 1.5 3.28333 1.5 3C1.5 2.71667 1.59583 2.47917 1.7875 2.2875C1.97917 2.09583 2.21667 2 2.5 2H4.125C4.30833 2 4.48333 2.05 4.65 2.15C4.81667 2.25 4.94167 2.39167 5.025 2.575L5.7 4Z", fill: "#525252" })));
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { v as version } from './package-3edb6e3f.js';
2
+ import { v as version } from './package-3d14c017.js';
3
3
  import { V as VisualSearchIcon } from './VisualSearchIcon-b301a1d4.js';
4
4
 
5
5
  const vviinnVprButtonCss = ":host{display:block}";
@@ -1,5 +1,5 @@
1
1
  import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-abf408d8.js';
2
- import { v as version } from './package-3edb6e3f.js';
2
+ import { v as version } from './package-3d14c017.js';
3
3
  import { c as campaignTypeNames, S as SlotSkeleton } from './customized-slots-299054d1.js';
4
4
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { h, r as registerInstance, c as createEvent, F as Fragment, H as Host, g as getElement } from './index-abf408d8.js';
2
2
  import { s as searchState, j as makeTextSearchRequest, d as state, k as parseExcludedToParams, O as Option } from './search.store-9a15b860.js';
3
3
  import { i as instance, k as createSearchEvent, l as createFilterEvent, v as v4, c as createTrackingApi, m as createWidgetVpsEvent } from './index-7b10362b.js';
4
- import { v as version } from './package-3edb6e3f.js';
4
+ import { v as version } from './package-3d14c017.js';
5
5
  import { c as campaignTypeNames, s as slotChangeListener, S as SlotSkeleton } from './customized-slots-299054d1.js';
6
6
  import { r as resources } from './resources-5ad3b316.js';
7
7
  import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-8bf233a9.js';
@@ -1,4 +1,4 @@
1
- import{h as t,r as i,c as e,H as n,g as s}from"./p-1c863deb.js";import{s as o,_ as r,O as a,l as h,n as c,o as l,q as d,r as p,u,v,w as f,E as m,x as g,i as b,e as w,y as x,z as y,B as k,C,d as M,D as j,F as z,G as O,N as T}from"./p-9b1c8e6e.js";import{i as E,c as L,v as S,n as I,o as N}from"./p-2961ec26.js";import{s as P,c as B}from"./p-55c453ab.js";import{P as _}from"./p-2da7f425.js";import{v as R}from"./p-1fa6349d.js";const A=()=>t("svg",{width:"12",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z"})),D=()=>t("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M8.00001 17.3333C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H8.00001Z",fill:"currentColor"})),H=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"80",height:"80",viewBox:"0 0 80 80",fill:"none"},t("circle",{cx:"40",cy:"40",r:"36",fill:"white"}),t("circle",{cx:"40",cy:"40",r:"39",fill:"white","fill-opacity":"0.16",stroke:"white","stroke-width":"2"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M48 29.3333H50.6667C53.6133 29.3333 56 31.72 56 34.6667V45.3333H53.3333V34.6667C53.3333 33.2 52.1333 32 50.6667 32H46.5733L45.7867 30.8133L43.9067 28H36.0933L34.2133 30.8133L33.4267 32H29.3333C27.8667 32 26.6667 33.2 26.6667 34.6667V48C26.6667 49.4667 27.8667 50.6667 29.3333 50.6667H36V53.3333H29.3333C26.3867 53.3333 24 50.9467 24 48V34.6667C24 31.72 26.3867 29.3333 29.3333 29.3333H32L34.6667 25.3333H45.3333L48 29.3333ZM40 34.6667C43.68 34.6667 46.6667 37.6533 46.6667 41.3333L46.6533 41.3467C46.6533 42.6933 46.24 43.96 45.5467 45.0133L51.6 51.0667L49.72 52.9467L43.6667 46.8933C42.6133 47.5867 41.36 48 40 48C36.32 48 33.3333 45.0133 33.3333 41.3333C33.3333 37.6533 36.32 34.6667 40 34.6667ZM36 41.3333C36 43.5333 37.8 45.3333 40 45.3333C42.2 45.3333 44 43.5333 44 41.3333C44 39.1333 42.2 37.3333 40 37.3333C37.8 37.3333 36 39.1333 36 41.3333Z",fill:"#161616"})),W=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z",fill:"currentColor"})),V=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z",fill:"#525252"}),t("path",{d:"M14 12C14 9.24 11.76 7 9 7C6.24 7 4 9.24 4 12C4 14.76 6.24 17 9 17C10.02 17 10.96 16.69 11.75 16.17L16.29 20.71L17.7 19.3L13.16 14.76C13.68 13.97 13.99 13.02 13.99 12.01L14 12ZM9 15C7.35 15 6 13.65 6 12C6 10.35 7.35 9 9 9C10.65 9 12 10.35 12 12C12 13.65 10.65 15 9 15Z",fill:"#525252"})),F=()=>t("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}),t("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"})),Y=({className:i})=>t("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:i},t("path",{d:"M31 3H15C8.37258 3 3 8.37258 3 15V31",stroke:"white","stroke-width":"6","stroke-linecap":"square"}));const X=(t,i)=>{var e;if(!t)return"";const n={};return t.href.split("?")[1].split("included[]=").join("").split("&").forEach((t=>{const[i,e]=t.split("%3A");n[i]=e})),"categories"===i?null!==(e=n.product_type)&&void 0!==e?e:n.google_product_category:n[i]},Z=class{constructor(t){var n,s,r;i(this,t),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.vviinnTextSearchFilterSelected=e(this,"vviinnTextSearchFilterSelected",7),this.filterType=null!==(s=null===(n=this.filter)||void 0===n?void 0:n.name)&&void 0!==s?s:null===(r=this.textSearchFiltersGroup)||void 0===r?void 0:r.column,this.getSelectedTextSearchFilters=()=>o.textSearchFilters.filter((({values:t})=>null==t?void 0:t.find((({selected:t})=>t)))).map((({column:t,values:i})=>({column:t,values:i.filter((t=>t.selected)).map((t=>t.value))}))),this.getTextSearchFilterRequestValue=t=>({column:this.textSearchFiltersGroup.column,values:[t.value.toString()]}),this.filter=null,this.textSearchFiltersGroup=null,this.basicEventData=void 0,this.selectedFilter="",this.hideFilters=!0}isCategoriesFilterType(){return"categories"===this.filterType}getFilterKind(){return this.isCategoriesFilterType()?"category":this.filterType}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter(t):this.selectFilter(t)}selectFilter(t){o.activeIonLink=t,this.selectedFilter=X(t,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"select",kind:this.getFilterKind()}))}clearSelectedFilter(t){o.activeIonLink=t.clear,this.selectedFilter=X(t.clear,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"deselect",kind:this.getFilterKind()}))}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,i){"Enter"===t.key&&this.handleFilterSelection(i)}isFilterSelected(t){return this.isCategoriesFilterType()?this.selectedFilter===X(t,"categories"):this.selectedFilter===t.name}handleTextSearchEnter(t,i){"Enter"===t.key&&this.handleTextSearchFilterSelection(i)}handleTextSearchFilterSelection(t){let i;const e=this.getSelectedTextSearchFilters(),n=this.getTextSearchFilterRequestValue(t),s=t.selected,o=e.some((({column:t})=>t===n.column));i=s?e.filter((({column:t})=>t!==n.column)):o?e.map((t=>t.column===n.column?n:t)):[...e,n],this.vviinnTextSearchFilterSelected.emit(i)}render(){var i,e;const s=(null===(i=this.textSearchFiltersGroup)||void 0===i?void 0:i.values)||[],r=(null===(e=this.filter)||void 0===e?void 0:e.filters)||[];return t(n,{exportparts:"filter, show-more-filters"},t("div",{class:{filters:!0,"no-scrollbar-mobile":this.isCategoriesFilterType()||null!==this.textSearchFiltersGroup,"no-scrollbar":!this.isCategoriesFilterType()&&null===this.textSearchFiltersGroup}},!!r.length&&r.filter(((t,i)=>!this.hideFilters||i<4)).map(((i,e)=>{const n="categories"===this.filter.name?this.selectedFilter===X(i,"categories"):this.selectedFilter===i.name;return t("div",{role:"button",tabindex:"0",key:e,part:n?"filter active":"filter",class:{filter:!0,active:n},style:{"animation-delay":10*e+"ms"},onPointerUp:t=>{o.loading||(t.stopPropagation(),this.handleFilterSelection(i))},onKeyPress:t=>{o.loading||this.handleEnter(t,i)}},i.name)})),!!s.length&&s.filter(((t,i)=>!this.hideFilters||i<4)).map(((i,e)=>{const{label:n,selected:s}=i;return t("div",{role:"button",tabindex:"0",key:e,part:s?"filter active":"filter",class:{filter:!0,active:s},style:{"animation-delay":10*e+"ms"},onPointerUp:t=>{o.loading||(t.stopPropagation(),this.handleTextSearchFilterSelection(i))},onKeyPress:t=>{o.loading||this.handleTextSearchEnter(t,i)}},n)})),this.hideFilters&&t("div",{class:{"show-more":!0,hidden:r.length<=4&&s.length<=4,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 s(this)}};Z.style=".filters{display:flex;flex-direction:row;overflow-x:auto;padding:0 12px 6px 24px;padding-left:24px;padding-bottom:6px;scrollbar-width:thin}:host(:not(:first-child)) .filters{margin-top:6px}.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 U=class{constructor(t){i(this,t),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.basicEventData=void 0,this.position=["0","0"]}getObjectPosition(){return r.pipe(o.imageBounds,a.map((t=>{const i=h(c(this.detectedObject).rectangle),{x:e,y:n}=r.pipe(i,l(t),d);return[`${e}px`,`${n}px`]})),a.getOrElse((()=>["0","0"])))}selectDetectedObject(){r.pipe(o.imageBounds,a.map((t=>{const i=c(this.detectedObject).rectangle,e=h(i),n=l(t)(e);o.detectedObject=this.detectedObject,o.searchArea=a.some(n)}))),p(),this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject}))}isActive(){if(!this.detectedObject)return!1;if(!o.detectedObject)return!1;const t=c(this.detectedObject),i=c(o.detectedObject);return u.equals(t,i)}render(){return t(n,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};U.style=':host{--color-primary-system:#0f62fe;--color-primary-hover-system:#014cda;--color-icons-system:#2f8edf;--product-card-width-system:130px;--spacer:8px;--surface-color-surface-01:#f4f4f4;--text-color-text-primary:#161616;--font-family:Inter, system-ui, sans-serif;--font-size-body:14px;--font-weight-regular:400;--line-height-body:20px;--letter-spacing-default:0px;--background-color-background:#fff;--border-color-border-01:#f4f4f4;--gray-100:#161616;--gray-10:#f4f4f4;--gray-70:#525252;--radius-radius-md:8px;--button-color-button-primary:#000;--text-color-text-inverse:#fff;--text-color-text-secondary:#525252;--button-color-button-disabled:#e0e0e0;--text-color-text-disabled:rgba(22, 22, 22, 0.25)}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position));z-index:2}: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)}}';const K=class{constructor(t){i(this,t),this.handler=void 0}render(){return t(n,null,t("vviinn-error",null,t(F,null),t("h4",{slot:"title"},E.t("emptyResultsBlock.title")),"image"===o.searchType&&t("button",{slot:"action",onClick:this.handler},E.t("emptyResultsBlock.button"))))}},$=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.vviinnCameraEnabled=e(this,"vviinnCameraEnabled",7),this.videoTrack=null,this.initializeZoom=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};"zoom"in i&&(this.zoomCapabilities=i.zoom,await this.videoTrack.applyConstraints({advanced:[{zoom:this.zoomCapabilities.min}]}))},this.onZoom=async t=>{var i;if(!this.videoTrack||!this.zoomCapabilities)return;const{max:e,min:n}=this.zoomCapabilities,s=null!==(i=this.videoTrack.getSettings().zoom)&&void 0!==i?i:n,o=Math.round((e-n)/3*10)/10;let r;r="in"===t?s+o:s-o,r<n&&(r=n),r>e&&(r=e),await this.videoTrack.applyConstraints({advanced:[{zoom:r}]})},this.exampleImageSource=void 0,this.width=0,this.height=0,this.basicEventData=void 0,this.srcObject=void 0,this.cameraButtonClicked=!1,this.selected=!1,this.videoInitialized=!1,this.zoomCapabilities=null}componentWillLoad(){P(this,this.el)}componentDidLoad(){this.videoElement=this.el.shadowRoot.getElementById("camera-preview")}createPlaceholderImageCanvas(){const t=this.el.shadowRoot.getElementById("captured-image-placeholder"),i=this.videoElement,{videoWidth:e,videoHeight:n}=i,s=document.createElement("canvas");s.width=e,s.height=n,s.getContext("2d").drawImage(i,0,0,s.width,s.height);const o=s.toDataURL("image/jpeg");t.src=o}async selectImage(){if(!this.srcObject)return;let t;this.vviinnImageUpload.emit(this.basicEventData);const i=this.el.shadowRoot.getElementById("photo-frame"),e=this.videoElement,n=i.getBoundingClientRect(),s=e.getBoundingClientRect(),{videoWidth:o,videoHeight:a}=e,h=document.createElement("canvas");this.selected=!0,this.videoElement.pause(),this.createPlaceholderImageCanvas();const c=o/s.width,l=a/s.height,d=Math.min(n.width*c,n.height*l);h.width=d,h.height=d;const p=(n.left-s.left+(n.width-d/c)/2)*c,u=(n.top-s.top+(n.height-d/l)/2)*l;h.getContext("2d").drawImage(e,p,u,d,d,0,0,h.width,h.height);const g=h.toDataURL("image/jpeg");t=await v(g),r.pipe(await f(t),m.match((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUploadFinished.emit()))),this.selected=!1,this.videoInitialized=!1,this.vviinnCameraEnabled.emit(!1)}handleKeyPress({key:t}){"Enter"!==t&&" "!==t||this.selectImage()}handleSrcObjectChange(){this.srcObject?(this.videoElement.srcObject=this.srcObject,this.videoTrack=this.srcObject.getVideoTracks()[0],this.initializeZoom(),this.videoElement.onloadedmetadata=()=>{this.vviinnCameraEnabled.emit(!0),this.videoInitialized=!0}):this.videoInitialized=!1}render(){return t(n,{onKeyUp:t=>this.handleKeyPress(t),class:{"video-expanded":this.cameraButtonClicked}},t("video",{id:"camera-preview",class:{hidden:!this.videoInitialized||this.selected},autoplay:!0,playsinline:!0,muted:!0}),t("img",{src:this.exampleImageSource,width:this.width,height:this.height,tabindex:1,class:{hidden:this.videoInitialized||this.selected}}),t("img",{id:"captured-image-placeholder",class:{hidden:!this.selected}}),t("div",{class:{container:!0,hidden:!this.videoInitialized}},t("div",{class:"photo-frame-container"},t("div",{id:"photo-frame"},t(Y,{className:"photo-frame-corner top-left"}),t(Y,{className:"photo-frame-corner top-right"}),t(Y,{className:"photo-frame-corner bottom-left"}),t(Y,{className:"photo-frame-corner bottom-right"})),t("div",{class:{"zoom-buttons":!0,hidden:!this.zoomCapabilities}},t("button",{onClick:()=>this.onZoom("out")},t(D,null)),t("button",{onClick:()=>this.onZoom("in")},t(_,null)))),t("div",{class:"photo-button-container"},t("button",{class:"photo-button",onClick:()=>this.selectImage()},t(H,null)))))}get el(){return s(this)}static get watchers(){return{srcObject:["handleSrcObjectChange"]}}};$.style=":host{display:block;width:100%;height:100%;min-height:0;position:relative;overflow:hidden;flex-grow:1;transition:min-height 1s}:host(.video-expanded){min-height:100%;transition:min-height 0.8s}img{width:100%;height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}#camera-preview{width:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:relative}#captured-image-placeholder{height:auto}.container{position:absolute;width:100%;height:100%;left:0;top:0;display:flex;flex-direction:column;gap:12px;padding:68px 0 48px;justify-content:space-around;align-content:center;box-sizing:border-box}.photo-frame-container{width:100%;height:100%;display:flex;flex-direction:column;gap:12px}#photo-frame{position:relative;aspect-ratio:1/1;border-radius:16px;box-shadow:0 0 0 100vmax rgba(0, 0, 0, 0.32);width:100%;height:auto;max-width:80%;margin:0 auto}@media (max-width: 960px){.photo-frame-container{width:auto;height:auto}}@media (max-width: 380px){#photo-frame{max-width:70%}}.photo-frame-corner{position:absolute;--delta:-3px}.photo-frame-corner.top-left{top:var(--delta);left:var(--delta)}.photo-frame-corner.top-right{top:var(--delta);right:var(--delta);transform:rotate(90deg)}.photo-frame-corner.bottom-left{bottom:var(--delta);left:var(--delta);transform:rotate(-90deg)}.photo-frame-corner.bottom-right{bottom:var(--delta);right:var(--delta);transform:rotate(180deg)}.photo-button-container{display:flex;width:100%;align-items:center;justify-self:flex-end}.photo-button{cursor:pointer;border:none;position:relative;z-index:1;padding:0;color:#6f6f6f;background-color:transparent;-webkit-tap-highlight-color:transparent;line-height:0;margin:0 auto}.zoom-buttons{display:flex;position:relative;justify-content:center;gap:12px}.zoom-buttons button{color:white;display:flex;width:48px;height:48px;justify-content:center;align-items:center;border-radius:var(--radius-radius-md, 8px);background-color:rgba(0, 0, 0, 0.48);border:none;cursor:pointer}.hidden{display:none}";const q=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.basicEventData=void 0,this.startUpload=void 0,this.loading=!1,this.accept="image",this.resetVpsButton=void 0,this.capture=void 0}async handleInputChange(t){this.vviinnImageUpload.emit(this.basicEventData);const i=t.target,e=await f(i.files[0]);r.pipe(e,g((({kind:t})=>this.vviinnNoResult.emit(Object.assign(Object.assign({},this.basicEventData),{reason:t}))),(()=>this.vviinnImageUploadFinished.emit()))),i.value=null}startUploadWatcher(t){t&&(this.fileInput.click(),this.resetVpsButton())}render(){return t(n,{exportparts:"button"},this.loading?t("vviinn-preloader",null):t("label",{htmlFor:"fileInput",part:"button"},t("slot",{name:"upload-button-text"},"Upload image")),t("input",{id:"fileInput",class:"visually-hidden",type:"file",capture:this.capture,accept:"image"===this.accept?"image/*":"application/octet-stream",onChange:t=>this.handleInputChange(t),ref:t=>this.fileInput=t}))}static get watchers(){return{startUpload:["startUploadWatcher"]}}};q.style=".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}";var G=b((function(t){
1
+ import{h as t,r as i,c as e,H as n,g as s}from"./p-1c863deb.js";import{s as o,_ as r,O as a,l as h,n as c,o as l,q as d,r as p,u,v,w as f,E as m,x as g,i as b,e as w,y as x,z as y,B as k,C,d as M,D as j,F as z,G as O,N as T}from"./p-9b1c8e6e.js";import{i as E,c as L,v as S,n as I,o as N}from"./p-2961ec26.js";import{s as P,c as B}from"./p-55c453ab.js";import{P as _}from"./p-2da7f425.js";import{v as R}from"./p-d07f69eb.js";const A=()=>t("svg",{width:"12",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M0 10 10 0l1.4 1.4L2.8 10l8.6 8.6L10 20 0 10Z"})),D=()=>t("svg",{width:"32",height:"32",viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M8.00001 17.3333C7.62223 17.3333 7.30556 17.2056 7.05001 16.95C6.79445 16.6944 6.66667 16.3778 6.66667 16C6.66667 15.6222 6.79445 15.3056 7.05001 15.05C7.30556 14.7944 7.62223 14.6667 8.00001 14.6667H24C24.3778 14.6667 24.6944 14.7944 24.95 15.05C25.2056 15.3056 25.3333 15.6222 25.3333 16C25.3333 16.3778 25.2056 16.6944 24.95 16.95C24.6944 17.2056 24.3778 17.3333 24 17.3333H8.00001Z",fill:"currentColor"})),H=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"80",height:"80",viewBox:"0 0 80 80",fill:"none"},t("circle",{cx:"40",cy:"40",r:"36",fill:"white"}),t("circle",{cx:"40",cy:"40",r:"39",fill:"white","fill-opacity":"0.16",stroke:"white","stroke-width":"2"}),t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M48 29.3333H50.6667C53.6133 29.3333 56 31.72 56 34.6667V45.3333H53.3333V34.6667C53.3333 33.2 52.1333 32 50.6667 32H46.5733L45.7867 30.8133L43.9067 28H36.0933L34.2133 30.8133L33.4267 32H29.3333C27.8667 32 26.6667 33.2 26.6667 34.6667V48C26.6667 49.4667 27.8667 50.6667 29.3333 50.6667H36V53.3333H29.3333C26.3867 53.3333 24 50.9467 24 48V34.6667C24 31.72 26.3867 29.3333 29.3333 29.3333H32L34.6667 25.3333H45.3333L48 29.3333ZM40 34.6667C43.68 34.6667 46.6667 37.6533 46.6667 41.3333L46.6533 41.3467C46.6533 42.6933 46.24 43.96 45.5467 45.0133L51.6 51.0667L49.72 52.9467L43.6667 46.8933C42.6133 47.5867 41.36 48 40 48C36.32 48 33.3333 45.0133 33.3333 41.3333C33.3333 37.6533 36.32 34.6667 40 34.6667ZM36 41.3333C36 43.5333 37.8 45.3333 40 45.3333C42.2 45.3333 44 43.5333 44 41.3333C44 39.1333 42.2 37.3333 40 37.3333C37.8 37.3333 36 39.1333 36 41.3333Z",fill:"#161616"})),W=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none"},t("path",{d:"M7.82499 13L12.725 17.9C12.925 18.1 13.0208 18.3333 13.0125 18.6C13.0042 18.8667 12.9 19.1 12.7 19.3C12.5 19.4833 12.2667 19.5792 12 19.5875C11.7333 19.5958 11.5 19.5 11.3 19.3L4.69999 12.7C4.59999 12.6 4.52915 12.4917 4.48749 12.375C4.44582 12.2583 4.42499 12.1333 4.42499 12C4.42499 11.8667 4.44582 11.7417 4.48749 11.625C4.52915 11.5083 4.59999 11.4 4.69999 11.3L11.3 4.69999C11.4833 4.51665 11.7125 4.42499 11.9875 4.42499C12.2625 4.42499 12.5 4.51665 12.7 4.69999C12.9 4.89999 13 5.13749 13 5.41249C13 5.68749 12.9 5.92499 12.7 6.12499L7.82499 11H19C19.2833 11 19.5208 11.0958 19.7125 11.2875C19.9042 11.4792 20 11.7167 20 12C20 12.2833 19.9042 12.5208 19.7125 12.7125C19.5208 12.9042 19.2833 13 19 13H7.82499Z",fill:"currentColor"})),V=()=>t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M20.6 4.57C17.39 4.19 16.88 3.68 16.42 0.37C16.38 0.15 16.22 0 16.01 0C15.8 0 15.63 0.15 15.59 0.37C15.12 3.66 14.63 4.13 11.41 4.57C11.17 4.61 11.01 4.77 11.01 5C11.01 5.23 11.17 5.39 11.41 5.42C14.63 5.81 15.14 6.31 15.59 9.62C15.63 9.84 15.8 10 16.01 10C16.22 10 16.39 9.84 16.42 9.62C16.89 6.31 17.39 5.81 20.6 5.42C20.84 5.38 21 5.22 21 5C21 4.78 20.83 4.6 20.6 4.57Z",fill:"#525252"}),t("path",{d:"M14 12C14 9.24 11.76 7 9 7C6.24 7 4 9.24 4 12C4 14.76 6.24 17 9 17C10.02 17 10.96 16.69 11.75 16.17L16.29 20.71L17.7 19.3L13.16 14.76C13.68 13.97 13.99 13.02 13.99 12.01L14 12ZM9 15C7.35 15 6 13.65 6 12C6 10.35 7.35 9 9 9C10.65 9 12 10.35 12 12C12 13.65 10.65 15 9 15Z",fill:"#525252"})),F=()=>t("svg",{slot:"icon",class:"icon",width:"32",height:"32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("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"}),t("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"})),Y=({className:i})=>t("svg",{width:"34",height:"34",viewBox:"0 0 34 34",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:i},t("path",{d:"M31 3H15C8.37258 3 3 8.37258 3 15V31",stroke:"white","stroke-width":"6","stroke-linecap":"square"}));const X=(t,i)=>{var e;if(!t)return"";const n={};return t.href.split("?")[1].split("included[]=").join("").split("&").forEach((t=>{const[i,e]=t.split("%3A");n[i]=e})),"categories"===i?null!==(e=n.product_type)&&void 0!==e?e:n.google_product_category:n[i]},Z=class{constructor(t){var n,s,r;i(this,t),this.vviinnSelectFilter=e(this,"vviinnSelectFilter",7),this.vviinnTextSearchFilterSelected=e(this,"vviinnTextSearchFilterSelected",7),this.filterType=null!==(s=null===(n=this.filter)||void 0===n?void 0:n.name)&&void 0!==s?s:null===(r=this.textSearchFiltersGroup)||void 0===r?void 0:r.column,this.getSelectedTextSearchFilters=()=>o.textSearchFilters.filter((({values:t})=>null==t?void 0:t.find((({selected:t})=>t)))).map((({column:t,values:i})=>({column:t,values:i.filter((t=>t.selected)).map((t=>t.value))}))),this.getTextSearchFilterRequestValue=t=>({column:this.textSearchFiltersGroup.column,values:[t.value.toString()]}),this.filter=null,this.textSearchFiltersGroup=null,this.basicEventData=void 0,this.selectedFilter="",this.hideFilters=!0}isCategoriesFilterType(){return"categories"===this.filterType}getFilterKind(){return this.isCategoriesFilterType()?"category":this.filterType}handleFilterSelection(t){return this.isFilterSelected(t)?this.clearSelectedFilter(t):this.selectFilter(t)}selectFilter(t){o.activeIonLink=t,this.selectedFilter=X(t,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"select",kind:this.getFilterKind()}))}clearSelectedFilter(t){o.activeIonLink=t.clear,this.selectedFilter=X(t.clear,this.filterType),this.vviinnSelectFilter.emit(Object.assign(Object.assign({},this.basicEventData),{action:"deselect",kind:this.getFilterKind()}))}toggleFilters(){this.hideFilters=!this.hideFilters}handleEnter(t,i){"Enter"===t.key&&this.handleFilterSelection(i)}isFilterSelected(t){return this.isCategoriesFilterType()?this.selectedFilter===X(t,"categories"):this.selectedFilter===t.name}handleTextSearchEnter(t,i){"Enter"===t.key&&this.handleTextSearchFilterSelection(i)}handleTextSearchFilterSelection(t){let i;const e=this.getSelectedTextSearchFilters(),n=this.getTextSearchFilterRequestValue(t),s=t.selected,o=e.some((({column:t})=>t===n.column));i=s?e.filter((({column:t})=>t!==n.column)):o?e.map((t=>t.column===n.column?n:t)):[...e,n],this.vviinnTextSearchFilterSelected.emit(i)}render(){var i,e;const s=(null===(i=this.textSearchFiltersGroup)||void 0===i?void 0:i.values)||[],r=(null===(e=this.filter)||void 0===e?void 0:e.filters)||[];return t(n,{exportparts:"filter, show-more-filters"},t("div",{class:{filters:!0,"no-scrollbar-mobile":this.isCategoriesFilterType()||null!==this.textSearchFiltersGroup,"no-scrollbar":!this.isCategoriesFilterType()&&null===this.textSearchFiltersGroup}},!!r.length&&r.filter(((t,i)=>!this.hideFilters||i<4)).map(((i,e)=>{const n="categories"===this.filter.name?this.selectedFilter===X(i,"categories"):this.selectedFilter===i.name;return t("div",{role:"button",tabindex:"0",key:e,part:n?"filter active":"filter",class:{filter:!0,active:n},style:{"animation-delay":10*e+"ms"},onPointerUp:t=>{o.loading||(t.stopPropagation(),this.handleFilterSelection(i))},onKeyPress:t=>{o.loading||this.handleEnter(t,i)}},i.name)})),!!s.length&&s.filter(((t,i)=>!this.hideFilters||i<4)).map(((i,e)=>{const{label:n,selected:s}=i;return t("div",{role:"button",tabindex:"0",key:e,part:s?"filter active":"filter",class:{filter:!0,active:s},style:{"animation-delay":10*e+"ms"},onPointerUp:t=>{o.loading||(t.stopPropagation(),this.handleTextSearchFilterSelection(i))},onKeyPress:t=>{o.loading||this.handleTextSearchEnter(t,i)}},n)})),this.hideFilters&&t("div",{class:{"show-more":!0,hidden:r.length<=4&&s.length<=4,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 s(this)}};Z.style=".filters{display:flex;flex-direction:row;overflow-x:auto;padding:0 12px 6px 24px;padding-left:24px;padding-bottom:6px;scrollbar-width:thin}:host(:not(:first-child)) .filters{margin-top:6px}.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 U=class{constructor(t){i(this,t),this.vviinnSelectObject=e(this,"vviinnSelectObject",7),this.detectedObject=void 0,this.basicEventData=void 0,this.position=["0","0"]}getObjectPosition(){return r.pipe(o.imageBounds,a.map((t=>{const i=h(c(this.detectedObject).rectangle),{x:e,y:n}=r.pipe(i,l(t),d);return[`${e}px`,`${n}px`]})),a.getOrElse((()=>["0","0"])))}selectDetectedObject(){r.pipe(o.imageBounds,a.map((t=>{const i=c(this.detectedObject).rectangle,e=h(i),n=l(t)(e);o.detectedObject=this.detectedObject,o.searchArea=a.some(n)}))),p(),this.vviinnSelectObject.emit(Object.assign(Object.assign({},this.basicEventData),{detectedObject:this.detectedObject}))}isActive(){if(!this.detectedObject)return!1;if(!o.detectedObject)return!1;const t=c(this.detectedObject),i=c(o.detectedObject);return u.equals(t,i)}render(){return t(n,{class:{active:this.isActive()},onClick:()=>this.selectDetectedObject(),style:{"--x-position":this.getObjectPosition()[0],"--y-position":this.getObjectPosition()[1]}})}};U.style=':host{--color-primary-system:#0f62fe;--color-primary-hover-system:#014cda;--color-icons-system:#2f8edf;--product-card-width-system:130px;--spacer:8px;--surface-color-surface-01:#f4f4f4;--text-color-text-primary:#161616;--font-family:Inter, system-ui, sans-serif;--font-size-body:14px;--font-weight-regular:400;--line-height-body:20px;--letter-spacing-default:0px;--background-color-background:#fff;--border-color-border-01:#f4f4f4;--gray-100:#161616;--gray-10:#f4f4f4;--gray-70:#525252;--radius-radius-md:8px;--button-color-button-primary:#000;--text-color-text-inverse:#fff;--text-color-text-secondary:#525252;--button-color-button-disabled:#e0e0e0;--text-color-text-disabled:rgba(22, 22, 22, 0.25)}:host{display:block;position:absolute;left:calc(var(--x-position));top:calc(var(--y-position));z-index:2}: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)}}';const K=class{constructor(t){i(this,t),this.handler=void 0}render(){return t(n,null,t("vviinn-error",null,t(F,null),t("h4",{slot:"title"},E.t("emptyResultsBlock.title")),"image"===o.searchType&&t("button",{slot:"action",onClick:this.handler},E.t("emptyResultsBlock.button"))))}},$=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.vviinnCameraEnabled=e(this,"vviinnCameraEnabled",7),this.videoTrack=null,this.initializeZoom=async()=>{var t;if(!this.videoTrack)return;const i=(null===(t=this.videoTrack)||void 0===t?void 0:t.getCapabilities)?this.videoTrack.getCapabilities():{};"zoom"in i&&(this.zoomCapabilities=i.zoom,await this.videoTrack.applyConstraints({advanced:[{zoom:this.zoomCapabilities.min}]}))},this.onZoom=async t=>{var i;if(!this.videoTrack||!this.zoomCapabilities)return;const{max:e,min:n}=this.zoomCapabilities,s=null!==(i=this.videoTrack.getSettings().zoom)&&void 0!==i?i:n,o=Math.round((e-n)/3*10)/10;let r;r="in"===t?s+o:s-o,r<n&&(r=n),r>e&&(r=e),await this.videoTrack.applyConstraints({advanced:[{zoom:r}]})},this.exampleImageSource=void 0,this.width=0,this.height=0,this.basicEventData=void 0,this.srcObject=void 0,this.cameraButtonClicked=!1,this.selected=!1,this.videoInitialized=!1,this.zoomCapabilities=null}componentWillLoad(){P(this,this.el)}componentDidLoad(){this.videoElement=this.el.shadowRoot.getElementById("camera-preview")}createPlaceholderImageCanvas(){const t=this.el.shadowRoot.getElementById("captured-image-placeholder"),i=this.videoElement,{videoWidth:e,videoHeight:n}=i,s=document.createElement("canvas");s.width=e,s.height=n,s.getContext("2d").drawImage(i,0,0,s.width,s.height);const o=s.toDataURL("image/jpeg");t.src=o}async selectImage(){if(!this.srcObject)return;let t;this.vviinnImageUpload.emit(this.basicEventData);const i=this.el.shadowRoot.getElementById("photo-frame"),e=this.videoElement,n=i.getBoundingClientRect(),s=e.getBoundingClientRect(),{videoWidth:o,videoHeight:a}=e,h=document.createElement("canvas");this.selected=!0,this.videoElement.pause(),this.createPlaceholderImageCanvas();const c=o/s.width,l=a/s.height,d=Math.min(n.width*c,n.height*l);h.width=d,h.height=d;const p=(n.left-s.left+(n.width-d/c)/2)*c,u=(n.top-s.top+(n.height-d/l)/2)*l;h.getContext("2d").drawImage(e,p,u,d,d,0,0,h.width,h.height);const g=h.toDataURL("image/jpeg");t=await v(g),r.pipe(await f(t),m.match((()=>this.vviinnNoResult.emit(this.basicEventData)),(()=>this.vviinnImageUploadFinished.emit()))),this.selected=!1,this.videoInitialized=!1,this.vviinnCameraEnabled.emit(!1)}handleKeyPress({key:t}){"Enter"!==t&&" "!==t||this.selectImage()}handleSrcObjectChange(){this.srcObject?(this.videoElement.srcObject=this.srcObject,this.videoTrack=this.srcObject.getVideoTracks()[0],this.initializeZoom(),this.videoElement.onloadedmetadata=()=>{this.vviinnCameraEnabled.emit(!0),this.videoInitialized=!0}):this.videoInitialized=!1}render(){return t(n,{onKeyUp:t=>this.handleKeyPress(t),class:{"video-expanded":this.cameraButtonClicked}},t("video",{id:"camera-preview",class:{hidden:!this.videoInitialized||this.selected},autoplay:!0,playsinline:!0,muted:!0}),t("img",{src:this.exampleImageSource,width:this.width,height:this.height,tabindex:1,class:{hidden:this.videoInitialized||this.selected}}),t("img",{id:"captured-image-placeholder",class:{hidden:!this.selected}}),t("div",{class:{container:!0,hidden:!this.videoInitialized}},t("div",{class:"photo-frame-container"},t("div",{id:"photo-frame"},t(Y,{className:"photo-frame-corner top-left"}),t(Y,{className:"photo-frame-corner top-right"}),t(Y,{className:"photo-frame-corner bottom-left"}),t(Y,{className:"photo-frame-corner bottom-right"})),t("div",{class:{"zoom-buttons":!0,hidden:!this.zoomCapabilities}},t("button",{onClick:()=>this.onZoom("out")},t(D,null)),t("button",{onClick:()=>this.onZoom("in")},t(_,null)))),t("div",{class:"photo-button-container"},t("button",{class:"photo-button",onClick:()=>this.selectImage()},t(H,null)))))}get el(){return s(this)}static get watchers(){return{srcObject:["handleSrcObjectChange"]}}};$.style=":host{display:block;width:100%;height:100%;min-height:0;position:relative;overflow:hidden;flex-grow:1;transition:min-height 1s}:host(.video-expanded){min-height:100%;transition:min-height 0.8s}img{width:100%;height:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center}#camera-preview{width:100%;min-height:100%;-o-object-fit:cover;object-fit:cover;-o-object-position:center;object-position:center;position:relative}#captured-image-placeholder{height:auto}.container{position:absolute;width:100%;height:100%;left:0;top:0;display:flex;flex-direction:column;gap:12px;padding:68px 0 48px;justify-content:space-around;align-content:center;box-sizing:border-box}.photo-frame-container{width:100%;height:100%;display:flex;flex-direction:column;gap:12px}#photo-frame{position:relative;aspect-ratio:1/1;border-radius:16px;box-shadow:0 0 0 100vmax rgba(0, 0, 0, 0.32);width:100%;height:auto;max-width:80%;margin:0 auto}@media (max-width: 960px){.photo-frame-container{width:auto;height:auto}}@media (max-width: 380px){#photo-frame{max-width:70%}}.photo-frame-corner{position:absolute;--delta:-3px}.photo-frame-corner.top-left{top:var(--delta);left:var(--delta)}.photo-frame-corner.top-right{top:var(--delta);right:var(--delta);transform:rotate(90deg)}.photo-frame-corner.bottom-left{bottom:var(--delta);left:var(--delta);transform:rotate(-90deg)}.photo-frame-corner.bottom-right{bottom:var(--delta);right:var(--delta);transform:rotate(180deg)}.photo-button-container{display:flex;width:100%;align-items:center;justify-self:flex-end}.photo-button{cursor:pointer;border:none;position:relative;z-index:1;padding:0;color:#6f6f6f;background-color:transparent;-webkit-tap-highlight-color:transparent;line-height:0;margin:0 auto}.zoom-buttons{display:flex;position:relative;justify-content:center;gap:12px}.zoom-buttons button{color:white;display:flex;width:48px;height:48px;justify-content:center;align-items:center;border-radius:var(--radius-radius-md, 8px);background-color:rgba(0, 0, 0, 0.48);border:none;cursor:pointer}.hidden{display:none}";const q=class{constructor(t){i(this,t),this.vviinnImageUpload=e(this,"vviinnImageUpload",7),this.vviinnNoResult=e(this,"vviinnNoResult",7),this.vviinnImageUploadFinished=e(this,"vviinnImageUploadFinished",7),this.basicEventData=void 0,this.startUpload=void 0,this.loading=!1,this.accept="image",this.resetVpsButton=void 0,this.capture=void 0}async handleInputChange(t){this.vviinnImageUpload.emit(this.basicEventData);const i=t.target,e=await f(i.files[0]);r.pipe(e,g((({kind:t})=>this.vviinnNoResult.emit(Object.assign(Object.assign({},this.basicEventData),{reason:t}))),(()=>this.vviinnImageUploadFinished.emit()))),i.value=null}startUploadWatcher(t){t&&(this.fileInput.click(),this.resetVpsButton())}render(){return t(n,{exportparts:"button"},this.loading?t("vviinn-preloader",null):t("label",{htmlFor:"fileInput",part:"button"},t("slot",{name:"upload-button-text"},"Upload image")),t("input",{id:"fileInput",class:"visually-hidden",type:"file",capture:this.capture,accept:"image"===this.accept?"image/*":"application/octet-stream",onChange:t=>this.handleInputChange(t),ref:t=>this.fileInput=t}))}static get watchers(){return{startUpload:["startUploadWatcher"]}}};q.style=".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}";var G=b((function(t){
2
2
  /*!
3
3
  * Cropper.js v1.5.13
4
4
  * https://fengyuanchen.github.io/cropperjs
@@ -1 +1 @@
1
- import{h as t,r as i,c as s,H as h,g as e}from"./p-1c863deb.js";import{v as n}from"./p-1fa6349d.js";import{c as o,S as a}from"./p-55c453ab.js";import{D as l}from"./p-cc013cd2.js";const d=()=>t("svg",{width:"22",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.567 3H19A3.01 3.01 0 0 1 22 6v7.69h-2V6c0-.55-.451-1-1.001-1h-3.502l-2.03-3H8.543L6.603 5H3.001c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h5.933v2H3.001A3.01 3.01 0 0 1 0 17V6c0-1.65 1.35-3 3.001-3h2.522l1.94-3h7.074l2.03 3Zm-5.562 3c1.28 0 2.561.48 3.542 1.46h-.01a4.992 4.992 0 0 1 .64 6.29l3.051 3.05-1.41 1.41-3.052-3.05c-.84.55-1.8.83-2.76.83-1.282 0-2.562-.48-3.543-1.46a5.002 5.002 0 0 1 0-7.07A5.026 5.026 0 0 1 11.005 6Zm-2.771 5a2.763 2.763 0 0 0 2.771 2.77A2.763 2.763 0 0 0 13.776 11a2.763 2.763 0 0 0-2.771-2.77A2.763 2.763 0 0 0 8.234 11Z",fill:"#161616"})),v=class{constructor(t){i(this,t),this.vviinnWidgetLoad=s(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=s(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnProductLoad=s(this,"vviinnProductLoad",7),this.vviinnProductClick=s(this,"vviinnProductClick",7),this.vviinnProductView=s(this,"vviinnProductView",7),this.vviinnResultLoad=s(this,"vviinnResultLoad",7),this.vviinnResultView=s(this,"vviinnResultView",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.vviinnImageCrop=s(this,"vviinnImageCrop",7),this.vviinnSelectObject=s(this,"vviinnSelectObject",7),this.vviinnSelectFilter=s(this,"vviinnSelectFilter",7),this.globalSlotsChanged=s(this,"globalSlotsChanged",7),this.getBasicEventData=()=>({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:o.VPS,widgetId:this.el.id,widgetVersion:n}),this.token=void 0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.addStyle=!1,this.mode="modal",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=250,this.exampleImageSource=l,this.textSearchShow=!1,this.apiPath=void 0,this.buttonPressed=!1}handleModalClosed(){this.buttonPressed=!1}componentDidLoad(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit({slots:Array.from(t),element:this.el})}handleClick(){this.buttonPressed=!0}resetButton(){this.buttonPressed=!1}render(){return t(h,{tabindex:"0",role:"button"},t("vviinn-button",{onClick:()=>{this.handleClick()},addStyle:this.addStyle,part:"vviinn-button"},t("slot",null,t(d,null))),a("vps"),t("vviinn-vps-widget",{mode:this.mode,"currency-sign":this.currencySign,token:this.token,locale:this.locale,apiPath:this.apiPath,campaignId:this.campaignId,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed&&("modal"===this.mode||"camera"===this.mode),excluded:this.excluded,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,imageResolutionWidth:this.imageResolutionWidth,exampleImageSource:this.exampleImageSource,textSearchShow:this.textSearchShow}))}get el(){return e(this)}};v.style=":host{display:block}";export{v as vviinn_vps_button}
1
+ import{h as t,r as i,c as s,H as h,g as e}from"./p-1c863deb.js";import{v as n}from"./p-d07f69eb.js";import{c as o,S as l}from"./p-55c453ab.js";import{D as a}from"./p-cc013cd2.js";const d=()=>t("svg",{width:"22",height:"20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.567 3H19A3.01 3.01 0 0 1 22 6v7.69h-2V6c0-.55-.451-1-1.001-1h-3.502l-2.03-3H8.543L6.603 5H3.001c-.55 0-1 .45-1 1v11c0 .55.45 1 1 1h5.933v2H3.001A3.01 3.01 0 0 1 0 17V6c0-1.65 1.35-3 3.001-3h2.522l1.94-3h7.074l2.03 3Zm-5.562 3c1.28 0 2.561.48 3.542 1.46h-.01a4.992 4.992 0 0 1 .64 6.29l3.051 3.05-1.41 1.41-3.052-3.05c-.84.55-1.8.83-2.76.83-1.282 0-2.562-.48-3.543-1.46a5.002 5.002 0 0 1 0-7.07A5.026 5.026 0 0 1 11.005 6Zm-2.771 5a2.763 2.763 0 0 0 2.771 2.77A2.763 2.763 0 0 0 13.776 11a2.763 2.763 0 0 0-2.771-2.77A2.763 2.763 0 0 0 8.234 11Z",fill:"#161616"})),v=class{constructor(t){i(this,t),this.vviinnWidgetLoad=s(this,"vviinnWidgetLoad",7),this.vviinnWidgetOpen=s(this,"vviinnWidgetOpen",7),this.vviinnWidgetClose=s(this,"vviinnWidgetClose",7),this.vviinnImageUpload=s(this,"vviinnImageUpload",7),this.vviinnProductLoad=s(this,"vviinnProductLoad",7),this.vviinnProductClick=s(this,"vviinnProductClick",7),this.vviinnProductView=s(this,"vviinnProductView",7),this.vviinnResultLoad=s(this,"vviinnResultLoad",7),this.vviinnResultView=s(this,"vviinnResultView",7),this.vviinnNoResult=s(this,"vviinnNoResult",7),this.vviinnImageCrop=s(this,"vviinnImageCrop",7),this.vviinnSelectObject=s(this,"vviinnSelectObject",7),this.vviinnSelectFilter=s(this,"vviinnSelectFilter",7),this.globalSlotsChanged=s(this,"globalSlotsChanged",7),this.getBasicEventData=()=>({widgetType:"VPS",campaignTypeId:"VPS",campaignTypeName:o.VPS,widgetId:this.el.id,widgetVersion:n}),this.token=void 0,this.currencySign="€",this.locale="de-DE",this.campaignId="",this.addStyle=!1,this.mode="modal",this.excluded="",this.productDetailsNewTab=!0,this.productDetailsRedirect=!0,this.imageResolutionWidth=250,this.exampleImageSource=a,this.textSearchShow=!1,this.apiPath=void 0,this.buttonPressed=!1}handleModalClosed(){this.buttonPressed=!1}componentDidLoad(){const t=this.el.querySelectorAll("[slot]");this.globalSlotsChanged.emit({slots:Array.from(t),element:this.el})}handleClick(){this.buttonPressed=!0}resetButton(){this.buttonPressed=!1}render(){return t(h,{tabindex:"0",role:"button"},t("vviinn-button",{onClick:()=>{this.handleClick()},addStyle:this.addStyle,part:"vviinn-button"},t("slot",null,t(d,null))),l("vps"),t("vviinn-vps-widget",{mode:this.mode,"currency-sign":this.currencySign,token:this.token,locale:this.locale,apiPath:this.apiPath,campaignId:this.campaignId,showingInButton:!0,buttonPressed:this.buttonPressed,resetVpsButton:this.resetButton.bind(this),buttonElementId:this.el.id,active:this.buttonPressed&&("modal"===this.mode||"camera"===this.mode),excluded:this.excluded,productDetailsNewTab:this.productDetailsNewTab,productDetailsRedirect:this.productDetailsRedirect,imageResolutionWidth:this.imageResolutionWidth,exampleImageSource:this.exampleImageSource,textSearchShow:this.textSearchShow}))}get el(){return e(this)}};v.style=":host{display:block}";export{v as vviinn_vps_button}