@compilacion/colleciones-clientos 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{collecionesClientos.js → collecionesClientos.iife.js} +57 -11
- package/dist/collecionesClientos.iife.js.map +1 -0
- package/dist/index.cjs +438 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.mjs +431 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +7 -2
- package/dist/collecionesClientos.js.map +0 -1
|
@@ -52,6 +52,25 @@
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
|
|
55
|
+
const getBrowserContext = function() {
|
|
56
|
+
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
|
57
|
+
return {};
|
|
58
|
+
}
|
|
59
|
+
return {
|
|
60
|
+
hasFocus: document.hasFocus(),
|
|
61
|
+
language: navigator.language,
|
|
62
|
+
platform: navigator.platform,
|
|
63
|
+
referrer: document.referrer,
|
|
64
|
+
screenHeight: window.screen.height,
|
|
65
|
+
screenWidth: window.screen.width,
|
|
66
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
67
|
+
url: window.location.href,
|
|
68
|
+
userAgent: navigator.userAgent,
|
|
69
|
+
viewportHeight: window.innerHeight,
|
|
70
|
+
viewportWidth: window.innerWidth,
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
|
|
55
74
|
class CollecionesBaseEvent {
|
|
56
75
|
|
|
57
76
|
constructor() {
|
|
@@ -110,6 +129,25 @@
|
|
|
110
129
|
this.data = data;
|
|
111
130
|
}
|
|
112
131
|
|
|
132
|
+
addAttribute(name, value) {
|
|
133
|
+
return this.addField(name, value);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
addField(name, value) {
|
|
137
|
+
if (typeof this.data.fields !== 'object' || this.data.fields === null) {
|
|
138
|
+
this.data.fields = {};
|
|
139
|
+
}
|
|
140
|
+
this.data.fields[name] = value;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
setTracker(name) {
|
|
144
|
+
this.data.tracker = name;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
setAppName(name) {
|
|
148
|
+
this.data.appName = name;
|
|
149
|
+
}
|
|
150
|
+
|
|
113
151
|
convertParamIdentifiers(param) {
|
|
114
152
|
if (typeof param === 'object' && param !== null && !Array.isArray(param)) {
|
|
115
153
|
for (const [key, value] of Object.entries(param)) {
|
|
@@ -225,6 +263,8 @@
|
|
|
225
263
|
for (const [key, value] of Object.entries(this.identifiers)) {
|
|
226
264
|
collecionesEvent.addIdentifier(key, value);
|
|
227
265
|
}
|
|
266
|
+
collecionesEvent.setTracker(this.trackerName);
|
|
267
|
+
collecionesEvent.setAppName(this.appName);
|
|
228
268
|
this.emitters.forEach(element => {
|
|
229
269
|
element.track(collecionesEvent, this.trackerName, this.appName);
|
|
230
270
|
});
|
|
@@ -232,6 +272,21 @@
|
|
|
232
272
|
}
|
|
233
273
|
}
|
|
234
274
|
|
|
275
|
+
class CollecionesWebTracker extends CollecionesTracker {
|
|
276
|
+
|
|
277
|
+
constructor(emitters, trackerName, appName) {
|
|
278
|
+
super(emitters, trackerName, appName);
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
track(collecionesEvent) {
|
|
282
|
+
if (!(collecionesEvent instanceof CollecionesBaseEvent)) {
|
|
283
|
+
throw new Error('Event must be of type CollecionesEvent');
|
|
284
|
+
}
|
|
285
|
+
collecionesEvent.addField('browserContext', getBrowserContext());
|
|
286
|
+
super.track(collecionesEvent);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
235
290
|
class CollecionesEvent extends CollecionesBaseEvent {
|
|
236
291
|
|
|
237
292
|
constructor(name, data, identifiers) {
|
|
@@ -332,16 +387,6 @@
|
|
|
332
387
|
this.data.entityIdentifiers[key] = value;
|
|
333
388
|
}
|
|
334
389
|
|
|
335
|
-
addAttribute(key, value) {
|
|
336
|
-
if (typeof key !== 'string') {
|
|
337
|
-
throw new Error('Attribute key must be a string');
|
|
338
|
-
}
|
|
339
|
-
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
340
|
-
throw new Error('Attribute value must be a string or number');
|
|
341
|
-
}
|
|
342
|
-
this.data.attributes[key] = value;
|
|
343
|
-
}
|
|
344
|
-
|
|
345
390
|
}
|
|
346
391
|
|
|
347
392
|
class CollecionesSemanticCollectionEvent extends CollecionesSemanticEvent {
|
|
@@ -388,10 +433,11 @@
|
|
|
388
433
|
(function(global) {
|
|
389
434
|
global.CollecionesEmitter = CollecionesEmitter;
|
|
390
435
|
global.CollecionesTracker = CollecionesTracker;
|
|
436
|
+
global.CollecionesWebTracker = CollecionesWebTracker;
|
|
391
437
|
global.CollecionesEvent = CollecionesEvent;
|
|
392
438
|
global.CollecionesSemanticEvent = CollecionesSemanticEvent;
|
|
393
439
|
global.CollecionesSemanticCollectionEvent = CollecionesSemanticCollectionEvent;
|
|
394
440
|
})(typeof window !== 'undefined' ? window : globalThis);
|
|
395
441
|
|
|
396
442
|
})();
|
|
397
|
-
//# sourceMappingURL=collecionesClientos.js.map
|
|
443
|
+
//# sourceMappingURL=collecionesClientos.iife.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collecionesClientos.iife.js","sources":["../src/utils/utils.js","../src/CollecionesBaseEvent.js","../src/CollecionesEmitter.js","../src/CollecionesTracker.js","../src/CollecionesWebTracker.js","../src/CollecionesEvent.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","../src/CollecionesSemanticEvent.js","../src/CollecionesSemanticCollectionEvent.js","../src/collecionesClientos.js"],"sourcesContent":["// helper 'private' functions\nconst underscoreToCamelCase = function (str) {\n str = str.replace(/[^\\x00-\\x7F_]/g, '');\n return str\n .split('_')\n .map((word, index) => {\n if (index === 0) {\n return word;\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n}\n\nconst formatAdjectives = function (adjectiveParameter) {\n let errorMsg = new Error('Adjective must be a string, an array of strings, or undefined');\n if (typeof adjectiveParameter === 'undefined') {\n return undefined;\n }\n if (typeof adjectiveParameter === 'string') {\n return [underscoreToCamelCase(adjectiveParameter)];\n }\n if (Array.isArray(adjectiveParameter) && adjectiveParameter.every(item => typeof item === 'string')) {\n let returnValue = [];\n adjectiveParameter.forEach((adjectiveParameter) => {\n if (!typeof item === 'string') {\n throw errorMsg;\n }\n returnValue.push(underscoreToCamelCase(adjectiveParameter));\n });\n return returnValue;\n }\n throw errorMsg;\n}\n\nconst stringifyAdjectives = function (adjective) {\n if (!Array.isArray(adjective) || adjective.length === 0) {\n return undefined;\n }\n const uniqueSorted = [...new Set(adjective)].sort();\n return '.' + uniqueSorted.join('.');\n}\n\nconst toBase64 = function (str) {\n if (typeof window !== 'undefined' && window.btoa) {\n return window.btoa(unescape(encodeURIComponent(str)));\n } else {\n return Buffer.from(str, 'utf-8').toString('base64');\n }\n}\n\nconst fromBase64 = function (b64) {\n if (typeof window !== 'undefined' && window.atob) {\n return decodeURIComponent(escape(window.atob(b64)));\n } else {\n return Buffer.from(b64, 'base64').toString('utf-8');\n }\n}\n\nconst getBrowserContext = function() {\n if (typeof window === 'undefined' || typeof navigator === 'undefined') {\n return {};\n }\n return {\n hasFocus: document.hasFocus(),\n language: navigator.language,\n platform: navigator.platform,\n referrer: document.referrer,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n url: window.location.href,\n userAgent: navigator.userAgent,\n viewportHeight: window.innerHeight,\n viewportWidth: window.innerWidth,\n };\n}\n\nexport {\n formatAdjectives,\n fromBase64,\n getBrowserContext,\n stringifyAdjectives,\n toBase64,\n underscoreToCamelCase\n};","import { toBase64 } from './utils/utils.js';\n\nclass CollecionesBaseEvent {\n\n constructor() {\n this.eventName = '';\n this.data = {};\n this.data.meta = {\n eventFormat: 'CollecionesBaseEvent',\n eventFormatVersion: '1'\n };\n const now = new Date();\n this.data.timestamps = {};\n this.data.timestamps.clientDatetimeUtc = now.toISOString();\n if (typeof window !== 'undefined' && typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.clientDatetimeLocal = now.toLocaleString(navigator.language);\n this.data.timestamps.timeZone = navigator.language;\n } else {\n this.data.timestamps.clientDatetimeLocal = now.toISOString();\n this.data.timestamps.timeZone = 'UTC';\n }\n }\n\n setEventName(name) {\n this.eventName = name;\n }\n\n getEventName() {\n return this.eventName;\n }\n\n getEventFormat() {\n let v = this.data?.meta?.eventFormat;\n return (typeof v !== 'undefined') ? v : '1';\n }\n\n getEventFormatVersion() {\n let v = this.data?.meta?.eventFormatVersion;\n return (typeof v !== 'undefined') ? v : 'CollecionesBaseEvent';\n }\n\n getPostObject() {\n const now = new Date();\n if (typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.sentDatetime = now.toLocaleString(navigator.language);\n } else {\n this.data.timestamps.sentDatetime = now.toISOString();\n }\n return {\n eventname: this.getEventName(),\n eventFormat: this.getEventFormat(),\n eventFormatVersion: this.getEventFormatVersion(),\n payload: toBase64(this.getPayload())\n };\n }\n\n setData(data) {\n this.data = data;\n }\n\n addAttribute(name, value) {\n return this.addField(name, value);\n }\n\n addField(name, value) {\n if (typeof this.data.fields !== 'object' || this.data.fields === null) {\n this.data.fields = {};\n }\n this.data.fields[name] = value;\n }\n\n setTracker(name) {\n this.data.tracker = name;\n }\n\n setAppName(name) {\n this.data.appName = name;\n }\n\n convertParamIdentifiers(param) {\n if (typeof param === 'object' && param !== null && !Array.isArray(param)) {\n for (const [key, value] of Object.entries(param)) {\n this.addIdentifier(key, value);\n }\n }\n }\n\n addIdentifier(name, value) {\n if (typeof this.data.identifiers !== 'object' || this.data.identifiers === null) {\n this.data.identifiers = {};\n }\n this.data.identifiers[name] = value;\n }\n\n getPayload() {\n return JSON.stringify(this.data);\n }\n\n}\n\nexport default CollecionesBaseEvent;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\nimport {toBase64} from './utils/utils.js';\n\nclass CollecionesEmitter {\n\n constructor(endpoint = '/collect', flushSize = 10, flushInterval = false) {\n this.endpoint = endpoint;\n this.flushInterval = flushInterval;\n this.flushSize = flushSize;\n this.buffer = [];\n this.timer = null;\n }\n\n startTimer() {\n this.stopTimer();\n if (typeof this.flushInterval == 'number' && this.flushInterval > 0) {\n this.timer = setInterval(() => this.flush(), this.flushInterval);\n }\n }\n\n startTimerIfStopped() {\n if (!this.timer) {\n this.startTimer();\n }\n }\n\n stopTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n this.timer = null;\n }\n\n track(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.trackAsync(event);\n }\n\n async trackAsync(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.startTimerIfStopped();\n this.buffer.push(event);\n return (this.buffer.length >= this.flushSize) ? this.flush() : Promise.resolve();\n }\n\n async flush() {\n if (this.buffer.length === 0) return;\n const eventsToSend = [...this.buffer];\n this.buffer = [];\n let postPayload = [];\n eventsToSend.forEach((e) => {\n postPayload.push( e.getPostObject() );\n });\n this.stopTimer();\n try {\n const response = await fetch(this.endpoint, {\n method: 'POST',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(postPayload)\n });\n if (!response.ok) {\n console.log(`Failed to send events: ${response.statusText}`);\n }\n return true;\n } catch (error) {\n console.log(`Network error sending events: ${error.message}`);\n } \n }\n}\n\nexport default CollecionesEmitter;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesTracker {\n \n constructor(emitters, trackerName, appName) {\n this.emitters = emitters;\n this.trackerName = trackerName;\n this.appName = appName;\n this.identifiers = {};\n }\n\n addIdentifier(name, value) {\n this.identifiers[name] = value;\n }\n\n track(collecionesEvent) {\n if (!(collecionesEvent instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be of type CollecionesEvent');\n }\n for (const [key, value] of Object.entries(this.identifiers)) {\n collecionesEvent.addIdentifier(key, value);\n }\n collecionesEvent.setTracker(this.trackerName);\n collecionesEvent.setAppName(this.appName); \n this.emitters.forEach(element => {\n element.track(collecionesEvent, this.trackerName, this.appName);\n });\n \n }\n}\n\nexport default CollecionesTracker;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\nimport CollecionesTracker from './CollecionesTracker.js';\nimport { getBrowserContext } from './utils/utils.js';\n\nclass CollecionesWebTracker extends CollecionesTracker {\n \n constructor(emitters, trackerName, appName) {\n super(emitters, trackerName, appName);\n }\n\n track(collecionesEvent) {\n if (!(collecionesEvent instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be of type CollecionesEvent');\n }\n collecionesEvent.addField('browserContext', getBrowserContext());\n super.track(collecionesEvent); \n }\n}\n\nexport default CollecionesWebTracker;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesEvent extends CollecionesBaseEvent {\n\n constructor(name, data, identifiers) {\n super();\n this.setEventName(name);\n Object.assign(this.data, data);\n this.convertParamIdentifiers(identifiers);\n }\n\n}\n\nexport default CollecionesEvent;","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","import { v4 as uuidv4 } from 'uuid';\nimport {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesSemanticEvent extends CollecionesBaseEvent {\n\n constructor(entity, action, adjective, identifiers) {\n super();\n this.entity = underscoreToCamelCase(entity);\n this.action = underscoreToCamelCase(action);\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n this.eventName = `${this.entity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.convertParamIdentifiers(identifiers);\n this.data.entityIdentifiers = {};\n this.data.attributes = {};\n this.data.clientEventId = uuidv4();\n this.data.meta = {\n eventFormat: 'CollecionesSemanticEvent',\n eventFormatVersion: '1'\n };\n }\n\n setData() {\n throw new Error('setData deprecated in semantic events');\n }\n\n addEntityIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n throw new Error('Entity identifier value must be a string or number');\n }\n this.data.entityIdentifiers[key] = value;\n }\n\n}\n\nexport default CollecionesSemanticEvent;","import {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesSemanticEvent from './CollecionesSemanticEvent.js';\n\nclass CollecionesSemanticCollectionEvent extends CollecionesSemanticEvent {\n\n constructor(itemEntity, action, adjective, identifiers, collectionEntity) {\n if(typeof collectionEntity == 'undefined') {\n collectionEntity = `${itemEntity}Collection`;\n }\n super(collectionEntity, action, undefined, identifiers);\n this.data.meta = {\n eventFormat: 'CollecionesSemanticCollectionEvent',\n eventFormatVersion: '1'\n };\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n itemEntity = underscoreToCamelCase(itemEntity);\n this.data.itemEntity = itemEntity;\n this.data.itemEventName = `${itemEntity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.data.entityItemIdentifiers = {};\n }\n\n addEntityItemIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number' && !Array.isArray(value)) {\n throw new Error('Entity identifier value must be a string or number');\n }\n if(typeof this.data.entityItemIdentifiers[key] == 'undefined') {\n this.data.entityItemIdentifiers[key] = [];\n }\n if(Array.isArray(value)) {\n value.forEach((v)=> {\n this.data.entityItemIdentifiers[key].push(v);\n });\n } else {\n this.data.entityItemIdentifiers[key].push(value);\n }\n }\n\n \n}\n\nexport default CollecionesSemanticCollectionEvent;","import CollecionesEmitter from './CollecionesEmitter.js';\nimport CollecionesTracker from './CollecionesTracker.js';\nimport CollecionesWebTracker from './CollecionesWebTracker.js';\nimport CollecionesEvent from './CollecionesEvent.js';\nimport CollecionesSemanticEvent from './CollecionesSemanticEvent.js';\nimport CollecionesSemanticCollectionEvent from './CollecionesSemanticCollectionEvent.js';\n\n(function(global) {\n global.CollecionesEmitter = CollecionesEmitter;\n global.CollecionesTracker = CollecionesTracker;\n global.CollecionesWebTracker = CollecionesWebTracker;\n global.CollecionesEvent = CollecionesEvent;\n global.CollecionesSemanticEvent = CollecionesSemanticEvent;\n global.CollecionesSemanticCollectionEvent = CollecionesSemanticCollectionEvent;\n})(typeof window !== 'undefined' ? window : globalThis);"],"names":["uuidv4"],"mappings":";;;IAAA;IACA,MAAM,qBAAqB,GAAG,UAAU,GAAG,EAAE;IAC7C,IAAI,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;IAC3C,IAAI,OAAO;IACX,SAAS,KAAK,CAAC,GAAG;IAClB,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK;IAC9B,YAAY,IAAI,KAAK,KAAK,CAAC,EAAE;IAC7B,gBAAgB,OAAO,IAAI;IAC3B;IACA,YAAY,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;IAC7E,SAAS;IACT,SAAS,IAAI,CAAC,EAAE,CAAC;IACjB;;IAEA,MAAM,gBAAgB,GAAG,UAAU,kBAAkB,EAAE;IACvD,IAAI,IAAI,QAAQ,GAAG,IAAI,KAAK,CAAC,+DAA+D,CAAC;IAC7F,IAAI,IAAI,OAAO,kBAAkB,KAAK,WAAW,EAAE;I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;IACA;;IAEA;IACA;;ICnCA,CAAC,SAAS,MAAM,EAAE;IAClB,EAAE,MAAM,CAAC,kBAAkB,GAAG,kBAAkB;IAChD,EAAE,MAAM,CAAC,kBAAkB,GAAG,kBAAkB;IAChD,EAAE,MAAM,CAAC,qBAAqB,GAAG,qBAAqB;IACtD,EAAE,MAAM,CAAC,gBAAgB,GAAG,gBAAgB;IAC5C,EAAE,MAAM,CAAC,wBAAwB,GAAG,wBAAwB;IAC5D,EAAE,MAAM,CAAC,kCAAkC,GAAG,kCAAkC;IAChF,CAAC,EAAE,OAAO,MAAM,KAAK,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;;;;;;","x_google_ignoreList":[6,7,8,9]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// helper 'private' functions
|
|
4
|
+
const underscoreToCamelCase = function (str) {
|
|
5
|
+
str = str.replace(/[^\x00-\x7F_]/g, '');
|
|
6
|
+
return str
|
|
7
|
+
.split('_')
|
|
8
|
+
.map((word, index) => {
|
|
9
|
+
if (index === 0) {
|
|
10
|
+
return word;
|
|
11
|
+
}
|
|
12
|
+
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
13
|
+
})
|
|
14
|
+
.join('');
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const formatAdjectives = function (adjectiveParameter) {
|
|
18
|
+
let errorMsg = new Error('Adjective must be a string, an array of strings, or undefined');
|
|
19
|
+
if (typeof adjectiveParameter === 'undefined') {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
if (typeof adjectiveParameter === 'string') {
|
|
23
|
+
return [underscoreToCamelCase(adjectiveParameter)];
|
|
24
|
+
}
|
|
25
|
+
if (Array.isArray(adjectiveParameter) && adjectiveParameter.every(item => typeof item === 'string')) {
|
|
26
|
+
let returnValue = [];
|
|
27
|
+
adjectiveParameter.forEach((adjectiveParameter) => {
|
|
28
|
+
if (!typeof item === 'string') {
|
|
29
|
+
throw errorMsg;
|
|
30
|
+
}
|
|
31
|
+
returnValue.push(underscoreToCamelCase(adjectiveParameter));
|
|
32
|
+
});
|
|
33
|
+
return returnValue;
|
|
34
|
+
}
|
|
35
|
+
throw errorMsg;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const stringifyAdjectives = function (adjective) {
|
|
39
|
+
if (!Array.isArray(adjective) || adjective.length === 0) {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
const uniqueSorted = [...new Set(adjective)].sort();
|
|
43
|
+
return '.' + uniqueSorted.join('.');
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const toBase64 = function (str) {
|
|
47
|
+
if (typeof window !== 'undefined' && window.btoa) {
|
|
48
|
+
return window.btoa(unescape(encodeURIComponent(str)));
|
|
49
|
+
} else {
|
|
50
|
+
return Buffer.from(str, 'utf-8').toString('base64');
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const getBrowserContext = function() {
|
|
55
|
+
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
|
56
|
+
return {};
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
hasFocus: document.hasFocus(),
|
|
60
|
+
language: navigator.language,
|
|
61
|
+
platform: navigator.platform,
|
|
62
|
+
referrer: document.referrer,
|
|
63
|
+
screenHeight: window.screen.height,
|
|
64
|
+
screenWidth: window.screen.width,
|
|
65
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
66
|
+
url: window.location.href,
|
|
67
|
+
userAgent: navigator.userAgent,
|
|
68
|
+
viewportHeight: window.innerHeight,
|
|
69
|
+
viewportWidth: window.innerWidth,
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
class CollecionesBaseEvent {
|
|
74
|
+
|
|
75
|
+
constructor() {
|
|
76
|
+
this.eventName = '';
|
|
77
|
+
this.data = {};
|
|
78
|
+
this.data.meta = {
|
|
79
|
+
eventFormat: 'CollecionesBaseEvent',
|
|
80
|
+
eventFormatVersion: '1'
|
|
81
|
+
};
|
|
82
|
+
const now = new Date();
|
|
83
|
+
this.data.timestamps = {};
|
|
84
|
+
this.data.timestamps.clientDatetimeUtc = now.toISOString();
|
|
85
|
+
if (typeof window !== 'undefined' && typeof navigator !== 'undefined' && navigator.language) {
|
|
86
|
+
this.data.timestamps.clientDatetimeLocal = now.toLocaleString(navigator.language);
|
|
87
|
+
this.data.timestamps.timeZone = navigator.language;
|
|
88
|
+
} else {
|
|
89
|
+
this.data.timestamps.clientDatetimeLocal = now.toISOString();
|
|
90
|
+
this.data.timestamps.timeZone = 'UTC';
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
setEventName(name) {
|
|
95
|
+
this.eventName = name;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
getEventName() {
|
|
99
|
+
return this.eventName;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
getEventFormat() {
|
|
103
|
+
let v = this.data?.meta?.eventFormat;
|
|
104
|
+
return (typeof v !== 'undefined') ? v : '1';
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
getEventFormatVersion() {
|
|
108
|
+
let v = this.data?.meta?.eventFormatVersion;
|
|
109
|
+
return (typeof v !== 'undefined') ? v : 'CollecionesBaseEvent';
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
getPostObject() {
|
|
113
|
+
const now = new Date();
|
|
114
|
+
if (typeof navigator !== 'undefined' && navigator.language) {
|
|
115
|
+
this.data.timestamps.sentDatetime = now.toLocaleString(navigator.language);
|
|
116
|
+
} else {
|
|
117
|
+
this.data.timestamps.sentDatetime = now.toISOString();
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
eventname: this.getEventName(),
|
|
121
|
+
eventFormat: this.getEventFormat(),
|
|
122
|
+
eventFormatVersion: this.getEventFormatVersion(),
|
|
123
|
+
payload: toBase64(this.getPayload())
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
setData(data) {
|
|
128
|
+
this.data = data;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
addAttribute(name, value) {
|
|
132
|
+
return this.addField(name, value);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
addField(name, value) {
|
|
136
|
+
if (typeof this.data.fields !== 'object' || this.data.fields === null) {
|
|
137
|
+
this.data.fields = {};
|
|
138
|
+
}
|
|
139
|
+
this.data.fields[name] = value;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
setTracker(name) {
|
|
143
|
+
this.data.tracker = name;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
setAppName(name) {
|
|
147
|
+
this.data.appName = name;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
convertParamIdentifiers(param) {
|
|
151
|
+
if (typeof param === 'object' && param !== null && !Array.isArray(param)) {
|
|
152
|
+
for (const [key, value] of Object.entries(param)) {
|
|
153
|
+
this.addIdentifier(key, value);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
addIdentifier(name, value) {
|
|
159
|
+
if (typeof this.data.identifiers !== 'object' || this.data.identifiers === null) {
|
|
160
|
+
this.data.identifiers = {};
|
|
161
|
+
}
|
|
162
|
+
this.data.identifiers[name] = value;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
getPayload() {
|
|
166
|
+
return JSON.stringify(this.data);
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
class CollecionesEmitter {
|
|
172
|
+
|
|
173
|
+
constructor(endpoint = '/collect', flushSize = 10, flushInterval = false) {
|
|
174
|
+
this.endpoint = endpoint;
|
|
175
|
+
this.flushInterval = flushInterval;
|
|
176
|
+
this.flushSize = flushSize;
|
|
177
|
+
this.buffer = [];
|
|
178
|
+
this.timer = null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
startTimer() {
|
|
182
|
+
this.stopTimer();
|
|
183
|
+
if (typeof this.flushInterval == 'number' && this.flushInterval > 0) {
|
|
184
|
+
this.timer = setInterval(() => this.flush(), this.flushInterval);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
startTimerIfStopped() {
|
|
189
|
+
if (!this.timer) {
|
|
190
|
+
this.startTimer();
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
stopTimer() {
|
|
195
|
+
if (this.timer) {
|
|
196
|
+
clearInterval(this.timer);
|
|
197
|
+
}
|
|
198
|
+
this.timer = null;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
track(event) {
|
|
202
|
+
if (!(event instanceof CollecionesBaseEvent)) {
|
|
203
|
+
throw new Error('Event must be an instance of CollecionesBaseEvent');
|
|
204
|
+
}
|
|
205
|
+
this.trackAsync(event);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
async trackAsync(event) {
|
|
209
|
+
if (!(event instanceof CollecionesBaseEvent)) {
|
|
210
|
+
throw new Error('Event must be an instance of CollecionesBaseEvent');
|
|
211
|
+
}
|
|
212
|
+
this.startTimerIfStopped();
|
|
213
|
+
this.buffer.push(event);
|
|
214
|
+
return (this.buffer.length >= this.flushSize) ? this.flush() : Promise.resolve();
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
async flush() {
|
|
218
|
+
if (this.buffer.length === 0) return;
|
|
219
|
+
const eventsToSend = [...this.buffer];
|
|
220
|
+
this.buffer = [];
|
|
221
|
+
let postPayload = [];
|
|
222
|
+
eventsToSend.forEach((e) => {
|
|
223
|
+
postPayload.push( e.getPostObject() );
|
|
224
|
+
});
|
|
225
|
+
this.stopTimer();
|
|
226
|
+
try {
|
|
227
|
+
const response = await fetch(this.endpoint, {
|
|
228
|
+
method: 'POST',
|
|
229
|
+
credentials: 'include',
|
|
230
|
+
headers: {
|
|
231
|
+
'Content-Type': 'application/json'
|
|
232
|
+
},
|
|
233
|
+
body: JSON.stringify(postPayload)
|
|
234
|
+
});
|
|
235
|
+
if (!response.ok) {
|
|
236
|
+
console.log(`Failed to send events: ${response.statusText}`);
|
|
237
|
+
}
|
|
238
|
+
return true;
|
|
239
|
+
} catch (error) {
|
|
240
|
+
console.log(`Network error sending events: ${error.message}`);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
class CollecionesTracker {
|
|
246
|
+
|
|
247
|
+
constructor(emitters, trackerName, appName) {
|
|
248
|
+
this.emitters = emitters;
|
|
249
|
+
this.trackerName = trackerName;
|
|
250
|
+
this.appName = appName;
|
|
251
|
+
this.identifiers = {};
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
addIdentifier(name, value) {
|
|
255
|
+
this.identifiers[name] = value;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
track(collecionesEvent) {
|
|
259
|
+
if (!(collecionesEvent instanceof CollecionesBaseEvent)) {
|
|
260
|
+
throw new Error('Event must be of type CollecionesEvent');
|
|
261
|
+
}
|
|
262
|
+
for (const [key, value] of Object.entries(this.identifiers)) {
|
|
263
|
+
collecionesEvent.addIdentifier(key, value);
|
|
264
|
+
}
|
|
265
|
+
collecionesEvent.setTracker(this.trackerName);
|
|
266
|
+
collecionesEvent.setAppName(this.appName);
|
|
267
|
+
this.emitters.forEach(element => {
|
|
268
|
+
element.track(collecionesEvent, this.trackerName, this.appName);
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
class CollecionesWebTracker extends CollecionesTracker {
|
|
275
|
+
|
|
276
|
+
constructor(emitters, trackerName, appName) {
|
|
277
|
+
super(emitters, trackerName, appName);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
track(collecionesEvent) {
|
|
281
|
+
if (!(collecionesEvent instanceof CollecionesBaseEvent)) {
|
|
282
|
+
throw new Error('Event must be of type CollecionesEvent');
|
|
283
|
+
}
|
|
284
|
+
collecionesEvent.addField('browserContext', getBrowserContext());
|
|
285
|
+
super.track(collecionesEvent);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
class CollecionesEvent extends CollecionesBaseEvent {
|
|
290
|
+
|
|
291
|
+
constructor(name, data, identifiers) {
|
|
292
|
+
super();
|
|
293
|
+
this.setEventName(name);
|
|
294
|
+
Object.assign(this.data, data);
|
|
295
|
+
this.convertParamIdentifiers(identifiers);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
const byteToHex = [];
|
|
301
|
+
for (let i = 0; i < 256; ++i) {
|
|
302
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
303
|
+
}
|
|
304
|
+
function unsafeStringify(arr, offset = 0) {
|
|
305
|
+
return (byteToHex[arr[offset + 0]] +
|
|
306
|
+
byteToHex[arr[offset + 1]] +
|
|
307
|
+
byteToHex[arr[offset + 2]] +
|
|
308
|
+
byteToHex[arr[offset + 3]] +
|
|
309
|
+
'-' +
|
|
310
|
+
byteToHex[arr[offset + 4]] +
|
|
311
|
+
byteToHex[arr[offset + 5]] +
|
|
312
|
+
'-' +
|
|
313
|
+
byteToHex[arr[offset + 6]] +
|
|
314
|
+
byteToHex[arr[offset + 7]] +
|
|
315
|
+
'-' +
|
|
316
|
+
byteToHex[arr[offset + 8]] +
|
|
317
|
+
byteToHex[arr[offset + 9]] +
|
|
318
|
+
'-' +
|
|
319
|
+
byteToHex[arr[offset + 10]] +
|
|
320
|
+
byteToHex[arr[offset + 11]] +
|
|
321
|
+
byteToHex[arr[offset + 12]] +
|
|
322
|
+
byteToHex[arr[offset + 13]] +
|
|
323
|
+
byteToHex[arr[offset + 14]] +
|
|
324
|
+
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
let getRandomValues;
|
|
328
|
+
const rnds8 = new Uint8Array(16);
|
|
329
|
+
function rng() {
|
|
330
|
+
if (!getRandomValues) {
|
|
331
|
+
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
332
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
333
|
+
}
|
|
334
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
335
|
+
}
|
|
336
|
+
return getRandomValues(rnds8);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
340
|
+
var native = { randomUUID };
|
|
341
|
+
|
|
342
|
+
function v4(options, buf, offset) {
|
|
343
|
+
if (native.randomUUID && true && !options) {
|
|
344
|
+
return native.randomUUID();
|
|
345
|
+
}
|
|
346
|
+
options = options || {};
|
|
347
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
348
|
+
if (rnds.length < 16) {
|
|
349
|
+
throw new Error('Random bytes length must be >= 16');
|
|
350
|
+
}
|
|
351
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
352
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
353
|
+
return unsafeStringify(rnds);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
class CollecionesSemanticEvent extends CollecionesBaseEvent {
|
|
357
|
+
|
|
358
|
+
constructor(entity, action, adjective, identifiers) {
|
|
359
|
+
super();
|
|
360
|
+
this.entity = underscoreToCamelCase(entity);
|
|
361
|
+
this.action = underscoreToCamelCase(action);
|
|
362
|
+
this.adjective = formatAdjectives(adjective);
|
|
363
|
+
let adjectiveString = stringifyAdjectives(this.adjective);
|
|
364
|
+
this.eventName = `${this.entity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;
|
|
365
|
+
this.convertParamIdentifiers(identifiers);
|
|
366
|
+
this.data.entityIdentifiers = {};
|
|
367
|
+
this.data.attributes = {};
|
|
368
|
+
this.data.clientEventId = v4();
|
|
369
|
+
this.data.meta = {
|
|
370
|
+
eventFormat: 'CollecionesSemanticEvent',
|
|
371
|
+
eventFormatVersion: '1'
|
|
372
|
+
};
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
setData() {
|
|
376
|
+
throw new Error('setData deprecated in semantic events');
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
addEntityIdentifier(key, value) {
|
|
380
|
+
if (typeof key !== 'string') {
|
|
381
|
+
throw new Error('Entity identifier key must be a string');
|
|
382
|
+
}
|
|
383
|
+
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
384
|
+
throw new Error('Entity identifier value must be a string or number');
|
|
385
|
+
}
|
|
386
|
+
this.data.entityIdentifiers[key] = value;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
class CollecionesSemanticCollectionEvent extends CollecionesSemanticEvent {
|
|
392
|
+
|
|
393
|
+
constructor(itemEntity, action, adjective, identifiers, collectionEntity) {
|
|
394
|
+
if(typeof collectionEntity == 'undefined') {
|
|
395
|
+
collectionEntity = `${itemEntity}Collection`;
|
|
396
|
+
}
|
|
397
|
+
super(collectionEntity, action, undefined, identifiers);
|
|
398
|
+
this.data.meta = {
|
|
399
|
+
eventFormat: 'CollecionesSemanticCollectionEvent',
|
|
400
|
+
eventFormatVersion: '1'
|
|
401
|
+
};
|
|
402
|
+
this.adjective = formatAdjectives(adjective);
|
|
403
|
+
let adjectiveString = stringifyAdjectives(this.adjective);
|
|
404
|
+
itemEntity = underscoreToCamelCase(itemEntity);
|
|
405
|
+
this.data.itemEntity = itemEntity;
|
|
406
|
+
this.data.itemEventName = `${itemEntity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;
|
|
407
|
+
this.data.entityItemIdentifiers = {};
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
addEntityItemIdentifier(key, value) {
|
|
411
|
+
if (typeof key !== 'string') {
|
|
412
|
+
throw new Error('Entity identifier key must be a string');
|
|
413
|
+
}
|
|
414
|
+
if (typeof value !== 'string' && typeof value !== 'number' && !Array.isArray(value)) {
|
|
415
|
+
throw new Error('Entity identifier value must be a string or number');
|
|
416
|
+
}
|
|
417
|
+
if(typeof this.data.entityItemIdentifiers[key] == 'undefined') {
|
|
418
|
+
this.data.entityItemIdentifiers[key] = [];
|
|
419
|
+
}
|
|
420
|
+
if(Array.isArray(value)) {
|
|
421
|
+
value.forEach((v)=> {
|
|
422
|
+
this.data.entityItemIdentifiers[key].push(v);
|
|
423
|
+
});
|
|
424
|
+
} else {
|
|
425
|
+
this.data.entityItemIdentifiers[key].push(value);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
exports.CollecionesEmitter = CollecionesEmitter;
|
|
433
|
+
exports.CollecionesEvent = CollecionesEvent;
|
|
434
|
+
exports.CollecionesSemanticCollectionEvent = CollecionesSemanticCollectionEvent;
|
|
435
|
+
exports.CollecionesSemanticEvent = CollecionesSemanticEvent;
|
|
436
|
+
exports.CollecionesTracker = CollecionesTracker;
|
|
437
|
+
exports.CollecionesWebTracker = CollecionesWebTracker;
|
|
438
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/utils/utils.js","../src/CollecionesBaseEvent.js","../src/CollecionesEmitter.js","../src/CollecionesTracker.js","../src/CollecionesWebTracker.js","../src/CollecionesEvent.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","../src/CollecionesSemanticEvent.js","../src/CollecionesSemanticCollectionEvent.js"],"sourcesContent":["// helper 'private' functions\nconst underscoreToCamelCase = function (str) {\n str = str.replace(/[^\\x00-\\x7F_]/g, '');\n return str\n .split('_')\n .map((word, index) => {\n if (index === 0) {\n return word;\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n}\n\nconst formatAdjectives = function (adjectiveParameter) {\n let errorMsg = new Error('Adjective must be a string, an array of strings, or undefined');\n if (typeof adjectiveParameter === 'undefined') {\n return undefined;\n }\n if (typeof adjectiveParameter === 'string') {\n return [underscoreToCamelCase(adjectiveParameter)];\n }\n if (Array.isArray(adjectiveParameter) && adjectiveParameter.every(item => typeof item === 'string')) {\n let returnValue = [];\n adjectiveParameter.forEach((adjectiveParameter) => {\n if (!typeof item === 'string') {\n throw errorMsg;\n }\n returnValue.push(underscoreToCamelCase(adjectiveParameter));\n });\n return returnValue;\n }\n throw errorMsg;\n}\n\nconst stringifyAdjectives = function (adjective) {\n if (!Array.isArray(adjective) || adjective.length === 0) {\n return undefined;\n }\n const uniqueSorted = [...new Set(adjective)].sort();\n return '.' + uniqueSorted.join('.');\n}\n\nconst toBase64 = function (str) {\n if (typeof window !== 'undefined' && window.btoa) {\n return window.btoa(unescape(encodeURIComponent(str)));\n } else {\n return Buffer.from(str, 'utf-8').toString('base64');\n }\n}\n\nconst fromBase64 = function (b64) {\n if (typeof window !== 'undefined' && window.atob) {\n return decodeURIComponent(escape(window.atob(b64)));\n } else {\n return Buffer.from(b64, 'base64').toString('utf-8');\n }\n}\n\nconst getBrowserContext = function() {\n if (typeof window === 'undefined' || typeof navigator === 'undefined') {\n return {};\n }\n return {\n hasFocus: document.hasFocus(),\n language: navigator.language,\n platform: navigator.platform,\n referrer: document.referrer,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n url: window.location.href,\n userAgent: navigator.userAgent,\n viewportHeight: window.innerHeight,\n viewportWidth: window.innerWidth,\n };\n}\n\nexport {\n formatAdjectives,\n fromBase64,\n getBrowserContext,\n stringifyAdjectives,\n toBase64,\n underscoreToCamelCase\n};","import { toBase64 } from './utils/utils.js';\n\nclass CollecionesBaseEvent {\n\n constructor() {\n this.eventName = '';\n this.data = {};\n this.data.meta = {\n eventFormat: 'CollecionesBaseEvent',\n eventFormatVersion: '1'\n };\n const now = new Date();\n this.data.timestamps = {};\n this.data.timestamps.clientDatetimeUtc = now.toISOString();\n if (typeof window !== 'undefined' && typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.clientDatetimeLocal = now.toLocaleString(navigator.language);\n this.data.timestamps.timeZone = navigator.language;\n } else {\n this.data.timestamps.clientDatetimeLocal = now.toISOString();\n this.data.timestamps.timeZone = 'UTC';\n }\n }\n\n setEventName(name) {\n this.eventName = name;\n }\n\n getEventName() {\n return this.eventName;\n }\n\n getEventFormat() {\n let v = this.data?.meta?.eventFormat;\n return (typeof v !== 'undefined') ? v : '1';\n }\n\n getEventFormatVersion() {\n let v = this.data?.meta?.eventFormatVersion;\n return (typeof v !== 'undefined') ? v : 'CollecionesBaseEvent';\n }\n\n getPostObject() {\n const now = new Date();\n if (typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.sentDatetime = now.toLocaleString(navigator.language);\n } else {\n this.data.timestamps.sentDatetime = now.toISOString();\n }\n return {\n eventname: this.getEventName(),\n eventFormat: this.getEventFormat(),\n eventFormatVersion: this.getEventFormatVersion(),\n payload: toBase64(this.getPayload())\n };\n }\n\n setData(data) {\n this.data = data;\n }\n\n addAttribute(name, value) {\n return this.addField(name, value);\n }\n\n addField(name, value) {\n if (typeof this.data.fields !== 'object' || this.data.fields === null) {\n this.data.fields = {};\n }\n this.data.fields[name] = value;\n }\n\n setTracker(name) {\n this.data.tracker = name;\n }\n\n setAppName(name) {\n this.data.appName = name;\n }\n\n convertParamIdentifiers(param) {\n if (typeof param === 'object' && param !== null && !Array.isArray(param)) {\n for (const [key, value] of Object.entries(param)) {\n this.addIdentifier(key, value);\n }\n }\n }\n\n addIdentifier(name, value) {\n if (typeof this.data.identifiers !== 'object' || this.data.identifiers === null) {\n this.data.identifiers = {};\n }\n this.data.identifiers[name] = value;\n }\n\n getPayload() {\n return JSON.stringify(this.data);\n }\n\n}\n\nexport default CollecionesBaseEvent;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\nimport {toBase64} from './utils/utils.js';\n\nclass CollecionesEmitter {\n\n constructor(endpoint = '/collect', flushSize = 10, flushInterval = false) {\n this.endpoint = endpoint;\n this.flushInterval = flushInterval;\n this.flushSize = flushSize;\n this.buffer = [];\n this.timer = null;\n }\n\n startTimer() {\n this.stopTimer();\n if (typeof this.flushInterval == 'number' && this.flushInterval > 0) {\n this.timer = setInterval(() => this.flush(), this.flushInterval);\n }\n }\n\n startTimerIfStopped() {\n if (!this.timer) {\n this.startTimer();\n }\n }\n\n stopTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n this.timer = null;\n }\n\n track(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.trackAsync(event);\n }\n\n async trackAsync(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.startTimerIfStopped();\n this.buffer.push(event);\n return (this.buffer.length >= this.flushSize) ? this.flush() : Promise.resolve();\n }\n\n async flush() {\n if (this.buffer.length === 0) return;\n const eventsToSend = [...this.buffer];\n this.buffer = [];\n let postPayload = [];\n eventsToSend.forEach((e) => {\n postPayload.push( e.getPostObject() );\n });\n this.stopTimer();\n try {\n const response = await fetch(this.endpoint, {\n method: 'POST',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(postPayload)\n });\n if (!response.ok) {\n console.log(`Failed to send events: ${response.statusText}`);\n }\n return true;\n } catch (error) {\n console.log(`Network error sending events: ${error.message}`);\n } \n }\n}\n\nexport default CollecionesEmitter;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesTracker {\n \n constructor(emitters, trackerName, appName) {\n this.emitters = emitters;\n this.trackerName = trackerName;\n this.appName = appName;\n this.identifiers = {};\n }\n\n addIdentifier(name, value) {\n this.identifiers[name] = value;\n }\n\n track(collecionesEvent) {\n if (!(collecionesEvent instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be of type CollecionesEvent');\n }\n for (const [key, value] of Object.entries(this.identifiers)) {\n collecionesEvent.addIdentifier(key, value);\n }\n collecionesEvent.setTracker(this.trackerName);\n collecionesEvent.setAppName(this.appName); \n this.emitters.forEach(element => {\n element.track(collecionesEvent, this.trackerName, this.appName);\n });\n \n }\n}\n\nexport default CollecionesTracker;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\nimport CollecionesTracker from './CollecionesTracker.js';\nimport { getBrowserContext } from './utils/utils.js';\n\nclass CollecionesWebTracker extends CollecionesTracker {\n \n constructor(emitters, trackerName, appName) {\n super(emitters, trackerName, appName);\n }\n\n track(collecionesEvent) {\n if (!(collecionesEvent instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be of type CollecionesEvent');\n }\n collecionesEvent.addField('browserContext', getBrowserContext());\n super.track(collecionesEvent); \n }\n}\n\nexport default CollecionesWebTracker;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesEvent extends CollecionesBaseEvent {\n\n constructor(name, data, identifiers) {\n super();\n this.setEventName(name);\n Object.assign(this.data, data);\n this.convertParamIdentifiers(identifiers);\n }\n\n}\n\nexport default CollecionesEvent;","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","import { v4 as uuidv4 } from 'uuid';\nimport {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesSemanticEvent extends CollecionesBaseEvent {\n\n constructor(entity, action, adjective, identifiers) {\n super();\n this.entity = underscoreToCamelCase(entity);\n this.action = underscoreToCamelCase(action);\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n this.eventName = `${this.entity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.convertParamIdentifiers(identifiers);\n this.data.entityIdentifiers = {};\n this.data.attributes = {};\n this.data.clientEventId = uuidv4();\n this.data.meta = {\n eventFormat: 'CollecionesSemanticEvent',\n eventFormatVersion: '1'\n };\n }\n\n setData() {\n throw new Error('setData deprecated in semantic events');\n }\n\n addEntityIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n throw new Error('Entity identifier value must be a string or number');\n }\n this.data.entityIdentifiers[key] = value;\n }\n\n}\n\nexport default CollecionesSemanticEvent;","import {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesSemanticEvent from './CollecionesSemanticEvent.js';\n\nclass CollecionesSemanticCollectionEvent extends CollecionesSemanticEvent {\n\n constructor(itemEntity, action, adjective, identifiers, collectionEntity) {\n if(typeof collectionEntity == 'undefined') {\n collectionEntity = `${itemEntity}Collection`;\n }\n super(collectionEntity, action, undefined, identifiers);\n this.data.meta = {\n eventFormat: 'CollecionesSemanticCollectionEvent',\n eventFormatVersion: '1'\n };\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n itemEntity = underscoreToCamelCase(itemEntity);\n this.data.itemEntity = itemEntity;\n this.data.itemEventName = `${itemEntity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.data.entityItemIdentifiers = {};\n }\n\n addEntityItemIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number' && !Array.isArray(value)) {\n throw new Error('Entity identifier value must be a string or number');\n }\n if(typeof this.data.entityItemIdentifiers[key] == 'undefined') {\n this.data.entityItemIdentifiers[key] = [];\n }\n if(Array.isArray(value)) {\n value.forEach((v)=> {\n this.data.entityItemIdentifiers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Q,EAAE;AACrC,YAAY,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC;AACrE;AACA,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC7F,YAAY,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC;AACjF;AACA,QAAQ,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,WAAW,EAAE;AACvE,YAAY,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,EAAE;AACrD;AACA,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjC,YAAY,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;AAChC,gBAAgB,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D,aAAa,CAAC;AACd,SAAS,MAAM;AACf,YAAY,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;AAC5D;AACA;;AAEA;AACA;;;;;;;;;","x_google_ignoreList":[6,7,8,9]}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,431 @@
|
|
|
1
|
+
// helper 'private' functions
|
|
2
|
+
const underscoreToCamelCase = function (str) {
|
|
3
|
+
str = str.replace(/[^\x00-\x7F_]/g, '');
|
|
4
|
+
return str
|
|
5
|
+
.split('_')
|
|
6
|
+
.map((word, index) => {
|
|
7
|
+
if (index === 0) {
|
|
8
|
+
return word;
|
|
9
|
+
}
|
|
10
|
+
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
|
|
11
|
+
})
|
|
12
|
+
.join('');
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
const formatAdjectives = function (adjectiveParameter) {
|
|
16
|
+
let errorMsg = new Error('Adjective must be a string, an array of strings, or undefined');
|
|
17
|
+
if (typeof adjectiveParameter === 'undefined') {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
if (typeof adjectiveParameter === 'string') {
|
|
21
|
+
return [underscoreToCamelCase(adjectiveParameter)];
|
|
22
|
+
}
|
|
23
|
+
if (Array.isArray(adjectiveParameter) && adjectiveParameter.every(item => typeof item === 'string')) {
|
|
24
|
+
let returnValue = [];
|
|
25
|
+
adjectiveParameter.forEach((adjectiveParameter) => {
|
|
26
|
+
if (!typeof item === 'string') {
|
|
27
|
+
throw errorMsg;
|
|
28
|
+
}
|
|
29
|
+
returnValue.push(underscoreToCamelCase(adjectiveParameter));
|
|
30
|
+
});
|
|
31
|
+
return returnValue;
|
|
32
|
+
}
|
|
33
|
+
throw errorMsg;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const stringifyAdjectives = function (adjective) {
|
|
37
|
+
if (!Array.isArray(adjective) || adjective.length === 0) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const uniqueSorted = [...new Set(adjective)].sort();
|
|
41
|
+
return '.' + uniqueSorted.join('.');
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const toBase64 = function (str) {
|
|
45
|
+
if (typeof window !== 'undefined' && window.btoa) {
|
|
46
|
+
return window.btoa(unescape(encodeURIComponent(str)));
|
|
47
|
+
} else {
|
|
48
|
+
return Buffer.from(str, 'utf-8').toString('base64');
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const getBrowserContext = function() {
|
|
53
|
+
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
|
54
|
+
return {};
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
hasFocus: document.hasFocus(),
|
|
58
|
+
language: navigator.language,
|
|
59
|
+
platform: navigator.platform,
|
|
60
|
+
referrer: document.referrer,
|
|
61
|
+
screenHeight: window.screen.height,
|
|
62
|
+
screenWidth: window.screen.width,
|
|
63
|
+
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
|
|
64
|
+
url: window.location.href,
|
|
65
|
+
userAgent: navigator.userAgent,
|
|
66
|
+
viewportHeight: window.innerHeight,
|
|
67
|
+
viewportWidth: window.innerWidth,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
class CollecionesBaseEvent {
|
|
72
|
+
|
|
73
|
+
constructor() {
|
|
74
|
+
this.eventName = '';
|
|
75
|
+
this.data = {};
|
|
76
|
+
this.data.meta = {
|
|
77
|
+
eventFormat: 'CollecionesBaseEvent',
|
|
78
|
+
eventFormatVersion: '1'
|
|
79
|
+
};
|
|
80
|
+
const now = new Date();
|
|
81
|
+
this.data.timestamps = {};
|
|
82
|
+
this.data.timestamps.clientDatetimeUtc = now.toISOString();
|
|
83
|
+
if (typeof window !== 'undefined' && typeof navigator !== 'undefined' && navigator.language) {
|
|
84
|
+
this.data.timestamps.clientDatetimeLocal = now.toLocaleString(navigator.language);
|
|
85
|
+
this.data.timestamps.timeZone = navigator.language;
|
|
86
|
+
} else {
|
|
87
|
+
this.data.timestamps.clientDatetimeLocal = now.toISOString();
|
|
88
|
+
this.data.timestamps.timeZone = 'UTC';
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
setEventName(name) {
|
|
93
|
+
this.eventName = name;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
getEventName() {
|
|
97
|
+
return this.eventName;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
getEventFormat() {
|
|
101
|
+
let v = this.data?.meta?.eventFormat;
|
|
102
|
+
return (typeof v !== 'undefined') ? v : '1';
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
getEventFormatVersion() {
|
|
106
|
+
let v = this.data?.meta?.eventFormatVersion;
|
|
107
|
+
return (typeof v !== 'undefined') ? v : 'CollecionesBaseEvent';
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
getPostObject() {
|
|
111
|
+
const now = new Date();
|
|
112
|
+
if (typeof navigator !== 'undefined' && navigator.language) {
|
|
113
|
+
this.data.timestamps.sentDatetime = now.toLocaleString(navigator.language);
|
|
114
|
+
} else {
|
|
115
|
+
this.data.timestamps.sentDatetime = now.toISOString();
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
eventname: this.getEventName(),
|
|
119
|
+
eventFormat: this.getEventFormat(),
|
|
120
|
+
eventFormatVersion: this.getEventFormatVersion(),
|
|
121
|
+
payload: toBase64(this.getPayload())
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
setData(data) {
|
|
126
|
+
this.data = data;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
addAttribute(name, value) {
|
|
130
|
+
return this.addField(name, value);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
addField(name, value) {
|
|
134
|
+
if (typeof this.data.fields !== 'object' || this.data.fields === null) {
|
|
135
|
+
this.data.fields = {};
|
|
136
|
+
}
|
|
137
|
+
this.data.fields[name] = value;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
setTracker(name) {
|
|
141
|
+
this.data.tracker = name;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
setAppName(name) {
|
|
145
|
+
this.data.appName = name;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
convertParamIdentifiers(param) {
|
|
149
|
+
if (typeof param === 'object' && param !== null && !Array.isArray(param)) {
|
|
150
|
+
for (const [key, value] of Object.entries(param)) {
|
|
151
|
+
this.addIdentifier(key, value);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
addIdentifier(name, value) {
|
|
157
|
+
if (typeof this.data.identifiers !== 'object' || this.data.identifiers === null) {
|
|
158
|
+
this.data.identifiers = {};
|
|
159
|
+
}
|
|
160
|
+
this.data.identifiers[name] = value;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
getPayload() {
|
|
164
|
+
return JSON.stringify(this.data);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
class CollecionesEmitter {
|
|
170
|
+
|
|
171
|
+
constructor(endpoint = '/collect', flushSize = 10, flushInterval = false) {
|
|
172
|
+
this.endpoint = endpoint;
|
|
173
|
+
this.flushInterval = flushInterval;
|
|
174
|
+
this.flushSize = flushSize;
|
|
175
|
+
this.buffer = [];
|
|
176
|
+
this.timer = null;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
startTimer() {
|
|
180
|
+
this.stopTimer();
|
|
181
|
+
if (typeof this.flushInterval == 'number' && this.flushInterval > 0) {
|
|
182
|
+
this.timer = setInterval(() => this.flush(), this.flushInterval);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
startTimerIfStopped() {
|
|
187
|
+
if (!this.timer) {
|
|
188
|
+
this.startTimer();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
stopTimer() {
|
|
193
|
+
if (this.timer) {
|
|
194
|
+
clearInterval(this.timer);
|
|
195
|
+
}
|
|
196
|
+
this.timer = null;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
track(event) {
|
|
200
|
+
if (!(event instanceof CollecionesBaseEvent)) {
|
|
201
|
+
throw new Error('Event must be an instance of CollecionesBaseEvent');
|
|
202
|
+
}
|
|
203
|
+
this.trackAsync(event);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
async trackAsync(event) {
|
|
207
|
+
if (!(event instanceof CollecionesBaseEvent)) {
|
|
208
|
+
throw new Error('Event must be an instance of CollecionesBaseEvent');
|
|
209
|
+
}
|
|
210
|
+
this.startTimerIfStopped();
|
|
211
|
+
this.buffer.push(event);
|
|
212
|
+
return (this.buffer.length >= this.flushSize) ? this.flush() : Promise.resolve();
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
async flush() {
|
|
216
|
+
if (this.buffer.length === 0) return;
|
|
217
|
+
const eventsToSend = [...this.buffer];
|
|
218
|
+
this.buffer = [];
|
|
219
|
+
let postPayload = [];
|
|
220
|
+
eventsToSend.forEach((e) => {
|
|
221
|
+
postPayload.push( e.getPostObject() );
|
|
222
|
+
});
|
|
223
|
+
this.stopTimer();
|
|
224
|
+
try {
|
|
225
|
+
const response = await fetch(this.endpoint, {
|
|
226
|
+
method: 'POST',
|
|
227
|
+
credentials: 'include',
|
|
228
|
+
headers: {
|
|
229
|
+
'Content-Type': 'application/json'
|
|
230
|
+
},
|
|
231
|
+
body: JSON.stringify(postPayload)
|
|
232
|
+
});
|
|
233
|
+
if (!response.ok) {
|
|
234
|
+
console.log(`Failed to send events: ${response.statusText}`);
|
|
235
|
+
}
|
|
236
|
+
return true;
|
|
237
|
+
} catch (error) {
|
|
238
|
+
console.log(`Network error sending events: ${error.message}`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
class CollecionesTracker {
|
|
244
|
+
|
|
245
|
+
constructor(emitters, trackerName, appName) {
|
|
246
|
+
this.emitters = emitters;
|
|
247
|
+
this.trackerName = trackerName;
|
|
248
|
+
this.appName = appName;
|
|
249
|
+
this.identifiers = {};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
addIdentifier(name, value) {
|
|
253
|
+
this.identifiers[name] = value;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
track(collecionesEvent) {
|
|
257
|
+
if (!(collecionesEvent instanceof CollecionesBaseEvent)) {
|
|
258
|
+
throw new Error('Event must be of type CollecionesEvent');
|
|
259
|
+
}
|
|
260
|
+
for (const [key, value] of Object.entries(this.identifiers)) {
|
|
261
|
+
collecionesEvent.addIdentifier(key, value);
|
|
262
|
+
}
|
|
263
|
+
collecionesEvent.setTracker(this.trackerName);
|
|
264
|
+
collecionesEvent.setAppName(this.appName);
|
|
265
|
+
this.emitters.forEach(element => {
|
|
266
|
+
element.track(collecionesEvent, this.trackerName, this.appName);
|
|
267
|
+
});
|
|
268
|
+
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
class CollecionesWebTracker extends CollecionesTracker {
|
|
273
|
+
|
|
274
|
+
constructor(emitters, trackerName, appName) {
|
|
275
|
+
super(emitters, trackerName, appName);
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
track(collecionesEvent) {
|
|
279
|
+
if (!(collecionesEvent instanceof CollecionesBaseEvent)) {
|
|
280
|
+
throw new Error('Event must be of type CollecionesEvent');
|
|
281
|
+
}
|
|
282
|
+
collecionesEvent.addField('browserContext', getBrowserContext());
|
|
283
|
+
super.track(collecionesEvent);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
class CollecionesEvent extends CollecionesBaseEvent {
|
|
288
|
+
|
|
289
|
+
constructor(name, data, identifiers) {
|
|
290
|
+
super();
|
|
291
|
+
this.setEventName(name);
|
|
292
|
+
Object.assign(this.data, data);
|
|
293
|
+
this.convertParamIdentifiers(identifiers);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
const byteToHex = [];
|
|
299
|
+
for (let i = 0; i < 256; ++i) {
|
|
300
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
301
|
+
}
|
|
302
|
+
function unsafeStringify(arr, offset = 0) {
|
|
303
|
+
return (byteToHex[arr[offset + 0]] +
|
|
304
|
+
byteToHex[arr[offset + 1]] +
|
|
305
|
+
byteToHex[arr[offset + 2]] +
|
|
306
|
+
byteToHex[arr[offset + 3]] +
|
|
307
|
+
'-' +
|
|
308
|
+
byteToHex[arr[offset + 4]] +
|
|
309
|
+
byteToHex[arr[offset + 5]] +
|
|
310
|
+
'-' +
|
|
311
|
+
byteToHex[arr[offset + 6]] +
|
|
312
|
+
byteToHex[arr[offset + 7]] +
|
|
313
|
+
'-' +
|
|
314
|
+
byteToHex[arr[offset + 8]] +
|
|
315
|
+
byteToHex[arr[offset + 9]] +
|
|
316
|
+
'-' +
|
|
317
|
+
byteToHex[arr[offset + 10]] +
|
|
318
|
+
byteToHex[arr[offset + 11]] +
|
|
319
|
+
byteToHex[arr[offset + 12]] +
|
|
320
|
+
byteToHex[arr[offset + 13]] +
|
|
321
|
+
byteToHex[arr[offset + 14]] +
|
|
322
|
+
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
let getRandomValues;
|
|
326
|
+
const rnds8 = new Uint8Array(16);
|
|
327
|
+
function rng() {
|
|
328
|
+
if (!getRandomValues) {
|
|
329
|
+
if (typeof crypto === 'undefined' || !crypto.getRandomValues) {
|
|
330
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
331
|
+
}
|
|
332
|
+
getRandomValues = crypto.getRandomValues.bind(crypto);
|
|
333
|
+
}
|
|
334
|
+
return getRandomValues(rnds8);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
338
|
+
var native = { randomUUID };
|
|
339
|
+
|
|
340
|
+
function v4(options, buf, offset) {
|
|
341
|
+
if (native.randomUUID && true && !options) {
|
|
342
|
+
return native.randomUUID();
|
|
343
|
+
}
|
|
344
|
+
options = options || {};
|
|
345
|
+
const rnds = options.random ?? options.rng?.() ?? rng();
|
|
346
|
+
if (rnds.length < 16) {
|
|
347
|
+
throw new Error('Random bytes length must be >= 16');
|
|
348
|
+
}
|
|
349
|
+
rnds[6] = (rnds[6] & 0x0f) | 0x40;
|
|
350
|
+
rnds[8] = (rnds[8] & 0x3f) | 0x80;
|
|
351
|
+
return unsafeStringify(rnds);
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
class CollecionesSemanticEvent extends CollecionesBaseEvent {
|
|
355
|
+
|
|
356
|
+
constructor(entity, action, adjective, identifiers) {
|
|
357
|
+
super();
|
|
358
|
+
this.entity = underscoreToCamelCase(entity);
|
|
359
|
+
this.action = underscoreToCamelCase(action);
|
|
360
|
+
this.adjective = formatAdjectives(adjective);
|
|
361
|
+
let adjectiveString = stringifyAdjectives(this.adjective);
|
|
362
|
+
this.eventName = `${this.entity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;
|
|
363
|
+
this.convertParamIdentifiers(identifiers);
|
|
364
|
+
this.data.entityIdentifiers = {};
|
|
365
|
+
this.data.attributes = {};
|
|
366
|
+
this.data.clientEventId = v4();
|
|
367
|
+
this.data.meta = {
|
|
368
|
+
eventFormat: 'CollecionesSemanticEvent',
|
|
369
|
+
eventFormatVersion: '1'
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
setData() {
|
|
374
|
+
throw new Error('setData deprecated in semantic events');
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
addEntityIdentifier(key, value) {
|
|
378
|
+
if (typeof key !== 'string') {
|
|
379
|
+
throw new Error('Entity identifier key must be a string');
|
|
380
|
+
}
|
|
381
|
+
if (typeof value !== 'string' && typeof value !== 'number') {
|
|
382
|
+
throw new Error('Entity identifier value must be a string or number');
|
|
383
|
+
}
|
|
384
|
+
this.data.entityIdentifiers[key] = value;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
class CollecionesSemanticCollectionEvent extends CollecionesSemanticEvent {
|
|
390
|
+
|
|
391
|
+
constructor(itemEntity, action, adjective, identifiers, collectionEntity) {
|
|
392
|
+
if(typeof collectionEntity == 'undefined') {
|
|
393
|
+
collectionEntity = `${itemEntity}Collection`;
|
|
394
|
+
}
|
|
395
|
+
super(collectionEntity, action, undefined, identifiers);
|
|
396
|
+
this.data.meta = {
|
|
397
|
+
eventFormat: 'CollecionesSemanticCollectionEvent',
|
|
398
|
+
eventFormatVersion: '1'
|
|
399
|
+
};
|
|
400
|
+
this.adjective = formatAdjectives(adjective);
|
|
401
|
+
let adjectiveString = stringifyAdjectives(this.adjective);
|
|
402
|
+
itemEntity = underscoreToCamelCase(itemEntity);
|
|
403
|
+
this.data.itemEntity = itemEntity;
|
|
404
|
+
this.data.itemEventName = `${itemEntity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;
|
|
405
|
+
this.data.entityItemIdentifiers = {};
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
addEntityItemIdentifier(key, value) {
|
|
409
|
+
if (typeof key !== 'string') {
|
|
410
|
+
throw new Error('Entity identifier key must be a string');
|
|
411
|
+
}
|
|
412
|
+
if (typeof value !== 'string' && typeof value !== 'number' && !Array.isArray(value)) {
|
|
413
|
+
throw new Error('Entity identifier value must be a string or number');
|
|
414
|
+
}
|
|
415
|
+
if(typeof this.data.entityItemIdentifiers[key] == 'undefined') {
|
|
416
|
+
this.data.entityItemIdentifiers[key] = [];
|
|
417
|
+
}
|
|
418
|
+
if(Array.isArray(value)) {
|
|
419
|
+
value.forEach((v)=> {
|
|
420
|
+
this.data.entityItemIdentifiers[key].push(v);
|
|
421
|
+
});
|
|
422
|
+
} else {
|
|
423
|
+
this.data.entityItemIdentifiers[key].push(value);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
export { CollecionesEmitter, CollecionesEvent, CollecionesSemanticCollectionEvent, CollecionesSemanticEvent, CollecionesTracker, CollecionesWebTracker };
|
|
431
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/utils/utils.js","../src/CollecionesBaseEvent.js","../src/CollecionesEmitter.js","../src/CollecionesTracker.js","../src/CollecionesWebTracker.js","../src/CollecionesEvent.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","../src/CollecionesSemanticEvent.js","../src/CollecionesSemanticCollectionEvent.js"],"sourcesContent":["// helper 'private' functions\nconst underscoreToCamelCase = function (str) {\n str = str.replace(/[^\\x00-\\x7F_]/g, '');\n return str\n .split('_')\n .map((word, index) => {\n if (index === 0) {\n return word;\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n}\n\nconst formatAdjectives = function (adjectiveParameter) {\n let errorMsg = new Error('Adjective must be a string, an array of strings, or undefined');\n if (typeof adjectiveParameter === 'undefined') {\n return undefined;\n }\n if (typeof adjectiveParameter === 'string') {\n return [underscoreToCamelCase(adjectiveParameter)];\n }\n if (Array.isArray(adjectiveParameter) && adjectiveParameter.every(item => typeof item === 'string')) {\n let returnValue = [];\n adjectiveParameter.forEach((adjectiveParameter) => {\n if (!typeof item === 'string') {\n throw errorMsg;\n }\n returnValue.push(underscoreToCamelCase(adjectiveParameter));\n });\n return returnValue;\n }\n throw errorMsg;\n}\n\nconst stringifyAdjectives = function (adjective) {\n if (!Array.isArray(adjective) || adjective.length === 0) {\n return undefined;\n }\n const uniqueSorted = [...new Set(adjective)].sort();\n return '.' + uniqueSorted.join('.');\n}\n\nconst toBase64 = function (str) {\n if (typeof window !== 'undefined' && window.btoa) {\n return window.btoa(unescape(encodeURIComponent(str)));\n } else {\n return Buffer.from(str, 'utf-8').toString('base64');\n }\n}\n\nconst fromBase64 = function (b64) {\n if (typeof window !== 'undefined' && window.atob) {\n return decodeURIComponent(escape(window.atob(b64)));\n } else {\n return Buffer.from(b64, 'base64').toString('utf-8');\n }\n}\n\nconst getBrowserContext = function() {\n if (typeof window === 'undefined' || typeof navigator === 'undefined') {\n return {};\n }\n return {\n hasFocus: document.hasFocus(),\n language: navigator.language,\n platform: navigator.platform,\n referrer: document.referrer,\n screenHeight: window.screen.height,\n screenWidth: window.screen.width,\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n url: window.location.href,\n userAgent: navigator.userAgent,\n viewportHeight: window.innerHeight,\n viewportWidth: window.innerWidth,\n };\n}\n\nexport {\n formatAdjectives,\n fromBase64,\n getBrowserContext,\n stringifyAdjectives,\n toBase64,\n underscoreToCamelCase\n};","import { toBase64 } from './utils/utils.js';\n\nclass CollecionesBaseEvent {\n\n constructor() {\n this.eventName = '';\n this.data = {};\n this.data.meta = {\n eventFormat: 'CollecionesBaseEvent',\n eventFormatVersion: '1'\n };\n const now = new Date();\n this.data.timestamps = {};\n this.data.timestamps.clientDatetimeUtc = now.toISOString();\n if (typeof window !== 'undefined' && typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.clientDatetimeLocal = now.toLocaleString(navigator.language);\n this.data.timestamps.timeZone = navigator.language;\n } else {\n this.data.timestamps.clientDatetimeLocal = now.toISOString();\n this.data.timestamps.timeZone = 'UTC';\n }\n }\n\n setEventName(name) {\n this.eventName = name;\n }\n\n getEventName() {\n return this.eventName;\n }\n\n getEventFormat() {\n let v = this.data?.meta?.eventFormat;\n return (typeof v !== 'undefined') ? v : '1';\n }\n\n getEventFormatVersion() {\n let v = this.data?.meta?.eventFormatVersion;\n return (typeof v !== 'undefined') ? v : 'CollecionesBaseEvent';\n }\n\n getPostObject() {\n const now = new Date();\n if (typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.sentDatetime = now.toLocaleString(navigator.language);\n } else {\n this.data.timestamps.sentDatetime = now.toISOString();\n }\n return {\n eventname: this.getEventName(),\n eventFormat: this.getEventFormat(),\n eventFormatVersion: this.getEventFormatVersion(),\n payload: toBase64(this.getPayload())\n };\n }\n\n setData(data) {\n this.data = data;\n }\n\n addAttribute(name, value) {\n return this.addField(name, value);\n }\n\n addField(name, value) {\n if (typeof this.data.fields !== 'object' || this.data.fields === null) {\n this.data.fields = {};\n }\n this.data.fields[name] = value;\n }\n\n setTracker(name) {\n this.data.tracker = name;\n }\n\n setAppName(name) {\n this.data.appName = name;\n }\n\n convertParamIdentifiers(param) {\n if (typeof param === 'object' && param !== null && !Array.isArray(param)) {\n for (const [key, value] of Object.entries(param)) {\n this.addIdentifier(key, value);\n }\n }\n }\n\n addIdentifier(name, value) {\n if (typeof this.data.identifiers !== 'object' || this.data.identifiers === null) {\n this.data.identifiers = {};\n }\n this.data.identifiers[name] = value;\n }\n\n getPayload() {\n return JSON.stringify(this.data);\n }\n\n}\n\nexport default CollecionesBaseEvent;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\nimport {toBase64} from './utils/utils.js';\n\nclass CollecionesEmitter {\n\n constructor(endpoint = '/collect', flushSize = 10, flushInterval = false) {\n this.endpoint = endpoint;\n this.flushInterval = flushInterval;\n this.flushSize = flushSize;\n this.buffer = [];\n this.timer = null;\n }\n\n startTimer() {\n this.stopTimer();\n if (typeof this.flushInterval == 'number' && this.flushInterval > 0) {\n this.timer = setInterval(() => this.flush(), this.flushInterval);\n }\n }\n\n startTimerIfStopped() {\n if (!this.timer) {\n this.startTimer();\n }\n }\n\n stopTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n this.timer = null;\n }\n\n track(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.trackAsync(event);\n }\n\n async trackAsync(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.startTimerIfStopped();\n this.buffer.push(event);\n return (this.buffer.length >= this.flushSize) ? this.flush() : Promise.resolve();\n }\n\n async flush() {\n if (this.buffer.length === 0) return;\n const eventsToSend = [...this.buffer];\n this.buffer = [];\n let postPayload = [];\n eventsToSend.forEach((e) => {\n postPayload.push( e.getPostObject() );\n });\n this.stopTimer();\n try {\n const response = await fetch(this.endpoint, {\n method: 'POST',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(postPayload)\n });\n if (!response.ok) {\n console.log(`Failed to send events: ${response.statusText}`);\n }\n return true;\n } catch (error) {\n console.log(`Network error sending events: ${error.message}`);\n } \n }\n}\n\nexport default CollecionesEmitter;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesTracker {\n \n constructor(emitters, trackerName, appName) {\n this.emitters = emitters;\n this.trackerName = trackerName;\n this.appName = appName;\n this.identifiers = {};\n }\n\n addIdentifier(name, value) {\n this.identifiers[name] = value;\n }\n\n track(collecionesEvent) {\n if (!(collecionesEvent instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be of type CollecionesEvent');\n }\n for (const [key, value] of Object.entries(this.identifiers)) {\n collecionesEvent.addIdentifier(key, value);\n }\n collecionesEvent.setTracker(this.trackerName);\n collecionesEvent.setAppName(this.appName); \n this.emitters.forEach(element => {\n element.track(collecionesEvent, this.trackerName, this.appName);\n });\n \n }\n}\n\nexport default CollecionesTracker;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\nimport CollecionesTracker from './CollecionesTracker.js';\nimport { getBrowserContext } from './utils/utils.js';\n\nclass CollecionesWebTracker extends CollecionesTracker {\n \n constructor(emitters, trackerName, appName) {\n super(emitters, trackerName, appName);\n }\n\n track(collecionesEvent) {\n if (!(collecionesEvent instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be of type CollecionesEvent');\n }\n collecionesEvent.addField('browserContext', getBrowserContext());\n super.track(collecionesEvent); \n }\n}\n\nexport default CollecionesWebTracker;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesEvent extends CollecionesBaseEvent {\n\n constructor(name, data, identifiers) {\n super();\n this.setEventName(name);\n Object.assign(this.data, data);\n this.convertParamIdentifiers(identifiers);\n }\n\n}\n\nexport default CollecionesEvent;","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","import { v4 as uuidv4 } from 'uuid';\nimport {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesSemanticEvent extends CollecionesBaseEvent {\n\n constructor(entity, action, adjective, identifiers) {\n super();\n this.entity = underscoreToCamelCase(entity);\n this.action = underscoreToCamelCase(action);\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n this.eventName = `${this.entity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.convertParamIdentifiers(identifiers);\n this.data.entityIdentifiers = {};\n this.data.attributes = {};\n this.data.clientEventId = uuidv4();\n this.data.meta = {\n eventFormat: 'CollecionesSemanticEvent',\n eventFormatVersion: '1'\n };\n }\n\n setData() {\n throw new Error('setData deprecated in semantic events');\n }\n\n addEntityIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n throw new Error('Entity identifier value must be a string or number');\n }\n this.data.entityIdentifiers[key] = value;\n }\n\n}\n\nexport default CollecionesSemanticEvent;","import {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesSemanticEvent from './CollecionesSemanticEvent.js';\n\nclass CollecionesSemanticCollectionEvent extends CollecionesSemanticEvent {\n\n constructor(itemEntity, action, adjective, identifiers, collectionEntity) {\n if(typeof collectionEntity == 'undefined') {\n collectionEntity = `${itemEntity}Collection`;\n }\n super(collectionEntity, action, undefined, identifiers);\n this.data.meta = {\n eventFormat: 'CollecionesSemanticCollectionEvent',\n eventFormatVersion: '1'\n };\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n itemEntity = underscoreToCamelCase(itemEntity);\n this.data.itemEntity = itemEntity;\n this.data.itemEventName = `${itemEntity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.data.entityItemIdentifiers = {};\n }\n\n addEntityItemIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number' && !Array.isArray(value)) {\n throw new Error('Entity identifier value must be a string or number');\n }\n if(typeof this.data.entityItemIdentifiers[key] == 'undefined') {\n this.data.entityItemIdentifiers[key] = [];\n }\n if(Array.isArray(value)) {\n value.forEach((v)=> {\n this.data.entityItemIdentifiers[key].push(v);\n });\n } else {\n this.data.entityItemIdentifiers[key].push(value);\n }\n }\n\n \n}\n\nexport default CollecionesSemanticCollectionEvent;"],"names":["uuidv4"],"mappings":"AAAA;AACA,MAAM,qBAAqB,GAAG,UAAU,GAAG,EAAE;AAC7C,IAAI,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;AAC3C,IAAI,OAAO;AACX,SAAS,KAAK,CAAC,GAAG;AAClB,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK;AAC9B,YAAY,IAAI,KAAK,KAAK,CAAC,EAAE;AAC7B,gBAAgB,OAAO,IAAI;AAC3B;AACA,YAAY,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;AAC7E,SAAS;AACT,SAAS,IAAI,CAAC,EAAE,CAAC;AACjB;;AAEA,MAAM,gBAAgB,GAAG,UAAU,kBAAkB,EAAE;AACvD,IAAI,IAAI,QAAQ,GAAG,IAAI,KAAK,CAAC,+DAA+D,CAAC;AAC7F,IAAI,IAAI,OAAO,kBAAkB,KAAK,WAAW,EAAE;AACnD,QAAQ,OAAO,SAAS;AACxB;AACA,IAAI,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;AAChD,QAAQ,OAAO,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;AAC1D;AACA,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,IAAI,kBAAkB,CAAC,KAAK,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,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CAAC,MAAM,CAAC,CAAC;AAC1H,QAAQ,IAAI,CAAC,IAAI,CAAC,qBAAqB,GAAG,EAAE;AAC5C;;AAEA,IAAI,uBAAuB,CAAC,GAAG,EAAE,KAAK,EAAE;AACxC,QAAQ,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;AACrC,YAAY,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC;AACrE;AACA,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AAC7F,YAAY,MAAM,IAAI,KAAK,CAAC,oDAAoD,CAAC;AACjF;AACA,QAAQ,GAAG,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,WAAW,EAAE;AACvE,YAAY,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,EAAE;AACrD;AACA,QAAQ,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACjC,YAAY,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI;AAChC,gBAAgB,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;AAC5D,aAAa,CAAC;AACd,SAAS,MAAM;AACf,YAAY,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC;AAC5D;AACA;;AAEA;AACA;;;;","x_google_ignoreList":[6,7,8,9]}
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@compilacion/colleciones-clientos",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"main": "dist/index.
|
|
3
|
+
"version": "1.0.9",
|
|
4
|
+
"main": "dist/index.cjs",
|
|
5
|
+
"module": "dist/index.mjs",
|
|
6
|
+
"exports": {
|
|
7
|
+
"import": "./dist/index.mjs",
|
|
8
|
+
"require": "./dist/index.cjs"
|
|
9
|
+
},
|
|
5
10
|
"type": "module",
|
|
6
11
|
"scripts": {
|
|
7
12
|
"test": "vitest",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"collecionesClientos.js","sources":["../src/utils/utils.js","../src/CollecionesBaseEvent.js","../src/CollecionesEmitter.js","../src/CollecionesTracker.js","../src/CollecionesEvent.js","../node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/uuid/dist/esm-browser/rng.js","../node_modules/uuid/dist/esm-browser/native.js","../node_modules/uuid/dist/esm-browser/v4.js","../src/CollecionesSemanticEvent.js","../src/CollecionesSemanticCollectionEvent.js","../src/collecionesClientos.js"],"sourcesContent":["// helper 'private' functions\nconst underscoreToCamelCase = function (str) {\n str = str.replace(/[^\\x00-\\x7F_]/g, '');\n return str\n .split('_')\n .map((word, index) => {\n if (index === 0) {\n return word;\n }\n return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();\n })\n .join('');\n}\n\nconst formatAdjectives = function (adjectiveParameter) {\n let errorMsg = new Error('Adjective must be a string, an array of strings, or undefined');\n if (typeof adjectiveParameter === 'undefined') {\n return undefined;\n }\n if (typeof adjectiveParameter === 'string') {\n return [underscoreToCamelCase(adjectiveParameter)];\n }\n if (Array.isArray(adjectiveParameter) && adjectiveParameter.every(item => typeof item === 'string')) {\n let returnValue = [];\n adjectiveParameter.forEach((adjectiveParameter) => {\n if (!typeof item === 'string') {\n throw errorMsg;\n }\n returnValue.push(underscoreToCamelCase(adjectiveParameter));\n });\n return returnValue;\n }\n throw errorMsg;\n}\n\nconst stringifyAdjectives = function (adjective) {\n if (!Array.isArray(adjective) || adjective.length === 0) {\n return undefined;\n }\n const uniqueSorted = [...new Set(adjective)].sort();\n return '.' + uniqueSorted.join('.');\n}\n\nconst toBase64 = function (str) {\n if (typeof window !== 'undefined' && window.btoa) {\n return window.btoa(unescape(encodeURIComponent(str)));\n } else {\n return Buffer.from(str, 'utf-8').toString('base64');\n }\n}\n\nconst fromBase64 = function (b64) {\n if (typeof window !== 'undefined' && window.atob) {\n return decodeURIComponent(escape(window.atob(b64)));\n } else {\n return Buffer.from(b64, 'base64').toString('utf-8');\n }\n}\n\nexport {\n underscoreToCamelCase,\n formatAdjectives,\n stringifyAdjectives,\n toBase64,\n fromBase64\n};","import { toBase64 } from './utils/utils.js';\n\nclass CollecionesBaseEvent {\n\n constructor() {\n this.eventName = '';\n this.data = {};\n this.data.meta = {\n eventFormat: 'CollecionesBaseEvent',\n eventFormatVersion: '1'\n };\n const now = new Date();\n this.data.timestamps = {};\n this.data.timestamps.clientDatetimeUtc = now.toISOString();\n if (typeof window !== 'undefined' && typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.clientDatetimeLocal = now.toLocaleString(navigator.language);\n this.data.timestamps.timeZone = navigator.language;\n } else {\n this.data.timestamps.clientDatetimeLocal = now.toISOString();\n this.data.timestamps.timeZone = 'UTC';\n }\n }\n\n setEventName(name) {\n this.eventName = name;\n }\n\n getEventName() {\n return this.eventName;\n }\n\n getEventFormat() {\n let v = this.data?.meta?.eventFormat;\n return (typeof v !== 'undefined') ? v : '1';\n }\n\n getEventFormatVersion() {\n let v = this.data?.meta?.eventFormatVersion;\n return (typeof v !== 'undefined') ? v : 'CollecionesBaseEvent';\n }\n\n getPostObject() {\n const now = new Date();\n if (typeof navigator !== 'undefined' && navigator.language) {\n this.data.timestamps.sentDatetime = now.toLocaleString(navigator.language);\n } else {\n this.data.timestamps.sentDatetime = now.toISOString();\n }\n return {\n eventname: this.getEventName(),\n eventFormat: this.getEventFormat(),\n eventFormatVersion: this.getEventFormatVersion(),\n payload: toBase64(this.getPayload())\n };\n }\n\n setData(data) {\n this.data = data;\n }\n\n convertParamIdentifiers(param) {\n if (typeof param === 'object' && param !== null && !Array.isArray(param)) {\n for (const [key, value] of Object.entries(param)) {\n this.addIdentifier(key, value);\n }\n }\n }\n\n addIdentifier(name, value) {\n if (typeof this.data.identifiers !== 'object' || this.data.identifiers === null) {\n this.data.identifiers = {};\n }\n this.data.identifiers[name] = value;\n }\n\n getPayload() {\n return JSON.stringify(this.data);\n }\n\n}\n\nexport default CollecionesBaseEvent;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\nimport {toBase64} from './utils/utils.js';\n\nclass CollecionesEmitter {\n\n constructor(endpoint = '/collect', flushSize = 10, flushInterval = false) {\n this.endpoint = endpoint;\n this.flushInterval = flushInterval;\n this.flushSize = flushSize;\n this.buffer = [];\n this.timer = null;\n }\n\n startTimer() {\n this.stopTimer();\n if (typeof this.flushInterval == 'number' && this.flushInterval > 0) {\n this.timer = setInterval(() => this.flush(), this.flushInterval);\n }\n }\n\n startTimerIfStopped() {\n if (!this.timer) {\n this.startTimer();\n }\n }\n\n stopTimer() {\n if (this.timer) {\n clearInterval(this.timer);\n }\n this.timer = null;\n }\n\n track(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.trackAsync(event);\n }\n\n async trackAsync(event) {\n if (!(event instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be an instance of CollecionesBaseEvent');\n }\n this.startTimerIfStopped();\n this.buffer.push(event);\n return (this.buffer.length >= this.flushSize) ? this.flush() : Promise.resolve();\n }\n\n async flush() {\n if (this.buffer.length === 0) return;\n const eventsToSend = [...this.buffer];\n this.buffer = [];\n let postPayload = [];\n eventsToSend.forEach((e) => {\n postPayload.push( e.getPostObject() );\n });\n this.stopTimer();\n try {\n const response = await fetch(this.endpoint, {\n method: 'POST',\n credentials: 'include',\n headers: {\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify(postPayload)\n });\n if (!response.ok) {\n console.log(`Failed to send events: ${response.statusText}`);\n }\n return true;\n } catch (error) {\n console.log(`Network error sending events: ${error.message}`);\n } \n }\n}\n\nexport default CollecionesEmitter;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesTracker {\n \n constructor(emitters, trackerName, appName) {\n this.emitters = emitters;\n this.trackerName = trackerName;\n this.appName = appName;\n this.identifiers = {};\n }\n\n addIdentifier(name, value) {\n this.identifiers[name] = value;\n }\n\n track(collecionesEvent) {\n if (!(collecionesEvent instanceof CollecionesBaseEvent)) {\n throw new Error('Event must be of type CollecionesEvent');\n }\n for (const [key, value] of Object.entries(this.identifiers)) {\n collecionesEvent.addIdentifier(key, value);\n }\n this.emitters.forEach(element => {\n element.track(collecionesEvent, this.trackerName, this.appName);\n });\n \n }\n}\n\nexport default CollecionesTracker;","import CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesEvent extends CollecionesBaseEvent {\n\n constructor(name, data, identifiers) {\n super();\n this.setEventName(name);\n Object.assign(this.data, data);\n this.convertParamIdentifiers(identifiers);\n }\n\n}\n\nexport default CollecionesEvent;","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","import { v4 as uuidv4 } from 'uuid';\nimport {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesBaseEvent from './CollecionesBaseEvent.js';\n\nclass CollecionesSemanticEvent extends CollecionesBaseEvent {\n\n constructor(entity, action, adjective, identifiers) {\n super();\n this.entity = underscoreToCamelCase(entity);\n this.action = underscoreToCamelCase(action);\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n this.eventName = `${this.entity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.convertParamIdentifiers(identifiers);\n this.data.entityIdentifiers = {};\n this.data.attributes = {};\n this.data.clientEventId = uuidv4();\n this.data.meta = {\n eventFormat: 'CollecionesSemanticEvent',\n eventFormatVersion: '1'\n };\n }\n\n setData() {\n throw new Error('setData deprecated in semantic events');\n }\n\n addEntityIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n throw new Error('Entity identifier value must be a string or number');\n }\n this.data.entityIdentifiers[key] = value;\n }\n\n addAttribute(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Attribute key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number') {\n throw new Error('Attribute value must be a string or number');\n }\n this.data.attributes[key] = value;\n }\n\n}\n\nexport default CollecionesSemanticEvent;","import {underscoreToCamelCase, formatAdjectives, stringifyAdjectives } from './utils/utils.js';\nimport CollecionesSemanticEvent from './CollecionesSemanticEvent.js';\n\nclass CollecionesSemanticCollectionEvent extends CollecionesSemanticEvent {\n\n constructor(itemEntity, action, adjective, identifiers, collectionEntity) {\n if(typeof collectionEntity == 'undefined') {\n collectionEntity = `${itemEntity}Collection`;\n }\n super(collectionEntity, action, undefined, identifiers);\n this.data.meta = {\n eventFormat: 'CollecionesSemanticCollectionEvent',\n eventFormatVersion: '1'\n };\n this.adjective = formatAdjectives(adjective);\n let adjectiveString = stringifyAdjectives(this.adjective);\n itemEntity = underscoreToCamelCase(itemEntity);\n this.data.itemEntity = itemEntity;\n this.data.itemEventName = `${itemEntity}${(adjectiveString !== undefined) ? adjectiveString : ''}__${this.action}`;\n this.data.entityItemIdentifiers = {};\n }\n\n addEntityItemIdentifier(key, value) {\n if (typeof key !== 'string') {\n throw new Error('Entity identifier key must be a string');\n }\n if (typeof value !== 'string' && typeof value !== 'number' && !Array.isArray(value)) {\n throw new Error('Entity identifier value must be a string or number');\n }\n if(typeof this.data.entityItemIdentifiers[key] == 'undefined') {\n this.data.entityItemIdentifiers[key] = [];\n }\n if(Array.isArray(value)) {\n value.forEach((v)=> {\n this.data.entityItemIdentifiers[key].push(v);\n });\n } else {\n this.data.entityItemIdentifiers[key].push(value);\n }\n }\n\n \n}\n\nexport default CollecionesSemanticCollectionEvent;","import CollecionesEmitter from './CollecionesEmitter.js';\nimport CollecionesTracker from './CollecionesTracker.js';\nimport CollecionesEvent from './CollecionesEvent.js';\nimport CollecionesSemanticEvent from './CollecionesSemanticEvent.js';\nimport CollecionesSemanticCollectionEvent from './CollecionesSemanticCollectionEvent.js';\n\n(function(global) {\n global.CollecionesEmitter = CollecionesEmitter;\n global.CollecionesTracker = CollecionesTracker;\n global.CollecionesEvent = CollecionesEvent;\n global.CollecionesSemanticEvent = CollecionesSemanticEvent;\n global.CollecionesSemanticCollectionEvent = CollecionesSemanticCollectionEvent;\n})(typeof window !== 'undefined' ? window : globalThis);"],"names":["uuidv4"],"mappings":";;;IAAA;IACA,MAAM,qBAAqB,GAAG,UAAU,GAAG,EAAE;IAC7C,IAAI,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC;IAC3C,IAAI,OAAO;IACX,SAAS,KAAK,CAAC,GAAG;IAClB,SAAS,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK;IAC9B,YAAY,IAAI,KAAK,KAAK,CAAC,EAAE;IAC7B,gBAAgB,OAAO,IAAI;IAC3B;IACA,YAAY,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE;IAC7E,SAAS;IACT,SAAS,IAAI,CAAC,EAAE,CAAC;IACjB;;IAEA,MAAM,gBAAgB,GAAG,UAAU,kBAAkB,EAAE;IACvD,IAAI,IAAI,QAAQ,GAAG,IAAI,KAAK,CAAC,+DAA+D,CAAC;IAC7F,IAAI,IAAI,OAAO,kBAAkB,KAAK,WAAW,EAAE;IACnD,QAAQ,OAAO,SAAS;IACxB;IACA,IAAI,IAAI,OAAO,kBAAkB,KAAK,QAAQ,EAAE;IAChD,QAAQ,OAAO,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAC;IAC1D;IACA,IAAI,IAAI,KAAK,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