@epigraph/epigraph-std-lib 4.5.2-alpha → 4.5.3-alpha

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.
@@ -2,12 +2,12 @@ export interface IAnalyticsEvent {
2
2
  eventName: string;
3
3
  interactiveEvent: boolean;
4
4
  customParameters: Record<string, unknown>;
5
- getGa4Parameters(solution: string, experienceId: string): Record<string, unknown>;
6
- getGTMParameters(): Record<string, unknown>;
7
- getNexusParameters(): Record<string, unknown>;
5
+ getParameters(): Record<string, unknown>;
8
6
  }
9
7
  export interface IAnalyticsParameterItem {
10
8
  item_id: string;
11
9
  item_name: string;
10
+ price: number;
11
+ quantity: number;
12
12
  }
13
13
  export type IAnalyticsParameterItems = Array<IAnalyticsParameterItem>;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var u=(i=>(i.UNAVAILABLE="unavailable",i.AVAILABLE="available",i.RESTRICTED="restricted",i))(u||{});const g=Symbol("data"),d=Symbol("next"),w=class m{constructor(e){this[g]=e,this[d]=null}get data(){return this[g]}set next(e){if(!(e instanceof m)&&e!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[d]=e}get next(){return this[d]}};let v=w;const p=Symbol("head");class N{constructor(){this[p]=null}set head(e){this[p]=e}get head(){return this[p]}addToTail(e){let t=this.head;if(t){for(;t.next!==null;)t=t?.next;return t.next=new v(e)}return this.head=new v(e)}removeHead(){const e=this.head;if(e)return this.head=e.next,e.data}}const _=Symbol("queue"),h=Symbol("size");class E{constructor(){this[_]=new N,this[h]=0}get queue(){return this[_]}get size(){return this[h]}enqueue(e){this.queue.addToTail(e),this[h]++}dequeue(){const e=this.queue.removeHead();return this[h]--,e}}class P{constructor({trackingID:e,experienceID:t,solution:n,verboseLogging:s=!1}){this.dataLayerName="dataLayer",this.__status=u.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=0,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=t,this.solution=n,this.verboseLogging=s,this.__queue=new E,this.initializePlugin()}getStatus(){return this.__status}setStatus(e){this.__status=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,t){if(this.__queue.enqueue(e),!t){this.__status=u.RESTRICTED;return}if(!this.__isInitialized){this.logger("Cannot send analytics event: dataLayer not defined or plugin not initialized.");return}try{await this.dequeueAndSendEvents()}catch(n){this.logger(n),await this.reportFailureToNexus("EVENT_SEND_ERROR",n?.toString()||"Unknown error")}}async initializePlugin(){if(this.__isInitialized)return;const e=Date.now();if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(await this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS","Maximum initialization attempts reached"),this.__nexusFailureReported=!0);return}if(e-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=e,this.__initializationAttempts++;const t=await this.detectAndSetupAnalytics();t.success?(this.__isInitialized=!0,this.__status=u.AVAILABLE,this.__initializationMethod=t.method,this.dataLayerName=t.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${t.method} with dataLayer: ${this.dataLayerName}`),this.__queue.size>0&&await this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${t.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>this.initializePlugin(),this.__initializationRetryDelay))}async detectAndSetupAnalytics(){const e=this.detectGTM();if(e)return this.logger(`GTM detected with container ID: ${e.containerId}`),{success:!0,method:"GTM",dataLayerName:e.dataLayerName};if(window.dataLayer)return this.logger("Existing dataLayer found"),{success:!0,method:"GA4",dataLayerName:"dataLayer"};const t=this.findGA4ScriptInfo(this.trackingID);if(t){const n=t.l||"dataLayer";if(this.logger(`GA4 script found, setting up with dataLayer: ${n}`),this.setupGA4(n))return{success:!0,method:"GA4",dataLayerName:n}}return this.setupGA4("dataLayer")?{success:!0,method:"GA4",dataLayerName:"dataLayer"}:{success:!1,method:"NONE",dataLayerName:"dataLayer",error:"No analytics setup found and unable to create one"}}detectGTM(){const e=document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');for(const t of Array.from(e)){const n=t.getAttribute("src");if(n){const s=n.match(/gtm\.js\?id=([^&]+)/);if(s){const r=n.match(/&l=([^&]+)/),o=r?r[1]:"dataLayer";return{containerId:s[1],dataLayerName:o}}}}return null}setupGA4(e){try{return window[e]||(window[e]=[]),window.epgDataLayerName=e,typeof window.gtag!="function"&&(window.gtag=function(){const t=window.epgDataLayerName;t&&window[t]&&Array.isArray(window[t])&&window[t].push(arguments)},window.gtag("js",new Date),window.gtag("config",this.trackingID,{send_page_view:!1})),!0}catch(t){return this.logger(`Error setting up GA4: ${t}`),!1}}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let e=this.__queue.size;for(let t=0;t<e;t++){const n=this.__queue.dequeue(),s=n.getGa4Parameters(this.solution,this.experienceID);if(n.customParameters&&Object.assign(s,n.customParameters),JSON.stringify(s).length>459)try{let o=await this.sendGA4LongParameters(s);s.epg_event_tag=o}catch{}try{this.__initializationMethod==="GTM"?this.sendToGTM(n.eventName,s):this.__initializationMethod==="GA4"&&window.gtag("event",n.eventName,s),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)}catch(o){this.logger(`Error sending event ${n.eventName}: ${o}`),this.__queue.enqueue(n)}}}logger(e){this.verboseLogging&&console.warn(e)}async sendGA4LongParameters(e){const t="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:e};try{const s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});return s.ok?(await s.json())?.id??"":""}catch{return""}}sendToGTM(e,t){this.dataLayer&&this.dataLayer.push({event:e,...t})}async reportFailureToNexus(e,t){try{const 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(n){this.logger(`Error reporting failure to Nexus: ${n}`)}}findGA4ScriptInfo(e){const t=document.querySelectorAll("script[src]");for(const n of t){const s=n.getAttribute("src");if(s&&s.includes(e)){const r=new URL(s,location.href),o=Object.fromEntries(r.searchParams.entries());return{fullSrc:r.href,id:o.id||void 0,l:o.l||void 0}}}return null}}class C{constructor({trackingID:e,experienceID:t,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,sendToStaging:A=!1}){this.__status=u.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=s,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=e,this.experienceID=t,this.solution=n,this.verboseLogging=o,this.__queue=new E,this.url=A?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/analytics/event",this.__status=u.AVAILABLE}getStatus(){return this.__status}setStatus(e){this.__status=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,t){if(this.__queue.enqueue(e),!t){this.__status=u.RESTRICTED;return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let e=0;e<this.__queue.size;e++){const t=this.__queue.dequeue();t.customParameters.solution=this.solution;const n={trackingID:this.trackingID,experience_id:this.experienceID,action:t.eventName,parameters:t.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(n)})).status===200,""}catch{return""}this.__sentEventCount++}return""}}class f{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(n=>{n===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()})})}}var l=(i=>(i.OneTrust="onetrust",i))(l||{});class a{constructor({eventName:e,interactiveEvent:t,customParameters:n}){this.eventName=e,this.interactiveEvent=t,this.customParameters=n}getGa4Parameters(e,t){let n={solution:e,experience_id:t,interactive_event:this.interactiveEvent,items:[],epg_event_tag:""};return n=Object.assign(n,JSON.parse(JSON.stringify(this.customParameters))),n}getGTMParameters(){return{}}getNexusParameters(){let e={interactive_event:this.interactiveEvent,items:[]};return e=Object.assign(e,JSON.parse(JSON.stringify(this.customParameters))),e}}class I extends a{constructor(e=[]){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:e}})}}class S extends a{constructor(e=[],t){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{items:e,is_pre_config:t}})}}class L extends a{constructor(e=[],t,n){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{items:e,is_pre_config:t,load_time_ms:n}})}}class x extends a{constructor(e=[],t,n,s){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{items:e,is_pre_config:t,load_time_ms:n,error_type:s}})}}class T extends a{constructor(e=[]){super({eventName:"epigraph_module_closed",interactiveEvent:!0,customParameters:{items:e}})}}class q extends a{constructor(e=[],t,n={}){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{items:e,support_type:t,device_capabilities:n}})}}class z extends a{constructor(e=[],t,n){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{items:e,button_type:t,button_name:n}})}}class O extends a{constructor(e=[],t,n,s){super({eventName:"epigraph_panel_opened",interactiveEvent:t,customParameters:{items:e,panel_type:n,trigger_source:s}})}}class G extends a{constructor(e=[],t,n,s){super({eventName:"epigraph_panel_closed",interactiveEvent:t,customParameters:{items:e,panel_type:n,trigger_source:s}})}}class R extends a{constructor(e=[]){super({eventName:"epigraph_add_to_favourites",interactiveEvent:!0,customParameters:{items:e}})}}class b extends a{constructor(e=[],t){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{items:e,action_performed:t}})}}class D extends a{constructor(e=[],t){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{items:e,interaction_type:t}})}}class M extends a{constructor(e=[],t,n,s,r){super({eventName:"epigraph_item_added",interactiveEvent:t,customParameters:{items:e,value:n,currency:s,quantity:r}})}}class $ extends a{constructor(e=[]){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:e}})}}class k extends a{constructor(e=[],t,n){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:e,currency:t,quantity:n}})}}class j extends a{constructor(e=[],t){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:e,change_type:t}})}}class F extends a{constructor(e=[],t,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:e,content_type:t,share_destination:n}})}}class U extends a{constructor(e=[],t,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:e,value:t,currency:n}})}}class B extends a{constructor(e=[],t,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:e,value:t,currency:n}})}}class V extends a{constructor(e=[],t){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{items:e,value:t}})}}class J extends a{constructor(e=[],t){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{items:e,value:t}})}}class H extends a{constructor(e=[],t){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{items:e,value:t}})}}class X extends a{constructor(e,t,n){super({eventName:e,interactiveEvent:t,customParameters:n})}}/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var u=(i=>(i.UNAVAILABLE="unavailable",i.AVAILABLE="available",i.RESTRICTED="restricted",i))(u||{});const g=Symbol("data"),d=Symbol("next"),w=class m{constructor(e){this[g]=e,this[d]=null}get data(){return this[g]}set next(e){if(!(e instanceof m)&&e!==null)throw new Error("This node is not an instance of the custom class 'Node'.");this[d]=e}get next(){return this[d]}};let _=w;const p=Symbol("head");class P{constructor(){this[p]=null}set head(e){this[p]=e}get head(){return this[p]}addToTail(e){let t=this.head;if(t){for(;t.next!==null;)t=t?.next;return t.next=new _(e)}return this.head=new _(e)}removeHead(){const e=this.head;if(e)return this.head=e.next,e.data}}const v=Symbol("queue"),h=Symbol("size");class E{constructor(){this[v]=new P,this[h]=0}get queue(){return this[v]}get size(){return this[h]}enqueue(e){this.queue.addToTail(e),this[h]++}dequeue(){const e=this.queue.removeHead();return this[h]--,e}}class N{constructor({trackingID:e,experienceID:t,solution:n,verboseLogging:s=!1}){this.dataLayerName="dataLayer",this.__status=u.UNAVAILABLE,this.__sentEventCount=0,this.__initializationAttempts=0,this.__lastInitializationAttempt=0,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=t,this.solution=n,this.verboseLogging=s,this.__queue=new E,this.initializePlugin()}getStatus(){return this.__status}setStatus(e){this.__status=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,t){if(this.__queue.enqueue(e),!t){this.__status=u.RESTRICTED;return}if(!this.__isInitialized){this.logger("Cannot send analytics event: dataLayer not defined or plugin not initialized.");return}try{await this.dequeueAndSendEvents()}catch(n){this.logger(n),await this.reportFailureToNexus("EVENT_SEND_ERROR",n?.toString()||"Unknown error")}}async initializePlugin(){if(this.__isInitialized)return;const e=Date.now();if(this.__initializationAttempts>=this.__maxInitializationAttempts){this.__nexusFailureReported||(await this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS","Maximum initialization attempts reached"),this.__nexusFailureReported=!0);return}if(e-this.__lastInitializationAttempt<this.__initializationRetryDelay)return;this.__lastInitializationAttempt=e,this.__initializationAttempts++;const t=await this.detectAndSetupAnalytics();t.success?(this.__isInitialized=!0,this.__status=u.AVAILABLE,this.__initializationMethod=t.method,this.dataLayerName=t.dataLayerName,this.dataLayer=window[this.dataLayerName],this.logger(`Successfully initialized ${t.method} with dataLayer: ${this.dataLayerName}`),this.__queue.size>0&&await this.dequeueAndSendEvents()):(this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${t.error}`),this.__initializationAttempts<this.__maxInitializationAttempts&&setTimeout(()=>this.initializePlugin(),this.__initializationRetryDelay))}async detectAndSetupAnalytics(){const e=this.detectGTM();if(e)return this.logger(`GTM detected with container ID: ${e.containerId}`),{success:!0,method:"GTM",dataLayerName:e.dataLayerName};if(window.dataLayer)return this.logger("Existing dataLayer found"),{success:!0,method:"GA4",dataLayerName:"dataLayer"};const t=this.findGA4ScriptInfo(this.trackingID);if(t){const n=t.l||"dataLayer";if(this.logger(`GA4 script found, setting up with dataLayer: ${n}`),this.setupGA4(n))return{success:!0,method:"GA4",dataLayerName:n}}return this.setupGA4("dataLayer")?{success:!0,method:"GA4",dataLayerName:"dataLayer"}:{success:!1,method:"NONE",dataLayerName:"dataLayer",error:"No analytics setup found and unable to create one"}}detectGTM(){const e=document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');for(const t of Array.from(e)){const n=t.getAttribute("src");if(n){const s=n.match(/gtm\.js\?id=([^&]+)/);if(s){const r=n.match(/&l=([^&]+)/),o=r?r[1]:"dataLayer";return{containerId:s[1],dataLayerName:o}}}}return null}setupGA4(e){try{return window[e]||(window[e]=[]),window.epgDataLayerName=e,typeof window.gtag!="function"&&(window.gtag=function(){const t=window.epgDataLayerName;t&&window[t]&&Array.isArray(window[t])&&window[t].push(arguments)},window.gtag("js",new Date),window.gtag("config",this.trackingID,{send_page_view:!1})),!0}catch(t){return this.logger(`Error setting up GA4: ${t}`),!1}}async dequeueAndSendEvents(){if(!this.__isInitialized||!this.dataLayer)return;let e=this.__queue.size;for(let t=0;t<e;t++){const n=this.__queue.dequeue();let s=n.getParameters();if(s.solution=this.solution,s.experience_id=this.experienceID,n.customParameters&&Object.assign(s,n.customParameters),JSON.stringify(s).length>459)try{s={epg_event_tag:await this.sendGA4LongParameters(s)}}catch{}try{this.__initializationMethod==="GTM"?this.sendToGTM(n.eventName,s):this.__initializationMethod==="GA4"&&window.gtag("event",n.eventName,s),this.__sentEventCount++,this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`)}catch(o){this.logger(`Error sending event ${n.eventName}: ${o}`),this.__queue.enqueue(n)}}}logger(e){this.verboseLogging&&console.warn(e)}async sendGA4LongParameters(e){const t="https://api.myepigraph.com/api/analytics/ga4/custom",n={parameters:e};try{const s=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/json"},body:JSON.stringify(n)});return s.ok?(await s.json())?.id??"":""}catch{return""}}sendToGTM(e,t){this.dataLayer&&this.dataLayer.push({event:e,...t})}async reportFailureToNexus(e,t){try{const 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(n){this.logger(`Error reporting failure to Nexus: ${n}`)}}findGA4ScriptInfo(e){const t=document.querySelectorAll("script[src]");for(const n of t){const s=n.getAttribute("src");if(s&&s.includes(e)){const r=new URL(s,location.href),o=Object.fromEntries(r.searchParams.entries());return{fullSrc:r.href,id:o.id||void 0,l:o.l||void 0}}}return null}}class C{constructor({trackingID:e,experienceID:t,solution:n,sessionId:s,xPath:r,verboseLogging:o=!1,sendToStaging:A=!1}){this.__status=u.UNAVAILABLE,this.__sentEventCount=0,this.sessionId=s,this.xPath=r,this.name=this.pluginName="NEXUS-PLUGIN",this.trackingID=e,this.experienceID=t,this.solution=n,this.verboseLogging=o,this.__queue=new E,this.url=A?"https://nexus.epigraph.dev/api/analytics/event":"https://api.myepigraph.com/api/analytics/event",this.__status=u.AVAILABLE}getStatus(){return this.__status}setStatus(e){this.__status=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,t){if(this.__queue.enqueue(e),!t){this.__status=u.RESTRICTED;return}await this.dequeueAndSendEvents()}async dequeueAndSendEvents(){for(let e=0;e<this.__queue.size;e++){const t=this.__queue.dequeue();t.customParameters.solution=this.solution;const n={trackingID:this.trackingID,experience_id:this.experienceID,action:t.eventName,parameters:t.getParameters()};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(n)})).status===200,""}catch{return""}this.__sentEventCount++}return""}}class f{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(n=>{n===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()})})}}var l=(i=>(i.OneTrust="onetrust",i))(l||{});class a{constructor({eventName:e,interactiveEvent:t,customParameters:n}){this.eventName=e,this.interactiveEvent=t,this.customParameters=n}getParameters(){let e={interactive_event:this.interactiveEvent};return e=Object.assign(e,JSON.parse(JSON.stringify(this.customParameters))),e}}class I extends a{constructor(e=[]){super({eventName:"epigraph_ar_requested",interactiveEvent:!0,customParameters:{items:e}})}}class L extends a{constructor(e){super({eventName:"epigraph_module_loading",interactiveEvent:!1,customParameters:{is_pre_config:e}})}}class S extends a{constructor(e,t){super({eventName:"epigraph_module_ready",interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t}})}}class x extends a{constructor(e,t,n){super({eventName:"epigraph_module_failed",interactiveEvent:!1,customParameters:{is_pre_config:e,load_time_ms:t,error_type:n}})}}class T extends a{constructor(e=[]){super({eventName:"epigraph_module_closed",interactiveEvent:!0,customParameters:{items:e}})}}class q extends a{constructor(e,t={}){super({eventName:"epigraph_support_detected",interactiveEvent:!1,customParameters:{support_type:e,device_capabilities:t}})}}class z extends a{constructor(e,t){super({eventName:"epigraph_button_click",interactiveEvent:!0,customParameters:{button_type:e,button_name:t}})}}class R extends a{constructor(e=[],t,n,s){super({eventName:"epigraph_panel_opened",interactiveEvent:t,customParameters:{items:e,panel_type:n,trigger_source:s}})}}class D extends a{constructor(e=[],t,n,s){super({eventName:"epigraph_panel_closed",interactiveEvent:t,customParameters:{items:e,panel_type:n,trigger_source:s}})}}class O extends a{constructor(e=[]){super({eventName:"epigraph_add_to_favourites",interactiveEvent:!0,customParameters:{items:e}})}}class b extends a{constructor(e){super({eventName:"epigraph_keyboard_interaction",interactiveEvent:!0,customParameters:{action_performed:e}})}}class G extends a{constructor(e){super({eventName:"epigraph_touch_interaction",interactiveEvent:!0,customParameters:{interaction_type:e}})}}class M extends a{constructor(e=[],t,n,s,r){super({eventName:"epigraph_item_added",interactiveEvent:t,customParameters:{items:e,value:n,currency:s,quantity:r}})}}class $ extends a{constructor(e=[]){super({eventName:"epigraph_item_moved",interactiveEvent:!0,customParameters:{items:e}})}}class k extends a{constructor(e=[],t,n,s){super({eventName:"epigraph_item_removed",interactiveEvent:!0,customParameters:{items:e,value:t,currency:n,quantity:s}})}}class F extends a{constructor(e=[],t){super({eventName:"epigraph_variant_changed",interactiveEvent:!0,customParameters:{items:e,change_type:t}})}}class j extends a{constructor(e=[],t,n){super({eventName:"epigraph_content_shared",interactiveEvent:!0,customParameters:{items:e,content_type:t,share_destination:n}})}}class U extends a{constructor(e=[],t,n){super({eventName:"epigraph_checkout",interactiveEvent:!0,customParameters:{items:e,value:t,currency:n}})}}class B extends a{constructor(e=[],t,n){super({eventName:"epigraph_conversion",interactiveEvent:!0,customParameters:{items:e,value:t,currency:n}})}}class V extends a{constructor(e){super({eventName:"epigraph_changeRate",interactiveEvent:!1,customParameters:{value:e}})}}class J extends a{constructor(e){super({eventName:"epigraph_completionRate",interactiveEvent:!1,customParameters:{value:e}})}}class H extends a{constructor(e){super({eventName:"epigraph_engagementRate",interactiveEvent:!1,customParameters:{value:e}})}}class X extends a{constructor(e,t,n){super({eventName:e,interactiveEvent:t,customParameters:n})}}/**
2
2
  * @license
3
3
  * Copyright (c) 2023 Epigraph LLC. All Rights Reserved.
4
4
  *
@@ -13,4 +13,4 @@
13
13
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
- */var y;const c=Symbol("analyticsPluginsMap");y=c;class K{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 t=e;this.__overrideConsent=t.detail.hasConsent;for(const n of this[c].values())this.__hasConsent()||n.setStatus(u.RESTRICTED)}addEventPlugin(e){this[c].has(e.getUniquePluginIdentifier())||(this[c].set(e.getUniquePluginIdentifier(),e),e.setupPlugin())}__hasConsent(){let e=!0;return this.__overrideConsent!==void 0?(e=this.__overrideConsent,e):(this.__consentPlugin&&(e=this.__consentPlugin.hasConsent()),e)}sendEvent(e){this[c].forEach(t=>{t.sendEvent(e,this.__hasConsent())})}buildConsentPlugin(e,t){return e.toLowerCase()===l.OneTrust.toLowerCase()?new f(t):null}}exports.ConsentPluginNames=l;exports.EpigraphAddToFavouritesEvent=R;exports.EpigraphAnalytics=K;exports.EpigraphArRequestedEvent=I;exports.EpigraphButtonClickEvent=z;exports.EpigraphChangeRateEvent=V;exports.EpigraphCheckoutEvent=U;exports.EpigraphCompletionRateEvent=J;exports.EpigraphContentSharedEvent=F;exports.EpigraphConversionEvent=B;exports.EpigraphCustomEvent=X;exports.EpigraphEngagementRateEvent=H;exports.EpigraphItemAddedEvent=M;exports.EpigraphItemMovedEvent=$;exports.EpigraphItemRemovedEvent=k;exports.EpigraphKeyboardInteractionEvent=b;exports.EpigraphModuleClosedEvent=T;exports.EpigraphModuleFailedEvent=x;exports.EpigraphModuleLoadingEvent=S;exports.EpigraphModuleReadyEvent=L;exports.EpigraphPanelClosedEvent=G;exports.EpigraphPanelOpenedEvent=O;exports.EpigraphSupportDetectedEvent=q;exports.EpigraphTouchInteractionEvent=D;exports.EpigraphVariantChangedEvent=j;exports.GA4AnalyticsPlugin=P;exports.NexusAnalyticsPlugin=C;exports.OneTrustConsentPlugin=f;
16
+ */var y;const c=Symbol("analyticsPluginsMap");y=c;class K{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 t=e;this.__overrideConsent=t.detail.hasConsent;for(const n of this[c].values())this.__hasConsent()||n.setStatus(u.RESTRICTED)}addEventPlugin(e){this[c].has(e.getUniquePluginIdentifier())||(this[c].set(e.getUniquePluginIdentifier(),e),e.setupPlugin())}__hasConsent(){let e=!0;return this.__overrideConsent!==void 0?(e=this.__overrideConsent,e):(this.__consentPlugin&&(e=this.__consentPlugin.hasConsent()),e)}sendEvent(e){this[c].forEach(t=>{t.sendEvent(e,this.__hasConsent())})}buildConsentPlugin(e,t){return e.toLowerCase()===l.OneTrust.toLowerCase()?new f(t):null}}exports.ConsentPluginNames=l;exports.EpigraphAddToFavouritesEvent=O;exports.EpigraphAnalytics=K;exports.EpigraphArRequestedEvent=I;exports.EpigraphButtonClickEvent=z;exports.EpigraphChangeRateEvent=V;exports.EpigraphCheckoutEvent=U;exports.EpigraphCompletionRateEvent=J;exports.EpigraphContentSharedEvent=j;exports.EpigraphConversionEvent=B;exports.EpigraphCustomEvent=X;exports.EpigraphEngagementRateEvent=H;exports.EpigraphItemAddedEvent=M;exports.EpigraphItemMovedEvent=$;exports.EpigraphItemRemovedEvent=k;exports.EpigraphKeyboardInteractionEvent=b;exports.EpigraphModuleClosedEvent=T;exports.EpigraphModuleFailedEvent=x;exports.EpigraphModuleLoadingEvent=L;exports.EpigraphModuleReadyEvent=S;exports.EpigraphPanelClosedEvent=D;exports.EpigraphPanelOpenedEvent=R;exports.EpigraphSupportDetectedEvent=q;exports.EpigraphTouchInteractionEvent=G;exports.EpigraphVariantChangedEvent=F;exports.GA4AnalyticsPlugin=N;exports.NexusAnalyticsPlugin=C;exports.OneTrustConsentPlugin=f;
@@ -1,17 +1,17 @@
1
- var u = /* @__PURE__ */ ((s) => (s.UNAVAILABLE = "unavailable", s.AVAILABLE = "available", s.RESTRICTED = "restricted", s))(u || {});
1
+ var u = /* @__PURE__ */ ((i) => (i.UNAVAILABLE = "unavailable", i.AVAILABLE = "available", i.RESTRICTED = "restricted", i))(u || {});
2
2
  const p = Symbol("data"), d = Symbol("next"), w = class m {
3
- constructor(e) {
4
- this[p] = e, this[d] = null;
3
+ constructor(t) {
4
+ this[p] = t, this[d] = null;
5
5
  }
6
6
  get data() {
7
7
  return this[p];
8
8
  }
9
- set next(e) {
10
- if (!(e instanceof m) && e !== null)
9
+ set next(t) {
10
+ if (!(t instanceof m) && t !== null)
11
11
  throw new Error(
12
12
  "This node is not an instance of the custom class 'Node'."
13
13
  );
14
- this[d] = e;
14
+ this[d] = t;
15
15
  }
16
16
  get next() {
17
17
  return this[d];
@@ -23,25 +23,25 @@ class A {
23
23
  constructor() {
24
24
  this[l] = null;
25
25
  }
26
- set head(e) {
27
- this[l] = e;
26
+ set head(t) {
27
+ this[l] = t;
28
28
  }
29
29
  get head() {
30
30
  return this[l];
31
31
  }
32
- addToTail(e) {
33
- let t = this.head;
34
- if (t) {
35
- for (; t.next !== null; )
36
- t = t?.next;
37
- return t.next = new g(e);
32
+ addToTail(t) {
33
+ let e = this.head;
34
+ if (e) {
35
+ for (; e.next !== null; )
36
+ e = e?.next;
37
+ return e.next = new g(t);
38
38
  }
39
- return this.head = new g(e);
39
+ return this.head = new g(t);
40
40
  }
41
41
  removeHead() {
42
- const e = this.head;
43
- if (e)
44
- return this.head = e.next, e.data;
42
+ const t = this.head;
43
+ if (t)
44
+ return this.head = t.next, t.data;
45
45
  }
46
46
  }
47
47
  const _ = Symbol("queue"), h = Symbol("size");
@@ -55,28 +55,28 @@ class v {
55
55
  get size() {
56
56
  return this[h];
57
57
  }
58
- enqueue(e) {
59
- this.queue.addToTail(e), this[h]++;
58
+ enqueue(t) {
59
+ this.queue.addToTail(t), this[h]++;
60
60
  }
61
61
  dequeue() {
62
- const e = this.queue.removeHead();
63
- return this[h]--, e;
62
+ const t = this.queue.removeHead();
63
+ return this[h]--, t;
64
64
  }
65
65
  }
66
66
  class P {
67
67
  constructor({
68
- trackingID: e,
69
- experienceID: t,
68
+ trackingID: t,
69
+ experienceID: e,
70
70
  solution: n,
71
- verboseLogging: i = !1
71
+ verboseLogging: s = !1
72
72
  }) {
73
- this.dataLayerName = "dataLayer", this.__status = u.UNAVAILABLE, this.__sentEventCount = 0, this.__initializationAttempts = 0, this.__lastInitializationAttempt = 0, 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 = t, this.solution = n, this.verboseLogging = i, this.__queue = new v(), this.initializePlugin();
73
+ this.dataLayerName = "dataLayer", this.__status = u.UNAVAILABLE, this.__sentEventCount = 0, this.__initializationAttempts = 0, this.__lastInitializationAttempt = 0, 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 = e, this.solution = n, this.verboseLogging = s, this.__queue = new v(), this.initializePlugin();
74
74
  }
75
75
  getStatus() {
76
76
  return this.__status;
77
77
  }
78
- setStatus(e) {
79
- this.__status = e;
78
+ setStatus(t) {
79
+ this.__status = t;
80
80
  }
81
81
  getPendingEventCount() {
82
82
  return this.__queue.size;
@@ -102,8 +102,8 @@ class P {
102
102
  * @param eventData IAnalyticsEvent The event to be tracked
103
103
  * @param consent boolean Whether consent is granted
104
104
  */
105
- async sendEvent(e, t) {
106
- if (this.__queue.enqueue(e), !t) {
105
+ async sendEvent(t, e) {
106
+ if (this.__queue.enqueue(t), !e) {
107
107
  this.__status = u.RESTRICTED;
108
108
  return;
109
109
  }
@@ -120,24 +120,24 @@ class P {
120
120
  async initializePlugin() {
121
121
  if (this.__isInitialized)
122
122
  return;
123
- const e = Date.now();
123
+ const t = Date.now();
124
124
  if (this.__initializationAttempts >= this.__maxInitializationAttempts) {
125
125
  this.__nexusFailureReported || (await this.reportFailureToNexus("MAX_INITIALIZATION_ATTEMPTS", "Maximum initialization attempts reached"), this.__nexusFailureReported = !0);
126
126
  return;
127
127
  }
128
- if (e - this.__lastInitializationAttempt < this.__initializationRetryDelay)
128
+ if (t - this.__lastInitializationAttempt < this.__initializationRetryDelay)
129
129
  return;
130
- this.__lastInitializationAttempt = e, this.__initializationAttempts++;
131
- const t = await this.detectAndSetupAnalytics();
132
- t.success ? (this.__isInitialized = !0, this.__status = u.AVAILABLE, this.__initializationMethod = t.method, this.dataLayerName = t.dataLayerName, this.dataLayer = window[this.dataLayerName], this.logger(`Successfully initialized ${t.method} with dataLayer: ${this.dataLayerName}`), this.__queue.size > 0 && await this.dequeueAndSendEvents()) : (this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${t.error}`), this.__initializationAttempts < this.__maxInitializationAttempts && setTimeout(() => this.initializePlugin(), this.__initializationRetryDelay));
130
+ this.__lastInitializationAttempt = t, this.__initializationAttempts++;
131
+ const e = await this.detectAndSetupAnalytics();
132
+ e.success ? (this.__isInitialized = !0, this.__status = u.AVAILABLE, this.__initializationMethod = e.method, this.dataLayerName = e.dataLayerName, this.dataLayer = window[this.dataLayerName], this.logger(`Successfully initialized ${e.method} with dataLayer: ${this.dataLayerName}`), this.__queue.size > 0 && await this.dequeueAndSendEvents()) : (this.logger(`Initialization attempt ${this.__initializationAttempts} failed: ${e.error}`), this.__initializationAttempts < this.__maxInitializationAttempts && setTimeout(() => this.initializePlugin(), this.__initializationRetryDelay));
133
133
  }
134
134
  async detectAndSetupAnalytics() {
135
- const e = this.detectGTM();
136
- if (e)
137
- return this.logger(`GTM detected with container ID: ${e.containerId}`), {
135
+ const t = this.detectGTM();
136
+ if (t)
137
+ return this.logger(`GTM detected with container ID: ${t.containerId}`), {
138
138
  success: !0,
139
139
  method: "GTM",
140
- dataLayerName: e.dataLayerName
140
+ dataLayerName: t.dataLayerName
141
141
  };
142
142
  if (window.dataLayer)
143
143
  return this.logger("Existing dataLayer found"), {
@@ -145,9 +145,9 @@ class P {
145
145
  method: "GA4",
146
146
  dataLayerName: "dataLayer"
147
147
  };
148
- const t = this.findGA4ScriptInfo(this.trackingID);
149
- if (t) {
150
- const n = t.l || "dataLayer";
148
+ const e = this.findGA4ScriptInfo(this.trackingID);
149
+ if (e) {
150
+ const n = e.l || "dataLayer";
151
151
  if (this.logger(`GA4 script found, setting up with dataLayer: ${n}`), this.setupGA4(n))
152
152
  return {
153
153
  success: !0,
@@ -167,15 +167,15 @@ class P {
167
167
  };
168
168
  }
169
169
  detectGTM() {
170
- const e = document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');
171
- for (const t of Array.from(e)) {
172
- const n = t.getAttribute("src");
170
+ const t = document.querySelectorAll('script[src*="googletagmanager.com/gtm"]');
171
+ for (const e of Array.from(t)) {
172
+ const n = e.getAttribute("src");
173
173
  if (n) {
174
- const i = n.match(/gtm\.js\?id=([^&]+)/);
175
- if (i) {
174
+ const s = n.match(/gtm\.js\?id=([^&]+)/);
175
+ if (s) {
176
176
  const r = n.match(/&l=([^&]+)/), o = r ? r[1] : "dataLayer";
177
177
  return {
178
- containerId: i[1],
178
+ containerId: s[1],
179
179
  dataLayerName: o
180
180
  };
181
181
  }
@@ -183,14 +183,14 @@ class P {
183
183
  }
184
184
  return null;
185
185
  }
186
- setupGA4(e) {
186
+ setupGA4(t) {
187
187
  try {
188
- return window[e] || (window[e] = []), window.epgDataLayerName = e, typeof window.gtag != "function" && (window.gtag = function() {
189
- const t = window.epgDataLayerName;
190
- t && window[t] && Array.isArray(window[t]) && window[t].push(arguments);
188
+ return window[t] || (window[t] = []), window.epgDataLayerName = t, typeof window.gtag != "function" && (window.gtag = function() {
189
+ const e = window.epgDataLayerName;
190
+ e && window[e] && Array.isArray(window[e]) && window[e].push(arguments);
191
191
  }, window.gtag("js", /* @__PURE__ */ new Date()), window.gtag("config", this.trackingID, { send_page_view: !1 })), !0;
192
- } catch (t) {
193
- return this.logger(`Error setting up GA4: ${t}`), !1;
192
+ } catch (e) {
193
+ return this.logger(`Error setting up GA4: ${e}`), !1;
194
194
  }
195
195
  }
196
196
  /**
@@ -200,17 +200,19 @@ class P {
200
200
  async dequeueAndSendEvents() {
201
201
  if (!this.__isInitialized || !this.dataLayer)
202
202
  return;
203
- let e = this.__queue.size;
204
- for (let t = 0; t < e; t++) {
205
- const n = this.__queue.dequeue(), i = n.getGa4Parameters(this.solution, this.experienceID);
206
- if (n.customParameters && Object.assign(i, n.customParameters), JSON.stringify(i).length > 459)
203
+ let t = this.__queue.size;
204
+ for (let e = 0; e < t; e++) {
205
+ const n = this.__queue.dequeue();
206
+ let s = n.getParameters();
207
+ if (s.solution = this.solution, s.experience_id = this.experienceID, n.customParameters && Object.assign(s, n.customParameters), JSON.stringify(s).length > 459)
207
208
  try {
208
- let o = await this.sendGA4LongParameters(i);
209
- i.epg_event_tag = o;
209
+ s = {
210
+ epg_event_tag: await this.sendGA4LongParameters(s)
211
+ };
210
212
  } catch {
211
213
  }
212
214
  try {
213
- this.__initializationMethod === "GTM" ? this.sendToGTM(n.eventName, i) : this.__initializationMethod === "GA4" && window.gtag("event", n.eventName, i), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`);
215
+ this.__initializationMethod === "GTM" ? this.sendToGTM(n.eventName, s) : this.__initializationMethod === "GA4" && window.gtag("event", n.eventName, s), this.__sentEventCount++, this.logger(`Analytics event successfully sent via ${this.__initializationMethod}: ${n.eventName}`);
214
216
  } catch (o) {
215
217
  this.logger(`Error sending event ${n.eventName}: ${o}`), this.__queue.enqueue(n);
216
218
  }
@@ -220,13 +222,13 @@ class P {
220
222
  * Checks if verboseLogging is enabled, then logs the error
221
223
  * @param err
222
224
  */
223
- logger(e) {
224
- this.verboseLogging && console.warn(e);
225
+ logger(t) {
226
+ this.verboseLogging && console.warn(t);
225
227
  }
226
- async sendGA4LongParameters(e) {
227
- const t = "https://api.myepigraph.com/api/analytics/ga4/custom", n = { parameters: e };
228
+ async sendGA4LongParameters(t) {
229
+ const e = "https://api.myepigraph.com/api/analytics/ga4/custom", n = { parameters: t };
228
230
  try {
229
- const i = await fetch(t, {
231
+ const s = await fetch(e, {
230
232
  method: "POST",
231
233
  // Assuming it's a POST request, adjust if necessary
232
234
  headers: {
@@ -235,26 +237,26 @@ class P {
235
237
  },
236
238
  body: JSON.stringify(n)
237
239
  });
238
- return i.ok ? (await i.json())?.id ?? "" : "";
240
+ return s.ok ? (await s.json())?.id ?? "" : "";
239
241
  } catch {
240
242
  return "";
241
243
  }
242
244
  }
243
- sendToGTM(e, t) {
245
+ sendToGTM(t, e) {
244
246
  this.dataLayer && this.dataLayer.push({
245
- event: e,
246
- ...t
247
+ event: t,
248
+ ...e
247
249
  });
248
250
  }
249
- async reportFailureToNexus(e, t) {
251
+ async reportFailureToNexus(t, e) {
250
252
  try {
251
253
  const n = {
252
254
  plugin: "GA4",
253
255
  trackingId: this.trackingID,
254
256
  solution: this.solution,
255
257
  experienceId: this.experienceID,
256
- failureType: e,
257
- errorMessage: t,
258
+ failureType: t,
259
+ errorMessage: e,
258
260
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
259
261
  url: window.location.href,
260
262
  userAgent: navigator.userAgent
@@ -264,12 +266,12 @@ class P {
264
266
  this.logger(`Error reporting failure to Nexus: ${n}`);
265
267
  }
266
268
  }
267
- findGA4ScriptInfo(e) {
268
- const t = document.querySelectorAll("script[src]");
269
- for (const n of t) {
270
- const i = n.getAttribute("src");
271
- if (i && i.includes(e)) {
272
- const r = new URL(i, location.href), o = Object.fromEntries(r.searchParams.entries());
269
+ findGA4ScriptInfo(t) {
270
+ const e = document.querySelectorAll("script[src]");
271
+ for (const n of e) {
272
+ const s = n.getAttribute("src");
273
+ if (s && s.includes(t)) {
274
+ const r = new URL(s, location.href), o = Object.fromEntries(r.searchParams.entries());
273
275
  return {
274
276
  fullSrc: r.href,
275
277
  id: o.id || void 0,
@@ -282,21 +284,21 @@ class P {
282
284
  }
283
285
  class I {
284
286
  constructor({
285
- trackingID: e,
286
- experienceID: t,
287
+ trackingID: t,
288
+ experienceID: e,
287
289
  solution: n,
288
- sessionId: i,
290
+ sessionId: s,
289
291
  xPath: r,
290
292
  verboseLogging: o = !1,
291
293
  sendToStaging: y = !1
292
294
  }) {
293
- this.__status = u.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = i, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = e, this.experienceID = t, this.solution = n, this.verboseLogging = o, this.__queue = new v(), this.url = y ? "https://nexus.epigraph.dev/api/analytics/event" : "https://api.myepigraph.com/api/analytics/event", this.__status = u.AVAILABLE;
295
+ this.__status = u.UNAVAILABLE, this.__sentEventCount = 0, this.sessionId = s, this.xPath = r, this.name = this.pluginName = "NEXUS-PLUGIN", this.trackingID = t, this.experienceID = e, this.solution = n, this.verboseLogging = o, this.__queue = new v(), this.url = y ? "https://nexus.epigraph.dev/api/analytics/event" : "https://api.myepigraph.com/api/analytics/event", this.__status = u.AVAILABLE;
294
296
  }
295
297
  getStatus() {
296
298
  return this.__status;
297
299
  }
298
- setStatus(e) {
299
- this.__status = e;
300
+ setStatus(t) {
301
+ this.__status = t;
300
302
  }
301
303
  getPendingEventCount() {
302
304
  return this.__queue.size;
@@ -312,22 +314,22 @@ class I {
312
314
  }
313
315
  setupPlugin() {
314
316
  }
315
- async sendEvent(e, t) {
316
- if (this.__queue.enqueue(e), !t) {
317
+ async sendEvent(t, e) {
318
+ if (this.__queue.enqueue(t), !e) {
317
319
  this.__status = u.RESTRICTED;
318
320
  return;
319
321
  }
320
322
  await this.dequeueAndSendEvents();
321
323
  }
322
324
  async dequeueAndSendEvents() {
323
- for (let e = 0; e < this.__queue.size; e++) {
324
- const t = this.__queue.dequeue();
325
- t.customParameters.solution = this.solution;
325
+ for (let t = 0; t < this.__queue.size; t++) {
326
+ const e = this.__queue.dequeue();
327
+ e.customParameters.solution = this.solution;
326
328
  const n = {
327
329
  trackingID: this.trackingID,
328
330
  experience_id: this.experienceID,
329
- action: t.eventName,
330
- parameters: t.getNexusParameters()
331
+ action: e.eventName,
332
+ parameters: e.getParameters()
331
333
  };
332
334
  try {
333
335
  return (await fetch(this.url, {
@@ -351,8 +353,8 @@ class I {
351
353
  }
352
354
  }
353
355
  class N {
354
- constructor(e) {
355
- this.consentSet = !1, this.consent = !1, this.pluginName = "OneTrustConsentPlugin", this.consentIdentifier = e, this.consent = !1, this.addConsentChangedListener();
356
+ constructor(t) {
357
+ this.consentSet = !1, this.consent = !1, this.pluginName = "OneTrustConsentPlugin", this.consentIdentifier = t, this.consent = !1, this.addConsentChangedListener();
356
358
  }
357
359
  /**
358
360
  * Checks to see if the user has consented. If this is false, it will block all analytics
@@ -361,8 +363,8 @@ class N {
361
363
  if (this.consentSet)
362
364
  return this.consent;
363
365
  if (window.OnetrustActiveGroups !== void 0) {
364
- let e = window.OnetrustActiveGroups;
365
- e !== void 0 && e.split(",").forEach((n) => {
366
+ let t = window.OnetrustActiveGroups;
367
+ t !== void 0 && t.split(",").forEach((n) => {
366
368
  n === this.consentIdentifier && (this.consent = !0, this.consentSet = !0);
367
369
  });
368
370
  }
@@ -376,314 +378,291 @@ class N {
376
378
  });
377
379
  }
378
380
  }
379
- var E = /* @__PURE__ */ ((s) => (s.OneTrust = "onetrust", s))(E || {});
381
+ var E = /* @__PURE__ */ ((i) => (i.OneTrust = "onetrust", i))(E || {});
380
382
  class a {
381
383
  constructor({
382
- eventName: e,
383
- interactiveEvent: t,
384
+ eventName: t,
385
+ interactiveEvent: e,
384
386
  customParameters: n
385
387
  }) {
386
- this.eventName = e, this.interactiveEvent = t, this.customParameters = n;
387
- }
388
- getGa4Parameters(e, t) {
389
- let n = {
390
- solution: e,
391
- experience_id: t,
392
- interactive_event: this.interactiveEvent,
393
- items: [],
394
- epg_event_tag: ""
395
- };
396
- return n = Object.assign(n, JSON.parse(JSON.stringify(this.customParameters))), n;
397
- }
398
- getGTMParameters() {
399
- return {};
388
+ this.eventName = t, this.interactiveEvent = e, this.customParameters = n;
400
389
  }
401
- getNexusParameters() {
402
- let e = {
403
- interactive_event: this.interactiveEvent,
404
- items: []
390
+ getParameters() {
391
+ let t = {
392
+ interactive_event: this.interactiveEvent
405
393
  };
406
- return e = Object.assign(e, JSON.parse(JSON.stringify(this.customParameters))), e;
394
+ return t = Object.assign(t, JSON.parse(JSON.stringify(this.customParameters))), t;
407
395
  }
408
396
  }
409
397
  class C extends a {
410
- constructor(e = []) {
398
+ constructor(t = []) {
411
399
  super({
412
400
  eventName: "epigraph_ar_requested",
413
401
  interactiveEvent: !0,
414
402
  customParameters: {
415
- items: e
403
+ items: t
416
404
  }
417
405
  });
418
406
  }
419
407
  }
420
408
  class L extends a {
421
- constructor(e = [], t) {
409
+ constructor(t) {
422
410
  super({
423
411
  eventName: "epigraph_module_loading",
424
412
  interactiveEvent: !1,
425
413
  customParameters: {
426
- items: e,
427
414
  is_pre_config: t
428
415
  }
429
416
  });
430
417
  }
431
418
  }
432
419
  class S extends a {
433
- constructor(e = [], t, n) {
420
+ constructor(t, e) {
434
421
  super({
435
422
  eventName: "epigraph_module_ready",
436
423
  interactiveEvent: !1,
437
424
  customParameters: {
438
- items: e,
439
425
  is_pre_config: t,
440
- load_time_ms: n
426
+ load_time_ms: e
441
427
  }
442
428
  });
443
429
  }
444
430
  }
445
431
  class x extends a {
446
- constructor(e = [], t, n, i) {
432
+ constructor(t, e, n) {
447
433
  super({
448
434
  eventName: "epigraph_module_failed",
449
435
  interactiveEvent: !1,
450
436
  customParameters: {
451
- items: e,
452
437
  is_pre_config: t,
453
- load_time_ms: n,
454
- error_type: i
438
+ load_time_ms: e,
439
+ error_type: n
455
440
  }
456
441
  });
457
442
  }
458
443
  }
459
444
  class T extends a {
460
- constructor(e = []) {
445
+ constructor(t = []) {
461
446
  super({
462
447
  eventName: "epigraph_module_closed",
463
448
  interactiveEvent: !0,
464
449
  customParameters: {
465
- items: e
450
+ items: t
466
451
  }
467
452
  });
468
453
  }
469
454
  }
470
455
  class z extends a {
471
- constructor(e = [], t, n = {}) {
456
+ constructor(t, e = {}) {
472
457
  super({
473
458
  eventName: "epigraph_support_detected",
474
459
  interactiveEvent: !1,
475
460
  customParameters: {
476
- items: e,
477
461
  support_type: t,
478
- device_capabilities: n
462
+ device_capabilities: e
479
463
  }
480
464
  });
481
465
  }
482
466
  }
483
467
  class q extends a {
484
- constructor(e = [], t, n) {
468
+ constructor(t, e) {
485
469
  super({
486
470
  eventName: "epigraph_button_click",
487
471
  interactiveEvent: !0,
488
472
  customParameters: {
489
- items: e,
490
473
  button_type: t,
491
- button_name: n
474
+ button_name: e
492
475
  }
493
476
  });
494
477
  }
495
478
  }
496
- class G extends a {
497
- constructor(e = [], t, n, i) {
479
+ class D extends a {
480
+ constructor(t = [], e, n, s) {
498
481
  super({
499
482
  eventName: "epigraph_panel_opened",
500
- interactiveEvent: t,
483
+ interactiveEvent: e,
501
484
  customParameters: {
502
- items: e,
485
+ items: t,
503
486
  panel_type: n,
504
- trigger_source: i
487
+ trigger_source: s
505
488
  }
506
489
  });
507
490
  }
508
491
  }
509
- class O extends a {
510
- constructor(e = [], t, n, i) {
492
+ class G extends a {
493
+ constructor(t = [], e, n, s) {
511
494
  super({
512
495
  eventName: "epigraph_panel_closed",
513
- interactiveEvent: t,
496
+ interactiveEvent: e,
514
497
  customParameters: {
515
- items: e,
498
+ items: t,
516
499
  panel_type: n,
517
- trigger_source: i
500
+ trigger_source: s
518
501
  }
519
502
  });
520
503
  }
521
504
  }
522
- class D extends a {
523
- constructor(e = []) {
505
+ class O extends a {
506
+ constructor(t = []) {
524
507
  super({
525
508
  eventName: "epigraph_add_to_favourites",
526
509
  interactiveEvent: !0,
527
510
  customParameters: {
528
- items: e
511
+ items: t
529
512
  }
530
513
  });
531
514
  }
532
515
  }
533
516
  class b extends a {
534
- constructor(e = [], t) {
517
+ constructor(t) {
535
518
  super({
536
519
  eventName: "epigraph_keyboard_interaction",
537
520
  interactiveEvent: !0,
538
521
  customParameters: {
539
- items: e,
540
522
  action_performed: t
541
523
  }
542
524
  });
543
525
  }
544
526
  }
545
527
  class R extends a {
546
- constructor(e = [], t) {
528
+ constructor(t) {
547
529
  super({
548
530
  eventName: "epigraph_touch_interaction",
549
531
  interactiveEvent: !0,
550
532
  customParameters: {
551
- items: e,
552
533
  interaction_type: t
553
534
  }
554
535
  });
555
536
  }
556
537
  }
557
538
  class M extends a {
558
- constructor(e = [], t, n, i, r) {
539
+ constructor(t = [], e, n, s, r) {
559
540
  super({
560
541
  eventName: "epigraph_item_added",
561
- interactiveEvent: t,
542
+ interactiveEvent: e,
562
543
  customParameters: {
563
- items: e,
544
+ items: t,
564
545
  value: n,
565
- currency: i,
546
+ currency: s,
566
547
  quantity: r
567
548
  }
568
549
  });
569
550
  }
570
551
  }
571
552
  class $ extends a {
572
- constructor(e = []) {
553
+ constructor(t = []) {
573
554
  super({
574
555
  eventName: "epigraph_item_moved",
575
556
  interactiveEvent: !0,
576
557
  customParameters: {
577
- items: e
558
+ items: t
578
559
  }
579
560
  });
580
561
  }
581
562
  }
582
563
  class k extends a {
583
- constructor(e = [], t, n) {
564
+ constructor(t = [], e, n, s) {
584
565
  super({
585
566
  eventName: "epigraph_item_removed",
586
567
  interactiveEvent: !0,
587
568
  customParameters: {
588
- items: e,
589
- currency: t,
590
- quantity: n
569
+ items: t,
570
+ value: e,
571
+ currency: n,
572
+ quantity: s
591
573
  }
592
574
  });
593
575
  }
594
576
  }
595
- class j extends a {
596
- constructor(e = [], t) {
577
+ class U extends a {
578
+ constructor(t = [], e) {
597
579
  super({
598
580
  eventName: "epigraph_variant_changed",
599
581
  interactiveEvent: !0,
600
582
  customParameters: {
601
- items: e,
602
- change_type: t
583
+ items: t,
584
+ change_type: e
603
585
  }
604
586
  });
605
587
  }
606
588
  }
607
- class U extends a {
608
- constructor(e = [], t, n) {
589
+ class j extends a {
590
+ constructor(t = [], e, n) {
609
591
  super({
610
592
  eventName: "epigraph_content_shared",
611
593
  interactiveEvent: !0,
612
594
  customParameters: {
613
- items: e,
614
- content_type: t,
595
+ items: t,
596
+ content_type: e,
615
597
  share_destination: n
616
598
  }
617
599
  });
618
600
  }
619
601
  }
620
602
  class F extends a {
621
- constructor(e = [], t, n) {
603
+ constructor(t = [], e, n) {
622
604
  super({
623
605
  eventName: "epigraph_checkout",
624
606
  interactiveEvent: !0,
625
607
  customParameters: {
626
- items: e,
627
- value: t,
608
+ items: t,
609
+ value: e,
628
610
  currency: n
629
611
  }
630
612
  });
631
613
  }
632
614
  }
633
615
  class B extends a {
634
- constructor(e = [], t, n) {
616
+ constructor(t = [], e, n) {
635
617
  super({
636
618
  eventName: "epigraph_conversion",
637
619
  interactiveEvent: !0,
638
620
  customParameters: {
639
- items: e,
640
- value: t,
621
+ items: t,
622
+ value: e,
641
623
  currency: n
642
624
  }
643
625
  });
644
626
  }
645
627
  }
646
- class J extends a {
647
- constructor(e = [], t) {
628
+ class V extends a {
629
+ constructor(t) {
648
630
  super({
649
631
  eventName: "epigraph_changeRate",
650
632
  interactiveEvent: !1,
651
633
  customParameters: {
652
- items: e,
653
634
  value: t
654
635
  }
655
636
  });
656
637
  }
657
638
  }
658
- class V extends a {
659
- constructor(e = [], t) {
639
+ class J extends a {
640
+ constructor(t) {
660
641
  super({
661
642
  eventName: "epigraph_completionRate",
662
643
  interactiveEvent: !1,
663
644
  customParameters: {
664
- items: e,
665
645
  value: t
666
646
  }
667
647
  });
668
648
  }
669
649
  }
670
650
  class H extends a {
671
- constructor(e = [], t) {
651
+ constructor(t) {
672
652
  super({
673
653
  eventName: "epigraph_engagementRate",
674
654
  interactiveEvent: !1,
675
655
  customParameters: {
676
- items: e,
677
656
  value: t
678
657
  }
679
658
  });
680
659
  }
681
660
  }
682
661
  class X extends a {
683
- constructor(e, t, n) {
662
+ constructor(t, e, n) {
684
663
  super({
685
- eventName: e,
686
- interactiveEvent: t,
664
+ eventName: t,
665
+ interactiveEvent: e,
687
666
  customParameters: n
688
667
  });
689
668
  }
@@ -708,12 +687,12 @@ var f;
708
687
  const c = Symbol("analyticsPluginsMap");
709
688
  f = c;
710
689
  class K {
711
- constructor(e, t) {
712
- this[f] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, e && t && (this.__consentPlugin = this.buildConsentPlugin(e, t)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
690
+ constructor(t, e) {
691
+ this[f] = /* @__PURE__ */ new Map(), this.__consentPlugin = null, t && e && (this.__consentPlugin = this.buildConsentPlugin(t, e)), window.addEventListener("epigraphAnalyticsConsentChange", this.__onConsentChangeFromEvent);
713
692
  }
714
- __onConsentChangeFromEvent(e) {
715
- let t = e;
716
- this.__overrideConsent = t.detail.hasConsent;
693
+ __onConsentChangeFromEvent(t) {
694
+ let e = t;
695
+ this.__overrideConsent = e.detail.hasConsent;
717
696
  for (const n of this[c].values())
718
697
  this.__hasConsent() || n.setStatus(u.RESTRICTED);
719
698
  }
@@ -724,11 +703,11 @@ class K {
724
703
  *
725
704
  * @param plugin
726
705
  */
727
- addEventPlugin(e) {
728
- this[c].has(e.getUniquePluginIdentifier()) || (this[c].set(
729
- e.getUniquePluginIdentifier(),
730
- e
731
- ), e.setupPlugin());
706
+ addEventPlugin(t) {
707
+ this[c].has(t.getUniquePluginIdentifier()) || (this[c].set(
708
+ t.getUniquePluginIdentifier(),
709
+ t
710
+ ), t.setupPlugin());
732
711
  }
733
712
  /**
734
713
  * Resolves session consent by prioritizing this._overrideConsent and if not found,
@@ -737,17 +716,17 @@ class K {
737
716
  * @returns {boolean} Whether the session has consent to track analytics or not.
738
717
  */
739
718
  __hasConsent() {
740
- let e = !0;
741
- return this.__overrideConsent !== void 0 ? (e = this.__overrideConsent, e) : (this.__consentPlugin && (e = this.__consentPlugin.hasConsent()), e);
719
+ let t = !0;
720
+ return this.__overrideConsent !== void 0 ? (t = this.__overrideConsent, t) : (this.__consentPlugin && (t = this.__consentPlugin.hasConsent()), t);
742
721
  }
743
722
  /**
744
723
  * Send an Event to all plugins
745
724
  *
746
725
  * @param eventData
747
726
  */
748
- sendEvent(e) {
749
- this[c].forEach((t) => {
750
- t.sendEvent(e, this.__hasConsent());
727
+ sendEvent(t) {
728
+ this[c].forEach((e) => {
729
+ e.sendEvent(t, this.__hasConsent());
751
730
  });
752
731
  }
753
732
  /**
@@ -756,20 +735,20 @@ class K {
756
735
  * @param consentIdentifier
757
736
  * @private
758
737
  */
759
- buildConsentPlugin(e, t) {
760
- return e.toLowerCase() === E.OneTrust.toLowerCase() ? new N(t) : null;
738
+ buildConsentPlugin(t, e) {
739
+ return t.toLowerCase() === E.OneTrust.toLowerCase() ? new N(e) : null;
761
740
  }
762
741
  }
763
742
  export {
764
743
  E as ConsentPluginNames,
765
- D as EpigraphAddToFavouritesEvent,
744
+ O as EpigraphAddToFavouritesEvent,
766
745
  K as EpigraphAnalytics,
767
746
  C as EpigraphArRequestedEvent,
768
747
  q as EpigraphButtonClickEvent,
769
- J as EpigraphChangeRateEvent,
748
+ V as EpigraphChangeRateEvent,
770
749
  F as EpigraphCheckoutEvent,
771
- V as EpigraphCompletionRateEvent,
772
- U as EpigraphContentSharedEvent,
750
+ J as EpigraphCompletionRateEvent,
751
+ j as EpigraphContentSharedEvent,
773
752
  B as EpigraphConversionEvent,
774
753
  X as EpigraphCustomEvent,
775
754
  H as EpigraphEngagementRateEvent,
@@ -781,11 +760,11 @@ export {
781
760
  x as EpigraphModuleFailedEvent,
782
761
  L as EpigraphModuleLoadingEvent,
783
762
  S as EpigraphModuleReadyEvent,
784
- O as EpigraphPanelClosedEvent,
785
- G as EpigraphPanelOpenedEvent,
763
+ G as EpigraphPanelClosedEvent,
764
+ D as EpigraphPanelOpenedEvent,
786
765
  z as EpigraphSupportDetectedEvent,
787
766
  R as EpigraphTouchInteractionEvent,
788
- j as EpigraphVariantChangedEvent,
767
+ U as EpigraphVariantChangedEvent,
789
768
  P as GA4AnalyticsPlugin,
790
769
  I as NexusAnalyticsPlugin,
791
770
  N as OneTrustConsentPlugin
@@ -8,39 +8,30 @@ declare class BaseAnalyticsEvent implements IAnalyticsEvent {
8
8
  interactiveEvent: boolean;
9
9
  customParameters: Record<string, unknown>;
10
10
  });
11
- getGa4Parameters(solution: string, experienceId: string): {
12
- solution: string;
13
- experience_id: string;
11
+ getParameters(): {
14
12
  interactive_event: boolean;
15
- items: never[];
16
- epg_event_tag: string;
17
- };
18
- getGTMParameters(): {};
19
- getNexusParameters(): {
20
- interactive_event: boolean;
21
- items: never[];
22
13
  };
23
14
  }
24
15
  export declare class EpigraphArRequestedEvent extends BaseAnalyticsEvent {
25
16
  constructor(items?: IAnalyticsParameterItems);
26
17
  }
27
18
  export declare class EpigraphModuleLoadingEvent extends BaseAnalyticsEvent {
28
- constructor(items: IAnalyticsParameterItems | undefined, isPreConfig: boolean);
19
+ constructor(isPreConfig: boolean);
29
20
  }
30
21
  export declare class EpigraphModuleReadyEvent extends BaseAnalyticsEvent {
31
- constructor(items: IAnalyticsParameterItems | undefined, isPreConfig: boolean, loadTimeMs: number);
22
+ constructor(isPreConfig: boolean, loadTimeMs: number);
32
23
  }
33
24
  export declare class EpigraphModuleFailedEvent extends BaseAnalyticsEvent {
34
- constructor(items: IAnalyticsParameterItems | undefined, isPreConfig: boolean, loadTimeMs: number, errorType: string);
25
+ constructor(isPreConfig: boolean, loadTimeMs: number, errorType: string);
35
26
  }
36
27
  export declare class EpigraphModuleClosedEvent extends BaseAnalyticsEvent {
37
28
  constructor(items?: IAnalyticsParameterItems);
38
29
  }
39
30
  export declare class EpigraphSupportDetectedEvent extends BaseAnalyticsEvent {
40
- constructor(items: IAnalyticsParameterItems | undefined, supportType: string, deviceCapabilities?: Record<string, unknown>);
31
+ constructor(supportType: string, deviceCapabilities?: Record<string, unknown>);
41
32
  }
42
33
  export declare class EpigraphButtonClickEvent extends BaseAnalyticsEvent {
43
- constructor(items: IAnalyticsParameterItems | undefined, buttonType: string, buttonName: string);
34
+ constructor(buttonType: string, buttonName: string);
44
35
  }
45
36
  export declare class EpigraphPanelOpenedEvent extends BaseAnalyticsEvent {
46
37
  constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, panelType: string, triggerSource: string);
@@ -52,10 +43,10 @@ export declare class EpigraphAddToFavouritesEvent extends BaseAnalyticsEvent {
52
43
  constructor(items?: IAnalyticsParameterItems);
53
44
  }
54
45
  export declare class EpigraphKeyboardInteractionEvent extends BaseAnalyticsEvent {
55
- constructor(items: IAnalyticsParameterItems | undefined, actionPerformed: string);
46
+ constructor(actionPerformed: string);
56
47
  }
57
48
  export declare class EpigraphTouchInteractionEvent extends BaseAnalyticsEvent {
58
- constructor(items: IAnalyticsParameterItems | undefined, interactionType: string);
49
+ constructor(interactionType: string);
59
50
  }
60
51
  export declare class EpigraphItemAddedEvent extends BaseAnalyticsEvent {
61
52
  constructor(items: IAnalyticsParameterItems | undefined, isInteractive: boolean, value: number, currency: string, quantity: number);
@@ -64,7 +55,7 @@ export declare class EpigraphItemMovedEvent extends BaseAnalyticsEvent {
64
55
  constructor(items?: IAnalyticsParameterItems);
65
56
  }
66
57
  export declare class EpigraphItemRemovedEvent extends BaseAnalyticsEvent {
67
- constructor(items: IAnalyticsParameterItems | undefined, currency: string, quantity: number);
58
+ constructor(items: IAnalyticsParameterItems | undefined, value: number, currency: string, quantity: number);
68
59
  }
69
60
  export declare class EpigraphVariantChangedEvent extends BaseAnalyticsEvent {
70
61
  constructor(items: IAnalyticsParameterItems | undefined, changeType: string);
@@ -73,19 +64,19 @@ export declare class EpigraphContentSharedEvent extends BaseAnalyticsEvent {
73
64
  constructor(items: IAnalyticsParameterItems | undefined, contentType: string, shareDestination: string);
74
65
  }
75
66
  export declare class EpigraphCheckoutEvent extends BaseAnalyticsEvent {
76
- constructor(items: Array<any> | undefined, value: number, currency: string);
67
+ constructor(items: IAnalyticsParameterItems | undefined, value: number, currency: string);
77
68
  }
78
69
  export declare class EpigraphConversionEvent extends BaseAnalyticsEvent {
79
70
  constructor(items: IAnalyticsParameterItems | undefined, value: number, currency: string);
80
71
  }
81
72
  export declare class EpigraphChangeRateEvent extends BaseAnalyticsEvent {
82
- constructor(items: IAnalyticsParameterItems | undefined, value: number);
73
+ constructor(value: number);
83
74
  }
84
75
  export declare class EpigraphCompletionRateEvent extends BaseAnalyticsEvent {
85
- constructor(items: IAnalyticsParameterItems | undefined, value: number);
76
+ constructor(value: number);
86
77
  }
87
78
  export declare class EpigraphEngagementRateEvent extends BaseAnalyticsEvent {
88
- constructor(items: IAnalyticsParameterItems | undefined, value: number);
79
+ constructor(value: number);
89
80
  }
90
81
  export declare class EpigraphCustomEvent extends BaseAnalyticsEvent {
91
82
  constructor(eventName: string, interactiveEvent: boolean, customParameters: Record<string, unknown>);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epigraph/epigraph-std-lib",
3
- "version": "4.5.2-alpha",
3
+ "version": "4.5.3-alpha",
4
4
  "type": "module",
5
5
  "main": "./dist/epigraph-std-lib.cjs",
6
6
  "module": "./dist/epigraph-std-lib.js",