@askdialog/dialog-vue 3.9.0 → 3.11.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/README.md +7 -6
- package/dist/components/DialogSearch/DialogSearchCollections.vue.d.ts +2 -2
- package/dist/components/DialogSearch/DialogSearchProductCard.vue.d.ts +2 -2
- package/dist/components/DialogSearch/DialogSearchProducts.vue.d.ts +2 -2
- package/dist/components/DialogSearch/searchCollections.d.ts +3 -3
- package/dist/components/DialogSearch/searchDisplay.d.ts +4 -4
- package/dist/components/DialogSearch/useDialogSearch.d.ts +6 -4
- package/dist/dialog-vue.css +1 -1
- package/dist/dialog-vue.js +539 -529
- package/dist/dialog-vue.umd.cjs +3 -3
- package/package.json +2 -2
package/dist/dialog-vue.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
1
|
+
var $e = Object.defineProperty;
|
|
2
|
+
var ke = (t, e, s) => e in t ? $e(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
|
|
3
|
+
var j = (t, e, s) => ke(t, typeof e != "symbol" ? e + "" : e, s);
|
|
4
|
+
import { defineComponent as w, createElementBlock as p, openBlock as u, toDisplayString as E, unref as B, createElementVNode as l, Fragment as M, renderList as Y, createVNode as R, createBlock as N, ref as A, computed as f, withDirectives as ce, withKeys as Te, vModelText as ue, onMounted as z, watch as U, renderSlot as Re, withCtx as de, withModifiers as Ae, createCommentVNode as x, resolveDynamicComponent as Le, mergeProps as xe, toHandlers as De, createTextVNode as Z, onUnmounted as pe, Teleport as Pe, normalizeStyle as Oe, normalizeClass as te, shallowRef as Ne } from "vue";
|
|
5
|
+
const qe = /* @__PURE__ */ new Set(["ar", "he", "iw", "fa", "ur"]), Me = (t) => t !== void 0 && qe.has(t.trim().toLowerCase().slice(0, 2)), He = (t) => Me(t) ? "rtl" : "ltr";
|
|
6
|
+
var H;
|
|
7
7
|
(function(t) {
|
|
8
8
|
t.OPEN_ASSISTANT = "open_assistant", t.OPEN_WITH_SUGGESTIONS = "OPEN_WITH_SUGGESTIONS", t.CLOSE_ASSISTANT = "close_assistant", t.SEND_MESSAGE = "PRODUCT_QUESTION", t.SEND_GENERIC_QUESTION = "GENERIC_QUESTION", t.TRACK_ADD_TO_CART = "TRACK_ADD_TO_CART", t.TRACK_SUBMIT_CHECKOUT = "TRACK_SUBMIT_CHECKOUT", t.TRACK_VIEW_SEARCH_RESULTS = "TRACK_VIEW_SEARCH_RESULTS", t.TRACK_SELECT_SEARCH_RESULT = "TRACK_SELECT_SEARCH_RESULT";
|
|
9
|
-
})(
|
|
10
|
-
var
|
|
9
|
+
})(H || (H = {}));
|
|
10
|
+
var se;
|
|
11
11
|
(function(t) {
|
|
12
12
|
t.USER_OPENED_ASSISTANT = "userOpenedAssistant", t.USER_CLOSED_ASSISTANT = "userClosedAssistant", t.USER_SENT_MESSAGE = "userSentMessage", t.USER_CLICKED_ON_PRODUCT_CARD = "userClickedOnProductCard", t.USER_OPENED_RECOMMENDATION = "userOpenedRecommendation", t.USER_ADDED_TO_CART = "userAddedToCart", t.USER_SEND_POSITIVE_FEEDBACK = "userSendPositiveFeedback", t.USER_SEND_NEGATIVE_FEEDBACK = "userSendNegativeFeedback";
|
|
13
|
-
})(
|
|
14
|
-
|
|
15
|
-
class
|
|
16
|
-
constructor({ status: s, code: o, message:
|
|
17
|
-
super(
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
})(se || (se = {}));
|
|
14
|
+
H.TRACK_ADD_TO_CART, H.TRACK_SUBMIT_CHECKOUT, H.TRACK_VIEW_SEARCH_RESULTS, H.TRACK_SELECT_SEARCH_RESULT;
|
|
15
|
+
class Ue extends Error {
|
|
16
|
+
constructor({ status: s, code: o, message: r }) {
|
|
17
|
+
super(r);
|
|
18
|
+
j(this, "status");
|
|
19
|
+
j(this, "code");
|
|
20
20
|
this.name = "DialogSearchError", this.status = s, this.code = o;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const
|
|
23
|
+
const J = (t, e, s) => {
|
|
24
24
|
if (!/^[a-z]{2}$/.test(e))
|
|
25
25
|
throw new Error("Search language must be a lowercase ISO 639-1 code.");
|
|
26
|
-
if (!/^[A-Za-z]{
|
|
27
|
-
throw new Error("Search
|
|
26
|
+
if (!/^[A-Za-z]{2}$/.test(s))
|
|
27
|
+
throw new Error("Search country must be an ISO 3166-1 alpha-2 code.");
|
|
28
28
|
return `${t}_${e}_${s.toLowerCase()}`;
|
|
29
|
-
},
|
|
30
|
-
const t =
|
|
29
|
+
}, oe = "multiple installation methods detected:", Ve = () => typeof window > "u" ? void 0 : window, he = () => {
|
|
30
|
+
const t = Ve();
|
|
31
31
|
if (t !== void 0)
|
|
32
32
|
return t.dialog = t.dialog ?? {}, t.dialog.audit = t.dialog.audit ?? {
|
|
33
33
|
methods: [],
|
|
@@ -35,122 +35,123 @@ const X = (t, e, s) => {
|
|
|
35
35
|
capabilities: [],
|
|
36
36
|
warnings: []
|
|
37
37
|
}, t.dialog.audit;
|
|
38
|
-
},
|
|
39
|
-
if (t.warnings = t.warnings.filter((e) => !e.startsWith(
|
|
38
|
+
}, Be = (t) => {
|
|
39
|
+
if (t.warnings = t.warnings.filter((e) => !e.startsWith(oe)), t.methods.length >= 2) {
|
|
40
40
|
const e = t.methods.map((s) => s.method).join(", ");
|
|
41
|
-
t.warnings.push(`${
|
|
41
|
+
t.warnings.push(`${oe} ${e}`);
|
|
42
42
|
}
|
|
43
|
-
},
|
|
43
|
+
}, Ke = (t, e) => e === void 0 ? t : {
|
|
44
44
|
version: (t == null ? void 0 : t.version) ?? e.version,
|
|
45
45
|
commit: (t == null ? void 0 : t.commit) ?? e.commit
|
|
46
|
-
},
|
|
47
|
-
const e =
|
|
46
|
+
}, _e = (t) => {
|
|
47
|
+
const e = he();
|
|
48
48
|
if (e === void 0)
|
|
49
49
|
return;
|
|
50
50
|
const s = e.methods.find((o) => o.method === t.method);
|
|
51
51
|
if (s === void 0) {
|
|
52
|
-
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }),
|
|
52
|
+
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }), Be(e);
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
s.version = s.version ?? t.version, s.build =
|
|
56
|
-
},
|
|
57
|
-
const e =
|
|
55
|
+
s.version = s.version ?? t.version, s.build = Ke(s.build, t.build), s.source = s.source ?? t.source;
|
|
56
|
+
}, Fe = (t) => {
|
|
57
|
+
const e = he();
|
|
58
58
|
e !== void 0 && (e.capabilities.includes(t) || e.capabilities.push(t));
|
|
59
|
-
},
|
|
59
|
+
}, D = {
|
|
60
60
|
IDLE: "idle",
|
|
61
61
|
LOADING: "loading",
|
|
62
62
|
SUCCESS: "success",
|
|
63
63
|
/** Successful request with zero hits. */
|
|
64
64
|
EMPTY: "empty",
|
|
65
65
|
ERROR: "error"
|
|
66
|
-
},
|
|
67
|
-
function
|
|
68
|
-
let
|
|
66
|
+
}, ze = 0.5, Ge = 500, je = 1500, Qe = 100;
|
|
67
|
+
function We({ emit: t, visibilityThreshold: e = ze, dwellMs: s = Ge, idleFlushMs: o = je, maxItemsPerEvent: r = Qe }) {
|
|
68
|
+
let n, a = [];
|
|
69
69
|
const i = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
70
|
-
let
|
|
70
|
+
let h;
|
|
71
71
|
const c = () => {
|
|
72
|
-
clearTimeout(
|
|
73
|
-
},
|
|
74
|
-
if (
|
|
72
|
+
clearTimeout(h), !(n === void 0 || a.length === 0) && (t({ ...n, items: a }), a = []);
|
|
73
|
+
}, g = (m) => {
|
|
74
|
+
if (n === void 0)
|
|
75
75
|
return;
|
|
76
|
-
const
|
|
77
|
-
if (!i.has(
|
|
78
|
-
if (i.add(
|
|
76
|
+
const C = `${n.query_id}:${m.product_id}`;
|
|
77
|
+
if (!i.has(C)) {
|
|
78
|
+
if (i.add(C), a.push(m), a.length >= r) {
|
|
79
79
|
c();
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
clearTimeout(
|
|
82
|
+
clearTimeout(h), h = setTimeout(c, o);
|
|
83
83
|
}
|
|
84
|
-
},
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
for (const
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
d.delete(
|
|
92
|
-
}, s)) :
|
|
84
|
+
}, S = (m) => {
|
|
85
|
+
const C = d.get(m);
|
|
86
|
+
C !== void 0 && (clearTimeout(C), d.delete(m));
|
|
87
|
+
}, v = new IntersectionObserver((m) => {
|
|
88
|
+
for (const C of m) {
|
|
89
|
+
const y = _.get(C.target);
|
|
90
|
+
y !== void 0 && (C.intersectionRatio >= e ? d.has(C.target) || d.set(C.target, setTimeout(() => {
|
|
91
|
+
d.delete(C.target), g(y);
|
|
92
|
+
}, s)) : S(C.target));
|
|
93
93
|
}
|
|
94
|
-
}, { threshold: e }),
|
|
95
|
-
|
|
96
|
-
for (const
|
|
97
|
-
clearTimeout(
|
|
94
|
+
}, { threshold: e }), $ = () => {
|
|
95
|
+
v.disconnect();
|
|
96
|
+
for (const m of d.values())
|
|
97
|
+
clearTimeout(m);
|
|
98
98
|
d.clear(), _.clear();
|
|
99
|
-
},
|
|
99
|
+
}, k = () => {
|
|
100
100
|
c();
|
|
101
|
-
},
|
|
102
|
-
if (
|
|
101
|
+
}, T = (m) => {
|
|
102
|
+
if (m.persisted) {
|
|
103
103
|
i.clear();
|
|
104
|
-
for (const
|
|
105
|
-
|
|
104
|
+
for (const C of _.keys())
|
|
105
|
+
S(C), v.unobserve(C), v.observe(C);
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
return window.addEventListener("pagehide",
|
|
109
|
-
setContext(
|
|
110
|
-
c(), i.clear(),
|
|
108
|
+
return window.addEventListener("pagehide", k), window.addEventListener("pageshow", T), {
|
|
109
|
+
setContext(m) {
|
|
110
|
+
c(), i.clear(), n = m, $();
|
|
111
111
|
},
|
|
112
|
-
observe(
|
|
113
|
-
_.set(
|
|
112
|
+
observe(m, C) {
|
|
113
|
+
_.set(m, C), v.observe(m);
|
|
114
114
|
},
|
|
115
|
-
forceImpression(
|
|
116
|
-
|
|
115
|
+
forceImpression(m) {
|
|
116
|
+
g(m), c();
|
|
117
117
|
},
|
|
118
118
|
flush: c,
|
|
119
119
|
disconnect() {
|
|
120
|
-
c(),
|
|
120
|
+
c(), $(), window.removeEventListener("pagehide", k), window.removeEventListener("pageshow", T);
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
}
|
|
124
|
-
const
|
|
125
|
-
|
|
124
|
+
const ne = (t, e) => ({
|
|
125
|
+
// `objectID` is the variant id; analytics count products.
|
|
126
|
+
product_id: String(t.hits[e].id),
|
|
126
127
|
// One-based position across all pages.
|
|
127
128
|
position: t.page * t.hitsPerPage + e + 1
|
|
128
129
|
});
|
|
129
|
-
function
|
|
130
|
+
function Xe(t) {
|
|
130
131
|
let e, s;
|
|
131
|
-
const o = () => (e ?? (e =
|
|
132
|
+
const o = () => (e ?? (e = We({
|
|
132
133
|
emit: t.trackViewSearchResults
|
|
133
134
|
})), e);
|
|
134
135
|
return {
|
|
135
|
-
onResponse(
|
|
136
|
+
onResponse(r) {
|
|
136
137
|
s = {
|
|
137
|
-
query_id:
|
|
138
|
-
index:
|
|
138
|
+
query_id: r.queryID,
|
|
139
|
+
index: r.index,
|
|
139
140
|
surface: t.surface,
|
|
140
141
|
search_type: "lexical",
|
|
141
142
|
// Convert the API page to one-based analytics numbering.
|
|
142
|
-
page:
|
|
143
|
-
total_hits:
|
|
144
|
-
query_length: [...
|
|
145
|
-
}, o().setContext(s),
|
|
143
|
+
page: r.page + 1,
|
|
144
|
+
total_hits: r.nbHits,
|
|
145
|
+
query_length: [...r.query].length
|
|
146
|
+
}, o().setContext(s), r.nbHits === 0 && t.trackViewSearchResults({ ...s, items: [] });
|
|
146
147
|
},
|
|
147
|
-
observeResult(
|
|
148
|
-
o().observe(
|
|
148
|
+
observeResult(r, n, a) {
|
|
149
|
+
o().observe(r, ne(n, a));
|
|
149
150
|
},
|
|
150
|
-
select(
|
|
151
|
+
select(r, n) {
|
|
151
152
|
if (s === void 0)
|
|
152
153
|
return;
|
|
153
|
-
const a =
|
|
154
|
+
const a = ne(r, n);
|
|
154
155
|
o().forceImpression(a), t.trackSelectSearchResult({ ...s, items: [a] });
|
|
155
156
|
},
|
|
156
157
|
dispose() {
|
|
@@ -158,141 +159,154 @@ function je(t) {
|
|
|
158
159
|
}
|
|
159
160
|
};
|
|
160
161
|
}
|
|
161
|
-
const
|
|
162
|
+
const Q = {
|
|
163
|
+
status: D.IDLE,
|
|
164
|
+
query: "",
|
|
165
|
+
page: 0,
|
|
166
|
+
response: void 0,
|
|
167
|
+
sections: void 0,
|
|
168
|
+
error: void 0
|
|
169
|
+
}, Ye = 2, re = (t) => {
|
|
162
170
|
const e = t.trim();
|
|
163
|
-
return [...e].length >=
|
|
164
|
-
},
|
|
171
|
+
return [...e].length >= Ye ? e : void 0;
|
|
172
|
+
}, Ze = (t, e, s, { indexName: o, language: r, country: n, hitsPerPage: a }) => ({
|
|
165
173
|
requests: [
|
|
166
174
|
{ indexName: o, query: t, page: e, hitsPerPage: a },
|
|
167
175
|
...s.map((i) => ({
|
|
168
|
-
indexName:
|
|
176
|
+
indexName: J(i.index, r, n),
|
|
169
177
|
query: t,
|
|
170
178
|
page: 0,
|
|
171
179
|
hitsPerPage: i.hitsPerPage ?? a
|
|
172
180
|
}))
|
|
173
181
|
]
|
|
174
|
-
}),
|
|
175
|
-
const
|
|
176
|
-
if (
|
|
182
|
+
}), Je = (t, e, { indexName: s, language: o, country: r }) => {
|
|
183
|
+
const n = t.results.find((i) => i.index === s);
|
|
184
|
+
if (n === void 0)
|
|
177
185
|
throw new Error(`Dialog search returned no ${s} entry`);
|
|
178
186
|
const a = {};
|
|
179
187
|
for (const i of e) {
|
|
180
|
-
const _ =
|
|
188
|
+
const _ = J(i.index, o, r), d = t.results.find((h) => h.index === _);
|
|
181
189
|
d !== void 0 && (a[i.index] = d);
|
|
182
190
|
}
|
|
183
191
|
return {
|
|
184
|
-
|
|
192
|
+
// Each index answers its own record type.
|
|
193
|
+
response: n,
|
|
185
194
|
sections: e.length === 0 ? void 0 : a
|
|
186
195
|
};
|
|
187
|
-
}, j = {
|
|
188
|
-
status: A.IDLE,
|
|
189
|
-
query: "",
|
|
190
|
-
page: 0,
|
|
191
|
-
response: void 0,
|
|
192
|
-
sections: void 0,
|
|
193
|
-
error: void 0
|
|
194
196
|
};
|
|
195
|
-
function
|
|
196
|
-
const
|
|
197
|
-
indexName:
|
|
197
|
+
function et({ search: t, language: e, country: s, analytics: o, navigate: r, buildProductUrl: n, debounceMs: a = 250, hitsPerPage: i = 12, sections: _ = [] }) {
|
|
198
|
+
const d = {
|
|
199
|
+
indexName: J("products", e, s),
|
|
198
200
|
language: e,
|
|
199
|
-
|
|
200
|
-
hitsPerPage:
|
|
201
|
+
country: s,
|
|
202
|
+
hitsPerPage: i
|
|
201
203
|
};
|
|
202
|
-
let
|
|
203
|
-
const
|
|
204
|
-
let
|
|
205
|
-
const
|
|
206
|
-
|
|
207
|
-
for (const
|
|
208
|
-
|
|
209
|
-
}, b = () => {
|
|
210
|
-
clearTimeout(
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
const
|
|
214
|
-
|
|
204
|
+
let h = Q;
|
|
205
|
+
const c = /* @__PURE__ */ new Set(), g = Xe(o);
|
|
206
|
+
let S, v, $, k = 0, T = !1;
|
|
207
|
+
const m = (b) => {
|
|
208
|
+
h = { ...h, ...b };
|
|
209
|
+
for (const I of c)
|
|
210
|
+
I(h);
|
|
211
|
+
}, C = (b) => b.url !== void 0 && b.url !== "" ? b.url : n == null ? void 0 : n(b), y = () => {
|
|
212
|
+
clearTimeout(S), v = void 0, k += 1, $ == null || $.abort(), $ = void 0;
|
|
213
|
+
}, L = async (b, I) => {
|
|
214
|
+
y(), $ = new AbortController();
|
|
215
|
+
const q = k;
|
|
216
|
+
m({ status: D.LOADING, query: b, page: I });
|
|
215
217
|
try {
|
|
216
|
-
const
|
|
217
|
-
signal:
|
|
218
|
+
const O = typeof _ == "function" ? _() : _, ee = Ze(b, I, O, d), we = await t(ee, {
|
|
219
|
+
signal: $.signal
|
|
218
220
|
});
|
|
219
|
-
if (
|
|
221
|
+
if (q !== k)
|
|
220
222
|
return;
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
...
|
|
224
|
-
status:
|
|
223
|
+
const G = Je(we, O, d);
|
|
224
|
+
g.onResponse(G.response), m({
|
|
225
|
+
...G,
|
|
226
|
+
status: G.response.nbHits === 0 ? D.EMPTY : D.SUCCESS,
|
|
225
227
|
error: void 0
|
|
226
228
|
});
|
|
227
|
-
} catch (
|
|
228
|
-
if (
|
|
229
|
+
} catch (O) {
|
|
230
|
+
if (O instanceof DOMException && O.name === "AbortError" || q !== k)
|
|
229
231
|
return;
|
|
230
|
-
|
|
231
|
-
status:
|
|
232
|
-
error:
|
|
232
|
+
m({
|
|
233
|
+
status: D.ERROR,
|
|
234
|
+
error: O,
|
|
233
235
|
response: void 0,
|
|
234
236
|
sections: void 0
|
|
235
237
|
});
|
|
236
238
|
}
|
|
237
239
|
};
|
|
238
240
|
return {
|
|
239
|
-
setQuery(
|
|
240
|
-
if (
|
|
241
|
+
setQuery(b) {
|
|
242
|
+
if (T)
|
|
241
243
|
return;
|
|
242
|
-
|
|
243
|
-
const
|
|
244
|
-
if (
|
|
245
|
-
|
|
244
|
+
y();
|
|
245
|
+
const I = re(b);
|
|
246
|
+
if (I === void 0) {
|
|
247
|
+
m(Q);
|
|
246
248
|
return;
|
|
247
249
|
}
|
|
248
|
-
v =
|
|
250
|
+
v = I, S = setTimeout(() => void L(I, 0), a);
|
|
249
251
|
},
|
|
250
|
-
submit(
|
|
251
|
-
if (
|
|
252
|
+
submit(b) {
|
|
253
|
+
if (T)
|
|
252
254
|
return;
|
|
253
|
-
|
|
254
|
-
const
|
|
255
|
-
if (
|
|
256
|
-
|
|
255
|
+
y();
|
|
256
|
+
const I = re(b);
|
|
257
|
+
if (I === void 0) {
|
|
258
|
+
m(Q);
|
|
257
259
|
return;
|
|
258
260
|
}
|
|
259
|
-
|
|
261
|
+
L(I, 0);
|
|
260
262
|
},
|
|
261
|
-
setPage(
|
|
262
|
-
if (
|
|
263
|
+
setPage(b) {
|
|
264
|
+
if (!T) {
|
|
263
265
|
if (v !== void 0) {
|
|
264
|
-
|
|
266
|
+
L(v, 0);
|
|
265
267
|
return;
|
|
266
268
|
}
|
|
267
|
-
|
|
269
|
+
h.query !== "" && L(h.query, b);
|
|
268
270
|
}
|
|
269
271
|
},
|
|
270
272
|
retry() {
|
|
271
|
-
|
|
273
|
+
T || h.status !== D.ERROR || L(h.query, h.page);
|
|
272
274
|
},
|
|
273
|
-
observeResult(
|
|
274
|
-
|
|
275
|
+
observeResult(b, I) {
|
|
276
|
+
h.response !== void 0 && g.observeResult(b, h.response, I);
|
|
275
277
|
},
|
|
276
|
-
selectResult(
|
|
277
|
-
const
|
|
278
|
-
if (
|
|
278
|
+
selectResult(b, I) {
|
|
279
|
+
const q = h.response;
|
|
280
|
+
if (q === void 0)
|
|
279
281
|
return !1;
|
|
280
|
-
|
|
281
|
-
const
|
|
282
|
-
return ((
|
|
282
|
+
g.select(q, b);
|
|
283
|
+
const O = C(q.hits[b]);
|
|
284
|
+
return ((I == null ? void 0 : I.navigate) ?? !0) && r !== void 0 && O !== void 0 ? (r(O, q.hits[b]), !0) : !1;
|
|
283
285
|
},
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
286
|
+
productUrl: C,
|
|
287
|
+
subscribe(b) {
|
|
288
|
+
return c.add(b), () => {
|
|
289
|
+
c.delete(b);
|
|
287
290
|
};
|
|
288
291
|
},
|
|
289
|
-
getState: () =>
|
|
292
|
+
getState: () => h,
|
|
290
293
|
dispose() {
|
|
291
|
-
|
|
294
|
+
T = !0, y(), c.clear(), g.dispose();
|
|
292
295
|
}
|
|
293
296
|
};
|
|
294
297
|
}
|
|
295
|
-
const
|
|
298
|
+
const ge = (t, e, s) => {
|
|
299
|
+
if (t === void 0 || !Number.isFinite(t))
|
|
300
|
+
return "";
|
|
301
|
+
try {
|
|
302
|
+
return e === void 0 ? new Intl.NumberFormat(s).format(t) : new Intl.NumberFormat(s, { style: "currency", currency: e }).format(t);
|
|
303
|
+
} catch {
|
|
304
|
+
return "";
|
|
305
|
+
}
|
|
306
|
+
}, fe = ({ variants_min_price: t, currency: e }, s) => ge(t, e, s), tt = (t, e) => {
|
|
307
|
+
const { variants_min_price: s, variants_compare_at_price_min: o } = t;
|
|
308
|
+
return s === void 0 || o === void 0 || !(o > s) || fe(t, e) === "" ? "" : ge(o, t.currency, e);
|
|
309
|
+
}, ie = {
|
|
296
310
|
en: {
|
|
297
311
|
placeholder: "Ask the AI a question",
|
|
298
312
|
aiDisclosure: "You're chatting with an AI assistant. It can make mistakes, so please double-check important information",
|
|
@@ -308,11 +322,11 @@ const oe = {
|
|
|
308
322
|
aiDisclosure: "Estás chateando con un asistente de IA. Puede cometer errores, así que verifica la información importante",
|
|
309
323
|
askSomethingElse: "Pregunta otra cosa"
|
|
310
324
|
}
|
|
311
|
-
},
|
|
325
|
+
}, ve = (t) => {
|
|
312
326
|
var s;
|
|
313
327
|
const e = ((s = t == null ? void 0 : t.split("-")[0]) == null ? void 0 : s.toLowerCase()) ?? "en";
|
|
314
|
-
return
|
|
315
|
-
},
|
|
328
|
+
return ie[e] ?? ie.en;
|
|
329
|
+
}, st = ["disabled"], ot = /* @__PURE__ */ w({
|
|
316
330
|
__name: "DialogAskSomethingElse",
|
|
317
331
|
props: {
|
|
318
332
|
client: {},
|
|
@@ -333,19 +347,19 @@ const oe = {
|
|
|
333
347
|
}
|
|
334
348
|
});
|
|
335
349
|
};
|
|
336
|
-
return (o,
|
|
350
|
+
return (o, r) => (u(), p("button", {
|
|
337
351
|
type: "button",
|
|
338
352
|
class: "dialog-ask-something-else",
|
|
339
353
|
disabled: e.disabled,
|
|
340
354
|
onClick: s
|
|
341
|
-
},
|
|
355
|
+
}, E(B(ve)(e.client.locale).askSomethingElse), 9, st));
|
|
342
356
|
}
|
|
343
|
-
}),
|
|
357
|
+
}), P = (t, e) => {
|
|
344
358
|
const s = t.__vccOpts || t;
|
|
345
|
-
for (const [o,
|
|
346
|
-
s[o] =
|
|
359
|
+
for (const [o, r] of e)
|
|
360
|
+
s[o] = r;
|
|
347
361
|
return s;
|
|
348
|
-
},
|
|
362
|
+
}, nt = /* @__PURE__ */ P(ot, [["__scopeId", "data-v-d0e272a0"]]), rt = { class: "dialog-block-header-container" }, it = { class: "dialog-block-title" }, at = { class: "dialog-block-description" }, lt = /* @__PURE__ */ w({
|
|
349
363
|
__name: "DialogBlockHeader",
|
|
350
364
|
props: {
|
|
351
365
|
title: {},
|
|
@@ -353,26 +367,26 @@ const oe = {
|
|
|
353
367
|
},
|
|
354
368
|
setup(t) {
|
|
355
369
|
const e = t;
|
|
356
|
-
return (s, o) => (u(),
|
|
357
|
-
l("div",
|
|
358
|
-
l("div",
|
|
370
|
+
return (s, o) => (u(), p("div", rt, [
|
|
371
|
+
l("div", it, E(e.title ?? "Your expert"), 1),
|
|
372
|
+
l("div", at, E(e.description ?? "A question about this product?"), 1)
|
|
359
373
|
]));
|
|
360
374
|
}
|
|
361
|
-
}),
|
|
375
|
+
}), ct = /* @__PURE__ */ P(lt, [["__scopeId", "data-v-28e6dda7"]]), ut = {
|
|
362
376
|
width: "20",
|
|
363
377
|
height: "20",
|
|
364
378
|
viewBox: "0 0 20 20",
|
|
365
379
|
fill: "none",
|
|
366
380
|
xmlns: "http://www.w3.org/2000/svg"
|
|
367
|
-
},
|
|
381
|
+
}, dt = { "clip-path": "url(#clip0_466_934)" }, pt = ["stroke"], ht = ["stroke"], _t = /* @__PURE__ */ w({
|
|
368
382
|
__name: "AiStarsIcon",
|
|
369
383
|
props: {
|
|
370
384
|
color: {}
|
|
371
385
|
},
|
|
372
386
|
setup(t) {
|
|
373
387
|
const e = t;
|
|
374
|
-
return (s, o) => (u(),
|
|
375
|
-
l("g",
|
|
388
|
+
return (s, o) => (u(), p("svg", ut, [
|
|
389
|
+
l("g", dt, [
|
|
376
390
|
l("path", {
|
|
377
391
|
d: `M5.41675 10.8333L6.07046 12.1408C6.2917 12.5832 6.40232 12.8045 6.55011
|
|
378
392
|
12.9962C6.68124 13.1663 6.83375 13.3188 7.00388 13.45C7.19559 13.5977 7.41684
|
|
@@ -388,7 +402,7 @@ const oe = {
|
|
|
388
402
|
"stroke-width": "1.5",
|
|
389
403
|
"stroke-linecap": "round",
|
|
390
404
|
"stroke-linejoin": "round"
|
|
391
|
-
}, null, 8,
|
|
405
|
+
}, null, 8, pt),
|
|
392
406
|
l("path", {
|
|
393
407
|
d: `M12.5001 1.66666L13.4823 4.22034C13.7173 4.83136 13.8348 5.13688 14.0175
|
|
394
408
|
5.39386C14.1795 5.62162 14.3785 5.82061 14.6062 5.98256C14.8632 6.16529 15.1687
|
|
@@ -404,7 +418,7 @@ const oe = {
|
|
|
404
418
|
"stroke-width": "1.5",
|
|
405
419
|
"stroke-linecap": "round",
|
|
406
420
|
"stroke-linejoin": "round"
|
|
407
|
-
}, null, 8,
|
|
421
|
+
}, null, 8, ht)
|
|
408
422
|
]),
|
|
409
423
|
o[0] || (o[0] = l("defs", null, [
|
|
410
424
|
l("clipPath", { id: "clip0_466_934" }, [
|
|
@@ -417,7 +431,7 @@ const oe = {
|
|
|
417
431
|
], -1))
|
|
418
432
|
]));
|
|
419
433
|
}
|
|
420
|
-
}),
|
|
434
|
+
}), gt = ["onClick"], ft = { class: "dialog-block-suggestions-item-label" }, vt = /* @__PURE__ */ w({
|
|
421
435
|
__name: "DialogBlockSuggestions",
|
|
422
436
|
props: {
|
|
423
437
|
client: {},
|
|
@@ -436,27 +450,27 @@ const oe = {
|
|
|
436
450
|
fromQuestionSuggestion: !0
|
|
437
451
|
});
|
|
438
452
|
};
|
|
439
|
-
return (o,
|
|
440
|
-
key:
|
|
453
|
+
return (o, r) => (u(!0), p(M, null, Y(e.questions, (n) => (u(), p("button", {
|
|
454
|
+
key: n.question,
|
|
441
455
|
class: "dialog-block-suggestions-item",
|
|
442
|
-
onClick: (a) => s(
|
|
456
|
+
onClick: (a) => s(n.question)
|
|
443
457
|
}, [
|
|
444
|
-
|
|
458
|
+
R(_t, {
|
|
445
459
|
class: "dialog-block-suggestions-item-icon",
|
|
446
460
|
color: e.client.theme.primaryColor
|
|
447
461
|
}, null, 8, ["color"]),
|
|
448
|
-
l("span",
|
|
449
|
-
], 8,
|
|
462
|
+
l("span", ft, E(n.question), 1)
|
|
463
|
+
], 8, gt))), 128));
|
|
450
464
|
}
|
|
451
|
-
}),
|
|
452
|
-
function
|
|
453
|
-
return u(),
|
|
465
|
+
}), mt = /* @__PURE__ */ P(vt, [["__scopeId", "data-v-db34d4b4"]]), bt = {};
|
|
466
|
+
function St(t, e) {
|
|
467
|
+
return u(), p(M, null, [
|
|
454
468
|
e[0] || (e[0] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
455
469
|
e[1] || (e[1] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
456
470
|
e[2] || (e[2] = l("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1))
|
|
457
471
|
], 64);
|
|
458
472
|
}
|
|
459
|
-
const
|
|
473
|
+
const Ct = /* @__PURE__ */ P(bt, [["render", St], ["__scopeId", "data-v-26a64b58"]]), Et = { class: "dialog-block-suggestions-container" }, yt = /* @__PURE__ */ w({
|
|
460
474
|
__name: "DialogBlockSuggestionsContainer",
|
|
461
475
|
props: {
|
|
462
476
|
client: {},
|
|
@@ -468,8 +482,8 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
468
482
|
},
|
|
469
483
|
setup(t) {
|
|
470
484
|
const e = t;
|
|
471
|
-
return (s, o) => (u(),
|
|
472
|
-
e.isLoading || !e.questions ? (u(),
|
|
485
|
+
return (s, o) => (u(), p("div", Et, [
|
|
486
|
+
e.isLoading || !e.questions ? (u(), N(Ct, { key: 0 })) : (u(), N(mt, {
|
|
473
487
|
key: 1,
|
|
474
488
|
client: e.client,
|
|
475
489
|
questions: e.questions,
|
|
@@ -479,33 +493,33 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
479
493
|
}, null, 8, ["client", "questions", "product-id", "product-title", "selected-variant-id"]))
|
|
480
494
|
]));
|
|
481
495
|
}
|
|
482
|
-
}),
|
|
496
|
+
}), It = /* @__PURE__ */ P(yt, [["__scopeId", "data-v-18c9e78b"]]), wt = {
|
|
483
497
|
width: "20",
|
|
484
498
|
height: "20",
|
|
485
499
|
viewBox: "0 0 20 20",
|
|
486
500
|
fill: "none",
|
|
487
501
|
xmlns: "http://www.w3.org/2000/svg"
|
|
488
|
-
},
|
|
502
|
+
}, $t = ["stroke"], kt = /* @__PURE__ */ w({
|
|
489
503
|
__name: "ArrowIcon",
|
|
490
504
|
props: {
|
|
491
505
|
color: {}
|
|
492
506
|
},
|
|
493
507
|
setup(t) {
|
|
494
508
|
const e = t;
|
|
495
|
-
return (s, o) => (u(),
|
|
509
|
+
return (s, o) => (u(), p("svg", wt, [
|
|
496
510
|
l("path", {
|
|
497
511
|
d: "M10 16.6667V3.33334M10 3.33334L5 8.33334M10 3.33334L15 8.33334",
|
|
498
512
|
stroke: e.color || "#ffffff",
|
|
499
513
|
"stroke-width": "1.5",
|
|
500
514
|
"stroke-linecap": "round",
|
|
501
515
|
"stroke-linejoin": "round"
|
|
502
|
-
}, null, 8,
|
|
516
|
+
}, null, 8, $t)
|
|
503
517
|
]));
|
|
504
518
|
}
|
|
505
|
-
}),
|
|
519
|
+
}), Tt = { class: "dialog-input-container" }, Rt = ["placeholder"], At = ["disabled"], Lt = {
|
|
506
520
|
id: "dialog-input-ai-disclosure",
|
|
507
521
|
class: "dialog-input-ai-disclosure"
|
|
508
|
-
},
|
|
522
|
+
}, xt = /* @__PURE__ */ w({
|
|
509
523
|
__name: "DialogInput",
|
|
510
524
|
props: {
|
|
511
525
|
client: {},
|
|
@@ -515,7 +529,7 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
515
529
|
selectedVariantId: {}
|
|
516
530
|
},
|
|
517
531
|
setup(t) {
|
|
518
|
-
const e = t, s =
|
|
532
|
+
const e = t, s = A(), o = A(""), r = f(() => ve(e.client.locale)), n = () => {
|
|
519
533
|
var i;
|
|
520
534
|
(i = s.value) == null || i.focus();
|
|
521
535
|
}, a = () => {
|
|
@@ -528,22 +542,22 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
528
542
|
fromQuestionSuggestion: !0
|
|
529
543
|
}), o.value = "");
|
|
530
544
|
};
|
|
531
|
-
return (i, _) => (u(),
|
|
545
|
+
return (i, _) => (u(), p("div", Tt, [
|
|
532
546
|
l("div", {
|
|
533
547
|
class: "dialog-input-wrapper",
|
|
534
|
-
onClick:
|
|
548
|
+
onClick: n
|
|
535
549
|
}, [
|
|
536
|
-
|
|
550
|
+
ce(l("input", {
|
|
537
551
|
id: "dialog-ask-anything-input-ai-input",
|
|
538
552
|
ref_key: "inputRef",
|
|
539
553
|
ref: s,
|
|
540
554
|
"onUpdate:modelValue": _[0] || (_[0] = (d) => o.value = d),
|
|
541
555
|
class: "dialog-ask-anything-input-ai-input",
|
|
542
|
-
placeholder:
|
|
556
|
+
placeholder: r.value.placeholder,
|
|
543
557
|
"aria-describedby": "dialog-input-ai-disclosure",
|
|
544
|
-
onKeydown:
|
|
545
|
-
}, null, 40,
|
|
546
|
-
[
|
|
558
|
+
onKeydown: Te(a, ["enter"])
|
|
559
|
+
}, null, 40, Rt), [
|
|
560
|
+
[ue, o.value]
|
|
547
561
|
]),
|
|
548
562
|
l("button", {
|
|
549
563
|
id: "send-message-button-ai-input",
|
|
@@ -551,61 +565,61 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
551
565
|
disabled: !o.value.trim(),
|
|
552
566
|
onClick: a
|
|
553
567
|
}, [
|
|
554
|
-
|
|
568
|
+
R(kt, {
|
|
555
569
|
color: e.client.theme.ctaTextColor
|
|
556
570
|
}, null, 8, ["color"])
|
|
557
|
-
], 8,
|
|
571
|
+
], 8, At)
|
|
558
572
|
]),
|
|
559
|
-
l("p",
|
|
573
|
+
l("p", Lt, E(r.value.aiDisclosure), 1)
|
|
560
574
|
]));
|
|
561
575
|
}
|
|
562
|
-
}),
|
|
576
|
+
}), Dt = /* @__PURE__ */ P(xt, [["__scopeId", "data-v-87013888"]]), Pt = /* @__PURE__ */ w({
|
|
563
577
|
__name: "ThemeProvider",
|
|
564
578
|
props: {
|
|
565
579
|
theme: {}
|
|
566
580
|
},
|
|
567
581
|
setup(t) {
|
|
568
|
-
const e = t, s = document.body, o = (
|
|
569
|
-
|
|
582
|
+
const e = t, s = document.body, o = (n) => n.replace(/([A-Z])/g, "-$1").toLowerCase(), r = (n) => {
|
|
583
|
+
n && Object.keys(n).forEach((a) => {
|
|
570
584
|
const i = a, _ = o(a);
|
|
571
|
-
if (
|
|
572
|
-
if (typeof
|
|
573
|
-
Object.keys(
|
|
585
|
+
if (n[i] !== void 0) {
|
|
586
|
+
if (typeof n[i] == "object") {
|
|
587
|
+
Object.keys(n[i]).forEach((d) => {
|
|
574
588
|
var c;
|
|
575
|
-
const
|
|
576
|
-
if (
|
|
577
|
-
const
|
|
589
|
+
const h = d;
|
|
590
|
+
if (h !== void 0) {
|
|
591
|
+
const g = o(d), S = n[i];
|
|
578
592
|
s.style.setProperty(
|
|
579
|
-
`--dialog-theme-${_}-${
|
|
580
|
-
(c =
|
|
593
|
+
`--dialog-theme-${_}-${g}`,
|
|
594
|
+
(c = S[h]) == null ? void 0 : c.toString()
|
|
581
595
|
);
|
|
582
596
|
}
|
|
583
597
|
});
|
|
584
598
|
return;
|
|
585
599
|
}
|
|
586
600
|
if (i === "ctaBorderType") {
|
|
587
|
-
const d =
|
|
601
|
+
const d = n[i] === "rounded" ? "24px" : "0";
|
|
588
602
|
s.style.setProperty(`--dialog-theme-${_}`, d);
|
|
589
603
|
return;
|
|
590
604
|
}
|
|
591
605
|
s.style.setProperty(
|
|
592
606
|
`--dialog-theme-${_}`,
|
|
593
|
-
|
|
607
|
+
n[i].toString()
|
|
594
608
|
);
|
|
595
609
|
}
|
|
596
610
|
});
|
|
597
611
|
};
|
|
598
|
-
return
|
|
599
|
-
e.theme &&
|
|
600
|
-
}),
|
|
612
|
+
return z(() => {
|
|
613
|
+
e.theme && r(e.theme);
|
|
614
|
+
}), U(
|
|
601
615
|
() => e.theme,
|
|
602
|
-
(
|
|
603
|
-
|
|
616
|
+
(n) => {
|
|
617
|
+
n && r(n);
|
|
604
618
|
},
|
|
605
619
|
{ deep: !0 }
|
|
606
|
-
), (
|
|
620
|
+
), (n, a) => Re(n.$slots, "default");
|
|
607
621
|
}
|
|
608
|
-
}),
|
|
622
|
+
}), Ot = ["dir"], Nt = 2, qt = 5, Mt = /* @__PURE__ */ w({
|
|
609
623
|
__name: "DialogProductBlock",
|
|
610
624
|
props: {
|
|
611
625
|
client: {},
|
|
@@ -616,69 +630,69 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
616
630
|
},
|
|
617
631
|
setup(t) {
|
|
618
632
|
const e = t;
|
|
619
|
-
|
|
620
|
-
|
|
633
|
+
z(() => {
|
|
634
|
+
_e({
|
|
621
635
|
method: "vue",
|
|
622
|
-
version: "3.
|
|
623
|
-
}),
|
|
636
|
+
version: "3.11.0"
|
|
637
|
+
}), Fe("pdp-block");
|
|
624
638
|
});
|
|
625
|
-
const s =
|
|
639
|
+
const s = A(!0), o = A(void 0), r = A(0), n = f(() => {
|
|
626
640
|
var c;
|
|
627
641
|
return s.value ? "" : (c = o.value) == null ? void 0 : c.assistantName;
|
|
628
|
-
}), a =
|
|
642
|
+
}), a = f(() => {
|
|
629
643
|
var c;
|
|
630
644
|
return s.value ? "" : (c = o.value) == null ? void 0 : c.description;
|
|
631
|
-
}), i =
|
|
645
|
+
}), i = f(
|
|
632
646
|
() => {
|
|
633
|
-
var c,
|
|
634
|
-
return (
|
|
647
|
+
var c, g;
|
|
648
|
+
return (g = (c = o.value) == null ? void 0 : c.questions) == null ? void 0 : g.slice(0, Nt);
|
|
635
649
|
}
|
|
636
|
-
), _ =
|
|
650
|
+
), _ = f(() => {
|
|
637
651
|
var c;
|
|
638
652
|
return s.value ? "" : (c = o.value) == null ? void 0 : c.inputPlaceholder;
|
|
639
|
-
}), d =
|
|
653
|
+
}), d = f(
|
|
640
654
|
() => {
|
|
641
655
|
var c;
|
|
642
|
-
return
|
|
656
|
+
return He(
|
|
643
657
|
(c = e.client.getLocalizationInformations()) == null ? void 0 : c.languageCode
|
|
644
658
|
);
|
|
645
659
|
}
|
|
646
|
-
),
|
|
647
|
-
const c = ++
|
|
660
|
+
), h = async () => {
|
|
661
|
+
const c = ++r.value;
|
|
648
662
|
s.value = !0, o.value = void 0;
|
|
649
663
|
try {
|
|
650
|
-
const
|
|
651
|
-
limit:
|
|
664
|
+
const g = await e.client.getSuggestions(e.productId, {
|
|
665
|
+
limit: qt
|
|
652
666
|
});
|
|
653
|
-
c ===
|
|
654
|
-
} catch (
|
|
655
|
-
console.error("error",
|
|
667
|
+
c === r.value && (o.value = g);
|
|
668
|
+
} catch (g) {
|
|
669
|
+
console.error("error", g);
|
|
656
670
|
} finally {
|
|
657
|
-
c ===
|
|
671
|
+
c === r.value && (s.value = !1);
|
|
658
672
|
}
|
|
659
673
|
};
|
|
660
|
-
return
|
|
674
|
+
return U(
|
|
661
675
|
() => [e.client, e.productId],
|
|
662
676
|
() => {
|
|
663
|
-
|
|
677
|
+
h();
|
|
664
678
|
},
|
|
665
679
|
{ immediate: !0 }
|
|
666
|
-
), (c,
|
|
680
|
+
), (c, g) => (u(), N(Pt, {
|
|
667
681
|
theme: e.client.theme
|
|
668
682
|
}, {
|
|
669
|
-
default:
|
|
670
|
-
var
|
|
683
|
+
default: de(() => {
|
|
684
|
+
var S;
|
|
671
685
|
return [
|
|
672
686
|
l("div", {
|
|
673
687
|
id: "dialog-instant",
|
|
674
688
|
class: "dialog-block-container",
|
|
675
689
|
dir: d.value
|
|
676
690
|
}, [
|
|
677
|
-
|
|
678
|
-
title:
|
|
691
|
+
R(ct, {
|
|
692
|
+
title: n.value,
|
|
679
693
|
description: a.value
|
|
680
694
|
}, null, 8, ["title", "description"]),
|
|
681
|
-
|
|
695
|
+
R(It, {
|
|
682
696
|
client: e.client,
|
|
683
697
|
questions: i.value,
|
|
684
698
|
"is-loading": s.value,
|
|
@@ -686,29 +700,29 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
686
700
|
"product-title": e.productTitle,
|
|
687
701
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
688
702
|
}, null, 8, ["client", "questions", "is-loading", "product-id", "product-title", "selected-variant-id"]),
|
|
689
|
-
e.enableInput ? (u(),
|
|
703
|
+
e.enableInput ? (u(), N(Dt, {
|
|
690
704
|
key: 0,
|
|
691
705
|
client: e.client,
|
|
692
706
|
placeholder: _.value,
|
|
693
707
|
"product-id": e.productId,
|
|
694
708
|
"product-title": e.productTitle,
|
|
695
709
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
696
|
-
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) : (u(),
|
|
710
|
+
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) : (u(), N(nt, {
|
|
697
711
|
key: 1,
|
|
698
712
|
client: e.client,
|
|
699
|
-
questions: (
|
|
713
|
+
questions: (S = o.value) == null ? void 0 : S.questions,
|
|
700
714
|
disabled: s.value,
|
|
701
715
|
"product-id": e.productId,
|
|
702
716
|
"product-title": e.productTitle,
|
|
703
717
|
"selected-variant-id": e.selectedVariantId
|
|
704
718
|
}, null, 8, ["client", "questions", "disabled", "product-id", "product-title", "selected-variant-id"]))
|
|
705
|
-
], 8,
|
|
719
|
+
], 8, Ot)
|
|
706
720
|
];
|
|
707
721
|
}),
|
|
708
722
|
_: 1
|
|
709
723
|
}, 8, ["theme"]));
|
|
710
724
|
}
|
|
711
|
-
}),
|
|
725
|
+
}), ho = /* @__PURE__ */ P(Mt, [["__scopeId", "data-v-0c307e5f"]]), Ht = {}, Ut = {
|
|
712
726
|
width: "16",
|
|
713
727
|
height: "16",
|
|
714
728
|
viewBox: "0 0 16 16",
|
|
@@ -716,8 +730,8 @@ const ft = /* @__PURE__ */ x(_t, [["render", gt], ["__scopeId", "data-v-26a64b58
|
|
|
716
730
|
xmlns: "http://www.w3.org/2000/svg",
|
|
717
731
|
"aria-hidden": "true"
|
|
718
732
|
};
|
|
719
|
-
function
|
|
720
|
-
return u(),
|
|
733
|
+
function Vt(t, e) {
|
|
734
|
+
return u(), p("svg", Ut, e[0] || (e[0] = [
|
|
721
735
|
l("path", {
|
|
722
736
|
d: "M8 13V3M8 3L3 8M8 3L13 8",
|
|
723
737
|
stroke: "currentColor",
|
|
@@ -727,28 +741,28 @@ function Nt(t, e) {
|
|
|
727
741
|
}, null, -1)
|
|
728
742
|
]));
|
|
729
743
|
}
|
|
730
|
-
const
|
|
744
|
+
const Bt = /* @__PURE__ */ P(Ht, [["render", Vt]]), Kt = {
|
|
731
745
|
width: "16",
|
|
732
746
|
height: "16",
|
|
733
747
|
viewBox: "0 0 12 12",
|
|
734
748
|
fill: "none",
|
|
735
749
|
xmlns: "http://www.w3.org/2000/svg",
|
|
736
750
|
"aria-hidden": "true"
|
|
737
|
-
},
|
|
751
|
+
}, Ft = ["fill"], zt = "M5.3217 0.588255C5.63241 -0.196084 6.36759 -0.196085 6.6783 0.588254C6.98901 1.37259 7.68193 2.82807 8.42693 3.57307C9.17193 4.31807 10.6274 5.01099 11.4117 5.3217C12.1961 5.63241 12.1961 6.36759 11.4117 6.6783C10.6274 6.98901 9.17193 7.68193 8.42693 8.42693C7.68193 9.17193 6.98901 10.6274 6.6783 11.4117C6.36759 12.1961 5.63241 12.1961 5.3217 11.4117C5.01099 10.6274 4.31807 9.17193 3.57307 8.42693C2.82808 7.68193 1.37259 6.98901 0.588255 6.6783C-0.196084 6.36759 -0.196085 5.63241 0.588254 5.3217C1.37259 5.01099 2.82807 4.31807 3.57307 3.57307C4.31807 2.82808 5.01099 1.37259 5.3217 0.588255Z", Gt = /* @__PURE__ */ w({
|
|
738
752
|
__name: "ShurikenIcon",
|
|
739
753
|
props: {
|
|
740
754
|
color: {}
|
|
741
755
|
},
|
|
742
756
|
setup(t) {
|
|
743
757
|
const e = t;
|
|
744
|
-
return (s, o) => (u(),
|
|
758
|
+
return (s, o) => (u(), p("svg", Kt, [
|
|
745
759
|
l("path", {
|
|
746
|
-
d:
|
|
760
|
+
d: zt,
|
|
747
761
|
fill: e.color || "currentColor"
|
|
748
|
-
}, null, 8,
|
|
762
|
+
}, null, 8, Ft)
|
|
749
763
|
]));
|
|
750
764
|
}
|
|
751
|
-
}),
|
|
765
|
+
}), jt = { class: "dialog-search-bar-field" }, Qt = { class: "dialog-search-bar-icon" }, Wt = ["aria-label", "placeholder", "autofocus"], Xt = ["aria-label"], _o = /* @__PURE__ */ w({
|
|
752
766
|
__name: "DialogSearchBar",
|
|
753
767
|
props: {
|
|
754
768
|
controller: {},
|
|
@@ -757,21 +771,21 @@ const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
|
757
771
|
submitAriaLabel: { default: "Search" }
|
|
758
772
|
},
|
|
759
773
|
setup(t) {
|
|
760
|
-
const e = t, s =
|
|
774
|
+
const e = t, s = A(""), o = () => {
|
|
761
775
|
e.controller.setQuery(s.value);
|
|
762
|
-
},
|
|
776
|
+
}, r = () => {
|
|
763
777
|
e.controller.submit(s.value);
|
|
764
778
|
};
|
|
765
|
-
return (
|
|
779
|
+
return (n, a) => (u(), p("form", {
|
|
766
780
|
class: "dialog-search-bar",
|
|
767
781
|
role: "search",
|
|
768
|
-
onSubmit:
|
|
782
|
+
onSubmit: Ae(r, ["prevent"])
|
|
769
783
|
}, [
|
|
770
|
-
l("div",
|
|
771
|
-
l("span",
|
|
772
|
-
|
|
784
|
+
l("div", jt, [
|
|
785
|
+
l("span", Qt, [
|
|
786
|
+
R(Gt)
|
|
773
787
|
]),
|
|
774
|
-
|
|
788
|
+
ce(l("input", {
|
|
775
789
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => s.value = i),
|
|
776
790
|
type: "text",
|
|
777
791
|
name: "dialog-search-query",
|
|
@@ -780,8 +794,8 @@ const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
|
780
794
|
placeholder: e.placeholder,
|
|
781
795
|
autofocus: e.autoFocus,
|
|
782
796
|
onInput: o
|
|
783
|
-
}, null, 40,
|
|
784
|
-
[
|
|
797
|
+
}, null, 40, Wt), [
|
|
798
|
+
[ue, s.value]
|
|
785
799
|
])
|
|
786
800
|
]),
|
|
787
801
|
l("button", {
|
|
@@ -789,17 +803,17 @@ const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
|
789
803
|
class: "dialog-search-bar-submit",
|
|
790
804
|
"aria-label": e.submitAriaLabel
|
|
791
805
|
}, [
|
|
792
|
-
|
|
793
|
-
], 8,
|
|
806
|
+
R(Bt)
|
|
807
|
+
], 8, Xt)
|
|
794
808
|
], 32));
|
|
795
809
|
}
|
|
796
|
-
}),
|
|
810
|
+
}), Yt = (t, e) => {
|
|
797
811
|
try {
|
|
798
812
|
return new Intl.NumberFormat(e).format(t);
|
|
799
813
|
} catch {
|
|
800
814
|
return String(t);
|
|
801
815
|
}
|
|
802
|
-
},
|
|
816
|
+
}, ae = {
|
|
803
817
|
en: (t) => ({
|
|
804
818
|
searching: (e) => `Searching “${e}”…`,
|
|
805
819
|
noResults: "No matching products",
|
|
@@ -865,15 +879,15 @@ const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
|
865
879
|
next: "Successivo",
|
|
866
880
|
pageOf: (e, s) => `Pagina ${t(e)} / ${t(s)}`
|
|
867
881
|
})
|
|
868
|
-
},
|
|
882
|
+
}, me = (t) => {
|
|
869
883
|
var o;
|
|
870
884
|
const e = ((o = t == null ? void 0 : t.split("-")[0]) == null ? void 0 : o.toLowerCase()) ?? "en";
|
|
871
|
-
return (
|
|
872
|
-
},
|
|
885
|
+
return (ae[e] ?? ae.en)((r) => Yt(r, t));
|
|
886
|
+
}, be = (t) => t.status !== D.LOADING && t.response !== void 0 && t.response.nbPages > 1, Zt = {
|
|
873
887
|
key: 0,
|
|
874
888
|
"aria-label": "Search results pages",
|
|
875
889
|
class: "dialog-search-pagination"
|
|
876
|
-
},
|
|
890
|
+
}, Jt = ["disabled"], es = ["disabled"], ts = /* @__PURE__ */ w({
|
|
877
891
|
__name: "DialogSearchPagination",
|
|
878
892
|
props: {
|
|
879
893
|
controller: {},
|
|
@@ -881,87 +895,80 @@ const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
|
881
895
|
locale: {}
|
|
882
896
|
},
|
|
883
897
|
setup(t) {
|
|
884
|
-
const e = t, s =
|
|
885
|
-
return (
|
|
898
|
+
const e = t, s = f(() => e.state.response), o = f(() => me(e.locale));
|
|
899
|
+
return (r, n) => s.value !== void 0 && B(be)(e.state) ? (u(), p("nav", Zt, [
|
|
886
900
|
l("button", {
|
|
887
901
|
type: "button",
|
|
888
902
|
disabled: s.value.page === 0,
|
|
889
|
-
onClick:
|
|
890
|
-
},
|
|
891
|
-
l("span", null,
|
|
903
|
+
onClick: n[0] || (n[0] = (a) => e.controller.setPage(s.value.page - 1))
|
|
904
|
+
}, E(o.value.previous), 9, Jt),
|
|
905
|
+
l("span", null, E(o.value.pageOf(s.value.page + 1, s.value.nbPages)), 1),
|
|
892
906
|
l("button", {
|
|
893
907
|
type: "button",
|
|
894
908
|
disabled: s.value.page >= s.value.nbPages - 1,
|
|
895
|
-
onClick:
|
|
896
|
-
},
|
|
897
|
-
])) :
|
|
909
|
+
onClick: n[1] || (n[1] = (a) => e.controller.setPage(s.value.page + 1))
|
|
910
|
+
}, E(o.value.next), 9, es)
|
|
911
|
+
])) : x("", !0);
|
|
898
912
|
}
|
|
899
|
-
}),
|
|
900
|
-
const s = { before: "", match: t, after: "" }, o =
|
|
913
|
+
}), le = (t) => t.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").replace(/ẞ/gu, "ß").toUpperCase().toLowerCase().replace(/ς/g, "σ"), ss = (t, e) => {
|
|
914
|
+
const s = { before: "", match: t, after: "" }, o = le(e.trim());
|
|
901
915
|
if (o === "")
|
|
902
916
|
return s;
|
|
903
|
-
const
|
|
917
|
+
const r = [...t], n = [];
|
|
904
918
|
let a = "";
|
|
905
|
-
|
|
906
|
-
const
|
|
907
|
-
for (let
|
|
908
|
-
|
|
909
|
-
a +=
|
|
919
|
+
r.forEach((h, c) => {
|
|
920
|
+
const g = le(h);
|
|
921
|
+
for (let S = 0; S < g.length; S += 1)
|
|
922
|
+
n.push(c);
|
|
923
|
+
a += g;
|
|
910
924
|
});
|
|
911
925
|
const i = a.indexOf(o);
|
|
912
926
|
if (i === -1)
|
|
913
927
|
return s;
|
|
914
|
-
const _ =
|
|
928
|
+
const _ = n[i], d = n[i + o.length - 1] + 1;
|
|
915
929
|
return {
|
|
916
|
-
before:
|
|
917
|
-
match:
|
|
918
|
-
after:
|
|
930
|
+
before: r.slice(0, _).join(""),
|
|
931
|
+
match: r.slice(_, d).join(""),
|
|
932
|
+
after: r.slice(d).join("")
|
|
919
933
|
};
|
|
920
|
-
},
|
|
934
|
+
}, os = {
|
|
921
935
|
key: 0,
|
|
922
936
|
class: "dialog-search-muted"
|
|
923
|
-
},
|
|
937
|
+
}, ns = { class: "dialog-search-match" }, rs = {
|
|
924
938
|
key: 1,
|
|
925
939
|
class: "dialog-search-muted"
|
|
926
|
-
},
|
|
940
|
+
}, Se = /* @__PURE__ */ w({
|
|
927
941
|
__name: "HighlightedTitle",
|
|
928
942
|
props: {
|
|
929
943
|
title: {},
|
|
930
944
|
query: {}
|
|
931
945
|
},
|
|
932
946
|
setup(t) {
|
|
933
|
-
const e = t, s =
|
|
934
|
-
return (o,
|
|
935
|
-
s.value.before !== "" ? (u(),
|
|
936
|
-
l("span",
|
|
937
|
-
s.value.after !== "" ? (u(),
|
|
947
|
+
const e = t, s = f(() => ss(e.title, e.query));
|
|
948
|
+
return (o, r) => (u(), p(M, null, [
|
|
949
|
+
s.value.before !== "" ? (u(), p("span", os, E(s.value.before), 1)) : x("", !0),
|
|
950
|
+
l("span", ns, E(s.value.match), 1),
|
|
951
|
+
s.value.after !== "" ? (u(), p("span", rs, E(s.value.after), 1)) : x("", !0)
|
|
938
952
|
], 64));
|
|
939
953
|
}
|
|
940
|
-
}),
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
return "";
|
|
950
|
-
}
|
|
951
|
-
}, os = (t) => {
|
|
952
|
-
try {
|
|
953
|
-
const { protocol: e } = new URL(t, window.location.href);
|
|
954
|
-
return e === "http:" || e === "https:" ? t : void 0;
|
|
955
|
-
} catch {
|
|
956
|
-
return;
|
|
957
|
-
}
|
|
958
|
-
}, ve = (t) => t.url === void 0 || t.url === "" ? void 0 : os(t.url), me = (t) => t.title ?? t.handle ?? t.objectID, ns = {
|
|
954
|
+
}), is = (t) => t.product_image || t.image || void 0, Ce = (t) => {
|
|
955
|
+
if (!(t === void 0 || t === ""))
|
|
956
|
+
try {
|
|
957
|
+
const { protocol: e } = new URL(t, window.location.href);
|
|
958
|
+
return e === "http:" || e === "https:" ? t : void 0;
|
|
959
|
+
} catch {
|
|
960
|
+
return;
|
|
961
|
+
}
|
|
962
|
+
}, as = (t) => Ce(t.url), Ee = (t) => t.title ?? t.handle ?? t.objectID, ls = {
|
|
959
963
|
class: "dialog-search-product-thumb",
|
|
960
964
|
"aria-hidden": "true"
|
|
961
|
-
},
|
|
965
|
+
}, cs = ["src"], us = { class: "dialog-search-product-title" }, ds = {
|
|
962
966
|
key: 0,
|
|
963
967
|
class: "dialog-search-product-price"
|
|
964
|
-
},
|
|
968
|
+
}, ps = {
|
|
969
|
+
key: 0,
|
|
970
|
+
class: "dialog-search-product-compare-at"
|
|
971
|
+
}, hs = /* @__PURE__ */ w({
|
|
965
972
|
__name: "DialogSearchProductCard",
|
|
966
973
|
props: {
|
|
967
974
|
controller: {},
|
|
@@ -971,55 +978,58 @@ const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
|
971
978
|
query: { default: "" }
|
|
972
979
|
},
|
|
973
980
|
setup(t) {
|
|
974
|
-
const e = t, s =
|
|
975
|
-
|
|
981
|
+
const e = t, s = A();
|
|
982
|
+
U(
|
|
976
983
|
() => e.hit,
|
|
977
984
|
() => {
|
|
978
985
|
s.value !== void 0 && e.controller.observeResult(s.value, e.index);
|
|
979
986
|
},
|
|
980
987
|
{ immediate: !0, flush: "post" }
|
|
981
988
|
);
|
|
982
|
-
const o =
|
|
983
|
-
() =>
|
|
984
|
-
),
|
|
985
|
-
const
|
|
986
|
-
e.controller.selectResult(e.index, { navigate: !
|
|
987
|
-
},
|
|
988
|
-
|
|
989
|
+
const o = f(() => Ce(e.controller.productUrl(e.hit))), r = f(() => is(e.hit)), n = f(() => fe(e.hit, e.locale)), a = f(
|
|
990
|
+
() => tt(e.hit, e.locale)
|
|
991
|
+
), i = (d) => {
|
|
992
|
+
const h = d.metaKey || d.ctrlKey || d.shiftKey || d.altKey;
|
|
993
|
+
e.controller.selectResult(e.index, { navigate: !h }) && d.preventDefault();
|
|
994
|
+
}, _ = (d) => {
|
|
995
|
+
d.button === 1 && e.controller.selectResult(e.index, { navigate: !1 });
|
|
989
996
|
};
|
|
990
|
-
return (
|
|
997
|
+
return (d, h) => (u(), p("li", {
|
|
991
998
|
ref_key: "cardRef",
|
|
992
999
|
ref: s,
|
|
993
1000
|
class: "dialog-search-card"
|
|
994
1001
|
}, [
|
|
995
|
-
(u(),
|
|
1002
|
+
(u(), N(Le(o.value === void 0 ? "div" : "a"), xe({
|
|
996
1003
|
class: "dialog-search-product",
|
|
997
1004
|
href: o.value
|
|
998
|
-
},
|
|
999
|
-
o.value === void 0 ? {} : { click:
|
|
1005
|
+
}, De(
|
|
1006
|
+
o.value === void 0 ? {} : { click: i, auxclick: _ }
|
|
1000
1007
|
)), {
|
|
1001
|
-
default:
|
|
1002
|
-
l("span",
|
|
1003
|
-
|
|
1008
|
+
default: de(() => [
|
|
1009
|
+
l("span", ls, [
|
|
1010
|
+
r.value !== void 0 ? (u(), p("img", {
|
|
1004
1011
|
key: 0,
|
|
1005
|
-
src:
|
|
1012
|
+
src: r.value,
|
|
1006
1013
|
alt: "",
|
|
1007
1014
|
loading: "lazy"
|
|
1008
|
-
}, null, 8,
|
|
1015
|
+
}, null, 8, cs)) : x("", !0)
|
|
1009
1016
|
]),
|
|
1010
|
-
l("span",
|
|
1011
|
-
|
|
1012
|
-
title:
|
|
1017
|
+
l("span", us, [
|
|
1018
|
+
R(Se, {
|
|
1019
|
+
title: B(Ee)(e.hit),
|
|
1013
1020
|
query: e.query
|
|
1014
1021
|
}, null, 8, ["title", "query"])
|
|
1015
1022
|
]),
|
|
1016
|
-
n.value !== "" ? (u(),
|
|
1023
|
+
n.value !== "" ? (u(), p("span", ds, [
|
|
1024
|
+
a.value !== "" ? (u(), p("s", ps, E(a.value), 1)) : x("", !0),
|
|
1025
|
+
Z(E(n.value), 1)
|
|
1026
|
+
])) : x("", !0)
|
|
1017
1027
|
]),
|
|
1018
1028
|
_: 1
|
|
1019
1029
|
}, 16, ["href"]))
|
|
1020
1030
|
], 512));
|
|
1021
1031
|
}
|
|
1022
|
-
}),
|
|
1032
|
+
}), _s = {}, gs = {
|
|
1023
1033
|
width: "16",
|
|
1024
1034
|
height: "16",
|
|
1025
1035
|
viewBox: "0 0 256 256",
|
|
@@ -1027,12 +1037,12 @@ const qt = /* @__PURE__ */ x(Pt, [["render", Nt]]), Mt = {
|
|
|
1027
1037
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1028
1038
|
"aria-hidden": "true"
|
|
1029
1039
|
};
|
|
1030
|
-
function
|
|
1031
|
-
return u(),
|
|
1040
|
+
function fs(t, e) {
|
|
1041
|
+
return u(), p("svg", gs, e[0] || (e[0] = [
|
|
1032
1042
|
l("path", { d: "M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" }, null, -1)
|
|
1033
1043
|
]));
|
|
1034
1044
|
}
|
|
1035
|
-
const
|
|
1045
|
+
const vs = /* @__PURE__ */ P(_s, [["render", fs]]), ms = {}, bs = {
|
|
1036
1046
|
width: "12",
|
|
1037
1047
|
height: "12",
|
|
1038
1048
|
viewBox: "0 0 256 256",
|
|
@@ -1040,21 +1050,21 @@ const ps = /* @__PURE__ */ x(cs, [["render", ds]]), hs = {}, _s = {
|
|
|
1040
1050
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1041
1051
|
"aria-hidden": "true"
|
|
1042
1052
|
};
|
|
1043
|
-
function
|
|
1044
|
-
return u(),
|
|
1053
|
+
function Ss(t, e) {
|
|
1054
|
+
return u(), p("svg", bs, e[0] || (e[0] = [
|
|
1045
1055
|
l("path", { d: "M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z" }, null, -1)
|
|
1046
1056
|
]));
|
|
1047
1057
|
}
|
|
1048
|
-
const
|
|
1049
|
-
const s =
|
|
1058
|
+
const Cs = /* @__PURE__ */ P(ms, [["render", Ss]]), ye = (t) => (t ?? []).flatMap((e) => {
|
|
1059
|
+
const s = as(e);
|
|
1050
1060
|
return s === void 0 ? [] : [{ collection: e, href: s }];
|
|
1051
|
-
}),
|
|
1061
|
+
}), Es = {
|
|
1052
1062
|
key: 0,
|
|
1053
1063
|
class: "dialog-search-collections"
|
|
1054
|
-
},
|
|
1064
|
+
}, ys = { class: "dialog-search-section-head" }, Is = { class: "dialog-search-label" }, ws = { class: "dialog-search-count" }, $s = { class: "dialog-search-collection-list" }, ks = ["href"], Ts = {
|
|
1055
1065
|
class: "dialog-search-collection-thumb",
|
|
1056
1066
|
"aria-hidden": "true"
|
|
1057
|
-
},
|
|
1067
|
+
}, Rs = ["src"], As = { class: "dialog-search-collection-title" }, Ls = { class: "dialog-search-caret" }, xs = /* @__PURE__ */ w({
|
|
1058
1068
|
__name: "DialogSearchCollections",
|
|
1059
1069
|
props: {
|
|
1060
1070
|
collections: {},
|
|
@@ -1062,50 +1072,50 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1062
1072
|
messages: {}
|
|
1063
1073
|
},
|
|
1064
1074
|
setup(t) {
|
|
1065
|
-
const e = t, s =
|
|
1066
|
-
return (o,
|
|
1067
|
-
l("div",
|
|
1068
|
-
l("p",
|
|
1069
|
-
l("span",
|
|
1075
|
+
const e = t, s = f(() => ye(e.collections));
|
|
1076
|
+
return (o, r) => s.value.length > 0 ? (u(), p("aside", Es, [
|
|
1077
|
+
l("div", ys, [
|
|
1078
|
+
l("p", Is, E(e.messages.collectionsLabel), 1),
|
|
1079
|
+
l("span", ws, E(e.messages.collectionsCount(s.value.length)), 1)
|
|
1070
1080
|
]),
|
|
1071
|
-
l("ul",
|
|
1072
|
-
(u(!0),
|
|
1073
|
-
key:
|
|
1081
|
+
l("ul", $s, [
|
|
1082
|
+
(u(!0), p(M, null, Y(s.value, ({ collection: n, href: a }) => (u(), p("li", {
|
|
1083
|
+
key: n.objectID
|
|
1074
1084
|
}, [
|
|
1075
1085
|
l("a", {
|
|
1076
1086
|
class: "dialog-search-collection",
|
|
1077
1087
|
href: a
|
|
1078
1088
|
}, [
|
|
1079
|
-
l("span",
|
|
1080
|
-
|
|
1089
|
+
l("span", Ts, [
|
|
1090
|
+
n.image ? (u(), p("img", {
|
|
1081
1091
|
key: 0,
|
|
1082
|
-
src:
|
|
1092
|
+
src: n.image,
|
|
1083
1093
|
alt: "",
|
|
1084
1094
|
loading: "lazy"
|
|
1085
|
-
}, null, 8,
|
|
1095
|
+
}, null, 8, Rs)) : x("", !0)
|
|
1086
1096
|
]),
|
|
1087
|
-
l("span",
|
|
1088
|
-
|
|
1089
|
-
title:
|
|
1097
|
+
l("span", As, [
|
|
1098
|
+
R(Se, {
|
|
1099
|
+
title: B(Ee)(n),
|
|
1090
1100
|
query: e.query
|
|
1091
1101
|
}, null, 8, ["title", "query"])
|
|
1092
1102
|
]),
|
|
1093
|
-
l("span",
|
|
1094
|
-
|
|
1103
|
+
l("span", Ls, [
|
|
1104
|
+
R(Cs)
|
|
1095
1105
|
])
|
|
1096
|
-
], 8,
|
|
1106
|
+
], 8, ks)
|
|
1097
1107
|
]))), 128))
|
|
1098
1108
|
])
|
|
1099
|
-
])) :
|
|
1109
|
+
])) : x("", !0);
|
|
1100
1110
|
}
|
|
1101
|
-
}),
|
|
1111
|
+
}), Ds = { class: "dialog-search-products" }, Ps = { class: "dialog-search-section-head" }, Os = { class: "dialog-search-label" }, Ns = {
|
|
1102
1112
|
key: 0,
|
|
1103
1113
|
class: "dialog-search-label-count"
|
|
1104
|
-
},
|
|
1114
|
+
}, qs = { class: "dialog-search-results" }, Ms = {
|
|
1105
1115
|
key: 0,
|
|
1106
1116
|
class: "dialog-search-empty",
|
|
1107
1117
|
role: "status"
|
|
1108
|
-
},
|
|
1118
|
+
}, Hs = /* @__PURE__ */ w({
|
|
1109
1119
|
__name: "DialogSearchProducts",
|
|
1110
1120
|
props: {
|
|
1111
1121
|
controller: {},
|
|
@@ -1115,46 +1125,46 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1115
1125
|
},
|
|
1116
1126
|
setup(t) {
|
|
1117
1127
|
const e = t;
|
|
1118
|
-
return (s, o) => (u(),
|
|
1119
|
-
l("div",
|
|
1120
|
-
l("p",
|
|
1121
|
-
|
|
1122
|
-
e.response.nbHits > 0 ? (u(),
|
|
1128
|
+
return (s, o) => (u(), p("section", Ds, [
|
|
1129
|
+
l("div", Ps, [
|
|
1130
|
+
l("p", Os, [
|
|
1131
|
+
Z(E(e.messages.productsLabel), 1),
|
|
1132
|
+
e.response.nbHits > 0 ? (u(), p("span", Ns, " · " + E(e.messages.resultsCount(e.response.nbHits)), 1)) : x("", !0)
|
|
1123
1133
|
])
|
|
1124
1134
|
]),
|
|
1125
|
-
l("ul",
|
|
1126
|
-
e.response.hits.length === 0 ? (u(),
|
|
1127
|
-
key:
|
|
1135
|
+
l("ul", qs, [
|
|
1136
|
+
e.response.hits.length === 0 ? (u(), p("li", Ms, E(e.messages.noResults), 1)) : (u(!0), p(M, { key: 1 }, Y(e.response.hits, (r, n) => (u(), N(hs, {
|
|
1137
|
+
key: r.objectID,
|
|
1128
1138
|
controller: e.controller,
|
|
1129
|
-
hit:
|
|
1130
|
-
index:
|
|
1139
|
+
hit: r,
|
|
1140
|
+
index: n,
|
|
1131
1141
|
locale: e.locale,
|
|
1132
1142
|
query: e.response.query
|
|
1133
1143
|
}, null, 8, ["controller", "hit", "index", "locale", "query"]))), 128))
|
|
1134
1144
|
])
|
|
1135
1145
|
]));
|
|
1136
1146
|
}
|
|
1137
|
-
}),
|
|
1147
|
+
}), K = 8, V = 16, Us = 200, Vs = 1440, Bs = (t, e) => t.bottom > 0 && t.top < e, Ks = (t, e) => {
|
|
1138
1148
|
const s = Math.min(
|
|
1139
|
-
|
|
1140
|
-
e - 2 *
|
|
1149
|
+
Vs,
|
|
1150
|
+
e - 2 * V
|
|
1141
1151
|
), o = t.left + t.width / 2 - s / 2;
|
|
1142
1152
|
return { left: `${Math.min(
|
|
1143
|
-
Math.max(o,
|
|
1144
|
-
e -
|
|
1153
|
+
Math.max(o, V),
|
|
1154
|
+
e - V - s
|
|
1145
1155
|
)}px`, width: `${s}px` };
|
|
1146
|
-
},
|
|
1147
|
-
const o = s - t.bottom -
|
|
1148
|
-
return o <
|
|
1149
|
-
...
|
|
1150
|
-
bottom: `${s - t.top +
|
|
1151
|
-
maxHeight: `${Math.max(
|
|
1156
|
+
}, Fs = (t, e, s) => {
|
|
1157
|
+
const o = s - t.bottom - K - V, r = t.top - K - V, n = Ks(t, e);
|
|
1158
|
+
return o < Us && r > o ? {
|
|
1159
|
+
...n,
|
|
1160
|
+
bottom: `${s - t.top + K}px`,
|
|
1161
|
+
maxHeight: `${Math.max(r, 0)}px`
|
|
1152
1162
|
} : {
|
|
1153
|
-
...
|
|
1154
|
-
top: `${t.bottom +
|
|
1163
|
+
...n,
|
|
1164
|
+
top: `${t.bottom + K}px`,
|
|
1155
1165
|
maxHeight: `${Math.max(o, 0)}px`
|
|
1156
1166
|
};
|
|
1157
|
-
},
|
|
1167
|
+
}, zs = (t) => {
|
|
1158
1168
|
const e = t.trim().replace(/^#/, "");
|
|
1159
1169
|
if (!/^(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i.test(e))
|
|
1160
1170
|
return;
|
|
@@ -1162,29 +1172,29 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1162
1172
|
return [0, 2, 4].map(
|
|
1163
1173
|
(o) => Number.parseInt(s.slice(o, o + 2), 16)
|
|
1164
1174
|
);
|
|
1165
|
-
},
|
|
1175
|
+
}, Gs = (t) => {
|
|
1166
1176
|
const e = /^rgba?\((\d+), (\d+), (\d+)(?:, [\d.]+)?\)$/.exec(t);
|
|
1167
1177
|
if (e !== null)
|
|
1168
1178
|
return [e[1], e[2], e[3]].map(Number);
|
|
1169
|
-
},
|
|
1179
|
+
}, js = (t) => {
|
|
1170
1180
|
if (typeof document > "u")
|
|
1171
1181
|
return;
|
|
1172
1182
|
const e = document.createElement("span");
|
|
1173
1183
|
if (e.style.color = t, e.style.color === "")
|
|
1174
1184
|
return;
|
|
1175
1185
|
document.body.appendChild(e);
|
|
1176
|
-
const s =
|
|
1186
|
+
const s = Gs(getComputedStyle(e).color);
|
|
1177
1187
|
return e.remove(), s;
|
|
1178
|
-
},
|
|
1188
|
+
}, Qs = (t) => zs(t) ?? js(t), Ws = (t) => {
|
|
1179
1189
|
const e = t / 255;
|
|
1180
1190
|
return e <= 0.03928 ? e / 12.92 : ((e + 0.055) / 1.055) ** 2.4;
|
|
1181
|
-
},
|
|
1182
|
-
const e =
|
|
1191
|
+
}, Ie = (t) => {
|
|
1192
|
+
const e = Qs(t);
|
|
1183
1193
|
if (e === void 0)
|
|
1184
1194
|
return;
|
|
1185
|
-
const [s, o,
|
|
1186
|
-
return 0.2126 * s + 0.7152 * o + 0.0722 *
|
|
1187
|
-
},
|
|
1195
|
+
const [s, o, r] = e.map(Ws);
|
|
1196
|
+
return 0.2126 * s + 0.7152 * o + 0.0722 * r;
|
|
1197
|
+
}, Xs = "#181825", Ys = "#ffffff", Zs = "straight", W = 0.5, X = {
|
|
1188
1198
|
light: {
|
|
1189
1199
|
panel: "#ffffff",
|
|
1190
1200
|
side: "#fafbfc",
|
|
@@ -1203,7 +1213,7 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1203
1213
|
hover: "#242830",
|
|
1204
1214
|
thumb: "#2b2f38"
|
|
1205
1215
|
}
|
|
1206
|
-
},
|
|
1216
|
+
}, Js = {
|
|
1207
1217
|
rectangle: {
|
|
1208
1218
|
"r-panel": "4px",
|
|
1209
1219
|
"r-item": "4px",
|
|
@@ -1216,42 +1226,42 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1216
1226
|
"r-thumb": "8px",
|
|
1217
1227
|
"r-btn": "10px"
|
|
1218
1228
|
}
|
|
1219
|
-
},
|
|
1220
|
-
const e = t === void 0 ? void 0 :
|
|
1221
|
-
return e === void 0 ? "light" : e <
|
|
1222
|
-
},
|
|
1223
|
-
const s =
|
|
1224
|
-
return s === void 0 ?
|
|
1225
|
-
},
|
|
1226
|
-
const e =
|
|
1227
|
-
...
|
|
1228
|
-
...
|
|
1229
|
+
}, F = (t) => t === void 0 || t.trim() === "" ? void 0 : t.trim(), eo = (t) => {
|
|
1230
|
+
const e = t === void 0 ? void 0 : Ie(t);
|
|
1231
|
+
return e === void 0 ? "light" : e < W ? "dark" : "light";
|
|
1232
|
+
}, to = (t, e) => {
|
|
1233
|
+
const s = Ie(t);
|
|
1234
|
+
return s === void 0 ? X[e].text : (e === "light" ? s < W : s >= W) ? t : X[e].text;
|
|
1235
|
+
}, so = (t) => {
|
|
1236
|
+
const e = eo(F(t == null ? void 0 : t.backgroundColor)), s = (t == null ? void 0 : t.ctaBorderType) === Zs ? "rectangle" : "rectangle-rounded", o = F(t == null ? void 0 : t.primaryColor) ?? Xs, r = F(t == null ? void 0 : t.fontFamily), n = {
|
|
1237
|
+
...X[e],
|
|
1238
|
+
...Js[s],
|
|
1229
1239
|
primary: o,
|
|
1230
|
-
accent:
|
|
1231
|
-
"cta-text":
|
|
1232
|
-
...
|
|
1240
|
+
accent: to(o, e),
|
|
1241
|
+
"cta-text": F(t == null ? void 0 : t.ctaTextColor) ?? Ys,
|
|
1242
|
+
...r === void 0 ? {} : { font: r }
|
|
1233
1243
|
};
|
|
1234
1244
|
return Object.fromEntries(
|
|
1235
|
-
Object.entries(
|
|
1245
|
+
Object.entries(n).map(([a, i]) => [`--dso-${a}`, i])
|
|
1236
1246
|
);
|
|
1237
|
-
},
|
|
1238
|
-
const e =
|
|
1239
|
-
return
|
|
1247
|
+
}, oo = (t) => {
|
|
1248
|
+
const e = A(), s = A(void 0), o = A({ width: 0, height: 0 });
|
|
1249
|
+
return U(
|
|
1240
1250
|
t,
|
|
1241
|
-
(
|
|
1242
|
-
if (!
|
|
1251
|
+
(r, n, a) => {
|
|
1252
|
+
if (!r)
|
|
1243
1253
|
return;
|
|
1244
1254
|
const i = () => {
|
|
1245
1255
|
const _ = e.value;
|
|
1246
1256
|
if (_ === void 0)
|
|
1247
1257
|
return;
|
|
1248
|
-
const d = _.previousElementSibling ?? _, { top:
|
|
1258
|
+
const d = _.previousElementSibling ?? _, { top: h, bottom: c, left: g, width: S } = d.getBoundingClientRect();
|
|
1249
1259
|
(o.value.width !== window.innerWidth || o.value.height !== window.innerHeight) && (o.value = {
|
|
1250
1260
|
width: window.innerWidth,
|
|
1251
1261
|
height: window.innerHeight
|
|
1252
1262
|
});
|
|
1253
|
-
const
|
|
1254
|
-
(
|
|
1263
|
+
const v = s.value;
|
|
1264
|
+
(v === void 0 || v.top !== h || v.bottom !== c || v.left !== g || v.width !== S) && (s.value = { top: h, bottom: c, left: g, width: S });
|
|
1255
1265
|
};
|
|
1256
1266
|
i(), window.addEventListener("scroll", i, !0), window.addEventListener("resize", i), a(() => {
|
|
1257
1267
|
window.removeEventListener("scroll", i, !0), window.removeEventListener("resize", i);
|
|
@@ -1259,27 +1269,27 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1259
1269
|
},
|
|
1260
1270
|
{ immediate: !0, flush: "post" }
|
|
1261
1271
|
), { anchorRef: e, rect: s, viewport: o };
|
|
1262
|
-
},
|
|
1263
|
-
const s =
|
|
1264
|
-
() => t.value.status !==
|
|
1272
|
+
}, no = (t, e) => {
|
|
1273
|
+
const s = A(!1), o = A(), r = f(
|
|
1274
|
+
() => t.value.status !== D.IDLE && !s.value
|
|
1265
1275
|
);
|
|
1266
|
-
|
|
1276
|
+
U(
|
|
1267
1277
|
() => t.value.query,
|
|
1268
1278
|
() => {
|
|
1269
1279
|
s.value = !1;
|
|
1270
1280
|
}
|
|
1271
|
-
),
|
|
1272
|
-
|
|
1281
|
+
), U(
|
|
1282
|
+
r,
|
|
1273
1283
|
(a, i, _) => {
|
|
1274
1284
|
if (!a)
|
|
1275
1285
|
return;
|
|
1276
|
-
const d = (
|
|
1277
|
-
var
|
|
1278
|
-
const c =
|
|
1286
|
+
const d = (h) => {
|
|
1287
|
+
var $, k;
|
|
1288
|
+
const c = h.target;
|
|
1279
1289
|
if (!(c instanceof Node))
|
|
1280
1290
|
return;
|
|
1281
|
-
const
|
|
1282
|
-
!
|
|
1291
|
+
const g = ($ = e.value) == null ? void 0 : $.previousElementSibling, S = ((k = o.value) == null ? void 0 : k.contains(c)) ?? !1, v = (g == null ? void 0 : g.contains(c)) ?? !1;
|
|
1292
|
+
!S && !v && (s.value = !0);
|
|
1283
1293
|
};
|
|
1284
1294
|
document.addEventListener("pointerdown", d), _(
|
|
1285
1295
|
() => document.removeEventListener("pointerdown", d)
|
|
@@ -1287,36 +1297,36 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1287
1297
|
},
|
|
1288
1298
|
{ immediate: !0 }
|
|
1289
1299
|
);
|
|
1290
|
-
const
|
|
1300
|
+
const n = () => {
|
|
1291
1301
|
s.value = !1;
|
|
1292
1302
|
};
|
|
1293
|
-
return
|
|
1303
|
+
return z(() => {
|
|
1294
1304
|
var a, i;
|
|
1295
1305
|
(i = (a = e.value) == null ? void 0 : a.previousElementSibling) == null || i.addEventListener(
|
|
1296
1306
|
"focusin",
|
|
1297
|
-
|
|
1307
|
+
n
|
|
1298
1308
|
);
|
|
1299
|
-
}),
|
|
1309
|
+
}), pe(() => {
|
|
1300
1310
|
var a, i;
|
|
1301
1311
|
(i = (a = e.value) == null ? void 0 : a.previousElementSibling) == null || i.removeEventListener(
|
|
1302
1312
|
"focusin",
|
|
1303
|
-
|
|
1313
|
+
n
|
|
1304
1314
|
);
|
|
1305
|
-
}), { isOpen:
|
|
1306
|
-
},
|
|
1315
|
+
}), { isOpen: r, panelRef: o };
|
|
1316
|
+
}, ro = {
|
|
1307
1317
|
key: 0,
|
|
1308
1318
|
class: "dialog-search-error"
|
|
1309
|
-
},
|
|
1319
|
+
}, io = {
|
|
1310
1320
|
role: "alert",
|
|
1311
1321
|
class: "dialog-search-status dialog-search-status-error"
|
|
1312
|
-
},
|
|
1322
|
+
}, ao = {
|
|
1313
1323
|
key: 1,
|
|
1314
1324
|
role: "status",
|
|
1315
1325
|
class: "dialog-search-status"
|
|
1316
|
-
},
|
|
1326
|
+
}, lo = {
|
|
1317
1327
|
key: 0,
|
|
1318
1328
|
class: "dialog-search-footer"
|
|
1319
|
-
},
|
|
1329
|
+
}, co = ["href"], go = /* @__PURE__ */ w({
|
|
1320
1330
|
__name: "DialogSearchResults",
|
|
1321
1331
|
props: {
|
|
1322
1332
|
controller: {},
|
|
@@ -1327,89 +1337,89 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1327
1337
|
seeAllHref: { type: Function, default: void 0 }
|
|
1328
1338
|
},
|
|
1329
1339
|
setup(t) {
|
|
1330
|
-
const e = t, s = (
|
|
1331
|
-
() => _.value && a.value !== void 0 &&
|
|
1332
|
-
), c =
|
|
1333
|
-
...a.value === void 0 ? {} :
|
|
1340
|
+
const e = t, s = (y) => y instanceof Ue ? `Search failed (${y.status}${y.code ? ` ${y.code}` : ""}): ${y.message}` : "Search failed: network error. Check your connection and try again.", o = f(() => e.state), r = f(() => e.state.status !== D.IDLE), { anchorRef: n, rect: a, viewport: i } = oo(r), { isOpen: _, panelRef: d } = no(o, n), h = f(
|
|
1341
|
+
() => _.value && a.value !== void 0 && Bs(a.value, i.value.height)
|
|
1342
|
+
), c = f(() => so(e.theme)), g = f(() => ({
|
|
1343
|
+
...a.value === void 0 ? {} : Fs(a.value, i.value.width, i.value.height),
|
|
1334
1344
|
...c.value
|
|
1335
|
-
})),
|
|
1345
|
+
})), S = f(() => me(e.locale)), v = f(() => e.state.response), $ = f(
|
|
1336
1346
|
() => {
|
|
1337
|
-
var
|
|
1338
|
-
return ((
|
|
1347
|
+
var y, L;
|
|
1348
|
+
return ((L = (y = e.state.sections) == null ? void 0 : y.collections) == null ? void 0 : L.hits) ?? [];
|
|
1339
1349
|
}
|
|
1340
|
-
),
|
|
1341
|
-
() =>
|
|
1342
|
-
),
|
|
1343
|
-
() => e.seeAllHref !== void 0 &&
|
|
1344
|
-
),
|
|
1350
|
+
), k = f(
|
|
1351
|
+
() => ye($.value).length > 0
|
|
1352
|
+
), T = f(
|
|
1353
|
+
() => e.seeAllHref !== void 0 && v.value !== void 0 && v.value.nbHits > 0
|
|
1354
|
+
), m = f(() => !T.value && be(e.state)), C = f(
|
|
1345
1355
|
() => {
|
|
1346
|
-
var
|
|
1347
|
-
return
|
|
1356
|
+
var y;
|
|
1357
|
+
return v.value === void 0 || (y = e.seeAllHref) == null ? void 0 : y.call(e, v.value.query);
|
|
1348
1358
|
}
|
|
1349
1359
|
);
|
|
1350
|
-
return (
|
|
1360
|
+
return (y, L) => (u(), p(M, null, [
|
|
1351
1361
|
l("div", {
|
|
1352
1362
|
ref_key: "anchorRef",
|
|
1353
|
-
ref:
|
|
1363
|
+
ref: n
|
|
1354
1364
|
}, null, 512),
|
|
1355
|
-
|
|
1365
|
+
h.value ? (u(), N(Pe, {
|
|
1356
1366
|
key: 0,
|
|
1357
1367
|
to: "body"
|
|
1358
1368
|
}, [
|
|
1359
1369
|
l("div", {
|
|
1360
1370
|
ref_key: "panelRef",
|
|
1361
1371
|
ref: d,
|
|
1362
|
-
class:
|
|
1363
|
-
style:
|
|
1372
|
+
class: te(["dialog-search-panel", `dialog-search-panel--${e.layout}`]),
|
|
1373
|
+
style: Oe(g.value)
|
|
1364
1374
|
}, [
|
|
1365
|
-
e.state.status ===
|
|
1366
|
-
l("p",
|
|
1375
|
+
e.state.status === B(D).ERROR ? (u(), p("div", ro, [
|
|
1376
|
+
l("p", io, E(s(e.state.error)), 1),
|
|
1367
1377
|
l("button", {
|
|
1368
1378
|
type: "button",
|
|
1369
1379
|
class: "dialog-search-retry",
|
|
1370
|
-
onClick:
|
|
1371
|
-
},
|
|
1372
|
-
])) :
|
|
1380
|
+
onClick: L[0] || (L[0] = (b) => e.controller.retry())
|
|
1381
|
+
}, E(S.value.retry), 1)
|
|
1382
|
+
])) : v.value === void 0 ? (u(), p("p", ao, E(S.value.searching(e.state.query)), 1)) : (u(), p(M, { key: 2 }, [
|
|
1373
1383
|
l("div", {
|
|
1374
|
-
class:
|
|
1384
|
+
class: te([
|
|
1375
1385
|
"dialog-search-body",
|
|
1376
|
-
{ "dialog-search-body--no-collections":
|
|
1386
|
+
{ "dialog-search-body--no-collections": !k.value }
|
|
1377
1387
|
])
|
|
1378
1388
|
}, [
|
|
1379
|
-
|
|
1380
|
-
collections:
|
|
1381
|
-
query:
|
|
1382
|
-
messages:
|
|
1389
|
+
R(xs, {
|
|
1390
|
+
collections: $.value,
|
|
1391
|
+
query: v.value.query,
|
|
1392
|
+
messages: S.value
|
|
1383
1393
|
}, null, 8, ["collections", "query", "messages"]),
|
|
1384
|
-
|
|
1394
|
+
R(Hs, {
|
|
1385
1395
|
controller: e.controller,
|
|
1386
|
-
response:
|
|
1396
|
+
response: v.value,
|
|
1387
1397
|
locale: e.locale,
|
|
1388
|
-
messages:
|
|
1398
|
+
messages: S.value
|
|
1389
1399
|
}, null, 8, ["controller", "response", "locale", "messages"])
|
|
1390
1400
|
], 2),
|
|
1391
|
-
|
|
1392
|
-
|
|
1401
|
+
T.value || m.value ? (u(), p("div", lo, [
|
|
1402
|
+
T.value ? (u(), p("a", {
|
|
1393
1403
|
key: 0,
|
|
1394
1404
|
class: "dialog-search-cta",
|
|
1395
|
-
href:
|
|
1405
|
+
href: C.value
|
|
1396
1406
|
}, [
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
], 8,
|
|
1407
|
+
Z(E(S.value.seeAllLabel(v.value.nbHits)) + " ", 1),
|
|
1408
|
+
R(vs)
|
|
1409
|
+
], 8, co)) : (u(), N(ts, {
|
|
1400
1410
|
key: 1,
|
|
1401
1411
|
controller: e.controller,
|
|
1402
1412
|
state: e.state,
|
|
1403
1413
|
locale: e.locale
|
|
1404
1414
|
}, null, 8, ["controller", "state", "locale"]))
|
|
1405
|
-
])) :
|
|
1415
|
+
])) : x("", !0)
|
|
1406
1416
|
], 64))
|
|
1407
1417
|
], 6)
|
|
1408
|
-
])) :
|
|
1418
|
+
])) : x("", !0)
|
|
1409
1419
|
], 64));
|
|
1410
1420
|
}
|
|
1411
|
-
}),
|
|
1412
|
-
const { client: e, surface: s = "search_page", ...o } = t,
|
|
1421
|
+
}), fo = (t) => {
|
|
1422
|
+
const { client: e, surface: s = "search_page", ...o } = t, r = et({
|
|
1413
1423
|
search: (i, _) => e.search(i, _),
|
|
1414
1424
|
analytics: {
|
|
1415
1425
|
surface: s,
|
|
@@ -1417,24 +1427,24 @@ const fs = /* @__PURE__ */ x(hs, [["render", gs]]), be = (t) => (t ?? []).flatMa
|
|
|
1417
1427
|
trackSelectSearchResult: (i) => e.trackSelectSearchResult(i)
|
|
1418
1428
|
},
|
|
1419
1429
|
...o
|
|
1420
|
-
}),
|
|
1421
|
-
|
|
1430
|
+
}), n = Ne(r.getState()), a = r.subscribe(() => {
|
|
1431
|
+
n.value = r.getState();
|
|
1422
1432
|
});
|
|
1423
|
-
return
|
|
1424
|
-
|
|
1433
|
+
return z(() => {
|
|
1434
|
+
_e({
|
|
1425
1435
|
method: "vue",
|
|
1426
|
-
version: "3.
|
|
1436
|
+
version: "3.11.0"
|
|
1427
1437
|
});
|
|
1428
|
-
}),
|
|
1429
|
-
a(),
|
|
1430
|
-
}), { controller:
|
|
1438
|
+
}), pe(() => {
|
|
1439
|
+
a(), r.dispose();
|
|
1440
|
+
}), { controller: r, state: n, theme: e.theme };
|
|
1431
1441
|
};
|
|
1432
1442
|
export {
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1443
|
+
Dt as DialogInput,
|
|
1444
|
+
ho as DialogProductBlock,
|
|
1445
|
+
_o as DialogSearchBar,
|
|
1446
|
+
ts as DialogSearchPagination,
|
|
1447
|
+
hs as DialogSearchProductCard,
|
|
1448
|
+
go as DialogSearchResults,
|
|
1449
|
+
fo as useDialogSearch
|
|
1440
1450
|
};
|