vviinn-widgets 2.218.0 → 2.219.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/cssUrlHelper-BX9kngtZ.js +7 -0
- package/dist/cjs/{index-C2IFqNzB.js → index-DdCwxNyl.js} +1 -1
- package/dist/cjs/{openProductLink-BwHUGXtr.js → openProductLink-B3cy6uw_.js} +0 -5
- package/dist/cjs/{search.store-CEC5R32_.js → search.store-DiomZf0i.js} +1 -1
- package/dist/cjs/vviinn-button_6.cjs.entry.js +3 -2
- package/dist/cjs/vviinn-camera_12.cjs.entry.js +7 -6
- package/dist/cjs/vviinn-carousel_10.cjs.entry.js +7 -6
- package/dist/cjs/vviinn-shop-the-look.cjs.entry.js +4 -3
- package/dist/cjs/vviinn-text-search.cjs.entry.js +1 -1
- package/dist/cjs/vviinn-vps-button.cjs.entry.js +2 -1
- package/dist/collection/components/vviinn-vpr-button/vviinn-vpr-button.js +2 -1
- package/dist/collection/components/vviinn-vps-button/vviinn-vps-button.js +2 -1
- package/dist/esm/cssUrlHelper-DsQD_dY6.js +5 -0
- package/dist/esm/{index-DT_CMr4r.js → index-DHNImAac.js} +1 -1
- package/dist/esm/{openProductLink-CJ9Wo3Ye.js → openProductLink-C7_qzUNW.js} +1 -5
- package/dist/esm/{search.store-ClFXu6V6.js → search.store-DUkS1MAq.js} +1 -1
- package/dist/esm/vviinn-button_6.entry.js +3 -2
- package/dist/esm/vviinn-camera_12.entry.js +4 -3
- package/dist/esm/vviinn-carousel_10.entry.js +4 -3
- package/dist/esm/vviinn-shop-the-look.entry.js +3 -2
- package/dist/esm/vviinn-text-search.entry.js +1 -1
- package/dist/esm/vviinn-vps-button.entry.js +2 -1
- package/dist/vviinn-widgets/{p-c4c7913e.entry.js → p-315db5a2.entry.js} +1 -1
- package/dist/vviinn-widgets/p-5e186249.entry.js +1 -0
- package/dist/vviinn-widgets/p-91768e9c.entry.js +1 -0
- package/dist/vviinn-widgets/{p-BSSEWLP1.js → p-C063BS9s.js} +1 -1
- package/dist/vviinn-widgets/p-C7_qzUNW.js +1 -0
- package/dist/vviinn-widgets/p-D3wRLf2J.js +1 -0
- package/dist/vviinn-widgets/{p-BdbY-xGp.js → p-DXT8Rt8G.js} +1 -1
- package/dist/vviinn-widgets/p-ab6447df.entry.js +1 -0
- package/dist/vviinn-widgets/p-fa907040.entry.js +1 -0
- package/dist/vviinn-widgets/p-fcbaa790.entry.js +1 -0
- package/dist/vviinn-widgets/vviinn-widgets.esm.js +1 -1
- package/package.json +1 -1
- package/www/build/{p-c4c7913e.entry.js → p-315db5a2.entry.js} +1 -1
- package/www/build/p-5e186249.entry.js +1 -0
- package/www/build/p-91768e9c.entry.js +1 -0
- package/www/build/{p-BSSEWLP1.js → p-C063BS9s.js} +1 -1
- package/www/build/p-C7_qzUNW.js +1 -0
- package/www/build/p-D3wRLf2J.js +1 -0
- package/www/build/{p-BdbY-xGp.js → p-DXT8Rt8G.js} +1 -1
- package/www/build/p-ab6447df.entry.js +1 -0
- package/www/build/{p-5fc04ad1.js → p-ed15ff33.js} +1 -1
- package/www/build/p-fa907040.entry.js +1 -0
- package/www/build/p-fcbaa790.entry.js +1 -0
- package/www/build/vviinn-widgets.esm.js +1 -1
- package/www/index.html +1 -1
- package/dist/vviinn-widgets/p-18d5ac42.entry.js +0 -1
- package/dist/vviinn-widgets/p-8d9c02d5.entry.js +0 -1
- package/dist/vviinn-widgets/p-CtSr754V.js +0 -1
- package/dist/vviinn-widgets/p-bb2f8c8f.entry.js +0 -1
- package/dist/vviinn-widgets/p-eff82269.entry.js +0 -1
- package/dist/vviinn-widgets/p-fbbf34ba.entry.js +0 -1
- package/www/build/p-18d5ac42.entry.js +0 -1
- package/www/build/p-8d9c02d5.entry.js +0 -1
- package/www/build/p-CtSr754V.js +0 -1
- package/www/build/p-bb2f8c8f.entry.js +0 -1
- package/www/build/p-eff82269.entry.js +0 -1
- package/www/build/p-fbbf34ba.entry.js +0 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-D38ORu31.js');
|
|
4
|
+
|
|
5
|
+
const renderExternalCSS = (cssUrl) => (cssUrl === null || cssUrl === void 0 ? void 0 : cssUrl.length) ? index.h("link", { href: cssUrl, rel: "stylesheet" }) : null;
|
|
6
|
+
|
|
7
|
+
exports.renderExternalCSS = renderExternalCSS;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
|
-
var search_store = require('./search.store-
|
|
4
|
+
var search_store = require('./search.store-DiomZf0i.js');
|
|
5
5
|
var store = require('./store-jPZ4ROqV.js');
|
|
6
6
|
|
|
7
7
|
const PlusIcon = () => (index.h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-D38ORu31.js');
|
|
4
|
-
|
|
5
|
-
const renderExternalCSS = (cssUrl) => (cssUrl === null || cssUrl === void 0 ? void 0 : cssUrl.length) ? index.h("link", { href: cssUrl, rel: "stylesheet" }) : null;
|
|
6
|
-
|
|
7
3
|
const openProductLink = (deeplink, event, productDetailsRedirect = true, productDetailsNewTab = false) => {
|
|
8
4
|
if (!productDetailsRedirect)
|
|
9
5
|
return;
|
|
@@ -17,4 +13,3 @@ const openProductLink = (deeplink, event, productDetailsRedirect = true, product
|
|
|
17
13
|
};
|
|
18
14
|
|
|
19
15
|
exports.openProductLink = openProductLink;
|
|
20
|
-
exports.renderExternalCSS = renderExternalCSS;
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var store = require('./store-jPZ4ROqV.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-DiomZf0i.js');
|
|
6
6
|
var index$1 = require('./index-CBteD3gC.js');
|
|
7
7
|
var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
|
|
8
8
|
var index$2 = require('./index-CvMi8_tX.js');
|
|
9
9
|
var constants = require('./constants-BlwqMvns.js');
|
|
10
10
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
11
|
+
var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
|
|
11
12
|
|
|
12
13
|
const CrossIcon = () => (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
14
|
index.h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "currentColor" })));
|
|
@@ -526,7 +527,7 @@ const VviinnVprButton = class {
|
|
|
526
527
|
}
|
|
527
528
|
}
|
|
528
529
|
render() {
|
|
529
|
-
return (index.h(index.Host, { key: '
|
|
530
|
+
return (index.h(index.Host, { key: '2d6cd8ecdeadf7205ad1b9b7170dc5ad28d43c3b', role: "button", tabindex: "0", "aria-label": this.getAriaLabel(), onClick: this.handleButtonClick, onKeyDown: this.handleKeyDown }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("vviinn-button", { key: 'f6852f2eb943f40d692bf5e0609a5ac1628f598f', addStyle: this.addStyle, part: "vviinn-button" }, index.h("slot", { key: '5f934ba1ef44cb5133dcf2a843429c5f92858514' }, this.campaignType === "VCS" ? (index.h(CrossSellingIcon, { width: this.iconSideSize, height: this.iconSideSize })) : (index.h(SimilarProductsIcon, { width: this.iconSideSize, height: this.iconSideSize }))))));
|
|
530
531
|
}
|
|
531
532
|
handleClick() {
|
|
532
533
|
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-DiomZf0i.js');
|
|
6
6
|
var index$2 = require('./index-CBteD3gC.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-DdCwxNyl.js');
|
|
8
8
|
var store = require('./store-jPZ4ROqV.js');
|
|
9
9
|
var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
|
|
10
|
-
var
|
|
10
|
+
var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
|
|
11
11
|
var index$3 = require('./index-CvMi8_tX.js');
|
|
12
12
|
var resultsPageUrl = require('./resultsPageUrl-Cki7CFQz.js');
|
|
13
13
|
var constants = require('./constants-BlwqMvns.js');
|
|
14
|
+
var openProductLink = require('./openProductLink-B3cy6uw_.js');
|
|
14
15
|
var constants$1 = require('./constants-DHaugTOE.js');
|
|
15
16
|
|
|
16
17
|
const CameraActionIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
@@ -435,7 +436,7 @@ const VviinnCropper = class {
|
|
|
435
436
|
return (index.h(index.Host, { key: 'ae2656d0782e723ffe5c8ba9ad6074db55e219c0', class: {
|
|
436
437
|
"show-in-widget": this.showInWidget,
|
|
437
438
|
active: !!this.state.image,
|
|
438
|
-
} },
|
|
439
|
+
} }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { key: '0c547762649ddc68aa2755681c6637ec1556b315', class: "container" }, this.state.image && (index.h("div", { key: '811e79aaf4ee1144c8c6ce0017300ba9aeda8803', class: "image-container", style: {
|
|
439
440
|
width: `${this.width.toString()}px`,
|
|
440
441
|
overflow: "hidden",
|
|
441
442
|
} }, index.h("img", { key: '458474fa006a1397daa335fb9ee50477ab0e62ce', decoding: "async", width: this.width, height: this.height, src: this.state.image.src, draggable: false, onLoad: this.loadImage, alt: store.instance.t("a11y.cropperImage") }), (_a = this.state.detectedObjects) === null || _a === void 0 ? void 0 :
|
|
@@ -984,7 +985,7 @@ const VviinnResults = class {
|
|
|
984
985
|
return (index.h(index.Host, { key: '2ba9c019be5e6d2a70f299ebd4827baefa671cad', id: "results-block", class: {
|
|
985
986
|
"show-in-widget": this.showInWidget,
|
|
986
987
|
"matching-discovery": this.oneClickDiscoveryMode === "append-slider",
|
|
987
|
-
}, exportparts: `${index$3.productCardParts}, ${index$3.listCardParts}, ${index$3.contentCardParts}, ${index$3.productCardsGridPart}` },
|
|
988
|
+
}, exportparts: `${index$3.productCardParts}, ${index$3.listCardParts}, ${index$3.contentCardParts}, ${index$3.productCardsGridPart}` }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { key: '8521abb79a86723af8f18cd66558f8cd56d0d725', class: "nothing-found" }, this.getCurrentErrorType() && (index.h("vviinn-error", { key: '030f376feaa161d598dc60e2deae0bcde368759a', errorType: this.getCurrentErrorType(), handler: this.resetWidgetState, hasBackground: this.showInWidget, searchType: this.state.searchType }))), index.h("div", { key: '82a242f74f6a5481b40ec26a977d11465a5c58da', class: {
|
|
988
989
|
hidden: this.showAspectRatioError || resultsLength === 0,
|
|
989
990
|
products: true,
|
|
990
991
|
}, part: index$3.productCardsGridPart, id: "vviinn-results-products" }, resultsLength > 0 && this.renderResults(), index.h("div", { key: 'ed28c78ddfa0826f8ad8a70639e83386d9297c7c', id: "one-click-discovery-append", style: {
|
|
@@ -2147,7 +2148,7 @@ const VviinnVpsWidget = class {
|
|
|
2147
2148
|
}
|
|
2148
2149
|
render() {
|
|
2149
2150
|
var _a, _b, _c;
|
|
2150
|
-
return (index.h(index.Host, { key: '0985a289b00fca5286466be2d4f33ef7d32c49cb', exportparts: `${index$3.modalParts}, ${index$3.productCardParts}, ${index$3.searchBarParts}, ${index$3.searchWidgetFilterParts}, ${index$3.searchWidgetButtonParts}, ${index$3.productCardsGridPart}, ${index$3.suggestionsParts}` },
|
|
2151
|
+
return (index.h(index.Host, { key: '0985a289b00fca5286466be2d4f33ef7d32c49cb', exportparts: `${index$3.modalParts}, ${index$3.productCardParts}, ${index$3.searchBarParts}, ${index$3.searchWidgetFilterParts}, ${index$3.searchWidgetButtonParts}, ${index$3.productCardsGridPart}, ${index$3.suggestionsParts}` }, cssUrlHelper.renderExternalCSS(this.cssUrl), !this.showingInButton && index$2.SlotSkeleton("search"), index.h("vviinn-overlayed-modal", { key: '42c48cf9f6414ccd23705ad4a1ca2dcccf6aa65f', class: { "first-screen": this.isOnboardingSlide() }, isFirstScreen: this.isOnboardingSlide(), active: this.active, resetState: this.resetState, onVviinnWidgetClose: ({ detail }) => {
|
|
2151
2152
|
if (detail.campaignTypeId !== "VPR")
|
|
2152
2153
|
this.handleModalClose();
|
|
2153
2154
|
}, buttonElementId: (_a = this.buttonElementId) !== null && _a !== void 0 ? _a : this.widgetElementId, widgetVersion: search_store.version, hideBackButton: this.mode === "upload" ||
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
|
-
var search_store = require('./search.store-
|
|
4
|
+
var search_store = require('./search.store-DiomZf0i.js');
|
|
5
5
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
6
6
|
var store = require('./store-jPZ4ROqV.js');
|
|
7
|
-
var index$1 = require('./index-
|
|
7
|
+
var index$1 = require('./index-DdCwxNyl.js');
|
|
8
8
|
var constants = require('./constants-BlwqMvns.js');
|
|
9
9
|
var index$2 = require('./index-CBteD3gC.js');
|
|
10
10
|
var index$3 = require('./index-CvMi8_tX.js');
|
|
11
11
|
var swiperElement = require('./swiper-element-DjtzojCR.js');
|
|
12
|
-
var
|
|
12
|
+
var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
|
|
13
|
+
var openProductLink = require('./openProductLink-B3cy6uw_.js');
|
|
13
14
|
|
|
14
15
|
const BasketIcon = () => (index.h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
15
16
|
index.h("g", { id: "shopping-bag" },
|
|
@@ -1857,7 +1858,7 @@ const VviinnProductCard = class {
|
|
|
1857
1858
|
render() {
|
|
1858
1859
|
var _a, _b, _c;
|
|
1859
1860
|
if (this.isContentCard || this.isListCard) {
|
|
1860
|
-
return (index.h(index.Host, { part: `product-card ${this.entityType}-card`, class: `${this.entityType}-card`, exportparts: this.isContentCard ? index$3.contentCardParts : index$3.listCardParts, "data-id": this.productId },
|
|
1861
|
+
return (index.h(index.Host, { part: `product-card ${this.entityType}-card`, class: `${this.entityType}-card`, exportparts: this.isContentCard ? index$3.contentCardParts : index$3.listCardParts, "data-id": this.productId }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { class: `image-container ${this.entityType}-card-image-container`, part: "image-container" }, renderProductCardImage({
|
|
1861
1862
|
src: this.imageProps.src,
|
|
1862
1863
|
width: this.imageProps.width,
|
|
1863
1864
|
title: this.imageProps.title,
|
|
@@ -1881,7 +1882,7 @@ const VviinnProductCard = class {
|
|
|
1881
1882
|
animated: this.isTransitioning,
|
|
1882
1883
|
"product-card--source": this.isSourceProduct,
|
|
1883
1884
|
"set-mode": this.isSetMode,
|
|
1884
|
-
}, exportparts: index$3.productCardParts, "data-id": this.productId },
|
|
1885
|
+
}, exportparts: index$3.productCardParts, "data-id": this.productId }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { class: "content-container", part: "content-container" }, this.showSkeleton() ? (index.h(index.Fragment, null, index.h("vviinn-skeleton", { height: 40 }), index.h("vviinn-skeleton", { height: 20, halfWidth: true }), index.h("vviinn-skeleton", { height: 40 }))) : (index.h(index.Fragment, null, index.h(Linked, { deeplink: this.deeplink, part: "deeplink", tabindex: 0 }, index.h("span", { class: "title", part: "title" }, this.productTitle)), ((_a = this.brand) === null || _a === void 0 ? void 0 : _a.length) > 0 && (index.h("span", { class: "brand", part: "brand" }, this.brand)), ((_b = this.productType) === null || _b === void 0 ? void 0 : _b.length) > 0 && (index.h("span", { class: "product-type", part: "product-type" }, this.productType)), ((_c = this === null || this === void 0 ? void 0 : this.energyCertifications) !== null && _c !== void 0 ? _c : []).map((energyCertification) => (index.h("vviinn-energy-label", { classIconUrls: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classIconUrls, classDataSheetUrl: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classDataSheetUrl, productType: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.productType, certificationClass: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.certificationClass, classRange: energyCertification === null || energyCertification === void 0 ? void 0 : energyCertification.classRange }))), index.h(Price, { prefix: this.pricePrefix, currency: this.effectiveCurrencySign, numberLocale: this.effectiveNumberLocale, price: this.price, basePrice: parseBasePrice(this.basePrice), salePrice: this.salePrice, baseSalePrice: parseBasePrice(this.baseSalePrice), showInContainer: this.addPriceContainer }), renderCustomLabels(this.customLabels.split(index$1.CUSTOM_LABELS_DELIMITER), "content")))), index.h("div", { class: {
|
|
1885
1886
|
"basket-button-container": true,
|
|
1886
1887
|
hidden: !this.isShowBasketButton() || this.showSkeleton(),
|
|
1887
1888
|
}, part: "basket-button-container" }, index.h("button", { class: {
|
|
@@ -11954,7 +11955,7 @@ const VviinnVprWidget = class {
|
|
|
11954
11955
|
empty: this.recommendations.length == 0,
|
|
11955
11956
|
[this.mode]: true,
|
|
11956
11957
|
"show-in-widget": this.showInWidget,
|
|
11957
|
-
}, role: "region", "aria-label": !this.showingInButton ? store.instance.t("a11y.recommendations") : undefined, "aria-busy": isLoading ? "true" : "false", "aria-live": isLoading ? "polite" : "off" }, index.h(index.Fragment, null,
|
|
11958
|
+
}, role: "region", "aria-label": !this.showingInButton ? store.instance.t("a11y.recommendations") : undefined, "aria-busy": isLoading ? "true" : "false", "aria-live": isLoading ? "polite" : "off" }, index.h(index.Fragment, null, cssUrlHelper.renderExternalCSS(this.cssUrl), index$2.SlotSkeleton("discovery"), (this.isSetMode ||
|
|
11958
11959
|
this.blockTitle !== "" ||
|
|
11959
11960
|
!!this.blockSubtitle) && (index.h("div", { class: "widget-header" }, index.h("div", null, this.blockTitle !== "" && (index.h("h2", { part: "recommendations-title" }, index.h("slot", { name: "vviinn-recommendations-title" }, (_a = this.blockTitle) !== null && _a !== void 0 ? _a : (this.isSetMode
|
|
11960
11961
|
? store.instance.t("setMode.widgetTitle")
|
|
@@ -4,11 +4,12 @@ var index = require('./index-D38ORu31.js');
|
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
5
|
var cropperUtils = require('./cropperUtils-DCDOLeBS.js');
|
|
6
6
|
var swiperElement = require('./swiper-element-DjtzojCR.js');
|
|
7
|
-
var search_store = require('./search.store-
|
|
7
|
+
var search_store = require('./search.store-DiomZf0i.js');
|
|
8
8
|
var SecondaryActionIcon = require('./SecondaryActionIcon-Ng84u7-b.js');
|
|
9
9
|
var index$1 = require('./index-CvMi8_tX.js');
|
|
10
10
|
var store = require('./store-jPZ4ROqV.js');
|
|
11
|
-
var
|
|
11
|
+
var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
|
|
12
|
+
var openProductLink = require('./openProductLink-B3cy6uw_.js');
|
|
12
13
|
|
|
13
14
|
const UploadActionIconVariant = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
14
15
|
index.h("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H13C13.2833 3 13.5208 3.09583 13.7125 3.2875C13.9042 3.47917 14 3.71667 14 4C14 4.28333 13.9042 4.52083 13.7125 4.7125C13.5208 4.90417 13.2833 5 13 5H5V19H19V11C19 10.7167 19.0958 10.4792 19.2875 10.2875C19.4792 10.0958 19.7167 10 20 10C20.2833 10 20.5208 10.0958 20.7125 10.2875C20.9042 10.4792 21 10.7167 21 11V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM17 7H16C15.7167 7 15.4792 6.90417 15.2875 6.7125C15.0958 6.52083 15 6.28333 15 6C15 5.71667 15.0958 5.47917 15.2875 5.2875C15.4792 5.09583 15.7167 5 16 5H17V4C17 3.71667 17.0958 3.47917 17.2875 3.2875C17.4792 3.09583 17.7167 3 18 3C18.2833 3 18.5208 3.09583 18.7125 3.2875C18.9042 3.47917 19 3.71667 19 4V5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H19V8C19 8.28333 18.9042 8.52083 18.7125 8.7125C18.5208 8.90417 18.2833 9 18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V7ZM11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16Z", fill: "white" })));
|
|
@@ -1379,7 +1380,7 @@ const VviinnShopTheLook = class {
|
|
|
1379
1380
|
}, TIMING.SEARCH_DEBOUNCE_DELAY);
|
|
1380
1381
|
}
|
|
1381
1382
|
render() {
|
|
1382
|
-
return (index.h(index.Host, { key: '4734dcdc0c1a7d206970c8baf08e257077e952f9', exportparts: index$1.shopTheLookParts },
|
|
1383
|
+
return (index.h(index.Host, { key: '4734dcdc0c1a7d206970c8baf08e257077e952f9', exportparts: index$1.shopTheLookParts }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("div", { key: '129438fdcf114bd903ad6888287e060e5fdc3948', class: `shop-the-look-container ${this.showModal ? "modal-open" : ""} ${this.showCropper ? "with-cropper" : ""} widget-style-${this.widgetStyle}` }, index.h("div", { key: '04e037ad029930bd366920ca79e0ae7becebaf2c', class: "main-content" }, this.renderSwiperWrapper(), this.showLoadingSpinner && (index.h("div", { key: '18ca739ed4cf0b1167fd8976fdab0c5e6e0ee410', class: "search-loader" }, index.h("vviinn-preloader", { key: 'efd47991fa32bf315c4985f98f0c14ccbf6f5a72' })))), this.renderModalWrapper(), index.h("div", { key: '332adbe2912fb61f82f9cf0488a13f7c9a0a405c', class: "actions-container", part: "shop-the-look-actions-container" }, this.uploadMode && (index.h("div", { key: '55c748ffeded24b97801683454f9a1b8675f6ed6', class: "upload-button-container" }, index.h("button", { key: '7cfa399b98e254bd12bff706cf6c4bea42dce684', class: "upload-button", part: "shop-the-look-upload-button", onClick: () => { var _a; return (_a = this.fileInput) === null || _a === void 0 ? void 0 : _a.click(); }, disabled: this.showLoadingSpinner }, index.h("span", { key: '48b59d82816a50b6f98bbf68c8a6849679437852', class: "upload-button-icon", part: "shop-the-look-upload-button-icon" }, index.h("slot", { key: '14f12cf7f44a39ba4f1d9cbecb6fa3558ae5fd5d', name: "vviinn-image-upload-icon" }, index.h(UploadActionIconVariant, { key: '1937cea6010c0a21182e88f365f188a65b0f3a70' }))), index.h("span", { key: 'd62a5ee1ac2c17a663dda26cb0debd83821510c0', class: "upload-button-text", part: "shop-the-look-upload-button-text" }, index.h("slot", { key: '42a4910a590a2b258dccb2a3ace5da8f60099791', name: "upload-button-text" }))), index.h("input", { key: '242e2ed2e319428ebde6dff7df8c37b60d33a8f1', type: "file", class: "visually-hidden", accept: search_store.getAcceptableFileFormats(), onChange: this.handleFileUpload, ref: (el) => (this.fileInput = el) }))), this.showNavigation() &&
|
|
1383
1384
|
renderNavigation(this.swiperActiveIndex, this.totalImages, this.handleNavigatePrev, this.handleNavigateNext)))));
|
|
1384
1385
|
}
|
|
1385
1386
|
get el() { return index.getElement(this); }
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var index = require('./index-D38ORu31.js');
|
|
4
4
|
var Rectangle = require('./Rectangle-7dF6_xf3.js');
|
|
5
|
-
var search_store = require('./search.store-
|
|
5
|
+
var search_store = require('./search.store-DiomZf0i.js');
|
|
6
6
|
var index$2 = require('./index-CBteD3gC.js');
|
|
7
7
|
var store = require('./store-jPZ4ROqV.js');
|
|
8
8
|
var index$1 = require('./index-CvMi8_tX.js');
|
|
@@ -5,6 +5,7 @@ var index$2 = require('./index-CBteD3gC.js');
|
|
|
5
5
|
var constants$1 = require('./constants-DHaugTOE.js');
|
|
6
6
|
var constants = require('./constants-BlwqMvns.js');
|
|
7
7
|
var index$1 = require('./index-CvMi8_tX.js');
|
|
8
|
+
var cssUrlHelper = require('./cssUrlHelper-BX9kngtZ.js');
|
|
8
9
|
var store = require('./store-jPZ4ROqV.js');
|
|
9
10
|
|
|
10
11
|
const SearchModalCameraIcon = () => (index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" },
|
|
@@ -154,7 +155,7 @@ const VviinnVpsButton = class {
|
|
|
154
155
|
}
|
|
155
156
|
render() {
|
|
156
157
|
const { ariaLabel, buttonIcon } = this.getButtonConfig();
|
|
157
|
-
return (index.h(index.Host, { key: '
|
|
158
|
+
return (index.h(index.Host, { key: '9d0e319edac342158caa501aae1756ade2b92242', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${index$1.searchModalFirstScreenParts}` }, cssUrlHelper.renderExternalCSS(this.cssUrl), index.h("vviinn-button", { key: 'f30a55f9bbb705f5a17c925b655fa9210695b18d', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, index.h("slot", { key: 'e4fe7e8fe94fde3111836c7d0ae227a9a35fd1f4' }, buttonIcon)), index$2.SlotSkeleton("search"), index.h("vviinn-vps-widget", { key: '981a1866d06c8e35d7a9b211bf9f87ad06b85e42', mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, numberLocale: this.numberLocale, apiPath: this.apiPath, pricePrefix: this.pricePrefix, campaignId: this.campaignId, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton, buttonElementId: this.el.id, active: this.buttonPressed &&
|
|
158
159
|
(this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, autoSuggestShow: this.autoSuggestShow, addToBasketShow: this.addToBasketShow, addPriceContainer: this.addPriceContainer, showIntervalInputs: this.showIntervalInputs, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this), oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, favoriteShow: this.favoriteShow, showResultsInModal: this.showResultsInModal, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams, parentSlots: [...this.parentSlots, ...this.slots], cssUrl: this.cssUrl })));
|
|
159
160
|
}
|
|
160
161
|
get el() { return index.getElement(this); }
|
|
@@ -6,6 +6,7 @@ import { initializeLocale } from "../../locale";
|
|
|
6
6
|
import { useSearchStore } from "../../store/search.store";
|
|
7
7
|
import { DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH, PRODUCT_CARD_IMAGE_WIDTH, SIDEBAR_ANIMATION_DURATION, } from "../../widget/constants";
|
|
8
8
|
import { addEventListenersWithSignal } from "../../dom";
|
|
9
|
+
import { renderExternalCSS } from "../../utils/cssUrl/cssUrlHelper";
|
|
9
10
|
/**
|
|
10
11
|
* @part button - Clickable button element.
|
|
11
12
|
* @part vviinn-button - Button element container.
|
|
@@ -213,7 +214,7 @@ export class VviinnVprButton {
|
|
|
213
214
|
}
|
|
214
215
|
}
|
|
215
216
|
render() {
|
|
216
|
-
return (h(Host, { key: '
|
|
217
|
+
return (h(Host, { key: '2d6cd8ecdeadf7205ad1b9b7170dc5ad28d43c3b', role: "button", tabindex: "0", "aria-label": this.getAriaLabel(), onClick: this.handleButtonClick, onKeyDown: this.handleKeyDown }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: 'f6852f2eb943f40d692bf5e0609a5ac1628f598f', addStyle: this.addStyle, part: "vviinn-button" }, h("slot", { key: '5f934ba1ef44cb5133dcf2a843429c5f92858514' }, this.campaignType === "VCS" ? (h(CrossSellingIcon, { width: this.iconSideSize, height: this.iconSideSize })) : (h(SimilarProductsIcon, { width: this.iconSideSize, height: this.iconSideSize }))))));
|
|
217
218
|
}
|
|
218
219
|
handleClick() {
|
|
219
220
|
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
@@ -5,6 +5,7 @@ import { DEFAULT_EXAMPLE_IMAGE } from "../../assets/constants";
|
|
|
5
5
|
import { findSlotElements } from "../../dom";
|
|
6
6
|
import { SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH } from "../../widget/constants";
|
|
7
7
|
import { searchModalFirstScreenParts } from "../../cssParts";
|
|
8
|
+
import { renderExternalCSS } from "../../utils/cssUrl/cssUrlHelper";
|
|
8
9
|
import i18next from "i18next";
|
|
9
10
|
import { initializeLocale } from "../../locale";
|
|
10
11
|
/**
|
|
@@ -204,7 +205,7 @@ export class VviinnVpsButton {
|
|
|
204
205
|
}
|
|
205
206
|
render() {
|
|
206
207
|
const { ariaLabel, buttonIcon } = this.getButtonConfig();
|
|
207
|
-
return (h(Host, { key: '
|
|
208
|
+
return (h(Host, { key: '9d0e319edac342158caa501aae1756ade2b92242', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${searchModalFirstScreenParts}` }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: 'f30a55f9bbb705f5a17c925b655fa9210695b18d', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, h("slot", { key: 'e4fe7e8fe94fde3111836c7d0ae227a9a35fd1f4' }, buttonIcon)), SlotSkeleton("search"), h("vviinn-vps-widget", { key: '981a1866d06c8e35d7a9b211bf9f87ad06b85e42', mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, numberLocale: this.numberLocale, apiPath: this.apiPath, pricePrefix: this.pricePrefix, campaignId: this.campaignId, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton, buttonElementId: this.el.id, active: this.buttonPressed &&
|
|
208
209
|
(this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, autoSuggestShow: this.autoSuggestShow, addToBasketShow: this.addToBasketShow, addPriceContainer: this.addPriceContainer, showIntervalInputs: this.showIntervalInputs, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this), oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, favoriteShow: this.favoriteShow, showResultsInModal: this.showResultsInModal, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams, parentSlots: [...this.parentSlots, ...this.slots], cssUrl: this.cssUrl })));
|
|
209
210
|
}
|
|
210
211
|
static get is() { return "vviinn-vps-button"; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h } from './index-RkvPN2Rk.js';
|
|
2
|
-
import { j as addIfNotEmpty, p as parseStringToExcluded, o as isValueMatch, q as isIntervalMatch, r as valueToString, t as extractFilterValue } from './search.store-
|
|
2
|
+
import { j as addIfNotEmpty, p as parseStringToExcluded, o as isValueMatch, q as isIntervalMatch, r as valueToString, t as extractFilterValue } from './search.store-DUkS1MAq.js';
|
|
3
3
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
4
4
|
|
|
5
5
|
const PlusIcon = () => (h("svg", { width: "32", height: "32", viewBox: "0 0 32 32", fill: "none", xmlns: "http://www.w3.org/2000/svg", class: "plus-icon", "aria-hidden": "true" },
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { h } from './index-RkvPN2Rk.js';
|
|
2
|
-
|
|
3
|
-
const renderExternalCSS = (cssUrl) => (cssUrl === null || cssUrl === void 0 ? void 0 : cssUrl.length) ? h("link", { href: cssUrl, rel: "stylesheet" }) : null;
|
|
4
|
-
|
|
5
1
|
const openProductLink = (deeplink, event, productDetailsRedirect = true, productDetailsNewTab = false) => {
|
|
6
2
|
if (!productDetailsRedirect)
|
|
7
3
|
return;
|
|
@@ -14,4 +10,4 @@ const openProductLink = (deeplink, event, productDetailsRedirect = true, product
|
|
|
14
10
|
}
|
|
15
11
|
};
|
|
16
12
|
|
|
17
|
-
export { openProductLink as o
|
|
13
|
+
export { openProductLink as o };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { h, r as registerInstance, H as Host, c as createEvent, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
|
|
2
2
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
3
|
-
import { l as getAcceptableFileFormatsForDisplay, h as campaignTypeNames, j as addIfNotEmpty, n as searchState, u as useSearchStore, v as version } from './search.store-
|
|
3
|
+
import { l as getAcceptableFileFormatsForDisplay, h as campaignTypeNames, j as addIfNotEmpty, n as searchState, u as useSearchStore, v as version } from './search.store-DUkS1MAq.js';
|
|
4
4
|
import { s as slotChangeListener, a as addEventListenersWithSignal } from './index-OsoUj2Au.js';
|
|
5
5
|
import { S as SecondaryActionIcon } from './SecondaryActionIcon-FWFzrhba.js';
|
|
6
6
|
import { m as modalParts, c as carouselParts, p as productCardParts, r as recommendationsParts, i as initializeLocale } from './index-BtnjaTty.js';
|
|
7
7
|
import { a as SIDEBAR_ANIMATION_DURATION, P as PRODUCT_CARD_IMAGE_WIDTH, D as DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH, L as LOADING_CLASS_DELAY } from './constants-rqiiCPBX.js';
|
|
8
8
|
import { i as isClickedInRectBound } from './Rectangle-dmgo4KMB.js';
|
|
9
|
+
import { r as renderExternalCSS } from './cssUrlHelper-DsQD_dY6.js';
|
|
9
10
|
|
|
10
11
|
const CrossIcon = () => (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
11
12
|
h("path", { d: "M16 1.4L14.6 0L8 6.6L1.4 0L0 1.4L6.6 8L0 14.6L1.4 16L8 9.4L14.6 16L16 14.6L9.4 8L16 1.4Z", fill: "currentColor" })));
|
|
@@ -524,7 +525,7 @@ const VviinnVprButton = class {
|
|
|
524
525
|
}
|
|
525
526
|
}
|
|
526
527
|
render() {
|
|
527
|
-
return (h(Host, { key: '
|
|
528
|
+
return (h(Host, { key: '2d6cd8ecdeadf7205ad1b9b7170dc5ad28d43c3b', role: "button", tabindex: "0", "aria-label": this.getAriaLabel(), onClick: this.handleButtonClick, onKeyDown: this.handleKeyDown }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: 'f6852f2eb943f40d692bf5e0609a5ac1628f598f', addStyle: this.addStyle, part: "vviinn-button" }, h("slot", { key: '5f934ba1ef44cb5133dcf2a843429c5f92858514' }, this.campaignType === "VCS" ? (h(CrossSellingIcon, { width: this.iconSideSize, height: this.iconSideSize })) : (h(SimilarProductsIcon, { width: this.iconSideSize, height: this.iconSideSize }))))));
|
|
528
529
|
}
|
|
529
530
|
handleClick() {
|
|
530
531
|
const sidebar = document.createElement("vviinn-recommendations-sidebar");
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement, F as Fragment } from './index-RkvPN2Rk.js';
|
|
2
2
|
import { _ as _functionExports, E as EitherExports, f as fold, b as fromImage, a as divideOnSized, e as isLeft, m as match, O as OptionExports } from './Rectangle-dmgo4KMB.js';
|
|
3
|
-
import { w as toFile, c as makeUploadFileRequest, x as getImageSizes, v as version, h as campaignTypeNames, j as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, y as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, z as resetStore, k as makeTextSearchRequest, A as makeProductListingPageRequest, B as checkDeviceType, p as parseStringToExcluded } from './search.store-
|
|
3
|
+
import { w as toFile, c as makeUploadFileRequest, x as getImageSizes, v as version, h as campaignTypeNames, j as addIfNotEmpty, m as makeVisualSearchRequest, u as useSearchStore, y as checkImageType, g as getAcceptableFileFormats, d as setTextSearchQuery, z as resetStore, k as makeTextSearchRequest, A as makeProductListingPageRequest, B as checkDeviceType, p as parseStringToExcluded } from './search.store-DUkS1MAq.js';
|
|
4
4
|
import { s as slotChangeListener, a as addEventListenersWithSignal, p as productCardSlotNames, v as vprIconSlotName, f as findSlotElements, g as getSlotNames, b as setElementInteractivity, S as SlotSkeleton } from './index-OsoUj2Au.js';
|
|
5
|
-
import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as triggerRemoveIntervalFilter, j as announceToScreenReader, s as syncRequestFilters, k as isSubFilterActive, l as RenderFilterButton, m as getIntervalLabel, n as createImageSearchEvent } from './index-
|
|
5
|
+
import { g as getRemoveFilterAriaLabel, F as FilterIconClose, P as PlusIcon, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, c as createWidgetEvent, a as createFilterEvent, v as v4, b as createAddToBasketEvent, d as createAddToWishlistEvent, e as createResultEventByType, f as createProductEventByType, h as getCustomLabels, t as triggerFilter, i as triggerRemoveIntervalFilter, j as announceToScreenReader, s as syncRequestFilters, k as isSubFilterActive, l as RenderFilterButton, m as getIntervalLabel, n as createImageSearchEvent } from './index-DHNImAac.js';
|
|
6
6
|
import { i as instance, t as trackEvent, a as isTrackingEnabled, d as defaultConfig } from './store-BJxQCbNV.js';
|
|
7
7
|
import { M as MIN_SEARCH_AREA_SIZE, S as SUPPORTED_ASPECT_RATIO, a as MIN_IMAGE_SIDE_FOR_CROPPER, C as Cropper, c as cropperOptions, g as getCropBoxData, i as isCropBoxChangeMinimal, D as DEFAULT_IMAGE_SIZE } from './cropperUtils-CkB6bG3L.js';
|
|
8
|
-
import { r as renderExternalCSS
|
|
8
|
+
import { r as renderExternalCSS } from './cssUrlHelper-DsQD_dY6.js';
|
|
9
9
|
import { i as initializeLocale, d as productCardsGridPart, p as productCardParts, l as listCardParts, e as contentCardParts, f as selectedFiltersParts, g as suggestionsParts, h as filtersParts, j as extendedFiltersParts, m as modalParts, b as searchBarParts, k as searchWidgetFilterParts, n as searchWidgetButtonParts } from './index-BtnjaTty.js';
|
|
10
10
|
import { i as isOnResultsPage, a as parseResultsPageParams, p as parseResultsPageParamNames, c as buildImageSearchRedirectUrl } from './resultsPageUrl-DbOxfJSz.js';
|
|
11
11
|
import { R as RESULTS_WIDGET_IMAGE_RESOLUTION_WIDTH, b as SCROLL_TO_DISCOVERY_DELAY, S as SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH } from './constants-rqiiCPBX.js';
|
|
12
|
+
import { o as openProductLink } from './openProductLink-C7_qzUNW.js';
|
|
12
13
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-DOMXsA9W.js';
|
|
13
14
|
|
|
14
15
|
const CameraActionIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, f as forceUpdate, F as Fragment, H as Host, g as getElement } from './index-RkvPN2Rk.js';
|
|
2
|
-
import { h as campaignTypeNames, j as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, C as isMobile, D as fromString, E as fold, v as version } from './search.store-
|
|
2
|
+
import { h as campaignTypeNames, j as addIfNotEmpty, _ as _ArrayExports, u as useSearchStore, C as isMobile, D as fromString, E as fold, v as version } from './search.store-DUkS1MAq.js';
|
|
3
3
|
import { X as has, Y as tuple, _ as _functionExports, g as requireSemigroup, O as OptionExports, v as pipe$1, N as chainW, Z as makeRequest, L as fromEither, $ as resolveApiPath, a0 as createInitPostRequest, a1 as Apply, a2 as TaskEitherExports, E as EitherExports } from './Rectangle-dmgo4KMB.js';
|
|
4
4
|
import { i as instance, d as defaultConfig, t as trackEvent, a as isTrackingEnabled } from './store-BJxQCbNV.js';
|
|
5
|
-
import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, q as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels, r as SCROLL_POSITION_TOLERANCE, u as triggerResetFilters, t as triggerFilter, j as announceToScreenReader, m as getIntervalLabel, w as isPriceFilter, k as isSubFilterActive, l as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, x as CUSTOM_LABELS_DELIMITER, v as v4, c as createWidgetEvent, e as createResultEventByType, b as createAddToBasketEvent, d as createAddToWishlistEvent, f as createProductEventByType, y as getRecommendationsBody } from './index-
|
|
5
|
+
import { S as SET_MODE_IMAGE_WIDTH_CSS_VAR, C as CONTENT_GROUP_CSS_CLASS, o as CAROUSEL_IMAGE_WIDTH_CSS_VAR, p as CAROUSEL_CONTENT_WIDTH_CSS_VAR, R as RESULTS_CALCULATED_COLUMNS_CSS_VAR, q as CAROUSEL_COLUMNS_CSS_VAR, D as DEFAULT_COLUMNS_NUMBER, h as getCustomLabels, r as SCROLL_POSITION_TOLERANCE, u as triggerResetFilters, t as triggerFilter, j as announceToScreenReader, m as getIntervalLabel, w as isPriceFilter, k as isSubFilterActive, l as RenderFilterButton, s as syncRequestFilters, P as PlusIcon, x as CUSTOM_LABELS_DELIMITER, v as v4, c as createWidgetEvent, e as createResultEventByType, b as createAddToBasketEvent, d as createAddToWishlistEvent, f as createProductEventByType, y as getRecommendationsBody } from './index-DHNImAac.js';
|
|
6
6
|
import { P as PRODUCT_CARD_IMAGE_WIDTH, D as DISCOVERY_WIDGET_IMAGE_RESOLUTION_WIDTH, c as PRODUCT_CARD_IMAGE_RESOLUTION_WIDTH } from './constants-rqiiCPBX.js';
|
|
7
7
|
import { s as slotChangeListener, a as addEventListenersWithSignal, i as isElementInSelector, S as SlotSkeleton } from './index-OsoUj2Au.js';
|
|
8
8
|
import { o as energyLabelParts, i as initializeLocale, j as extendedFiltersParts, h as filtersParts, q as imageParts, e as contentCardParts, l as listCardParts, p as productCardParts, t as priceRangeParts } from './index-BtnjaTty.js';
|
|
9
9
|
import { r as register, c as configureSwiperElement, s as setupIntersectionObserver } from './swiper-element-Er2KrWw1.js';
|
|
10
|
-
import { r as renderExternalCSS
|
|
10
|
+
import { r as renderExternalCSS } from './cssUrlHelper-DsQD_dY6.js';
|
|
11
|
+
import { o as openProductLink } from './openProductLink-C7_qzUNW.js';
|
|
11
12
|
|
|
12
13
|
const BasketIcon = () => (h("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
13
14
|
h("g", { id: "shopping-bag" },
|
|
@@ -2,11 +2,12 @@ import { h, r as registerInstance, c as createEvent, H as Host, g as getElement
|
|
|
2
2
|
import { a as divideOnSized, E as EitherExports } from './Rectangle-dmgo4KMB.js';
|
|
3
3
|
import { C as Cropper, c as cropperOptions, g as getCropBoxData, i as isCropBoxChangeMinimal } from './cropperUtils-CkB6bG3L.js';
|
|
4
4
|
import { g as getSwiperStyles, c as configureSwiperElement, r as register, e as extractSlideIndex, s as setupIntersectionObserver } from './swiper-element-Er2KrWw1.js';
|
|
5
|
-
import { i as isDesktop$1, s as shopTheLookState, m as makeVisualSearchRequest, a as makeVisualSearchByUrlRequest, b as imageFromFileTask, c as makeUploadFileRequest, g as getAcceptableFileFormats } from './search.store-
|
|
5
|
+
import { i as isDesktop$1, s as shopTheLookState, m as makeVisualSearchRequest, a as makeVisualSearchByUrlRequest, b as imageFromFileTask, c as makeUploadFileRequest, g as getAcceptableFileFormats } from './search.store-DUkS1MAq.js';
|
|
6
6
|
import { S as SecondaryActionIcon } from './SecondaryActionIcon-FWFzrhba.js';
|
|
7
7
|
import { i as initializeLocale, a as shopTheLookParts } from './index-BtnjaTty.js';
|
|
8
8
|
import { d as defaultConfig } from './store-BJxQCbNV.js';
|
|
9
|
-
import {
|
|
9
|
+
import { r as renderExternalCSS } from './cssUrlHelper-DsQD_dY6.js';
|
|
10
|
+
import { o as openProductLink } from './openProductLink-C7_qzUNW.js';
|
|
10
11
|
|
|
11
12
|
const UploadActionIconVariant = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" },
|
|
12
13
|
h("path", { d: "M5 21C4.45 21 3.97917 20.8042 3.5875 20.4125C3.19583 20.0208 3 19.55 3 19V5C3 4.45 3.19583 3.97917 3.5875 3.5875C3.97917 3.19583 4.45 3 5 3H13C13.2833 3 13.5208 3.09583 13.7125 3.2875C13.9042 3.47917 14 3.71667 14 4C14 4.28333 13.9042 4.52083 13.7125 4.7125C13.5208 4.90417 13.2833 5 13 5H5V19H19V11C19 10.7167 19.0958 10.4792 19.2875 10.2875C19.4792 10.0958 19.7167 10 20 10C20.2833 10 20.5208 10.0958 20.7125 10.2875C20.9042 10.4792 21 10.7167 21 11V19C21 19.55 20.8042 20.0208 20.4125 20.4125C20.0208 20.8042 19.55 21 19 21H5ZM17 7H16C15.7167 7 15.4792 6.90417 15.2875 6.7125C15.0958 6.52083 15 6.28333 15 6C15 5.71667 15.0958 5.47917 15.2875 5.2875C15.4792 5.09583 15.7167 5 16 5H17V4C17 3.71667 17.0958 3.47917 17.2875 3.2875C17.4792 3.09583 17.7167 3 18 3C18.2833 3 18.5208 3.09583 18.7125 3.2875C18.9042 3.47917 19 3.71667 19 4V5H20C20.2833 5 20.5208 5.09583 20.7125 5.2875C20.9042 5.47917 21 5.71667 21 6C21 6.28333 20.9042 6.52083 20.7125 6.7125C20.5208 6.90417 20.2833 7 20 7H19V8C19 8.28333 18.9042 8.52083 18.7125 8.7125C18.5208 8.90417 18.2833 9 18 9C17.7167 9 17.4792 8.90417 17.2875 8.7125C17.0958 8.52083 17 8.28333 17 8V7ZM11.25 16L9.4 13.525C9.3 13.3917 9.16667 13.325 9 13.325C8.83333 13.325 8.7 13.3917 8.6 13.525L6.6 16.2C6.46667 16.3667 6.45 16.5417 6.55 16.725C6.65 16.9083 6.8 17 7 17H17C17.2 17 17.35 16.9083 17.45 16.725C17.55 16.5417 17.5333 16.3667 17.4 16.2L14.65 12.525C14.55 12.3917 14.4167 12.325 14.25 12.325C14.0833 12.325 13.95 12.3917 13.85 12.525L11.25 16Z", fill: "white" })));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-RkvPN2Rk.js';
|
|
2
2
|
import { _ as _functionExports, f as fold } from './Rectangle-dmgo4KMB.js';
|
|
3
|
-
import { d as setTextSearchQuery, e as clearAutoSuggestCompletions, f as makeAutoSuggestRequest, v as version, h as campaignTypeNames, j as addIfNotEmpty, k as makeTextSearchRequest, u as useSearchStore } from './search.store-
|
|
3
|
+
import { d as setTextSearchQuery, e as clearAutoSuggestCompletions, f as makeAutoSuggestRequest, v as version, h as campaignTypeNames, j as addIfNotEmpty, k as makeTextSearchRequest, u as useSearchStore } from './search.store-DUkS1MAq.js';
|
|
4
4
|
import { s as slotChangeListener, f as findSlotElements } from './index-OsoUj2Au.js';
|
|
5
5
|
import { i as instance, d as defaultConfig } from './store-BJxQCbNV.js';
|
|
6
6
|
import { i as initializeLocale, b as searchBarParts, s as searchModalFirstScreenParts } from './index-BtnjaTty.js';
|
|
@@ -3,6 +3,7 @@ import { f as findSlotElements, S as SlotSkeleton } from './index-OsoUj2Au.js';
|
|
|
3
3
|
import { D as DEFAULT_EXAMPLE_IMAGE } from './constants-DOMXsA9W.js';
|
|
4
4
|
import { S as SEARCH_WIDGET_IMAGE_RESOLUTION_WIDTH } from './constants-rqiiCPBX.js';
|
|
5
5
|
import { i as initializeLocale, s as searchModalFirstScreenParts } from './index-BtnjaTty.js';
|
|
6
|
+
import { r as renderExternalCSS } from './cssUrlHelper-DsQD_dY6.js';
|
|
6
7
|
import { i as instance } from './store-BJxQCbNV.js';
|
|
7
8
|
|
|
8
9
|
const SearchModalCameraIcon = () => (h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true" },
|
|
@@ -152,7 +153,7 @@ const VviinnVpsButton = class {
|
|
|
152
153
|
}
|
|
153
154
|
render() {
|
|
154
155
|
const { ariaLabel, buttonIcon } = this.getButtonConfig();
|
|
155
|
-
return (h(Host, { key: '
|
|
156
|
+
return (h(Host, { key: '9d0e319edac342158caa501aae1756ade2b92242', role: this.buttonPressed ? undefined : "button", "aria-label": this.buttonPressed ? undefined : ariaLabel, exportparts: `vviinn-button, ${searchModalFirstScreenParts}` }, renderExternalCSS(this.cssUrl), h("vviinn-button", { key: 'f30a55f9bbb705f5a17c925b655fa9210695b18d', addStyle: this.addStyle, part: "vviinn-button", tabindex: this.buttonPressed ? undefined : "0", onClick: this.buttonPressed ? undefined : this.handleActivation, onKeyDown: this.buttonPressed ? undefined : this.handleKeyDown }, h("slot", { key: 'e4fe7e8fe94fde3111836c7d0ae227a9a35fd1f4' }, buttonIcon)), SlotSkeleton("search"), h("vviinn-vps-widget", { key: '981a1866d06c8e35d7a9b211bf9f87ad06b85e42', mode: this.mode, "currency-sign": this.currencySign, token: this.token, locale: this.locale, numberLocale: this.numberLocale, apiPath: this.apiPath, pricePrefix: this.pricePrefix, campaignId: this.campaignId, campaignIdTextSearch: this.campaignIdTextSearch, campaignIdVisualSearch: this.campaignIdVisualSearch, showingInButton: true, buttonPressed: this.buttonPressed, resetVpsButton: this.resetButton, buttonElementId: this.el.id, active: this.buttonPressed &&
|
|
156
157
|
(this.mode === "modal" || this.mode === "camera"), excluded: this.excluded, productDetailsNewTab: this.productDetailsNewTab, productDetailsRedirect: this.productDetailsRedirect, imageResolutionWidth: this.imageResolutionWidth, showMultipleImages: this.showMultipleImages, exampleImageSource: this.exampleImageSource, textSearchShow: this.textSearchShow, autoSuggestShow: this.autoSuggestShow, addToBasketShow: this.addToBasketShow, addPriceContainer: this.addPriceContainer, showIntervalInputs: this.showIntervalInputs, replaceSlotsContentInButton: this.replaceSlotsContent.bind(this), oneClickDiscoveryMode: this.oneClickDiscoveryMode, oneClickDiscoveryCampaigns: this.oneClickDiscoveryCampaigns, favoriteShow: this.favoriteShow, showResultsInModal: this.showResultsInModal, resultsPageUrl: this.resultsPageUrl, resultsPageParams: this.resultsPageParams, parentSlots: [...this.parentSlots, ...this.slots], cssUrl: this.cssUrl })));
|
|
157
158
|
}
|
|
158
159
|
get el() { return getElement(this); }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t,r as e,c as i,H as s,g as o}from"./p-RkvPN2Rk.js";import{_ as r,f as a}from"./p-CrEgr0jU.js";import{d as n,e as h,f as c,v as l,h as d,j as p,k as f,u as g}from"./p-BdbY-xGp.js";import{s as b,f as u}from"./p-DKHkeCw7.js";import{i as x,d as v}from"./p-BJxQCbNV.js";import{i as m,b as y,s as w}from"./p-CPTOq59a.js";import{i as C,b as k,p as S}from"./p-DbOxfJSz.js";const T=()=>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"})),z=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"24",height:"24","aria-hidden":"true"},t("path",{d:"M12 14C11.1667 14 10.4583 13.7083 9.87501 13.125C9.29168 12.5417 9.00001 11.8333 9.00001 11V5C9.00001 4.16667 9.29168 3.45833 9.87501 2.875C10.4583 2.29167 11.1667 2 12 2C12.8333 2 13.5417 2.29167 14.125 2.875C14.7083 3.45833 15 4.16667 15 5V11C15 11.8333 14.7083 12.5417 14.125 13.125C13.5417 13.7083 12.8333 14 12 14ZM11 20V17.925C9.46668 17.7083 8.15418 17.0583 7.06251 15.975C5.97085 14.8917 5.30835 13.575 5.07501 12.025C5.04168 11.7417 5.11668 11.5 5.30001 11.3C5.48335 11.1 5.71668 11 6.00001 11C6.28335 11 6.52085 11.0958 6.71251 11.2875C6.90418 11.4792 7.03335 11.7167 7.10001 12C7.33335 13.1667 7.91251 14.125 8.83751 14.875C9.76251 15.625 10.8167 16 12 16C13.2 16 14.2583 15.6208 15.175 14.8625C16.0917 14.1042 16.6667 13.15 16.9 12C16.9667 11.7167 17.0958 11.4792 17.2875 11.2875C17.4792 11.0958 17.7167 11 18 11C18.2833 11 18.5167 11.1 18.7 11.3C18.8833 11.5 18.9583 11.7417 18.925 12.025C18.6917 13.5417 18.0333 14.85 16.95 15.95C15.8667 17.05 14.55 17.7083 13 17.925V20C13 20.2833 12.9042 20.5208 12.7125 20.7125C12.5208 20.9042 12.2833 21 12 21C11.7167 21 11.4792 20.9042 11.2875 20.7125C11.0958 20.5208 11 20.2833 11 20Z",fill:"#161616"})),j=()=>{var t;const e=window,i=window.navigator,s=i.vendor,o=[void 0!==e.opr,i.userAgent.indexOf("Firefox")>-1,i.userAgent.indexOf("Edg")>-1].some((t=>!0===t)),r=void 0!==i.userAgentData?"Google Chrome"===(null===(t=i.userAgentData.brands[0])||void 0===t?void 0:t.brand):"Google Inc."===s;return{forbiddenBrowser:o,isChrome:r,isSafari:i.userAgent.indexOf("Safari")>-1&&!r}},I=class{constructor(t){e(this,t),this.vviinnImageUploadFinished=i(this,"vviinnImageUploadFinished"),this.vviinnFilterTriggered=i(this,"vviinnFilterTriggered"),this.vviinnTextSearchStarted=i(this,"vviinnTextSearchStarted"),this.widgetTextSearchFinished=i(this,"widgetTextSearchFinished"),this.vviinnSelectedFiltersReset=i(this,"vviinnSelectedFiltersReset"),this.vviinnNoResult=i(this,"vviinnNoResult"),this.vviinnRedirect=i(this,"vviinnRedirect"),this.mode="basic",this.placeholder="",this.autoSuggestShow=!1,this.showInWidget=!1,this.showOnFirstScreen=!1,this.isRecording=!1,this.showTooltip=!1,this.autoSuggestCompletions=[],this.activeSuggestionIndex=-1,this.originalQuery="",this.searchSubmitted=!1,this.slots=[],this.isShowPreloader=()=>"loading"===this.state.searchStatus&&"text"===this.state.searchType,this.isShowRecording=()=>this.isRecording,this.showRecording=()=>this.isRecording=!0,this.hideRecording=()=>this.isRecording=!1,this.setShowTooltip=t=>{this.showTooltip=t},this.tooltipText=(()=>{const{isSafari:t}=j();return t?"speechRecognition.tooltip.siri":"speechRecognition.tooltip.general"})(),this.getPlaceholderText=()=>this.isShowRecording()?x.t("speechRecognition.placeholder"):this.placeholder.length?this.placeholder:x.t("textSearchPlaceholder"),this.recognition=null,this.trackTextSearch=()=>this.vviinnFilterTriggered.emit({kind:this.state.textSearchQuery,action:"select",customTrigger:"TPS",isTriggeredByVpsWidget:this.showInWidget}),this.getBasicEventData=()=>this.showInWidget&&this.basicEventData?this.basicEventData:Object.assign({campaignTypeId:"TPS",campaignTypeName:d.TPS,widgetVersion:l},p("widgetId",this.el.id)),this.handleSpeech=async()=>{this.recognition&&(this.isRecording?(this.recognition.stop(),this.hideRecording(),this.setShowTooltip(!1)):(this.recognition.start(),n(this.storeName,null),this.triggerTooltipStart=setTimeout((()=>{this.isRecording||(this.setShowTooltip(!0),this.triggerTooltipEnd=setTimeout((()=>{this.setShowTooltip(!1)}),5e3))}),1e3)))},this.hideSuggestions=()=>{h(this.storeName)},this.selectSuggestion=t=>{if(n(this.storeName,t.suggestion),this.hideSuggestions(),t.url)return this.trackTextSearch(),void this.handleTextSearchRedirect(t.url,"auto-suggest",t.suggestion);this.handleTextSearch(!0)},this.handleTextSearch=async(t=!1)=>{var e;const i=this.state.textSearchQuery;if(!i)return;this.searchSubmitted=!0,null===(e=this.autoSuggestHandler)||void 0===e||e.cancelPending(),this.hideSuggestions(),t||(await this.checkAutoSuggest(i),this.hideSuggestions()),this.trackTextSearch();const s=this.state.redirect;if((null==s?void 0:s.url)&&s.query===i)this.handleTextSearchRedirect(s.url,"auto-suggest",i);else if(!this.resultsPageUrl||this.showInWidget||C(this.resultsPageUrl))this.vviinnTextSearchStarted.emit({query:i,isTriggeredByVpsWidget:this.showInWidget}),this.showInWidget&&this.showOnFirstScreen&&r.pipe(await f(this.storeName,i,this.token,this.apiPath),a((()=>{this.vviinnNoResult.emit(this.getBasicEventData())}),(t=>{this.widgetTextSearchFinished.emit({query:i,requestId:t.requestId}),this.vviinnSelectedFiltersReset.emit({isTriggeredByVpsWidget:this.showInWidget})})));else{const t=k(this.resultsPageUrl,i,S(this.resultsPageParams).query);this.handleTextSearchRedirect(t,"text-search",i)}},this.checkAutoSuggest=async t=>{r.pipe(await c(this.storeName,t,this.token,this.apiPath),a((()=>{}),(()=>{})))},this.handleKeyDown=t=>{this.autoSuggestShow?((t,e)=>{const{completions:i,activeSuggestionIndex:s,originalQuery:o,storeName:r,textSearchQuery:a,onActiveIndexChange:h,onOriginalQueryChange:c,onSelectSuggestion:l,onHideSuggestions:d,onSearch:p}=e,f=i.length>0;switch(t.key){case"ArrowDown":if(f){t.preventDefault(),-1===s&&c(a);const e=Math.min(s+1,i.length-1);h(e),n(r,i[e].suggestion)}break;case"ArrowUp":if(f&&s>-1){t.preventDefault();const e=s-1;h(e),n(r,-1===e?o:i[e].suggestion)}break;case"Escape":d();break;case"Enter":f&&s>=0?(t.preventDefault(),l(i[s])):p()}})(t,{completions:this.autoSuggestCompletions,activeSuggestionIndex:this.activeSuggestionIndex,originalQuery:this.originalQuery,storeName:this.storeName,textSearchQuery:this.state.textSearchQuery,onActiveIndexChange:t=>this.activeSuggestionIndex=t,onOriginalQueryChange:t=>this.originalQuery=t,onSelectSuggestion:this.selectSuggestion,onHideSuggestions:this.hideSuggestions,onSearch:this.handleTextSearch}):"Enter"===t.key&&this.handleTextSearch()},this.handleButtonKeyDown=(t,e)=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())}}connectedCallback(){const{state:t,storeName:e,onChange:i}=g(this.showInWidget);this.state=t,this.storeName=e,this.autoSuggestShow&&(this.disposeOnChange=i("autoSuggestCompletions",(t=>{this.searchSubmitted&&t.length>0||(this.autoSuggestCompletions=t,this.activeSuggestionIndex=-1)})))}disconnectedCallback(){var t,e;clearTimeout(this.triggerTooltipStart),clearTimeout(this.triggerTooltipEnd),null===(t=this.autoSuggestHandler)||void 0===t||t.cleanup(),null===(e=this.disposeOnChange)||void 0===e||e.call(this)}async componentWillLoad(){var t,e,i;await m(this.locale),b(this,this.el),this.slots=u(this.el),this.autoSuggestShow&&(this.autoSuggestHandler=((t,e,i)=>{let s;const o=()=>clearTimeout(s);return{handleInputChange:o=>{n(t,o),clearTimeout(s),o?s=setTimeout((()=>{c(t,o,e,i)}),300):h(t)},cancelPending:o,cleanup:o}})(this.storeName,this.token,this.apiPath)),this.recognition=((t,e,i,s)=>{const o=(()=>{const t=window,e=t.webkitSpeechRecognition||t.SpeechRecognition;if(!e)return;const{forbiddenBrowser:i,isChrome:s,isSafari:o}=j();return i?void 0:s||o?e:void 0})();if(!o)return;const r=new o;let a;return r.interimResults=!1,r.maxAlternatives=1,r.continuous=!1,r.lang=t,r.onstart=()=>{e(),a=setTimeout((()=>{r.stop()}),1e4)},r.onspeechend=()=>{r.stop(),i(),clearTimeout(a)},r.onend=i,r.onresult=t=>{s(t.results[0][0].transcript)},r})(null!==(t=this.locale)&&void 0!==t?t:v.locale,(()=>{this.showRecording(),this.setShowTooltip(!1),clearTimeout(this.triggerTooltipStart)}),this.hideRecording,(t=>{n(this.storeName,t),this.handleTextSearch()})),(null===(e=this.searchQuery)||void 0===e?void 0:e.length)>0&&n(this.storeName,this.searchQuery),!this.showInWidget&&(null===(i=this.searchQuery)||void 0===i?void 0:i.length)>0&&(this.vviinnTextSearchStarted.emit({query:this.searchQuery,isTriggeredByVpsWidget:this.showInWidget}),this.trackTextSearch())}handleInputChange(t){this.searchSubmitted=!1;const e=t.target.value;this.autoSuggestShow?this.autoSuggestHandler.handleInputChange(e):n(this.storeName,e)}handleTextSearchRedirect(t,e,i){const s=Object.assign(Object.assign({},this.getBasicEventData()),{url:t,source:e,query:i});this.vviinnRedirect.emit(s).defaultPrevented?this.state.redirect=null:window.location.href=t}render(){return t(s,{key:"a97f9685f46a30ca9ab12396ee1aa01482731370",exportparts:`${y}, ${w}`},t("div",{key:"384e2cc006c0c66b2e50d56631beb538cbaa4f07",class:"text-search-container",part:"text-search-container"},t("input",Object.assign({key:"5e571ee58eab698531946a19c5e92fb970340d33",class:"text-search-input",part:"text-search-input",type:"text",placeholder:this.getPlaceholderText(),value:this.state.textSearchQuery||"",onInput:t=>this.handleInputChange(t),onKeyDown:this.handleKeyDown,onBlur:this.autoSuggestShow?this.hideSuggestions:void 0},this.autoSuggestShow&&{role:"combobox","aria-autocomplete":"list","aria-expanded":this.autoSuggestCompletions.length>0&&this.state.textSearchQuery?"true":"false","aria-controls":"suggestions-listbox","aria-activedescendant":this.activeSuggestionIndex>=0?`suggestion-${this.activeSuggestionIndex}`:void 0})),"extended"===this.mode&&t("vviinn-vps-button",Object.assign({key:"a92908b647b3f07546bfa3e3a15f7306374cd59d",token:this.token,locale:this.locale,apiPath:this.apiPath,addStyle:!1,showResultsInModal:!1,resultsPageUrl:this.resultsPageUrl,resultsPageParams:this.resultsPageParams},this.exampleImageSource&&{exampleImageSource:this.exampleImageSource},null!=this.cssUrl&&{cssUrl:this.cssUrl},this.visualSearchMode&&{mode:this.visualSearchMode},{parentSlots:this.slots})),"basic"===this.mode&&t("slot",{key:"06e20a8744dea22ee8bd51d5a1e37b5e29b0b7f4",name:"vviinn-text-search-actions"}),("extended"===this.mode||this.showInWidget)&&this.recognition&&t("button",{key:"1ab2f0acb7137c36231a542234a717e34430474f",class:"speech-button",part:"speech-button","aria-label":x.t("a11y.speechButton"),onClick:this.handleSpeech,onKeyDown:t=>this.handleButtonKeyDown(t,this.handleSpeech)},t(z,{key:"eb97b29086e9e5ad18b1ff6ac9637b760ae2c83a"}),this.isShowRecording()&&t("span",{key:"dc8cecbb91eaa4a5195727b50919022898630a23",class:"recording-indicator"})),t("button",{key:"ebd39b8d86ab47cd4fadda6a5ad30c8001bd8c5a",class:"text-search-button",part:"text-search-button",onClick:()=>this.handleTextSearch(),onKeyDown:t=>this.handleButtonKeyDown(t,this.handleTextSearch),disabled:"loading"===this.state.searchStatus,"aria-label":x.t("a11y.textSearchButton")},this.isShowPreloader()?t("vviinn-preloader",null):t("slot",{name:"vviinn-text-search-icon"},t(T,null)))),this.autoSuggestShow&&(i=this.state.textSearchQuery,o=this.activeSuggestionIndex,r=this.selectSuggestion,(e=this.autoSuggestCompletions).length&&i?t("ul",{class:"suggestions-container",part:"suggestions-container",role:"listbox",id:"suggestions-listbox"},e.map(((e,s)=>t("li",{id:`suggestion-${s}`,class:{"suggestion-item":!0,"suggestion-item--active":s===o},part:"suggestion-item",role:"option","aria-selected":s===o?"true":"false",onMouseDown:t=>{t.preventDefault(),r(e)}},((e,i)=>{const s=e.toLowerCase(),o=i.toLowerCase(),r=s.indexOf(o);if(-1===r)return e;const a=e.slice(0,r),n=e.slice(r,r+i.length),h=e.slice(r+i.length);return[a,t("span",{class:"suggestion-highlight"},n),h]})(e.suggestion,i))))):null),this.showTooltip&&t("p",{key:"d59b3a49c6bda6b2992e3b0aa7bffb4ef674d3b6",class:"text-search-tooltip",part:"text-search-tooltip"},x.t(this.tooltipText)));var e,i,o,r}get el(){return o(this)}};I.style=':host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:block;position:relative;width:100%;}.text-search-container{display:flex;align-items:center;gap:var(--spacing-50);width:100%;height:46px;border:1px solid var(--color-border-02);border-radius:8px;transition:border-color 0.2s;overflow:hidden;box-sizing:border-box}.text-search-container:focus-within{border-color:#8d8d8d}.text-search-input,.text-search-tooltip{font-size:16px;font-style:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base))}.text-search-input{height:100%;padding-left:16px;box-sizing:border-box;border:none;outline:none;overflow:hidden;text-overflow:ellipsis;flex-grow:2;width:150px}.text-search-input::-moz-placeholder{color:#a8a8a8}.text-search-input::placeholder{color:#a8a8a8}.text-search-input:focus,.text-search-input:active{border-color:#8d8d8d}vviinn-vps-button{height:100%}.text-search-button,.speech-button,vviinn-vps-button::part(vviinn-button){border:none;height:100%;display:flex;justify-content:center;align-items:center;cursor:pointer}.speech-button,vviinn-vps-button::part(vviinn-button){padding:0 8px}.upload-button-text{display:contents}.text-search-button{background-color:#f4f4f4;transition:background-color 0.2s;aspect-ratio:1 / 1;border-radius:0 7px 7px 0}.speech-button{background-color:transparent;position:relative}@keyframes recordingSpeech{0%{background-color:#ff0000;scale:1}100%{background-color:#ff8888;scale:1.5}}.recording-indicator{border-radius:50%;width:8px;height:8px;left:24px;top:24px;background-color:#ff0000;position:absolute;animation:recordingSpeech 1s infinite alternate ease-in-out}@keyframes fade-out{0%{opacity:0}20%{opacity:1}80%{opacity:1}100%{opacity:0;display:none}}.text-search-tooltip{position:absolute;right:0;top:80%;background:#f4f4f4;animation:fade-out 5s forwards;width:-moz-fit-content;width:fit-content;padding:24px;border-radius:8px;border:1px solid #8d8d8d;box-sizing:border-box}.text-search-button:not(:disabled):hover{background-color:#e0e0e0}.text-search-button:disabled{cursor:unset}vviinn-image-selector,::slotted([slot="vviinn-text-search-actions"]){margin:auto 8px}vviinn-preloader{--preloader-size:16px;display:flex;color:#525252}.suggestions-container{position:absolute;top:100%;left:0;right:0;margin:var(--spacing-50) 0 0;padding:4px;list-style:none;background:#ffffff;border:1px solid #fafafa;border-radius:8px;box-shadow:0px 4px 12px rgba(0, 0, 0, 0.08);box-sizing:border-box;z-index:10}.suggestion-item{padding:4px 8px;border-radius:4px;font-size:16px;line-height:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base));cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.suggestion-item:hover,.suggestion-item--active{background-color:#f4f4f4}.suggestion-highlight{font-weight:500}';export{I as vviinn_text_search}
|
|
1
|
+
import{h as t,r as e,c as i,H as s,g as o}from"./p-RkvPN2Rk.js";import{_ as r,f as a}from"./p-CrEgr0jU.js";import{d as n,e as h,f as c,v as l,h as d,j as p,k as f,u as g}from"./p-DXT8Rt8G.js";import{s as b,f as u}from"./p-DKHkeCw7.js";import{i as x,d as v}from"./p-BJxQCbNV.js";import{i as m,b as y,s as w}from"./p-CPTOq59a.js";import{i as C,b as k,p as S}from"./p-DbOxfJSz.js";const T=()=>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"})),z=()=>t("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",width:"24",height:"24","aria-hidden":"true"},t("path",{d:"M12 14C11.1667 14 10.4583 13.7083 9.87501 13.125C9.29168 12.5417 9.00001 11.8333 9.00001 11V5C9.00001 4.16667 9.29168 3.45833 9.87501 2.875C10.4583 2.29167 11.1667 2 12 2C12.8333 2 13.5417 2.29167 14.125 2.875C14.7083 3.45833 15 4.16667 15 5V11C15 11.8333 14.7083 12.5417 14.125 13.125C13.5417 13.7083 12.8333 14 12 14ZM11 20V17.925C9.46668 17.7083 8.15418 17.0583 7.06251 15.975C5.97085 14.8917 5.30835 13.575 5.07501 12.025C5.04168 11.7417 5.11668 11.5 5.30001 11.3C5.48335 11.1 5.71668 11 6.00001 11C6.28335 11 6.52085 11.0958 6.71251 11.2875C6.90418 11.4792 7.03335 11.7167 7.10001 12C7.33335 13.1667 7.91251 14.125 8.83751 14.875C9.76251 15.625 10.8167 16 12 16C13.2 16 14.2583 15.6208 15.175 14.8625C16.0917 14.1042 16.6667 13.15 16.9 12C16.9667 11.7167 17.0958 11.4792 17.2875 11.2875C17.4792 11.0958 17.7167 11 18 11C18.2833 11 18.5167 11.1 18.7 11.3C18.8833 11.5 18.9583 11.7417 18.925 12.025C18.6917 13.5417 18.0333 14.85 16.95 15.95C15.8667 17.05 14.55 17.7083 13 17.925V20C13 20.2833 12.9042 20.5208 12.7125 20.7125C12.5208 20.9042 12.2833 21 12 21C11.7167 21 11.4792 20.9042 11.2875 20.7125C11.0958 20.5208 11 20.2833 11 20Z",fill:"#161616"})),j=()=>{var t;const e=window,i=window.navigator,s=i.vendor,o=[void 0!==e.opr,i.userAgent.indexOf("Firefox")>-1,i.userAgent.indexOf("Edg")>-1].some((t=>!0===t)),r=void 0!==i.userAgentData?"Google Chrome"===(null===(t=i.userAgentData.brands[0])||void 0===t?void 0:t.brand):"Google Inc."===s;return{forbiddenBrowser:o,isChrome:r,isSafari:i.userAgent.indexOf("Safari")>-1&&!r}},I=class{constructor(t){e(this,t),this.vviinnImageUploadFinished=i(this,"vviinnImageUploadFinished"),this.vviinnFilterTriggered=i(this,"vviinnFilterTriggered"),this.vviinnTextSearchStarted=i(this,"vviinnTextSearchStarted"),this.widgetTextSearchFinished=i(this,"widgetTextSearchFinished"),this.vviinnSelectedFiltersReset=i(this,"vviinnSelectedFiltersReset"),this.vviinnNoResult=i(this,"vviinnNoResult"),this.vviinnRedirect=i(this,"vviinnRedirect"),this.mode="basic",this.placeholder="",this.autoSuggestShow=!1,this.showInWidget=!1,this.showOnFirstScreen=!1,this.isRecording=!1,this.showTooltip=!1,this.autoSuggestCompletions=[],this.activeSuggestionIndex=-1,this.originalQuery="",this.searchSubmitted=!1,this.slots=[],this.isShowPreloader=()=>"loading"===this.state.searchStatus&&"text"===this.state.searchType,this.isShowRecording=()=>this.isRecording,this.showRecording=()=>this.isRecording=!0,this.hideRecording=()=>this.isRecording=!1,this.setShowTooltip=t=>{this.showTooltip=t},this.tooltipText=(()=>{const{isSafari:t}=j();return t?"speechRecognition.tooltip.siri":"speechRecognition.tooltip.general"})(),this.getPlaceholderText=()=>this.isShowRecording()?x.t("speechRecognition.placeholder"):this.placeholder.length?this.placeholder:x.t("textSearchPlaceholder"),this.recognition=null,this.trackTextSearch=()=>this.vviinnFilterTriggered.emit({kind:this.state.textSearchQuery,action:"select",customTrigger:"TPS",isTriggeredByVpsWidget:this.showInWidget}),this.getBasicEventData=()=>this.showInWidget&&this.basicEventData?this.basicEventData:Object.assign({campaignTypeId:"TPS",campaignTypeName:d.TPS,widgetVersion:l},p("widgetId",this.el.id)),this.handleSpeech=async()=>{this.recognition&&(this.isRecording?(this.recognition.stop(),this.hideRecording(),this.setShowTooltip(!1)):(this.recognition.start(),n(this.storeName,null),this.triggerTooltipStart=setTimeout((()=>{this.isRecording||(this.setShowTooltip(!0),this.triggerTooltipEnd=setTimeout((()=>{this.setShowTooltip(!1)}),5e3))}),1e3)))},this.hideSuggestions=()=>{h(this.storeName)},this.selectSuggestion=t=>{if(n(this.storeName,t.suggestion),this.hideSuggestions(),t.url)return this.trackTextSearch(),void this.handleTextSearchRedirect(t.url,"auto-suggest",t.suggestion);this.handleTextSearch(!0)},this.handleTextSearch=async(t=!1)=>{var e;const i=this.state.textSearchQuery;if(!i)return;this.searchSubmitted=!0,null===(e=this.autoSuggestHandler)||void 0===e||e.cancelPending(),this.hideSuggestions(),t||(await this.checkAutoSuggest(i),this.hideSuggestions()),this.trackTextSearch();const s=this.state.redirect;if((null==s?void 0:s.url)&&s.query===i)this.handleTextSearchRedirect(s.url,"auto-suggest",i);else if(!this.resultsPageUrl||this.showInWidget||C(this.resultsPageUrl))this.vviinnTextSearchStarted.emit({query:i,isTriggeredByVpsWidget:this.showInWidget}),this.showInWidget&&this.showOnFirstScreen&&r.pipe(await f(this.storeName,i,this.token,this.apiPath),a((()=>{this.vviinnNoResult.emit(this.getBasicEventData())}),(t=>{this.widgetTextSearchFinished.emit({query:i,requestId:t.requestId}),this.vviinnSelectedFiltersReset.emit({isTriggeredByVpsWidget:this.showInWidget})})));else{const t=k(this.resultsPageUrl,i,S(this.resultsPageParams).query);this.handleTextSearchRedirect(t,"text-search",i)}},this.checkAutoSuggest=async t=>{r.pipe(await c(this.storeName,t,this.token,this.apiPath),a((()=>{}),(()=>{})))},this.handleKeyDown=t=>{this.autoSuggestShow?((t,e)=>{const{completions:i,activeSuggestionIndex:s,originalQuery:o,storeName:r,textSearchQuery:a,onActiveIndexChange:h,onOriginalQueryChange:c,onSelectSuggestion:l,onHideSuggestions:d,onSearch:p}=e,f=i.length>0;switch(t.key){case"ArrowDown":if(f){t.preventDefault(),-1===s&&c(a);const e=Math.min(s+1,i.length-1);h(e),n(r,i[e].suggestion)}break;case"ArrowUp":if(f&&s>-1){t.preventDefault();const e=s-1;h(e),n(r,-1===e?o:i[e].suggestion)}break;case"Escape":d();break;case"Enter":f&&s>=0?(t.preventDefault(),l(i[s])):p()}})(t,{completions:this.autoSuggestCompletions,activeSuggestionIndex:this.activeSuggestionIndex,originalQuery:this.originalQuery,storeName:this.storeName,textSearchQuery:this.state.textSearchQuery,onActiveIndexChange:t=>this.activeSuggestionIndex=t,onOriginalQueryChange:t=>this.originalQuery=t,onSelectSuggestion:this.selectSuggestion,onHideSuggestions:this.hideSuggestions,onSearch:this.handleTextSearch}):"Enter"===t.key&&this.handleTextSearch()},this.handleButtonKeyDown=(t,e)=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),e())}}connectedCallback(){const{state:t,storeName:e,onChange:i}=g(this.showInWidget);this.state=t,this.storeName=e,this.autoSuggestShow&&(this.disposeOnChange=i("autoSuggestCompletions",(t=>{this.searchSubmitted&&t.length>0||(this.autoSuggestCompletions=t,this.activeSuggestionIndex=-1)})))}disconnectedCallback(){var t,e;clearTimeout(this.triggerTooltipStart),clearTimeout(this.triggerTooltipEnd),null===(t=this.autoSuggestHandler)||void 0===t||t.cleanup(),null===(e=this.disposeOnChange)||void 0===e||e.call(this)}async componentWillLoad(){var t,e,i;await m(this.locale),b(this,this.el),this.slots=u(this.el),this.autoSuggestShow&&(this.autoSuggestHandler=((t,e,i)=>{let s;const o=()=>clearTimeout(s);return{handleInputChange:o=>{n(t,o),clearTimeout(s),o?s=setTimeout((()=>{c(t,o,e,i)}),300):h(t)},cancelPending:o,cleanup:o}})(this.storeName,this.token,this.apiPath)),this.recognition=((t,e,i,s)=>{const o=(()=>{const t=window,e=t.webkitSpeechRecognition||t.SpeechRecognition;if(!e)return;const{forbiddenBrowser:i,isChrome:s,isSafari:o}=j();return i?void 0:s||o?e:void 0})();if(!o)return;const r=new o;let a;return r.interimResults=!1,r.maxAlternatives=1,r.continuous=!1,r.lang=t,r.onstart=()=>{e(),a=setTimeout((()=>{r.stop()}),1e4)},r.onspeechend=()=>{r.stop(),i(),clearTimeout(a)},r.onend=i,r.onresult=t=>{s(t.results[0][0].transcript)},r})(null!==(t=this.locale)&&void 0!==t?t:v.locale,(()=>{this.showRecording(),this.setShowTooltip(!1),clearTimeout(this.triggerTooltipStart)}),this.hideRecording,(t=>{n(this.storeName,t),this.handleTextSearch()})),(null===(e=this.searchQuery)||void 0===e?void 0:e.length)>0&&n(this.storeName,this.searchQuery),!this.showInWidget&&(null===(i=this.searchQuery)||void 0===i?void 0:i.length)>0&&(this.vviinnTextSearchStarted.emit({query:this.searchQuery,isTriggeredByVpsWidget:this.showInWidget}),this.trackTextSearch())}handleInputChange(t){this.searchSubmitted=!1;const e=t.target.value;this.autoSuggestShow?this.autoSuggestHandler.handleInputChange(e):n(this.storeName,e)}handleTextSearchRedirect(t,e,i){const s=Object.assign(Object.assign({},this.getBasicEventData()),{url:t,source:e,query:i});this.vviinnRedirect.emit(s).defaultPrevented?this.state.redirect=null:window.location.href=t}render(){return t(s,{key:"a97f9685f46a30ca9ab12396ee1aa01482731370",exportparts:`${y}, ${w}`},t("div",{key:"384e2cc006c0c66b2e50d56631beb538cbaa4f07",class:"text-search-container",part:"text-search-container"},t("input",Object.assign({key:"5e571ee58eab698531946a19c5e92fb970340d33",class:"text-search-input",part:"text-search-input",type:"text",placeholder:this.getPlaceholderText(),value:this.state.textSearchQuery||"",onInput:t=>this.handleInputChange(t),onKeyDown:this.handleKeyDown,onBlur:this.autoSuggestShow?this.hideSuggestions:void 0},this.autoSuggestShow&&{role:"combobox","aria-autocomplete":"list","aria-expanded":this.autoSuggestCompletions.length>0&&this.state.textSearchQuery?"true":"false","aria-controls":"suggestions-listbox","aria-activedescendant":this.activeSuggestionIndex>=0?`suggestion-${this.activeSuggestionIndex}`:void 0})),"extended"===this.mode&&t("vviinn-vps-button",Object.assign({key:"a92908b647b3f07546bfa3e3a15f7306374cd59d",token:this.token,locale:this.locale,apiPath:this.apiPath,addStyle:!1,showResultsInModal:!1,resultsPageUrl:this.resultsPageUrl,resultsPageParams:this.resultsPageParams},this.exampleImageSource&&{exampleImageSource:this.exampleImageSource},null!=this.cssUrl&&{cssUrl:this.cssUrl},this.visualSearchMode&&{mode:this.visualSearchMode},{parentSlots:this.slots})),"basic"===this.mode&&t("slot",{key:"06e20a8744dea22ee8bd51d5a1e37b5e29b0b7f4",name:"vviinn-text-search-actions"}),("extended"===this.mode||this.showInWidget)&&this.recognition&&t("button",{key:"1ab2f0acb7137c36231a542234a717e34430474f",class:"speech-button",part:"speech-button","aria-label":x.t("a11y.speechButton"),onClick:this.handleSpeech,onKeyDown:t=>this.handleButtonKeyDown(t,this.handleSpeech)},t(z,{key:"eb97b29086e9e5ad18b1ff6ac9637b760ae2c83a"}),this.isShowRecording()&&t("span",{key:"dc8cecbb91eaa4a5195727b50919022898630a23",class:"recording-indicator"})),t("button",{key:"ebd39b8d86ab47cd4fadda6a5ad30c8001bd8c5a",class:"text-search-button",part:"text-search-button",onClick:()=>this.handleTextSearch(),onKeyDown:t=>this.handleButtonKeyDown(t,this.handleTextSearch),disabled:"loading"===this.state.searchStatus,"aria-label":x.t("a11y.textSearchButton")},this.isShowPreloader()?t("vviinn-preloader",null):t("slot",{name:"vviinn-text-search-icon"},t(T,null)))),this.autoSuggestShow&&(i=this.state.textSearchQuery,o=this.activeSuggestionIndex,r=this.selectSuggestion,(e=this.autoSuggestCompletions).length&&i?t("ul",{class:"suggestions-container",part:"suggestions-container",role:"listbox",id:"suggestions-listbox"},e.map(((e,s)=>t("li",{id:`suggestion-${s}`,class:{"suggestion-item":!0,"suggestion-item--active":s===o},part:"suggestion-item",role:"option","aria-selected":s===o?"true":"false",onMouseDown:t=>{t.preventDefault(),r(e)}},((e,i)=>{const s=e.toLowerCase(),o=i.toLowerCase(),r=s.indexOf(o);if(-1===r)return e;const a=e.slice(0,r),n=e.slice(r,r+i.length),h=e.slice(r+i.length);return[a,t("span",{class:"suggestion-highlight"},n),h]})(e.suggestion,i))))):null),this.showTooltip&&t("p",{key:"d59b3a49c6bda6b2992e3b0aa7bffb4ef674d3b6",class:"text-search-tooltip",part:"text-search-tooltip"},x.t(this.tooltipText)));var e,i,o,r}get el(){return o(this)}};I.style=':host{--font-family-base:Inter, system-ui, sans-serif;--font-family-mono:monospace;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;--font-size-display:32px;--font-size-title:24px;--font-size-headline:18px;--font-size-label-large:16px;--font-size-label:14px;--font-size-body-large:16px;--font-size-body:14px;--font-size-caption:12px;--line-height-display:40px;--line-height-title:32px;--line-height-headline:24px;--line-height-label-large:24px;--line-height-label:20px;--line-height-body-large:24px;--line-height-body:20px;--line-height-caption:16px;--letter-spacing-title:0px;--letter-spacing-headline:0px;--letter-spacing-label-large:0px;--letter-spacing-label:0px;--letter-spacing-body-large:0px;--letter-spacing-body:0px;--letter-spacing-caption:0px;--font-weight-400:400;--font-weight-500:500;--font-weight-600:600;--font-weight-700:700;--spacing-none:0px;--spacing-25:2px;--spacing-50:4px;--spacing-75:6px;--spacing-100:8px;--spacing-125:10px;--spacing-150:12px;--spacing-200:16px;--spacing-250:20px;--spacing-300:24px;--spacing-400:32px;--spacing-500:40px;--spacing-600:48px;--border-radius-none:0px;--border-radius-25:2px;--border-radius-50:4px;--border-radius-100:8px;--border-radius-150:12px;--border-radius-200:16px;--border-radius-300:24px;--border-radius-400:32px;--border-radius-full:9999px;--stroke-width-none:0px;--stroke-width-25:1px;--stroke-width-50:2px;--stroke-width-75:3px;--stroke-width-100:4px;--stroke-width-150:6px;--stroke-width-200:8px;--stroke-width-300:12px;--product-card-widget-min-width:135px;--product-card-results-min-width:250px;--image-set-mode-min-width:155px;--source-card-set-mode-max-width:500px;--filter-blur-none:0px;--filter-blur-100:8px;--filter-blur-150:12px;--filter-blur-200:16px;--color-bg-base:#ffffff;--color-bg-inverse:#161616;--color-border-00:#ffffff;--color-border-01:#f4f4f4;--color-border-02:#e0e0e0;--color-border-03:#c6c6c6;--color-border-inverse-00:#161616;--color-border-inverse-01:#393939;--color-field-01:#ffffff;--color-field-02:#f4f4f4;--color-icon-primary:#161616;--color-icon-secondary:#525252;--color-icon-helper:#8d8d8d;--color-icon-on-color:#ffffff;--color-icon-inverse:#ffffff;--color-icon-disabled:#16161640;--color-text-primary:#161616;--color-text-secondary:#707070;--color-text-helper:#8d8d8d;--color-text-placeholder:#a8a8a8;--color-text-on-color:#ffffff;--color-text-inverse:#ffffff;--color-text-disabled:#16161640;--button-bg-color-primary:#000000;--button-bg-color-primary-hover:#161616;--button-bg-color-primary-active:#1e1e1e;--button-bg-color-secondary:#f4f4f4;--button-bg-color-secondary-hover:#e0e0e0;--button-bg-color-secondary-active:#c6c6c6;--button-bg-color-ghost-hover:#f4f4f4;--button-bg-color-ghost-active:#eaeaea;--button-bg-color-frosted:#6f6f6f66;--button-bg-color-frosted-hover:#6f6f6f80;--button-bg-color-frosted-active:#6f6f6f99;--button-bg-color-disabled:#e0e0e0;--button-bg-color-positive:#dcfce7;--surface-bg-color-01:#f4f4f4;--surface-bg-color-01-hover:#eaeaea;--surface-bg-color-01-active:#e0e0e0;--surface-bg-color-02:#ffffff;--surface-bg-color-inverse:#262626;--surface-bg-color-inverse-hover:#303030;--surface-bg-color-inverse-active:#393939;--surface-bg-color-disabled:#e0e0e0;--surface-bg-color-shadow-01:#dddddd;--surface-bg-color-shadow-02:#c6c6c6;--chip-bg-color-primary:#161616;--chip-bg-color-primary-hover:#1e1e1e;--chip-bg-color-primary-active:#262626;--chip-bg-color-subtle:#f4f4f4;--chip-bg-color-subtle-hover:#eaeaea;--chip-bg-color-subtle-active:#e0e0e0;--chip-bg-color-outline-hover:#f4f4f4;--chip-bg-color-outline-active:#eaeaea;--label-bg-color-accent:#ff3944;--sidebar-animation-duration-default:0.5s;--search-modal-animation-duration-default:0.25s;--search-modal-animation-duration-mobile-default:0.35s;}:host{display:block;position:relative;width:100%;}.text-search-container{display:flex;align-items:center;gap:var(--spacing-50);width:100%;height:46px;border:1px solid var(--color-border-02);border-radius:8px;transition:border-color 0.2s;overflow:hidden;box-sizing:border-box}.text-search-container:focus-within{border-color:#8d8d8d}.text-search-input,.text-search-tooltip{font-size:16px;font-style:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base))}.text-search-input{height:100%;padding-left:16px;box-sizing:border-box;border:none;outline:none;overflow:hidden;text-overflow:ellipsis;flex-grow:2;width:150px}.text-search-input::-moz-placeholder{color:#a8a8a8}.text-search-input::placeholder{color:#a8a8a8}.text-search-input:focus,.text-search-input:active{border-color:#8d8d8d}vviinn-vps-button{height:100%}.text-search-button,.speech-button,vviinn-vps-button::part(vviinn-button){border:none;height:100%;display:flex;justify-content:center;align-items:center;cursor:pointer}.speech-button,vviinn-vps-button::part(vviinn-button){padding:0 8px}.upload-button-text{display:contents}.text-search-button{background-color:#f4f4f4;transition:background-color 0.2s;aspect-ratio:1 / 1;border-radius:0 7px 7px 0}.speech-button{background-color:transparent;position:relative}@keyframes recordingSpeech{0%{background-color:#ff0000;scale:1}100%{background-color:#ff8888;scale:1.5}}.recording-indicator{border-radius:50%;width:8px;height:8px;left:24px;top:24px;background-color:#ff0000;position:absolute;animation:recordingSpeech 1s infinite alternate ease-in-out}@keyframes fade-out{0%{opacity:0}20%{opacity:1}80%{opacity:1}100%{opacity:0;display:none}}.text-search-tooltip{position:absolute;right:0;top:80%;background:#f4f4f4;animation:fade-out 5s forwards;width:-moz-fit-content;width:fit-content;padding:24px;border-radius:8px;border:1px solid #8d8d8d;box-sizing:border-box}.text-search-button:not(:disabled):hover{background-color:#e0e0e0}.text-search-button:disabled{cursor:unset}vviinn-image-selector,::slotted([slot="vviinn-text-search-actions"]){margin:auto 8px}vviinn-preloader{--preloader-size:16px;display:flex;color:#525252}.suggestions-container{position:absolute;top:100%;left:0;right:0;margin:var(--spacing-50) 0 0;padding:4px;list-style:none;background:#ffffff;border:1px solid #fafafa;border-radius:8px;box-shadow:0px 4px 12px rgba(0, 0, 0, 0.08);box-sizing:border-box;z-index:10}.suggestion-item{padding:4px 8px;border-radius:4px;font-size:16px;line-height:normal;font-weight:400;font-family:var(--font-family, var(--font-family-base));cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.suggestion-item:hover,.suggestion-item--active{background-color:#f4f4f4}.suggestion-highlight{font-weight:500}';export{I as vviinn_text_search}
|