@epigraph/epigraph-std-lib 5.0.0-alpha → 5.0.0-alpha.10

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,13 +1,13 @@
1
1
  var c = /* @__PURE__ */ ((e) => (e.UNAVAILABLE = "unavailable", e.AVAILABLE = "available", e.RESTRICTED = "restricted", e))(c || {});
2
- const m = Symbol("data"), p = Symbol("next"), D = class I {
2
+ const E = Symbol("data"), p = Symbol("next"), R = class N {
3
3
  constructor(t) {
4
- this[m] = t, this[p] = null;
4
+ this[E] = t, this[p] = null;
5
5
  }
6
6
  get data() {
7
- return this[m];
7
+ return this[E];
8
8
  }
9
9
  set next(t) {
10
- if (!(t instanceof I) && t !== null)
10
+ if (!(t instanceof N) && t !== null)
11
11
  throw new Error(
12
12
  "This node is not an instance of the custom class 'Node'."
13
13
  );
@@ -17,9 +17,9 @@ const m = Symbol("data"), p = Symbol("next"), D = class I {
17
17
  return this[p];
18
18
  }
19
19
  };
20
- let E = D;
20
+ let f = R;
21
21
  const _ = Symbol("head");
22
- class T {
22
+ class z {
23
23
  constructor() {
24
24
  this[_] = null;
25
25
  }
@@ -34,9 +34,9 @@ class T {
34
34
  if (i) {
35
35
  for (; i.next !== null; )
36
36
  i = i?.next;
37
- return i.next = new E(t);
37
+ return i.next = new f(t);
38
38
  }
39
- return this.head = new E(t);
39
+ return this.head = new f(t);
40
40
  }
41
41
  removeHead() {
42
42
  const t = this.head;
@@ -44,13 +44,13 @@ class T {
44
44
  return this.head = t.next, t.data;
45
45
  }
46
46
  }
47
- const f = Symbol("queue"), d = Symbol("size");
47
+ const I = Symbol("queue"), d = Symbol("size");
48
48
  class y {
49
49
  constructor() {
50
- this[f] = new T(), this[d] = 0;
50
+ this[I] = new z(), this[d] = 0;
51
51
  }
52
52
  get queue() {
53
- return this[f];
53
+ return this[I];
54
54
  }
55
55
  get size() {
56
56
  return this[d];
@@ -76,8 +76,8 @@ class u {
76
76
  static {
77
77
  this.ACTION_FAILED_INITIALIZATION = "initialization-failed";
78
78
  }
79
- constructor(t, i, s, n, r, o) {
80
- this._pluginName = t, this._trackingId = i, this._experienceId = s, this._solution = n, this._initializer = r, this._status = o;
79
+ constructor(t, i, n, s, r, o) {
80
+ this._pluginName = t, this._trackingId = i, this._experienceId = n, this._solution = s, this._initializer = r, this._status = o;
81
81
  }
82
82
  updateStatus(t) {
83
83
  this._status = t;
@@ -86,8 +86,7 @@ class u {
86
86
  this._initializer = t;
87
87
  }
88
88
  notify(t, i) {
89
- console.log("Notifying", t, i);
90
- const s = {
89
+ const n = {
91
90
  pluginName: this._pluginName,
92
91
  trackingId: this._trackingId,
93
92
  experienceId: this._experienceId,
@@ -97,17 +96,17 @@ class u {
97
96
  action: t,
98
97
  eventDetails: i
99
98
  };
100
- window.dispatchEvent(new CustomEvent("epg-notification", { detail: s }));
99
+ window.dispatchEvent(new CustomEvent("epg-notification", { detail: n }));
101
100
  }
102
101
  }
103
102
  class G {
104
103
  constructor({
105
104
  trackingID: t,
106
105
  experienceID: i,
107
- solution: s,
108
- verboseLogging: n = !1
106
+ solution: n,
107
+ verboseLogging: s = !1
109
108
  }) {
110
- this.__status = c.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 = t, this.experienceID = i, this.solution = s, this.verboseLogging = n, this.__queue = new y(), this.__epigraphNotifier = new u(
109
+ this.__status = c.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 = t, this.experienceID = i, this.solution = n, this.verboseLogging = s, this.__queue = new y(), this.__epigraphNotifier = new u(
111
110
  this.pluginName,
112
111
  this.pluginName,
113
112
  this.experienceID,
@@ -157,8 +156,8 @@ class G {
157
156
  }
158
157
  try {
159
158
  await this.dequeueAndSendEvents();
160
- } catch (s) {
161
- this.logger(s), await this.reportFailureToNexus("EVENT_SEND_ERROR", s?.toString() || "Unknown error");
159
+ } catch (n) {
160
+ this.logger(n), await this.reportFailureToNexus("EVENT_SEND_ERROR", n?.toString() || "Unknown error");
162
161
  }
163
162
  }
164
163
  initializePlugin() {
@@ -187,11 +186,11 @@ class G {
187
186
  };
188
187
  const i = this.findGA4Info(this.trackingID);
189
188
  if (i) {
190
- const s = i.l || "dataLayer";
191
- return this.logger(`GA4 script found, setting up with dataLayer: ${s}`), this.__epigraphNotifier.updateInitializer("GA4"), {
189
+ const n = i.l || "dataLayer";
190
+ return this.logger(`GA4 script found, setting up with dataLayer: ${n}`), this.__epigraphNotifier.updateInitializer("GA4"), {
192
191
  success: !0,
193
192
  method: "GA4",
194
- dataLayerName: s
193
+ dataLayerName: n
195
194
  };
196
195
  }
197
196
  return {
@@ -204,13 +203,13 @@ class G {
204
203
  detectGTM() {
205
204
  const t = document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');
206
205
  for (const i of Array.from(t)) {
207
- const s = i.getAttribute("src");
208
- if (s) {
209
- const n = s.match(/gtm\.js\?id=([^&]+)/);
210
- if (n && n.length > 0) {
211
- const r = s.match(/&l=([^&]+)/), o = r ? r[1] : "dataLayer";
206
+ const n = i.getAttribute("src");
207
+ if (n) {
208
+ const s = n.match(/gtm\.js\?id=([^&]+)/);
209
+ if (s && s.length > 0) {
210
+ const r = n.match(/&l=([^&]+)/), o = r ? r[1] : "dataLayer";
212
211
  return {
213
- containerId: n[1],
212
+ containerId: s[1],
214
213
  dataLayerName: o
215
214
  };
216
215
  }
@@ -227,11 +226,11 @@ class G {
227
226
  return;
228
227
  let t = this.__queue.size;
229
228
  for (let i = 0; i < t; i++) {
230
- const s = this.__queue.dequeue();
229
+ const n = this.__queue.dequeue();
231
230
  try {
232
- this.__initializationMethod === "GTM" ? (this.sendGTMEvent(s), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${s.eventName}`)) : this.__initializationMethod === "GA4" ? (this.sendGA4Event(s), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${s.eventName}`)) : this.__queue.enqueue(s);
233
- } catch (n) {
234
- this.logger(`Error sending event ${s.eventName}: ${n}`), this.__queue.enqueue(s);
231
+ this.__initializationMethod === "GTM" ? (this.sendGTMEvent(n), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)) : this.__initializationMethod === "GA4" ? (this.sendGA4Event(n), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)) : this.__queue.enqueue(n);
232
+ } catch (s) {
233
+ this.logger(`Error sending event ${n.eventName}: ${s}`), this.__queue.enqueue(n);
235
234
  }
236
235
  }
237
236
  }
@@ -242,8 +241,8 @@ class G {
242
241
  */
243
242
  async sendGTMEvent(t) {
244
243
  let i = t.getGTMParameters(this.solution, this.experienceID, this.trackingID);
245
- const s = i;
246
- this.isValidPayload(i) || (i = await this.convertGTMParametersToEpgEventTag(t.eventName, i)), this.dataLayer && (this.dataLayer.push(i), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, s));
244
+ const n = i;
245
+ this.isValidPayload(i) || (i = await this.convertGTMParametersToEpgEventTag(t.eventName, i)), this.dataLayer && (this.dataLayer.push(i), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, n));
247
246
  }
248
247
  /**
249
248
  * Send events to GA4 via Google Analytics 4.
@@ -252,8 +251,8 @@ class G {
252
251
  */
253
252
  async sendGA4Event(t) {
254
253
  let i = t.getGa4Parameters(this.solution, this.experienceID, this.trackingID);
255
- const s = i;
256
- this.isValidPayload(i) || (i = await this.convertGA4ParametersToEpgEventTag(i)), window.gtag("event", t.eventName, i), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, s);
254
+ const n = i;
255
+ this.isValidPayload(i) || (i = await this.convertGA4ParametersToEpgEventTag(i)), window.gtag("event", t.eventName, i), this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, n);
257
256
  }
258
257
  /**
259
258
  * Validates a payload by checking its parameter count and the constraints of parameter names and values.
@@ -266,8 +265,8 @@ class G {
266
265
  isValidPayload(t) {
267
266
  if (Object.keys(t).length >= 25)
268
267
  return !1;
269
- for (const [n, r] of Object.entries(t))
270
- if (n !== "items" && (n.length > 40 || String(r).length > 100))
268
+ for (const [s, r] of Object.entries(t))
269
+ if (s !== "items" && (s.length > 40 || String(r).length > 100))
271
270
  return !1;
272
271
  return !0;
273
272
  }
@@ -281,10 +280,10 @@ class G {
281
280
  */
282
281
  async convertGTMParametersToEpgEventTag(t, i) {
283
282
  try {
284
- let s = await this.sendGA4LongParameters(i);
283
+ let n = await this.sendGA4LongParameters(i);
285
284
  return {
286
285
  event: t,
287
- epg_event_tag: s,
286
+ epg_event_tag: n,
288
287
  send_to: this.trackingID
289
288
  };
290
289
  } catch {
@@ -315,25 +314,25 @@ class G {
315
314
  this.verboseLogging && console.warn(t);
316
315
  }
317
316
  async sendGA4LongParameters(t) {
318
- const i = "https://api.myepigraph.com/api/analytics/ga4/custom", s = { parameters: t };
317
+ const i = "https://api.myepigraph.com/api/analytics/ga4/custom", n = { parameters: t };
319
318
  try {
320
- const n = await fetch(i, {
319
+ const s = await fetch(i, {
321
320
  method: "POST",
322
321
  // Assuming it's a POST request, adjust if necessary
323
322
  headers: {
324
323
  "Content-Type": "application/json",
325
324
  Accept: "application/json"
326
325
  },
327
- body: JSON.stringify(s)
326
+ body: JSON.stringify(n)
328
327
  });
329
- return n.ok ? (await n.json())?.id ?? "" : "";
328
+ return s.ok ? (await s.json())?.id ?? "" : "";
330
329
  } catch {
331
330
  return "";
332
331
  }
333
332
  }
334
333
  async reportFailureToNexus(t, i) {
335
334
  try {
336
- const s = {
335
+ const n = {
337
336
  plugin: "GA4",
338
337
  trackingId: this.trackingID,
339
338
  solution: this.solution,
@@ -344,26 +343,26 @@ class G {
344
343
  url: window.location.href,
345
344
  userAgent: navigator.userAgent
346
345
  };
347
- this.logger(`Failure reported to Nexus: ${JSON.stringify(s)}`);
348
- } catch (s) {
349
- this.logger(`Error reporting failure to Nexus: ${s}`);
346
+ this.logger(`Failure reported to Nexus: ${JSON.stringify(n)}`);
347
+ } catch (n) {
348
+ this.logger(`Error reporting failure to Nexus: ${n}`);
350
349
  }
351
350
  }
352
351
  findGA4Info(t) {
353
352
  if (window.google_tag_manager && window.google_tag_manager[t]) {
354
- const s = window.google_tag_manager[t];
355
- if (s && s.dataLayerName)
353
+ const n = window.google_tag_manager[t];
354
+ if (n && n.dataLayerName)
356
355
  return {
357
356
  fullSrc: "",
358
357
  id: t,
359
- l: s.dataLayerName
358
+ l: n.dataLayerName
360
359
  };
361
360
  }
362
361
  const i = document.querySelectorAll("script[src]");
363
- for (const s of i) {
364
- const n = s.getAttribute("src");
365
- if (n && n.includes(t)) {
366
- const r = new URL(n, location.href), o = Object.fromEntries(r.searchParams.entries());
362
+ for (const n of i) {
363
+ const s = n.getAttribute("src");
364
+ if (s && s.includes(t)) {
365
+ const r = new URL(s, location.href), o = Object.fromEntries(r.searchParams.entries());
367
366
  return {
368
367
  fullSrc: r.href,
369
368
  id: o.id || void 0,
@@ -374,17 +373,17 @@ class G {
374
373
  return null;
375
374
  }
376
375
  }
377
- class R {
376
+ class q {
378
377
  constructor({
379
378
  trackingID: t,
380
379
  experienceID: i,
381
- solution: s,
382
- sessionId: n,
380
+ solution: n,
381
+ sessionId: s,
383
382
  xPath: r,
384
383
  verboseLogging: o = !1,
385
384
  sendToStaging: P = !1
386
385
  }) {
387
- this.__status = c.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = n, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.experienceID = i, this.solution = s, this.verboseLogging = o, this.__queue = new y(), this.url = P ? "https://nexus.epigraph.dev/api/analytics/event" : "https://api.myepigraph.com/api/analytics/event", this.__status = c.AVAILABLE, this.__epigraphNotifier = new u(
386
+ this.__status = c.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = s, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.experienceID = i, this.solution = n, this.verboseLogging = o, this.__queue = new y(), this.url = P ? "https://nexus.epigraph.dev/api/analytics/event" : "https://api.myepigraph.com/api/analytics/event", this.__status = c.AVAILABLE, this.__epigraphNotifier = new u(
388
387
  this.pluginName,
389
388
  this.trackingID,
390
389
  this.experienceID,
@@ -422,7 +421,7 @@ class R {
422
421
  }
423
422
  async dequeueAndSendEvents() {
424
423
  for (let t = 0; t < this.__queue.size; t++) {
425
- const i = this.__queue.dequeue(), s = {
424
+ const i = this.__queue.dequeue(), n = {
426
425
  send_to: this.trackingID,
427
426
  experience_id: this.experienceID,
428
427
  solution: this.solution,
@@ -440,8 +439,8 @@ class R {
440
439
  "EPG-XPATH": this.xPath,
441
440
  Origin: typeof window < "u" ? window.location.origin : ""
442
441
  },
443
- body: JSON.stringify(s)
444
- })).ok && this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, s), "";
442
+ body: JSON.stringify(n)
443
+ })).ok && this.__epigraphNotifier.notify(u.ACTION_SEND_EVENT, n), "";
445
444
  } catch {
446
445
  return "";
447
446
  }
@@ -450,7 +449,7 @@ class R {
450
449
  return "";
451
450
  }
452
451
  }
453
- class z {
452
+ class D {
454
453
  constructor(t) {
455
454
  this.consentSet = !1, this.consent = !1, this.pluginName = "OneTrustConsentPlugin", this.consentIdentifier = t, this.consent = !1, this.addConsentChangedListener();
456
455
  }
@@ -462,8 +461,8 @@ class z {
462
461
  return this.consent;
463
462
  if (window.OnetrustActiveGroups !== void 0) {
464
463
  let t = window.OnetrustActiveGroups;
465
- t !== void 0 && t.split(",").forEach((s) => {
466
- s === this.consentIdentifier && (this.consent = !0, this.consentSet = !0);
464
+ t !== void 0 && t.split(",").forEach((n) => {
465
+ n === this.consentIdentifier && (this.consent = !0, this.consentSet = !0);
467
466
  });
468
467
  }
469
468
  return this.consent;
@@ -476,33 +475,33 @@ class z {
476
475
  });
477
476
  }
478
477
  }
479
- var N = /* @__PURE__ */ ((e) => (e.OneTrust = "onetrust", e))(N || {});
478
+ var A = /* @__PURE__ */ ((e) => (e.OneTrust = "onetrust", e))(A || {});
480
479
  class a {
481
480
  constructor({
482
481
  eventName: t,
483
482
  interactiveEvent: i,
484
- customParameters: s
483
+ customParameters: n
485
484
  }) {
486
- this.eventName = t, this.interactiveEvent = i, this.customParameters = s;
485
+ this.eventName = t, this.interactiveEvent = i, this.customParameters = n;
487
486
  }
488
- getGa4Parameters(t, i, s) {
489
- let n = {
487
+ getGa4Parameters(t, i, n) {
488
+ let s = {
490
489
  solution: t,
491
490
  experience_id: i,
492
491
  interactive_event: this.interactiveEvent,
493
- send_to: s
492
+ send_to: n
494
493
  };
495
- return n = Object.assign(n, JSON.parse(JSON.stringify(this.customParameters))), n;
494
+ return s = Object.assign(s, JSON.parse(JSON.stringify(this.customParameters))), s;
496
495
  }
497
- getGTMParameters(t, i, s) {
498
- let n = {
496
+ getGTMParameters(t, i, n) {
497
+ let s = {
499
498
  solution: t,
500
499
  experience_id: i,
501
500
  event: this.eventName,
502
501
  interactive_event: this.interactiveEvent,
503
- send_to: s
502
+ send_to: n
504
503
  };
505
- return n = Object.assign(n, JSON.parse(JSON.stringify(this.customParameters))), n;
504
+ return s = Object.assign(s, JSON.parse(JSON.stringify(this.customParameters))), s;
506
505
  }
507
506
  getNexusParameters() {
508
507
  let t = {
@@ -511,7 +510,7 @@ class a {
511
510
  return t = Object.assign(t, JSON.parse(JSON.stringify(this.customParameters))), t;
512
511
  }
513
512
  }
514
- var g = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.INFO = "info", 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))(g || {}), v = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.BUTTON = "button", e.HOTSPOT = "hotspot", e.GESTURE = "gesture", e))(v || {}), l = /* @__PURE__ */ ((e) => (e.USD = "USD", e.EUR = "EUR", e.GBP = "GBP", e.CAD = "CAD", e))(l || {}), A = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.WEBGL2 = "webgl2", e))(A || {}), C = /* @__PURE__ */ ((e) => (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 || {}), O = /* @__PURE__ */ ((e) => (e.ZOOM = "zoom", e.ROTATE = "rotate", e))(O || {}), S = /* @__PURE__ */ ((e) => (e.ROTATE = "rotate", e.ZOOM = "zoom", e.PAN = "pan", e))(S || {}), w = /* @__PURE__ */ ((e) => (e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e))(w || {}), L = /* @__PURE__ */ ((e) => (e.FACEBOOK = "facebook", e.TWITTER = "twitter", e.EMAIL = "email", e.COPY_LINK = "copy_link", e.WHATSAPP = "whatsapp", e.LINKEDIN = "linkedin", e))(L || {});
513
+ var C = /* @__PURE__ */ ((e) => (e.VARIANT = "variant", e.CATEGORY_VARIANT = "category_variant", e.GEOMETRY = "geometry", e.CATEGORY_GEOMETRY = "category_geometry", e.GLOBAL = "global", e))(C || {}), g = /* @__PURE__ */ ((e) => (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))(g || {}), O = /* @__PURE__ */ ((e) => (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))(O || {}), v = /* @__PURE__ */ ((e) => (e.AUTO = "auto", e.BUTTON = "button", e.HOTSPOT = "hotspot", e.GESTURE = "gesture", e))(v || {}), l = /* @__PURE__ */ ((e) => (e.USD = "USD", e.EUR = "EUR", e.GBP = "GBP", e.CAD = "CAD", e))(l || {}), w = /* @__PURE__ */ ((e) => (e.AR = "ar", e.QR = "qr", e.AR_WEBGL2 = "ar-webgl2", e.QR_WEBGL2 = "qr-webgl2", e))(w || {}), L = /* @__PURE__ */ ((e) => (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))(L || {}), m = /* @__PURE__ */ ((e) => (e.ZOOM = "zoom", e.ROTATE = "rotate", e.PAN = "pan", e))(m || {}), S = /* @__PURE__ */ ((e) => (e.CONFIGURATION = "configuration", e.SCENE = "scene", e.PRODUCT = "product", e))(S || {}), x = /* @__PURE__ */ ((e) => (e.FACEBOOK = "facebook", e.TWITTER = "twitter", e.EMAIL = "email", e.COPY_LINK = "copy_link", e.WHATSAPP = "whatsapp", e.LINKEDIN = "linkedin", e))(x || {});
515
514
  class M extends a {
516
515
  constructor(t) {
517
516
  super({
@@ -523,7 +522,7 @@ class M extends a {
523
522
  });
524
523
  }
525
524
  }
526
- class q extends a {
525
+ class b extends a {
527
526
  constructor(t) {
528
527
  super({
529
528
  eventName: "epigraph_module_loading",
@@ -534,7 +533,7 @@ class q extends a {
534
533
  });
535
534
  }
536
535
  }
537
- class b extends a {
536
+ class k extends a {
538
537
  constructor(t, i) {
539
538
  super({
540
539
  eventName: "epigraph_module_ready",
@@ -546,15 +545,18 @@ class b extends a {
546
545
  });
547
546
  }
548
547
  }
549
- class k extends a {
550
- constructor(t, i, s) {
548
+ class $ extends a {
549
+ static {
550
+ this.MODULE_FAILED_ERRORS = O;
551
+ }
552
+ constructor(t, i, n) {
551
553
  super({
552
554
  eventName: "epigraph_module_failed",
553
555
  interactiveEvent: !1,
554
556
  customParameters: {
555
557
  is_pre_config: t,
556
558
  load_time_ms: i,
557
- error_type: s
559
+ error_type: n
558
560
  }
559
561
  });
560
562
  }
@@ -570,24 +572,23 @@ class V extends a {
570
572
  });
571
573
  }
572
574
  }
573
- class $ extends a {
575
+ class F extends a {
574
576
  static {
575
- this.SUPPORT_TYPE = A;
577
+ this.SUPPORT_TYPE = w;
576
578
  }
577
- constructor(t, i = {}) {
579
+ constructor(t) {
578
580
  super({
579
581
  eventName: "epigraph_support_detected",
580
582
  interactiveEvent: !1,
581
583
  customParameters: {
582
- support_type: t,
583
- device_capabilities: i
584
+ support_type: t
584
585
  }
585
586
  });
586
587
  }
587
588
  }
588
- class F extends a {
589
+ class j extends a {
589
590
  static {
590
- this.BUTTON_TYPE = C;
591
+ this.BUTTON_TYPE = L;
591
592
  }
592
593
  constructor(t, i) {
593
594
  super({
@@ -600,21 +601,21 @@ class F extends a {
600
601
  });
601
602
  }
602
603
  }
603
- class j extends a {
604
+ class W extends a {
604
605
  static {
605
606
  this.PANEL_TYPE = g;
606
607
  }
607
608
  static {
608
609
  this.TRIGGER_SOURCE = v;
609
610
  }
610
- constructor(t, i, s, n) {
611
+ constructor(t, i, n, s) {
611
612
  super({
612
613
  eventName: "epigraph_panel_opened",
613
614
  interactiveEvent: t,
614
615
  customParameters: {
615
- items: n,
616
+ items: s,
616
617
  panel_type: i,
617
- trigger_source: s
618
+ trigger_source: n
618
619
  }
619
620
  });
620
621
  }
@@ -626,19 +627,19 @@ class U extends a {
626
627
  static {
627
628
  this.TRIGGER_SOURCE = v;
628
629
  }
629
- constructor(t, i, s, n) {
630
+ constructor(t, i, n, s) {
630
631
  super({
631
632
  eventName: "epigraph_panel_closed",
632
633
  interactiveEvent: t,
633
634
  customParameters: {
634
- items: n,
635
+ items: s,
635
636
  panel_type: i,
636
- trigger_source: s
637
+ trigger_source: n
637
638
  }
638
639
  });
639
640
  }
640
641
  }
641
- class H extends a {
642
+ class J extends a {
642
643
  constructor(t) {
643
644
  super({
644
645
  eventName: "epigraph_add_to_favourites",
@@ -649,9 +650,9 @@ class H extends a {
649
650
  });
650
651
  }
651
652
  }
652
- class W extends a {
653
+ class H extends a {
653
654
  static {
654
- this.ACTION_PERFORMED = O;
655
+ this.ACTION_PERFORMED = m;
655
656
  }
656
657
  constructor(t) {
657
658
  super({
@@ -663,9 +664,9 @@ class W extends a {
663
664
  });
664
665
  }
665
666
  }
666
- class J extends a {
667
+ class K extends a {
667
668
  static {
668
- this.INTERACTION_TYPE = S;
669
+ this.INTERACTION_TYPE = m;
669
670
  }
670
671
  constructor(t) {
671
672
  super({
@@ -677,24 +678,24 @@ class J extends a {
677
678
  });
678
679
  }
679
680
  }
680
- class Z extends a {
681
+ class X extends a {
681
682
  static {
682
683
  this.CURRENCY = l;
683
684
  }
684
- constructor(t, i, s, n, r) {
685
+ constructor(t, i, n, s, r) {
685
686
  super({
686
687
  eventName: "epigraph_item_added",
687
688
  interactiveEvent: t,
688
689
  customParameters: {
689
690
  items: r,
690
691
  value: i,
691
- currency: s,
692
- quantity: n
692
+ currency: n,
693
+ quantity: s
693
694
  }
694
695
  });
695
696
  }
696
697
  }
697
- class K extends a {
698
+ class Z extends a {
698
699
  constructor(t) {
699
700
  super({
700
701
  eventName: "epigraph_item_moved",
@@ -705,24 +706,27 @@ class K extends a {
705
706
  });
706
707
  }
707
708
  }
708
- class X extends a {
709
+ class Q extends a {
709
710
  static {
710
711
  this.CURRENCY = l;
711
712
  }
712
- constructor(t, i, s, n) {
713
+ constructor(t, i, n, s) {
713
714
  super({
714
715
  eventName: "epigraph_item_removed",
715
716
  interactiveEvent: !0,
716
717
  customParameters: {
717
- items: n,
718
+ items: s,
718
719
  value: t,
719
720
  currency: i,
720
- quantity: s
721
+ quantity: n
721
722
  }
722
723
  });
723
724
  }
724
725
  }
725
- class Q extends a {
726
+ class B extends a {
727
+ static {
728
+ this.VARIANT_CHANGE_TYPES = C;
729
+ }
726
730
  constructor(t, i) {
727
731
  super({
728
732
  eventName: "epigraph_variant_changed",
@@ -734,58 +738,58 @@ class Q extends a {
734
738
  });
735
739
  }
736
740
  }
737
- class B extends a {
741
+ class Y extends a {
738
742
  static {
739
- this.CONTENT_TYPES = w;
743
+ this.CONTENT_TYPES = S;
740
744
  }
741
745
  static {
742
- this.SHARE_DESTINATIONS = L;
746
+ this.SHARE_DESTINATIONS = x;
743
747
  }
744
- constructor(t, i, s) {
748
+ constructor(t, i, n) {
745
749
  super({
746
750
  eventName: "epigraph_content_shared",
747
751
  interactiveEvent: !0,
748
752
  customParameters: {
749
- items: s,
753
+ items: n,
750
754
  content_type: t,
751
755
  share_destination: i
752
756
  }
753
757
  });
754
758
  }
755
759
  }
756
- class Y extends a {
760
+ class tt extends a {
757
761
  static {
758
762
  this.CURRENCY = l;
759
763
  }
760
- constructor(t, i, s) {
764
+ constructor(t, i, n) {
761
765
  super({
762
766
  eventName: "epigraph_checkout",
763
767
  interactiveEvent: !0,
764
768
  customParameters: {
765
- items: s,
769
+ items: n,
766
770
  value: t,
767
771
  currency: i
768
772
  }
769
773
  });
770
774
  }
771
775
  }
772
- class tt extends a {
776
+ class et extends a {
773
777
  static {
774
778
  this.CURRENCY = l;
775
779
  }
776
- constructor(t, i, s) {
780
+ constructor(t, i, n) {
777
781
  super({
778
782
  eventName: "epigraph_conversion",
779
783
  interactiveEvent: !0,
780
784
  customParameters: {
781
- items: s,
785
+ items: n,
782
786
  value: t,
783
787
  currency: i
784
788
  }
785
789
  });
786
790
  }
787
791
  }
788
- class et extends a {
792
+ class it extends a {
789
793
  constructor(t) {
790
794
  super({
791
795
  eventName: "epigraph_changeRate",
@@ -796,7 +800,7 @@ class et extends a {
796
800
  });
797
801
  }
798
802
  }
799
- class it extends a {
803
+ class nt extends a {
800
804
  constructor(t) {
801
805
  super({
802
806
  eventName: "epigraph_completionRate",
@@ -818,12 +822,12 @@ class st extends a {
818
822
  });
819
823
  }
820
824
  }
821
- class nt extends a {
822
- constructor(t, i, s) {
825
+ class at extends a {
826
+ constructor(t, i, n) {
823
827
  super({
824
828
  eventName: t,
825
829
  interactiveEvent: i,
826
- customParameters: s
830
+ customParameters: n
827
831
  });
828
832
  }
829
833
  }
@@ -843,18 +847,18 @@ class nt extends a {
843
847
  * See the License for the specific language governing permissions and
844
848
  * limitations under the License.
845
849
  */
846
- var x;
850
+ var T;
847
851
  const h = Symbol("analyticsPluginsMap");
848
- x = h;
849
- class at {
852
+ T = h;
853
+ class rt {
850
854
  constructor(t, i) {
851
- this[x] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, t && i && (this.__consentPlugin = this.buildConsentPlugin(t, i)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
855
+ this[T] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, t && i && (this.__consentPlugin = this.buildConsentPlugin(t, i)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
852
856
  }
853
857
  __onConsentChangeFromEvent(t) {
854
858
  let i = t;
855
859
  this.__overrideConsent = i.detail.hasConsent;
856
- for (const s of this[h].values())
857
- this.__hasConsent() || s.setStatus(c.RESTRICTED);
860
+ for (const n of this[h].values())
861
+ this.__hasConsent() || n.setStatus(c.RESTRICTED);
858
862
  }
859
863
  /**
860
864
  * Epigraph Analytics uses plugins to send events to multiple trackers at a time. You can create a customer tracker
@@ -896,45 +900,46 @@ class at {
896
900
  * @private
897
901
  */
898
902
  buildConsentPlugin(t, i) {
899
- return t.toLowerCase() === N.OneTrust.toLowerCase() ? new z(i) : null;
903
+ return t.toLowerCase() === A.OneTrust.toLowerCase() ? new D(i) : null;
900
904
  }
901
905
  }
902
906
  export {
903
- O as ACTION_PERFORMED,
904
- C as BUTTON_TYPE,
905
- w as CONTENT_TYPES,
907
+ m as ACTION_PERFORMED,
908
+ L as BUTTON_TYPE,
909
+ S as CONTENT_TYPES,
906
910
  l as CURRENCY,
907
- N as ConsentPluginNames,
908
- H as EpigraphAddToFavouritesEvent,
909
- at as EpigraphAnalytics,
911
+ A as ConsentPluginNames,
912
+ J as EpigraphAddToFavouritesEvent,
913
+ rt as EpigraphAnalytics,
910
914
  M as EpigraphArRequestedEvent,
911
- F as EpigraphButtonClickEvent,
912
- et as EpigraphChangeRateEvent,
913
- Y as EpigraphCheckoutEvent,
914
- it as EpigraphCompletionRateEvent,
915
- B as EpigraphContentSharedEvent,
916
- tt as EpigraphConversionEvent,
917
- nt as EpigraphCustomEvent,
915
+ j as EpigraphButtonClickEvent,
916
+ it as EpigraphChangeRateEvent,
917
+ tt as EpigraphCheckoutEvent,
918
+ nt as EpigraphCompletionRateEvent,
919
+ Y as EpigraphContentSharedEvent,
920
+ et as EpigraphConversionEvent,
921
+ at as EpigraphCustomEvent,
918
922
  st as EpigraphEngagementRateEvent,
919
- Z as EpigraphItemAddedEvent,
920
- K as EpigraphItemMovedEvent,
921
- X as EpigraphItemRemovedEvent,
922
- W as EpigraphKeyboardInteractionEvent,
923
+ X as EpigraphItemAddedEvent,
924
+ Z as EpigraphItemMovedEvent,
925
+ Q as EpigraphItemRemovedEvent,
926
+ H as EpigraphKeyboardInteractionEvent,
923
927
  V as EpigraphModuleClosedEvent,
924
- k as EpigraphModuleFailedEvent,
925
- q as EpigraphModuleLoadingEvent,
926
- b as EpigraphModuleReadyEvent,
928
+ $ as EpigraphModuleFailedEvent,
929
+ b as EpigraphModuleLoadingEvent,
930
+ k as EpigraphModuleReadyEvent,
927
931
  U as EpigraphPanelClosedEvent,
928
- j as EpigraphPanelOpenedEvent,
929
- $ as EpigraphSupportDetectedEvent,
930
- J as EpigraphTouchInteractionEvent,
931
- Q as EpigraphVariantChangedEvent,
932
+ W as EpigraphPanelOpenedEvent,
933
+ F as EpigraphSupportDetectedEvent,
934
+ K as EpigraphTouchInteractionEvent,
935
+ B as EpigraphVariantChangedEvent,
932
936
  G as GA4AnalyticsPlugin,
933
- S as INTERACTION_TYPE,
934
- R as NexusAnalyticsPlugin,
935
- z as OneTrustConsentPlugin,
937
+ O as MODULE_FAILED_ERRORS,
938
+ q as NexusAnalyticsPlugin,
939
+ D as OneTrustConsentPlugin,
936
940
  g as PANEL_TYPE,
937
- L as SHARE_DESTINATIONS,
938
- A as SUPPORT_TYPE,
939
- v as TRIGGER_SOURCE
941
+ x as SHARE_DESTINATIONS,
942
+ w as SUPPORT_TYPE,
943
+ v as TRIGGER_SOURCE,
944
+ C as VARIANT_CHANGE_TYPES
940
945
  };