@epigraph/epigraph-std-lib 5.0.0-alpha.13 → 5.0.0-alpha.15

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.
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../epigraphAnalytics-H3EZRDUh.cjs");exports.ACTION_PERFORMED=e.n,exports.BUTTON_TYPE=e.r,exports.CONTENT_TYPES=e.i,exports.CURRENCY=e.a,exports.ConsentPluginNames=e.F,exports.EpigraphAddToFavouritesEvent=e.o,exports.EpigraphAnalytics=e.t,exports.EpigraphArRequestedEvent=e.s,exports.EpigraphButtonClickEvent=e.c,exports.EpigraphChangeRateEvent=e.l,exports.EpigraphCheckoutEvent=e.u,exports.EpigraphCompletionRateEvent=e.d,exports.EpigraphContentSharedEvent=e.f,exports.EpigraphConversionEvent=e.p,exports.EpigraphCustomEvent=e.m,exports.EpigraphEngagementRateEvent=e.h,exports.EpigraphItemAddedEvent=e.g,exports.EpigraphItemMovedEvent=e._,exports.EpigraphItemRemovedEvent=e.v,exports.EpigraphKeyboardInteractionEvent=e.y,exports.EpigraphModuleClosedEvent=e.b,exports.EpigraphModuleFailedEvent=e.x,exports.EpigraphModuleLoadingEvent=e.S,exports.EpigraphModuleReadyEvent=e.C,exports.EpigraphPanelClosedEvent=e.w,exports.EpigraphPanelOpenedEvent=e.T,exports.EpigraphSupportDetectedEvent=e.E,exports.EpigraphTouchInteractionEvent=e.D,exports.EpigraphVariantChangedEvent=e.O,exports.GA4AnalyticsPlugin=e.R,exports.MODULE_FAILED_ERRORS=e.k,exports.NexusAnalyticsPlugin=e.L,exports.OneTrustConsentPlugin=e.I,exports.PANEL_TYPE=e.A,exports.SHARE_DESTINATIONS=e.j,exports.SUPPORT_TYPE=e.M,exports.TRIGGER_SOURCE=e.N,exports.VARIANT_CHANGE_TYPES=e.P;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../epigraphAnalytics-Cl98luUT.cjs");exports.ACTION_PERFORMED=e.n,exports.BUTTON_TYPE=e.r,exports.CONTENT_TYPES=e.i,exports.CURRENCY=e.a,exports.ConsentPluginNames=e.F,exports.EpigraphAddToFavouritesEvent=e.o,exports.EpigraphAnalytics=e.t,exports.EpigraphArRequestedEvent=e.s,exports.EpigraphButtonClickEvent=e.c,exports.EpigraphChangeRateEvent=e.l,exports.EpigraphCheckoutEvent=e.u,exports.EpigraphCompletionRateEvent=e.d,exports.EpigraphContentSharedEvent=e.f,exports.EpigraphConversionEvent=e.p,exports.EpigraphCustomEvent=e.m,exports.EpigraphEngagementRateEvent=e.h,exports.EpigraphItemAddedEvent=e.g,exports.EpigraphItemMovedEvent=e._,exports.EpigraphItemRemovedEvent=e.v,exports.EpigraphKeyboardInteractionEvent=e.y,exports.EpigraphModuleClosedEvent=e.b,exports.EpigraphModuleFailedEvent=e.x,exports.EpigraphModuleLoadingEvent=e.S,exports.EpigraphModuleReadyEvent=e.C,exports.EpigraphPanelClosedEvent=e.w,exports.EpigraphPanelOpenedEvent=e.T,exports.EpigraphSupportDetectedEvent=e.E,exports.EpigraphTouchInteractionEvent=e.D,exports.EpigraphVariantChangedEvent=e.O,exports.GA4AnalyticsPlugin=e.z,exports.MODULE_FAILED_ERRORS=e.k,exports.NexusAnalyticsPlugin=e.R,exports.NexusSolutionsAnalyticsPlugin=e.L,exports.OneTrustConsentPlugin=e.I,exports.PANEL_TYPE=e.A,exports.SHARE_DESTINATIONS=e.j,exports.SUPPORT_TYPE=e.M,exports.TRIGGER_SOURCE=e.N,exports.VARIANT_CHANGE_TYPES=e.P;
@@ -2,6 +2,7 @@ import { IAnalyticsPlugin } from './analytics-plugin-interface';
2
2
  import { IAnalyticsEvent } from './analytics-event-interface';
3
3
  import { GA4AnalyticsPlugin } from './plugins/ga4-analytics-plugin';
4
4
  import { NexusAnalyticsPlugin } from './plugins/nexus-analytics-plugin';
5
+ import { NexusSolutionsAnalyticsPlugin } from './plugins/nexus-solutions-analytics-plugin';
5
6
  import { OneTrustConsentPlugin } from './consent-plugins/one-trust-consent-plugin';
6
7
  import { ConsentPluginNames } from './consent-plugins/consent-plugin-names';
7
8
  declare const $analyticsPluginsMap: unique symbol;
@@ -10,6 +11,7 @@ export type { IAnalyticsEvent };
10
11
  export * from './epigraphAnalyticsEventLibrary';
11
12
  export { GA4AnalyticsPlugin };
12
13
  export { NexusAnalyticsPlugin };
14
+ export { NexusSolutionsAnalyticsPlugin };
13
15
  export { OneTrustConsentPlugin };
14
16
  export { ConsentPluginNames };
15
17
  export declare class EpigraphAnalytics {
@@ -1,2 +1,2 @@
1
- import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P, w as F, x as I, y as L } from "../../epigraphAnalytics-CF9Czp8C.js";
2
- export { D as ACTION_PERFORMED, A as BUTTON_TYPE, S as CONTENT_TYPES, h as CURRENCY, i as ConsentPluginNames, O as EpigraphAddToFavouritesEvent, M as EpigraphAnalytics, j as EpigraphArRequestedEvent, _ as EpigraphButtonClickEvent, T as EpigraphChangeRateEvent, N as EpigraphCheckoutEvent, v as EpigraphCompletionRateEvent, y as EpigraphContentSharedEvent, k as EpigraphConversionEvent, E as EpigraphCustomEvent, x as EpigraphEngagementRateEvent, b as EpigraphItemAddedEvent, m as EpigraphItemMovedEvent, P as EpigraphItemRemovedEvent, L as EpigraphKeyboardInteractionEvent, g as EpigraphModuleClosedEvent, I as EpigraphModuleFailedEvent, f as EpigraphModuleLoadingEvent, t as EpigraphModuleReadyEvent, F as EpigraphPanelClosedEvent, p as EpigraphPanelOpenedEvent, r as EpigraphSupportDetectedEvent, n as EpigraphTouchInteractionEvent, l as EpigraphVariantChangedEvent, d as GA4AnalyticsPlugin, w as MODULE_FAILED_ERRORS, o as NexusAnalyticsPlugin, a as OneTrustConsentPlugin, e as PANEL_TYPE, C as SHARE_DESTINATIONS, s as SUPPORT_TYPE, c as TRIGGER_SOURCE, u as VARIANT_CHANGE_TYPES };
1
+ import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, R as d, S as f, T as p, _ as m, a as h, b as g, c as _, d as v, f as y, g as b, h as x, i as S, j as C, k as w, l as T, m as E, n as D, o as O, p as k, r as A, s as j, t as M, u as N, v as P, w as F, x as I, y as L, z as R } from "../../epigraphAnalytics-DzLB3jQX.js";
2
+ export { D as ACTION_PERFORMED, A as BUTTON_TYPE, S as CONTENT_TYPES, h as CURRENCY, i as ConsentPluginNames, O as EpigraphAddToFavouritesEvent, M as EpigraphAnalytics, j as EpigraphArRequestedEvent, _ as EpigraphButtonClickEvent, T as EpigraphChangeRateEvent, N as EpigraphCheckoutEvent, v as EpigraphCompletionRateEvent, y as EpigraphContentSharedEvent, k as EpigraphConversionEvent, E as EpigraphCustomEvent, x as EpigraphEngagementRateEvent, b as EpigraphItemAddedEvent, m as EpigraphItemMovedEvent, P as EpigraphItemRemovedEvent, L as EpigraphKeyboardInteractionEvent, g as EpigraphModuleClosedEvent, I as EpigraphModuleFailedEvent, f as EpigraphModuleLoadingEvent, t as EpigraphModuleReadyEvent, F as EpigraphPanelClosedEvent, p as EpigraphPanelOpenedEvent, r as EpigraphSupportDetectedEvent, n as EpigraphTouchInteractionEvent, l as EpigraphVariantChangedEvent, R as GA4AnalyticsPlugin, w as MODULE_FAILED_ERRORS, d as NexusAnalyticsPlugin, o as NexusSolutionsAnalyticsPlugin, a as OneTrustConsentPlugin, e as PANEL_TYPE, C as SHARE_DESTINATIONS, s as SUPPORT_TYPE, c as TRIGGER_SOURCE, u as VARIANT_CHANGE_TYPES };
@@ -11,6 +11,7 @@ declare class BaseAnalyticsEvent implements IAnalyticsEvent {
11
11
  getGa4Parameters(solution: string, experienceId: string, sendTo: string): {
12
12
  solution: string;
13
13
  experience_id: string;
14
+ event: string;
14
15
  interactive_event: boolean;
15
16
  send_to: string;
16
17
  };
@@ -9,6 +9,12 @@ declare global {
9
9
  google_tag_manager: Record<string, any>;
10
10
  }
11
11
  }
12
+ export type GA4AnalyticsPluginConfig = {
13
+ trackingID: string;
14
+ experienceID: string;
15
+ solution: string;
16
+ verboseLogging?: boolean;
17
+ };
12
18
  export declare class GA4AnalyticsPlugin implements IAnalyticsPlugin {
13
19
  name: string;
14
20
  pluginName: string;
@@ -29,12 +35,10 @@ export declare class GA4AnalyticsPlugin implements IAnalyticsPlugin {
29
35
  private __initializationMethod;
30
36
  private __nexusFailureReported;
31
37
  private __epigraphNotifier;
32
- constructor({ trackingID, experienceID, solution, verboseLogging }: {
33
- trackingID: string;
34
- experienceID: string;
35
- solution: string;
36
- verboseLogging?: boolean;
37
- });
38
+ constructor({ trackingID, experienceID, solution, verboseLogging, }: GA4AnalyticsPluginConfig);
39
+ setTrackingID(trackingID: string): void;
40
+ setExperienceID(experienceID: string): void;
41
+ setSolution(solution: string): void;
38
42
  getStatus(): AnalyticsStatus;
39
43
  setStatus(newStatus: AnalyticsStatus): void;
40
44
  getPendingEventCount(): number;
@@ -52,6 +56,7 @@ export declare class GA4AnalyticsPlugin implements IAnalyticsPlugin {
52
56
  * @param consent boolean Whether consent is granted
53
57
  */
54
58
  sendEvent(analyticsEvent: IAnalyticsEvent, consent: boolean): Promise<void>;
59
+ private resetInitialization;
55
60
  private initializePlugin;
56
61
  private detectAndSetupAnalytics;
57
62
  private detectGTM;
@@ -0,0 +1,50 @@
1
+ import { AnalyticsStatus, IAnalyticsPlugin } from '../analytics-plugin-interface';
2
+ import { IAnalyticsEvent } from '../analytics-event-interface';
3
+ import { NexusEndpoints } from '../../../Epigraph/constants/enums.ts';
4
+ export type NexusSolutionsAnalyticsPluginConfig = {
5
+ productId: number;
6
+ identifier: string;
7
+ identifierType: string;
8
+ experienceType: string;
9
+ renderMode?: string;
10
+ sessionId: string;
11
+ xPath: string;
12
+ solution?: string;
13
+ verboseLogging?: boolean;
14
+ baseUrl?: NexusEndpoints;
15
+ };
16
+ export declare class NexusSolutionsAnalyticsPlugin implements IAnalyticsPlugin {
17
+ name: string;
18
+ pluginName: string;
19
+ trackingID: string;
20
+ experienceID: string;
21
+ solution: string;
22
+ verboseLogging: boolean;
23
+ url: string;
24
+ private productId;
25
+ private identifier;
26
+ private identifierType;
27
+ private experienceType;
28
+ private renderMode;
29
+ private readonly sessionId;
30
+ private readonly xPath;
31
+ private __queue;
32
+ private __status;
33
+ private __sentEventCount;
34
+ private __epigraphNotifier;
35
+ constructor({ productId, identifier, identifierType, experienceType, renderMode, sessionId, xPath, solution, verboseLogging, baseUrl, }: NexusSolutionsAnalyticsPluginConfig);
36
+ setProductId(productId: number): void;
37
+ setIdentifier(identifier: string): void;
38
+ setIdentifierType(identifierType: string): void;
39
+ setExperienceType(experienceType: string): void;
40
+ setRenderMode(renderMode: string): void;
41
+ getStatus(): AnalyticsStatus;
42
+ setStatus(newStatus: AnalyticsStatus): void;
43
+ getPendingEventCount(): number;
44
+ getSentEventCount(): number;
45
+ getTotalEventCount(): number;
46
+ getUniquePluginIdentifier(): string;
47
+ setupPlugin(): void;
48
+ sendEvent(event: IAnalyticsEvent, consent: boolean): Promise<void>;
49
+ private dequeueAndSendEvents;
50
+ }
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./epigraphQrCodeGenerator-F2eLrPC_.cjs"),t=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),n=require("./enums-PfFMiIoe.cjs"),r=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs"),i=require("./Epigraph/epigraph.cjs"),a=require("./Epigraph/epigraphBaseSolutions.cjs"),o=require("./epigraphAnalytics-H3EZRDUh.cjs"),s=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),c=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),l=require("./epigraphUnitsConverter-CwpmWl7p.cjs");exports.ACTION_PERFORMED=o.n,exports.BUTTON_TYPE=o.r,exports.CONTENT_TYPES=o.i,exports.CURRENCY=o.a,exports.ConsentPluginNames=o.F,exports.Distance=l.t,exports.DistanceUnits=l.n,exports.ENVIRONMENT_TYPE=n.t,exports.Epigraph=i.Epigraph,exports.EpigraphAddToFavouritesEvent=o.o,exports.EpigraphAnalytics=o.t,exports.EpigraphArRequestedEvent=o.s,exports.EpigraphBaseSolutionHtmlElement=a.EpigraphBaseSolutionHtmlElement,exports.EpigraphBaseSolutionLitElement=a.EpigraphBaseSolutionLitElement,exports.EpigraphButtonClickEvent=o.c,exports.EpigraphChangeRateEvent=o.l,exports.EpigraphCheckoutEvent=o.u,exports.EpigraphCompletionRateEvent=o.d,exports.EpigraphContentSharedEvent=o.f,exports.EpigraphConversionEvent=o.p,exports.EpigraphCustomEvent=o.m,exports.EpigraphEngagementRateEvent=o.h,exports.EpigraphItemAddedEvent=o.g,exports.EpigraphItemMovedEvent=o._,exports.EpigraphItemRemovedEvent=o.v,exports.EpigraphKeyboardInteractionEvent=o.y,exports.EpigraphLogger=t.EpigraphLogger,exports.EpigraphModuleClosedEvent=o.b,exports.EpigraphModuleFailedEvent=o.x,exports.EpigraphModuleLoadingEvent=o.S,exports.EpigraphModuleReadyEvent=o.C,exports.EpigraphNexusAPI=c.EpigraphNexusAPI,exports.EpigraphPanelClosedEvent=o.w,exports.EpigraphPanelOpenedEvent=o.T,exports.EpigraphQrCodeGenerator=e.t,exports.EpigraphSupportDetectedEvent=o.E,exports.EpigraphTouchInteractionEvent=o.D,exports.EpigraphUrlProcessor=r.EpigraphUrlProcessor,exports.EpigraphVariantChangedEvent=o.O,exports.GA4AnalyticsPlugin=o.R,exports.HTTPMethod=c.HTTPMethod,exports.LogTypes=t.LogTypes,exports.LoggerModeNames=t.LoggerModeNames,exports.MODULE_FAILED_ERRORS=o.k,exports.NexusAPIResourceIdentifier=c.NexusAPIResourceIdentifier,exports.NexusAPIRoutes=c.NexusAPIRoutes,exports.NexusAPIVersions=c.NexusAPIVersions,exports.NexusAnalyticsPlugin=o.L,exports.NexusEndpoints=n.n,exports.OneTrustConsentPlugin=o.I,exports.PANEL_TYPE=o.A,exports.QUERY_PARAMETER_ACTION_NAMES=r.QUERY_PARAMETER_ACTION_NAMES,exports.QUERY_PARAMETER_NAMES=r.QUERY_PARAMETER_NAMES,exports.Result=s.Result,exports.SHARE_DESTINATIONS=o.j,exports.SUPPORT_TYPE=o.M,exports.TRIGGER_SOURCE=o.N,exports.UnitTypes=l.r,exports.VARIANT_CHANGE_TYPES=o.P,exports.failureResult=s.failureResult,exports.successResult=s.successResult;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./epigraphQrCodeGenerator-F2eLrPC_.cjs"),t=require("./EpigraphLibs/EpigraphLogger/epigraphLogger.cjs"),n=require("./enums-PfFMiIoe.cjs"),r=require("./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.cjs"),i=require("./Epigraph/epigraph.cjs"),a=require("./Epigraph/epigraphBaseSolutions.cjs"),o=require("./epigraphAnalytics-Cl98luUT.cjs"),s=require("./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.cjs"),c=require("./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.cjs"),l=require("./epigraphUnitsConverter-CwpmWl7p.cjs");exports.ACTION_PERFORMED=o.n,exports.BUTTON_TYPE=o.r,exports.CONTENT_TYPES=o.i,exports.CURRENCY=o.a,exports.ConsentPluginNames=o.F,exports.Distance=l.t,exports.DistanceUnits=l.n,exports.ENVIRONMENT_TYPE=n.t,exports.Epigraph=i.Epigraph,exports.EpigraphAddToFavouritesEvent=o.o,exports.EpigraphAnalytics=o.t,exports.EpigraphArRequestedEvent=o.s,exports.EpigraphBaseSolutionHtmlElement=a.EpigraphBaseSolutionHtmlElement,exports.EpigraphBaseSolutionLitElement=a.EpigraphBaseSolutionLitElement,exports.EpigraphButtonClickEvent=o.c,exports.EpigraphChangeRateEvent=o.l,exports.EpigraphCheckoutEvent=o.u,exports.EpigraphCompletionRateEvent=o.d,exports.EpigraphContentSharedEvent=o.f,exports.EpigraphConversionEvent=o.p,exports.EpigraphCustomEvent=o.m,exports.EpigraphEngagementRateEvent=o.h,exports.EpigraphItemAddedEvent=o.g,exports.EpigraphItemMovedEvent=o._,exports.EpigraphItemRemovedEvent=o.v,exports.EpigraphKeyboardInteractionEvent=o.y,exports.EpigraphLogger=t.EpigraphLogger,exports.EpigraphModuleClosedEvent=o.b,exports.EpigraphModuleFailedEvent=o.x,exports.EpigraphModuleLoadingEvent=o.S,exports.EpigraphModuleReadyEvent=o.C,exports.EpigraphNexusAPI=c.EpigraphNexusAPI,exports.EpigraphPanelClosedEvent=o.w,exports.EpigraphPanelOpenedEvent=o.T,exports.EpigraphQrCodeGenerator=e.t,exports.EpigraphSupportDetectedEvent=o.E,exports.EpigraphTouchInteractionEvent=o.D,exports.EpigraphUrlProcessor=r.EpigraphUrlProcessor,exports.EpigraphVariantChangedEvent=o.O,exports.GA4AnalyticsPlugin=o.z,exports.HTTPMethod=c.HTTPMethod,exports.LogTypes=t.LogTypes,exports.LoggerModeNames=t.LoggerModeNames,exports.MODULE_FAILED_ERRORS=o.k,exports.NexusAPIResourceIdentifier=c.NexusAPIResourceIdentifier,exports.NexusAPIRoutes=c.NexusAPIRoutes,exports.NexusAPIVersions=c.NexusAPIVersions,exports.NexusAnalyticsPlugin=o.R,exports.NexusEndpoints=n.n,exports.NexusSolutionsAnalyticsPlugin=o.L,exports.OneTrustConsentPlugin=o.I,exports.PANEL_TYPE=o.A,exports.QUERY_PARAMETER_ACTION_NAMES=r.QUERY_PARAMETER_ACTION_NAMES,exports.QUERY_PARAMETER_NAMES=r.QUERY_PARAMETER_NAMES,exports.Result=s.Result,exports.SHARE_DESTINATIONS=o.j,exports.SUPPORT_TYPE=o.M,exports.TRIGGER_SOURCE=o.N,exports.UnitTypes=l.r,exports.VARIANT_CHANGE_TYPES=o.P,exports.failureResult=s.failureResult,exports.successResult=s.successResult;
@@ -3,9 +3,9 @@ import { n as r, t as i } from "./enums-BSSe4NAs.js";
3
3
  import { EpigraphUrlProcessor as a, QUERY_PARAMETER_ACTION_NAMES as o, QUERY_PARAMETER_NAMES as s } from "./EpigraphLibs/EpigraphUrlProcessor/epigraphUrlProcessor.js";
4
4
  import { Epigraph as c } from "./Epigraph/epigraph.js";
5
5
  import { EpigraphBaseSolutionHtmlElement as l, EpigraphBaseSolutionLitElement as u } from "./Epigraph/epigraphBaseSolutions.js";
6
- import { A as d, C as f, D as p, E as m, F as h, I as g, L as _, M as v, N as y, O as b, P as x, R as S, S as C, T as w, _ as T, a as E, b as D, c as O, d as k, f as A, g as j, h as M, i as N, j as P, k as F, l as I, m as L, n as R, o as z, p as B, r as V, s as H, t as U, u as W, v as G, w as K, x as q, y as J } from "./epigraphAnalytics-CF9Czp8C.js";
7
- import { Result as Y, failureResult as X, successResult as Z } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
8
- import { EpigraphNexusAPI as Q, HTTPMethod as $, NexusAPIResourceIdentifier as ee, NexusAPIRoutes as te, NexusAPIVersions as ne } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
9
- import { t as re } from "./epigraphQrCodeGenerator-BXUNL2XK.js";
10
- import { n as ie, r as ae, t as oe } from "./epigraphUnitsConverter-DsX4Rmsp.js";
11
- export { R as ACTION_PERFORMED, V as BUTTON_TYPE, N as CONTENT_TYPES, E as CURRENCY, h as ConsentPluginNames, oe as Distance, ie as DistanceUnits, i as ENVIRONMENT_TYPE, c as Epigraph, z as EpigraphAddToFavouritesEvent, U as EpigraphAnalytics, H as EpigraphArRequestedEvent, l as EpigraphBaseSolutionHtmlElement, u as EpigraphBaseSolutionLitElement, O as EpigraphButtonClickEvent, I as EpigraphChangeRateEvent, W as EpigraphCheckoutEvent, k as EpigraphCompletionRateEvent, A as EpigraphContentSharedEvent, B as EpigraphConversionEvent, L as EpigraphCustomEvent, M as EpigraphEngagementRateEvent, j as EpigraphItemAddedEvent, T as EpigraphItemMovedEvent, G as EpigraphItemRemovedEvent, J as EpigraphKeyboardInteractionEvent, e as EpigraphLogger, D as EpigraphModuleClosedEvent, q as EpigraphModuleFailedEvent, C as EpigraphModuleLoadingEvent, f as EpigraphModuleReadyEvent, Q as EpigraphNexusAPI, K as EpigraphPanelClosedEvent, w as EpigraphPanelOpenedEvent, re as EpigraphQrCodeGenerator, m as EpigraphSupportDetectedEvent, p as EpigraphTouchInteractionEvent, a as EpigraphUrlProcessor, b as EpigraphVariantChangedEvent, S as GA4AnalyticsPlugin, $ as HTTPMethod, t as LogTypes, n as LoggerModeNames, F as MODULE_FAILED_ERRORS, ee as NexusAPIResourceIdentifier, te as NexusAPIRoutes, ne as NexusAPIVersions, _ as NexusAnalyticsPlugin, r as NexusEndpoints, g as OneTrustConsentPlugin, d as PANEL_TYPE, o as QUERY_PARAMETER_ACTION_NAMES, s as QUERY_PARAMETER_NAMES, Y as Result, P as SHARE_DESTINATIONS, v as SUPPORT_TYPE, y as TRIGGER_SOURCE, ae as UnitTypes, x as VARIANT_CHANGE_TYPES, X as failureResult, Z as successResult };
6
+ import { A as d, C as f, D as p, E as m, F as h, I as g, L as _, M as v, N as y, O as b, P as x, R as S, S as C, T as w, _ as T, a as E, b as D, c as O, d as k, f as A, g as j, h as M, i as N, j as P, k as F, l as I, m as L, n as R, o as z, p as B, r as V, s as H, t as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./epigraphAnalytics-DzLB3jQX.js";
7
+ import { Result as X, failureResult as Z, successResult as Q } from "./EpigraphLibs/EpigraphResultFactory/epigraphResultFactory.js";
8
+ import { EpigraphNexusAPI as $, HTTPMethod as ee, NexusAPIResourceIdentifier as te, NexusAPIRoutes as ne, NexusAPIVersions as re } from "./EpigraphLibs/EpigraphNexusApi/epigraphNexusApi.js";
9
+ import { t as ie } from "./epigraphQrCodeGenerator-BXUNL2XK.js";
10
+ import { n as ae, r as oe, t as se } from "./epigraphUnitsConverter-DsX4Rmsp.js";
11
+ export { R as ACTION_PERFORMED, V as BUTTON_TYPE, N as CONTENT_TYPES, E as CURRENCY, h as ConsentPluginNames, se as Distance, ae as DistanceUnits, i as ENVIRONMENT_TYPE, c as Epigraph, z as EpigraphAddToFavouritesEvent, U as EpigraphAnalytics, H as EpigraphArRequestedEvent, l as EpigraphBaseSolutionHtmlElement, u as EpigraphBaseSolutionLitElement, O as EpigraphButtonClickEvent, I as EpigraphChangeRateEvent, W as EpigraphCheckoutEvent, k as EpigraphCompletionRateEvent, A as EpigraphContentSharedEvent, B as EpigraphConversionEvent, L as EpigraphCustomEvent, M as EpigraphEngagementRateEvent, j as EpigraphItemAddedEvent, T as EpigraphItemMovedEvent, G as EpigraphItemRemovedEvent, J as EpigraphKeyboardInteractionEvent, e as EpigraphLogger, D as EpigraphModuleClosedEvent, q as EpigraphModuleFailedEvent, C as EpigraphModuleLoadingEvent, f as EpigraphModuleReadyEvent, $ as EpigraphNexusAPI, K as EpigraphPanelClosedEvent, w as EpigraphPanelOpenedEvent, ie as EpigraphQrCodeGenerator, m as EpigraphSupportDetectedEvent, p as EpigraphTouchInteractionEvent, a as EpigraphUrlProcessor, b as EpigraphVariantChangedEvent, Y as GA4AnalyticsPlugin, ee as HTTPMethod, t as LogTypes, n as LoggerModeNames, F as MODULE_FAILED_ERRORS, te as NexusAPIResourceIdentifier, ne as NexusAPIRoutes, re as NexusAPIVersions, S as NexusAnalyticsPlugin, r as NexusEndpoints, _ as NexusSolutionsAnalyticsPlugin, g as OneTrustConsentPlugin, d as PANEL_TYPE, o as QUERY_PARAMETER_ACTION_NAMES, s as QUERY_PARAMETER_NAMES, X as Result, P as SHARE_DESTINATIONS, v as SUPPORT_TYPE, y as TRIGGER_SOURCE, oe as UnitTypes, x as VARIANT_CHANGE_TYPES, Z as failureResult, Q as successResult };
@@ -0,0 +1 @@
1
+ const e=require("./enums-PfFMiIoe.cjs");var t=function(e){return e.UNAVAILABLE=`unavailable`,e.AVAILABLE=`available`,e.RESTRICTED=`restricted`,e}({}),n=Symbol(`data`),r=Symbol(`next`),i=class e{constructor(e){this[n]=e,this[r]=null}get data(){return this[n]}set next(t){if(!(t instanceof e)&&t!==null)throw Error(`This node is not an instance of the custom class 'Node'.`);this[r]=t}get next(){return this[r]}},a=Symbol(`head`),o=class{constructor(){this[a]=null}set head(e){this[a]=e}get head(){return this[a]}addToTail(e){let t=this.head;if(t){for(;t.next!==null;)t=t?.next;return t.next=new i(e)}return this.head=new i(e)}removeHead(){let e=this.head;if(e)return this.head=e.next,e.data}},s=Symbol(`queue`),c=Symbol(`size`),l=class{constructor(){this[s]=new o,this[c]=0}get queue(){return this[s]}get size(){return this[c]}enqueue(e){this.queue.addToTail(e),this[c]++}dequeue(){let e=this.queue.removeHead();return this[c]--,e}},u=class{static{this.NOTIFICATION_NAME=`epg-notification`}static{this.ACTION_SEND_EVENT=`send-event`}static{this.ACTION_INITIALIZED=`initialized`}static{this.ACTION_FAILED_INITIALIZATION=`initialization-failed`}constructor(e,t,n,r,i,a){this._pluginName=e,this._trackingId=t,this._experienceId=n,this._solution=r,this._initializer=i,this._status=a}updateStatus(e){this._status=e}updateInitializer(e){this._initializer=e}notify(e,t){let n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:e,eventDetails:t};window.dispatchEvent(new CustomEvent(`epg-notification`,{detail:n}))}},d=class{constructor({trackingID:e,experienceID:n,solution:r,verboseLogging:i=!1}){this.__status=t.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=performance.now(),this.__maxInitializationAttempts=10,this.__initializationRetryDelay=2e3,this.__isInitialized=!1,this.__initializationMethod=`NONE`,this.__nexusFailureReported=!1,this.name=this.pluginName=`GA4-PLUGIN`,this.trackingID=e,this.experienceID=n,this.solution=r,this.verboseLogging=i,this.__queue=new l,this.__epigraphNotifier=new u(this.pluginName,this.pluginName,this.experienceID,this.solution,this.__initializationMethod,this.__status),this.initializePlugin()}setTrackingID(e){if(!e)return;let t=this.trackingID!==e;this.trackingID=e,t&&this.__isInitialized&&(this.resetInitialization(),this.initializePlugin())}setExperienceID(e){this.experienceID=e}setSolution(e){this.solution=e}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.trackingID}`}setupPlugin(){this.__isInitialized&&this.dataLayer!==void 0&&this.dequeueAndSendEvents()}async sendEvent(e,n){if(this.__queue.enqueue(e),!n){this.__status=t.RESTRICTED;return}if(!this.__isInitialized){this.logger(`Cannot send analytics event: dataLayer not defined or plugin not initialized.`);return}try{await this.dequeueAndSendEvents()}catch(e){this.logger(e),await this.reportFailureToNexus(`EVENT_SEND_ERROR`,e?.toString()||`Unknown error`)}}resetInitialization(){this.__isInitialized=!1,this.__status=t.UNAVAILABLE,this.dataLayer=void 0,this.dataLayerName=void 0,this.__initializationMethod=`NONE`,this.__initializationAttempts=0,this.__nexusFailureReported=!1,this.__epigraphNotifier.updateStatus(this.__status)}initializePlugin(){if(this.__isInitialized)return;if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(this.reportFailureToNexus(`MAX_INITIALIZATION_ATTEMPTS`,`Maximum initialization attempts reached`),this.__nexusFailureReported=!0,this.__epigraphNotifier.notify(u.ACTION_FAILED_INITIALIZATION,{}));return}let e=performance.now();if(this.__initializationAttempts>0&&e-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=e,this.__initializationAttempts++;let n=this.detectAndSetupAnalytics();n.success?(this.__isInitialized=!0,this.__status=t.AVAILABLE,this.__initializationMethod=n.method,this.dataLayerName=n.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${n.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${n.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>{this.initializePlugin()},this.__initializationRetryDelay))}detectAndSetupAnalytics(){let e=this.detectGTM();if(e)return this.logger(`GTM detected with container ID: ${e.containerId}`),this.__epigraphNotifier.updateInitializer(`GTM`),{success:!0,method:`GTM`,dataLayerName:e.dataLayerName};let t=this.findGA4Info(this.trackingID);if(t){let e=t.l||`dataLayer`;return this.logger(`GA4 script found, setting up with dataLayer: ${e}`),this.__epigraphNotifier.updateInitializer(`GA4`),{success:!0,method:`GA4`,dataLayerName:e}}return{success:!1,method:`NONE`,dataLayerName:`dataLayer`,error:`No analytics setup found and unable to create one`}}detectGTM(){let e=document.querySelectorAll(`script[src*="googletagmanager.com/gtm"]`);for(let t of Array.from(e)){let e=t.getAttribute(`src`);if(e){let t=e.match(/gtm\.js\?id=([^&]+)/);if(t&&t.length>0){let n=e.match(/&l=([^&]+)/),r=n?n[1]:`dataLayer`;return{containerId:t[1],dataLayerName:r}}}}return null}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let e=this.__queue.size;for(let t=0;t<e;t++){let e=this.__queue.dequeue();try{this.__initializationMethod===`GTM`?(this.sendGTMEvent(e),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${e.eventName}`)):this.__initializationMethod===`GA4`?(this.sendGA4Event(e),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${e.eventName}`)):this.__queue.enqueue(e)}catch(t){this.logger(`Error sending event ${e.eventName}: ${t}`),this.__queue.enqueue(e)}}}async sendGTMEvent(e){let t=e.getGTMParameters(this.solution,this.experienceID,this.trackingID),n=t;this.isValidPayload(t)||(t=await this.convertGTMParametersToEpgEventTag(e.eventName,t)),this.dataLayer&&(this.dataLayer.push(t),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n))}async sendGA4Event(e){let t=e.getGa4Parameters(this.solution,this.experienceID,this.trackingID),n=t;this.isValidPayload(t)||(t=await this.convertGA4ParametersToEpgEventTag(t)),this.dataLayer&&(this.dataLayer?.push(t),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n))}isValidPayload(e){if(Object.keys(e).length>=25)return!1;for(let[t,n]of Object.entries(e))if(t!==`items`&&(t.length>40||String(n).length>100))return!1;return!0}async convertGTMParametersToEpgEventTag(e,t){try{return{event:e,epg_event_tag:await this.sendGA4LongParameters(t),send_to:this.trackingID}}catch{return t}}async convertGA4ParametersToEpgEventTag(e){try{return{epg_event_tag:await this.sendGA4LongParameters(e),send_to:this.trackingID}}catch{return e}}logger(e){this.verboseLogging&&console.warn(e)}async sendGA4LongParameters(e){let t={parameters:e};try{let e=await fetch(`https://api.myepigraph.com/api/analytics/ga4/custom`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(t)});return e.ok?(await e.json())?.id??``:``}catch{return``}}async reportFailureToNexus(e,t){try{let n={plugin:`GA4`,trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:e,errorMessage:t,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`)}catch(e){this.logger(`Error reporting failure to Nexus: ${e}`)}}findGA4Info(e){if(window.google_tag_manager&&window.google_tag_manager[e]){let t=window.google_tag_manager[e];if(t&&t.dataLayerName)return{fullSrc:``,id:e,l:t.dataLayerName}}let t=document.querySelectorAll(`script[src]`);for(let n of t){let t=n.getAttribute(`src`);if(t&&t.includes(e)){let e=new URL(t,location.href),n=Object.fromEntries(e.searchParams.entries());return{fullSrc:e.href,id:n.id||void 0,l:n.l||void 0}}}return null}},f=class{constructor({trackingID:n,experienceID:r,solution:i,sessionId:a,xPath:o,verboseLogging:s=!1,baseUrl:c=e.n.PRODUCTION}){this.__status=t.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=a,this.xPath=o,this.name=this.pluginName=`NEXUS-PLUGIN`,this.trackingID=n,this.experienceID=r,this.solution=i,this.verboseLogging=s,this.__queue=new l,this.url=`${c}analytics/event`,this.__status=t.AVAILABLE,this.__epigraphNotifier=new u(this.pluginName,this.trackingID,this.experienceID,this.solution,`NEXUS`,this.__status),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{})}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return this.name+`-`+this.trackingID}setupPlugin(){}async sendEvent(e,n){if(this.__queue.enqueue(e),!n){this.__status=t.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let e=0;e<this.__queue.size;e++){let e=this.__queue.dequeue(),t={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:e.eventName,parameters:e.getNexusParameters()};try{return(await fetch(this.url,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,"EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<`u`?window.location.origin:``},body:JSON.stringify(t)})).ok&&this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,t),``}catch{return``}this.__sentEventCount++}return``}},p=class{constructor({productId:n,identifier:r,identifierType:i,experienceType:a,renderMode:o=`geo`,sessionId:s,xPath:c,solution:d=``,verboseLogging:f=!1,baseUrl:p=e.n.PRODUCTION}){if(this.experienceID=``,this.__status=t.UNAVAILABLE,this.__sentEventCount=0,n<=0)throw Error(`NexusSolutionsAnalyticsPlugin requires a valid productId greater than 0.`);this.sessionId=s,this.xPath=c,this.name=this.pluginName=`NEXUS-SOLUTIONS-PLUGIN`,this.verboseLogging=f,this.__queue=new l,this.productId=n,this.identifier=r,this.identifierType=i,this.experienceType=a,this.renderMode=o,this.solution=d,this.trackingID=String(n),this.url=`${p}analytics/event`,this.__status=t.AVAILABLE,this.__epigraphNotifier=new u(this.pluginName,this.trackingID,`${r}@${i}`,this.solution,`NEXUS-SOLUTIONS`,this.__status),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{})}setProductId(e){e<=0||(this.productId=e,this.trackingID=String(e))}setIdentifier(e){this.identifier=e}setIdentifierType(e){this.identifierType=e}setExperienceType(e){this.experienceType=e}setRenderMode(e){this.renderMode=e}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.sessionId}`}setupPlugin(){}async sendEvent(e,n){if(this.__queue.enqueue(e),!n){this.__status=t.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(;this.__queue.size>0;){let e=this.__queue.dequeue(),t={action:e.eventName,product_id:this.productId,identifier:this.identifier,identifier_type:this.identifierType,experience_type:this.experienceType,render_mode:this.renderMode,parameters:e.getNexusParameters()};try{(await fetch(this.url,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,"EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<`u`?window.location.origin:``},body:JSON.stringify(t)})).ok&&(this.__sentEventCount++,this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,t))}catch{return}}}},m=class{constructor(e){this.consentSet=!1,this.consent=!1,this.pluginName=`OneTrustConsentPlugin`,this.consentIdentifier=e,this.consent=!1,this.addConsentChangedListener()}hasConsent(){if(this.consentSet)return this.consent;if(window.OnetrustActiveGroups!==void 0){let e=window.OnetrustActiveGroups;e!==void 0&&e.split(`,`).forEach(e=>{e===this.consentIdentifier&&(this.consent=!0,this.consentSet=!0)})}return this.consent}addConsentChangedListener(){window.addEventListener(`load`,()=>{this.hasConsent(),window.OneTrust!==void 0&&typeof window.OneTrust==`object`&&window.OneTrust.OnConsentChanged(()=>{this.consentSet=!1,this.hasConsent()})})}},h=function(e){return e.OneTrust=`onetrust`,e}({}),g=class{constructor({eventName:e,interactiveEvent:t,customParameters:n}){this.eventName=e,this.interactiveEvent=t,this.customParameters=n}getGa4Parameters(e,t,n){let r={solution:e,experience_id:t,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return r=Object.assign(r,JSON.parse(JSON.stringify(this.customParameters))),r}getGTMParameters(e,t,n){let r={solution:e,experience_id:t,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return r=Object.assign(r,JSON.parse(JSON.stringify(this.customParameters))),r}getNexusParameters(){let e={interactive_event:this.interactiveEvent};return e=Object.assign(e,JSON.parse(JSON.stringify(this.customParameters))),e}},_=function(e){return e.VARIANT=`variant`,e.CATEGORY_VARIANT=`category_variant`,e.GEOMETRY=`geometry`,e.CATEGORY_GEOMETRY=`category_geometry`,e.GLOBAL=`global`,e}({}),v=function(e){return e.AR=`ar`,e.QR=`qr`,e.INFO=`info`,e.INSTRUCTIONS=`instructions`,e.DOWNLOAD=`download`,e.PREVIEW_CART=`preview_cart`,e.HOTSPOT_PANEL=`hotspot_panel`,e.SHARE_MODAL=`share_modal`,e.RESTART_MODAL=`restart_modal`,e.REMOVE_MODAL=`remove_modal`,e.LOAD_PRECONFIG_MODAL=`load_preconfig_modal`,e.MOVE_MODAL=`move_modal`,e.OUT_OF_STOCK_MODAL=`out_of_stock_modal`,e}({}),y=function(e){return e.NETWORK=`network`,e.EXPERIENCE_CONFIG_ERROR=`experience-config-error`,e.SCENE_LOAD_ERROR=`scene-load-error`,e.INITIAL_SCENE_LOAD_ERROR=`initial-scene-load-error`,e.AUTHENTICATION_FAILED=`authentication-failed`,e}({}),b=function(e){return e.AUTO=`auto`,e.BUTTON=`button`,e.HOTSPOT=`hotspot`,e.GESTURE=`gesture`,e}({}),x=function(e){return e.USD=`USD`,e.EUR=`EUR`,e.GBP=`GBP`,e.CAD=`CAD`,e}({}),S=function(e){return e.AR=`ar`,e.QR=`qr`,e.AR_WEBGL2=`ar-webgl2`,e.QR_WEBGL2=`qr-webgl2`,e}({}),C=function(e){return e.AR_VIEW=`ar_view`,e.DIMENSION_TOGGLE=`dimension_toggle`,e.HOTSPOTS_TOGGLE=`hotspots_toggle`,e.HELP_TOGGLE=`help_toggle`,e.UTILITY_MENU_TOGGLE=`utility_menu_toggle`,e.HOTSPOT_ENTER=`hotspot_enter`,e.HOTSPOT_EXIT=`hotspot_exit`,e.SHARE=`share`,e.PDF_DOWNLOAD=`pdf_download`,e.COPY=`copy`,e.RESTART=`restart`,e.INSTRUCTIONS_SHOW=`show_instructions`,e.REVIEW_CART=`review_cart`,e.SHOP_NOW=`shop_now`,e.SUB_CATEGORY=`sub_category`,e.NEXT_STEP=`next_step`,e.PREVIOUS_STEP=`previous_step`,e}({}),w=function(e){return e.ZOOM=`zoom`,e.ROTATE=`rotate`,e.PAN=`pan`,e}({}),T=function(e){return e.CONFIGURATION=`configuration`,e.SCENE=`scene`,e.PRODUCT=`product`,e}({}),E=function(e){return e.FACEBOOK=`facebook`,e.TWITTER=`twitter`,e.EMAIL=`email`,e.COPY_LINK=`copy_link`,e.WHATSAPP=`whatsapp`,e.LINKEDIN=`linkedin`,e}({}),D=class extends g{constructor(e){super({eventName:`epigraph_ar_requested`,interactiveEvent:!0,customParameters:{items:e}})}},O=class extends g{constructor(e){super({eventName:`epigraph_module_loading`,interactiveEvent:!1,customParameters:{is_pre_config:e}})}},k=class extends g{constructor(e,t){super({eventName:`epigraph_module_ready`,interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t}})}},A=class extends g{static{this.MODULE_FAILED_ERRORS=y}constructor(e,t,n){super({eventName:`epigraph_module_failed`,interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t,error_type:n}})}},j=class extends g{constructor(e){super({eventName:`epigraph_module_closed`,interactiveEvent:!0,customParameters:{items:e}})}},M=class extends g{static{this.SUPPORT_TYPE=S}constructor(e){super({eventName:`epigraph_support_detected`,interactiveEvent:!1,customParameters:{support_type:e}})}},N=class extends g{static{this.BUTTON_TYPE=C}constructor(e,t){super({eventName:`epigraph_button_click`,interactiveEvent:!0,customParameters:{button_type:e,button_name:t}})}},P=class extends g{static{this.PANEL_TYPE=v}static{this.TRIGGER_SOURCE=b}constructor(e,t,n,r){super({eventName:`epigraph_panel_opened`,interactiveEvent:e,customParameters:{items:r,panel_type:t,trigger_source:n}})}},F=class extends g{static{this.PANEL_TYPE=v}static{this.TRIGGER_SOURCE=b}constructor(e,t,n,r){super({eventName:`epigraph_panel_closed`,interactiveEvent:e,customParameters:{items:r,panel_type:t,trigger_source:n}})}},I=class extends g{constructor(e){super({eventName:`epigraph_add_to_favourites`,interactiveEvent:!0,customParameters:{items:e}})}},L=class extends g{static{this.ACTION_PERFORMED=w}constructor(e){super({eventName:`epigraph_keyboard_interaction`,interactiveEvent:!0,customParameters:{action_performed:e}})}},R=class extends g{static{this.INTERACTION_TYPE=w}constructor(e){super({eventName:`epigraph_touch_interaction`,interactiveEvent:!0,customParameters:{interaction_type:e}})}},z=class extends g{static{this.CURRENCY=x}constructor(e,t,n,r,i){super({eventName:`epigraph_item_added`,interactiveEvent:e,customParameters:{items:i,value:t,currency:n,quantity:r}})}},B=class extends g{constructor(e){super({eventName:`epigraph_item_moved`,interactiveEvent:!0,customParameters:{items:e}})}},V=class extends g{static{this.CURRENCY=x}constructor(e,t,n,r){super({eventName:`epigraph_item_removed`,interactiveEvent:!0,customParameters:{items:r,value:e,currency:t,quantity:n}})}},H=class extends g{static{this.VARIANT_CHANGE_TYPES=_}constructor(e,t){super({eventName:`epigraph_variant_changed`,interactiveEvent:!0,customParameters:{items:t,change_type:e}})}},U=class extends g{static{this.CONTENT_TYPES=T}static{this.SHARE_DESTINATIONS=E}constructor(e,t,n){super({eventName:`epigraph_content_shared`,interactiveEvent:!0,customParameters:{items:n,content_type:e,share_destination:t}})}},W=class extends g{static{this.CURRENCY=x}constructor(e,t,n){super({eventName:`epigraph_checkout`,interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}},G=class extends g{static{this.CURRENCY=x}constructor(e,t,n){super({eventName:`epigraph_conversion`,interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}},K=class extends g{constructor(e){super({eventName:`epigraph_changeRate`,interactiveEvent:!1,customParameters:{value:e}})}},q=class extends g{constructor(e){super({eventName:`epigraph_completionRate`,interactiveEvent:!1,customParameters:{value:e}})}},J=class extends g{constructor(e){super({eventName:`epigraph_engagementRate`,interactiveEvent:!1,customParameters:{value:e}})}},Y=class extends g{constructor(e,t,n){super({eventName:e,interactiveEvent:t,customParameters:n})}},X=Symbol(`analyticsPluginsMap`),Z=class{constructor(e,t){this[X]=new Map,this.__consentPlugin=null,e&&t&&(this.__consentPlugin=this.buildConsentPlugin(e,t)),window.addEventListener(`epigraphAnalyticsConsentChange`,this.__onConsentChangeFromEvent)}__onConsentChangeFromEvent(e){let n=e;this.__overrideConsent=n.detail.hasConsent;for(let e of this[X].values())this.__hasConsent()||e.setStatus(t.RESTRICTED)}addEventPlugin(e){this[X].has(e.getUniquePluginIdentifier())||(this[X].set(e.getUniquePluginIdentifier(),e),e.setupPlugin())}__hasConsent(){let e=!0;return this.__overrideConsent===void 0?(this.__consentPlugin&&(e=this.__consentPlugin.hasConsent()),e):(e=this.__overrideConsent,e)}sendEvent(e){this[X].forEach(t=>{t.sendEvent(e,this.__hasConsent())})}buildConsentPlugin(e,t){return e.toLowerCase()===h.OneTrust.toLowerCase()?new m(t):null}};Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return d}});
@@ -94,6 +94,17 @@ var t = /* @__PURE__ */ function(e) {
94
94
  constructor({ trackingID: e, experienceID: n, solution: r, verboseLogging: i = !1 }) {
95
95
  this.__status = t.UNAVAILABLE, this.__sentEventCount = 0, this.__initializationAttempts = 0, this.__lastInitializationAttempt = performance.now(), this.__maxInitializationAttempts = 10, this.__initializationRetryDelay = 2e3, this.__isInitialized = !1, this.__initializationMethod = "NONE", this.__nexusFailureReported = !1, this.name = this.pluginName = "GA4-PLUGIN", this.trackingID = e, this.experienceID = n, this.solution = r, this.verboseLogging = i, this.__queue = new l(), this.__epigraphNotifier = new u(this.pluginName, this.pluginName, this.experienceID, this.solution, this.__initializationMethod, this.__status), this.initializePlugin();
96
96
  }
97
+ setTrackingID(e) {
98
+ if (!e) return;
99
+ let t = this.trackingID !== e;
100
+ this.trackingID = e, t && this.__isInitialized && (this.resetInitialization(), this.initializePlugin());
101
+ }
102
+ setExperienceID(e) {
103
+ this.experienceID = e;
104
+ }
105
+ setSolution(e) {
106
+ this.solution = e;
107
+ }
97
108
  getStatus() {
98
109
  return this.__status;
99
110
  }
@@ -130,6 +141,9 @@ var t = /* @__PURE__ */ function(e) {
130
141
  this.logger(e), await this.reportFailureToNexus("EVENT_SEND_ERROR", e?.toString() || "Unknown error");
131
142
  }
132
143
  }
144
+ resetInitialization() {
145
+ this.__isInitialized = !1, this.__status = t.UNAVAILABLE, this.dataLayer = void 0, this.dataLayerName = void 0, this.__initializationMethod = "NONE", this.__initializationAttempts = 0, this.__nexusFailureReported = !1, this.__epigraphNotifier.updateStatus(this.__status);
146
+ }
133
147
  initializePlugin() {
134
148
  if (this.__isInitialized) return;
135
149
  if (this.__initializationAttempts >= this.__maxInitializationAttempts) {
@@ -202,7 +216,7 @@ var t = /* @__PURE__ */ function(e) {
202
216
  }
203
217
  async sendGA4Event(e) {
204
218
  let t = e.getGa4Parameters(this.solution, this.experienceID, this.trackingID), n = t;
205
- this.isValidPayload(t) || (t = await this.convertGA4ParametersToEpgEventTag(t)), window.gtag("event", e.eventName, t), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, n);
219
+ this.isValidPayload(t) || (t = await this.convertGA4ParametersToEpgEventTag(t)), this.dataLayer && (this.dataLayer?.push(t), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, n));
206
220
  }
207
221
  isValidPayload(e) {
208
222
  if (Object.keys(e).length >= 25) return !1;
@@ -349,6 +363,80 @@ var t = /* @__PURE__ */ function(e) {
349
363
  return "";
350
364
  }
351
365
  }, p = class {
366
+ constructor({ productId: n, identifier: r, identifierType: i, experienceType: a, renderMode: o = "geo", sessionId: s, xPath: c, solution: d = "", verboseLogging: f = !1, baseUrl: p = e.PRODUCTION }) {
367
+ if (this.experienceID = "", this.__status = t.UNAVAILABLE, this.__sentEventCount = 0, n <= 0) throw Error("NexusSolutionsAnalyticsPlugin requires a valid productId greater than 0.");
368
+ this.sessionId = s, this.xPath = c, this.name = this.pluginName = "NEXUS-SOLUTIONS-PLUGIN", this.verboseLogging = f, this.__queue = new l(), this.productId = n, this.identifier = r, this.identifierType = i, this.experienceType = a, this.renderMode = o, this.solution = d, this.trackingID = String(n), this.url = `${p}analytics/event`, this.__status = t.AVAILABLE, this.__epigraphNotifier = new u(this.pluginName, this.trackingID, `${r}@${i}`, this.solution, "NEXUS-SOLUTIONS", this.__status), this.__epigraphNotifier.notify(u.ACTION_INITIALIZED, {});
369
+ }
370
+ setProductId(e) {
371
+ e <= 0 || (this.productId = e, this.trackingID = String(e));
372
+ }
373
+ setIdentifier(e) {
374
+ this.identifier = e;
375
+ }
376
+ setIdentifierType(e) {
377
+ this.identifierType = e;
378
+ }
379
+ setExperienceType(e) {
380
+ this.experienceType = e;
381
+ }
382
+ setRenderMode(e) {
383
+ this.renderMode = e;
384
+ }
385
+ getStatus() {
386
+ return this.__status;
387
+ }
388
+ setStatus(e) {
389
+ this.__status = e, this.__epigraphNotifier.updateStatus(e);
390
+ }
391
+ getPendingEventCount() {
392
+ return this.__queue.size;
393
+ }
394
+ getSentEventCount() {
395
+ return this.__sentEventCount;
396
+ }
397
+ getTotalEventCount() {
398
+ return this.getPendingEventCount() + this.getSentEventCount();
399
+ }
400
+ getUniquePluginIdentifier() {
401
+ return `${this.name}-${this.sessionId}`;
402
+ }
403
+ setupPlugin() {}
404
+ async sendEvent(e, n) {
405
+ if (this.__queue.enqueue(e), !n) {
406
+ this.__status = t.RESTRICTED, this.__epigraphNotifier.updateStatus(this.__status);
407
+ return;
408
+ }
409
+ await this.dequeueAndSendEvents();
410
+ }
411
+ async dequeueAndSendEvents() {
412
+ for (; this.__queue.size > 0;) {
413
+ let e = this.__queue.dequeue(), t = {
414
+ action: e.eventName,
415
+ product_id: this.productId,
416
+ identifier: this.identifier,
417
+ identifier_type: this.identifierType,
418
+ experience_type: this.experienceType,
419
+ render_mode: this.renderMode,
420
+ parameters: e.getNexusParameters()
421
+ };
422
+ try {
423
+ (await fetch(this.url, {
424
+ method: "POST",
425
+ headers: {
426
+ "Content-Type": "application/json",
427
+ Accept: "application/json",
428
+ "EPG-SESSION-ID": this.sessionId,
429
+ "EPG-XPATH": this.xPath,
430
+ Origin: typeof window < "u" ? window.location.origin : ""
431
+ },
432
+ body: JSON.stringify(t)
433
+ })).ok && (this.__sentEventCount++, this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, t));
434
+ } catch {
435
+ return;
436
+ }
437
+ }
438
+ }
439
+ }, m = class {
352
440
  constructor(e) {
353
441
  this.consentSet = !1, this.consent = !1, this.pluginName = "OneTrustConsentPlugin", this.consentIdentifier = e, this.consent = !1, this.addConsentChangedListener();
354
442
  }
@@ -369,9 +457,9 @@ var t = /* @__PURE__ */ function(e) {
369
457
  });
370
458
  });
371
459
  }
372
- }, m = /* @__PURE__ */ function(e) {
460
+ }, h = /* @__PURE__ */ function(e) {
373
461
  return e.OneTrust = "onetrust", e;
374
- }({}), h = class {
462
+ }({}), g = class {
375
463
  constructor({ eventName: e, interactiveEvent: t, customParameters: n }) {
376
464
  this.eventName = e, this.interactiveEvent = t, this.customParameters = n;
377
465
  }
@@ -379,6 +467,7 @@ var t = /* @__PURE__ */ function(e) {
379
467
  let r = {
380
468
  solution: e,
381
469
  experience_id: t,
470
+ event: this.eventName,
382
471
  interactive_event: this.interactiveEvent,
383
472
  send_to: n
384
473
  };
@@ -398,27 +487,27 @@ var t = /* @__PURE__ */ function(e) {
398
487
  let e = { interactive_event: this.interactiveEvent };
399
488
  return e = Object.assign(e, JSON.parse(JSON.stringify(this.customParameters))), e;
400
489
  }
401
- }, g = /* @__PURE__ */ function(e) {
490
+ }, _ = /* @__PURE__ */ function(e) {
402
491
  return e.VARIANT = "variant", e.CATEGORY_VARIANT = "category_variant", e.GEOMETRY = "geometry", e.CATEGORY_GEOMETRY = "category_geometry", e.GLOBAL = "global", e;
403
- }({}), _ = /* @__PURE__ */ function(e) {
404
- return e.AR = "ar", e.QR = "qr", e.INFO = "info", e.INSTRUCTIONS = "instructions", e.DOWNLOAD = "download", e.PREVIEW_CART = "preview_cart", e.HOTSPOT_PANEL = "hotspot_panel", e.SHARE_MODAL = "share_modal", e.RESTART_MODAL = "restart_modal", e.REMOVE_MODAL = "remove_modal", e.LOAD_PRECONFIG_MODAL = "load_preconfig_modal", e.MOVE_MODAL = "move_modal", e.OUT_OF_STOCK_MODAL = "out_of_stock_modal", e;
405
492
  }({}), v = /* @__PURE__ */ function(e) {
406
- return e.NETWORK = "network", e.EXPERIENCE_CONFIG_ERROR = "experience-config-error", e.SCENE_LOAD_ERROR = "scene-load-error", e.INITIAL_SCENE_LOAD_ERROR = "initial-scene-load-error", e.AUTHENTICATION_FAILED = "authentication-failed", e;
493
+ return e.AR = "ar", e.QR = "qr", e.INFO = "info", e.INSTRUCTIONS = "instructions", e.DOWNLOAD = "download", e.PREVIEW_CART = "preview_cart", e.HOTSPOT_PANEL = "hotspot_panel", e.SHARE_MODAL = "share_modal", e.RESTART_MODAL = "restart_modal", e.REMOVE_MODAL = "remove_modal", e.LOAD_PRECONFIG_MODAL = "load_preconfig_modal", e.MOVE_MODAL = "move_modal", e.OUT_OF_STOCK_MODAL = "out_of_stock_modal", e;
407
494
  }({}), y = /* @__PURE__ */ function(e) {
408
- return e.AUTO = "auto", e.BUTTON = "button", e.HOTSPOT = "hotspot", e.GESTURE = "gesture", e;
495
+ return e.NETWORK = "network", e.EXPERIENCE_CONFIG_ERROR = "experience-config-error", e.SCENE_LOAD_ERROR = "scene-load-error", e.INITIAL_SCENE_LOAD_ERROR = "initial-scene-load-error", e.AUTHENTICATION_FAILED = "authentication-failed", e;
409
496
  }({}), b = /* @__PURE__ */ function(e) {
410
- return e.USD = "USD", e.EUR = "EUR", e.GBP = "GBP", e.CAD = "CAD", e;
497
+ return e.AUTO = "auto", e.BUTTON = "button", e.HOTSPOT = "hotspot", e.GESTURE = "gesture", e;
411
498
  }({}), x = /* @__PURE__ */ function(e) {
412
- return e.AR = "ar", e.QR = "qr", e.AR_WEBGL2 = "ar-webgl2", e.QR_WEBGL2 = "qr-webgl2", e;
499
+ return e.USD = "USD", e.EUR = "EUR", e.GBP = "GBP", e.CAD = "CAD", e;
413
500
  }({}), S = /* @__PURE__ */ function(e) {
414
- return e.AR_VIEW = "ar_view", e.DIMENSION_TOGGLE = "dimension_toggle", e.HOTSPOTS_TOGGLE = "hotspots_toggle", e.HELP_TOGGLE = "help_toggle", e.UTILITY_MENU_TOGGLE = "utility_menu_toggle", e.HOTSPOT_ENTER = "hotspot_enter", e.HOTSPOT_EXIT = "hotspot_exit", e.SHARE = "share", e.PDF_DOWNLOAD = "pdf_download", e.COPY = "copy", e.RESTART = "restart", e.INSTRUCTIONS_SHOW = "show_instructions", e.REVIEW_CART = "review_cart", e.SHOP_NOW = "shop_now", e.SUB_CATEGORY = "sub_category", e.NEXT_STEP = "next_step", e.PREVIOUS_STEP = "previous_step", e;
501
+ return e.AR = "ar", e.QR = "qr", e.AR_WEBGL2 = "ar-webgl2", e.QR_WEBGL2 = "qr-webgl2", e;
415
502
  }({}), C = /* @__PURE__ */ function(e) {
416
- return e.ZOOM = "zoom", e.ROTATE = "rotate", e.PAN = "pan", e;
503
+ return e.AR_VIEW = "ar_view", e.DIMENSION_TOGGLE = "dimension_toggle", e.HOTSPOTS_TOGGLE = "hotspots_toggle", e.HELP_TOGGLE = "help_toggle", e.UTILITY_MENU_TOGGLE = "utility_menu_toggle", e.HOTSPOT_ENTER = "hotspot_enter", e.HOTSPOT_EXIT = "hotspot_exit", e.SHARE = "share", e.PDF_DOWNLOAD = "pdf_download", e.COPY = "copy", e.RESTART = "restart", e.INSTRUCTIONS_SHOW = "show_instructions", e.REVIEW_CART = "review_cart", e.SHOP_NOW = "shop_now", e.SUB_CATEGORY = "sub_category", e.NEXT_STEP = "next_step", e.PREVIOUS_STEP = "previous_step", e;
417
504
  }({}), w = /* @__PURE__ */ function(e) {
418
- return e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e;
505
+ return e.ZOOM = "zoom", e.ROTATE = "rotate", e.PAN = "pan", e;
419
506
  }({}), T = /* @__PURE__ */ function(e) {
507
+ return e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e;
508
+ }({}), E = /* @__PURE__ */ function(e) {
420
509
  return e.FACEBOOK = "facebook", e.TWITTER = "twitter", e.EMAIL = "email", e.COPY_LINK = "copy_link", e.WHATSAPP = "whatsapp", e.LINKEDIN = "linkedin", e;
421
- }({}), E = class extends h {
510
+ }({}), D = class extends g {
422
511
  constructor(e) {
423
512
  super({
424
513
  eventName: "epigraph_ar_requested",
@@ -426,7 +515,7 @@ var t = /* @__PURE__ */ function(e) {
426
515
  customParameters: { items: e }
427
516
  });
428
517
  }
429
- }, D = class extends h {
518
+ }, O = class extends g {
430
519
  constructor(e) {
431
520
  super({
432
521
  eventName: "epigraph_module_loading",
@@ -434,7 +523,7 @@ var t = /* @__PURE__ */ function(e) {
434
523
  customParameters: { is_pre_config: e }
435
524
  });
436
525
  }
437
- }, O = class extends h {
526
+ }, k = class extends g {
438
527
  constructor(e, t) {
439
528
  super({
440
529
  eventName: "epigraph_module_ready",
@@ -445,9 +534,9 @@ var t = /* @__PURE__ */ function(e) {
445
534
  }
446
535
  });
447
536
  }
448
- }, k = class extends h {
537
+ }, A = class extends g {
449
538
  static {
450
- this.MODULE_FAILED_ERRORS = v;
539
+ this.MODULE_FAILED_ERRORS = y;
451
540
  }
452
541
  constructor(e, t, n) {
453
542
  super({
@@ -460,7 +549,7 @@ var t = /* @__PURE__ */ function(e) {
460
549
  }
461
550
  });
462
551
  }
463
- }, A = class extends h {
552
+ }, j = class extends g {
464
553
  constructor(e) {
465
554
  super({
466
555
  eventName: "epigraph_module_closed",
@@ -468,9 +557,9 @@ var t = /* @__PURE__ */ function(e) {
468
557
  customParameters: { items: e }
469
558
  });
470
559
  }
471
- }, j = class extends h {
560
+ }, M = class extends g {
472
561
  static {
473
- this.SUPPORT_TYPE = x;
562
+ this.SUPPORT_TYPE = S;
474
563
  }
475
564
  constructor(e) {
476
565
  super({
@@ -479,9 +568,9 @@ var t = /* @__PURE__ */ function(e) {
479
568
  customParameters: { support_type: e }
480
569
  });
481
570
  }
482
- }, M = class extends h {
571
+ }, N = class extends g {
483
572
  static {
484
- this.BUTTON_TYPE = S;
573
+ this.BUTTON_TYPE = C;
485
574
  }
486
575
  constructor(e, t) {
487
576
  super({
@@ -493,12 +582,12 @@ var t = /* @__PURE__ */ function(e) {
493
582
  }
494
583
  });
495
584
  }
496
- }, N = class extends h {
585
+ }, P = class extends g {
497
586
  static {
498
- this.PANEL_TYPE = _;
587
+ this.PANEL_TYPE = v;
499
588
  }
500
589
  static {
501
- this.TRIGGER_SOURCE = y;
590
+ this.TRIGGER_SOURCE = b;
502
591
  }
503
592
  constructor(e, t, n, r) {
504
593
  super({
@@ -511,12 +600,12 @@ var t = /* @__PURE__ */ function(e) {
511
600
  }
512
601
  });
513
602
  }
514
- }, P = class extends h {
603
+ }, F = class extends g {
515
604
  static {
516
- this.PANEL_TYPE = _;
605
+ this.PANEL_TYPE = v;
517
606
  }
518
607
  static {
519
- this.TRIGGER_SOURCE = y;
608
+ this.TRIGGER_SOURCE = b;
520
609
  }
521
610
  constructor(e, t, n, r) {
522
611
  super({
@@ -529,7 +618,7 @@ var t = /* @__PURE__ */ function(e) {
529
618
  }
530
619
  });
531
620
  }
532
- }, F = class extends h {
621
+ }, I = class extends g {
533
622
  constructor(e) {
534
623
  super({
535
624
  eventName: "epigraph_add_to_favourites",
@@ -537,9 +626,9 @@ var t = /* @__PURE__ */ function(e) {
537
626
  customParameters: { items: e }
538
627
  });
539
628
  }
540
- }, I = class extends h {
629
+ }, L = class extends g {
541
630
  static {
542
- this.ACTION_PERFORMED = C;
631
+ this.ACTION_PERFORMED = w;
543
632
  }
544
633
  constructor(e) {
545
634
  super({
@@ -548,9 +637,9 @@ var t = /* @__PURE__ */ function(e) {
548
637
  customParameters: { action_performed: e }
549
638
  });
550
639
  }
551
- }, L = class extends h {
640
+ }, R = class extends g {
552
641
  static {
553
- this.INTERACTION_TYPE = C;
642
+ this.INTERACTION_TYPE = w;
554
643
  }
555
644
  constructor(e) {
556
645
  super({
@@ -559,9 +648,9 @@ var t = /* @__PURE__ */ function(e) {
559
648
  customParameters: { interaction_type: e }
560
649
  });
561
650
  }
562
- }, R = class extends h {
651
+ }, z = class extends g {
563
652
  static {
564
- this.CURRENCY = b;
653
+ this.CURRENCY = x;
565
654
  }
566
655
  constructor(e, t, n, r, i) {
567
656
  super({
@@ -575,7 +664,7 @@ var t = /* @__PURE__ */ function(e) {
575
664
  }
576
665
  });
577
666
  }
578
- }, z = class extends h {
667
+ }, B = class extends g {
579
668
  constructor(e) {
580
669
  super({
581
670
  eventName: "epigraph_item_moved",
@@ -583,9 +672,9 @@ var t = /* @__PURE__ */ function(e) {
583
672
  customParameters: { items: e }
584
673
  });
585
674
  }
586
- }, B = class extends h {
675
+ }, V = class extends g {
587
676
  static {
588
- this.CURRENCY = b;
677
+ this.CURRENCY = x;
589
678
  }
590
679
  constructor(e, t, n, r) {
591
680
  super({
@@ -599,9 +688,9 @@ var t = /* @__PURE__ */ function(e) {
599
688
  }
600
689
  });
601
690
  }
602
- }, V = class extends h {
691
+ }, H = class extends g {
603
692
  static {
604
- this.VARIANT_CHANGE_TYPES = g;
693
+ this.VARIANT_CHANGE_TYPES = _;
605
694
  }
606
695
  constructor(e, t) {
607
696
  super({
@@ -613,12 +702,12 @@ var t = /* @__PURE__ */ function(e) {
613
702
  }
614
703
  });
615
704
  }
616
- }, H = class extends h {
705
+ }, U = class extends g {
617
706
  static {
618
- this.CONTENT_TYPES = w;
707
+ this.CONTENT_TYPES = T;
619
708
  }
620
709
  static {
621
- this.SHARE_DESTINATIONS = T;
710
+ this.SHARE_DESTINATIONS = E;
622
711
  }
623
712
  constructor(e, t, n) {
624
713
  super({
@@ -631,9 +720,9 @@ var t = /* @__PURE__ */ function(e) {
631
720
  }
632
721
  });
633
722
  }
634
- }, U = class extends h {
723
+ }, W = class extends g {
635
724
  static {
636
- this.CURRENCY = b;
725
+ this.CURRENCY = x;
637
726
  }
638
727
  constructor(e, t, n) {
639
728
  super({
@@ -646,9 +735,9 @@ var t = /* @__PURE__ */ function(e) {
646
735
  }
647
736
  });
648
737
  }
649
- }, W = class extends h {
738
+ }, G = class extends g {
650
739
  static {
651
- this.CURRENCY = b;
740
+ this.CURRENCY = x;
652
741
  }
653
742
  constructor(e, t, n) {
654
743
  super({
@@ -661,7 +750,7 @@ var t = /* @__PURE__ */ function(e) {
661
750
  }
662
751
  });
663
752
  }
664
- }, G = class extends h {
753
+ }, K = class extends g {
665
754
  constructor(e) {
666
755
  super({
667
756
  eventName: "epigraph_changeRate",
@@ -669,7 +758,7 @@ var t = /* @__PURE__ */ function(e) {
669
758
  customParameters: { value: e }
670
759
  });
671
760
  }
672
- }, K = class extends h {
761
+ }, q = class extends g {
673
762
  constructor(e) {
674
763
  super({
675
764
  eventName: "epigraph_completionRate",
@@ -677,7 +766,7 @@ var t = /* @__PURE__ */ function(e) {
677
766
  customParameters: { value: e }
678
767
  });
679
768
  }
680
- }, q = class extends h {
769
+ }, J = class extends g {
681
770
  constructor(e) {
682
771
  super({
683
772
  eventName: "epigraph_engagementRate",
@@ -685,7 +774,7 @@ var t = /* @__PURE__ */ function(e) {
685
774
  customParameters: { value: e }
686
775
  });
687
776
  }
688
- }, J = class extends h {
777
+ }, Y = class extends g {
689
778
  constructor(e, t, n) {
690
779
  super({
691
780
  eventName: e,
@@ -693,30 +782,30 @@ var t = /* @__PURE__ */ function(e) {
693
782
  customParameters: n
694
783
  });
695
784
  }
696
- }, Y = Symbol("analyticsPluginsMap"), X = class {
785
+ }, X = Symbol("analyticsPluginsMap"), Z = class {
697
786
  constructor(e, t) {
698
- this[Y] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, e && t && (this.__consentPlugin = this.buildConsentPlugin(e, t)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
787
+ this[X] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, e && t && (this.__consentPlugin = this.buildConsentPlugin(e, t)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
699
788
  }
700
789
  __onConsentChangeFromEvent(e) {
701
790
  let n = e;
702
791
  this.__overrideConsent = n.detail.hasConsent;
703
- for (let e of this[Y].values()) this.__hasConsent() || e.setStatus(t.RESTRICTED);
792
+ for (let e of this[X].values()) this.__hasConsent() || e.setStatus(t.RESTRICTED);
704
793
  }
705
794
  addEventPlugin(e) {
706
- this[Y].has(e.getUniquePluginIdentifier()) || (this[Y].set(e.getUniquePluginIdentifier(), e), e.setupPlugin());
795
+ this[X].has(e.getUniquePluginIdentifier()) || (this[X].set(e.getUniquePluginIdentifier(), e), e.setupPlugin());
707
796
  }
708
797
  __hasConsent() {
709
798
  let e = !0;
710
799
  return this.__overrideConsent === void 0 ? (this.__consentPlugin && (e = this.__consentPlugin.hasConsent()), e) : (e = this.__overrideConsent, e);
711
800
  }
712
801
  sendEvent(e) {
713
- this[Y].forEach((t) => {
802
+ this[X].forEach((t) => {
714
803
  t.sendEvent(e, this.__hasConsent());
715
804
  });
716
805
  }
717
806
  buildConsentPlugin(e, t) {
718
- return e.toLowerCase() === m.OneTrust.toLowerCase() ? new p(t) : null;
807
+ return e.toLowerCase() === h.OneTrust.toLowerCase() ? new m(t) : null;
719
808
  }
720
809
  };
721
810
  //#endregion
722
- export { _ as A, O as C, L as D, j as E, m as F, p as I, f as L, x as M, y as N, V as O, g as P, d as R, D as S, N as T, z as _, b as a, A as b, M as c, K as d, H as f, R as g, q as h, w as i, T as j, v as k, G as l, J as m, C as n, F as o, W as p, S as r, E as s, X as t, U as u, B as v, P as w, k as x, I as y };
811
+ export { v as A, k as C, R as D, M as E, h as F, m as I, p as L, S as M, b as N, H as O, _ as P, f as R, O as S, P as T, B as _, x as a, j as b, N as c, q as d, U as f, z as g, J as h, T as i, E as j, y as k, K as l, Y as m, w as n, I as o, G as p, C as r, D as s, Z as t, W as u, V as v, F as w, A as x, L as y, d as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epigraph/epigraph-std-lib",
3
- "version": "5.0.0-alpha.13",
3
+ "version": "5.0.0-alpha.15",
4
4
  "type": "module",
5
5
  "main": "./dist/epigraph-std-lib.cjs",
6
6
  "module": "./dist/epigraph-std-lib.js",
@@ -34,7 +34,7 @@
34
34
  "happy-dom": "^20.10.4",
35
35
  "typescript": "^5.8.2",
36
36
  "vite": "^8.0.16",
37
- "vite-plugin-dts": "^4.5.0",
37
+ "vite-plugin-dts": "^5.0.3",
38
38
  "vitest": "^4.1.9"
39
39
  }
40
40
  }
@@ -1 +0,0 @@
1
- const e=require("./enums-PfFMiIoe.cjs");var t=function(e){return e.UNAVAILABLE=`unavailable`,e.AVAILABLE=`available`,e.RESTRICTED=`restricted`,e}({}),n=Symbol(`data`),r=Symbol(`next`),i=class e{constructor(e){this[n]=e,this[r]=null}get data(){return this[n]}set next(t){if(!(t instanceof e)&&t!==null)throw Error(`This node is not an instance of the custom class 'Node'.`);this[r]=t}get next(){return this[r]}},a=Symbol(`head`),o=class{constructor(){this[a]=null}set head(e){this[a]=e}get head(){return this[a]}addToTail(e){let t=this.head;if(t){for(;t.next!==null;)t=t?.next;return t.next=new i(e)}return this.head=new i(e)}removeHead(){let e=this.head;if(e)return this.head=e.next,e.data}},s=Symbol(`queue`),c=Symbol(`size`),l=class{constructor(){this[s]=new o,this[c]=0}get queue(){return this[s]}get size(){return this[c]}enqueue(e){this.queue.addToTail(e),this[c]++}dequeue(){let e=this.queue.removeHead();return this[c]--,e}},u=class{static{this.NOTIFICATION_NAME=`epg-notification`}static{this.ACTION_SEND_EVENT=`send-event`}static{this.ACTION_INITIALIZED=`initialized`}static{this.ACTION_FAILED_INITIALIZATION=`initialization-failed`}constructor(e,t,n,r,i,a){this._pluginName=e,this._trackingId=t,this._experienceId=n,this._solution=r,this._initializer=i,this._status=a}updateStatus(e){this._status=e}updateInitializer(e){this._initializer=e}notify(e,t){let n={pluginName:this._pluginName,trackingId:this._trackingId,experienceId:this._experienceId,solution:this._solution,initializer:this._initializer,status:this._status,action:e,eventDetails:t};window.dispatchEvent(new CustomEvent(`epg-notification`,{detail:n}))}},d=class{constructor({trackingID:e,experienceID:n,solution:r,verboseLogging:i=!1}){this.__status=t.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=performance.now(),this.__maxInitializationAttempts=10,this.__initializationRetryDelay=2e3,this.__isInitialized=!1,this.__initializationMethod=`NONE`,this.__nexusFailureReported=!1,this.name=this.pluginName=`GA4-PLUGIN`,this.trackingID=e,this.experienceID=n,this.solution=r,this.verboseLogging=i,this.__queue=new l,this.__epigraphNotifier=new u(this.pluginName,this.pluginName,this.experienceID,this.solution,this.__initializationMethod,this.__status),this.initializePlugin()}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return`${this.name}-${this.trackingID}`}setupPlugin(){this.__isInitialized&&this.dataLayer!==void 0&&this.dequeueAndSendEvents()}async sendEvent(e,n){if(this.__queue.enqueue(e),!n){this.__status=t.RESTRICTED;return}if(!this.__isInitialized){this.logger(`Cannot send analytics event: dataLayer not defined or plugin not initialized.`);return}try{await this.dequeueAndSendEvents()}catch(e){this.logger(e),await this.reportFailureToNexus(`EVENT_SEND_ERROR`,e?.toString()||`Unknown error`)}}initializePlugin(){if(this.__isInitialized)return;if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(this.reportFailureToNexus(`MAX_INITIALIZATION_ATTEMPTS`,`Maximum initialization attempts reached`),this.__nexusFailureReported=!0,this.__epigraphNotifier.notify(u.ACTION_FAILED_INITIALIZATION,{}));return}let e=performance.now();if(this.__initializationAttempts>0&&e-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=e,this.__initializationAttempts++;let n=this.detectAndSetupAnalytics();n.success?(this.__isInitialized=!0,this.__status=t.AVAILABLE,this.__initializationMethod=n.method,this.dataLayerName=n.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${n.method} with dataLayer: ${this.dataLayerName}`),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{}),this.__queue.size>0&&this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${n.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>{this.initializePlugin()},this.__initializationRetryDelay))}detectAndSetupAnalytics(){let e=this.detectGTM();if(e)return this.logger(`GTM detected with container ID: ${e.containerId}`),this.__epigraphNotifier.updateInitializer(`GTM`),{success:!0,method:`GTM`,dataLayerName:e.dataLayerName};let t=this.findGA4Info(this.trackingID);if(t){let e=t.l||`dataLayer`;return this.logger(`GA4 script found, setting up with dataLayer: ${e}`),this.__epigraphNotifier.updateInitializer(`GA4`),{success:!0,method:`GA4`,dataLayerName:e}}return{success:!1,method:`NONE`,dataLayerName:`dataLayer`,error:`No analytics setup found and unable to create one`}}detectGTM(){let e=document.querySelectorAll(`script[src*="googletagmanager.com/gtm"]`);for(let t of Array.from(e)){let e=t.getAttribute(`src`);if(e){let t=e.match(/gtm\.js\?id=([^&]+)/);if(t&&t.length>0){let n=e.match(/&l=([^&]+)/),r=n?n[1]:`dataLayer`;return{containerId:t[1],dataLayerName:r}}}}return null}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let e=this.__queue.size;for(let t=0;t<e;t++){let e=this.__queue.dequeue();try{this.__initializationMethod===`GTM`?(this.sendGTMEvent(e),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${e.eventName}`)):this.__initializationMethod===`GA4`?(this.sendGA4Event(e),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${e.eventName}`)):this.__queue.enqueue(e)}catch(t){this.logger(`Error sending event ${e.eventName}: ${t}`),this.__queue.enqueue(e)}}}async sendGTMEvent(e){let t=e.getGTMParameters(this.solution,this.experienceID,this.trackingID),n=t;this.isValidPayload(t)||(t=await this.convertGTMParametersToEpgEventTag(e.eventName,t)),this.dataLayer&&(this.dataLayer.push(t),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n))}async sendGA4Event(e){let t=e.getGa4Parameters(this.solution,this.experienceID,this.trackingID),n=t;this.isValidPayload(t)||(t=await this.convertGA4ParametersToEpgEventTag(t)),window.gtag(`event`,e.eventName,t),this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,n)}isValidPayload(e){if(Object.keys(e).length>=25)return!1;for(let[t,n]of Object.entries(e))if(t!==`items`&&(t.length>40||String(n).length>100))return!1;return!0}async convertGTMParametersToEpgEventTag(e,t){try{return{event:e,epg_event_tag:await this.sendGA4LongParameters(t),send_to:this.trackingID}}catch{return t}}async convertGA4ParametersToEpgEventTag(e){try{return{epg_event_tag:await this.sendGA4LongParameters(e),send_to:this.trackingID}}catch{return e}}logger(e){this.verboseLogging&&console.warn(e)}async sendGA4LongParameters(e){let t={parameters:e};try{let e=await fetch(`https://api.myepigraph.com/api/analytics/ga4/custom`,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`},body:JSON.stringify(t)});return e.ok?(await e.json())?.id??``:``}catch{return``}}async reportFailureToNexus(e,t){try{let n={plugin:`GA4`,trackingId:this.trackingID,solution:this.solution,experienceId:this.experienceID,failureType:e,errorMessage:t,timestamp:new Date().toISOString(),url:window.location.href,userAgent:navigator.userAgent};this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`)}catch(e){this.logger(`Error reporting failure to Nexus: ${e}`)}}findGA4Info(e){if(window.google_tag_manager&&window.google_tag_manager[e]){let t=window.google_tag_manager[e];if(t&&t.dataLayerName)return{fullSrc:``,id:e,l:t.dataLayerName}}let t=document.querySelectorAll(`script[src]`);for(let n of t){let t=n.getAttribute(`src`);if(t&&t.includes(e)){let e=new URL(t,location.href),n=Object.fromEntries(e.searchParams.entries());return{fullSrc:e.href,id:n.id||void 0,l:n.l||void 0}}}return null}},f=class{constructor({trackingID:n,experienceID:r,solution:i,sessionId:a,xPath:o,verboseLogging:s=!1,baseUrl:c=e.n.PRODUCTION}){this.__status=t.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=a,this.xPath=o,this.name=this.pluginName=`NEXUS-PLUGIN`,this.trackingID=n,this.experienceID=r,this.solution=i,this.verboseLogging=s,this.__queue=new l,this.url=`${c}analytics/event`,this.__status=t.AVAILABLE,this.__epigraphNotifier=new u(this.pluginName,this.trackingID,this.experienceID,this.solution,`NEXUS`,this.__status),this.__epigraphNotifier.notify(u.ACTION_INITIALIZED,{})}getStatus(){return this.__status}setStatus(e){this.__status=e,this.__epigraphNotifier.updateStatus(e)}getPendingEventCount(){return this.__queue.size}getSentEventCount(){return this.__sentEventCount}getTotalEventCount(){return this.getPendingEventCount()+this.getSentEventCount()}getUniquePluginIdentifier(){return this.name+`-`+this.trackingID}setupPlugin(){}async sendEvent(e,n){if(this.__queue.enqueue(e),!n){this.__status=t.RESTRICTED,this.__epigraphNotifier.updateStatus(this.__status);return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let e=0;e<this.__queue.size;e++){let e=this.__queue.dequeue(),t={send_to:this.trackingID,experience_id:this.experienceID,solution:this.solution,event:e.eventName,parameters:e.getNexusParameters()};try{return(await fetch(this.url,{method:`POST`,headers:{"Content-Type":`application/json`,Accept:`application/json`,"EPG-SESSION-ID":this.sessionId,"EPG-XPATH":this.xPath,Origin:typeof window<`u`?window.location.origin:``},body:JSON.stringify(t)})).ok&&this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT,t),``}catch{return``}this.__sentEventCount++}return``}},p=class{constructor(e){this.consentSet=!1,this.consent=!1,this.pluginName=`OneTrustConsentPlugin`,this.consentIdentifier=e,this.consent=!1,this.addConsentChangedListener()}hasConsent(){if(this.consentSet)return this.consent;if(window.OnetrustActiveGroups!==void 0){let e=window.OnetrustActiveGroups;e!==void 0&&e.split(`,`).forEach(e=>{e===this.consentIdentifier&&(this.consent=!0,this.consentSet=!0)})}return this.consent}addConsentChangedListener(){window.addEventListener(`load`,()=>{this.hasConsent(),window.OneTrust!==void 0&&typeof window.OneTrust==`object`&&window.OneTrust.OnConsentChanged(()=>{this.consentSet=!1,this.hasConsent()})})}},m=function(e){return e.OneTrust=`onetrust`,e}({}),h=class{constructor({eventName:e,interactiveEvent:t,customParameters:n}){this.eventName=e,this.interactiveEvent=t,this.customParameters=n}getGa4Parameters(e,t,n){let r={solution:e,experience_id:t,interactive_event:this.interactiveEvent,send_to:n};return r=Object.assign(r,JSON.parse(JSON.stringify(this.customParameters))),r}getGTMParameters(e,t,n){let r={solution:e,experience_id:t,event:this.eventName,interactive_event:this.interactiveEvent,send_to:n};return r=Object.assign(r,JSON.parse(JSON.stringify(this.customParameters))),r}getNexusParameters(){let e={interactive_event:this.interactiveEvent};return e=Object.assign(e,JSON.parse(JSON.stringify(this.customParameters))),e}},g=function(e){return e.VARIANT=`variant`,e.CATEGORY_VARIANT=`category_variant`,e.GEOMETRY=`geometry`,e.CATEGORY_GEOMETRY=`category_geometry`,e.GLOBAL=`global`,e}({}),_=function(e){return e.AR=`ar`,e.QR=`qr`,e.INFO=`info`,e.INSTRUCTIONS=`instructions`,e.DOWNLOAD=`download`,e.PREVIEW_CART=`preview_cart`,e.HOTSPOT_PANEL=`hotspot_panel`,e.SHARE_MODAL=`share_modal`,e.RESTART_MODAL=`restart_modal`,e.REMOVE_MODAL=`remove_modal`,e.LOAD_PRECONFIG_MODAL=`load_preconfig_modal`,e.MOVE_MODAL=`move_modal`,e.OUT_OF_STOCK_MODAL=`out_of_stock_modal`,e}({}),v=function(e){return e.NETWORK=`network`,e.EXPERIENCE_CONFIG_ERROR=`experience-config-error`,e.SCENE_LOAD_ERROR=`scene-load-error`,e.INITIAL_SCENE_LOAD_ERROR=`initial-scene-load-error`,e.AUTHENTICATION_FAILED=`authentication-failed`,e}({}),y=function(e){return e.AUTO=`auto`,e.BUTTON=`button`,e.HOTSPOT=`hotspot`,e.GESTURE=`gesture`,e}({}),b=function(e){return e.USD=`USD`,e.EUR=`EUR`,e.GBP=`GBP`,e.CAD=`CAD`,e}({}),x=function(e){return e.AR=`ar`,e.QR=`qr`,e.AR_WEBGL2=`ar-webgl2`,e.QR_WEBGL2=`qr-webgl2`,e}({}),S=function(e){return e.AR_VIEW=`ar_view`,e.DIMENSION_TOGGLE=`dimension_toggle`,e.HOTSPOTS_TOGGLE=`hotspots_toggle`,e.HELP_TOGGLE=`help_toggle`,e.UTILITY_MENU_TOGGLE=`utility_menu_toggle`,e.HOTSPOT_ENTER=`hotspot_enter`,e.HOTSPOT_EXIT=`hotspot_exit`,e.SHARE=`share`,e.PDF_DOWNLOAD=`pdf_download`,e.COPY=`copy`,e.RESTART=`restart`,e.INSTRUCTIONS_SHOW=`show_instructions`,e.REVIEW_CART=`review_cart`,e.SHOP_NOW=`shop_now`,e.SUB_CATEGORY=`sub_category`,e.NEXT_STEP=`next_step`,e.PREVIOUS_STEP=`previous_step`,e}({}),C=function(e){return e.ZOOM=`zoom`,e.ROTATE=`rotate`,e.PAN=`pan`,e}({}),w=function(e){return e.CONFIGURATION=`configuration`,e.SCENE=`scene`,e.PRODUCT=`product`,e}({}),T=function(e){return e.FACEBOOK=`facebook`,e.TWITTER=`twitter`,e.EMAIL=`email`,e.COPY_LINK=`copy_link`,e.WHATSAPP=`whatsapp`,e.LINKEDIN=`linkedin`,e}({}),E=class extends h{constructor(e){super({eventName:`epigraph_ar_requested`,interactiveEvent:!0,customParameters:{items:e}})}},D=class extends h{constructor(e){super({eventName:`epigraph_module_loading`,interactiveEvent:!1,customParameters:{is_pre_config:e}})}},O=class extends h{constructor(e,t){super({eventName:`epigraph_module_ready`,interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t}})}},k=class extends h{static{this.MODULE_FAILED_ERRORS=v}constructor(e,t,n){super({eventName:`epigraph_module_failed`,interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t,error_type:n}})}},A=class extends h{constructor(e){super({eventName:`epigraph_module_closed`,interactiveEvent:!0,customParameters:{items:e}})}},j=class extends h{static{this.SUPPORT_TYPE=x}constructor(e){super({eventName:`epigraph_support_detected`,interactiveEvent:!1,customParameters:{support_type:e}})}},M=class extends h{static{this.BUTTON_TYPE=S}constructor(e,t){super({eventName:`epigraph_button_click`,interactiveEvent:!0,customParameters:{button_type:e,button_name:t}})}},N=class extends h{static{this.PANEL_TYPE=_}static{this.TRIGGER_SOURCE=y}constructor(e,t,n,r){super({eventName:`epigraph_panel_opened`,interactiveEvent:e,customParameters:{items:r,panel_type:t,trigger_source:n}})}},P=class extends h{static{this.PANEL_TYPE=_}static{this.TRIGGER_SOURCE=y}constructor(e,t,n,r){super({eventName:`epigraph_panel_closed`,interactiveEvent:e,customParameters:{items:r,panel_type:t,trigger_source:n}})}},F=class extends h{constructor(e){super({eventName:`epigraph_add_to_favourites`,interactiveEvent:!0,customParameters:{items:e}})}},I=class extends h{static{this.ACTION_PERFORMED=C}constructor(e){super({eventName:`epigraph_keyboard_interaction`,interactiveEvent:!0,customParameters:{action_performed:e}})}},L=class extends h{static{this.INTERACTION_TYPE=C}constructor(e){super({eventName:`epigraph_touch_interaction`,interactiveEvent:!0,customParameters:{interaction_type:e}})}},R=class extends h{static{this.CURRENCY=b}constructor(e,t,n,r,i){super({eventName:`epigraph_item_added`,interactiveEvent:e,customParameters:{items:i,value:t,currency:n,quantity:r}})}},z=class extends h{constructor(e){super({eventName:`epigraph_item_moved`,interactiveEvent:!0,customParameters:{items:e}})}},B=class extends h{static{this.CURRENCY=b}constructor(e,t,n,r){super({eventName:`epigraph_item_removed`,interactiveEvent:!0,customParameters:{items:r,value:e,currency:t,quantity:n}})}},V=class extends h{static{this.VARIANT_CHANGE_TYPES=g}constructor(e,t){super({eventName:`epigraph_variant_changed`,interactiveEvent:!0,customParameters:{items:t,change_type:e}})}},H=class extends h{static{this.CONTENT_TYPES=w}static{this.SHARE_DESTINATIONS=T}constructor(e,t,n){super({eventName:`epigraph_content_shared`,interactiveEvent:!0,customParameters:{items:n,content_type:e,share_destination:t}})}},U=class extends h{static{this.CURRENCY=b}constructor(e,t,n){super({eventName:`epigraph_checkout`,interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}},W=class extends h{static{this.CURRENCY=b}constructor(e,t,n){super({eventName:`epigraph_conversion`,interactiveEvent:!0,customParameters:{items:n,value:e,currency:t}})}},G=class extends h{constructor(e){super({eventName:`epigraph_changeRate`,interactiveEvent:!1,customParameters:{value:e}})}},K=class extends h{constructor(e){super({eventName:`epigraph_completionRate`,interactiveEvent:!1,customParameters:{value:e}})}},q=class extends h{constructor(e){super({eventName:`epigraph_engagementRate`,interactiveEvent:!1,customParameters:{value:e}})}},J=class extends h{constructor(e,t,n){super({eventName:e,interactiveEvent:t,customParameters:n})}},Y=Symbol(`analyticsPluginsMap`),X=class{constructor(e,t){this[Y]=new Map,this.__consentPlugin=null,e&&t&&(this.__consentPlugin=this.buildConsentPlugin(e,t)),window.addEventListener(`epigraphAnalyticsConsentChange`,this.__onConsentChangeFromEvent)}__onConsentChangeFromEvent(e){let n=e;this.__overrideConsent=n.detail.hasConsent;for(let e of this[Y].values())this.__hasConsent()||e.setStatus(t.RESTRICTED)}addEventPlugin(e){this[Y].has(e.getUniquePluginIdentifier())||(this[Y].set(e.getUniquePluginIdentifier(),e),e.setupPlugin())}__hasConsent(){let e=!0;return this.__overrideConsent===void 0?(this.__consentPlugin&&(e=this.__consentPlugin.hasConsent()),e):(e=this.__overrideConsent,e)}sendEvent(e){this[Y].forEach(t=>{t.sendEvent(e,this.__hasConsent())})}buildConsentPlugin(e,t){return e.toLowerCase()===m.OneTrust.toLowerCase()?new p(t):null}};Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return I}});