@gengage/assistant-fe 0.4.20 → 0.5.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.
Files changed (165) hide show
  1. package/README.md +1 -1
  2. package/dist/{api-paths-CReMDZWg.js → api-paths-y5nkfEBG.js} +1 -1
  3. package/dist/chat-runtime.js +1 -1
  4. package/dist/chat.iife.js +43 -43
  5. package/dist/chat.js +1 -1
  6. package/dist/common-BKPSOoIP.js +324 -0
  7. package/dist/common.js +64 -81
  8. package/dist/{connection-warning-C_4e7ahZ.js → connection-warning-DJiyLM46.js} +1 -1
  9. package/dist/{fastIntent-DMNzXOSI.js → fastIntent-1T2g9art.js} +2 -2
  10. package/dist/index.js +49 -52
  11. package/dist/{native-webview-Bbcvvi_5.js → native-webview-y3a9R9hH.js} +1 -1
  12. package/dist/native.iife.js +23 -23
  13. package/dist/native.js +1 -1
  14. package/dist/{overlay-O4nlUrzw.js → overlay-v3nvcGlE.js} +2 -5
  15. package/dist/overlay.js +2 -2
  16. package/dist/qna-runtime.js +1 -1
  17. package/dist/qna.iife.js +36 -36
  18. package/dist/qna.js +1 -1
  19. package/dist/{runtime-C51WykbJ.js → runtime-BMNOS2Mq.js} +176 -196
  20. package/dist/runtime-DOS9yRRx.js +650 -0
  21. package/dist/{runtime-DBh8899B.js → runtime-DsP6go8z.js} +2194 -2225
  22. package/dist/{simbut-CO1rLVM9.js → simbut-BwxzoBcY.js} +7 -7
  23. package/dist/simbut.iife.js +12 -12
  24. package/dist/simbut.js +1 -1
  25. package/dist/{simrel-zCDlCrqG.js → simrel-C07wZN8Q.js} +2 -2
  26. package/dist/simrel-runtime.js +1 -1
  27. package/dist/simrel.iife.js +35 -35
  28. package/dist/simrel.js +2 -2
  29. package/dist/widget-base-Dliq3QAf.js +362 -0
  30. package/package.json +8 -6
  31. package/dist/chat/api.d.ts +0 -88
  32. package/dist/chat/assistant-mode.d.ts +0 -19
  33. package/dist/chat/attachment-utils.d.ts +0 -9
  34. package/dist/chat/catalog.d.ts +0 -826
  35. package/dist/chat/chat-presentation-state.d.ts +0 -53
  36. package/dist/chat/components/AIGroupingCards.d.ts +0 -3
  37. package/dist/chat/components/AISuggestedSearchCards.d.ts +0 -3
  38. package/dist/chat/components/AITopPicks.d.ts +0 -3
  39. package/dist/chat/components/BeautyPhotoStep.d.ts +0 -16
  40. package/dist/chat/components/CategoriesContainer.d.ts +0 -3
  41. package/dist/chat/components/ChatDrawer.d.ts +0 -360
  42. package/dist/chat/components/ChoicePrompter.d.ts +0 -21
  43. package/dist/chat/components/ComparisonTable.d.ts +0 -57
  44. package/dist/chat/components/ConsultingStylePicker.d.ts +0 -34
  45. package/dist/chat/components/FloatingComparisonButton.d.ts +0 -2
  46. package/dist/chat/components/FloatingLauncher.d.ts +0 -79
  47. package/dist/chat/components/GroundingReviewCard.d.ts +0 -3
  48. package/dist/chat/components/HandoffNotice.d.ts +0 -4
  49. package/dist/chat/components/KvkkBanner.d.ts +0 -6
  50. package/dist/chat/components/Launcher.d.ts +0 -28
  51. package/dist/chat/components/PanelRestoreCard.d.ts +0 -4
  52. package/dist/chat/components/PanelTopBar.d.ts +0 -32
  53. package/dist/chat/components/PhotoAnalysisCard.d.ts +0 -20
  54. package/dist/chat/components/ProductSummaryCard.d.ts +0 -3
  55. package/dist/chat/components/ProsAndCons.d.ts +0 -8
  56. package/dist/chat/components/ReviewHighlights.d.ts +0 -9
  57. package/dist/chat/components/actionClassifier.d.ts +0 -12
  58. package/dist/chat/components/product-price-layout.d.ts +0 -18
  59. package/dist/chat/components/productMentionLinker.d.ts +0 -25
  60. package/dist/chat/components/renderUISpec.d.ts +0 -11
  61. package/dist/chat/components/typewriter.d.ts +0 -24
  62. package/dist/chat/extendedModeManager.d.ts +0 -32
  63. package/dist/chat/features/beauty-consulting/consulting-grid.d.ts +0 -31
  64. package/dist/chat/features/beauty-consulting/drawer-extensions.d.ts +0 -20
  65. package/dist/chat/features/beauty-consulting/mode-controller.d.ts +0 -53
  66. package/dist/chat/features/beauty-consulting/registry.d.ts +0 -3
  67. package/dist/chat/features/beauty-consulting/stream-handler.d.ts +0 -38
  68. package/dist/chat/history-storage.d.ts +0 -85
  69. package/dist/chat/index.d.ts +0 -5
  70. package/dist/chat/kvkk.d.ts +0 -20
  71. package/dist/chat/locales/en.d.ts +0 -2
  72. package/dist/chat/locales/index.d.ts +0 -5
  73. package/dist/chat/locales/tr.d.ts +0 -2
  74. package/dist/chat/panel-manager.d.ts +0 -126
  75. package/dist/chat/runtime.d.ts +0 -400
  76. package/dist/chat/session-persistence.d.ts +0 -65
  77. package/dist/chat/stream-error-display.d.ts +0 -6
  78. package/dist/chat/types.d.ts +0 -543
  79. package/dist/chat/utils/chat-presentation-debug.d.ts +0 -19
  80. package/dist/chat/utils/get-chat-scroll-element.d.ts +0 -10
  81. package/dist/chat/utils/ui.d.ts +0 -10
  82. package/dist/common/action-router.d.ts +0 -26
  83. package/dist/common/activity-tracker.d.ts +0 -37
  84. package/dist/common/analytics-events.d.ts +0 -91
  85. package/dist/common/analytics.d.ts +0 -61
  86. package/dist/common/api-paths.d.ts +0 -15
  87. package/dist/common/client.d.ts +0 -27
  88. package/dist/common/communication-bridge.d.ts +0 -51
  89. package/dist/common/config-constants.d.ts +0 -1
  90. package/dist/common/config-schema.d.ts +0 -81
  91. package/dist/common/connection-warning.d.ts +0 -8
  92. package/dist/common/consulting-sources.d.ts +0 -9
  93. package/dist/common/context.d.ts +0 -27
  94. package/dist/common/css-escape.d.ts +0 -1
  95. package/dist/common/customization-factories.d.ts +0 -62
  96. package/dist/common/debug.d.ts +0 -13
  97. package/dist/common/events.d.ts +0 -46
  98. package/dist/common/fastIntent.d.ts +0 -1
  99. package/dist/common/find-similar-payload.d.ts +0 -3
  100. package/dist/common/ga-datalayer.d.ts +0 -89
  101. package/dist/common/global-error-toast.d.ts +0 -6
  102. package/dist/common/index.d.ts +0 -50
  103. package/dist/common/indexed-db.d.ts +0 -79
  104. package/dist/common/locale.d.ts +0 -1
  105. package/dist/common/native-webview.d.ts +0 -60
  106. package/dist/common/navigation.d.ts +0 -5
  107. package/dist/common/overlay.d.ts +0 -168
  108. package/dist/common/page-detect.d.ts +0 -30
  109. package/dist/common/pill-launcher.d.ts +0 -51
  110. package/dist/common/preflight.d.ts +0 -13
  111. package/dist/common/price-formatter.d.ts +0 -35
  112. package/dist/common/product-utils.d.ts +0 -35
  113. package/dist/common/protocol-adapter.d.ts +0 -105
  114. package/dist/common/renderer/dom.d.ts +0 -3
  115. package/dist/common/renderer/index.d.ts +0 -4
  116. package/dist/common/renderer/overrides.d.ts +0 -23
  117. package/dist/common/renderer/registry.d.ts +0 -2
  118. package/dist/common/renderer/types.d.ts +0 -19
  119. package/dist/common/safe-html.d.ts +0 -22
  120. package/dist/common/sdk-version.d.ts +0 -3
  121. package/dist/common/skeleton.d.ts +0 -8
  122. package/dist/common/streaming.d.ts +0 -37
  123. package/dist/common/suggested-search-keywords.d.ts +0 -18
  124. package/dist/common/theme-utils.d.ts +0 -15
  125. package/dist/common/tts-player.d.ts +0 -13
  126. package/dist/common/types.d.ts +0 -381
  127. package/dist/common/ui-theme.d.ts +0 -9
  128. package/dist/common/uuidv7.d.ts +0 -7
  129. package/dist/common/voice-input.d.ts +0 -74
  130. package/dist/common/widget-base.d.ts +0 -97
  131. package/dist/common-BM2ZsSLI.js +0 -491
  132. package/dist/index.d.ts +0 -25
  133. package/dist/native/index.d.ts +0 -2
  134. package/dist/overlay.d.ts +0 -4
  135. package/dist/qna/api.d.ts +0 -23
  136. package/dist/qna/catalog.d.ts +0 -73
  137. package/dist/qna/components/ButtonRow.d.ts +0 -15
  138. package/dist/qna/components/TextInput.d.ts +0 -11
  139. package/dist/qna/components/renderUISpec.d.ts +0 -7
  140. package/dist/qna/index.d.ts +0 -3
  141. package/dist/qna/locales/en.d.ts +0 -2
  142. package/dist/qna/locales/index.d.ts +0 -5
  143. package/dist/qna/locales/tr.d.ts +0 -2
  144. package/dist/qna/normalize-ui-specs.d.ts +0 -15
  145. package/dist/qna/runtime.d.ts +0 -62
  146. package/dist/qna/types.d.ts +0 -98
  147. package/dist/runtime-bbMljGVG.js +0 -688
  148. package/dist/simbut/index.d.ts +0 -22
  149. package/dist/simbut/locales.d.ts +0 -3
  150. package/dist/simbut/types.d.ts +0 -43
  151. package/dist/simrel/api.d.ts +0 -25
  152. package/dist/simrel/catalog.d.ts +0 -110
  153. package/dist/simrel/components/GroupTabs.d.ts +0 -24
  154. package/dist/simrel/components/ProductCard.d.ts +0 -19
  155. package/dist/simrel/components/ProductGrid.d.ts +0 -17
  156. package/dist/simrel/components/renderUISpec.d.ts +0 -7
  157. package/dist/simrel/index.d.ts +0 -5
  158. package/dist/simrel/locales/en.d.ts +0 -2
  159. package/dist/simrel/locales/index.d.ts +0 -5
  160. package/dist/simrel/locales/tr.d.ts +0 -2
  161. package/dist/simrel/renderers/default.d.ts +0 -40
  162. package/dist/simrel/runtime.d.ts +0 -59
  163. package/dist/simrel/types.d.ts +0 -141
  164. package/dist/widget-base-Cf9ofZhh.js +0 -589
  165. /package/dist/{context-DGz5F81j.js → context-BBuSsXZ9.js} +0 -0
package/dist/chat.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, c as t, d as r, i as s, l as n, n as i, o as c, r as l, s as o, t as C, u as h } from "./runtime-DBh8899B.js";
1
+ import { a as e, c as t, d as r, i as s, l as n, n as i, o as c, r as l, s as o, t as C, u as h } from "./runtime-DsP6go8z.js";
2
2
  import { t as p } from "./chat-BRKK63lt.js";
3
3
  export {
4
4
  n as CHAT_SCROLL_ELEMENT_ID,
@@ -0,0 +1,324 @@
1
+ import { i as g } from "./widget-base-Dliq3QAf.js";
2
+ import { c as l, i as p, o as d, r as u, t as w } from "./schemas-CLo8wCjs.js";
3
+ import { a as y, i as h } from "./overlay-v3nvcGlE.js";
4
+ var c = d({ enabled: u().default(!0) }), v = d({
5
+ chat: l().optional(),
6
+ qna: l().optional(),
7
+ simrel: l().optional(),
8
+ simbut: l().optional()
9
+ }), b = d({}), U = d({
10
+ idempotencyKey: l().default(y),
11
+ requireDomReady: u().default(!0)
12
+ }), I = w([
13
+ "log-and-ignore",
14
+ "throw",
15
+ "delegate"
16
+ ]), T = d({
17
+ unknownActionPolicy: I.default("log-and-ignore"),
18
+ allowScriptCall: u().default(!1)
19
+ }), f = d({
20
+ version: p("1", { error: 'version must be "1"' }),
21
+ accountId: l({ error: "accountId must be a non-empty string" }).min(1, { error: "accountId must be a non-empty string" }),
22
+ middlewareUrl: l({ error: 'middlewareUrl must be a valid URL (e.g. "https://your-backend.example.com")' }).url({ error: 'middlewareUrl must be a valid URL (e.g. "https://your-backend.example.com")' }),
23
+ locale: l().optional(),
24
+ widgets: d({
25
+ chat: c.default({ enabled: !0 }),
26
+ qna: c.default({ enabled: !0 }),
27
+ simrel: c.optional(),
28
+ simbut: c.default({ enabled: !1 })
29
+ }),
30
+ mounts: v.default({}),
31
+ transport: b.default({}),
32
+ gtm: U.default({
33
+ idempotencyKey: "__gengageWidgetsInit",
34
+ requireDomReady: !0
35
+ }),
36
+ actionHandling: T.default({
37
+ unknownActionPolicy: "log-and-ignore",
38
+ allowScriptCall: !1
39
+ })
40
+ });
41
+ function C(e) {
42
+ g("config", "parsing account runtime config", e);
43
+ const n = f.parse(e);
44
+ return g("config", "config resolved", {
45
+ accountId: n.accountId,
46
+ middlewareUrl: n.middlewareUrl
47
+ }), n;
48
+ }
49
+ function S(e) {
50
+ return f.safeParse(e);
51
+ }
52
+ function x(e) {
53
+ return C({
54
+ version: "1",
55
+ accountId: e.accountId,
56
+ middlewareUrl: e.middlewareUrl,
57
+ locale: e.locale,
58
+ widgets: {
59
+ chat: { enabled: !0 },
60
+ qna: { enabled: !0 },
61
+ simbut: { enabled: !1 }
62
+ }
63
+ });
64
+ }
65
+ var M = "tr";
66
+ function N(e) {
67
+ return {
68
+ ACCOUNT_ID: e.accountId,
69
+ MIDDLEWARE_URL: e.middlewareUrl,
70
+ LOCALE: e.locale ?? "tr"
71
+ };
72
+ }
73
+ function $(e, n = {}) {
74
+ const t = {
75
+ accountId: e.accountId,
76
+ middlewareUrl: e.middlewareUrl,
77
+ session: { sessionId: e.sessionId },
78
+ variant: "floating",
79
+ locale: e.locale ?? "tr",
80
+ ...n
81
+ };
82
+ return e.theme !== void 0 && (t.theme = e.theme), t;
83
+ }
84
+ function F(e, n = {}) {
85
+ const t = {
86
+ accountId: e.accountId,
87
+ middlewareUrl: e.middlewareUrl,
88
+ session: { sessionId: e.sessionId },
89
+ pageContext: {
90
+ pageType: "pdp",
91
+ sku: e.sku
92
+ },
93
+ mountTarget: e.mountTarget,
94
+ ...n
95
+ };
96
+ return e.theme !== void 0 && (t.theme = e.theme), t;
97
+ }
98
+ function K(e, n = {}) {
99
+ const t = {
100
+ accountId: e.accountId,
101
+ middlewareUrl: e.middlewareUrl,
102
+ session: { sessionId: e.sessionId },
103
+ sku: e.sku,
104
+ mountTarget: e.mountTarget,
105
+ ...n
106
+ };
107
+ return e.theme !== void 0 && (t.theme = e.theme), t;
108
+ }
109
+ function E(e) {
110
+ try {
111
+ return document.querySelector(e), !0;
112
+ } catch {
113
+ return !1;
114
+ }
115
+ }
116
+ function P(e, n) {
117
+ const t = [], r = e.mounts, i = [
118
+ ["qna", r.qna],
119
+ ["simrel", r.simrel],
120
+ ["simbut", r.simbut],
121
+ ["chat", r.chat]
122
+ ];
123
+ for (const [a, s] of i)
124
+ if (s !== void 0) {
125
+ if (a === "simrel" && e.widgets.simrel === void 0) {
126
+ t.push({
127
+ code: "SIMREL_MOUNT_IGNORED",
128
+ message: "[gengage preflight] mounts.simrel is set but widgets.simrel is not declared — SimRel will not initialize. Add widgets.simrel: { enabled: true } to enable it.",
129
+ severity: "warn"
130
+ });
131
+ continue;
132
+ }
133
+ if (!E(s)) {
134
+ t.push({
135
+ code: "INVALID_SELECTOR",
136
+ message: `[gengage preflight] ${a} mount selector is invalid CSS: "${s}"`,
137
+ severity: "error"
138
+ });
139
+ continue;
140
+ }
141
+ document.querySelector(s) || t.push({
142
+ code: "MOUNT_NOT_FOUND",
143
+ message: `[gengage preflight] ${a} mount target not found: "${s}" — widget will skip or wait for DOM`,
144
+ severity: "warn"
145
+ });
146
+ }
147
+ if (e.widgets.simbut.enabled && r.simbut === void 0) {
148
+ const a = "#gengage-simbut";
149
+ document.querySelector(a) || t.push({
150
+ code: "SIMBUT_MOUNT_REQUIRED",
151
+ message: `[gengage preflight] SimBut is enabled but no mount target is configured. Set mounts.simbut to your product image wrapper selector (e.g. "#product-gallery"). The default "${a}" was not found in the DOM.`,
152
+ severity: "error"
153
+ });
154
+ }
155
+ const o = e.gtm.idempotencyKey;
156
+ if (window[o] !== void 0 && t.push({
157
+ code: "DUPLICATE_IDEMPOTENCY",
158
+ message: `[gengage preflight] window["${o}"] already exists — widgets may have already initialized`,
159
+ severity: "warn"
160
+ }), !n?.skipCspCheck) {
161
+ let a = !1;
162
+ const s = (m) => {
163
+ m.blockedURI && e.middlewareUrl.startsWith(m.blockedURI) && (a = !0);
164
+ };
165
+ document.addEventListener("securitypolicyviolation", s);
166
+ try {
167
+ fetch(e.middlewareUrl, {
168
+ method: "HEAD",
169
+ mode: "no-cors"
170
+ }).catch(() => {
171
+ });
172
+ } catch {
173
+ a = !0;
174
+ }
175
+ document.removeEventListener("securitypolicyviolation", s), a && t.push({
176
+ code: "CSP_BLOCKED",
177
+ message: `[gengage preflight] middleware URL may be blocked by Content-Security-Policy: "${e.middlewareUrl}". Add it to connect-src.`,
178
+ severity: "warn"
179
+ });
180
+ }
181
+ for (const a of t) a.severity === "error" ? console.error(a.message) : console.warn(a.message);
182
+ return {
183
+ ok: t.every((a) => a.severity !== "error"),
184
+ warnings: t
185
+ };
186
+ }
187
+ function R(e) {
188
+ const n = S(e);
189
+ if (!n.success) {
190
+ const t = n.error.issues.map((r) => `${r.path.join(".")}: ${r.message}`).join("; ");
191
+ throw new Error(`[gengage] Invalid runtime config: ${t}`);
192
+ }
193
+ return n.data;
194
+ }
195
+ function k(e, n, t) {
196
+ const r = {
197
+ accountId: e.accountId,
198
+ middlewareUrl: e.middlewareUrl,
199
+ idempotencyKey: e.gtm.idempotencyKey
200
+ };
201
+ return e.locale !== void 0 && (r.locale = e.locale), t !== void 0 && (r.pageContext = t, t.sku !== void 0 && (r.sku = t.sku)), r.chat = { enabled: e.widgets.chat.enabled }, e.mounts.chat !== void 0 && (r.chat.mountTarget = e.mounts.chat), r.qna = { enabled: e.widgets.qna.enabled }, e.mounts.qna !== void 0 && (r.qna.mountTarget = e.mounts.qna), e.widgets.simrel !== void 0 && (r.simrel = {
202
+ enabled: e.widgets.simrel.enabled,
203
+ ...e.mounts.simrel !== void 0 ? { mountTarget: e.mounts.simrel } : {}
204
+ }), r.simbut = { enabled: e.widgets.simbut.enabled }, e.mounts.simbut !== void 0 && (r.simbut.mountTarget = e.mounts.simbut), n?.onAddToCart !== void 0 && (r.onAddToCart = n.onAddToCart), n?.onProductNavigate !== void 0 && (r.onProductNavigate = n.onProductNavigate), n?.onFindSimilar !== void 0 && (r.simbut.onFindSimilar = n.onFindSimilar), n?.onScriptCall !== void 0 && (r.onScriptCall = n.onScriptCall), r;
205
+ }
206
+ async function B(e) {
207
+ const n = R(e.runtimeConfig);
208
+ if (e.preflight !== !1) {
209
+ const i = P(n);
210
+ if (!i.ok) {
211
+ const o = i.warnings.filter((a) => a.severity === "error");
212
+ throw new Error(`[gengage] Preflight failed: ${o.map((a) => a.message).join("; ")}`);
213
+ }
214
+ }
215
+ const t = e.contextResolver?.(), r = await h(k(n, e.hostActions, t));
216
+ if (e.contextResolver !== void 0) {
217
+ const i = e.contextResolver, o = () => {
218
+ const s = i();
219
+ r.updateContext(s);
220
+ };
221
+ window.addEventListener("gengage:context:update", o);
222
+ const a = r.destroy.bind(r);
223
+ r.destroy = () => {
224
+ window.removeEventListener("gengage:context:update", o), a();
225
+ };
226
+ }
227
+ return r;
228
+ }
229
+ var L = [
230
+ {
231
+ pageType: "home",
232
+ urlPatterns: [
233
+ "^/$",
234
+ "^/index\\.html?$",
235
+ "^/anasayfa$"
236
+ ]
237
+ },
238
+ {
239
+ pageType: "search",
240
+ urlPatterns: [
241
+ "/arama",
242
+ "/search",
243
+ "/ara\\?"
244
+ ],
245
+ queryParam: "q"
246
+ },
247
+ {
248
+ pageType: "cart",
249
+ urlPatterns: [
250
+ "/sepet",
251
+ "/cart",
252
+ "/basket",
253
+ "/sepetim"
254
+ ]
255
+ },
256
+ {
257
+ pageType: "plp",
258
+ urlPatterns: [
259
+ "/kategori/",
260
+ "/category/",
261
+ "/c/",
262
+ "/koleksiyon/",
263
+ "/collection/"
264
+ ]
265
+ },
266
+ {
267
+ pageType: "pdp",
268
+ urlPatterns: [
269
+ "/urun/",
270
+ "/product/",
271
+ "/p/",
272
+ "/-p-",
273
+ "/-pm-"
274
+ ]
275
+ }
276
+ ];
277
+ function D(e, n) {
278
+ const t = n ?? (typeof window < "u" ? new URL(window.location.href) : null);
279
+ if (!t) return "other";
280
+ const r = e ?? L, i = t.pathname;
281
+ for (const o of r)
282
+ if (!(o.urlPatterns && !o.urlPatterns.some((a) => {
283
+ try {
284
+ return new RegExp(a, "i").test(i);
285
+ } catch {
286
+ return !1;
287
+ }
288
+ })) && !(o.queryParam && !t.searchParams.has(o.queryParam)) && !(o.selector && typeof document < "u" && !document.querySelector(o.selector)))
289
+ return o.pageType;
290
+ return "other";
291
+ }
292
+ function q(e) {
293
+ const n = e ?? (typeof window < "u" ? new URL(window.location.href) : null);
294
+ if (!n) return;
295
+ const t = n.pathname, r = t.match(/\/(?:p|urun|product)\/([^/?#]+)/i);
296
+ if (r?.[1]) return r[1];
297
+ const i = t.match(/-p-(\d+)/i);
298
+ if (i?.[1]) return i[1];
299
+ }
300
+ function W(e) {
301
+ const n = D(e), t = { pageType: n };
302
+ if (n === "pdp") {
303
+ const r = q();
304
+ r && (t.sku = r);
305
+ }
306
+ return typeof window < "u" && (t.url = window.location.href), t;
307
+ }
308
+ export {
309
+ P as a,
310
+ $ as c,
311
+ f as d,
312
+ I as f,
313
+ S as h,
314
+ B as i,
315
+ F as l,
316
+ C as m,
317
+ D as n,
318
+ M as o,
319
+ x as p,
320
+ q as r,
321
+ N as s,
322
+ W as t,
323
+ K as u
324
+ };
package/dist/common.js CHANGED
@@ -1,91 +1,74 @@
1
- import { a, d as t, f as s, h as r, i as n, l as i, m as o, n as c, o as m, p as l, r as g, t as d, u as p } from "./api-paths-CReMDZWg.js";
2
- import { C as E, E as S, S as h, T as v, _ as f, a as y, b as C, c as A, d as T, f as w, g as G, h as I, l as U, m as R, n as W, o as D, p as N, r as P, t as _, u as k, v as O, w as b, x as L, y as x } from "./widget-base-Cf9ofZhh.js";
3
- import { N as F, a as M, c as z, i as H, k as V, n as K, o as Q, r as q, s as Z, t as j } from "./context-DGz5F81j.js";
4
- import { i as X, n as Y, o as $, r as ee, t as ae } from "./fastIntent-DMNzXOSI.js";
5
- import { n as se, t as re } from "./connection-warning-C_4e7ahZ.js";
6
- import { i as ie, n as oe, r as ce, t as me } from "./overlay-O4nlUrzw.js";
7
- import { a as ge, i as de, n as pe, r as ue } from "./native-webview-Bbcvvi_5.js";
8
- import { _ as Se, a as he, c as ve, d as fe, f as ye, g as Ce, h as Ae, i as Te, l as we, m as Ge, n as Ie, o as Ue, p as Re, r as We, s as De, t as Ne, u as Pe, v as _e, y as ke } from "./common-BM2ZsSLI.js";
1
+ import { a, d as t, f as s, h as r, i, l as o, m as n, n as c, o as m, p as l, r as d, t as g, u as p } from "./api-paths-y5nkfEBG.js";
2
+ import { N as f, a as E, c as S, i as h, k as C, n as T, o as y, r as A, s as G, t as I } from "./context-BBuSsXZ9.js";
3
+ import { a as R, c as W, d as v, f as N, l as P, n as U, o as O, p as D, r as _, t as L, u as b } from "./widget-base-Dliq3QAf.js";
4
+ import { i as x, n as B, o as F, r as z, t as M } from "./fastIntent-1T2g9art.js";
5
+ import { n as K, t as H } from "./connection-warning-DJiyLM46.js";
6
+ import { i as q, n as Z, r as j, t as J } from "./overlay-v3nvcGlE.js";
7
+ import { a as Y, i as $, n as ee, r as ae } from "./native-webview-y3a9R9hH.js";
8
+ import { a as se, c as re, d as ie, f as oe, h as ne, i as ce, l as me, m as le, n as de, o as ge, p as pe, r as ue, s as fe, t as Ee, u as Se } from "./common-BKPSOoIP.js";
9
9
  export {
10
- Ge as AccountRuntimeConfigSchema,
11
- Ae as AnalyticsAuthModeSchema,
12
- ye as AnalyticsClient,
13
- k as BASE_WIDGET_THEME,
14
- _ as BaseWidget,
15
- Ue as DEFAULT_CUSTOMIZATION_LOCALE,
16
- w as DEFAULT_WIDGET_THEME_TOKENS,
17
- W as GENGAGE_BUILD_FLAVOR,
18
- P as GENGAGE_VERSION,
19
- Ce as UnknownActionPolicySchema,
20
- ee as VoiceInput,
21
- g as adaptBackendEvent,
22
- pe as applyNativeSession,
23
- Ne as autoDetectPageContext,
24
- R as basketAddEvent,
25
- j as bootstrapSession,
26
- d as buildChatEndpointUrl,
27
- me as buildOverlayIdempotencyKey,
28
- I as chatHistorySnapshotEvent,
29
- G as checkoutCompleteEvent,
30
- f as checkoutStartEvent,
31
- re as configureConnectionWarning,
10
+ ie as AccountRuntimeConfigSchema,
11
+ b as BASE_WIDGET_THEME,
12
+ L as BaseWidget,
13
+ ge as DEFAULT_CUSTOMIZATION_LOCALE,
14
+ N as DEFAULT_WIDGET_THEME_TOKENS,
15
+ U as GENGAGE_BUILD_FLAVOR,
16
+ _ as GENGAGE_VERSION,
17
+ oe as UnknownActionPolicySchema,
18
+ z as VoiceInput,
19
+ d as adaptBackendEvent,
20
+ ee as applyNativeSession,
21
+ Ee as autoDetectPageContext,
22
+ I as bootstrapSession,
23
+ g as buildChatEndpointUrl,
24
+ J as buildOverlayIdempotencyKey,
25
+ H as configureConnectionWarning,
32
26
  t as consumeStream,
33
- De as createAccountIdentity,
34
- Re as createAnalyticsClient,
35
- Se as createDefaultAccountRuntimeConfig,
36
- ve as createDefaultAnalyticsConfig,
37
- we as createFloatingChatConfig,
38
- ue as createNativeWebViewBridge,
39
- Pe as createPdpQnaConfig,
40
- fe as createPdpSimRelConfig,
41
- o as defaultUnknownUISpecRenderer,
42
- oe as destroyOverlayWidgets,
43
- ae as detectFastIntent,
44
- de as detectNativeEnvironment,
45
- Ie as detectPageType,
46
- y as dismissGlobalErrorToast,
47
- M as dispatch,
48
- We as extractSkuFromUrl,
49
- D as getGlobalErrorMessage,
50
- ce as getOverlayWidgets,
51
- i as getSuggestedSearchKeywords,
27
+ fe as createAccountIdentity,
28
+ pe as createDefaultAccountRuntimeConfig,
29
+ re as createFloatingChatConfig,
30
+ ae as createNativeWebViewBridge,
31
+ me as createPdpQnaConfig,
32
+ Se as createPdpSimRelConfig,
33
+ n as defaultUnknownUISpecRenderer,
34
+ Z as destroyOverlayWidgets,
35
+ M as detectFastIntent,
36
+ $ as detectNativeEnvironment,
37
+ de as detectPageType,
38
+ R as dismissGlobalErrorToast,
39
+ E as dispatch,
40
+ ue as extractSkuFromUrl,
41
+ O as getGlobalErrorMessage,
42
+ j as getOverlayWidgets,
43
+ o as getSuggestedSearchKeywords,
52
44
  p as getSuggestedSearchKeywordsText,
53
- K as getWindowPageContext,
54
- Te as initGengageClient,
55
- ge as initNativeOverlayWidgets,
56
- ie as initOverlayWidgets,
57
- X as isVoiceInputSupported,
58
- Q as listen,
59
- O as llmUsageEvent,
60
- Y as makePillLauncher,
45
+ T as getWindowPageContext,
46
+ ce as initGengageClient,
47
+ Y as initNativeOverlayWidgets,
48
+ q as initOverlayWidgets,
49
+ x as isVoiceInputSupported,
50
+ y as listen,
51
+ B as makePillLauncher,
61
52
  l as mergeUISpecRegistry,
62
- x as meteringIncrementEvent,
63
- C as meteringSummaryEvent,
64
53
  c as normalizeMiddlewareUrl,
65
- n as normalizeProductGroupingsResponse,
54
+ i as normalizeProductGroupingsResponse,
66
55
  a as normalizeSimilarProductsResponse,
67
- _e as parseAccountRuntimeConfig,
68
- he as preflightDiagnostics,
56
+ le as parseAccountRuntimeConfig,
57
+ se as preflightDiagnostics,
69
58
  m as productToNormalized,
70
- A as registerGlobalErrorToastListener,
59
+ W as registerGlobalErrorToastListener,
71
60
  r as renderUISpecWithRegistry,
72
- q as resolveSession,
73
- $ as routeStreamAction,
74
- ke as safeParseAccountRuntimeConfig,
75
- F as sanitizeHtml,
76
- U as showGlobalErrorToast,
77
- L as streamChunkEvent,
78
- h as streamDoneEvent,
79
- E as streamErrorEvent,
61
+ A as resolveSession,
62
+ F as routeStreamAction,
63
+ ne as safeParseAccountRuntimeConfig,
64
+ f as sanitizeHtml,
65
+ P as showGlobalErrorToast,
80
66
  s as streamPost,
81
- b as streamStartEvent,
82
- v as streamUiSpecEvent,
83
- se as trackConnectionWarningRequest,
84
- H as updatePageContext,
85
- S as widgetHistorySnapshotEvent,
86
- V as wireGADataLayer,
87
- Z as wireQNAToChat,
88
- z as wireSimilarToChat,
89
- T as withBaseTheme,
90
- N as withDefaultWidgetTheme
67
+ K as trackConnectionWarningRequest,
68
+ h as updatePageContext,
69
+ C as wireGADataLayer,
70
+ G as wireQNAToChat,
71
+ S as wireSimilarToChat,
72
+ v as withBaseTheme,
73
+ D as withDefaultWidgetTheme
91
74
  };
@@ -1,4 +1,4 @@
1
- import { a as y, l as d } from "./widget-base-Cf9ofZhh.js";
1
+ import { a as y, l as d } from "./widget-base-Dliq3QAf.js";
2
2
  var h = 8e3, m = 5e3, g = "https://www.google.com/favicon.ico";
3
3
  function b(e) {
4
4
  e.probeUrl && (g = e.probeUrl);
@@ -1,5 +1,5 @@
1
- import { i as I } from "./widget-base-Cf9ofZhh.js";
2
- import { j as S } from "./context-DGz5F81j.js";
1
+ import { j as S } from "./context-BBuSsXZ9.js";
2
+ import { i as I } from "./widget-base-Dliq3QAf.js";
3
3
  function E(t, n) {
4
4
  if (typeof window > "u" || !S(t)) return !1;
5
5
  const r = new CustomEvent("gengage:navigate", {
package/dist/index.js CHANGED
@@ -1,83 +1,80 @@
1
- import { d as a, f as t, h as r, m as i, n as s, t as n } from "./api-paths-CReMDZWg.js";
2
- import { d as c, f as m, n as p, p as d, r as l, u as g } from "./widget-base-Cf9ofZhh.js";
3
- import { a as u, c as S, i as C, k as U, o as h, s as A, t as I } from "./context-DGz5F81j.js";
4
- import { c as y, n as E, o as D, s as G, t as T } from "./runtime-DBh8899B.js";
5
- import { i as w, n as N, o as v, r as O } from "./fastIntent-DMNzXOSI.js";
6
- import { t as P } from "./connection-warning-C_4e7ahZ.js";
7
- import { a as L, i as Q, n as B, r as F, t as M } from "./runtime-C51WykbJ.js";
8
- import { a as b, i as x, n as H, r as K, t as z } from "./runtime-bbMljGVG.js";
9
- import { n as j } from "./simrel-zCDlCrqG.js";
10
- import { n as J, t as X } from "./simbut-CO1rLVM9.js";
11
- import { i as $, n as ee, r as ae, t as te } from "./overlay-O4nlUrzw.js";
12
- import { a as ie, i as se, n as ne, r as oe } from "./native-webview-Bbcvvi_5.js";
13
- import { _ as me, a as pe, c as de, d as le, g as ge, h as fe, i as ue, l as Se, m as Ce, n as Ue, o as he, p as Ae, r as Ie, s as Re, t as ye, u as Ee, v as De, y as Ge } from "./common-BM2ZsSLI.js";
1
+ import { d as a, f as t, h as r, m as i, n as s, t as n } from "./api-paths-y5nkfEBG.js";
2
+ import { a as c, c as m, i as p, k as d, o as g, s as l, t as f } from "./context-BBuSsXZ9.js";
3
+ import { d as S, f as U, n as C, p as I, r as R, u as h } from "./widget-base-Dliq3QAf.js";
4
+ import { c as E, n as y, o as G, s as T, t as W } from "./runtime-DsP6go8z.js";
5
+ import { i as w, n as N, o as O, r as v } from "./fastIntent-1T2g9art.js";
6
+ import { t as P } from "./connection-warning-DJiyLM46.js";
7
+ import { a as L, i as Q, n as B, r as F, t as V } from "./runtime-BMNOS2Mq.js";
8
+ import { a as x, i as M, n as H, r as K, t as z } from "./runtime-DOS9yRRx.js";
9
+ import { n as j } from "./simrel-C07wZN8Q.js";
10
+ import { n as J, t as X } from "./simbut-BwxzoBcY.js";
11
+ import { i as $, n as ee, r as ae, t as te } from "./overlay-v3nvcGlE.js";
12
+ import { a as ie, i as se, n as ne, r as oe } from "./native-webview-y3a9R9hH.js";
13
+ import { a as me, c as pe, d as de, f as ge, h as le, i as fe, l as ue, m as Se, n as Ue, o as Ce, p as Ie, r as Re, s as he, t as Ae, u as Ee } from "./common-BKPSOoIP.js";
14
14
  export {
15
- Ce as AccountRuntimeConfigSchema,
16
- fe as AnalyticsAuthModeSchema,
17
- g as BASE_WIDGET_THEME,
18
- he as DEFAULT_CUSTOMIZATION_LOCALE,
19
- m as DEFAULT_WIDGET_THEME_TOKENS,
20
- p as GENGAGE_BUILD_FLAVOR,
21
- l as GENGAGE_VERSION,
22
- T as GengageChat,
23
- M as GengageQNA,
15
+ de as AccountRuntimeConfigSchema,
16
+ h as BASE_WIDGET_THEME,
17
+ Ce as DEFAULT_CUSTOMIZATION_LOCALE,
18
+ U as DEFAULT_WIDGET_THEME_TOKENS,
19
+ C as GENGAGE_BUILD_FLAVOR,
20
+ R as GENGAGE_VERSION,
21
+ W as GengageChat,
22
+ V as GengageQNA,
24
23
  X as GengageSimBut,
25
24
  z as GengageSimRel,
26
25
  ge as UnknownActionPolicySchema,
27
- O as VoiceInput,
26
+ v as VoiceInput,
28
27
  ne as applyNativeSession,
29
- ye as autoDetectPageContext,
30
- I as bootstrapSession,
28
+ Ae as autoDetectPageContext,
29
+ f as bootstrapSession,
31
30
  n as buildChatEndpointUrl,
32
31
  te as buildOverlayIdempotencyKey,
33
32
  P as configureConnectionWarning,
34
33
  a as consumeStream,
35
- Re as createAccountIdentity,
36
- Ae as createAnalyticsClient,
37
- E as createChatWidget,
38
- me as createDefaultAccountRuntimeConfig,
39
- de as createDefaultAnalyticsConfig,
40
- D as createDefaultChatUISpecRegistry,
34
+ he as createAccountIdentity,
35
+ y as createChatWidget,
36
+ Ie as createDefaultAccountRuntimeConfig,
37
+ G as createDefaultChatUISpecRegistry,
41
38
  F as createDefaultQnaUISpecRegistry,
42
39
  K as createDefaultSimRelUISpecRegistry,
43
- Se as createFloatingChatConfig,
40
+ pe as createFloatingChatConfig,
44
41
  oe as createNativeWebViewBridge,
45
- Ee as createPdpQnaConfig,
46
- le as createPdpSimRelConfig,
42
+ ue as createPdpQnaConfig,
43
+ Ee as createPdpSimRelConfig,
47
44
  B as createQNAWidget,
48
45
  J as createSimButWidget,
49
46
  j as createSimRelRenderer,
50
47
  H as createSimRelWidget,
51
- G as defaultChatUnknownUISpecRenderer,
48
+ T as defaultChatUnknownUISpecRenderer,
52
49
  Q as defaultQnaUnknownUISpecRenderer,
53
- x as defaultSimRelUnknownUISpecRenderer,
50
+ M as defaultSimRelUnknownUISpecRenderer,
54
51
  i as defaultUnknownUISpecRenderer,
55
52
  ee as destroyOverlayWidgets,
56
53
  se as detectNativeEnvironment,
57
54
  Ue as detectPageType,
58
- u as dispatch,
59
- Ie as extractSkuFromUrl,
55
+ c as dispatch,
56
+ Re as extractSkuFromUrl,
60
57
  ae as getOverlayWidgets,
61
- ue as initGengageClient,
58
+ fe as initGengageClient,
62
59
  ie as initNativeOverlayWidgets,
63
60
  $ as initOverlayWidgets,
64
61
  w as isVoiceInputSupported,
65
- h as listen,
62
+ g as listen,
66
63
  N as makePillLauncher,
67
64
  s as normalizeMiddlewareUrl,
68
- De as parseAccountRuntimeConfig,
69
- pe as preflightDiagnostics,
70
- y as renderChatUISpec,
65
+ Se as parseAccountRuntimeConfig,
66
+ me as preflightDiagnostics,
67
+ E as renderChatUISpec,
71
68
  L as renderQnaUISpec,
72
- b as renderSimRelUISpec,
69
+ x as renderSimRelUISpec,
73
70
  r as renderUISpecWithRegistry,
74
- v as routeStreamAction,
75
- Ge as safeParseAccountRuntimeConfig,
71
+ O as routeStreamAction,
72
+ le as safeParseAccountRuntimeConfig,
76
73
  t as streamPost,
77
- C as updatePageContext,
78
- U as wireGADataLayer,
79
- A as wireQNAToChat,
80
- S as wireSimilarToChat,
81
- c as withBaseTheme,
82
- d as withDefaultWidgetTheme
74
+ p as updatePageContext,
75
+ d as wireGADataLayer,
76
+ l as wireQNAToChat,
77
+ m as wireSimilarToChat,
78
+ S as withBaseTheme,
79
+ I as withDefaultWidgetTheme
83
80
  };
@@ -1,4 +1,4 @@
1
- import { i as k } from "./overlay-O4nlUrzw.js";
1
+ import { i as k } from "./overlay-v3nvcGlE.js";
2
2
  var _ = [
3
3
  "gengage:chat:open",
4
4
  "gengage:chat:close",