@ninetailed/experience.js-plugin-google-analytics 3.0.0-beta.14 → 3.0.0-beta.19

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.
@@ -8,7 +8,7 @@ var check = function (it) {
8
8
  };
9
9
 
10
10
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
11
- var global$l =
11
+ var global$a =
12
12
  // eslint-disable-next-line es/no-global-this -- safe
13
13
  check(typeof globalThis == 'object' && globalThis) ||
14
14
  check(typeof window == 'object' && window) ||
@@ -20,7 +20,7 @@ var global$l =
20
20
 
21
21
  var objectGetOwnPropertyDescriptor = {};
22
22
 
23
- var fails$8 = function (exec) {
23
+ var fails$9 = function (exec) {
24
24
  try {
25
25
  return !!exec();
26
26
  } catch (error) {
@@ -28,17 +28,18 @@ var fails$8 = function (exec) {
28
28
  }
29
29
  };
30
30
 
31
- var fails$7 = fails$8;
31
+ var fails$8 = fails$9;
32
32
 
33
33
  // Detect IE8's incomplete defineProperty implementation
34
- var descriptors = !fails$7(function () {
34
+ var descriptors = !fails$8(function () {
35
35
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
36
36
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
37
37
  });
38
38
 
39
- var fails$6 = fails$8;
39
+ var fails$7 = fails$9;
40
40
 
41
- var functionBindNative = !fails$6(function () {
41
+ var functionBindNative = !fails$7(function () {
42
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
42
43
  var test = (function () { /* empty */ }).bind();
43
44
  // eslint-disable-next-line no-prototype-builtins -- safe
44
45
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -80,52 +81,54 @@ var createPropertyDescriptor$2 = function (bitmap, value) {
80
81
  var NATIVE_BIND = functionBindNative;
81
82
 
82
83
  var FunctionPrototype$1 = Function.prototype;
83
- var bind = FunctionPrototype$1.bind;
84
84
  var call$4 = FunctionPrototype$1.call;
85
- var uncurryThis$a = NATIVE_BIND && bind.bind(call$4, call$4);
85
+ var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$4, call$4);
86
86
 
87
- var functionUncurryThis = NATIVE_BIND ? function (fn) {
88
- return fn && uncurryThis$a(fn);
89
- } : function (fn) {
90
- return fn && function () {
87
+ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
88
+ return function () {
91
89
  return call$4.apply(fn, arguments);
92
90
  };
93
91
  };
94
92
 
95
- var uncurryThis$9 = functionUncurryThis;
93
+ var uncurryThis$8 = functionUncurryThis;
96
94
 
97
- var toString$1 = uncurryThis$9({}.toString);
98
- var stringSlice = uncurryThis$9(''.slice);
95
+ var toString$1 = uncurryThis$8({}.toString);
96
+ var stringSlice = uncurryThis$8(''.slice);
99
97
 
100
98
  var classofRaw = function (it) {
101
99
  return stringSlice(toString$1(it), 8, -1);
102
100
  };
103
101
 
104
- var global$k = global$l;
105
- var uncurryThis$8 = functionUncurryThis;
106
- var fails$5 = fails$8;
102
+ var uncurryThis$7 = functionUncurryThis;
103
+ var fails$6 = fails$9;
107
104
  var classof = classofRaw;
108
105
 
109
- var Object$3 = global$k.Object;
110
- var split = uncurryThis$8(''.split);
106
+ var $Object$2 = Object;
107
+ var split = uncurryThis$7(''.split);
111
108
 
112
109
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
113
- var indexedObject = fails$5(function () {
110
+ var indexedObject = fails$6(function () {
114
111
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
115
112
  // eslint-disable-next-line no-prototype-builtins -- safe
116
- return !Object$3('z').propertyIsEnumerable(0);
113
+ return !$Object$2('z').propertyIsEnumerable(0);
117
114
  }) ? function (it) {
118
- return classof(it) == 'String' ? split(it, '') : Object$3(it);
119
- } : Object$3;
115
+ return classof(it) == 'String' ? split(it, '') : $Object$2(it);
116
+ } : $Object$2;
120
117
 
121
- var global$j = global$l;
118
+ // we can't use just `it == null` since of `document.all` special case
119
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
120
+ var isNullOrUndefined$2 = function (it) {
121
+ return it === null || it === undefined;
122
+ };
122
123
 
123
- var TypeError$6 = global$j.TypeError;
124
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
125
+
126
+ var $TypeError$5 = TypeError;
124
127
 
125
128
  // `RequireObjectCoercible` abstract operation
126
129
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
127
130
  var requireObjectCoercible$2 = function (it) {
128
- if (it == undefined) throw TypeError$6("Can't call method on " + it);
131
+ if (isNullOrUndefined$1(it)) throw $TypeError$5("Can't call method on " + it);
129
132
  return it;
130
133
  };
131
134
 
@@ -137,42 +140,63 @@ var toIndexedObject$3 = function (it) {
137
140
  return IndexedObject$1(requireObjectCoercible$1(it));
138
141
  };
139
142
 
143
+ var documentAll$2 = typeof document == 'object' && document.all;
144
+
145
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
146
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
147
+
148
+ var documentAll_1 = {
149
+ all: documentAll$2,
150
+ IS_HTMLDDA: IS_HTMLDDA
151
+ };
152
+
153
+ var $documentAll$1 = documentAll_1;
154
+
155
+ var documentAll$1 = $documentAll$1.all;
156
+
140
157
  // `IsCallable` abstract operation
141
158
  // https://tc39.es/ecma262/#sec-iscallable
142
- var isCallable$9 = function (argument) {
159
+ var isCallable$a = $documentAll$1.IS_HTMLDDA ? function (argument) {
160
+ return typeof argument == 'function' || argument === documentAll$1;
161
+ } : function (argument) {
143
162
  return typeof argument == 'function';
144
163
  };
145
164
 
146
- var isCallable$8 = isCallable$9;
165
+ var isCallable$9 = isCallable$a;
166
+ var $documentAll = documentAll_1;
167
+
168
+ var documentAll = $documentAll.all;
147
169
 
148
- var isObject$5 = function (it) {
149
- return typeof it == 'object' ? it !== null : isCallable$8(it);
170
+ var isObject$5 = $documentAll.IS_HTMLDDA ? function (it) {
171
+ return typeof it == 'object' ? it !== null : isCallable$9(it) || it === documentAll;
172
+ } : function (it) {
173
+ return typeof it == 'object' ? it !== null : isCallable$9(it);
150
174
  };
151
175
 
152
- var global$i = global$l;
153
- var isCallable$7 = isCallable$9;
176
+ var global$9 = global$a;
177
+ var isCallable$8 = isCallable$a;
154
178
 
155
179
  var aFunction = function (argument) {
156
- return isCallable$7(argument) ? argument : undefined;
180
+ return isCallable$8(argument) ? argument : undefined;
157
181
  };
158
182
 
159
183
  var getBuiltIn$3 = function (namespace, method) {
160
- return arguments.length < 2 ? aFunction(global$i[namespace]) : global$i[namespace] && global$i[namespace][method];
184
+ return arguments.length < 2 ? aFunction(global$9[namespace]) : global$9[namespace] && global$9[namespace][method];
161
185
  };
162
186
 
163
- var uncurryThis$7 = functionUncurryThis;
187
+ var uncurryThis$6 = functionUncurryThis;
164
188
 
165
- var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
189
+ var objectIsPrototypeOf = uncurryThis$6({}.isPrototypeOf);
166
190
 
167
191
  var getBuiltIn$2 = getBuiltIn$3;
168
192
 
169
193
  var engineUserAgent = getBuiltIn$2('navigator', 'userAgent') || '';
170
194
 
171
- var global$h = global$l;
195
+ var global$8 = global$a;
172
196
  var userAgent = engineUserAgent;
173
197
 
174
- var process = global$h.process;
175
- var Deno = global$h.Deno;
198
+ var process = global$8.process;
199
+ var Deno = global$8.Deno;
176
200
  var versions = process && process.versions || Deno && Deno.version;
177
201
  var v8 = versions && versions.v8;
178
202
  var match, version;
@@ -199,10 +223,10 @@ var engineV8Version = version;
199
223
  /* eslint-disable es/no-symbol -- required for testing */
200
224
 
201
225
  var V8_VERSION = engineV8Version;
202
- var fails$4 = fails$8;
226
+ var fails$5 = fails$9;
203
227
 
204
228
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
205
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$4(function () {
229
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$5(function () {
206
230
  var symbol = Symbol();
207
231
  // Chrome 38 Symbol has incorrect toString conversion
208
232
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -213,97 +237,93 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$4(function () {
213
237
 
214
238
  /* eslint-disable es/no-symbol -- required for testing */
215
239
 
216
- var NATIVE_SYMBOL$1 = nativeSymbol;
240
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
217
241
 
218
242
  var useSymbolAsUid = NATIVE_SYMBOL$1
219
243
  && !Symbol.sham
220
244
  && typeof Symbol.iterator == 'symbol';
221
245
 
222
- var global$g = global$l;
223
246
  var getBuiltIn$1 = getBuiltIn$3;
224
- var isCallable$6 = isCallable$9;
247
+ var isCallable$7 = isCallable$a;
225
248
  var isPrototypeOf = objectIsPrototypeOf;
226
249
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
227
250
 
228
- var Object$2 = global$g.Object;
251
+ var $Object$1 = Object;
229
252
 
230
253
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
231
254
  return typeof it == 'symbol';
232
255
  } : function (it) {
233
256
  var $Symbol = getBuiltIn$1('Symbol');
234
- return isCallable$6($Symbol) && isPrototypeOf($Symbol.prototype, Object$2(it));
257
+ return isCallable$7($Symbol) && isPrototypeOf($Symbol.prototype, $Object$1(it));
235
258
  };
236
259
 
237
- var global$f = global$l;
238
-
239
- var String$2 = global$f.String;
260
+ var $String$1 = String;
240
261
 
241
262
  var tryToString$1 = function (argument) {
242
263
  try {
243
- return String$2(argument);
264
+ return $String$1(argument);
244
265
  } catch (error) {
245
266
  return 'Object';
246
267
  }
247
268
  };
248
269
 
249
- var global$e = global$l;
250
- var isCallable$5 = isCallable$9;
270
+ var isCallable$6 = isCallable$a;
251
271
  var tryToString = tryToString$1;
252
272
 
253
- var TypeError$5 = global$e.TypeError;
273
+ var $TypeError$4 = TypeError;
254
274
 
255
275
  // `Assert: IsCallable(argument) is true`
256
276
  var aCallable$1 = function (argument) {
257
- if (isCallable$5(argument)) return argument;
258
- throw TypeError$5(tryToString(argument) + ' is not a function');
277
+ if (isCallable$6(argument)) return argument;
278
+ throw $TypeError$4(tryToString(argument) + ' is not a function');
259
279
  };
260
280
 
261
281
  var aCallable = aCallable$1;
282
+ var isNullOrUndefined = isNullOrUndefined$2;
262
283
 
263
284
  // `GetMethod` abstract operation
264
285
  // https://tc39.es/ecma262/#sec-getmethod
265
286
  var getMethod$1 = function (V, P) {
266
287
  var func = V[P];
267
- return func == null ? undefined : aCallable(func);
288
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
268
289
  };
269
290
 
270
- var global$d = global$l;
271
291
  var call$3 = functionCall;
272
- var isCallable$4 = isCallable$9;
292
+ var isCallable$5 = isCallable$a;
273
293
  var isObject$4 = isObject$5;
274
294
 
275
- var TypeError$4 = global$d.TypeError;
295
+ var $TypeError$3 = TypeError;
276
296
 
277
297
  // `OrdinaryToPrimitive` abstract operation
278
298
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
279
299
  var ordinaryToPrimitive$1 = function (input, pref) {
280
300
  var fn, val;
281
- if (pref === 'string' && isCallable$4(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
282
- if (isCallable$4(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
283
- if (pref !== 'string' && isCallable$4(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
284
- throw TypeError$4("Can't convert object to primitive value");
301
+ if (pref === 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
302
+ if (isCallable$5(fn = input.valueOf) && !isObject$4(val = call$3(fn, input))) return val;
303
+ if (pref !== 'string' && isCallable$5(fn = input.toString) && !isObject$4(val = call$3(fn, input))) return val;
304
+ throw $TypeError$3("Can't convert object to primitive value");
285
305
  };
286
306
 
287
307
  var shared$3 = {exports: {}};
288
308
 
289
- var global$c = global$l;
309
+ var global$7 = global$a;
290
310
 
291
311
  // eslint-disable-next-line es/no-object-defineproperty -- safe
292
- var defineProperty$1 = Object.defineProperty;
312
+ var defineProperty$2 = Object.defineProperty;
293
313
 
294
- var setGlobal$3 = function (key, value) {
314
+ var defineGlobalProperty$3 = function (key, value) {
295
315
  try {
296
- defineProperty$1(global$c, key, { value: value, configurable: true, writable: true });
316
+ defineProperty$2(global$7, key, { value: value, configurable: true, writable: true });
297
317
  } catch (error) {
298
- global$c[key] = value;
318
+ global$7[key] = value;
299
319
  } return value;
300
320
  };
301
321
 
302
- var global$b = global$l;
303
- var setGlobal$2 = setGlobal$3;
322
+ var global$6 = global$a;
323
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
304
324
 
305
325
  var SHARED = '__core-js_shared__';
306
- var store$3 = global$b[SHARED] || setGlobal$2(SHARED, {});
326
+ var store$3 = global$6[SHARED] || defineGlobalProperty$2(SHARED, {});
307
327
 
308
328
  var sharedStore = store$3;
309
329
 
@@ -312,54 +332,54 @@ var store$2 = sharedStore;
312
332
  (shared$3.exports = function (key, value) {
313
333
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
314
334
  })('versions', []).push({
315
- version: '3.21.1',
335
+ version: '3.26.1',
316
336
  mode: 'global',
317
337
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
318
- license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
338
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
319
339
  source: 'https://github.com/zloirock/core-js'
320
340
  });
321
341
 
322
- var global$a = global$l;
323
342
  var requireObjectCoercible = requireObjectCoercible$2;
324
343
 
325
- var Object$1 = global$a.Object;
344
+ var $Object = Object;
326
345
 
327
346
  // `ToObject` abstract operation
328
347
  // https://tc39.es/ecma262/#sec-toobject
329
348
  var toObject$2 = function (argument) {
330
- return Object$1(requireObjectCoercible(argument));
349
+ return $Object(requireObjectCoercible(argument));
331
350
  };
332
351
 
333
- var uncurryThis$6 = functionUncurryThis;
352
+ var uncurryThis$5 = functionUncurryThis;
334
353
  var toObject$1 = toObject$2;
335
354
 
336
- var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
355
+ var hasOwnProperty = uncurryThis$5({}.hasOwnProperty);
337
356
 
338
357
  // `HasOwnProperty` abstract operation
339
358
  // https://tc39.es/ecma262/#sec-hasownproperty
359
+ // eslint-disable-next-line es/no-object-hasown -- safe
340
360
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
341
361
  return hasOwnProperty(toObject$1(it), key);
342
362
  };
343
363
 
344
- var uncurryThis$5 = functionUncurryThis;
364
+ var uncurryThis$4 = functionUncurryThis;
345
365
 
346
366
  var id = 0;
347
367
  var postfix = Math.random();
348
- var toString = uncurryThis$5(1.0.toString);
368
+ var toString = uncurryThis$4(1.0.toString);
349
369
 
350
370
  var uid$2 = function (key) {
351
371
  return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
352
372
  };
353
373
 
354
- var global$9 = global$l;
374
+ var global$5 = global$a;
355
375
  var shared$2 = shared$3.exports;
356
376
  var hasOwn$6 = hasOwnProperty_1;
357
377
  var uid$1 = uid$2;
358
- var NATIVE_SYMBOL = nativeSymbol;
378
+ var NATIVE_SYMBOL = symbolConstructorDetection;
359
379
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
360
380
 
361
381
  var WellKnownSymbolsStore = shared$2('wks');
362
- var Symbol$1 = global$9.Symbol;
382
+ var Symbol$1 = global$5.Symbol;
363
383
  var symbolFor = Symbol$1 && Symbol$1['for'];
364
384
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
365
385
 
@@ -376,7 +396,6 @@ var wellKnownSymbol$1 = function (name) {
376
396
  } return WellKnownSymbolsStore[name];
377
397
  };
378
398
 
379
- var global$8 = global$l;
380
399
  var call$2 = functionCall;
381
400
  var isObject$3 = isObject$5;
382
401
  var isSymbol$1 = isSymbol$2;
@@ -384,7 +403,7 @@ var getMethod = getMethod$1;
384
403
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
385
404
  var wellKnownSymbol = wellKnownSymbol$1;
386
405
 
387
- var TypeError$3 = global$8.TypeError;
406
+ var $TypeError$2 = TypeError;
388
407
  var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
389
408
 
390
409
  // `ToPrimitive` abstract operation
@@ -397,7 +416,7 @@ var toPrimitive$1 = function (input, pref) {
397
416
  if (pref === undefined) pref = 'default';
398
417
  result = call$2(exoticToPrim, input, pref);
399
418
  if (!isObject$3(result) || isSymbol$1(result)) return result;
400
- throw TypeError$3("Can't convert object to primitive value");
419
+ throw $TypeError$2("Can't convert object to primitive value");
401
420
  }
402
421
  if (pref === undefined) pref = 'number';
403
422
  return ordinaryToPrimitive(input, pref);
@@ -413,30 +432,30 @@ var toPropertyKey$2 = function (argument) {
413
432
  return isSymbol(key) ? key : key + '';
414
433
  };
415
434
 
416
- var global$7 = global$l;
435
+ var global$4 = global$a;
417
436
  var isObject$2 = isObject$5;
418
437
 
419
- var document = global$7.document;
438
+ var document$1 = global$4.document;
420
439
  // typeof document.createElement is 'object' in old IE
421
- var EXISTS$1 = isObject$2(document) && isObject$2(document.createElement);
440
+ var EXISTS$1 = isObject$2(document$1) && isObject$2(document$1.createElement);
422
441
 
423
442
  var documentCreateElement = function (it) {
424
- return EXISTS$1 ? document.createElement(it) : {};
443
+ return EXISTS$1 ? document$1.createElement(it) : {};
425
444
  };
426
445
 
427
- var DESCRIPTORS$6 = descriptors;
428
- var fails$3 = fails$8;
446
+ var DESCRIPTORS$7 = descriptors;
447
+ var fails$4 = fails$9;
429
448
  var createElement = documentCreateElement;
430
449
 
431
450
  // Thanks to IE8 for its funny defineProperty
432
- var ie8DomDefine = !DESCRIPTORS$6 && !fails$3(function () {
451
+ var ie8DomDefine = !DESCRIPTORS$7 && !fails$4(function () {
433
452
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
434
453
  return Object.defineProperty(createElement('div'), 'a', {
435
454
  get: function () { return 7; }
436
455
  }).a != 7;
437
456
  });
438
457
 
439
- var DESCRIPTORS$5 = descriptors;
458
+ var DESCRIPTORS$6 = descriptors;
440
459
  var call$1 = functionCall;
441
460
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
442
461
  var createPropertyDescriptor$1 = createPropertyDescriptor$2;
@@ -450,7 +469,7 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
450
469
 
451
470
  // `Object.getOwnPropertyDescriptor` method
452
471
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
453
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
472
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
454
473
  O = toIndexedObject$2(O);
455
474
  P = toPropertyKey$1(P);
456
475
  if (IE8_DOM_DEFINE$1) try {
@@ -461,12 +480,12 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$5 ? $getOwnPropertyDescriptor$1 :
461
480
 
462
481
  var objectDefineProperty = {};
463
482
 
464
- var DESCRIPTORS$4 = descriptors;
465
- var fails$2 = fails$8;
483
+ var DESCRIPTORS$5 = descriptors;
484
+ var fails$3 = fails$9;
466
485
 
467
486
  // V8 ~ Chrome 36-
468
487
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
469
- var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$2(function () {
488
+ var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$3(function () {
470
489
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
471
490
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
472
491
  value: 42,
@@ -474,26 +493,24 @@ var v8PrototypeDefineBug = DESCRIPTORS$4 && fails$2(function () {
474
493
  }).prototype != 42;
475
494
  });
476
495
 
477
- var global$6 = global$l;
478
496
  var isObject$1 = isObject$5;
479
497
 
480
- var String$1 = global$6.String;
481
- var TypeError$2 = global$6.TypeError;
498
+ var $String = String;
499
+ var $TypeError$1 = TypeError;
482
500
 
483
501
  // `Assert: Type(argument) is Object`
484
502
  var anObject$2 = function (argument) {
485
503
  if (isObject$1(argument)) return argument;
486
- throw TypeError$2(String$1(argument) + ' is not an object');
504
+ throw $TypeError$1($String(argument) + ' is not an object');
487
505
  };
488
506
 
489
- var global$5 = global$l;
490
- var DESCRIPTORS$3 = descriptors;
507
+ var DESCRIPTORS$4 = descriptors;
491
508
  var IE8_DOM_DEFINE = ie8DomDefine;
492
509
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
493
510
  var anObject$1 = anObject$2;
494
511
  var toPropertyKey = toPropertyKey$2;
495
512
 
496
- var TypeError$1 = global$5.TypeError;
513
+ var $TypeError = TypeError;
497
514
  // eslint-disable-next-line es/no-object-defineproperty -- safe
498
515
  var $defineProperty = Object.defineProperty;
499
516
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -504,7 +521,7 @@ var WRITABLE = 'writable';
504
521
 
505
522
  // `Object.defineProperty` method
506
523
  // https://tc39.es/ecma262/#sec-object.defineproperty
507
- objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
524
+ objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
508
525
  anObject$1(O);
509
526
  P = toPropertyKey(P);
510
527
  anObject$1(Attributes);
@@ -526,46 +543,63 @@ objectDefineProperty.f = DESCRIPTORS$3 ? V8_PROTOTYPE_DEFINE_BUG ? function defi
526
543
  if (IE8_DOM_DEFINE) try {
527
544
  return $defineProperty(O, P, Attributes);
528
545
  } catch (error) { /* empty */ }
529
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$1('Accessors not supported');
546
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported');
530
547
  if ('value' in Attributes) O[P] = Attributes.value;
531
548
  return O;
532
549
  };
533
550
 
534
- var DESCRIPTORS$2 = descriptors;
535
- var definePropertyModule$1 = objectDefineProperty;
551
+ var DESCRIPTORS$3 = descriptors;
552
+ var definePropertyModule$2 = objectDefineProperty;
536
553
  var createPropertyDescriptor = createPropertyDescriptor$2;
537
554
 
538
- var createNonEnumerableProperty$3 = DESCRIPTORS$2 ? function (object, key, value) {
539
- return definePropertyModule$1.f(object, key, createPropertyDescriptor(1, value));
555
+ var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
556
+ return definePropertyModule$2.f(object, key, createPropertyDescriptor(1, value));
540
557
  } : function (object, key, value) {
541
558
  object[key] = value;
542
559
  return object;
543
560
  };
544
561
 
545
- var redefine$1 = {exports: {}};
562
+ var makeBuiltIn$2 = {exports: {}};
546
563
 
547
- var uncurryThis$4 = functionUncurryThis;
548
- var isCallable$3 = isCallable$9;
564
+ var DESCRIPTORS$2 = descriptors;
565
+ var hasOwn$4 = hasOwnProperty_1;
566
+
567
+ var FunctionPrototype = Function.prototype;
568
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
569
+ var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
570
+
571
+ var EXISTS = hasOwn$4(FunctionPrototype, 'name');
572
+ // additional protection from minified / mangled / dropped function names
573
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
574
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype, 'name').configurable));
575
+
576
+ var functionName = {
577
+ EXISTS: EXISTS,
578
+ PROPER: PROPER,
579
+ CONFIGURABLE: CONFIGURABLE
580
+ };
581
+
582
+ var uncurryThis$3 = functionUncurryThis;
583
+ var isCallable$4 = isCallable$a;
549
584
  var store$1 = sharedStore;
550
585
 
551
- var functionToString = uncurryThis$4(Function.toString);
586
+ var functionToString = uncurryThis$3(Function.toString);
552
587
 
553
588
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
554
- if (!isCallable$3(store$1.inspectSource)) {
589
+ if (!isCallable$4(store$1.inspectSource)) {
555
590
  store$1.inspectSource = function (it) {
556
591
  return functionToString(it);
557
592
  };
558
593
  }
559
594
 
560
- var inspectSource$2 = store$1.inspectSource;
595
+ var inspectSource$1 = store$1.inspectSource;
561
596
 
562
- var global$4 = global$l;
563
- var isCallable$2 = isCallable$9;
564
- var inspectSource$1 = inspectSource$2;
597
+ var global$3 = global$a;
598
+ var isCallable$3 = isCallable$a;
565
599
 
566
- var WeakMap$1 = global$4.WeakMap;
600
+ var WeakMap$1 = global$3.WeakMap;
567
601
 
568
- var nativeWeakMap = isCallable$2(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
602
+ var weakMapBasicDetection = isCallable$3(WeakMap$1) && /native code/.test(String(WeakMap$1));
569
603
 
570
604
  var shared$1 = shared$3.exports;
571
605
  var uid = uid$2;
@@ -578,19 +612,18 @@ var sharedKey$1 = function (key) {
578
612
 
579
613
  var hiddenKeys$3 = {};
580
614
 
581
- var NATIVE_WEAK_MAP = nativeWeakMap;
582
- var global$3 = global$l;
583
- var uncurryThis$3 = functionUncurryThis;
615
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
616
+ var global$2 = global$a;
584
617
  var isObject = isObject$5;
585
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
586
- var hasOwn$4 = hasOwnProperty_1;
618
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
619
+ var hasOwn$3 = hasOwnProperty_1;
587
620
  var shared = sharedStore;
588
621
  var sharedKey = sharedKey$1;
589
622
  var hiddenKeys$2 = hiddenKeys$3;
590
623
 
591
624
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
592
- var TypeError = global$3.TypeError;
593
- var WeakMap = global$3.WeakMap;
625
+ var TypeError$1 = global$2.TypeError;
626
+ var WeakMap = global$2.WeakMap;
594
627
  var set, get, has;
595
628
 
596
629
  var enforce = function (it) {
@@ -601,42 +634,44 @@ var getterFor = function (TYPE) {
601
634
  return function (it) {
602
635
  var state;
603
636
  if (!isObject(it) || (state = get(it)).type !== TYPE) {
604
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
637
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
605
638
  } return state;
606
639
  };
607
640
  };
608
641
 
609
642
  if (NATIVE_WEAK_MAP || shared.state) {
610
643
  var store = shared.state || (shared.state = new WeakMap());
611
- var wmget = uncurryThis$3(store.get);
612
- var wmhas = uncurryThis$3(store.has);
613
- var wmset = uncurryThis$3(store.set);
644
+ /* eslint-disable no-self-assign -- prototype methods protection */
645
+ store.get = store.get;
646
+ store.has = store.has;
647
+ store.set = store.set;
648
+ /* eslint-enable no-self-assign -- prototype methods protection */
614
649
  set = function (it, metadata) {
615
- if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
650
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
616
651
  metadata.facade = it;
617
- wmset(store, it, metadata);
652
+ store.set(it, metadata);
618
653
  return metadata;
619
654
  };
620
655
  get = function (it) {
621
- return wmget(store, it) || {};
656
+ return store.get(it) || {};
622
657
  };
623
658
  has = function (it) {
624
- return wmhas(store, it);
659
+ return store.has(it);
625
660
  };
626
661
  } else {
627
662
  var STATE = sharedKey('state');
628
663
  hiddenKeys$2[STATE] = true;
629
664
  set = function (it, metadata) {
630
- if (hasOwn$4(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
665
+ if (hasOwn$3(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
631
666
  metadata.facade = it;
632
- createNonEnumerableProperty$2(it, STATE, metadata);
667
+ createNonEnumerableProperty$1(it, STATE, metadata);
633
668
  return metadata;
634
669
  };
635
670
  get = function (it) {
636
- return hasOwn$4(it, STATE) ? it[STATE] : {};
671
+ return hasOwn$3(it, STATE) ? it[STATE] : {};
637
672
  };
638
673
  has = function (it) {
639
- return hasOwn$4(it, STATE);
674
+ return hasOwn$3(it, STATE);
640
675
  };
641
676
  }
642
677
 
@@ -648,82 +683,105 @@ var internalState = {
648
683
  getterFor: getterFor
649
684
  };
650
685
 
651
- var DESCRIPTORS$1 = descriptors;
652
- var hasOwn$3 = hasOwnProperty_1;
653
-
654
- var FunctionPrototype = Function.prototype;
655
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
656
- var getDescriptor = DESCRIPTORS$1 && Object.getOwnPropertyDescriptor;
657
-
658
- var EXISTS = hasOwn$3(FunctionPrototype, 'name');
659
- // additional protection from minified / mangled / dropped function names
660
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
661
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$1 || (DESCRIPTORS$1 && getDescriptor(FunctionPrototype, 'name').configurable));
662
-
663
- var functionName = {
664
- EXISTS: EXISTS,
665
- PROPER: PROPER,
666
- CONFIGURABLE: CONFIGURABLE
667
- };
668
-
669
- var global$2 = global$l;
670
- var isCallable$1 = isCallable$9;
686
+ var fails$2 = fails$9;
687
+ var isCallable$2 = isCallable$a;
671
688
  var hasOwn$2 = hasOwnProperty_1;
672
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
673
- var setGlobal$1 = setGlobal$3;
674
- var inspectSource = inspectSource$2;
675
- var InternalStateModule = internalState;
689
+ var DESCRIPTORS$1 = descriptors;
676
690
  var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
691
+ var inspectSource = inspectSource$1;
692
+ var InternalStateModule = internalState;
677
693
 
678
- var getInternalState = InternalStateModule.get;
679
694
  var enforceInternalState = InternalStateModule.enforce;
695
+ var getInternalState = InternalStateModule.get;
696
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
697
+ var defineProperty$1 = Object.defineProperty;
698
+
699
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$2(function () {
700
+ return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
701
+ });
702
+
680
703
  var TEMPLATE = String(String).split('String');
681
704
 
682
- (redefine$1.exports = function (O, key, value, options) {
683
- var unsafe = options ? !!options.unsafe : false;
684
- var simple = options ? !!options.enumerable : false;
685
- var noTargetGet = options ? !!options.noTargetGet : false;
686
- var name = options && options.name !== undefined ? options.name : key;
687
- var state;
688
- if (isCallable$1(value)) {
689
- if (String(name).slice(0, 7) === 'Symbol(') {
690
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
691
- }
692
- if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
693
- createNonEnumerableProperty$1(value, 'name', name);
694
- }
695
- state = enforceInternalState(value);
696
- if (!state.source) {
697
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
698
- }
705
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
706
+ if (String(name).slice(0, 7) === 'Symbol(') {
707
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
699
708
  }
700
- if (O === global$2) {
701
- if (simple) O[key] = value;
702
- else setGlobal$1(key, value);
703
- return;
704
- } else if (!unsafe) {
705
- delete O[key];
706
- } else if (!noTargetGet && O[key]) {
707
- simple = true;
709
+ if (options && options.getter) name = 'get ' + name;
710
+ if (options && options.setter) name = 'set ' + name;
711
+ if (!hasOwn$2(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
712
+ if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
713
+ else value.name = name;
708
714
  }
709
- if (simple) O[key] = value;
710
- else createNonEnumerableProperty$1(O, key, value);
715
+ if (CONFIGURABLE_LENGTH && options && hasOwn$2(options, 'arity') && value.length !== options.arity) {
716
+ defineProperty$1(value, 'length', { value: options.arity });
717
+ }
718
+ try {
719
+ if (options && hasOwn$2(options, 'constructor') && options.constructor) {
720
+ if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
721
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
722
+ } else if (value.prototype) value.prototype = undefined;
723
+ } catch (error) { /* empty */ }
724
+ var state = enforceInternalState(value);
725
+ if (!hasOwn$2(state, 'source')) {
726
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
727
+ } return value;
728
+ };
729
+
711
730
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
712
- })(Function.prototype, 'toString', function toString() {
713
- return isCallable$1(this) && getInternalState(this).source || inspectSource(this);
714
- });
731
+ // eslint-disable-next-line no-extend-native -- required
732
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
733
+ return isCallable$2(this) && getInternalState(this).source || inspectSource(this);
734
+ }, 'toString');
735
+
736
+ var isCallable$1 = isCallable$a;
737
+ var definePropertyModule$1 = objectDefineProperty;
738
+ var makeBuiltIn = makeBuiltIn$2.exports;
739
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
740
+
741
+ var defineBuiltIn$1 = function (O, key, value, options) {
742
+ if (!options) options = {};
743
+ var simple = options.enumerable;
744
+ var name = options.name !== undefined ? options.name : key;
745
+ if (isCallable$1(value)) makeBuiltIn(value, name, options);
746
+ if (options.global) {
747
+ if (simple) O[key] = value;
748
+ else defineGlobalProperty$1(key, value);
749
+ } else {
750
+ try {
751
+ if (!options.unsafe) delete O[key];
752
+ else if (O[key]) simple = true;
753
+ } catch (error) { /* empty */ }
754
+ if (simple) O[key] = value;
755
+ else definePropertyModule$1.f(O, key, {
756
+ value: value,
757
+ enumerable: false,
758
+ configurable: !options.nonConfigurable,
759
+ writable: !options.nonWritable
760
+ });
761
+ } return O;
762
+ };
715
763
 
716
764
  var objectGetOwnPropertyNames = {};
717
765
 
718
766
  var ceil = Math.ceil;
719
767
  var floor = Math.floor;
720
768
 
769
+ // `Math.trunc` method
770
+ // https://tc39.es/ecma262/#sec-math.trunc
771
+ // eslint-disable-next-line es/no-math-trunc -- safe
772
+ var mathTrunc = Math.trunc || function trunc(x) {
773
+ var n = +x;
774
+ return (n > 0 ? floor : ceil)(n);
775
+ };
776
+
777
+ var trunc = mathTrunc;
778
+
721
779
  // `ToIntegerOrInfinity` abstract operation
722
780
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
723
781
  var toIntegerOrInfinity$2 = function (argument) {
724
782
  var number = +argument;
725
- // eslint-disable-next-line no-self-compare -- safe
726
- return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
783
+ // eslint-disable-next-line no-self-compare -- NaN check
784
+ return number !== number || number === 0 ? 0 : trunc(number);
727
785
  };
728
786
 
729
787
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
@@ -871,8 +929,8 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
871
929
  }
872
930
  };
873
931
 
874
- var fails$1 = fails$8;
875
- var isCallable = isCallable$9;
932
+ var fails$1 = fails$9;
933
+ var isCallable = isCallable$a;
876
934
 
877
935
  var replacement = /#|\.prototype\./;
878
936
 
@@ -894,28 +952,28 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
894
952
 
895
953
  var isForced_1 = isForced$1;
896
954
 
897
- var global$1 = global$l;
955
+ var global$1 = global$a;
898
956
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
899
- var createNonEnumerableProperty = createNonEnumerableProperty$3;
900
- var redefine = redefine$1.exports;
901
- var setGlobal = setGlobal$3;
957
+ var createNonEnumerableProperty = createNonEnumerableProperty$2;
958
+ var defineBuiltIn = defineBuiltIn$1;
959
+ var defineGlobalProperty = defineGlobalProperty$3;
902
960
  var copyConstructorProperties = copyConstructorProperties$1;
903
961
  var isForced = isForced_1;
904
962
 
905
963
  /*
906
- options.target - name of the target object
907
- options.global - target is the global object
908
- options.stat - export as static methods of target
909
- options.proto - export as prototype methods of target
910
- options.real - real prototype method for the `pure` version
911
- options.forced - export even if the native feature is available
912
- options.bind - bind methods to the target, required for the `pure` version
913
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
914
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
915
- options.sham - add a flag to not completely full polyfills
916
- options.enumerable - export as enumerable property
917
- options.noTargetGet - prevent calling a getter on target
918
- options.name - the .name of the function if it does not match the key
964
+ options.target - name of the target object
965
+ options.global - target is the global object
966
+ options.stat - export as static methods of target
967
+ options.proto - export as prototype methods of target
968
+ options.real - real prototype method for the `pure` version
969
+ options.forced - export even if the native feature is available
970
+ options.bind - bind methods to the target, required for the `pure` version
971
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
972
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
973
+ options.sham - add a flag to not completely full polyfills
974
+ options.enumerable - export as enumerable property
975
+ options.dontCallGetSet - prevent calling a getter on target
976
+ options.name - the .name of the function if it does not match the key
919
977
  */
920
978
  var _export = function (options, source) {
921
979
  var TARGET = options.target;
@@ -925,13 +983,13 @@ var _export = function (options, source) {
925
983
  if (GLOBAL) {
926
984
  target = global$1;
927
985
  } else if (STATIC) {
928
- target = global$1[TARGET] || setGlobal(TARGET, {});
986
+ target = global$1[TARGET] || defineGlobalProperty(TARGET, {});
929
987
  } else {
930
988
  target = (global$1[TARGET] || {}).prototype;
931
989
  }
932
990
  if (target) for (key in source) {
933
991
  sourceProperty = source[key];
934
- if (options.noTargetGet) {
992
+ if (options.dontCallGetSet) {
935
993
  descriptor = getOwnPropertyDescriptor(target, key);
936
994
  targetProperty = descriptor && descriptor.value;
937
995
  } else targetProperty = target[key];
@@ -945,8 +1003,7 @@ var _export = function (options, source) {
945
1003
  if (options.sham || (targetProperty && targetProperty.sham)) {
946
1004
  createNonEnumerableProperty(sourceProperty, 'sham', true);
947
1005
  }
948
- // extend global
949
- redefine(target, key, sourceProperty, options);
1006
+ defineBuiltIn(target, key, sourceProperty, options);
950
1007
  }
951
1008
  };
952
1009
 
@@ -963,7 +1020,7 @@ var objectKeys$1 = Object.keys || function keys(O) {
963
1020
  var DESCRIPTORS = descriptors;
964
1021
  var uncurryThis = functionUncurryThis;
965
1022
  var call = functionCall;
966
- var fails = fails$8;
1023
+ var fails = fails$9;
967
1024
  var objectKeys = objectKeys$1;
968
1025
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
969
1026
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1023,7 +1080,7 @@ var assign = objectAssign;
1023
1080
  // `Object.assign` method
1024
1081
  // https://tc39.es/ecma262/#sec-object.assign
1025
1082
  // eslint-disable-next-line es/no-object-assign -- required for testing
1026
- $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1083
+ $({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1027
1084
  assign: assign
1028
1085
  });
1029
1086
 
@@ -1047,11 +1104,9 @@ const NinetailedGoogleAnalyticsPlugin = options => {
1047
1104
  event,
1048
1105
  properties
1049
1106
  } = payload;
1050
-
1051
1107
  if (event !== HAS_SEEN_COMPONENT || !properties || !properties.variant || !properties.audience || typeof properties.isPersonalized === 'undefined') {
1052
1108
  return abort();
1053
1109
  }
1054
-
1055
1110
  const {
1056
1111
  variant,
1057
1112
  audience,
package/package.json CHANGED
@@ -1,19 +1,15 @@
1
1
  {
2
2
  "name": "@ninetailed/experience.js-plugin-google-analytics",
3
- "version": "3.0.0-beta.14",
4
- "main": "./index.umd.js",
5
- "module": "./index.esm.js",
6
- "typings": "./index.d.ts",
3
+ "version": "3.0.0-beta.19",
4
+ "module": "./index.js",
5
+ "main": "./index.js",
6
+ "type": "module",
7
+ "types": "./index.d.ts",
7
8
  "dependencies": {
8
- "analytics": "^0.8.0",
9
- "@analytics/google-analytics": "^0.5.3",
10
- "lodash": "^4.17.21",
11
- "@ninetailed/experience.js-shared": "3.0.0-beta.14",
12
- "ts-toolbelt": "^9.6.0",
13
- "diary": "^0.3.1",
14
- "zod": "^3.18.0",
15
- "locale-enum": "^1.1.1",
16
- "i18n-iso-countries": "^7.3.0"
9
+ "analytics": "0.8.1",
10
+ "@analytics/google-analytics": "0.5.3",
11
+ "lodash": "4.17.21",
12
+ "@ninetailed/experience.js-shared": "3.0.0-beta.19"
17
13
  },
18
14
  "peerDependencies": {}
19
15
  }
package/index.umd.js DELETED
@@ -1,97 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@analytics/google-analytics'), require('lodash/template')) :
3
- typeof define === 'function' && define.amd ? define(['exports', '@analytics/google-analytics', 'lodash/template'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.GoogleAnalytics = {}, global.googleAnalytics, global.template));
5
- })(this, (function (exports, googleAnalytics, template) { 'use strict';
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var googleAnalytics__default = /*#__PURE__*/_interopDefaultLegacy(googleAnalytics);
10
- var template__default = /*#__PURE__*/_interopDefaultLegacy(template);
11
-
12
- /*! *****************************************************************************
13
- Copyright (c) Microsoft Corporation.
14
-
15
- Permission to use, copy, modify, and/or distribute this software for any
16
- purpose with or without fee is hereby granted.
17
-
18
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
19
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
20
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
21
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
22
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
23
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
24
- PERFORMANCE OF THIS SOFTWARE.
25
- ***************************************************************************** */
26
-
27
- var __assign = function() {
28
- __assign = Object.assign || function __assign(t) {
29
- for (var s, i = 1, n = arguments.length; i < n; i++) {
30
- s = arguments[i];
31
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
32
- }
33
- return t;
34
- };
35
- return __assign.apply(this, arguments);
36
- };
37
-
38
- var HAS_SEEN_COMPONENT = 'hasSeenComponent';
39
- var TEMPLATE_OPTIONS = {
40
- interpolate: /{{([\s\S]+?)}}/g
41
- };
42
- var NinetailedGoogleAnalyticsPlugin = function NinetailedGoogleAnalyticsPlugin(options) {
43
- var actionTemplate = template__default["default"](options.actionTemplate || 'Has Seen Component - Audience:{{ audience.id }}', TEMPLATE_OPTIONS);
44
- var labelTemplate = template__default["default"](options.labelTemplate || '{{ baselineOrVariant }}:{{ component.id }}', TEMPLATE_OPTIONS);
45
- var trackOverwritePlugin = {
46
- name: 'ninetailed:google-analytics',
47
- 'page:google-analytics': function (_a) {
48
- var abort = _a.abort;
49
- return abort();
50
- },
51
- 'track:google-analytics': function (_a) {
52
- var payload = _a.payload,
53
- abort = _a.abort;
54
- var event = payload.event,
55
- properties = payload.properties;
56
-
57
- if (event !== HAS_SEEN_COMPONENT || !properties || !properties.variant || !properties.audience || typeof properties.isPersonalized === 'undefined') {
58
- return abort();
59
- }
60
-
61
- var variant = properties.variant,
62
- audience = properties.audience,
63
- isPersonalized = properties.isPersonalized;
64
- var action = actionTemplate({
65
- component: variant,
66
- audience: audience
67
- });
68
- var label = labelTemplate({
69
- component: variant,
70
- audience: audience,
71
- baselineOrVariant: isPersonalized ? 'Variant' : 'Baseline'
72
- });
73
- return __assign(__assign({}, payload), {
74
- event: action,
75
- properties: {
76
- category: 'Ninetailed',
77
- label: label,
78
- nonInteraction: true
79
- }
80
- });
81
- },
82
- 'identify:google-analytics': function (_a) {
83
- var abort = _a.abort;
84
- return abort();
85
- }
86
- };
87
- return [trackOverwritePlugin, googleAnalytics__default["default"]({
88
- trackingId: options.trackingId
89
- })];
90
- };
91
-
92
- exports.NinetailedGoogleAnalyticsPlugin = NinetailedGoogleAnalyticsPlugin;
93
- exports["default"] = NinetailedGoogleAnalyticsPlugin;
94
-
95
- Object.defineProperty(exports, '__esModule', { value: true });
96
-
97
- }));