@gengage/assistant-fe 0.3.19 → 0.3.20
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/chat/api.d.ts +0 -1
- package/dist/chat/assistant-mode.d.ts +0 -1
- package/dist/chat/attachment-utils.d.ts +0 -1
- package/dist/chat/catalog.d.ts +0 -1
- package/dist/chat/chat-presentation-state.d.ts +0 -1
- package/dist/chat/components/AIGroupingCards.d.ts +0 -1
- package/dist/chat/components/AISuggestedSearchCards.d.ts +0 -1
- package/dist/chat/components/AITopPicks.d.ts +0 -1
- package/dist/chat/components/BeautyPhotoStep.d.ts +0 -1
- package/dist/chat/components/CategoriesContainer.d.ts +0 -1
- package/dist/chat/components/ChatDrawer.d.ts +0 -1
- package/dist/chat/components/ChoicePrompter.d.ts +0 -1
- package/dist/chat/components/ComparisonTable.d.ts +0 -1
- package/dist/chat/components/ConsultingStylePicker.d.ts +0 -1
- package/dist/chat/components/FloatingComparisonButton.d.ts +0 -1
- package/dist/chat/components/GroundingReviewCard.d.ts +0 -1
- package/dist/chat/components/HandoffNotice.d.ts +0 -1
- package/dist/chat/components/KvkkBanner.d.ts +0 -1
- package/dist/chat/components/Launcher.d.ts +0 -1
- package/dist/chat/components/PanelTopBar.d.ts +0 -1
- package/dist/chat/components/PhotoAnalysisCard.d.ts +0 -1
- package/dist/chat/components/ProductSummaryCard.d.ts +0 -1
- package/dist/chat/components/ProsAndCons.d.ts +0 -1
- package/dist/chat/components/ReviewHighlights.d.ts +0 -1
- package/dist/chat/components/ThumbnailsColumn.d.ts +0 -1
- package/dist/chat/components/actionClassifier.d.ts +0 -1
- package/dist/chat/components/product-price-layout.d.ts +0 -1
- package/dist/chat/components/productMentionLinker.d.ts +0 -1
- package/dist/chat/components/renderUISpec.d.ts +0 -1
- package/dist/chat/components/typewriter.d.ts +0 -1
- package/dist/chat/extendedModeManager.d.ts +0 -1
- package/dist/chat/features/beauty-consulting/consulting-grid.d.ts +0 -1
- package/dist/chat/features/beauty-consulting/drawer-extensions.d.ts +0 -1
- package/dist/chat/features/beauty-consulting/mode-controller.d.ts +0 -1
- package/dist/chat/features/beauty-consulting/registry.d.ts +0 -1
- package/dist/chat/features/beauty-consulting/stream-handler.d.ts +0 -1
- package/dist/chat/index.d.ts +0 -1
- package/dist/chat/kvkk.d.ts +0 -1
- package/dist/chat/locales/en.d.ts +0 -1
- package/dist/chat/locales/index.d.ts +0 -1
- package/dist/chat/locales/tr.d.ts +0 -1
- package/dist/chat/panel-manager.d.ts +0 -1
- package/dist/chat/session-persistence.d.ts +0 -1
- package/dist/chat/stream-error-display.d.ts +0 -1
- package/dist/chat/types.d.ts +0 -1
- package/dist/chat/utils/chat-presentation-debug.d.ts +0 -1
- package/dist/chat/utils/get-chat-scroll-element.d.ts +0 -1
- package/dist/chat/utils/ui.d.ts +0 -1
- package/dist/chat-CuPO9t-Z.cjs +93 -0
- package/dist/chat-yAf9OADM.js +7111 -0
- package/dist/chat.cjs +1 -1
- package/dist/chat.iife.js +48 -49
- package/dist/chat.js +13 -2
- package/dist/common/action-router.d.ts +0 -1
- package/dist/common/activity-tracker.d.ts +0 -1
- package/dist/common/analytics-events.d.ts +0 -1
- package/dist/common/analytics.d.ts +0 -1
- package/dist/common/api-paths.d.ts +0 -1
- package/dist/common/client.d.ts +0 -1
- package/dist/common/communication-bridge.d.ts +0 -1
- package/dist/common/config-schema.d.ts +0 -1
- package/dist/common/connection-warning.d.ts +0 -1
- package/dist/common/consulting-sources.d.ts +0 -1
- package/dist/common/context.d.ts +0 -1
- package/dist/common/customization-factories.d.ts +0 -1
- package/dist/common/debug.d.ts +0 -1
- package/dist/common/events.d.ts +0 -1
- package/dist/common/ga-datalayer.d.ts +0 -1
- package/dist/common/global-error-toast.d.ts +0 -1
- package/dist/common/index.d.ts +0 -1
- package/dist/common/indexed-db.d.ts +0 -1
- package/dist/common/native-webview.d.ts +0 -1
- package/dist/common/overlay.d.ts +0 -1
- package/dist/common/page-detect.d.ts +0 -1
- package/dist/common/pill-launcher.d.ts +0 -1
- package/dist/common/preflight.d.ts +0 -1
- package/dist/common/price-formatter.d.ts +0 -1
- package/dist/common/product-utils.d.ts +0 -1
- package/dist/common/protocol-adapter.d.ts +0 -1
- package/dist/common/renderer/dom.d.ts +0 -1
- package/dist/common/renderer/index.d.ts +0 -1
- package/dist/common/renderer/overrides.d.ts +0 -1
- package/dist/common/renderer/registry.d.ts +0 -1
- package/dist/common/renderer/types.d.ts +0 -1
- package/dist/common/safe-html.d.ts +0 -1
- package/dist/common/skeleton.d.ts +0 -1
- package/dist/common/streaming.d.ts +0 -1
- package/dist/common/suggested-search-keywords.d.ts +0 -1
- package/dist/common/theme-utils.d.ts +0 -1
- package/dist/common/tts-player.d.ts +0 -1
- package/dist/common/types.d.ts +0 -1
- package/dist/common/ui-theme.d.ts +0 -1
- package/dist/common/uuidv7.d.ts +0 -1
- package/dist/common/voice-input.d.ts +0 -1
- package/dist/common/widget-base.d.ts +0 -1
- package/dist/common-BzegEdJs.cjs +1 -0
- package/dist/common-C8NRcP7O.js +367 -0
- package/dist/common.cjs +1 -1
- package/dist/common.js +86 -7
- package/dist/connection-warning-CL1CReZo.cjs +1 -0
- package/dist/connection-warning-CVZzlGJt.js +95 -0
- package/dist/ga-datalayer-CgI6Kb_i.js +1044 -0
- package/dist/ga-datalayer-DkfsAHf9.cjs +47 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +76 -10
- package/dist/native/index.d.ts +0 -1
- package/dist/native-webview-B8vOoxns.js +571 -0
- package/dist/native-webview-D2lDXTh3.cjs +1 -0
- package/dist/native.cjs +1 -1
- package/dist/native.iife.js +51 -52
- package/dist/native.js +8 -2
- package/dist/product-utils-Bm3aiAlJ.js +46 -0
- package/dist/product-utils-DLXQQJbh.cjs +1 -0
- package/dist/qna/api.d.ts +0 -1
- package/dist/qna/catalog.d.ts +0 -1
- package/dist/qna/components/ButtonRow.d.ts +0 -1
- package/dist/qna/components/TextInput.d.ts +0 -1
- package/dist/qna/components/renderUISpec.d.ts +0 -1
- package/dist/qna/index.d.ts +0 -1
- package/dist/qna/locales/en.d.ts +0 -1
- package/dist/qna/locales/index.d.ts +0 -1
- package/dist/qna/locales/tr.d.ts +0 -1
- package/dist/qna/normalize-ui-specs.d.ts +0 -1
- package/dist/qna/types.d.ts +0 -1
- package/dist/qna-KizG_W1J.cjs +1 -0
- package/dist/qna-YSaIDxjs.js +663 -0
- package/dist/qna.cjs +1 -1
- package/dist/qna.iife.js +35 -36
- package/dist/qna.js +9 -2
- package/dist/schemas-B6RjqKrg.cjs +40 -0
- package/dist/schemas-PkedCk_-.js +4047 -0
- package/dist/simbut/index.d.ts +0 -1
- package/dist/simbut/locales.d.ts +0 -1
- package/dist/simbut/types.d.ts +0 -1
- package/dist/simbut-B2jXtckF.cjs +1 -0
- package/dist/simbut-BI054QK0.js +71 -0
- package/dist/simbut.cjs +1 -1
- package/dist/simbut.iife.js +15 -16
- package/dist/simbut.js +5 -2
- package/dist/simrel/api.d.ts +0 -1
- package/dist/simrel/catalog.d.ts +0 -1
- package/dist/simrel/components/GroupTabs.d.ts +0 -1
- package/dist/simrel/components/ProductCard.d.ts +0 -1
- package/dist/simrel/components/ProductGrid.d.ts +0 -1
- package/dist/simrel/components/renderUISpec.d.ts +0 -1
- package/dist/simrel/index.d.ts +0 -1
- package/dist/simrel/locales/en.d.ts +0 -1
- package/dist/simrel/locales/index.d.ts +0 -1
- package/dist/simrel/locales/tr.d.ts +0 -1
- package/dist/simrel/types.d.ts +0 -1
- package/dist/simrel-C-DKpfVB.js +694 -0
- package/dist/simrel-vL0woDkE.cjs +1 -0
- package/dist/simrel.cjs +1 -1
- package/dist/simrel.iife.js +35 -36
- package/dist/simrel.js +9 -2
- package/package.json +1 -1
- package/dist/chat/api.d.ts.map +0 -1
- package/dist/chat/assistant-mode.d.ts.map +0 -1
- package/dist/chat/attachment-utils.d.ts.map +0 -1
- package/dist/chat/catalog.d.ts.map +0 -1
- package/dist/chat/chat-presentation-state.d.ts.map +0 -1
- package/dist/chat/components/AIGroupingCards.d.ts.map +0 -1
- package/dist/chat/components/AISuggestedSearchCards.d.ts.map +0 -1
- package/dist/chat/components/AITopPicks.d.ts.map +0 -1
- package/dist/chat/components/BeautyPhotoStep.d.ts.map +0 -1
- package/dist/chat/components/CategoriesContainer.d.ts.map +0 -1
- package/dist/chat/components/ChatDrawer.d.ts.map +0 -1
- package/dist/chat/components/ChoicePrompter.d.ts.map +0 -1
- package/dist/chat/components/ComparisonTable.d.ts.map +0 -1
- package/dist/chat/components/ConsultingStylePicker.d.ts.map +0 -1
- package/dist/chat/components/FloatingComparisonButton.d.ts.map +0 -1
- package/dist/chat/components/GroundingReviewCard.d.ts.map +0 -1
- package/dist/chat/components/HandoffNotice.d.ts.map +0 -1
- package/dist/chat/components/KvkkBanner.d.ts.map +0 -1
- package/dist/chat/components/Launcher.d.ts.map +0 -1
- package/dist/chat/components/PanelTopBar.d.ts.map +0 -1
- package/dist/chat/components/PhotoAnalysisCard.d.ts.map +0 -1
- package/dist/chat/components/ProductSummaryCard.d.ts.map +0 -1
- package/dist/chat/components/ProsAndCons.d.ts.map +0 -1
- package/dist/chat/components/ReviewHighlights.d.ts.map +0 -1
- package/dist/chat/components/ThumbnailsColumn.d.ts.map +0 -1
- package/dist/chat/components/actionClassifier.d.ts.map +0 -1
- package/dist/chat/components/product-price-layout.d.ts.map +0 -1
- package/dist/chat/components/productMentionLinker.d.ts.map +0 -1
- package/dist/chat/components/renderUISpec.d.ts.map +0 -1
- package/dist/chat/components/typewriter.d.ts.map +0 -1
- package/dist/chat/extendedModeManager.d.ts.map +0 -1
- package/dist/chat/features/beauty-consulting/consulting-grid.d.ts.map +0 -1
- package/dist/chat/features/beauty-consulting/drawer-extensions.d.ts.map +0 -1
- package/dist/chat/features/beauty-consulting/mode-controller.d.ts.map +0 -1
- package/dist/chat/features/beauty-consulting/registry.d.ts.map +0 -1
- package/dist/chat/features/beauty-consulting/stream-handler.d.ts.map +0 -1
- package/dist/chat/index.d.ts.map +0 -1
- package/dist/chat/kvkk.d.ts.map +0 -1
- package/dist/chat/locales/en.d.ts.map +0 -1
- package/dist/chat/locales/index.d.ts.map +0 -1
- package/dist/chat/locales/tr.d.ts.map +0 -1
- package/dist/chat/panel-manager.d.ts.map +0 -1
- package/dist/chat/session-persistence.d.ts.map +0 -1
- package/dist/chat/stream-error-display.d.ts.map +0 -1
- package/dist/chat/types.d.ts.map +0 -1
- package/dist/chat/utils/chat-presentation-debug.d.ts.map +0 -1
- package/dist/chat/utils/get-chat-scroll-element.d.ts.map +0 -1
- package/dist/chat/utils/ui.d.ts.map +0 -1
- package/dist/chat-CtfmY7kp.js +0 -7047
- package/dist/chat-CtfmY7kp.js.map +0 -1
- package/dist/chat-sSkxxKuL.cjs +0 -94
- package/dist/chat-sSkxxKuL.cjs.map +0 -1
- package/dist/chat.iife.js.map +0 -1
- package/dist/common/action-router.d.ts.map +0 -1
- package/dist/common/activity-tracker.d.ts.map +0 -1
- package/dist/common/analytics-events.d.ts.map +0 -1
- package/dist/common/analytics.d.ts.map +0 -1
- package/dist/common/api-paths.d.ts.map +0 -1
- package/dist/common/client.d.ts.map +0 -1
- package/dist/common/communication-bridge.d.ts.map +0 -1
- package/dist/common/config-schema.d.ts.map +0 -1
- package/dist/common/connection-warning.d.ts.map +0 -1
- package/dist/common/consulting-sources.d.ts.map +0 -1
- package/dist/common/context.d.ts.map +0 -1
- package/dist/common/customization-factories.d.ts.map +0 -1
- package/dist/common/debug.d.ts.map +0 -1
- package/dist/common/events.d.ts.map +0 -1
- package/dist/common/ga-datalayer.d.ts.map +0 -1
- package/dist/common/global-error-toast.d.ts.map +0 -1
- package/dist/common/index.d.ts.map +0 -1
- package/dist/common/indexed-db.d.ts.map +0 -1
- package/dist/common/native-webview.d.ts.map +0 -1
- package/dist/common/overlay.d.ts.map +0 -1
- package/dist/common/page-detect.d.ts.map +0 -1
- package/dist/common/pill-launcher.d.ts.map +0 -1
- package/dist/common/preflight.d.ts.map +0 -1
- package/dist/common/price-formatter.d.ts.map +0 -1
- package/dist/common/product-utils.d.ts.map +0 -1
- package/dist/common/protocol-adapter.d.ts.map +0 -1
- package/dist/common/renderer/dom.d.ts.map +0 -1
- package/dist/common/renderer/index.d.ts.map +0 -1
- package/dist/common/renderer/overrides.d.ts.map +0 -1
- package/dist/common/renderer/registry.d.ts.map +0 -1
- package/dist/common/renderer/types.d.ts.map +0 -1
- package/dist/common/safe-html.d.ts.map +0 -1
- package/dist/common/skeleton.d.ts.map +0 -1
- package/dist/common/streaming.d.ts.map +0 -1
- package/dist/common/suggested-search-keywords.d.ts.map +0 -1
- package/dist/common/theme-utils.d.ts.map +0 -1
- package/dist/common/tts-player.d.ts.map +0 -1
- package/dist/common/types.d.ts.map +0 -1
- package/dist/common/ui-theme.d.ts.map +0 -1
- package/dist/common/uuidv7.d.ts.map +0 -1
- package/dist/common/voice-input.d.ts.map +0 -1
- package/dist/common/widget-base.d.ts.map +0 -1
- package/dist/common-C9GYMjJY.js +0 -357
- package/dist/common-C9GYMjJY.js.map +0 -1
- package/dist/common-CSWRku57.cjs +0 -2
- package/dist/common-CSWRku57.cjs.map +0 -1
- package/dist/connection-warning-BF8r3_5W.js +0 -96
- package/dist/connection-warning-BF8r3_5W.js.map +0 -1
- package/dist/connection-warning-Dlirb_Pi.cjs +0 -2
- package/dist/connection-warning-Dlirb_Pi.cjs.map +0 -1
- package/dist/ga-datalayer-DSVuycfp.cjs +0 -48
- package/dist/ga-datalayer-DSVuycfp.cjs.map +0 -1
- package/dist/ga-datalayer-DygUbUWr.js +0 -915
- package/dist/ga-datalayer-DygUbUWr.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/native/index.d.ts.map +0 -1
- package/dist/native-webview-BHewgko1.js +0 -547
- package/dist/native-webview-BHewgko1.js.map +0 -1
- package/dist/native-webview-C_gxZA79.cjs +0 -2
- package/dist/native-webview-C_gxZA79.cjs.map +0 -1
- package/dist/native.iife.js.map +0 -1
- package/dist/product-utils-BEnINMdx.cjs +0 -2
- package/dist/product-utils-BEnINMdx.cjs.map +0 -1
- package/dist/product-utils-BUalkWz3.js +0 -45
- package/dist/product-utils-BUalkWz3.js.map +0 -1
- package/dist/qna/api.d.ts.map +0 -1
- package/dist/qna/catalog.d.ts.map +0 -1
- package/dist/qna/components/ButtonRow.d.ts.map +0 -1
- package/dist/qna/components/TextInput.d.ts.map +0 -1
- package/dist/qna/components/renderUISpec.d.ts.map +0 -1
- package/dist/qna/index.d.ts.map +0 -1
- package/dist/qna/locales/en.d.ts.map +0 -1
- package/dist/qna/locales/index.d.ts.map +0 -1
- package/dist/qna/locales/tr.d.ts.map +0 -1
- package/dist/qna/normalize-ui-specs.d.ts.map +0 -1
- package/dist/qna/types.d.ts.map +0 -1
- package/dist/qna-BBZogvdp.js +0 -672
- package/dist/qna-BBZogvdp.js.map +0 -1
- package/dist/qna-d7DnJ0pP.cjs +0 -2
- package/dist/qna-d7DnJ0pP.cjs.map +0 -1
- package/dist/qna.iife.js.map +0 -1
- package/dist/schemas-C-flaqAd.cjs +0 -41
- package/dist/schemas-C-flaqAd.cjs.map +0 -1
- package/dist/schemas-CKfd_Bqh.js +0 -3941
- package/dist/schemas-CKfd_Bqh.js.map +0 -1
- package/dist/simbut/index.d.ts.map +0 -1
- package/dist/simbut/locales.d.ts.map +0 -1
- package/dist/simbut/types.d.ts.map +0 -1
- package/dist/simbut-DG48EcoU.js +0 -68
- package/dist/simbut-DG48EcoU.js.map +0 -1
- package/dist/simbut-DHZFpGIA.cjs +0 -2
- package/dist/simbut-DHZFpGIA.cjs.map +0 -1
- package/dist/simbut.iife.js.map +0 -1
- package/dist/simrel/api.d.ts.map +0 -1
- package/dist/simrel/catalog.d.ts.map +0 -1
- package/dist/simrel/components/GroupTabs.d.ts.map +0 -1
- package/dist/simrel/components/ProductCard.d.ts.map +0 -1
- package/dist/simrel/components/ProductGrid.d.ts.map +0 -1
- package/dist/simrel/components/renderUISpec.d.ts.map +0 -1
- package/dist/simrel/index.d.ts.map +0 -1
- package/dist/simrel/locales/en.d.ts.map +0 -1
- package/dist/simrel/locales/index.d.ts.map +0 -1
- package/dist/simrel/locales/tr.d.ts.map +0 -1
- package/dist/simrel/types.d.ts.map +0 -1
- package/dist/simrel-BwZFl03Z.cjs +0 -2
- package/dist/simrel-BwZFl03Z.cjs.map +0 -1
- package/dist/simrel-D74BsZbA.js +0 -699
- package/dist/simrel-D74BsZbA.js.map +0 -1
- package/dist/simrel.iife.js.map +0 -1
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
import { f as u } from "./schemas-PkedCk_-.js";
|
|
2
|
+
import { h, l as f } from "./native-webview-B8vOoxns.js";
|
|
3
|
+
var m = {
|
|
4
|
+
enabled: !0,
|
|
5
|
+
endpoint: "/analytics",
|
|
6
|
+
fireAndForget: !0,
|
|
7
|
+
useBeacon: !0,
|
|
8
|
+
keepaliveFetch: !0,
|
|
9
|
+
timeoutMs: 4e3,
|
|
10
|
+
maxRetries: 0,
|
|
11
|
+
batchSize: 10,
|
|
12
|
+
flushIntervalMs: 250
|
|
13
|
+
}, g = {
|
|
14
|
+
mode: "none",
|
|
15
|
+
key: "",
|
|
16
|
+
headerName: "X-API-Key",
|
|
17
|
+
bodyField: "api_key"
|
|
18
|
+
}, y = class {
|
|
19
|
+
constructor(e) {
|
|
20
|
+
this.queue = [], this.flushTimer = null, this.config = {
|
|
21
|
+
...m,
|
|
22
|
+
...e,
|
|
23
|
+
auth: {
|
|
24
|
+
...g,
|
|
25
|
+
...e.auth ?? {}
|
|
26
|
+
}
|
|
27
|
+
}, this.onPageHideBound = () => {
|
|
28
|
+
this.queue.length !== 0 && this.flushAllSync();
|
|
29
|
+
}, typeof window < "u" && window.addEventListener("pagehide", this.onPageHideBound);
|
|
30
|
+
}
|
|
31
|
+
track(e) {
|
|
32
|
+
if (!this.config.enabled) return;
|
|
33
|
+
const t = p(e);
|
|
34
|
+
if (this.queue.push(t), this.queue.length >= this.config.batchSize) {
|
|
35
|
+
this.scheduleImmediateFlush();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.scheduleFlush();
|
|
39
|
+
}
|
|
40
|
+
flush() {
|
|
41
|
+
if (!this.config.enabled || this.queue.length === 0) return;
|
|
42
|
+
const e = this.queue.splice(0, this.config.batchSize), t = this.buildTransportBody(e), n = d(this.config.endpoint, this.config.middlewareUrl);
|
|
43
|
+
this.send(n, t);
|
|
44
|
+
}
|
|
45
|
+
flushAll() {
|
|
46
|
+
for (; this.queue.length > 0; ) this.flush();
|
|
47
|
+
}
|
|
48
|
+
destroy() {
|
|
49
|
+
this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.queue.length > 0 && this.flushAllSync(), typeof window < "u" && window.removeEventListener("pagehide", this.onPageHideBound);
|
|
50
|
+
}
|
|
51
|
+
scheduleFlush() {
|
|
52
|
+
this.flushTimer || (this.flushTimer = setTimeout(() => {
|
|
53
|
+
this.flushTimer = null, this.flush();
|
|
54
|
+
}, this.config.flushIntervalMs));
|
|
55
|
+
}
|
|
56
|
+
scheduleImmediateFlush() {
|
|
57
|
+
this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.flush();
|
|
58
|
+
}
|
|
59
|
+
buildTransportBody(e) {
|
|
60
|
+
const t = { events: e };
|
|
61
|
+
return this.config.auth.mode === "body-api-key" && this.config.auth.key && (t[this.config.auth.bodyField] = this.config.auth.key), t;
|
|
62
|
+
}
|
|
63
|
+
send(e, t) {
|
|
64
|
+
try {
|
|
65
|
+
const n = JSON.stringify(t);
|
|
66
|
+
if (this.config.useBeacon && this.config.auth.mode !== "x-api-key-header" && this.config.auth.mode !== "bearer-header" && l()) {
|
|
67
|
+
const r = new Blob([n], { type: "application/json" });
|
|
68
|
+
navigator.sendBeacon(e, r);
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (typeof fetch > "u") return;
|
|
72
|
+
const i = { "Content-Type": "application/json" };
|
|
73
|
+
this.config.auth.mode === "x-api-key-header" && this.config.auth.key && (i[this.config.auth.headerName] = this.config.auth.key), this.config.auth.mode === "bearer-header" && this.config.auth.key && (i.Authorization = `Bearer ${this.config.auth.key}`), fetch(e, {
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: i,
|
|
76
|
+
body: n,
|
|
77
|
+
keepalive: !0
|
|
78
|
+
}).catch(() => {
|
|
79
|
+
});
|
|
80
|
+
} catch {
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
flushAllSync() {
|
|
84
|
+
if (!this.config.enabled) return;
|
|
85
|
+
const e = d(this.config.endpoint, this.config.middlewareUrl);
|
|
86
|
+
for (; this.queue.length > 0; ) {
|
|
87
|
+
const t = this.queue.splice(0, this.config.batchSize), n = this.buildTransportBody(t);
|
|
88
|
+
try {
|
|
89
|
+
const i = JSON.stringify(n);
|
|
90
|
+
if (l()) {
|
|
91
|
+
const r = new Blob([i], { type: "application/json" });
|
|
92
|
+
navigator.sendBeacon(e, r);
|
|
93
|
+
}
|
|
94
|
+
} catch {
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
function A(e) {
|
|
100
|
+
return new y(e);
|
|
101
|
+
}
|
|
102
|
+
function p(e) {
|
|
103
|
+
const t = {
|
|
104
|
+
event_name: e.event_name,
|
|
105
|
+
event_version: e.event_version ?? "1",
|
|
106
|
+
timestamp_ms: e.timestamp_ms ?? Date.now(),
|
|
107
|
+
account_id: e.account_id,
|
|
108
|
+
session_id: e.session_id,
|
|
109
|
+
correlation_id: e.correlation_id,
|
|
110
|
+
payload: e.payload
|
|
111
|
+
};
|
|
112
|
+
return e.view_id !== void 0 && (t.view_id = e.view_id), e.user_id !== void 0 && (t.user_id = e.user_id), e.widget !== void 0 && (t.widget = e.widget), e.page_type !== void 0 && (t.page_type = e.page_type), e.sku !== void 0 && (t.sku = e.sku), t;
|
|
113
|
+
}
|
|
114
|
+
function d(e, t) {
|
|
115
|
+
return /^https?:\/\//i.test(e) ? e : `${u(t)}${e.startsWith("/") ? e : `/${e}`}`;
|
|
116
|
+
}
|
|
117
|
+
function l() {
|
|
118
|
+
return typeof navigator < "u" && typeof navigator.sendBeacon == "function";
|
|
119
|
+
}
|
|
120
|
+
var P = "tr";
|
|
121
|
+
function S(e) {
|
|
122
|
+
return {
|
|
123
|
+
ACCOUNT_ID: e.accountId,
|
|
124
|
+
MIDDLEWARE_URL: e.middlewareUrl,
|
|
125
|
+
LOCALE: e.locale ?? "tr"
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function E(e, t = {}) {
|
|
129
|
+
const n = {
|
|
130
|
+
accountId: e.accountId,
|
|
131
|
+
middlewareUrl: e.middlewareUrl,
|
|
132
|
+
session: { sessionId: e.sessionId },
|
|
133
|
+
variant: "floating",
|
|
134
|
+
locale: e.locale ?? "tr",
|
|
135
|
+
...t
|
|
136
|
+
};
|
|
137
|
+
return e.theme !== void 0 && (n.theme = e.theme), n;
|
|
138
|
+
}
|
|
139
|
+
function L(e, t = {}) {
|
|
140
|
+
const n = {
|
|
141
|
+
accountId: e.accountId,
|
|
142
|
+
middlewareUrl: e.middlewareUrl,
|
|
143
|
+
session: { sessionId: e.sessionId },
|
|
144
|
+
pageContext: {
|
|
145
|
+
pageType: "pdp",
|
|
146
|
+
sku: e.sku
|
|
147
|
+
},
|
|
148
|
+
mountTarget: e.mountTarget,
|
|
149
|
+
...t
|
|
150
|
+
};
|
|
151
|
+
return e.theme !== void 0 && (n.theme = e.theme), n;
|
|
152
|
+
}
|
|
153
|
+
function q(e, t = {}) {
|
|
154
|
+
const n = {
|
|
155
|
+
accountId: e.accountId,
|
|
156
|
+
middlewareUrl: e.middlewareUrl,
|
|
157
|
+
session: { sessionId: e.sessionId },
|
|
158
|
+
sku: e.sku,
|
|
159
|
+
mountTarget: e.mountTarget,
|
|
160
|
+
...t
|
|
161
|
+
};
|
|
162
|
+
return e.theme !== void 0 && (n.theme = e.theme), n;
|
|
163
|
+
}
|
|
164
|
+
function D(e, t = {}) {
|
|
165
|
+
return {
|
|
166
|
+
enabled: !0,
|
|
167
|
+
middlewareUrl: e,
|
|
168
|
+
endpoint: "/analytics",
|
|
169
|
+
fireAndForget: !0,
|
|
170
|
+
useBeacon: !0,
|
|
171
|
+
...t
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function v(e) {
|
|
175
|
+
try {
|
|
176
|
+
return document.querySelector(e), !0;
|
|
177
|
+
} catch {
|
|
178
|
+
return !1;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
function w(e, t) {
|
|
182
|
+
const n = [], i = e.mounts, r = [
|
|
183
|
+
["qna", i.qna],
|
|
184
|
+
["simrel", i.simrel],
|
|
185
|
+
["chat", i.chat]
|
|
186
|
+
];
|
|
187
|
+
for (const [o, a] of r)
|
|
188
|
+
if (a !== void 0) {
|
|
189
|
+
if (!v(a)) {
|
|
190
|
+
n.push({
|
|
191
|
+
code: "INVALID_SELECTOR",
|
|
192
|
+
message: `[gengage preflight] ${o} mount selector is invalid CSS: "${a}"`,
|
|
193
|
+
severity: "error"
|
|
194
|
+
});
|
|
195
|
+
continue;
|
|
196
|
+
}
|
|
197
|
+
document.querySelector(a) || n.push({
|
|
198
|
+
code: "MOUNT_NOT_FOUND",
|
|
199
|
+
message: `[gengage preflight] ${o} mount target not found: "${a}" — widget will skip or wait for DOM`,
|
|
200
|
+
severity: "warn"
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
const s = e.gtm.idempotencyKey;
|
|
204
|
+
if (window[s] !== void 0 && n.push({
|
|
205
|
+
code: "DUPLICATE_IDEMPOTENCY",
|
|
206
|
+
message: `[gengage preflight] window["${s}"] already exists — widgets may have already initialized`,
|
|
207
|
+
severity: "warn"
|
|
208
|
+
}), !t?.skipCspCheck) {
|
|
209
|
+
let o = !1;
|
|
210
|
+
const a = (c) => {
|
|
211
|
+
c.blockedURI && e.middlewareUrl.startsWith(c.blockedURI) && (o = !0);
|
|
212
|
+
};
|
|
213
|
+
document.addEventListener("securitypolicyviolation", a);
|
|
214
|
+
try {
|
|
215
|
+
fetch(e.middlewareUrl, {
|
|
216
|
+
method: "HEAD",
|
|
217
|
+
mode: "no-cors"
|
|
218
|
+
}).catch(() => {
|
|
219
|
+
});
|
|
220
|
+
} catch {
|
|
221
|
+
o = !0;
|
|
222
|
+
}
|
|
223
|
+
document.removeEventListener("securitypolicyviolation", a), o && n.push({
|
|
224
|
+
code: "CSP_BLOCKED",
|
|
225
|
+
message: `[gengage preflight] middleware URL may be blocked by Content-Security-Policy: "${e.middlewareUrl}". Add it to connect-src.`,
|
|
226
|
+
severity: "warn"
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
for (const o of n) o.severity === "error" ? console.error(o.message) : console.warn(o.message);
|
|
230
|
+
return {
|
|
231
|
+
ok: n.every((o) => o.severity !== "error"),
|
|
232
|
+
warnings: n
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function T(e) {
|
|
236
|
+
const t = h(e);
|
|
237
|
+
if (!t.success) {
|
|
238
|
+
const n = t.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ");
|
|
239
|
+
throw new Error(`[gengage] Invalid runtime config: ${n}`);
|
|
240
|
+
}
|
|
241
|
+
return t.data;
|
|
242
|
+
}
|
|
243
|
+
function b(e, t, n) {
|
|
244
|
+
const i = {
|
|
245
|
+
accountId: e.accountId,
|
|
246
|
+
middlewareUrl: e.middlewareUrl,
|
|
247
|
+
idempotencyKey: e.gtm.idempotencyKey
|
|
248
|
+
};
|
|
249
|
+
return e.locale !== void 0 && (i.locale = e.locale), n !== void 0 && (i.pageContext = n, n.sku !== void 0 && (i.sku = n.sku)), i.chat = { enabled: e.widgets.chat.enabled }, e.mounts.chat !== void 0 && (i.chat.mountTarget = e.mounts.chat), i.qna = { enabled: e.widgets.qna.enabled }, e.mounts.qna !== void 0 && (i.qna.mountTarget = e.mounts.qna), i.simrel = { enabled: e.widgets.simrel.enabled }, e.mounts.simrel !== void 0 && (i.simrel.mountTarget = e.mounts.simrel), t?.onAddToCart !== void 0 && (i.onAddToCart = t.onAddToCart), t?.onProductNavigate !== void 0 && (i.onProductNavigate = t.onProductNavigate), t?.onScriptCall !== void 0 && (i.onScriptCall = t.onScriptCall), i;
|
|
250
|
+
}
|
|
251
|
+
async function O(e) {
|
|
252
|
+
const t = T(e.runtimeConfig);
|
|
253
|
+
if (e.preflight !== !1) {
|
|
254
|
+
const r = w(t);
|
|
255
|
+
if (!r.ok) {
|
|
256
|
+
const s = r.warnings.filter((o) => o.severity === "error");
|
|
257
|
+
throw new Error(`[gengage] Preflight failed: ${s.map((o) => o.message).join("; ")}`);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
const n = e.contextResolver?.(), i = await f(b(t, e.hostActions, n));
|
|
261
|
+
if (e.contextResolver !== void 0) {
|
|
262
|
+
const r = e.contextResolver, s = () => {
|
|
263
|
+
const a = r();
|
|
264
|
+
i.updateContext(a);
|
|
265
|
+
};
|
|
266
|
+
window.addEventListener("gengage:context:update", s);
|
|
267
|
+
const o = i.destroy.bind(i);
|
|
268
|
+
i.destroy = () => {
|
|
269
|
+
window.removeEventListener("gengage:context:update", s), o();
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
return i;
|
|
273
|
+
}
|
|
274
|
+
var k = [
|
|
275
|
+
{
|
|
276
|
+
pageType: "home",
|
|
277
|
+
urlPatterns: [
|
|
278
|
+
"^/$",
|
|
279
|
+
"^/index\\.html?$",
|
|
280
|
+
"^/anasayfa$"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
pageType: "search",
|
|
285
|
+
urlPatterns: [
|
|
286
|
+
"/arama",
|
|
287
|
+
"/search",
|
|
288
|
+
"/ara\\?"
|
|
289
|
+
],
|
|
290
|
+
queryParam: "q"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
pageType: "cart",
|
|
294
|
+
urlPatterns: [
|
|
295
|
+
"/sepet",
|
|
296
|
+
"/cart",
|
|
297
|
+
"/basket",
|
|
298
|
+
"/sepetim"
|
|
299
|
+
]
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
pageType: "plp",
|
|
303
|
+
urlPatterns: [
|
|
304
|
+
"/kategori/",
|
|
305
|
+
"/category/",
|
|
306
|
+
"/c/",
|
|
307
|
+
"/koleksiyon/",
|
|
308
|
+
"/collection/"
|
|
309
|
+
]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
pageType: "pdp",
|
|
313
|
+
urlPatterns: [
|
|
314
|
+
"/urun/",
|
|
315
|
+
"/product/",
|
|
316
|
+
"/p/",
|
|
317
|
+
"/-p-",
|
|
318
|
+
"/-pm-"
|
|
319
|
+
]
|
|
320
|
+
}
|
|
321
|
+
];
|
|
322
|
+
function C(e, t) {
|
|
323
|
+
const n = t ?? (typeof window < "u" ? new URL(window.location.href) : null);
|
|
324
|
+
if (!n) return "other";
|
|
325
|
+
const i = e ?? k, r = n.pathname;
|
|
326
|
+
for (const s of i)
|
|
327
|
+
if (!(s.urlPatterns && !s.urlPatterns.some((o) => {
|
|
328
|
+
try {
|
|
329
|
+
return new RegExp(o, "i").test(r);
|
|
330
|
+
} catch {
|
|
331
|
+
return !1;
|
|
332
|
+
}
|
|
333
|
+
})) && !(s.queryParam && !n.searchParams.has(s.queryParam)) && !(s.selector && typeof document < "u" && !document.querySelector(s.selector)))
|
|
334
|
+
return s.pageType;
|
|
335
|
+
return "other";
|
|
336
|
+
}
|
|
337
|
+
function I(e) {
|
|
338
|
+
const t = e ?? (typeof window < "u" ? new URL(window.location.href) : null);
|
|
339
|
+
if (!t) return;
|
|
340
|
+
const n = t.pathname, i = n.match(/\/(?:p|urun|product)\/([^/?#]+)/i);
|
|
341
|
+
if (i?.[1]) return i[1];
|
|
342
|
+
const r = n.match(/-p-(\d+)/i);
|
|
343
|
+
if (r?.[1]) return r[1];
|
|
344
|
+
}
|
|
345
|
+
function B(e) {
|
|
346
|
+
const t = C(e), n = { pageType: t };
|
|
347
|
+
if (t === "pdp") {
|
|
348
|
+
const i = I();
|
|
349
|
+
i && (n.sku = i);
|
|
350
|
+
}
|
|
351
|
+
return typeof window < "u" && (n.url = window.location.href), n;
|
|
352
|
+
}
|
|
353
|
+
export {
|
|
354
|
+
w as a,
|
|
355
|
+
D as c,
|
|
356
|
+
q as d,
|
|
357
|
+
y as f,
|
|
358
|
+
O as i,
|
|
359
|
+
E as l,
|
|
360
|
+
C as n,
|
|
361
|
+
P as o,
|
|
362
|
+
A as p,
|
|
363
|
+
I as r,
|
|
364
|
+
S as s,
|
|
365
|
+
B as t,
|
|
366
|
+
L as u
|
|
367
|
+
};
|
package/dist/common.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./schemas-B6RjqKrg.cjs"),e=require("./ga-datalayer-DkfsAHf9.cjs"),i=require("./chat-CuPO9t-Z.cjs"),a=require("./connection-warning-CL1CReZo.cjs"),t=require("./native-webview-D2lDXTh3.cjs"),r=require("./common-BzegEdJs.cjs");exports.AccountRuntimeConfigSchema=t.AccountRuntimeConfigSchema;exports.AnalyticsAuthModeSchema=t.AnalyticsAuthModeSchema;exports.AnalyticsClient=r.AnalyticsClient;exports.BASE_WIDGET_THEME=e.BASE_WIDGET_THEME;exports.BaseWidget=e.BaseWidget;exports.DEFAULT_CUSTOMIZATION_LOCALE=r.DEFAULT_CUSTOMIZATION_LOCALE;exports.DEFAULT_WIDGET_THEME_TOKENS=e.DEFAULT_WIDGET_THEME_TOKENS;exports.UnknownActionPolicySchema=t.UnknownActionPolicySchema;exports.VoiceInput=i.VoiceInput;exports.adaptBackendEvent=n.adaptBackendEvent;exports.applyNativeSession=t.applyNativeSession;exports.autoDetectPageContext=r.autoDetectPageContext;exports.basketAddEvent=e.basketAddEvent;exports.bootstrapSession=e.bootstrapSession;exports.buildChatEndpointUrl=n.buildChatEndpointUrl;exports.buildOverlayIdempotencyKey=t.buildOverlayIdempotencyKey;exports.chatHistorySnapshotEvent=e.chatHistorySnapshotEvent;exports.checkoutCompleteEvent=e.checkoutCompleteEvent;exports.checkoutStartEvent=e.checkoutStartEvent;exports.configureConnectionWarning=a.configureConnectionWarning;exports.consumeStream=n.consumeStream;exports.createAccountIdentity=r.createAccountIdentity;exports.createAnalyticsClient=r.createAnalyticsClient;exports.createDefaultAccountRuntimeConfig=t.createDefaultAccountRuntimeConfig;exports.createDefaultAnalyticsConfig=r.createDefaultAnalyticsConfig;exports.createFloatingChatConfig=r.createFloatingChatConfig;exports.createNativeWebViewBridge=t.createNativeWebViewBridge;exports.createPdpQnaConfig=r.createPdpQnaConfig;exports.createPdpSimRelConfig=r.createPdpSimRelConfig;exports.defaultUnknownUISpecRenderer=n.defaultUnknownUISpecRenderer;exports.destroyOverlayWidgets=t.destroyOverlayWidgets;exports.detectNativeEnvironment=t.detectNativeEnvironment;exports.detectPageType=r.detectPageType;exports.dismissGlobalErrorToast=e.dismissGlobalErrorToast;exports.dispatch=e.dispatch;exports.extractSkuFromUrl=r.extractSkuFromUrl;exports.getGlobalErrorMessage=e.getGlobalErrorMessage;exports.getOverlayWidgets=t.getOverlayWidgets;exports.getSuggestedSearchKeywords=n.getSuggestedSearchKeywords;exports.getSuggestedSearchKeywordsText=n.getSuggestedSearchKeywordsText;exports.getWindowPageContext=e.getWindowPageContext;exports.initGengageClient=r.initGengageClient;exports.initNativeOverlayWidgets=t.initNativeOverlayWidgets;exports.initOverlayWidgets=t.initOverlayWidgets;exports.isVoiceInputSupported=i.isVoiceInputSupported;exports.listen=e.listen;exports.llmUsageEvent=e.llmUsageEvent;exports.makePillLauncher=i.makePillLauncher;exports.mergeUISpecRegistry=n.mergeUISpecRegistry;exports.meteringIncrementEvent=e.meteringIncrementEvent;exports.meteringSummaryEvent=e.meteringSummaryEvent;exports.normalizeMiddlewareUrl=n.normalizeMiddlewareUrl;exports.normalizeProductGroupingsResponse=n.normalizeProductGroupingsResponse;exports.normalizeSimilarProductsResponse=n.normalizeSimilarProductsResponse;exports.parseAccountRuntimeConfig=t.parseAccountRuntimeConfig;exports.preflightDiagnostics=r.preflightDiagnostics;exports.productToNormalized=n.productToNormalized;exports.registerGlobalErrorToastListener=e.registerGlobalErrorToastListener;exports.renderUISpecWithRegistry=n.renderUISpecWithRegistry;exports.resolveSession=e.resolveSession;exports.routeStreamAction=i.routeStreamAction;exports.safeParseAccountRuntimeConfig=t.safeParseAccountRuntimeConfig;exports.sanitizeHtml=e.sanitizeHtml;exports.showGlobalErrorToast=e.showGlobalErrorToast;exports.streamChunkEvent=e.streamChunkEvent;exports.streamDoneEvent=e.streamDoneEvent;exports.streamErrorEvent=e.streamErrorEvent;exports.streamPost=n.streamPost;exports.streamStartEvent=e.streamStartEvent;exports.streamUiSpecEvent=e.streamUiSpecEvent;exports.trackConnectionWarningRequest=a.trackConnectionWarningRequest;exports.updatePageContext=e.updatePageContext;exports.widgetHistorySnapshotEvent=e.widgetHistorySnapshotEvent;exports.wireGADataLayer=e.wireGADataLayer;exports.wireQNAToChat=e.wireQNAToChat;exports.wireSimilarToChat=e.wireSimilarToChat;exports.withBaseTheme=e.withBaseTheme;exports.withDefaultWidgetTheme=e.withDefaultWidgetTheme;
|
package/dist/common.js
CHANGED
|
@@ -1,7 +1,86 @@
|
|
|
1
|
-
import { C as
|
|
2
|
-
import { $ as
|
|
3
|
-
import { i as
|
|
4
|
-
import { n as
|
|
5
|
-
import { a as
|
|
6
|
-
import { a as
|
|
7
|
-
export {
|
|
1
|
+
import { C as a, S as t, b as s, d as r, f as n, g as i, h as o, m as c, p as m, v as l, w as g, x as d, y as u } from "./schemas-PkedCk_-.js";
|
|
2
|
+
import { $ as E, A as S, D as h, E as v, F as y, G as C, H as f, I as A, J as T, K as w, L as U, M as W, N as I, O as P, P as D, Q as k, S as R, T as b, U as G, V as O, W as N, X as x, Y as L, Z as M, et as _, j as H, k as z, q as B, v as F, w as K, x as V, y as Q } from "./ga-datalayer-CgI6Kb_i.js";
|
|
3
|
+
import { i as Z, l as j, m as J, u as X } from "./chat-yAf9OADM.js";
|
|
4
|
+
import { n as $, t as ee } from "./connection-warning-CVZzlGJt.js";
|
|
5
|
+
import { a as te, c as se, d as re, f as ne, h as ie, i as oe, l as ce, m as me, n as le, o as ge, p as de, r as ue, s as pe, u as Ee } from "./native-webview-B8vOoxns.js";
|
|
6
|
+
import { a as he, c as ve, d as ye, f as Ce, i as fe, l as Ae, n as Te, o as we, p as Ue, r as We, s as Ie, t as Pe, u as De } from "./common-C8NRcP7O.js";
|
|
7
|
+
export {
|
|
8
|
+
Ee as AccountRuntimeConfigSchema,
|
|
9
|
+
re as AnalyticsAuthModeSchema,
|
|
10
|
+
Ce as AnalyticsClient,
|
|
11
|
+
v as BASE_WIDGET_THEME,
|
|
12
|
+
Q as BaseWidget,
|
|
13
|
+
we as DEFAULT_CUSTOMIZATION_LOCALE,
|
|
14
|
+
P as DEFAULT_WIDGET_THEME_TOKENS,
|
|
15
|
+
ne as UnknownActionPolicySchema,
|
|
16
|
+
j as VoiceInput,
|
|
17
|
+
m as adaptBackendEvent,
|
|
18
|
+
le as applyNativeSession,
|
|
19
|
+
Pe as autoDetectPageContext,
|
|
20
|
+
f as basketAddEvent,
|
|
21
|
+
S as bootstrapSession,
|
|
22
|
+
r as buildChatEndpointUrl,
|
|
23
|
+
ge as buildOverlayIdempotencyKey,
|
|
24
|
+
G as chatHistorySnapshotEvent,
|
|
25
|
+
N as checkoutCompleteEvent,
|
|
26
|
+
C as checkoutStartEvent,
|
|
27
|
+
ee as configureConnectionWarning,
|
|
28
|
+
s as consumeStream,
|
|
29
|
+
Ie as createAccountIdentity,
|
|
30
|
+
Ue as createAnalyticsClient,
|
|
31
|
+
de as createDefaultAccountRuntimeConfig,
|
|
32
|
+
ve as createDefaultAnalyticsConfig,
|
|
33
|
+
Ae as createFloatingChatConfig,
|
|
34
|
+
ue as createNativeWebViewBridge,
|
|
35
|
+
De as createPdpQnaConfig,
|
|
36
|
+
ye as createPdpSimRelConfig,
|
|
37
|
+
a as defaultUnknownUISpecRenderer,
|
|
38
|
+
pe as destroyOverlayWidgets,
|
|
39
|
+
oe as detectNativeEnvironment,
|
|
40
|
+
Te as detectPageType,
|
|
41
|
+
V as dismissGlobalErrorToast,
|
|
42
|
+
D as dispatch,
|
|
43
|
+
We as extractSkuFromUrl,
|
|
44
|
+
R as getGlobalErrorMessage,
|
|
45
|
+
se as getOverlayWidgets,
|
|
46
|
+
l as getSuggestedSearchKeywords,
|
|
47
|
+
u as getSuggestedSearchKeywordsText,
|
|
48
|
+
H as getWindowPageContext,
|
|
49
|
+
fe as initGengageClient,
|
|
50
|
+
te as initNativeOverlayWidgets,
|
|
51
|
+
ce as initOverlayWidgets,
|
|
52
|
+
X as isVoiceInputSupported,
|
|
53
|
+
y as listen,
|
|
54
|
+
w as llmUsageEvent,
|
|
55
|
+
Z as makePillLauncher,
|
|
56
|
+
t as mergeUISpecRegistry,
|
|
57
|
+
B as meteringIncrementEvent,
|
|
58
|
+
T as meteringSummaryEvent,
|
|
59
|
+
n as normalizeMiddlewareUrl,
|
|
60
|
+
c as normalizeProductGroupingsResponse,
|
|
61
|
+
o as normalizeSimilarProductsResponse,
|
|
62
|
+
me as parseAccountRuntimeConfig,
|
|
63
|
+
he as preflightDiagnostics,
|
|
64
|
+
i as productToNormalized,
|
|
65
|
+
K as registerGlobalErrorToastListener,
|
|
66
|
+
g as renderUISpecWithRegistry,
|
|
67
|
+
W as resolveSession,
|
|
68
|
+
J as routeStreamAction,
|
|
69
|
+
ie as safeParseAccountRuntimeConfig,
|
|
70
|
+
O as sanitizeHtml,
|
|
71
|
+
b as showGlobalErrorToast,
|
|
72
|
+
L as streamChunkEvent,
|
|
73
|
+
x as streamDoneEvent,
|
|
74
|
+
M as streamErrorEvent,
|
|
75
|
+
d as streamPost,
|
|
76
|
+
k as streamStartEvent,
|
|
77
|
+
E as streamUiSpecEvent,
|
|
78
|
+
$ as trackConnectionWarningRequest,
|
|
79
|
+
I as updatePageContext,
|
|
80
|
+
_ as widgetHistorySnapshotEvent,
|
|
81
|
+
F as wireGADataLayer,
|
|
82
|
+
A as wireQNAToChat,
|
|
83
|
+
U as wireSimilarToChat,
|
|
84
|
+
h as withBaseTheme,
|
|
85
|
+
z as withDefaultWidgetTheme
|
|
86
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const l=require("./ga-datalayer-DkfsAHf9.cjs");var w=8e3,h=5e3,g="https://www.google.com/favicon.ico";function m(e){e.probeUrl&&(g=e.probeUrl)}var n=new Map,f=!1,i=null,a=null,r=!1;function b(e){return typeof e=="string"&&e.toLowerCase().startsWith("tr")}function y(e){return b(e)?"İnternet bağlantısında sorun var gibi görünüyor. İstek sürerken yeniden deneyeceğiz.":"Your internet connection looks unstable. We'll keep retrying while this request is active."}function v(){let e;for(const t of n.values())e=t;return e}function u(){i&&(clearTimeout(i),i=null)}function C(){a&&(clearInterval(a),a=null)}async function d(){try{if(typeof navigator<"u"&&navigator.onLine===!1)return!1;if(typeof window<"u"){const o=window.location.hostname;if(o==="localhost"||o==="127.0.0.1")return navigator.onLine}const e=new AbortController,t=setTimeout(()=>e.abort(),3e3);try{return await fetch(g,{method:"HEAD",mode:"no-cors",cache:"no-cache",signal:e.signal}),!0}catch{return navigator.onLine}finally{clearTimeout(t)}}catch{return typeof navigator>"u"?!0:navigator.onLine}}function s(){r=!1,C(),l.dismissGlobalErrorToast()}function c(){i||r||n.size===0||(i=setTimeout(async()=>{i=null,!(r||n.size===0)&&!await d()&&n.size>0&&(r=!0,l.showGlobalErrorToast({source:"sdk",message:y(v()),sticky:!0}),a||(a=setInterval(async()=>{if(n.size===0){s();return}await d()&&(s(),c())},h)))},w))}function T(){f||typeof window>"u"||(f=!0,window.addEventListener("online",()=>{s(),c()}),window.addEventListener("offline",()=>{n.size===0||r||(r=!0,u(),l.showGlobalErrorToast({source:"sdk",message:y(v()),sticky:!0}))}))}function k(e){T();const t=Symbol(e.source);n.set(t,e.locale),c();let o=!1;return()=>{if(!o){if(o=!0,n.delete(t),n.size===0){u(),s();return}r||(u(),c())}}}Object.defineProperty(exports,"configureConnectionWarning",{enumerable:!0,get:function(){return m}});Object.defineProperty(exports,"trackConnectionWarningRequest",{enumerable:!0,get:function(){return k}});
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { T as d, x as y } from "./ga-datalayer-CgI6Kb_i.js";
|
|
2
|
+
var h = 8e3, m = 5e3, g = "https://www.google.com/favicon.ico";
|
|
3
|
+
function b(e) {
|
|
4
|
+
e.probeUrl && (g = e.probeUrl);
|
|
5
|
+
}
|
|
6
|
+
var n = /* @__PURE__ */ new Map(), u = !1, i = null, a = null, t = !1;
|
|
7
|
+
function T(e) {
|
|
8
|
+
return typeof e == "string" && e.toLowerCase().startsWith("tr");
|
|
9
|
+
}
|
|
10
|
+
function v(e) {
|
|
11
|
+
return T(e) ? "İnternet bağlantısında sorun var gibi görünüyor. İstek sürerken yeniden deneyeceğiz." : "Your internet connection looks unstable. We'll keep retrying while this request is active.";
|
|
12
|
+
}
|
|
13
|
+
function w() {
|
|
14
|
+
let e;
|
|
15
|
+
for (const r of n.values()) e = r;
|
|
16
|
+
return e;
|
|
17
|
+
}
|
|
18
|
+
function l() {
|
|
19
|
+
i && (clearTimeout(i), i = null);
|
|
20
|
+
}
|
|
21
|
+
function C() {
|
|
22
|
+
a && (clearInterval(a), a = null);
|
|
23
|
+
}
|
|
24
|
+
async function f() {
|
|
25
|
+
try {
|
|
26
|
+
if (typeof navigator < "u" && navigator.onLine === !1) return !1;
|
|
27
|
+
if (typeof window < "u") {
|
|
28
|
+
const o = window.location.hostname;
|
|
29
|
+
if (o === "localhost" || o === "127.0.0.1") return navigator.onLine;
|
|
30
|
+
}
|
|
31
|
+
const e = new AbortController(), r = setTimeout(() => e.abort(), 3e3);
|
|
32
|
+
try {
|
|
33
|
+
return await fetch(g, {
|
|
34
|
+
method: "HEAD",
|
|
35
|
+
mode: "no-cors",
|
|
36
|
+
cache: "no-cache",
|
|
37
|
+
signal: e.signal
|
|
38
|
+
}), !0;
|
|
39
|
+
} catch {
|
|
40
|
+
return navigator.onLine;
|
|
41
|
+
} finally {
|
|
42
|
+
clearTimeout(r);
|
|
43
|
+
}
|
|
44
|
+
} catch {
|
|
45
|
+
return typeof navigator > "u" ? !0 : navigator.onLine;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function s() {
|
|
49
|
+
t = !1, C(), y();
|
|
50
|
+
}
|
|
51
|
+
function c() {
|
|
52
|
+
i || t || n.size === 0 || (i = setTimeout(async () => {
|
|
53
|
+
i = null, !(t || n.size === 0) && !await f() && n.size > 0 && (t = !0, d({
|
|
54
|
+
source: "sdk",
|
|
55
|
+
message: v(w()),
|
|
56
|
+
sticky: !0
|
|
57
|
+
}), a || (a = setInterval(async () => {
|
|
58
|
+
if (n.size === 0) {
|
|
59
|
+
s();
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
await f() && (s(), c());
|
|
63
|
+
}, m)));
|
|
64
|
+
}, h));
|
|
65
|
+
}
|
|
66
|
+
function k() {
|
|
67
|
+
u || typeof window > "u" || (u = !0, window.addEventListener("online", () => {
|
|
68
|
+
s(), c();
|
|
69
|
+
}), window.addEventListener("offline", () => {
|
|
70
|
+
n.size === 0 || t || (t = !0, l(), d({
|
|
71
|
+
source: "sdk",
|
|
72
|
+
message: v(w()),
|
|
73
|
+
sticky: !0
|
|
74
|
+
}));
|
|
75
|
+
}));
|
|
76
|
+
}
|
|
77
|
+
function E(e) {
|
|
78
|
+
k();
|
|
79
|
+
const r = Symbol(e.source);
|
|
80
|
+
n.set(r, e.locale), c();
|
|
81
|
+
let o = !1;
|
|
82
|
+
return () => {
|
|
83
|
+
if (!o) {
|
|
84
|
+
if (o = !0, n.delete(r), n.size === 0) {
|
|
85
|
+
l(), s();
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
t || (l(), c());
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export {
|
|
93
|
+
E as n,
|
|
94
|
+
b as t
|
|
95
|
+
};
|