@askdialog/dialog-vue 3.4.1 → 3.6.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/dialog-vue.js
CHANGED
|
@@ -1,27 +1,33 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
const
|
|
6
|
-
var
|
|
1
|
+
var ae = Object.defineProperty;
|
|
2
|
+
var ce = (t, e, o) => e in t ? ae(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var H = (t, e, o) => ce(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { defineComponent as R, createElementBlock as v, openBlock as _, createElementVNode as u, toDisplayString as k, Fragment as N, renderList as ee, createVNode as L, createBlock as O, ref as $, withDirectives as te, withKeys as le, vModelText as oe, onMounted as V, watch as U, renderSlot as de, computed as T, withCtx as ue, createCommentVNode as M, withModifiers as pe, onUnmounted as se, Teleport as _e, normalizeStyle as he, unref as q, shallowRef as fe } from "vue";
|
|
5
|
+
const ge = /* @__PURE__ */ new Set(["ar", "he", "iw", "fa", "ur"]), ve = (t) => t !== void 0 && ge.has(t.trim().toLowerCase().slice(0, 2)), me = (t) => ve(t) ? "rtl" : "ltr";
|
|
6
|
+
var x;
|
|
7
7
|
(function(t) {
|
|
8
8
|
t.OPEN_ASSISTANT = "open_assistant", 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
|
+
})(x || (x = {}));
|
|
10
|
+
var z;
|
|
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: o, code:
|
|
17
|
-
super(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
this.name = "DialogSearchError", this.status = o, this.code =
|
|
13
|
+
})(z || (z = {}));
|
|
14
|
+
x.TRACK_ADD_TO_CART, x.TRACK_SUBMIT_CHECKOUT, x.TRACK_VIEW_SEARCH_RESULTS, x.TRACK_SELECT_SEARCH_RESULT;
|
|
15
|
+
class Se extends Error {
|
|
16
|
+
constructor({ status: o, code: s, message: i }) {
|
|
17
|
+
super(i);
|
|
18
|
+
H(this, "status");
|
|
19
|
+
H(this, "code");
|
|
20
|
+
this.name = "DialogSearchError", this.status = o, this.code = s;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
const
|
|
24
|
-
|
|
23
|
+
const j = (t, e, o) => {
|
|
24
|
+
if (!/^[a-z]{2}$/.test(e))
|
|
25
|
+
throw new Error("Search language must be a lowercase ISO 639-1 code.");
|
|
26
|
+
if (!/^[A-Za-z]{3}$/.test(o))
|
|
27
|
+
throw new Error("Search currency must be an ISO 4217 code.");
|
|
28
|
+
return `${t}_${e}_${o.toLowerCase()}`;
|
|
29
|
+
}, W = "multiple installation methods detected:", be = () => typeof window > "u" ? void 0 : window, ne = () => {
|
|
30
|
+
const t = be();
|
|
25
31
|
if (t !== void 0)
|
|
26
32
|
return t.dialog = t.dialog ?? {}, t.dialog.audit = t.dialog.audit ?? {
|
|
27
33
|
methods: [],
|
|
@@ -29,229 +35,264 @@ const Q = "multiple installation methods detected:", me = () => typeof window >
|
|
|
29
35
|
capabilities: [],
|
|
30
36
|
warnings: []
|
|
31
37
|
}, t.dialog.audit;
|
|
32
|
-
},
|
|
33
|
-
if (t.warnings = t.warnings.filter((e) => !e.startsWith(
|
|
38
|
+
}, Ce = (t) => {
|
|
39
|
+
if (t.warnings = t.warnings.filter((e) => !e.startsWith(W)), t.methods.length >= 2) {
|
|
34
40
|
const e = t.methods.map((o) => o.method).join(", ");
|
|
35
|
-
t.warnings.push(`${
|
|
41
|
+
t.warnings.push(`${W} ${e}`);
|
|
36
42
|
}
|
|
37
|
-
},
|
|
43
|
+
}, Ee = (t, e) => e === void 0 ? t : {
|
|
38
44
|
version: (t == null ? void 0 : t.version) ?? e.version,
|
|
39
45
|
commit: (t == null ? void 0 : t.commit) ?? e.commit
|
|
40
|
-
},
|
|
41
|
-
const e =
|
|
46
|
+
}, re = (t) => {
|
|
47
|
+
const e = ne();
|
|
42
48
|
if (e === void 0)
|
|
43
49
|
return;
|
|
44
|
-
const o = e.methods.find((
|
|
50
|
+
const o = e.methods.find((s) => s.method === t.method);
|
|
45
51
|
if (o === void 0) {
|
|
46
|
-
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }),
|
|
52
|
+
e.methods.push({ ...t, registeredAt: (/* @__PURE__ */ new Date()).toISOString() }), Ce(e);
|
|
47
53
|
return;
|
|
48
54
|
}
|
|
49
|
-
o.version = o.version ?? t.version, o.build =
|
|
50
|
-
},
|
|
51
|
-
const e =
|
|
55
|
+
o.version = o.version ?? t.version, o.build = Ee(o.build, t.build), o.source = o.source ?? t.source;
|
|
56
|
+
}, we = (t) => {
|
|
57
|
+
const e = ne();
|
|
52
58
|
e !== void 0 && (e.capabilities.includes(t) || e.capabilities.push(t));
|
|
53
|
-
},
|
|
59
|
+
}, y = {
|
|
54
60
|
IDLE: "idle",
|
|
55
61
|
LOADING: "loading",
|
|
56
62
|
SUCCESS: "success",
|
|
57
|
-
/**
|
|
63
|
+
/** Successful request with zero hits. */
|
|
58
64
|
EMPTY: "empty",
|
|
59
65
|
ERROR: "error"
|
|
60
|
-
},
|
|
61
|
-
function
|
|
62
|
-
let r,
|
|
63
|
-
const
|
|
64
|
-
let
|
|
65
|
-
const
|
|
66
|
-
clearTimeout(
|
|
67
|
-
}, S = (
|
|
66
|
+
}, Ie = 0.5, Re = 500, Te = 1500, ke = 100;
|
|
67
|
+
function ye({ emit: t, visibilityThreshold: e = Ie, dwellMs: o = Re, idleFlushMs: s = Te, maxItemsPerEvent: i = ke }) {
|
|
68
|
+
let r, n = [];
|
|
69
|
+
const a = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map();
|
|
70
|
+
let l;
|
|
71
|
+
const h = () => {
|
|
72
|
+
clearTimeout(l), !(r === void 0 || n.length === 0) && (t({ ...r, items: n }), n = []);
|
|
73
|
+
}, S = (f) => {
|
|
68
74
|
if (r === void 0)
|
|
69
75
|
return;
|
|
70
|
-
const
|
|
71
|
-
if (!
|
|
72
|
-
if (
|
|
73
|
-
|
|
76
|
+
const g = `${r.query_id}:${f.product_id}`;
|
|
77
|
+
if (!a.has(g)) {
|
|
78
|
+
if (a.add(g), n.push(f), n.length >= i) {
|
|
79
|
+
h();
|
|
74
80
|
return;
|
|
75
81
|
}
|
|
76
|
-
clearTimeout(
|
|
82
|
+
clearTimeout(l), l = setTimeout(h, s);
|
|
77
83
|
}
|
|
78
|
-
},
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
},
|
|
82
|
-
for (const
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}, o)) :
|
|
84
|
+
}, w = (f) => {
|
|
85
|
+
const g = c.get(f);
|
|
86
|
+
g !== void 0 && (clearTimeout(g), c.delete(f));
|
|
87
|
+
}, d = new IntersectionObserver((f) => {
|
|
88
|
+
for (const g of f) {
|
|
89
|
+
const m = p.get(g.target);
|
|
90
|
+
m !== void 0 && (g.intersectionRatio >= e ? c.has(g.target) || c.set(g.target, setTimeout(() => {
|
|
91
|
+
c.delete(g.target), S(m);
|
|
92
|
+
}, o)) : w(g.target));
|
|
87
93
|
}
|
|
88
94
|
}, { threshold: e }), b = () => {
|
|
89
|
-
|
|
90
|
-
for (const
|
|
91
|
-
clearTimeout(
|
|
92
|
-
|
|
93
|
-
},
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
if (
|
|
97
|
-
|
|
98
|
-
for (const
|
|
99
|
-
|
|
95
|
+
d.disconnect();
|
|
96
|
+
for (const f of c.values())
|
|
97
|
+
clearTimeout(f);
|
|
98
|
+
c.clear(), p.clear();
|
|
99
|
+
}, C = () => {
|
|
100
|
+
h();
|
|
101
|
+
}, I = (f) => {
|
|
102
|
+
if (f.persisted) {
|
|
103
|
+
a.clear();
|
|
104
|
+
for (const g of p.keys())
|
|
105
|
+
w(g), d.unobserve(g), d.observe(g);
|
|
100
106
|
}
|
|
101
107
|
};
|
|
102
|
-
return window.addEventListener("pagehide",
|
|
103
|
-
setContext(
|
|
104
|
-
|
|
108
|
+
return window.addEventListener("pagehide", C), window.addEventListener("pageshow", I), {
|
|
109
|
+
setContext(f) {
|
|
110
|
+
h(), a.clear(), r = f, b();
|
|
105
111
|
},
|
|
106
|
-
observe(
|
|
107
|
-
|
|
112
|
+
observe(f, g) {
|
|
113
|
+
p.set(f, g), d.observe(f);
|
|
108
114
|
},
|
|
109
|
-
forceImpression(
|
|
110
|
-
S(
|
|
115
|
+
forceImpression(f) {
|
|
116
|
+
S(f), h();
|
|
111
117
|
},
|
|
112
|
-
flush:
|
|
118
|
+
flush: h,
|
|
113
119
|
disconnect() {
|
|
114
|
-
|
|
120
|
+
h(), b(), window.removeEventListener("pagehide", C), window.removeEventListener("pageshow", I);
|
|
115
121
|
}
|
|
116
122
|
};
|
|
117
123
|
}
|
|
118
|
-
const
|
|
119
|
-
product_id: t.hits[e].
|
|
120
|
-
//
|
|
124
|
+
const Y = (t, e) => ({
|
|
125
|
+
product_id: t.hits[e].objectID,
|
|
126
|
+
// One-based position across all pages.
|
|
121
127
|
position: t.page * t.hitsPerPage + e + 1
|
|
122
128
|
});
|
|
123
|
-
function
|
|
129
|
+
function $e(t) {
|
|
124
130
|
let e, o;
|
|
125
|
-
const
|
|
131
|
+
const s = () => (e ?? (e = ye({
|
|
126
132
|
emit: t.trackViewSearchResults
|
|
127
133
|
})), e);
|
|
128
134
|
return {
|
|
129
|
-
onResponse(
|
|
135
|
+
onResponse(i) {
|
|
130
136
|
o = {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
// across pagination and rotates with the query.
|
|
134
|
-
query_id: a.queryId,
|
|
137
|
+
query_id: i.queryID,
|
|
138
|
+
index: i.index,
|
|
135
139
|
surface: t.surface,
|
|
136
|
-
// The storefront search API is lexical-only today.
|
|
137
140
|
search_type: "lexical",
|
|
138
|
-
//
|
|
139
|
-
page:
|
|
140
|
-
total_hits:
|
|
141
|
-
query_length: [...
|
|
142
|
-
},
|
|
141
|
+
// Convert the API page to one-based analytics numbering.
|
|
142
|
+
page: i.page + 1,
|
|
143
|
+
total_hits: i.nbHits,
|
|
144
|
+
query_length: [...i.query].length
|
|
145
|
+
}, s().setContext(o), i.nbHits === 0 && t.trackViewSearchResults({ ...o, items: [] });
|
|
143
146
|
},
|
|
144
|
-
observeResult(
|
|
145
|
-
|
|
147
|
+
observeResult(i, r, n) {
|
|
148
|
+
s().observe(i, Y(r, n));
|
|
146
149
|
},
|
|
147
|
-
select(
|
|
150
|
+
select(i, r) {
|
|
148
151
|
if (o === void 0)
|
|
149
152
|
return;
|
|
150
|
-
const
|
|
151
|
-
|
|
153
|
+
const n = Y(i, r);
|
|
154
|
+
s().forceImpression(n), t.trackSelectSearchResult({ ...o, items: [n] });
|
|
152
155
|
},
|
|
153
156
|
dispose() {
|
|
154
157
|
e == null || e.disconnect();
|
|
155
158
|
}
|
|
156
159
|
};
|
|
157
160
|
}
|
|
158
|
-
const
|
|
159
|
-
|
|
161
|
+
const Ae = 2, X = (t) => {
|
|
162
|
+
const e = t.trim();
|
|
163
|
+
return [...e].length >= Ae ? e : void 0;
|
|
164
|
+
}, Le = (t, e, o, { indexName: s, language: i, currency: r, hitsPerPage: n }) => ({
|
|
165
|
+
requests: [
|
|
166
|
+
{ indexName: s, query: t, page: e, hitsPerPage: n },
|
|
167
|
+
...o.map((a) => ({
|
|
168
|
+
indexName: j(a.index, i, r),
|
|
169
|
+
query: t,
|
|
170
|
+
page: 0,
|
|
171
|
+
hitsPerPage: a.hitsPerPage ?? n
|
|
172
|
+
}))
|
|
173
|
+
]
|
|
174
|
+
}), De = (t, e, { indexName: o, language: s, currency: i }) => {
|
|
175
|
+
const r = t.results.find((a) => a.index === o);
|
|
176
|
+
if (r === void 0)
|
|
177
|
+
throw new Error(`Dialog search returned no ${o} entry`);
|
|
178
|
+
const n = {};
|
|
179
|
+
for (const a of e) {
|
|
180
|
+
const p = j(a.index, s, i), c = t.results.find((l) => l.index === p);
|
|
181
|
+
c !== void 0 && (n[a.index] = c);
|
|
182
|
+
}
|
|
183
|
+
return {
|
|
184
|
+
response: r,
|
|
185
|
+
sections: e.length === 0 ? void 0 : n
|
|
186
|
+
};
|
|
187
|
+
}, F = {
|
|
188
|
+
status: y.IDLE,
|
|
160
189
|
query: "",
|
|
161
190
|
page: 0,
|
|
162
191
|
response: void 0,
|
|
192
|
+
sections: void 0,
|
|
163
193
|
error: void 0
|
|
164
194
|
};
|
|
165
|
-
function
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
195
|
+
function Pe({ search: t, language: e, currency: o, analytics: s, navigate: i, debounceMs: r = 250, hitsPerPage: n = 12, sections: a = [] }) {
|
|
196
|
+
const p = {
|
|
197
|
+
indexName: j("products", e, o),
|
|
198
|
+
language: e,
|
|
199
|
+
currency: o,
|
|
200
|
+
hitsPerPage: n
|
|
201
|
+
};
|
|
202
|
+
let c = F;
|
|
203
|
+
const l = /* @__PURE__ */ new Set(), h = $e(s);
|
|
204
|
+
let S, w, d, b = 0, C = !1;
|
|
205
|
+
const I = (m) => {
|
|
206
|
+
c = { ...c, ...m };
|
|
207
|
+
for (const E of l)
|
|
208
|
+
E(c);
|
|
209
|
+
}, f = () => {
|
|
210
|
+
clearTimeout(S), w = void 0, b += 1, d == null || d.abort(), d = void 0;
|
|
211
|
+
}, g = async (m, E) => {
|
|
212
|
+
f(), d = new AbortController();
|
|
213
|
+
const D = b;
|
|
214
|
+
I({ status: y.LOADING, query: m, page: E });
|
|
184
215
|
try {
|
|
185
|
-
const
|
|
186
|
-
signal:
|
|
216
|
+
const A = typeof a == "function" ? a() : a, Q = Le(m, E, A, p), ie = await t(Q, {
|
|
217
|
+
signal: d.signal
|
|
187
218
|
});
|
|
188
|
-
if (
|
|
219
|
+
if (D !== b)
|
|
189
220
|
return;
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
221
|
+
const K = De(ie, A, p);
|
|
222
|
+
h.onResponse(K.response), I({
|
|
223
|
+
...K,
|
|
224
|
+
status: K.response.nbHits === 0 ? y.EMPTY : y.SUCCESS,
|
|
193
225
|
error: void 0
|
|
194
226
|
});
|
|
195
|
-
} catch (
|
|
196
|
-
if (
|
|
227
|
+
} catch (A) {
|
|
228
|
+
if (A instanceof DOMException && A.name === "AbortError" || D !== b)
|
|
197
229
|
return;
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
return;
|
|
230
|
+
I({
|
|
231
|
+
status: y.ERROR,
|
|
232
|
+
error: A,
|
|
233
|
+
response: void 0,
|
|
234
|
+
sections: void 0
|
|
235
|
+
});
|
|
205
236
|
}
|
|
206
|
-
return m;
|
|
207
237
|
};
|
|
208
238
|
return {
|
|
209
|
-
setQuery(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
239
|
+
setQuery(m) {
|
|
240
|
+
if (C)
|
|
241
|
+
return;
|
|
242
|
+
f();
|
|
243
|
+
const E = X(m);
|
|
244
|
+
if (E === void 0) {
|
|
245
|
+
I(F);
|
|
246
|
+
return;
|
|
247
|
+
}
|
|
248
|
+
w = E, S = setTimeout(() => void g(E, 0), r);
|
|
214
249
|
},
|
|
215
|
-
submit(
|
|
216
|
-
|
|
217
|
-
|
|
250
|
+
submit(m) {
|
|
251
|
+
if (C)
|
|
252
|
+
return;
|
|
253
|
+
f();
|
|
254
|
+
const E = X(m);
|
|
255
|
+
if (E === void 0) {
|
|
256
|
+
I(F);
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
259
|
+
g(E, 0);
|
|
218
260
|
},
|
|
219
|
-
setPage(
|
|
220
|
-
if (!
|
|
221
|
-
if (
|
|
222
|
-
|
|
223
|
-
d = void 0, h(m, 0);
|
|
261
|
+
setPage(m) {
|
|
262
|
+
if (!C) {
|
|
263
|
+
if (w !== void 0) {
|
|
264
|
+
g(w, 0);
|
|
224
265
|
return;
|
|
225
266
|
}
|
|
226
|
-
|
|
267
|
+
c.query !== "" && g(c.query, m);
|
|
227
268
|
}
|
|
228
269
|
},
|
|
229
270
|
retry() {
|
|
230
|
-
|
|
271
|
+
C || c.status !== y.ERROR || g(c.query, c.page);
|
|
231
272
|
},
|
|
232
|
-
observeResult(
|
|
233
|
-
|
|
273
|
+
observeResult(m, E) {
|
|
274
|
+
c.response !== void 0 && h.observeResult(m, c.response, E);
|
|
234
275
|
},
|
|
235
|
-
selectResult(
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
276
|
+
selectResult(m, E) {
|
|
277
|
+
const D = c.response;
|
|
278
|
+
if (D === void 0)
|
|
238
279
|
return !1;
|
|
239
|
-
|
|
240
|
-
const
|
|
241
|
-
return ((
|
|
280
|
+
h.select(D, m);
|
|
281
|
+
const A = D.hits[m].url;
|
|
282
|
+
return ((E == null ? void 0 : E.navigate) ?? !0) && i !== void 0 && A !== void 0 ? (i(A, D.hits[m]), !0) : !1;
|
|
242
283
|
},
|
|
243
|
-
subscribe(
|
|
244
|
-
return
|
|
245
|
-
|
|
284
|
+
subscribe(m) {
|
|
285
|
+
return l.add(m), () => {
|
|
286
|
+
l.delete(m);
|
|
246
287
|
};
|
|
247
288
|
},
|
|
248
|
-
getState: () =>
|
|
289
|
+
getState: () => c,
|
|
249
290
|
dispose() {
|
|
250
|
-
|
|
291
|
+
C = !0, f(), l.clear(), h.dispose();
|
|
251
292
|
}
|
|
252
293
|
};
|
|
253
294
|
}
|
|
254
|
-
const
|
|
295
|
+
const xe = { class: "dialog-block-header-container" }, Ne = { class: "dialog-block-title" }, Oe = { class: "dialog-block-description" }, Ue = /* @__PURE__ */ R({
|
|
255
296
|
__name: "DialogBlockHeader",
|
|
256
297
|
props: {
|
|
257
298
|
title: {},
|
|
@@ -259,32 +300,32 @@ const De = { class: "dialog-block-header-container" }, Pe = { class: "dialog-blo
|
|
|
259
300
|
},
|
|
260
301
|
setup(t) {
|
|
261
302
|
const e = t;
|
|
262
|
-
return (o,
|
|
263
|
-
|
|
264
|
-
|
|
303
|
+
return (o, s) => (_(), v("div", xe, [
|
|
304
|
+
u("div", Ne, k(e.title ?? "Your expert"), 1),
|
|
305
|
+
u("div", Oe, k(e.description ?? "A question about this product?"), 1)
|
|
265
306
|
]));
|
|
266
307
|
}
|
|
267
|
-
}),
|
|
308
|
+
}), P = (t, e) => {
|
|
268
309
|
const o = t.__vccOpts || t;
|
|
269
|
-
for (const [
|
|
270
|
-
o[
|
|
310
|
+
for (const [s, i] of e)
|
|
311
|
+
o[s] = i;
|
|
271
312
|
return o;
|
|
272
|
-
},
|
|
313
|
+
}, Me = /* @__PURE__ */ P(Ue, [["__scopeId", "data-v-28e6dda7"]]), qe = {
|
|
273
314
|
width: "20",
|
|
274
315
|
height: "20",
|
|
275
316
|
viewBox: "0 0 20 20",
|
|
276
317
|
fill: "none",
|
|
277
318
|
xmlns: "http://www.w3.org/2000/svg"
|
|
278
|
-
},
|
|
319
|
+
}, Be = { "clip-path": "url(#clip0_466_934)" }, Ve = ["stroke"], Ke = ["stroke"], He = /* @__PURE__ */ R({
|
|
279
320
|
__name: "AiStarsIcon",
|
|
280
321
|
props: {
|
|
281
322
|
color: {}
|
|
282
323
|
},
|
|
283
324
|
setup(t) {
|
|
284
325
|
const e = t;
|
|
285
|
-
return (o,
|
|
286
|
-
|
|
287
|
-
|
|
326
|
+
return (o, s) => (_(), v("svg", qe, [
|
|
327
|
+
u("g", Be, [
|
|
328
|
+
u("path", {
|
|
288
329
|
d: `M5.41675 10.8333L6.07046 12.1408C6.2917 12.5832 6.40232 12.8045 6.55011
|
|
289
330
|
12.9962C6.68124 13.1663 6.83375 13.3188 7.00388 13.45C7.19559 13.5977 7.41684
|
|
290
331
|
13.7084 7.85932 13.9296L9.16675 14.5833L7.85932 15.237C7.41684 15.4583 7.19559
|
|
@@ -299,8 +340,8 @@ const De = { class: "dialog-block-header-container" }, Pe = { class: "dialog-blo
|
|
|
299
340
|
"stroke-width": "1.5",
|
|
300
341
|
"stroke-linecap": "round",
|
|
301
342
|
"stroke-linejoin": "round"
|
|
302
|
-
}, null, 8,
|
|
303
|
-
|
|
343
|
+
}, null, 8, Ve),
|
|
344
|
+
u("path", {
|
|
304
345
|
d: `M12.5001 1.66666L13.4823 4.22034C13.7173 4.83136 13.8348 5.13688 14.0175
|
|
305
346
|
5.39386C14.1795 5.62162 14.3785 5.82061 14.6062 5.98256C14.8632 6.16529 15.1687
|
|
306
347
|
6.2828 15.7797 6.5178L18.3334 7.49999L15.7797 8.48217C15.1687 8.71718 14.8632
|
|
@@ -315,11 +356,11 @@ const De = { class: "dialog-block-header-container" }, Pe = { class: "dialog-blo
|
|
|
315
356
|
"stroke-width": "1.5",
|
|
316
357
|
"stroke-linecap": "round",
|
|
317
358
|
"stroke-linejoin": "round"
|
|
318
|
-
}, null, 8,
|
|
359
|
+
}, null, 8, Ke)
|
|
319
360
|
]),
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
361
|
+
s[0] || (s[0] = u("defs", null, [
|
|
362
|
+
u("clipPath", { id: "clip0_466_934" }, [
|
|
363
|
+
u("rect", {
|
|
323
364
|
width: "20",
|
|
324
365
|
height: "20",
|
|
325
366
|
fill: "white"
|
|
@@ -328,7 +369,7 @@ const De = { class: "dialog-block-header-container" }, Pe = { class: "dialog-blo
|
|
|
328
369
|
], -1))
|
|
329
370
|
]));
|
|
330
371
|
}
|
|
331
|
-
}),
|
|
372
|
+
}), Fe = ["onClick"], Ge = { class: "dialog-block-suggestions-item-label" }, je = /* @__PURE__ */ R({
|
|
332
373
|
__name: "DialogBlockSuggestions",
|
|
333
374
|
props: {
|
|
334
375
|
client: {},
|
|
@@ -338,36 +379,36 @@ const De = { class: "dialog-block-header-container" }, Pe = { class: "dialog-blo
|
|
|
338
379
|
selectedVariantId: {}
|
|
339
380
|
},
|
|
340
381
|
setup(t) {
|
|
341
|
-
const e = t, o = (
|
|
382
|
+
const e = t, o = (s) => {
|
|
342
383
|
e.client.sendProductMessage({
|
|
343
384
|
productId: e.productId,
|
|
344
385
|
productTitle: e.productTitle,
|
|
345
386
|
selectedVariantId: e.selectedVariantId,
|
|
346
|
-
question:
|
|
387
|
+
question: s,
|
|
347
388
|
fromQuestionSuggestion: !0
|
|
348
389
|
});
|
|
349
390
|
};
|
|
350
|
-
return (
|
|
391
|
+
return (s, i) => (_(!0), v(N, null, ee(e.questions, (r) => (_(), v("button", {
|
|
351
392
|
key: r.question,
|
|
352
393
|
class: "dialog-block-suggestions-item",
|
|
353
|
-
onClick: (
|
|
394
|
+
onClick: (n) => o(r.question)
|
|
354
395
|
}, [
|
|
355
|
-
|
|
396
|
+
L(He, {
|
|
356
397
|
class: "dialog-block-suggestions-item-icon",
|
|
357
398
|
color: e.client.theme.primaryColor
|
|
358
399
|
}, null, 8, ["color"]),
|
|
359
|
-
|
|
360
|
-
], 8,
|
|
400
|
+
u("span", Ge, k(r.question), 1)
|
|
401
|
+
], 8, Fe))), 128));
|
|
361
402
|
}
|
|
362
|
-
}),
|
|
363
|
-
function
|
|
364
|
-
return
|
|
365
|
-
e[0] || (e[0] =
|
|
366
|
-
e[1] || (e[1] =
|
|
367
|
-
e[2] || (e[2] =
|
|
403
|
+
}), Qe = /* @__PURE__ */ P(je, [["__scopeId", "data-v-db34d4b4"]]), ze = {};
|
|
404
|
+
function We(t, e) {
|
|
405
|
+
return _(), v(N, null, [
|
|
406
|
+
e[0] || (e[0] = u("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
407
|
+
e[1] || (e[1] = u("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1)),
|
|
408
|
+
e[2] || (e[2] = u("div", { class: "dialog-block-suggestions-skeleton-item" }, null, -1))
|
|
368
409
|
], 64);
|
|
369
410
|
}
|
|
370
|
-
const
|
|
411
|
+
const Ye = /* @__PURE__ */ P(ze, [["render", We], ["__scopeId", "data-v-26a64b58"]]), Xe = { class: "dialog-block-suggestions-container" }, Ze = /* @__PURE__ */ R({
|
|
371
412
|
__name: "DialogBlockSuggestionsContainer",
|
|
372
413
|
props: {
|
|
373
414
|
client: {},
|
|
@@ -379,8 +420,8 @@ const We = /* @__PURE__ */ O(Qe, [["render", je], ["__scopeId", "data-v-26a64b58
|
|
|
379
420
|
},
|
|
380
421
|
setup(t) {
|
|
381
422
|
const e = t;
|
|
382
|
-
return (o,
|
|
383
|
-
e.isLoading || !e.questions ? (
|
|
423
|
+
return (o, s) => (_(), v("div", Xe, [
|
|
424
|
+
e.isLoading || !e.questions ? (_(), O(Ye, { key: 0 })) : (_(), O(Qe, {
|
|
384
425
|
key: 1,
|
|
385
426
|
client: e.client,
|
|
386
427
|
questions: e.questions,
|
|
@@ -390,30 +431,30 @@ const We = /* @__PURE__ */ O(Qe, [["render", je], ["__scopeId", "data-v-26a64b58
|
|
|
390
431
|
}, null, 8, ["client", "questions", "product-id", "product-title", "selected-variant-id"]))
|
|
391
432
|
]));
|
|
392
433
|
}
|
|
393
|
-
}),
|
|
434
|
+
}), Je = /* @__PURE__ */ P(Ze, [["__scopeId", "data-v-18c9e78b"]]), et = {
|
|
394
435
|
width: "20",
|
|
395
436
|
height: "20",
|
|
396
437
|
viewBox: "0 0 20 20",
|
|
397
438
|
fill: "none",
|
|
398
439
|
xmlns: "http://www.w3.org/2000/svg"
|
|
399
|
-
},
|
|
440
|
+
}, tt = ["stroke"], ot = /* @__PURE__ */ R({
|
|
400
441
|
__name: "ArrowIcon",
|
|
401
442
|
props: {
|
|
402
443
|
color: {}
|
|
403
444
|
},
|
|
404
445
|
setup(t) {
|
|
405
446
|
const e = t;
|
|
406
|
-
return (o,
|
|
407
|
-
|
|
447
|
+
return (o, s) => (_(), v("svg", et, [
|
|
448
|
+
u("path", {
|
|
408
449
|
d: "M10 16.6667V3.33334M10 3.33334L5 8.33334M10 3.33334L15 8.33334",
|
|
409
450
|
stroke: e.color || "#ffffff",
|
|
410
451
|
"stroke-width": "1.5",
|
|
411
452
|
"stroke-linecap": "round",
|
|
412
453
|
"stroke-linejoin": "round"
|
|
413
|
-
}, null, 8,
|
|
454
|
+
}, null, 8, tt)
|
|
414
455
|
]));
|
|
415
456
|
}
|
|
416
|
-
}),
|
|
457
|
+
}), st = ["placeholder"], nt = ["disabled"], rt = /* @__PURE__ */ R({
|
|
417
458
|
__name: "DialogInput",
|
|
418
459
|
props: {
|
|
419
460
|
client: {},
|
|
@@ -423,93 +464,93 @@ const We = /* @__PURE__ */ O(Qe, [["render", je], ["__scopeId", "data-v-26a64b58
|
|
|
423
464
|
selectedVariantId: {}
|
|
424
465
|
},
|
|
425
466
|
setup(t) {
|
|
426
|
-
const e = t, o =
|
|
427
|
-
var
|
|
428
|
-
(
|
|
467
|
+
const e = t, o = $(), s = $(""), i = () => {
|
|
468
|
+
var n;
|
|
469
|
+
(n = o.value) == null || n.focus();
|
|
429
470
|
}, r = () => {
|
|
430
|
-
const
|
|
431
|
-
|
|
471
|
+
const n = s.value;
|
|
472
|
+
n.trim() && (e.client.sendProductMessage({
|
|
432
473
|
productId: e.productId,
|
|
433
474
|
productTitle: e.productTitle,
|
|
434
475
|
selectedVariantId: e.selectedVariantId,
|
|
435
|
-
question:
|
|
476
|
+
question: n,
|
|
436
477
|
fromQuestionSuggestion: !0
|
|
437
|
-
}),
|
|
478
|
+
}), s.value = "");
|
|
438
479
|
};
|
|
439
|
-
return (
|
|
480
|
+
return (n, a) => (_(), v("div", {
|
|
440
481
|
class: "dialog-input-wrapper",
|
|
441
|
-
onClick:
|
|
482
|
+
onClick: i
|
|
442
483
|
}, [
|
|
443
|
-
|
|
484
|
+
te(u("input", {
|
|
444
485
|
id: "dialog-ask-anything-input-ai-input",
|
|
445
486
|
ref_key: "inputRef",
|
|
446
487
|
ref: o,
|
|
447
|
-
"onUpdate:modelValue":
|
|
488
|
+
"onUpdate:modelValue": a[0] || (a[0] = (p) => s.value = p),
|
|
448
489
|
class: "dialog-ask-anything-input-ai-input",
|
|
449
490
|
placeholder: e.placeholder ?? "Ask anything...",
|
|
450
|
-
onKeydown:
|
|
451
|
-
}, null, 40,
|
|
452
|
-
[
|
|
491
|
+
onKeydown: le(r, ["enter"])
|
|
492
|
+
}, null, 40, st), [
|
|
493
|
+
[oe, s.value]
|
|
453
494
|
]),
|
|
454
|
-
|
|
495
|
+
u("button", {
|
|
455
496
|
id: "send-message-button-ai-input",
|
|
456
497
|
class: "dialog-input-submit",
|
|
457
|
-
disabled: !
|
|
498
|
+
disabled: !s.value.trim(),
|
|
458
499
|
onClick: r
|
|
459
500
|
}, [
|
|
460
|
-
|
|
501
|
+
L(ot, {
|
|
461
502
|
color: e.client.theme.ctaTextColor
|
|
462
503
|
}, null, 8, ["color"])
|
|
463
|
-
], 8,
|
|
504
|
+
], 8, nt)
|
|
464
505
|
]));
|
|
465
506
|
}
|
|
466
|
-
}),
|
|
507
|
+
}), it = /* @__PURE__ */ P(rt, [["__scopeId", "data-v-4f5901c9"]]), at = /* @__PURE__ */ R({
|
|
467
508
|
__name: "ThemeProvider",
|
|
468
509
|
props: {
|
|
469
510
|
theme: {}
|
|
470
511
|
},
|
|
471
512
|
setup(t) {
|
|
472
|
-
const e = t, o = document.body,
|
|
473
|
-
r && Object.keys(r).forEach((
|
|
474
|
-
const
|
|
475
|
-
if (r[
|
|
476
|
-
if (typeof r[
|
|
477
|
-
Object.keys(r[
|
|
478
|
-
var
|
|
479
|
-
const
|
|
480
|
-
if (
|
|
481
|
-
const S =
|
|
513
|
+
const e = t, o = document.body, s = (r) => r.replace(/([A-Z])/g, "-$1").toLowerCase(), i = (r) => {
|
|
514
|
+
r && Object.keys(r).forEach((n) => {
|
|
515
|
+
const a = n, p = s(n);
|
|
516
|
+
if (r[a] !== void 0) {
|
|
517
|
+
if (typeof r[a] == "object") {
|
|
518
|
+
Object.keys(r[a]).forEach((c) => {
|
|
519
|
+
var h;
|
|
520
|
+
const l = c;
|
|
521
|
+
if (l !== void 0) {
|
|
522
|
+
const S = s(c), w = r[a];
|
|
482
523
|
o.style.setProperty(
|
|
483
|
-
`--dialog-theme-${
|
|
484
|
-
(
|
|
524
|
+
`--dialog-theme-${p}-${S}`,
|
|
525
|
+
(h = w[l]) == null ? void 0 : h.toString()
|
|
485
526
|
);
|
|
486
527
|
}
|
|
487
528
|
});
|
|
488
529
|
return;
|
|
489
530
|
}
|
|
490
|
-
if (
|
|
491
|
-
const
|
|
492
|
-
o.style.setProperty(`--dialog-theme-${
|
|
531
|
+
if (a === "ctaBorderType") {
|
|
532
|
+
const c = r[a] === "rounded" ? "24px" : "0";
|
|
533
|
+
o.style.setProperty(`--dialog-theme-${p}`, c);
|
|
493
534
|
return;
|
|
494
535
|
}
|
|
495
536
|
o.style.setProperty(
|
|
496
|
-
`--dialog-theme-${
|
|
497
|
-
r[
|
|
537
|
+
`--dialog-theme-${p}`,
|
|
538
|
+
r[a].toString()
|
|
498
539
|
);
|
|
499
540
|
}
|
|
500
541
|
});
|
|
501
542
|
};
|
|
502
|
-
return
|
|
503
|
-
e.theme &&
|
|
504
|
-
}),
|
|
543
|
+
return V(() => {
|
|
544
|
+
e.theme && i(e.theme);
|
|
545
|
+
}), U(
|
|
505
546
|
() => e.theme,
|
|
506
547
|
(r) => {
|
|
507
|
-
r &&
|
|
548
|
+
r && i(r);
|
|
508
549
|
},
|
|
509
550
|
{ deep: !0 }
|
|
510
|
-
), (r,
|
|
551
|
+
), (r, n) => de(r.$slots, "default");
|
|
511
552
|
}
|
|
512
|
-
}),
|
|
553
|
+
}), ct = ["dir"], lt = /* @__PURE__ */ R({
|
|
513
554
|
__name: "DialogProductBlock",
|
|
514
555
|
props: {
|
|
515
556
|
client: {},
|
|
@@ -520,84 +561,84 @@ const We = /* @__PURE__ */ O(Qe, [["render", je], ["__scopeId", "data-v-26a64b58
|
|
|
520
561
|
},
|
|
521
562
|
setup(t) {
|
|
522
563
|
const e = t;
|
|
523
|
-
|
|
524
|
-
|
|
564
|
+
V(() => {
|
|
565
|
+
re({
|
|
525
566
|
method: "vue",
|
|
526
|
-
version: "3.
|
|
527
|
-
}),
|
|
567
|
+
version: "3.6.0"
|
|
568
|
+
}), we("pdp-block");
|
|
528
569
|
});
|
|
529
|
-
const o =
|
|
530
|
-
var
|
|
531
|
-
return o.value ? "" : (
|
|
532
|
-
}),
|
|
533
|
-
var
|
|
534
|
-
return o.value ? "" : (
|
|
535
|
-
}),
|
|
536
|
-
var
|
|
537
|
-
return o.value ? "" : (
|
|
538
|
-
}),
|
|
570
|
+
const o = $(!0), s = $(void 0), i = $(0), r = T(() => {
|
|
571
|
+
var l;
|
|
572
|
+
return o.value ? "" : (l = s.value) == null ? void 0 : l.assistantName;
|
|
573
|
+
}), n = T(() => {
|
|
574
|
+
var l;
|
|
575
|
+
return o.value ? "" : (l = s.value) == null ? void 0 : l.description;
|
|
576
|
+
}), a = T(() => {
|
|
577
|
+
var l;
|
|
578
|
+
return o.value ? "" : (l = s.value) == null ? void 0 : l.inputPlaceholder;
|
|
579
|
+
}), p = T(
|
|
539
580
|
() => {
|
|
540
|
-
var
|
|
541
|
-
return
|
|
542
|
-
(
|
|
581
|
+
var l;
|
|
582
|
+
return me(
|
|
583
|
+
(l = e.client.getLocalizationInformations()) == null ? void 0 : l.languageCode
|
|
543
584
|
);
|
|
544
585
|
}
|
|
545
|
-
),
|
|
546
|
-
const
|
|
547
|
-
o.value = !0,
|
|
586
|
+
), c = async () => {
|
|
587
|
+
const l = ++i.value;
|
|
588
|
+
o.value = !0, s.value = void 0;
|
|
548
589
|
try {
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
} catch (
|
|
552
|
-
console.error("error",
|
|
590
|
+
const h = await e.client.getSuggestions(e.productId);
|
|
591
|
+
l === i.value && (s.value = h);
|
|
592
|
+
} catch (h) {
|
|
593
|
+
console.error("error", h);
|
|
553
594
|
} finally {
|
|
554
|
-
|
|
595
|
+
l === i.value && (o.value = !1);
|
|
555
596
|
}
|
|
556
597
|
};
|
|
557
|
-
return
|
|
598
|
+
return U(
|
|
558
599
|
() => [e.client, e.productId],
|
|
559
600
|
() => {
|
|
560
|
-
|
|
601
|
+
c();
|
|
561
602
|
},
|
|
562
603
|
{ immediate: !0 }
|
|
563
|
-
), (
|
|
604
|
+
), (l, h) => (_(), O(at, {
|
|
564
605
|
theme: e.client.theme
|
|
565
606
|
}, {
|
|
566
|
-
default:
|
|
607
|
+
default: ue(() => {
|
|
567
608
|
var S;
|
|
568
609
|
return [
|
|
569
|
-
|
|
610
|
+
u("div", {
|
|
570
611
|
id: "dialog-instant",
|
|
571
612
|
class: "dialog-block-container",
|
|
572
|
-
dir:
|
|
613
|
+
dir: p.value
|
|
573
614
|
}, [
|
|
574
|
-
|
|
615
|
+
L(Me, {
|
|
575
616
|
title: r.value,
|
|
576
|
-
description:
|
|
617
|
+
description: n.value
|
|
577
618
|
}, null, 8, ["title", "description"]),
|
|
578
|
-
|
|
619
|
+
L(Je, {
|
|
579
620
|
client: e.client,
|
|
580
|
-
questions: (S =
|
|
621
|
+
questions: (S = s.value) == null ? void 0 : S.questions,
|
|
581
622
|
"is-loading": o.value,
|
|
582
623
|
"product-id": e.productId,
|
|
583
624
|
"product-title": e.productTitle,
|
|
584
625
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
585
626
|
}, null, 8, ["client", "questions", "is-loading", "product-id", "product-title", "selected-variant-id"]),
|
|
586
|
-
e.enableInput ? (
|
|
627
|
+
e.enableInput ? (_(), O(it, {
|
|
587
628
|
key: 0,
|
|
588
629
|
client: e.client,
|
|
589
|
-
placeholder:
|
|
630
|
+
placeholder: a.value,
|
|
590
631
|
"product-id": e.productId,
|
|
591
632
|
"product-title": e.productTitle,
|
|
592
633
|
"selected-variant-id": e == null ? void 0 : e.selectedVariantId
|
|
593
|
-
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) :
|
|
594
|
-
], 8,
|
|
634
|
+
}, null, 8, ["client", "placeholder", "product-id", "product-title", "selected-variant-id"])) : M("", !0)
|
|
635
|
+
], 8, ct)
|
|
595
636
|
];
|
|
596
637
|
}),
|
|
597
638
|
_: 1
|
|
598
639
|
}, 8, ["theme"]));
|
|
599
640
|
}
|
|
600
|
-
}),
|
|
641
|
+
}), zt = /* @__PURE__ */ P(lt, [["__scopeId", "data-v-c57aa677"]]), dt = {}, ut = {
|
|
601
642
|
width: "16",
|
|
602
643
|
height: "16",
|
|
603
644
|
viewBox: "0 0 16 16",
|
|
@@ -605,9 +646,9 @@ const We = /* @__PURE__ */ O(Qe, [["render", je], ["__scopeId", "data-v-26a64b58
|
|
|
605
646
|
xmlns: "http://www.w3.org/2000/svg",
|
|
606
647
|
"aria-hidden": "true"
|
|
607
648
|
};
|
|
608
|
-
function
|
|
609
|
-
return
|
|
610
|
-
|
|
649
|
+
function pt(t, e) {
|
|
650
|
+
return _(), v("svg", ut, e[0] || (e[0] = [
|
|
651
|
+
u("path", {
|
|
611
652
|
d: "M8 13V3M8 3L3 8M8 3L13 8",
|
|
612
653
|
stroke: "currentColor",
|
|
613
654
|
"stroke-width": "1.5",
|
|
@@ -616,28 +657,28 @@ function ut(t, e) {
|
|
|
616
657
|
}, null, -1)
|
|
617
658
|
]));
|
|
618
659
|
}
|
|
619
|
-
const
|
|
660
|
+
const _t = /* @__PURE__ */ P(dt, [["render", pt]]), ht = {
|
|
620
661
|
width: "16",
|
|
621
662
|
height: "16",
|
|
622
663
|
viewBox: "0 0 12 12",
|
|
623
664
|
fill: "none",
|
|
624
665
|
xmlns: "http://www.w3.org/2000/svg",
|
|
625
666
|
"aria-hidden": "true"
|
|
626
|
-
},
|
|
667
|
+
}, ft = ["fill"], gt = "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", vt = /* @__PURE__ */ R({
|
|
627
668
|
__name: "ShurikenIcon",
|
|
628
669
|
props: {
|
|
629
670
|
color: {}
|
|
630
671
|
},
|
|
631
672
|
setup(t) {
|
|
632
673
|
const e = t;
|
|
633
|
-
return (o,
|
|
634
|
-
|
|
635
|
-
d:
|
|
674
|
+
return (o, s) => (_(), v("svg", ht, [
|
|
675
|
+
u("path", {
|
|
676
|
+
d: gt,
|
|
636
677
|
fill: e.color || "currentColor"
|
|
637
|
-
}, null, 8,
|
|
678
|
+
}, null, 8, ft)
|
|
638
679
|
]));
|
|
639
680
|
}
|
|
640
|
-
}),
|
|
681
|
+
}), mt = { class: "dialog-search-bar-field" }, St = { class: "dialog-search-bar-icon" }, bt = ["aria-label", "placeholder", "autofocus"], Ct = ["aria-label"], Wt = /* @__PURE__ */ R({
|
|
641
682
|
__name: "DialogSearchBar",
|
|
642
683
|
props: {
|
|
643
684
|
controller: {},
|
|
@@ -646,47 +687,47 @@ const dt = /* @__PURE__ */ O(ct, [["render", ut]]), pt = {
|
|
|
646
687
|
submitAriaLabel: { default: "Search" }
|
|
647
688
|
},
|
|
648
689
|
setup(t) {
|
|
649
|
-
const e = t, o =
|
|
690
|
+
const e = t, o = $(""), s = () => {
|
|
650
691
|
e.controller.setQuery(o.value);
|
|
651
|
-
},
|
|
692
|
+
}, i = () => {
|
|
652
693
|
e.controller.submit(o.value);
|
|
653
694
|
};
|
|
654
|
-
return (r,
|
|
695
|
+
return (r, n) => (_(), v("form", {
|
|
655
696
|
class: "dialog-search-bar",
|
|
656
697
|
role: "search",
|
|
657
|
-
onSubmit:
|
|
698
|
+
onSubmit: pe(i, ["prevent"])
|
|
658
699
|
}, [
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
700
|
+
u("div", mt, [
|
|
701
|
+
u("span", St, [
|
|
702
|
+
L(vt)
|
|
662
703
|
]),
|
|
663
|
-
|
|
664
|
-
"onUpdate:modelValue":
|
|
704
|
+
te(u("input", {
|
|
705
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => o.value = a),
|
|
665
706
|
type: "text",
|
|
666
707
|
name: "dialog-search-query",
|
|
667
708
|
class: "dialog-search-bar-input",
|
|
668
709
|
"aria-label": e.placeholder,
|
|
669
710
|
placeholder: e.placeholder,
|
|
670
711
|
autofocus: e.autoFocus,
|
|
671
|
-
onInput:
|
|
672
|
-
}, null, 40,
|
|
673
|
-
[
|
|
712
|
+
onInput: s
|
|
713
|
+
}, null, 40, bt), [
|
|
714
|
+
[oe, o.value]
|
|
674
715
|
])
|
|
675
716
|
]),
|
|
676
|
-
|
|
717
|
+
u("button", {
|
|
677
718
|
type: "submit",
|
|
678
719
|
class: "dialog-search-bar-submit",
|
|
679
720
|
"aria-label": e.submitAriaLabel
|
|
680
721
|
}, [
|
|
681
|
-
|
|
682
|
-
], 8,
|
|
722
|
+
L(_t)
|
|
723
|
+
], 8, Ct)
|
|
683
724
|
], 32));
|
|
684
725
|
}
|
|
685
|
-
}),
|
|
726
|
+
}), Et = {
|
|
686
727
|
key: 0,
|
|
687
728
|
"aria-label": "Search results pages",
|
|
688
729
|
class: "dialog-search-pagination"
|
|
689
|
-
},
|
|
730
|
+
}, wt = ["disabled"], It = ["disabled"], Rt = /* @__PURE__ */ R({
|
|
690
731
|
__name: "DialogSearchPagination",
|
|
691
732
|
props: {
|
|
692
733
|
controller: {},
|
|
@@ -694,87 +735,70 @@ const dt = /* @__PURE__ */ O(ct, [["render", ut]]), pt = {
|
|
|
694
735
|
},
|
|
695
736
|
setup(t) {
|
|
696
737
|
const e = t, o = T(() => e.state.response);
|
|
697
|
-
return (
|
|
698
|
-
|
|
738
|
+
return (s, i) => o.value !== void 0 && o.value.nbPages > 1 ? (_(), v("nav", Et, [
|
|
739
|
+
u("button", {
|
|
699
740
|
type: "button",
|
|
700
741
|
disabled: o.value.page === 0,
|
|
701
|
-
onClick:
|
|
702
|
-
}, " Previous ", 8,
|
|
703
|
-
|
|
704
|
-
|
|
742
|
+
onClick: i[0] || (i[0] = (r) => e.controller.setPage(o.value.page - 1))
|
|
743
|
+
}, " Previous ", 8, wt),
|
|
744
|
+
u("span", null, " Page " + k(o.value.page + 1) + " / " + k(o.value.nbPages), 1),
|
|
745
|
+
u("button", {
|
|
705
746
|
type: "button",
|
|
706
747
|
disabled: o.value.page >= o.value.nbPages - 1,
|
|
707
|
-
onClick:
|
|
708
|
-
}, " Next ", 8,
|
|
709
|
-
])) :
|
|
748
|
+
onClick: i[1] || (i[1] = (r) => e.controller.setPage(o.value.page + 1))
|
|
749
|
+
}, " Next ", 8, It)
|
|
750
|
+
])) : M("", !0);
|
|
710
751
|
}
|
|
711
|
-
}),
|
|
752
|
+
}), G = ({ amount: t, currencyCode: e }, o) => e === void 0 ? new Intl.NumberFormat(o).format(Number(t)) : new Intl.NumberFormat(o, {
|
|
712
753
|
style: "currency",
|
|
713
754
|
currency: e
|
|
714
|
-
}).format(Number(t)),
|
|
755
|
+
}).format(Number(t)), Tt = ({ min: t, max: e }, o) => t.amount === e.amount ? G(t, o) : `${G(t, o)} – ${G(e, o)}`, kt = (t, e) => {
|
|
715
756
|
if (t === void 0)
|
|
716
757
|
return "";
|
|
717
758
|
try {
|
|
718
|
-
return
|
|
759
|
+
return Tt(t, e);
|
|
719
760
|
} catch {
|
|
720
761
|
return "";
|
|
721
762
|
}
|
|
722
|
-
}, yt = (t
|
|
723
|
-
const o = t.priceRange, n = t.compareAtPriceRange;
|
|
724
|
-
if (o === void 0 || n === void 0 || Number(n.min.amount) <= Number(o.min.amount))
|
|
725
|
-
return "";
|
|
726
|
-
try {
|
|
727
|
-
return ne(n, e);
|
|
728
|
-
} catch {
|
|
729
|
-
return "";
|
|
730
|
-
}
|
|
731
|
-
}, It = (t) => {
|
|
763
|
+
}, yt = (t) => {
|
|
732
764
|
try {
|
|
733
765
|
const { protocol: e } = new URL(t, window.location.href);
|
|
734
766
|
return e === "http:" || e === "https:" ? t : void 0;
|
|
735
767
|
} catch {
|
|
736
768
|
return;
|
|
737
769
|
}
|
|
738
|
-
},
|
|
770
|
+
}, $t = { class: "dialog-search-card-image" }, At = ["src", "alt"], Lt = { class: "dialog-search-card-info" }, Dt = { class: "dialog-search-card-title" }, Pt = {
|
|
739
771
|
key: 0,
|
|
740
772
|
class: "dialog-search-card-price"
|
|
741
|
-
},
|
|
742
|
-
key: 0,
|
|
743
|
-
class: "dialog-search-card-compare-at"
|
|
744
|
-
}, Y = /* @__PURE__ */ y({
|
|
773
|
+
}, Z = /* @__PURE__ */ R({
|
|
745
774
|
__name: "DialogSearchProductCardContent",
|
|
746
775
|
props: {
|
|
747
776
|
hit: {},
|
|
748
777
|
locale: {}
|
|
749
778
|
},
|
|
750
779
|
setup(t) {
|
|
751
|
-
const e = t, o = T(() => e.hit.
|
|
752
|
-
() =>
|
|
753
|
-
), a = T(
|
|
754
|
-
() => yt(e.hit.product, e.locale)
|
|
780
|
+
const e = t, o = T(() => e.hit.title ?? e.hit.objectID), s = T(
|
|
781
|
+
() => kt(e.hit.priceRange, e.locale)
|
|
755
782
|
);
|
|
756
|
-
return (
|
|
757
|
-
|
|
758
|
-
e.hit.
|
|
783
|
+
return (i, r) => (_(), v(N, null, [
|
|
784
|
+
u("div", $t, [
|
|
785
|
+
e.hit.imageUrl !== void 0 ? (_(), v("img", {
|
|
759
786
|
key: 0,
|
|
760
|
-
src: e.hit.
|
|
787
|
+
src: e.hit.imageUrl,
|
|
761
788
|
alt: o.value,
|
|
762
789
|
loading: "lazy"
|
|
763
|
-
}, null, 8,
|
|
790
|
+
}, null, 8, At)) : M("", !0)
|
|
764
791
|
]),
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
ue(I(n.value), 1),
|
|
769
|
-
a.value !== "" ? (p(), v("s", Dt, I(" " + a.value), 1)) : N("", !0)
|
|
770
|
-
])) : N("", !0)
|
|
792
|
+
u("div", Lt, [
|
|
793
|
+
u("p", Dt, k(o.value), 1),
|
|
794
|
+
s.value !== "" ? (_(), v("p", Pt, k(s.value), 1)) : M("", !0)
|
|
771
795
|
])
|
|
772
796
|
], 64));
|
|
773
797
|
}
|
|
774
|
-
}),
|
|
798
|
+
}), xt = {
|
|
775
799
|
key: 0,
|
|
776
800
|
class: "dialog-search-card-body"
|
|
777
|
-
}, Nt = ["href"], Ot = /* @__PURE__ */
|
|
801
|
+
}, Nt = ["href"], Ot = /* @__PURE__ */ R({
|
|
778
802
|
__name: "DialogSearchProductCard",
|
|
779
803
|
props: {
|
|
780
804
|
controller: {},
|
|
@@ -783,40 +807,40 @@ const dt = /* @__PURE__ */ O(ct, [["render", ut]]), pt = {
|
|
|
783
807
|
locale: {}
|
|
784
808
|
},
|
|
785
809
|
setup(t) {
|
|
786
|
-
const e = t, o =
|
|
787
|
-
|
|
810
|
+
const e = t, o = $();
|
|
811
|
+
U(
|
|
788
812
|
() => e.hit,
|
|
789
813
|
() => {
|
|
790
814
|
o.value !== void 0 && e.controller.observeResult(o.value, e.index);
|
|
791
815
|
},
|
|
792
816
|
{ immediate: !0, flush: "post" }
|
|
793
817
|
);
|
|
794
|
-
const
|
|
795
|
-
const
|
|
796
|
-
e.controller.selectResult(e.index, { navigate: !
|
|
797
|
-
},
|
|
798
|
-
|
|
818
|
+
const s = (n) => {
|
|
819
|
+
const a = n.metaKey || n.ctrlKey || n.shiftKey || n.altKey;
|
|
820
|
+
e.controller.selectResult(e.index, { navigate: !a }) && n.preventDefault();
|
|
821
|
+
}, i = (n) => {
|
|
822
|
+
n.button === 1 && e.controller.selectResult(e.index, { navigate: !1 });
|
|
799
823
|
}, r = T(
|
|
800
|
-
() => e.hit.
|
|
824
|
+
() => e.hit.url === void 0 ? void 0 : yt(e.hit.url)
|
|
801
825
|
);
|
|
802
|
-
return (
|
|
826
|
+
return (n, a) => (_(), v("li", {
|
|
803
827
|
ref_key: "cardRef",
|
|
804
828
|
ref: o,
|
|
805
829
|
class: "dialog-search-card"
|
|
806
830
|
}, [
|
|
807
|
-
r.value === void 0 ? (
|
|
808
|
-
|
|
831
|
+
r.value === void 0 ? (_(), v("div", xt, [
|
|
832
|
+
L(Z, {
|
|
809
833
|
hit: e.hit,
|
|
810
834
|
locale: e.locale
|
|
811
835
|
}, null, 8, ["hit", "locale"])
|
|
812
|
-
])) : (
|
|
836
|
+
])) : (_(), v("a", {
|
|
813
837
|
key: 1,
|
|
814
838
|
class: "dialog-search-card-body",
|
|
815
839
|
href: r.value,
|
|
816
|
-
onClick:
|
|
817
|
-
onAuxclick:
|
|
840
|
+
onClick: s,
|
|
841
|
+
onAuxclick: i
|
|
818
842
|
}, [
|
|
819
|
-
|
|
843
|
+
L(Z, {
|
|
820
844
|
hit: e.hit,
|
|
821
845
|
locale: e.locale
|
|
822
846
|
}, null, 8, ["hit", "locale"])
|
|
@@ -824,51 +848,51 @@ const dt = /* @__PURE__ */ O(ct, [["render", ut]]), pt = {
|
|
|
824
848
|
], 512));
|
|
825
849
|
}
|
|
826
850
|
}), Ut = (t) => {
|
|
827
|
-
const e =
|
|
828
|
-
return
|
|
851
|
+
const e = $(), o = $(void 0), s = $(0);
|
|
852
|
+
return U(
|
|
829
853
|
t,
|
|
830
|
-
(
|
|
831
|
-
if (!
|
|
854
|
+
(i, r, n) => {
|
|
855
|
+
if (!i)
|
|
832
856
|
return;
|
|
833
|
-
const
|
|
834
|
-
const
|
|
835
|
-
if (
|
|
857
|
+
const a = () => {
|
|
858
|
+
const p = e.value;
|
|
859
|
+
if (p === void 0)
|
|
836
860
|
return;
|
|
837
|
-
const
|
|
838
|
-
|
|
839
|
-
const
|
|
840
|
-
(
|
|
861
|
+
const c = p.previousElementSibling ?? p, { top: l, bottom: h, left: S, width: w } = c.getBoundingClientRect();
|
|
862
|
+
s.value = window.innerHeight;
|
|
863
|
+
const d = o.value;
|
|
864
|
+
(d === void 0 || d.top !== l || d.bottom !== h || d.left !== S || d.width !== w) && (o.value = { top: l, bottom: h, left: S, width: w });
|
|
841
865
|
};
|
|
842
|
-
|
|
843
|
-
window.removeEventListener("scroll",
|
|
866
|
+
a(), window.addEventListener("scroll", a, !0), window.addEventListener("resize", a), n(() => {
|
|
867
|
+
window.removeEventListener("scroll", a, !0), window.removeEventListener("resize", a);
|
|
844
868
|
});
|
|
845
869
|
},
|
|
846
870
|
{ immediate: !0, flush: "post" }
|
|
847
|
-
), { anchorRef: e, rect: o, viewportHeight:
|
|
848
|
-
},
|
|
849
|
-
const o =
|
|
850
|
-
() => t.value.status !==
|
|
871
|
+
), { anchorRef: e, rect: o, viewportHeight: s };
|
|
872
|
+
}, Mt = (t, e) => {
|
|
873
|
+
const o = $(!1), s = $(), i = T(
|
|
874
|
+
() => t.value.status !== y.IDLE && !o.value
|
|
851
875
|
);
|
|
852
|
-
|
|
876
|
+
U(
|
|
853
877
|
() => t.value.query,
|
|
854
878
|
() => {
|
|
855
879
|
o.value = !1;
|
|
856
880
|
}
|
|
857
|
-
),
|
|
858
|
-
|
|
859
|
-
(
|
|
860
|
-
if (!
|
|
881
|
+
), U(
|
|
882
|
+
i,
|
|
883
|
+
(n, a, p) => {
|
|
884
|
+
if (!n)
|
|
861
885
|
return;
|
|
862
|
-
const
|
|
863
|
-
var b,
|
|
864
|
-
const
|
|
865
|
-
if (!(
|
|
886
|
+
const c = (l) => {
|
|
887
|
+
var b, C;
|
|
888
|
+
const h = l.target;
|
|
889
|
+
if (!(h instanceof Node))
|
|
866
890
|
return;
|
|
867
|
-
const S = (b = e.value) == null ? void 0 : b.previousElementSibling,
|
|
868
|
-
!
|
|
891
|
+
const S = (b = e.value) == null ? void 0 : b.previousElementSibling, w = ((C = s.value) == null ? void 0 : C.contains(h)) ?? !1, d = (S == null ? void 0 : S.contains(h)) ?? !1;
|
|
892
|
+
!w && !d && (o.value = !0);
|
|
869
893
|
};
|
|
870
|
-
document.addEventListener("pointerdown",
|
|
871
|
-
() => document.removeEventListener("pointerdown",
|
|
894
|
+
document.addEventListener("pointerdown", c), p(
|
|
895
|
+
() => document.removeEventListener("pointerdown", c)
|
|
872
896
|
);
|
|
873
897
|
},
|
|
874
898
|
{ immediate: !0 }
|
|
@@ -876,37 +900,37 @@ const dt = /* @__PURE__ */ O(ct, [["render", ut]]), pt = {
|
|
|
876
900
|
const r = () => {
|
|
877
901
|
o.value = !1;
|
|
878
902
|
};
|
|
879
|
-
return
|
|
880
|
-
var
|
|
881
|
-
(
|
|
903
|
+
return V(() => {
|
|
904
|
+
var n, a;
|
|
905
|
+
(a = (n = e.value) == null ? void 0 : n.previousElementSibling) == null || a.addEventListener(
|
|
882
906
|
"focusin",
|
|
883
907
|
r
|
|
884
908
|
);
|
|
885
|
-
}),
|
|
886
|
-
var
|
|
887
|
-
(
|
|
909
|
+
}), se(() => {
|
|
910
|
+
var n, a;
|
|
911
|
+
(a = (n = e.value) == null ? void 0 : n.previousElementSibling) == null || a.removeEventListener(
|
|
888
912
|
"focusin",
|
|
889
913
|
r
|
|
890
914
|
);
|
|
891
|
-
}), { isOpen:
|
|
892
|
-
},
|
|
915
|
+
}), { isOpen: i, panelRef: s };
|
|
916
|
+
}, qt = {
|
|
893
917
|
key: 0,
|
|
894
918
|
role: "status",
|
|
895
919
|
class: "dialog-search-status"
|
|
896
|
-
},
|
|
920
|
+
}, Bt = {
|
|
897
921
|
key: 1,
|
|
898
922
|
class: "dialog-search-error"
|
|
899
|
-
},
|
|
923
|
+
}, Vt = {
|
|
900
924
|
role: "alert",
|
|
901
925
|
class: "dialog-search-status dialog-search-status-error"
|
|
902
|
-
},
|
|
926
|
+
}, Kt = {
|
|
903
927
|
key: 2,
|
|
904
928
|
role: "status",
|
|
905
929
|
class: "dialog-search-status"
|
|
906
930
|
}, Ht = {
|
|
907
931
|
role: "status",
|
|
908
932
|
class: "dialog-search-status"
|
|
909
|
-
},
|
|
933
|
+
}, Ft = { class: "dialog-search-results" }, B = 8, J = 16, Gt = 200, Yt = /* @__PURE__ */ R({
|
|
910
934
|
__name: "DialogSearchResults",
|
|
911
935
|
props: {
|
|
912
936
|
controller: {},
|
|
@@ -914,94 +938,94 @@ const dt = /* @__PURE__ */ O(ct, [["render", ut]]), pt = {
|
|
|
914
938
|
locale: {}
|
|
915
939
|
},
|
|
916
940
|
setup(t) {
|
|
917
|
-
const e = t, o = (
|
|
918
|
-
const
|
|
919
|
-
return
|
|
920
|
-
...
|
|
921
|
-
bottom: `${b -
|
|
922
|
-
maxHeight: `${Math.max(
|
|
941
|
+
const e = t, o = (d) => d instanceof Se ? `Search failed (${d.status}${d.code ? ` ${d.code}` : ""}): ${d.message}` : "Search failed: network error. Check your connection and try again.", s = (d, b) => d.bottom > 0 && d.top < b, i = (d, b) => {
|
|
942
|
+
const C = b - d.bottom - B - J, I = d.top - B - J, f = { left: `${d.left}px`, width: `${d.width}px` };
|
|
943
|
+
return C < Gt && I > C ? {
|
|
944
|
+
...f,
|
|
945
|
+
bottom: `${b - d.top + B}px`,
|
|
946
|
+
maxHeight: `${Math.max(I, 0)}px`
|
|
923
947
|
} : {
|
|
924
|
-
...
|
|
925
|
-
top: `${
|
|
926
|
-
maxHeight: `${Math.max(
|
|
948
|
+
...f,
|
|
949
|
+
top: `${d.bottom + B}px`,
|
|
950
|
+
maxHeight: `${Math.max(C, 0)}px`
|
|
927
951
|
};
|
|
928
|
-
}, r = T(() => e.state),
|
|
929
|
-
() =>
|
|
930
|
-
),
|
|
931
|
-
() =>
|
|
952
|
+
}, r = T(() => e.state), n = T(() => e.state.status !== y.IDLE), { anchorRef: a, rect: p, viewportHeight: c } = Ut(n), { isOpen: l, panelRef: h } = Mt(r, a), S = T(
|
|
953
|
+
() => l.value && p.value !== void 0 && s(p.value, c.value)
|
|
954
|
+
), w = T(
|
|
955
|
+
() => p.value === void 0 ? void 0 : i(p.value, c.value)
|
|
932
956
|
);
|
|
933
|
-
return (
|
|
934
|
-
var
|
|
935
|
-
return
|
|
936
|
-
|
|
957
|
+
return (d, b) => {
|
|
958
|
+
var C;
|
|
959
|
+
return _(), v(N, null, [
|
|
960
|
+
u("div", {
|
|
937
961
|
ref_key: "anchorRef",
|
|
938
|
-
ref:
|
|
962
|
+
ref: a
|
|
939
963
|
}, null, 512),
|
|
940
|
-
S.value ? (
|
|
964
|
+
S.value ? (_(), O(_e, {
|
|
941
965
|
key: 0,
|
|
942
966
|
to: "body"
|
|
943
967
|
}, [
|
|
944
|
-
|
|
968
|
+
u("div", {
|
|
945
969
|
ref_key: "panelRef",
|
|
946
|
-
ref:
|
|
970
|
+
ref: h,
|
|
947
971
|
class: "dialog-search-panel",
|
|
948
|
-
style:
|
|
972
|
+
style: he(w.value)
|
|
949
973
|
}, [
|
|
950
|
-
e.state.status ===
|
|
951
|
-
|
|
952
|
-
|
|
974
|
+
e.state.status === q(y).LOADING ? (_(), v("p", qt, " Searching “" + k(e.state.query) + "”… ", 1)) : e.state.status === q(y).ERROR ? (_(), v("div", Bt, [
|
|
975
|
+
u("p", Vt, k(o(e.state.error)), 1),
|
|
976
|
+
u("button", {
|
|
953
977
|
type: "button",
|
|
954
978
|
class: "dialog-search-retry",
|
|
955
|
-
onClick: b[0] || (b[0] = (
|
|
979
|
+
onClick: b[0] || (b[0] = (I) => e.controller.retry())
|
|
956
980
|
}, " Retry ")
|
|
957
|
-
])) : e.state.status ===
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
(
|
|
961
|
-
key:
|
|
981
|
+
])) : e.state.status === q(y).EMPTY ? (_(), v("p", Kt, " No products match “" + k((C = e.state.response) == null ? void 0 : C.query) + "”. ", 1)) : e.state.status === q(y).SUCCESS && e.state.response !== void 0 ? (_(), v(N, { key: 3 }, [
|
|
982
|
+
u("p", Ht, k(e.state.response.nbHits) + " result" + k(e.state.response.nbHits > 1 ? "s" : ""), 1),
|
|
983
|
+
u("ul", Ft, [
|
|
984
|
+
(_(!0), v(N, null, ee(e.state.response.hits, (I, f) => (_(), O(Ot, {
|
|
985
|
+
key: I.objectID,
|
|
962
986
|
controller: e.controller,
|
|
963
|
-
hit:
|
|
964
|
-
index:
|
|
987
|
+
hit: I,
|
|
988
|
+
index: f,
|
|
965
989
|
locale: e.locale
|
|
966
990
|
}, null, 8, ["controller", "hit", "index", "locale"]))), 128))
|
|
967
991
|
]),
|
|
968
|
-
|
|
992
|
+
L(Rt, {
|
|
969
993
|
controller: e.controller,
|
|
970
994
|
state: e.state
|
|
971
995
|
}, null, 8, ["controller", "state"])
|
|
972
|
-
], 64)) :
|
|
996
|
+
], 64)) : M("", !0)
|
|
973
997
|
], 4)
|
|
974
|
-
])) :
|
|
998
|
+
])) : M("", !0)
|
|
975
999
|
], 64);
|
|
976
1000
|
};
|
|
977
1001
|
}
|
|
978
|
-
}),
|
|
979
|
-
const { client: e, surface: o = "search_page", ...
|
|
980
|
-
search: (
|
|
1002
|
+
}), Xt = (t) => {
|
|
1003
|
+
const { client: e, surface: o = "search_page", ...s } = t, i = Pe({
|
|
1004
|
+
search: (a, p) => e.search(a, p),
|
|
981
1005
|
analytics: {
|
|
982
1006
|
surface: o,
|
|
983
|
-
trackViewSearchResults: (
|
|
984
|
-
trackSelectSearchResult: (
|
|
1007
|
+
trackViewSearchResults: (a) => e.trackViewSearchResults(a),
|
|
1008
|
+
trackSelectSearchResult: (a) => e.trackSelectSearchResult(a)
|
|
985
1009
|
},
|
|
986
|
-
...
|
|
987
|
-
}), r =
|
|
988
|
-
r.value =
|
|
1010
|
+
...s
|
|
1011
|
+
}), r = fe(i.getState()), n = i.subscribe(() => {
|
|
1012
|
+
r.value = i.getState();
|
|
989
1013
|
});
|
|
990
|
-
return
|
|
991
|
-
|
|
1014
|
+
return V(() => {
|
|
1015
|
+
re({
|
|
992
1016
|
method: "vue",
|
|
993
|
-
version: "3.
|
|
1017
|
+
version: "3.6.0"
|
|
994
1018
|
});
|
|
995
|
-
}),
|
|
996
|
-
|
|
997
|
-
}), { controller:
|
|
1019
|
+
}), se(() => {
|
|
1020
|
+
n(), i.dispose();
|
|
1021
|
+
}), { controller: i, state: r };
|
|
998
1022
|
};
|
|
999
1023
|
export {
|
|
1000
|
-
|
|
1001
|
-
|
|
1024
|
+
it as DialogInput,
|
|
1025
|
+
zt as DialogProductBlock,
|
|
1002
1026
|
Wt as DialogSearchBar,
|
|
1003
1027
|
Rt as DialogSearchPagination,
|
|
1004
1028
|
Ot as DialogSearchProductCard,
|
|
1005
1029
|
Yt as DialogSearchResults,
|
|
1006
|
-
|
|
1030
|
+
Xt as useDialogSearch
|
|
1007
1031
|
};
|