@gengage/assistant-fe 0.6.33 → 0.6.34
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/agentic/worker.js +274 -271
- package/dist/{api-paths-BTHgM_Tz.js → api-paths-DZQ4Xx7u.js} +1 -1
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +1 -1
- package/dist/chat.js +1 -1
- package/dist/{common-Bhl-diYQ.js → common-CB1Vjd-T.js} +1 -1
- package/dist/common.js +5 -5
- package/dist/{connection-warning-CuJ66qqt.js → connection-warning-DBE8pkFv.js} +1 -1
- package/dist/{fastIntent-CjgT7XpX.js → fastIntent-D9jYpC8V.js} +1 -1
- package/dist/index.js +10 -10
- package/dist/native.iife.js +1 -1
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +1 -1
- package/dist/qna.js +1 -1
- package/dist/{runtime-8WgpotSV.js → runtime-By-msZ8j.js} +3 -3
- package/dist/{runtime-bXec5UVj.js → runtime-CABcQc-L.js} +3 -3
- package/dist/{runtime-4QEfxNRC.js → runtime-DyG44pqo.js} +3 -3
- package/dist/{simbut-3z-Ed-TM.js → simbut-CsQSH5vN.js} +1 -1
- package/dist/simbut.iife.js +1 -1
- package/dist/simbut.js +1 -1
- package/dist/{simrel-Bz7xAdSc.js → simrel-bxdmsMmZ.js} +1 -1
- package/dist/simrel-runtime.js +1 -1
- package/dist/simrel.iife.js +1 -1
- package/dist/simrel.js +2 -2
- package/dist/{widget-base-DhkuNWft.js → widget-base-C_RZ-VIr.js} +1 -1
- package/package.json +1 -1
package/dist/agentic/worker.js
CHANGED
|
@@ -1,171 +1,174 @@
|
|
|
1
|
-
import { buildPhotoSimilarityProfile as
|
|
2
|
-
import { $ as A, A as
|
|
3
|
-
function
|
|
4
|
-
const e = self,
|
|
5
|
-
let
|
|
6
|
-
e.addEventListener("message", (
|
|
7
|
-
const n =
|
|
1
|
+
import { buildPhotoSimilarityProfile as Y, buildProductSimilarityProfile as Z, buildSimilarityQueries as tt, normalizeSimilarityText as et, rankSimilarProducts as rt, rankSimilarProductsAsync as at, scoreSimilarityCandidate as ot, tokenizeSimilarityText as nt } from "./algos/similarity.js";
|
|
2
|
+
import { $ as A, A as it, At as ct, B as T, C as lt, Ct as C, D as ut, Dt as I, E as dt, Et as pt, F as yt, G as mt, H as U, I as ft, J as _t, K as gt, L as R, M as Pt, N as ht, O as kt, P as B, Q as F, R as L, St as wt, T as vt, Tt as St, U as xt, V as M, W as bt, X as At, Y as Tt, Z as Ct, _ as It, _t as Ut, a as Rt, at as K, b as Bt, bt as Ft, c as Lt, ct as Mt, d as Kt, dt as x, et as jt, f as Et, ft as j, g as zt, gt as E, h as Ot, ht as qt, i as Jt, it as Nt, j as $t, k as Dt, kt as Ht, l as Wt, lt as Gt, m as Qt, mt as Vt, n as Xt, nt as Yt, o as Zt, ot as te, p as ee, pt as re, q as ae, r as oe, rt as ne, s as se, st as ie, t as ce, tt as z, u as le, ut as ue, v as de, vt as pe, w as ye, wt as me, xt as O, y as fe, yt as q, z as _e } from "../agent-ui-steps-DIWmTMuV.js";
|
|
3
|
+
function ge(t) {
|
|
4
|
+
const e = self, a = /* @__PURE__ */ new Map(), o = I(e), c = F(o);
|
|
5
|
+
let s = null, y = null, d = null, m = "", _ = "idle", p = null;
|
|
6
|
+
e.addEventListener("message", (r) => {
|
|
7
|
+
const n = r.data;
|
|
8
8
|
if (n) {
|
|
9
9
|
if (n.type === "abort") {
|
|
10
|
-
typeof n.id == "number" && (
|
|
10
|
+
typeof n.id == "number" && (a.get(n.id)?.abort(), a.delete(n.id), p === n.id && (_ = "idle", p = null));
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
|
-
n.type === "invoke" &&
|
|
13
|
+
n.type === "invoke" && g(n);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
async function
|
|
16
|
+
async function g(r) {
|
|
17
17
|
if (_ !== "idle") {
|
|
18
|
-
const
|
|
18
|
+
const u = (w) => {
|
|
19
19
|
e.postMessage({
|
|
20
|
-
id:
|
|
20
|
+
id: r.id,
|
|
21
21
|
type: "event",
|
|
22
|
-
event:
|
|
22
|
+
event: w
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
|
-
|
|
26
|
-
id:
|
|
25
|
+
u(j("agent_busy", J(r.defaultLocale || t.defaultLocale || "en-GB"))), u(x()), e.postMessage({
|
|
26
|
+
id: r.id,
|
|
27
27
|
type: "end"
|
|
28
28
|
});
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
_ = "in_turn",
|
|
32
|
-
accountId: String(
|
|
33
|
-
beUrl:
|
|
34
|
-
...
|
|
35
|
-
...
|
|
36
|
-
...
|
|
37
|
-
locale:
|
|
38
|
-
parentUrl:
|
|
31
|
+
_ = "in_turn", p = r.id, s = {
|
|
32
|
+
accountId: String(r.accountId || t.accountId || ""),
|
|
33
|
+
beUrl: r.beUrl || "",
|
|
34
|
+
...r.devJwtSecret ? { devJwtSecret: r.devJwtSecret } : {},
|
|
35
|
+
...r.tokenBrokerUrl ? { tokenBrokerUrl: r.tokenBrokerUrl } : {},
|
|
36
|
+
...r.tokenBrokerAudience ? { tokenBrokerAudience: r.tokenBrokerAudience } : {},
|
|
37
|
+
locale: r.defaultLocale || t.defaultLocale || "en-GB",
|
|
38
|
+
parentUrl: r.parentUrl || ""
|
|
39
39
|
};
|
|
40
40
|
const n = [
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
s.accountId,
|
|
42
|
+
s.devJwtSecret || "",
|
|
43
|
+
s.tokenBrokerUrl || "",
|
|
44
|
+
s.tokenBrokerAudience || ""
|
|
45
45
|
].join(`
|
|
46
46
|
`);
|
|
47
|
-
(!
|
|
48
|
-
accountId:
|
|
49
|
-
locale:
|
|
50
|
-
parentUrl:
|
|
51
|
-
rpc:
|
|
47
|
+
(!d || m !== n) && (d = O(s), m = n), y ||= new C({
|
|
48
|
+
accountId: s.accountId,
|
|
49
|
+
locale: s.locale,
|
|
50
|
+
parentUrl: s.parentUrl,
|
|
51
|
+
rpc: o,
|
|
52
52
|
persistentPanelKeys: t.contextPersistence?.panelKeys,
|
|
53
53
|
panelKeyLimits: t.contextPersistence?.panelKeyLimits,
|
|
54
54
|
messageLimit: t.contextPersistence?.messageLimit,
|
|
55
55
|
maxThreads: t.contextPersistence?.maxThreads,
|
|
56
56
|
threadTtlMs: t.contextPersistence?.threadTtlMs
|
|
57
57
|
});
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
const
|
|
58
|
+
const i = new AbortController();
|
|
59
|
+
a.set(r.id, i);
|
|
60
|
+
const l = (u) => {
|
|
61
61
|
e.postMessage({
|
|
62
|
-
id:
|
|
62
|
+
id: r.id,
|
|
63
63
|
type: "event",
|
|
64
|
-
event:
|
|
64
|
+
event: u
|
|
65
65
|
});
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
id:
|
|
66
|
+
}, h = (u) => {
|
|
67
|
+
r.debugActivity === !0 && e.postMessage({
|
|
68
|
+
id: r.id,
|
|
69
69
|
type: "activity",
|
|
70
|
-
entry:
|
|
70
|
+
entry: u
|
|
71
71
|
});
|
|
72
72
|
};
|
|
73
73
|
try {
|
|
74
|
-
const
|
|
74
|
+
const u = s, w = d;
|
|
75
75
|
await A({
|
|
76
|
-
request:
|
|
76
|
+
request: r.request || {},
|
|
77
77
|
accountModule: {
|
|
78
78
|
...t,
|
|
79
|
-
accountId:
|
|
80
|
-
trace: async (
|
|
81
|
-
|
|
79
|
+
accountId: u.accountId,
|
|
80
|
+
trace: async (S) => {
|
|
81
|
+
h({
|
|
82
82
|
kind: "flow/trace",
|
|
83
|
-
event:
|
|
84
|
-
}), await t.trace?.(
|
|
83
|
+
event: S
|
|
84
|
+
}), await t.trace?.(S);
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
contextStore: y,
|
|
88
|
-
beClient:
|
|
89
|
-
config:
|
|
90
|
-
jwtProvider:
|
|
91
|
-
postActivity:
|
|
88
|
+
beClient: N({
|
|
89
|
+
config: u,
|
|
90
|
+
jwtProvider: w,
|
|
91
|
+
postActivity: h
|
|
92
92
|
}),
|
|
93
|
-
toolBridge:
|
|
94
|
-
emit:
|
|
95
|
-
rpc:
|
|
96
|
-
signal:
|
|
93
|
+
toolBridge: c,
|
|
94
|
+
emit: l,
|
|
95
|
+
rpc: o,
|
|
96
|
+
signal: i.signal
|
|
97
97
|
}), e.postMessage({
|
|
98
|
-
id:
|
|
98
|
+
id: r.id,
|
|
99
99
|
type: "end"
|
|
100
100
|
});
|
|
101
|
-
} catch (
|
|
102
|
-
|
|
103
|
-
id:
|
|
101
|
+
} catch (u) {
|
|
102
|
+
i.signal.aborted || (l(q(u)), l(x()), e.postMessage({
|
|
103
|
+
id: r.id,
|
|
104
104
|
type: "end"
|
|
105
105
|
}));
|
|
106
106
|
} finally {
|
|
107
|
-
|
|
107
|
+
a.delete(r.id), p === r.id && (_ = "idle", p = null);
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
return
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
function J(t) {
|
|
112
|
+
return String(t).toLowerCase().startsWith("en") ? "I’m still finishing up — just a moment!" : "Hâlâ tamamlıyorum — bir saniye bekleyin.";
|
|
113
|
+
}
|
|
114
|
+
function N({ config: t, jwtProvider: e, postActivity: a }) {
|
|
115
|
+
return { async invoke({ op: o, input: c, signal: s, cacheTtlS: y, cacheKey: d, cacheFreshness: m, browserCache: _ }) {
|
|
116
|
+
const p = performance.now(), g = t.accountId.replace(/-agentic$/u, ""), r = `${String(t.beUrl).replace(/\/+$/u, "")}/v1/execute`;
|
|
117
|
+
a({
|
|
115
118
|
kind: "be/request",
|
|
116
119
|
source: "worker-fetch",
|
|
117
|
-
url:
|
|
118
|
-
op:
|
|
119
|
-
opDomain:
|
|
120
|
-
params:
|
|
120
|
+
url: r,
|
|
121
|
+
op: o,
|
|
122
|
+
opDomain: g,
|
|
123
|
+
params: c || {},
|
|
121
124
|
rawBody: {
|
|
122
|
-
op_domain:
|
|
123
|
-
op_name:
|
|
124
|
-
op_payload:
|
|
125
|
+
op_domain: g,
|
|
126
|
+
op_name: o,
|
|
127
|
+
op_payload: c,
|
|
125
128
|
...y !== void 0 ? { cache_ttl_s: y } : {},
|
|
126
|
-
...
|
|
129
|
+
...d !== void 0 ? { cache_key: d } : {},
|
|
127
130
|
...m !== void 0 ? { cache_freshness: m } : {}
|
|
128
131
|
}
|
|
129
132
|
});
|
|
130
133
|
try {
|
|
131
|
-
const
|
|
134
|
+
const n = await E({
|
|
132
135
|
beUrl: t.beUrl,
|
|
133
136
|
accountId: t.accountId,
|
|
134
137
|
jwtProvider: e,
|
|
135
138
|
parentUrl: t.parentUrl,
|
|
136
|
-
op:
|
|
137
|
-
input:
|
|
139
|
+
op: o,
|
|
140
|
+
input: c,
|
|
138
141
|
cacheTtlS: y,
|
|
139
|
-
cacheKey:
|
|
142
|
+
cacheKey: d,
|
|
140
143
|
cacheFreshness: m,
|
|
141
144
|
browserCache: _,
|
|
142
|
-
...
|
|
145
|
+
...s ? { signal: s } : {}
|
|
143
146
|
});
|
|
144
|
-
return
|
|
147
|
+
return a({
|
|
145
148
|
kind: "be/response",
|
|
146
149
|
source: "worker-fetch",
|
|
147
|
-
url:
|
|
150
|
+
url: r,
|
|
148
151
|
status: 200,
|
|
149
|
-
op:
|
|
150
|
-
opDomain:
|
|
151
|
-
latencyMs: Math.max(0, Math.round(performance.now() -
|
|
152
|
-
result:
|
|
153
|
-
}),
|
|
154
|
-
} catch (
|
|
155
|
-
throw
|
|
152
|
+
op: o,
|
|
153
|
+
opDomain: g,
|
|
154
|
+
latencyMs: Math.max(0, Math.round(performance.now() - p)),
|
|
155
|
+
result: n
|
|
156
|
+
}), n;
|
|
157
|
+
} catch (n) {
|
|
158
|
+
throw a({
|
|
156
159
|
kind: "be/response",
|
|
157
160
|
source: "worker-fetch",
|
|
158
|
-
url:
|
|
159
|
-
op:
|
|
160
|
-
opDomain:
|
|
161
|
-
latencyMs: Math.max(0, Math.round(performance.now() -
|
|
162
|
-
error:
|
|
163
|
-
}),
|
|
161
|
+
url: r,
|
|
162
|
+
op: o,
|
|
163
|
+
opDomain: g,
|
|
164
|
+
latencyMs: Math.max(0, Math.round(performance.now() - p)),
|
|
165
|
+
error: n instanceof Error ? n.message : String(n)
|
|
166
|
+
}), n;
|
|
164
167
|
}
|
|
165
168
|
} };
|
|
166
169
|
}
|
|
167
|
-
var
|
|
168
|
-
...
|
|
170
|
+
var v = { patterns: [
|
|
171
|
+
...T,
|
|
169
172
|
{
|
|
170
173
|
pattern: /(?:adresim|adres|address)\s*[:=]?\s*[^.;\n]{0,160}/giu,
|
|
171
174
|
replacement: "[address]"
|
|
@@ -174,80 +177,80 @@ var w = { patterns: [
|
|
|
174
177
|
pattern: /[^\s,.;]{2,}\s+(?:mahallesi|mah\.|sokak|sk\.|cadde|cad\.)\s+[^.;\n]{0,120}/giu,
|
|
175
178
|
replacement: "[address]"
|
|
176
179
|
}
|
|
177
|
-
] },
|
|
178
|
-
function
|
|
180
|
+
] }, $ = "llm-flow-routing-v1";
|
|
181
|
+
function D(t) {
|
|
179
182
|
return String(t?.payload?.text || t?.payload?.query || t?.action?.payload?.text || "");
|
|
180
183
|
}
|
|
181
|
-
function
|
|
184
|
+
function Pe(t, e = {}) {
|
|
182
185
|
return e[t?.type || t?.action?.type] || "";
|
|
183
186
|
}
|
|
184
|
-
function
|
|
187
|
+
function he({ accountId: t, cacheTtlS: e = 3600, browserCacheTtlMs: a, promptVersion: o = $, cacheable: c = !0, piiPatternPack: s = v, utterance: y, compactPageContext: d = W, compactStructuredContext: m = G, extraInput: _, cacheKeyParts: p, onError: g = [] } = {}) {
|
|
185
188
|
return {
|
|
186
189
|
kind: "be_op",
|
|
187
190
|
op: "intent",
|
|
188
|
-
input: (
|
|
189
|
-
const { request:
|
|
190
|
-
return
|
|
191
|
-
utterance:
|
|
192
|
-
request:
|
|
191
|
+
input: (r) => {
|
|
192
|
+
const { request: n, context: i, bag: l, accountConfig: h } = r;
|
|
193
|
+
return R(P({
|
|
194
|
+
utterance: b(n, {
|
|
195
|
+
request: n,
|
|
193
196
|
context: i,
|
|
194
|
-
bag:
|
|
195
|
-
accountConfig:
|
|
196
|
-
}, y,
|
|
197
|
-
page_context: f(
|
|
198
|
-
structured_context: f(m, i,
|
|
197
|
+
bag: l,
|
|
198
|
+
accountConfig: h
|
|
199
|
+
}, y, s),
|
|
200
|
+
page_context: f(d, l.page, r),
|
|
201
|
+
structured_context: f(m, i, r),
|
|
199
202
|
locale: i.meta.locale,
|
|
200
|
-
...
|
|
201
|
-
}),
|
|
203
|
+
...P(f(_, r))
|
|
204
|
+
}), h, "intent");
|
|
202
205
|
},
|
|
203
206
|
out: "route",
|
|
204
|
-
cache: (
|
|
207
|
+
cache: (r) => f(c, r) ? B({
|
|
205
208
|
ttlS: e,
|
|
206
|
-
promptVersion:
|
|
209
|
+
promptVersion: o
|
|
207
210
|
}) : void 0,
|
|
208
|
-
...
|
|
209
|
-
cacheKey: ({ request:
|
|
210
|
-
if (f(
|
|
211
|
-
request:
|
|
212
|
-
context:
|
|
211
|
+
...a ? { browserCache: { ttlMs: a } } : {},
|
|
212
|
+
cacheKey: ({ request: r, context: n, bag: i, accountConfig: l }) => {
|
|
213
|
+
if (f(c, {
|
|
214
|
+
request: r,
|
|
215
|
+
context: n,
|
|
213
216
|
bag: i,
|
|
214
|
-
accountConfig:
|
|
217
|
+
accountConfig: l
|
|
215
218
|
}))
|
|
216
|
-
return
|
|
219
|
+
return z("intent", {
|
|
217
220
|
account: t,
|
|
218
|
-
prompt:
|
|
219
|
-
locale:
|
|
220
|
-
utterance: K(
|
|
221
|
-
request:
|
|
222
|
-
context:
|
|
221
|
+
prompt: o,
|
|
222
|
+
locale: n.meta.locale,
|
|
223
|
+
utterance: K(b(r, {
|
|
224
|
+
request: r,
|
|
225
|
+
context: n,
|
|
223
226
|
bag: i,
|
|
224
|
-
accountConfig:
|
|
225
|
-
}, y,
|
|
226
|
-
page: f(
|
|
227
|
-
request:
|
|
228
|
-
context:
|
|
227
|
+
accountConfig: l
|
|
228
|
+
}, y, s), n.meta.locale),
|
|
229
|
+
page: f(d, i.page, {
|
|
230
|
+
request: r,
|
|
231
|
+
context: n,
|
|
229
232
|
bag: i,
|
|
230
|
-
accountConfig:
|
|
233
|
+
accountConfig: l
|
|
231
234
|
}),
|
|
232
|
-
panel: f(m,
|
|
233
|
-
request:
|
|
234
|
-
context:
|
|
235
|
+
panel: f(m, n, {
|
|
236
|
+
request: r,
|
|
237
|
+
context: n,
|
|
235
238
|
bag: i,
|
|
236
|
-
accountConfig:
|
|
239
|
+
accountConfig: l
|
|
237
240
|
}),
|
|
238
|
-
...
|
|
239
|
-
request:
|
|
240
|
-
context:
|
|
241
|
+
...P(f(p, {
|
|
242
|
+
request: r,
|
|
243
|
+
context: n,
|
|
241
244
|
bag: i,
|
|
242
|
-
accountConfig:
|
|
245
|
+
accountConfig: l
|
|
243
246
|
}))
|
|
244
247
|
});
|
|
245
248
|
},
|
|
246
|
-
onError:
|
|
249
|
+
onError: g
|
|
247
250
|
};
|
|
248
251
|
}
|
|
249
|
-
function
|
|
250
|
-
const
|
|
252
|
+
function ke(t, e = "product") {
|
|
253
|
+
const a = String(t?.intent?.kind || t?.kind || "").trim();
|
|
251
254
|
return {
|
|
252
255
|
product_search: "search",
|
|
253
256
|
add_to_cart: "cart",
|
|
@@ -261,169 +264,169 @@ function Pe(t, e = "product") {
|
|
|
261
264
|
consulting_redirect: "consulting",
|
|
262
265
|
handoff_shopping: "consulting",
|
|
263
266
|
handOffShopping: "consulting"
|
|
264
|
-
}[
|
|
267
|
+
}[a] || a || e;
|
|
265
268
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
269
|
+
function we(t, e) {
|
|
270
|
+
return H(t, e).query || "";
|
|
268
271
|
}
|
|
269
|
-
function
|
|
270
|
-
const
|
|
271
|
-
return
|
|
272
|
-
...
|
|
273
|
-
query:
|
|
274
|
-
text:
|
|
275
|
-
facetParams:
|
|
276
|
-
facets:
|
|
277
|
-
categoryName:
|
|
278
|
-
categoryId:
|
|
279
|
-
size:
|
|
280
|
-
budgetMax:
|
|
281
|
-
maxPrice:
|
|
272
|
+
function H(t, e) {
|
|
273
|
+
const a = e.route?.search_params || e.route?.searchParams || {}, o = t?.payload || {}, c = a.query || o.query;
|
|
274
|
+
return P({
|
|
275
|
+
...a,
|
|
276
|
+
query: c,
|
|
277
|
+
text: a.text || o.text,
|
|
278
|
+
facetParams: a.facetParams || a.facet_params || o.facetParams || o.facet_params,
|
|
279
|
+
facets: a.facets || o.facets,
|
|
280
|
+
categoryName: a.categoryName || a.category_name || o.categoryName || o.category_name,
|
|
281
|
+
categoryId: a.categoryId || a.category_id || o.categoryId || o.category_id,
|
|
282
|
+
size: a.size || o.size || o.beden || o.shoeSize || o.clothingSize,
|
|
283
|
+
budgetMax: a.budgetMax || a.budget_max || a.maxPrice || o.budgetMax || o.budget_max || o.maxPrice,
|
|
284
|
+
maxPrice: a.maxPrice || o.maxPrice
|
|
282
285
|
});
|
|
283
286
|
}
|
|
284
|
-
function
|
|
287
|
+
function ve(t) {
|
|
285
288
|
return (t.route?.flow_params && typeof t.route.flow_params == "object" ? t.route.flow_params : null) || (t.route?.flowParams && typeof t.route.flowParams == "object" ? t.route.flowParams : null) || {};
|
|
286
289
|
}
|
|
287
|
-
function
|
|
290
|
+
function W(t = {}) {
|
|
288
291
|
const e = t?.product && typeof t.product == "object" ? t.product : null;
|
|
289
|
-
return
|
|
292
|
+
return P({
|
|
290
293
|
pageType: t?.pageType || t?.type || "other",
|
|
291
294
|
sku: t?.sku || e?.sku,
|
|
292
295
|
product_name: e?.name || e?.title,
|
|
293
296
|
category_names: Array.isArray(e?.category_names) ? e.category_names.slice(0, 5) : void 0
|
|
294
297
|
});
|
|
295
298
|
}
|
|
296
|
-
function
|
|
299
|
+
function G(t = {}) {
|
|
297
300
|
const e = t.panel || {};
|
|
298
|
-
return
|
|
301
|
+
return P({
|
|
299
302
|
screen_type: e.screen_type,
|
|
300
303
|
screen_sku_list: Array.isArray(e.screen_sku_list) ? e.screen_sku_list.slice(0, 24) : void 0,
|
|
301
304
|
chat_mentioned_skus: Array.isArray(e.chat_mentioned_skus) ? e.chat_mentioned_skus.slice(0, 12) : void 0,
|
|
302
|
-
last_search:
|
|
305
|
+
last_search: Q(e.last_search),
|
|
303
306
|
current_panel_product_count: Array.isArray(e.last_search_products) ? e.last_search_products.length : 0
|
|
304
307
|
});
|
|
305
308
|
}
|
|
306
|
-
function
|
|
307
|
-
return !t || typeof t != "object" ? null :
|
|
308
|
-
query:
|
|
309
|
+
function Q(t) {
|
|
310
|
+
return !t || typeof t != "object" ? null : P({
|
|
311
|
+
query: k(t.query),
|
|
309
312
|
source: t.source,
|
|
310
313
|
count: t.count,
|
|
311
|
-
category:
|
|
312
|
-
goal:
|
|
314
|
+
category: k(t.category),
|
|
315
|
+
goal: k(t.goal)
|
|
313
316
|
});
|
|
314
317
|
}
|
|
315
|
-
function
|
|
316
|
-
return
|
|
318
|
+
function V(t, e = v) {
|
|
319
|
+
return L(t, e) || k(U(t) || D(t), e);
|
|
317
320
|
}
|
|
318
|
-
function
|
|
319
|
-
const
|
|
320
|
-
return
|
|
321
|
+
function b(t, e, a, o) {
|
|
322
|
+
const c = f(a, t, e);
|
|
323
|
+
return c ? String(c) : V(t, o);
|
|
321
324
|
}
|
|
322
|
-
function
|
|
325
|
+
function k(t, e = v) {
|
|
323
326
|
return M(String(t || ""), e);
|
|
324
327
|
}
|
|
325
|
-
function f(t, e,
|
|
326
|
-
return typeof t == "function" ? t(e,
|
|
328
|
+
function f(t, e, a) {
|
|
329
|
+
return typeof t == "function" ? t(e, a) : t;
|
|
327
330
|
}
|
|
328
|
-
function
|
|
331
|
+
function P(t) {
|
|
329
332
|
return Object.fromEntries(Object.entries(t || {}).filter(([, e]) => e != null && e !== "" && (!Array.isArray(e) || e.length)));
|
|
330
333
|
}
|
|
331
334
|
export {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
335
|
+
Ut as AgentError,
|
|
336
|
+
C as ContextStore,
|
|
337
|
+
it as FALLBACK_STATUS,
|
|
338
|
+
Kt as __resetAllCartCoalescersForTesting,
|
|
339
|
+
Wt as __resetAllPdpHydratorsForTesting,
|
|
340
|
+
ue as action,
|
|
341
|
+
bt as actionButtonsUiSpec,
|
|
342
|
+
_t as alignProductsToTable,
|
|
343
|
+
L as anonymousRequestText,
|
|
344
|
+
oe as applyCompactionResult,
|
|
345
|
+
pe as beErrorToAgentError,
|
|
346
|
+
Jt as buildCompactionRequest,
|
|
347
|
+
ce as buildPdpFollowupSteps,
|
|
348
|
+
Y as buildPhotoSimilarityProfile,
|
|
349
|
+
Z as buildProductSimilarityProfile,
|
|
350
|
+
tt as buildSimilarityQueries,
|
|
351
|
+
Xt as buildToolUiSteps,
|
|
352
|
+
q as caughtToStreamError,
|
|
353
|
+
Et as coalesceAddToCart,
|
|
354
|
+
ft as compactAccountConfig,
|
|
355
|
+
Ct as compactContextProducts,
|
|
356
|
+
kt as compactObject,
|
|
357
|
+
Bt as compactProductSurfaceForLlm,
|
|
358
|
+
Tt as comparisonResultForUi,
|
|
359
|
+
mt as comparisonUiSpec,
|
|
360
|
+
xt as createFlow,
|
|
361
|
+
O as createJwtProvider,
|
|
362
|
+
vt as createPrivacyHelpers,
|
|
363
|
+
Dt as createReadPageStep,
|
|
364
|
+
F as createToolBridge,
|
|
365
|
+
I as createWorkerRpc,
|
|
366
|
+
ht as declarativeBeOpCache,
|
|
367
|
+
_e as defaultPiiPatternPack,
|
|
368
|
+
T as defaultPiiPatterns,
|
|
369
|
+
x as done,
|
|
370
|
+
St as elapsedMs,
|
|
371
|
+
j as error,
|
|
372
|
+
Pe as explicitRoute,
|
|
373
|
+
$t as fallbackStatus,
|
|
374
|
+
Qt as firstArrayValue,
|
|
375
|
+
ve as flowParamsFromRoute,
|
|
376
|
+
Ht as handleMainRpc,
|
|
377
|
+
ut as homePanelReset,
|
|
378
|
+
Ft as httpErrorToAgentError,
|
|
379
|
+
B as inputHashCachePolicy,
|
|
380
|
+
E as invokeBeOp,
|
|
381
|
+
Pt as isFallbackStatus,
|
|
382
|
+
z as llmCacheKey,
|
|
383
|
+
he as llmIntentStep,
|
|
384
|
+
lt as mergeProductSurfaceEvidence,
|
|
385
|
+
Zt as mergeRoundProducts,
|
|
386
|
+
re as metadata,
|
|
387
|
+
wt as mintDevJwt,
|
|
388
|
+
At as normalizeComparisonTable,
|
|
389
|
+
te as normalizeProduct,
|
|
390
|
+
et as normalizeSimilarityText,
|
|
391
|
+
pt as nowIso,
|
|
392
|
+
dt as plainMessageContent,
|
|
393
|
+
gt as productDetailsUiSpec,
|
|
394
|
+
Yt as productFactsKey,
|
|
395
|
+
ne as productSkuKey,
|
|
396
|
+
ye as productSurfaceReviewText,
|
|
397
|
+
ae as productsUiSpec,
|
|
398
|
+
rt as rankSimilarProducts,
|
|
399
|
+
at as rankSimilarProductsAsync,
|
|
397
400
|
M as redactPii,
|
|
398
401
|
U as requestText,
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
402
|
+
Gt as resolveFlow,
|
|
403
|
+
It as retailAnonymizeMessages,
|
|
404
|
+
de as retailAnonymousRequestText,
|
|
405
|
+
fe as retailRedactPii,
|
|
406
|
+
Ot as routeFlowParams,
|
|
407
|
+
ke as routeKind,
|
|
408
|
+
zt as routeSkuList,
|
|
409
|
+
D as routeText,
|
|
410
|
+
ct as runMainRpc,
|
|
408
411
|
A as runTurn,
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
412
|
+
ot as scoreSimilarityCandidate,
|
|
413
|
+
se as searchFollowUpPills,
|
|
414
|
+
H as searchInputFromRoute,
|
|
415
|
+
we as searchQueryFromRoute,
|
|
416
|
+
Rt as shouldCompact,
|
|
417
|
+
ee as singleFlight,
|
|
418
|
+
Nt as stableKey,
|
|
419
|
+
ge as startWorker,
|
|
420
|
+
me as stickyContextKey,
|
|
421
|
+
Vt as textChunk,
|
|
419
422
|
K as textKey,
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
423
|
+
nt as tokenizeSimilarityText,
|
|
424
|
+
ie as trimProductFactsCore,
|
|
425
|
+
Mt as trimProductFactsListCore,
|
|
426
|
+
qt as uiSpec,
|
|
427
|
+
jt as validateToolArgs,
|
|
428
|
+
R as withAccountConfig,
|
|
429
|
+
yt as withDeclarativeBeOpCache,
|
|
430
|
+
Lt as withSimilarsAppend,
|
|
431
|
+
le as wrapResolveProductsWithPdpHydration
|
|
429
432
|
};
|