@picked/analytics 0.0.1-dev.1764710808992 → 0.0.1-dev.1764728988965

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,9 @@
1
1
  import { trackSelfDescribingEvent as wt, newTracker as Pt, addGlobalContexts as Vt, enableActivityTracking as St, enableActivityTrackingCallback as Yt } from "@snowplow/browser-tracker";
2
2
  import { ButtonClickTrackingPlugin as Bt, enableButtonClickTracking as Ht } from "@snowplow/browser-plugin-button-click-tracking";
3
3
  import { PerformanceNavigationTimingPlugin as qt } from "@snowplow/browser-plugin-performance-navigation-timing";
4
- import { ErrorTrackingPlugin as At, enableErrorTracking as Ft } from "@snowplow/browser-plugin-error-tracking";
5
- import { WebVitalsPlugin as Ot } from "@snowplow/browser-plugin-web-vitals";
6
- import { supportsDocument as X, supportsWindow as jt, supportsCookies as Rt } from "@picked/client";
7
- import { getFingerprintVisitorId as It } from "@picked/fingerprintjs";
4
+ import { ErrorTrackingPlugin as At, enableErrorTracking as Ot } from "@snowplow/browser-plugin-error-tracking";
5
+ import { WebVitalsPlugin as Ft } from "@snowplow/browser-plugin-web-vitals";
6
+ import { supportsDocument as X, supportsWindow as Rt, supportsCookies as jt } from "@picked/client";
8
7
  function J(t, e) {
9
8
  return `iglu:dev.pckd/${t}/jsonschema/${e}`;
10
9
  }
@@ -66,7 +65,7 @@ function Wt(t, e) {
66
65
  function h(t, e) {
67
66
  const s = /* @__PURE__ */ new Set();
68
67
  return (i) => {
69
- if (s.has(t) || !jt())
68
+ if (s.has(t) || !Rt())
70
69
  return;
71
70
  function a(o) {
72
71
  const r = i();
@@ -86,13 +85,13 @@ function f(t) {
86
85
  }
87
86
  const D = "unknown";
88
87
  function d(t) {
89
- var a, o, r;
90
- const e = Mt(), s = It(), i = {
88
+ var i, a, o;
89
+ const e = It(), s = {
91
90
  id: t.sessionId || null
92
91
  };
93
- return t.isUser !== void 0 && (i.is_user = t.isUser), s && (i.fingerprintjs_visitor_id = s), e && (i.gaid = e), (a = t.shopifySession) != null && a.clientId && (i.shopify_client_id = t.shopifySession.clientId), (o = t.shopifySession) != null && o.customerId && (i.shopify_customer_id = t.shopifySession.customerId), (r = t.shopifySession) != null && r.checkoutToken && (i.shopify_checkout_token = t.shopifySession.checkoutToken), i;
92
+ return t.isUser !== void 0 && (s.is_user = t.isUser), e && (s.gaid = e), (i = t.shopifySession) != null && i.clientId && (s.shopify_client_id = t.shopifySession.clientId), (a = t.shopifySession) != null && a.customerId && (s.shopify_customer_id = t.shopifySession.customerId), (o = t.shopifySession) != null && o.checkoutToken && (s.shopify_checkout_token = t.shopifySession.checkoutToken), s;
94
93
  }
95
- function R(t) {
94
+ function j(t) {
96
95
  if (t.fields)
97
96
  return {
98
97
  items: t.fields.map(({ id: e, type: s, label: i, options: a }) => ({
@@ -127,7 +126,7 @@ function x(t, e = !1) {
127
126
  title: D
128
127
  };
129
128
  }
130
- function On(t, e = !1) {
129
+ function An(t, e = !1) {
131
130
  const { productList: s } = t;
132
131
  if (s) {
133
132
  const i = {};
@@ -167,7 +166,7 @@ function On(t, e = !1) {
167
166
  items: []
168
167
  };
169
168
  }
170
- function jn(t, e = !1) {
169
+ function On(t, e = !1) {
171
170
  const { order: s } = t;
172
171
  if (s) {
173
172
  const i = {
@@ -214,7 +213,7 @@ function w(t) {
214
213
  title: D
215
214
  });
216
215
  }
217
- function Rn(t) {
216
+ function Fn(t) {
218
217
  const { modal: e } = t;
219
218
  return e ? {
220
219
  id: e.id,
@@ -239,8 +238,8 @@ function y(t) {
239
238
  if (!isNaN(e))
240
239
  return e;
241
240
  }
242
- function Mt() {
243
- if (!X() || !Rt())
241
+ function It() {
242
+ if (!X() || !jt())
244
243
  return null;
245
244
  const t = "_ga=", e = document.cookie ? document.cookie.split(";") : [];
246
245
  for (const s of e) {
@@ -252,11 +251,11 @@ function Mt() {
252
251
  }
253
252
  }
254
253
  }
255
- function Ut(t) {
254
+ function Mt(t) {
256
255
  const e = [];
257
- return t.trackErrors && ($(), e.push(At())), t.trackVitals && ($(), e.push(Ot())), t.trackPerformance && ($(), e.push(qt())), (t.trackButtonClickAllowList || t.trackButtonClickFilter) && e.push(Bt()), e;
256
+ return t.trackErrors && ($(), e.push(At())), t.trackVitals && ($(), e.push(Ft())), t.trackPerformance && ($(), e.push(qt())), (t.trackButtonClickAllowList || t.trackButtonClickFilter) && e.push(Bt()), e;
258
257
  }
259
- function zt(t) {
258
+ function Ut(t) {
260
259
  t.trackActivity && !t.trackActivityCallback && ($(), St({
261
260
  minimumVisitLength: 30,
262
261
  heartbeatDelay: 10
@@ -268,9 +267,9 @@ function zt(t) {
268
267
  filter: t.trackButtonClickAllowList ? {
269
268
  allowlist: t.trackButtonClickAllowList
270
269
  } : t.trackButtonClickFilter
271
- })), t.trackErrors && ($(), Ft());
270
+ })), t.trackErrors && ($(), Ot());
272
271
  }
273
- function In({
272
+ function Rn({
274
273
  organizationId: t,
275
274
  projectId: e,
276
275
  cvlyX: s,
@@ -287,7 +286,7 @@ function In({
287
286
  trackButtonClickAllowList: ht
288
287
  }) {
289
288
  $();
290
- const I = {
289
+ const W = {
291
290
  trackVitals: o,
292
291
  trackErrors: gt,
293
292
  trackActivity: $t,
@@ -302,15 +301,15 @@ function In({
302
301
  session: m,
303
302
  browser: C || !1
304
303
  },
305
- plugins: Ut(I)
304
+ plugins: Mt(W)
306
305
  }, Nt = Pt(a, i, yt);
307
- return Gt({
306
+ return zt({
308
307
  organizationId: t,
309
308
  projectId: e,
310
309
  cvlyX: s
311
- }), zt(I), Nt;
310
+ }), Ut(W), Nt;
312
311
  }
313
- function Gt({ organizationId: t, projectId: e, cvlyX: s }) {
312
+ function zt({ organizationId: t, projectId: e, cvlyX: s }) {
314
313
  if (!t || !e)
315
314
  throw new Error("bindGlobalContext: Both organizationId and projectId are required");
316
315
  const i = [];
@@ -328,97 +327,97 @@ function Gt({ organizationId: t, projectId: e, cvlyX: s }) {
328
327
  ), Vt(i);
329
328
  }
330
329
  const tt = "app_close";
331
- function Kt(t, e) {
330
+ function Gt(t, e) {
332
331
  const s = f(t), i = d(t), a = p(t), o = x(t);
333
332
  return l(
334
333
  tt,
335
334
  [
336
335
  n("feature_list", "2-0-0", s),
337
- n("session", "1-0-4", i),
336
+ n("session", "1-0-3", i),
338
337
  o ? n("step", "1-0-0", o) : void 0,
339
338
  a ? n("experience", "1-0-1", a) : void 0
340
339
  ],
341
340
  e
342
341
  );
343
342
  }
344
- const Wn = u(tt, Kt), et = "app_initialize";
345
- function Xt(t, e) {
343
+ const jn = u(tt, Gt), et = "app_initialize";
344
+ function Kt(t, e) {
346
345
  const s = f(t), i = d(t), a = p(t), o = x(t);
347
346
  return l(
348
347
  et,
349
348
  [
350
349
  n("feature_list", "2-0-0", s),
351
- n("session", "1-0-4", i),
350
+ n("session", "1-0-3", i),
352
351
  o ? n("step", "1-0-0", o) : void 0,
353
352
  a ? n("experience", "1-0-1", a) : void 0
354
353
  ],
355
354
  e
356
355
  );
357
356
  }
358
- const Mn = u(et, Xt), nt = "app_load";
359
- function Jt(t, e) {
357
+ const Wn = u(et, Kt), nt = "app_load";
358
+ function Xt(t, e) {
360
359
  const s = f(t), i = d(t), a = p(t), o = x(t);
361
360
  return l(
362
361
  nt,
363
362
  [
364
363
  n("feature_list", "2-0-0", s),
365
- n("session", "1-0-4", i),
364
+ n("session", "1-0-3", i),
366
365
  o ? n("step", "1-0-0", o) : void 0,
367
366
  a ? n("experience", "1-0-1", a) : void 0
368
367
  ],
369
368
  e
370
369
  );
371
370
  }
372
- const Un = u(nt, Jt), st = "app_open";
373
- function Qt(t, e) {
371
+ const In = u(nt, Xt), st = "app_open";
372
+ function Jt(t, e) {
374
373
  const s = f(t), i = d(t), a = p(t), o = x(t);
375
374
  return l(
376
375
  st,
377
376
  [
378
377
  n("feature_list", "2-0-0", s),
379
- n("session", "1-0-4", i),
378
+ n("session", "1-0-3", i),
380
379
  o ? n("step", "1-0-0", o) : void 0,
381
380
  a ? n("experience", "1-0-1", a) : void 0
382
381
  ],
383
382
  e
384
383
  );
385
384
  }
386
- const zn = u(st, Qt), ot = "experience_load";
387
- function Zt(t, e) {
385
+ const Mn = u(st, Jt), ot = "experience_load";
386
+ function Qt(t, e) {
388
387
  const s = f(t), i = d(t), a = p(t, !0), o = x(t);
389
388
  return l(
390
389
  ot,
391
390
  [
392
391
  n("feature_list", "2-0-0", s),
393
- n("session", "1-0-4", i),
392
+ n("session", "1-0-3", i),
394
393
  n("experience", "1-0-1", a),
395
394
  o ? n("step", "1-0-0", o) : void 0
396
395
  ],
397
396
  e
398
397
  );
399
398
  }
400
- const Gn = u(ot, Zt), at = "feature_decide";
401
- function te(t, e) {
399
+ const Un = u(ot, Qt), at = "feature_decide";
400
+ function Zt(t, e) {
402
401
  const s = f(t), i = d(t), a = p(t), o = x(t);
403
402
  return l(
404
403
  at,
405
404
  [
406
405
  n("feature_list", "2-0-0", s),
407
- n("session", "1-0-4", i),
406
+ n("session", "1-0-3", i),
408
407
  o ? n("step", "1-0-0", o) : void 0,
409
408
  a ? n("experience", "1-0-1", a) : void 0
410
409
  ],
411
410
  e
412
411
  );
413
412
  }
414
- const Kn = u(at, te), it = "field_validation_error";
415
- function ee(t, e) {
413
+ const zn = u(at, Zt), it = "field_validation_error";
414
+ function te(t, e) {
416
415
  const s = f(t), i = d(t), a = w(t), o = Z(t, !0), r = p(t), c = x(t);
417
416
  return l(
418
417
  it,
419
418
  [
420
419
  n("feature_list", "2-0-0", s),
421
- n("session", "1-0-4", i),
420
+ n("session", "1-0-3", i),
422
421
  n("exception", "1-0-0", o),
423
422
  n("form", "1-0-0", a),
424
423
  r && n("experience", "1-0-1", r),
@@ -427,14 +426,14 @@ function ee(t, e) {
427
426
  e
428
427
  );
429
428
  }
430
- const Xn = u(it, ee), rt = "form_submit";
431
- function ne(t, e) {
429
+ const Gn = u(it, te), rt = "form_submit";
430
+ function ee(t, e) {
432
431
  const s = f(t), i = d(t), a = w(t), o = p(t), r = x(t);
433
432
  return l(
434
433
  rt,
435
434
  [
436
435
  n("feature_list", "2-0-0", s),
437
- n("session", "1-0-4", i),
436
+ n("session", "1-0-3", i),
438
437
  n("form", "1-0-0", a),
439
438
  o && n("experience", "1-0-1", o),
440
439
  r && n("step", "1-0-0", r)
@@ -442,14 +441,14 @@ function ne(t, e) {
442
441
  e
443
442
  );
444
443
  }
445
- const Jn = u(rt, ne), ct = "form_submit_error";
446
- function se(t, e) {
444
+ const Kn = u(rt, ee), ct = "form_submit_error";
445
+ function ne(t, e) {
447
446
  const s = f(t), i = d(t), a = w(t), o = Z(t, !0), r = p(t), c = x(t);
448
447
  return l(
449
448
  ct,
450
449
  [
451
450
  n("feature_list", "2-0-0", s),
452
- n("session", "1-0-4", i),
451
+ n("session", "1-0-3", i),
453
452
  n("form", "1-0-0", a),
454
453
  n("exception", "1-0-0", o),
455
454
  r && n("experience", "1-0-1", r),
@@ -458,14 +457,14 @@ function se(t, e) {
458
457
  e
459
458
  );
460
459
  }
461
- const Qn = u(ct, se), lt = "form_submit_success";
462
- function oe(t, e) {
460
+ const Xn = u(ct, ne), lt = "form_submit_success";
461
+ function se(t, e) {
463
462
  const s = f(t), i = d(t), a = w(t), o = p(t), r = x(t);
464
463
  return l(
465
464
  lt,
466
465
  [
467
466
  n("feature_list", "2-0-0", s),
468
- n("session", "1-0-4", i),
467
+ n("session", "1-0-3", i),
469
468
  n("form", "1-0-0", a),
470
469
  o && n("experience", "1-0-1", o),
471
470
  r && n("step", "1-0-0", r)
@@ -473,14 +472,14 @@ function oe(t, e) {
473
472
  e
474
473
  );
475
474
  }
476
- const Zn = u(lt, oe), ut = "step_enter";
477
- function ae(t, e) {
478
- const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = R(t);
475
+ const Jn = u(lt, se), ut = "step_enter";
476
+ function oe(t, e) {
477
+ const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = j(t);
479
478
  return l(
480
479
  ut,
481
480
  [
482
481
  n("feature_list", "2-0-0", s),
483
- n("session", "1-0-4", i),
482
+ n("session", "1-0-3", i),
484
483
  n("step", "1-0-0", o),
485
484
  r && n("field_list", "1-0-0", r),
486
485
  a && n("experience", "1-0-1", a)
@@ -488,14 +487,14 @@ function ae(t, e) {
488
487
  e
489
488
  );
490
489
  }
491
- const ts = u(ut, ae), ft = "step_submit";
492
- function ie(t, e) {
493
- const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = Q(t), c = R(t);
490
+ const Qn = u(ut, oe), ft = "step_submit";
491
+ function ae(t, e) {
492
+ const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = Q(t), c = j(t);
494
493
  return l(
495
494
  ft,
496
495
  [
497
496
  n("feature_list", "2-0-0", s),
498
- n("session", "1-0-4", i),
497
+ n("session", "1-0-3", i),
499
498
  n("step", "1-0-0", o),
500
499
  c && n("field_list", "1-0-0", c),
501
500
  r && n("response_list", "1-0-0", r),
@@ -504,14 +503,14 @@ function ie(t, e) {
504
503
  e
505
504
  );
506
505
  }
507
- const es = u(ft, ie), dt = "step_submit_success";
508
- function re(t, e) {
509
- const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = R(t), c = Q(t);
506
+ const Zn = u(ft, ae), dt = "step_submit_success";
507
+ function ie(t, e) {
508
+ const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = j(t), c = Q(t);
510
509
  return l(
511
510
  dt,
512
511
  [
513
512
  n("feature_list", "2-0-0", s),
514
- n("session", "1-0-4", i),
513
+ n("session", "1-0-3", i),
515
514
  n("step", "1-0-0", o),
516
515
  r && n("field_list", "1-0-0", r),
517
516
  c && n("response_list", "1-0-0", c),
@@ -520,7 +519,7 @@ function re(t, e) {
520
519
  e
521
520
  );
522
521
  }
523
- const ns = u(dt, re);
522
+ const ts = u(dt, ie);
524
523
  function k(t) {
525
524
  return t instanceof Element;
526
525
  }
@@ -597,12 +596,12 @@ function b(t) {
597
596
  }
598
597
  return "placeholder" in t && typeof t.placeholder == "string" ? t.placeholder : null;
599
598
  }
600
- const ce = 255;
599
+ const re = 255;
601
600
  function E(t) {
602
- return t ? t.slice(0, ce) : null;
601
+ return t ? t.slice(0, re) : null;
603
602
  }
604
603
  const S = "rapid_scroll";
605
- function le(t, e) {
604
+ function ce(t, e) {
606
605
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
607
606
  if (!k(r)) {
608
607
  const C = {
@@ -612,7 +611,7 @@ function le(t, e) {
612
611
  S,
613
612
  [
614
613
  n("feature_list", "2-0-0", s),
615
- n("session", "1-0-4", i),
614
+ n("session", "1-0-3", i),
616
615
  o ? n("step", "1-0-0", o) : void 0,
617
616
  a ? n("experience", "1-0-1", a) : void 0,
618
617
  n("element", "1-0-0", C)
@@ -630,7 +629,7 @@ function le(t, e) {
630
629
  S,
631
630
  [
632
631
  n("feature_list", "2-0-0", s),
633
- n("session", "1-0-4", i),
632
+ n("session", "1-0-3", i),
634
633
  o ? n("step", "1-0-0", o) : void 0,
635
634
  a ? n("experience", "1-0-1", a) : void 0,
636
635
  n("element", "1-0-0", m)
@@ -638,23 +637,23 @@ function le(t, e) {
638
637
  e
639
638
  );
640
639
  }
641
- const ue = u(S, le), fe = 100, de = 100, xe = 300;
642
- let W = 0, M = 0;
643
- const pe = P(
640
+ const le = u(S, ce), ue = 100, fe = 100, de = 300;
641
+ let I = 0, M = 0;
642
+ const xe = P(
644
643
  (t, e) => {
645
- ue(t, e);
644
+ le(t, e);
646
645
  },
647
- xe
646
+ de
648
647
  );
649
- function me(t, e) {
648
+ function pe(t, e) {
650
649
  const s = t.event.target || document.documentElement;
651
650
  if (!(s instanceof HTMLElement))
652
651
  return;
653
652
  const i = s.scrollTop, a = Date.now() - M;
654
- Math.abs(i - W) > fe && a < de && pe(t.event, e), W = i, M = Date.now();
653
+ Math.abs(i - I) > ue && a < fe && xe(t.event, e), I = i, M = Date.now();
655
654
  }
656
- const Ee = _("scroll", me, !0), Y = "rapid_click";
657
- function Ce(t, e) {
655
+ const me = _("scroll", pe, !0), Y = "rapid_click";
656
+ function Ee(t, e) {
658
657
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
659
658
  if (!k(r)) {
660
659
  const C = {
@@ -664,7 +663,7 @@ function Ce(t, e) {
664
663
  Y,
665
664
  [
666
665
  n("feature_list", "2-0-0", s),
667
- n("session", "1-0-4", i),
666
+ n("session", "1-0-3", i),
668
667
  n("element", "1-0-0", C),
669
668
  o ? n("step", "1-0-0", o) : void 0,
670
669
  a ? n("experience", "1-0-1", a) : void 0
@@ -682,7 +681,7 @@ function Ce(t, e) {
682
681
  Y,
683
682
  [
684
683
  n("feature_list", "2-0-0", s),
685
- n("session", "1-0-4", i),
684
+ n("session", "1-0-3", i),
686
685
  n("element", "1-0-0", m),
687
686
  o ? n("step", "1-0-0", o) : void 0,
688
687
  a ? n("experience", "1-0-1", a) : void 0
@@ -690,15 +689,15 @@ function Ce(t, e) {
690
689
  e
691
690
  );
692
691
  }
693
- const ve = u(Y, Ce);
692
+ const Ce = u(Y, Ee);
694
693
  let N = 0, U = 0;
695
- const De = 3, _e = 500;
696
- function ke(t, e) {
694
+ const ve = 3, De = 500;
695
+ function _e(t, e) {
697
696
  const s = (/* @__PURE__ */ new Date()).getTime();
698
- s - U < _e ? N++ : N = 1, U = s, N >= De && (ve(t, e), N = 0);
697
+ s - U < De ? N++ : N = 1, U = s, N >= ve && (Ce(t, e), N = 0);
699
698
  }
700
- const Te = _("click", ke), B = "right_click";
701
- function be(t, e) {
699
+ const ke = _("click", _e), B = "right_click";
700
+ function Te(t, e) {
702
701
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
703
702
  if (!k(r)) {
704
703
  const C = {
@@ -706,7 +705,7 @@ function be(t, e) {
706
705
  };
707
706
  return l(B, [
708
707
  n("feature_list", "2-0-0", s),
709
- n("session", "1-0-4", i),
708
+ n("session", "1-0-3", i),
710
709
  n("element", "1-0-0", C),
711
710
  o ? n("step", "1-0-0", o) : void 0,
712
711
  a ? n("experience", "1-0-1", a) : void 0
@@ -722,7 +721,7 @@ function be(t, e) {
722
721
  B,
723
722
  [
724
723
  n("feature_list", "2-0-0", s),
725
- n("session", "1-0-4", i),
724
+ n("session", "1-0-3", i),
726
725
  n("element", "1-0-0", m),
727
726
  o ? n("step", "1-0-0", o) : void 0,
728
727
  a ? n("experience", "1-0-1", a) : void 0
@@ -730,74 +729,74 @@ function be(t, e) {
730
729
  e
731
730
  );
732
731
  }
733
- const $e = u(B, be);
734
- function ge(t, e) {
735
- $e(t, e);
732
+ const be = u(B, Te);
733
+ function $e(t, e) {
734
+ be(t, e);
736
735
  }
737
- const Le = _("contextmenu", ge), xt = "mouse_shake";
738
- function he(t, e) {
736
+ const ge = _("contextmenu", $e), xt = "mouse_shake";
737
+ function Le(t, e) {
739
738
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
740
739
  return l(
741
740
  xt,
742
741
  [
743
742
  n("feature_list", "2-0-0", s),
744
- n("session", "1-0-4", i),
743
+ n("session", "1-0-3", i),
745
744
  o ? n("step", "1-0-0", o) : void 0,
746
745
  a ? n("experience", "1-0-1", a) : void 0
747
746
  ],
748
747
  e
749
748
  );
750
749
  }
751
- const ye = u(xt, he), Ne = 5, we = 500, Pe = 500;
750
+ const he = u(xt, Le), ye = 5, Ne = 500, we = 500;
752
751
  let z = { x: 0 }, g = [], G = 0;
753
- const Ve = P(
752
+ const Pe = P(
754
753
  (t, e) => {
755
- ye(t, e);
754
+ he(t, e);
756
755
  },
757
- we
756
+ Ne
758
757
  );
759
- function Se(t, e) {
758
+ function Ve(t, e) {
760
759
  const s = Date.now(), i = t.event.clientX - z.x, a = Math.sign(i);
761
- s - G > Pe && (g = []), a !== 0 && (g.length === 0 || g[g.length - 1] !== a) && g.push(a), z = { x: t.event.clientX, y: t.event.clientY }, g.length >= Ne && (Ve(t, e), g = []), G = s;
760
+ s - G > we && (g = []), a !== 0 && (g.length === 0 || g[g.length - 1] !== a) && g.push(a), z = { x: t.event.clientX, y: t.event.clientY }, g.length >= ye && (Pe(t, e), g = []), G = s;
762
761
  }
763
- const Ye = _("mousemove", Se), pt = "page_visible";
764
- function Be(t, e) {
762
+ const Se = _("mousemove", Ve), pt = "page_visible";
763
+ function Ye(t, e) {
765
764
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
766
765
  return l(
767
766
  pt,
768
767
  [
769
768
  n("feature_list", "2-0-0", s),
770
- n("session", "1-0-4", i),
769
+ n("session", "1-0-3", i),
771
770
  o ? n("step", "1-0-0", o) : void 0,
772
771
  a ? n("experience", "1-0-1", a) : void 0
773
772
  ],
774
773
  e
775
774
  );
776
775
  }
777
- const He = u(pt, Be), mt = "page_hidden";
778
- function qe(t, e) {
776
+ const Be = u(pt, Ye), mt = "page_hidden";
777
+ function He(t, e) {
779
778
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
780
779
  return l(
781
780
  mt,
782
781
  [
783
782
  n("feature_list", "2-0-0", s),
784
- n("session", "1-0-4", i),
783
+ n("session", "1-0-3", i),
785
784
  o ? n("step", "1-0-0", o) : void 0,
786
785
  a ? n("experience", "1-0-1", a) : void 0
787
786
  ],
788
787
  e
789
788
  );
790
789
  }
791
- const Ae = u(mt, qe);
792
- function Fe(t, e) {
790
+ const qe = u(mt, He);
791
+ function Ae(t, e) {
793
792
  if (document.visibilityState === "visible") {
794
- He(t, e);
793
+ Be(t, e);
795
794
  return;
796
795
  }
797
- Ae(t, e);
796
+ qe(t, e);
798
797
  }
799
- const Oe = Wt("visibilitychange", Fe), H = "backspace";
800
- function je(t, e) {
798
+ const Oe = Wt("visibilitychange", Ae), H = "backspace";
799
+ function Fe(t, e) {
801
800
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
802
801
  if (!k(r)) {
803
802
  const C = {
@@ -807,7 +806,7 @@ function je(t, e) {
807
806
  H,
808
807
  [
809
808
  n("feature_list", "2-0-0", s),
810
- n("session", "1-0-4", i),
809
+ n("session", "1-0-3", i),
811
810
  n("element", "1-0-0", C),
812
811
  o ? n("step", "1-0-0", o) : void 0,
813
812
  a ? n("experience", "1-0-1", a) : void 0
@@ -825,7 +824,7 @@ function je(t, e) {
825
824
  H,
826
825
  [
827
826
  n("feature_list", "2-0-0", s),
828
- n("session", "1-0-4", i),
827
+ n("session", "1-0-3", i),
829
828
  n("element", "1-0-0", m),
830
829
  o ? n("step", "1-0-0", o) : void 0,
831
830
  a ? n("experience", "1-0-1", a) : void 0
@@ -833,73 +832,73 @@ function je(t, e) {
833
832
  e
834
833
  );
835
834
  }
836
- const Re = u(H, je);
837
- function Ie(t, e) {
835
+ const Re = u(H, Fe);
836
+ function je(t, e) {
838
837
  t.event.key === "Backspace" && Re(t, e);
839
838
  }
840
- const We = _("keydown", Ie), Et = "page_hide";
841
- function Me(t, e) {
839
+ const We = _("keydown", je), Et = "page_hide";
840
+ function Ie(t, e) {
842
841
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
843
842
  return l(
844
843
  Et,
845
844
  [
846
845
  n("feature_list", "2-0-0", s),
847
- n("session", "1-0-4", i),
846
+ n("session", "1-0-3", i),
848
847
  o ? n("step", "1-0-0", o) : void 0,
849
848
  a ? n("experience", "1-0-1", a) : void 0
850
849
  ],
851
850
  e
852
851
  );
853
852
  }
854
- const Ue = u(Et, Me);
855
- function ze(t, e) {
856
- Ue(t, e);
853
+ const Me = u(Et, Ie);
854
+ function Ue(t, e) {
855
+ Me(t, e);
857
856
  }
858
- const Ge = h("pagehide", ze), Ct = "page_show";
859
- function Ke(t, e) {
857
+ const ze = h("pagehide", Ue), Ct = "page_show";
858
+ function Ge(t, e) {
860
859
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
861
860
  return l(
862
861
  Ct,
863
862
  [
864
863
  n("feature_list", "2-0-0", s),
865
- n("session", "1-0-4", i),
864
+ n("session", "1-0-3", i),
866
865
  o ? n("step", "1-0-0", o) : void 0,
867
866
  a ? n("experience", "1-0-1", a) : void 0
868
867
  ],
869
868
  e
870
869
  );
871
870
  }
872
- const Xe = u(Ct, Ke);
873
- function Je(t, e) {
874
- Xe(t, e);
871
+ const Ke = u(Ct, Ge);
872
+ function Xe(t, e) {
873
+ Ke(t, e);
875
874
  }
876
- const Qe = h("pageshow", Je), vt = "offline";
877
- function Ze(t, e) {
875
+ const Je = h("pageshow", Xe), vt = "offline";
876
+ function Qe(t, e) {
878
877
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
879
878
  return l(
880
879
  vt,
881
880
  [
882
881
  n("feature_list", "2-0-0", s),
883
- n("session", "1-0-4", i),
882
+ n("session", "1-0-3", i),
884
883
  o ? n("step", "1-0-0", o) : void 0,
885
884
  a ? n("experience", "1-0-1", a) : void 0
886
885
  ],
887
886
  e
888
887
  );
889
888
  }
890
- const tn = u(vt, Ze);
891
- function en(t, e) {
892
- tn(t, e);
889
+ const Ze = u(vt, Qe);
890
+ function tn(t, e) {
891
+ Ze(t, e);
893
892
  }
894
- const nn = h("offline", en), q = "scroll";
895
- function sn(t, e) {
893
+ const en = h("offline", tn), q = "scroll";
894
+ function nn(t, e) {
896
895
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
897
896
  if (!k(r))
898
897
  return l(
899
898
  q,
900
899
  [
901
900
  n("feature_list", "2-0-0", s),
902
- n("session", "1-0-4", i),
901
+ n("session", "1-0-3", i),
903
902
  o ? n("step", "1-0-0", o) : void 0,
904
903
  a ? n("experience", "1-0-1", a) : void 0
905
904
  ],
@@ -915,7 +914,7 @@ function sn(t, e) {
915
914
  q,
916
915
  [
917
916
  n("feature_list", "2-0-0", s),
918
- n("session", "1-0-4", i),
917
+ n("session", "1-0-3", i),
919
918
  o ? n("step", "1-0-0", o) : void 0,
920
919
  a ? n("experience", "1-0-1", a) : void 0,
921
920
  n("element", "1-0-0", m)
@@ -923,71 +922,71 @@ function sn(t, e) {
923
922
  e
924
923
  );
925
924
  }
926
- const on = u(q, sn), an = P(
925
+ const sn = u(q, nn), on = P(
927
926
  (t, e) => {
928
- on(t, e);
927
+ sn(t, e);
929
928
  },
930
929
  500
931
- ), rn = _("scroll", an, !0), Dt = "online";
932
- function cn(t, e) {
930
+ ), an = _("scroll", on, !0), Dt = "online";
931
+ function rn(t, e) {
933
932
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
934
933
  return l(
935
934
  Dt,
936
935
  [
937
936
  n("feature_list", "2-0-0", s),
938
- n("session", "1-0-4", i),
937
+ n("session", "1-0-3", i),
939
938
  o ? n("step", "1-0-0", o) : void 0,
940
939
  a ? n("experience", "1-0-1", a) : void 0
941
940
  ],
942
941
  e
943
942
  );
944
943
  }
945
- const ln = u(Dt, cn);
946
- function un(t, e) {
947
- ln(t, e);
944
+ const cn = u(Dt, rn);
945
+ function ln(t, e) {
946
+ cn(t, e);
948
947
  }
949
- const fn = h("online", un), _t = "resize";
950
- function dn(t, e) {
948
+ const un = h("online", ln), _t = "resize";
949
+ function fn(t, e) {
951
950
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
952
951
  return l(
953
952
  _t,
954
953
  [
955
954
  n("feature_list", "2-0-0", s),
956
- n("session", "1-0-4", i),
955
+ n("session", "1-0-3", i),
957
956
  o ? n("step", "1-0-0", o) : void 0,
958
957
  a ? n("experience", "1-0-1", a) : void 0
959
958
  ],
960
959
  e
961
960
  );
962
961
  }
963
- const K = u(_t, dn);
962
+ const K = u(_t, fn);
964
963
  let V = 0;
965
- const xn = P(
964
+ const dn = P(
966
965
  (t, e) => {
967
966
  const s = window.innerWidth;
968
967
  s !== V ? (K(t, e), V = s) : "ontouchstart" in window || K(t, e), V = s;
969
968
  },
970
969
  300
971
- ), pn = h("resize", xn), kt = "unload";
972
- function mn(t, e) {
970
+ ), xn = h("resize", dn), kt = "unload";
971
+ function pn(t, e) {
973
972
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
974
973
  return l(
975
974
  kt,
976
975
  [
977
976
  n("feature_list", "2-0-0", s),
978
- n("session", "1-0-4", i),
977
+ n("session", "1-0-3", i),
979
978
  o ? n("step", "1-0-0", o) : void 0,
980
979
  a ? n("experience", "1-0-1", a) : void 0
981
980
  ],
982
981
  e
983
982
  );
984
983
  }
985
- const En = u(kt, mn);
986
- function Cn(t, e) {
987
- En(t, e);
984
+ const mn = u(kt, pn);
985
+ function En(t, e) {
986
+ mn(t, e);
988
987
  }
989
- const vn = h("unload", Cn), A = "click";
990
- function Dn(t, e) {
988
+ const Cn = h("unload", En), A = "click";
989
+ function vn(t, e) {
991
990
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
992
991
  if (!k(r)) {
993
992
  const C = {
@@ -997,7 +996,7 @@ function Dn(t, e) {
997
996
  A,
998
997
  [
999
998
  n("feature_list", "2-0-0", s),
1000
- n("session", "1-0-4", i),
999
+ n("session", "1-0-3", i),
1001
1000
  n("element", "1-0-0", C),
1002
1001
  o ? n("step", "1-0-0", o) : void 0,
1003
1002
  a ? n("experience", "1-0-1", a) : void 0
@@ -1015,7 +1014,7 @@ function Dn(t, e) {
1015
1014
  A,
1016
1015
  [
1017
1016
  n("feature_list", "2-0-0", s),
1018
- n("session", "1-0-4", i),
1017
+ n("session", "1-0-3", i),
1019
1018
  n("element", "1-0-0", m),
1020
1019
  o ? n("step", "1-0-0", o) : void 0,
1021
1020
  a ? n("experience", "1-0-1", a) : void 0
@@ -1023,19 +1022,19 @@ function Dn(t, e) {
1023
1022
  e
1024
1023
  );
1025
1024
  }
1026
- const _n = u(A, Dn);
1027
- function kn(t, e) {
1028
- _n(t, e);
1025
+ const Dn = u(A, vn);
1026
+ function _n(t, e) {
1027
+ Dn(t, e);
1029
1028
  }
1030
- const Tn = _("click", kn), F = "paste";
1031
- function bn(t, e) {
1029
+ const kn = _("click", _n), O = "paste";
1030
+ function Tn(t, e) {
1032
1031
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
1033
1032
  if (!k(r))
1034
1033
  return l(
1035
- F,
1034
+ O,
1036
1035
  [
1037
1036
  n("feature_list", "2-0-0", s),
1038
- n("session", "1-0-4", i),
1037
+ n("session", "1-0-3", i),
1039
1038
  o ? n("step", "1-0-0", o) : void 0,
1040
1039
  a ? n("experience", "1-0-1", a) : void 0
1041
1040
  ],
@@ -1048,10 +1047,10 @@ function bn(t, e) {
1048
1047
  text: E(v(c))
1049
1048
  };
1050
1049
  return l(
1051
- F,
1050
+ O,
1052
1051
  [
1053
1052
  n("feature_list", "2-0-0", s),
1054
- n("session", "1-0-4", i),
1053
+ n("session", "1-0-3", i),
1055
1054
  o ? n("step", "1-0-0", o) : void 0,
1056
1055
  a ? n("experience", "1-0-1", a) : void 0,
1057
1056
  n("element", "1-0-0", m)
@@ -1059,19 +1058,19 @@ function bn(t, e) {
1059
1058
  e
1060
1059
  );
1061
1060
  }
1062
- const $n = u(F, bn);
1063
- function gn(t, e) {
1064
- $n(t, e);
1061
+ const bn = u(O, Tn);
1062
+ function $n(t, e) {
1063
+ bn(t, e);
1065
1064
  }
1066
- const Ln = _("paste", gn), O = "copy";
1067
- function hn(t, e) {
1065
+ const gn = _("paste", $n), F = "copy";
1066
+ function Ln(t, e) {
1068
1067
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
1069
1068
  if (!k(r))
1070
1069
  return l(
1071
- O,
1070
+ F,
1072
1071
  [
1073
1072
  n("feature_list", "2-0-0", s),
1074
- n("session", "1-0-4", i),
1073
+ n("session", "1-0-3", i),
1075
1074
  o ? n("step", "1-0-0", o) : void 0,
1076
1075
  a ? n("experience", "1-0-1", a) : void 0
1077
1076
  ],
@@ -1084,10 +1083,10 @@ function hn(t, e) {
1084
1083
  text: E(v(c))
1085
1084
  };
1086
1085
  return l(
1087
- O,
1086
+ F,
1088
1087
  [
1089
1088
  n("feature_list", "2-0-0", s),
1090
- n("session", "1-0-4", i),
1089
+ n("session", "1-0-3", i),
1091
1090
  o ? n("step", "1-0-0", o) : void 0,
1092
1091
  a ? n("experience", "1-0-1", a) : void 0,
1093
1092
  n("element", "1-0-0", m)
@@ -1095,19 +1094,19 @@ function hn(t, e) {
1095
1094
  e
1096
1095
  );
1097
1096
  }
1098
- const yn = u(O, hn);
1099
- function Nn(t, e) {
1100
- yn(t, e);
1097
+ const hn = u(F, Ln);
1098
+ function yn(t, e) {
1099
+ hn(t, e);
1101
1100
  }
1102
- const wn = _("copy", Nn), j = "drag";
1103
- function Pn(t, e) {
1101
+ const Nn = _("copy", yn), R = "drag";
1102
+ function wn(t, e) {
1104
1103
  const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext), r = t.event.target || document.activeElement || t.event.currentTarget;
1105
1104
  if (!k(r))
1106
1105
  return l(
1107
- j,
1106
+ R,
1108
1107
  [
1109
1108
  n("feature_list", "2-0-0", s),
1110
- n("session", "1-0-4", i),
1109
+ n("session", "1-0-3", i),
1111
1110
  o ? n("step", "1-0-0", o) : void 0,
1112
1111
  a ? n("experience", "1-0-1", a) : void 0
1113
1112
  ],
@@ -1120,10 +1119,10 @@ function Pn(t, e) {
1120
1119
  text: E(v(c))
1121
1120
  };
1122
1121
  return l(
1123
- j,
1122
+ R,
1124
1123
  [
1125
1124
  n("feature_list", "2-0-0", s),
1126
- n("session", "1-0-4", i),
1125
+ n("session", "1-0-3", i),
1127
1126
  o ? n("step", "1-0-0", o) : void 0,
1128
1127
  a ? n("experience", "1-0-1", a) : void 0,
1129
1128
  n("element", "1-0-0", m)
@@ -1131,7 +1130,7 @@ function Pn(t, e) {
1131
1130
  e
1132
1131
  );
1133
1132
  }
1134
- const Vn = u(j, Pn);
1133
+ const Pn = u(R, wn);
1135
1134
  function Tt(t, e) {
1136
1135
  const s = t.event.currentTarget;
1137
1136
  if (!s || !(s instanceof HTMLElement))
@@ -1142,43 +1141,43 @@ function Tt(t, e) {
1142
1141
  s.removeEventListener("drag", i), s.addEventListener(
1143
1142
  "dragend",
1144
1143
  () => bt(s, () => t.analyticsContext)
1145
- ), Vn(t, e);
1144
+ ), Pn(t, e);
1146
1145
  }
1147
1146
  const bt = _("drag", Tt);
1148
- function ss(t, e) {
1149
- e && (Tn(e, t), Te(e, t), Le(e, t), wn(e, t), Ln(e, t), bt(e, t), We(e, t), rn(e, t), Ee(e, t), Ye(e, t));
1147
+ function es(t, e) {
1148
+ e && (kn(e, t), ke(e, t), ge(e, t), Nn(e, t), gn(e, t), bt(e, t), We(e, t), an(e, t), me(e, t), Se(e, t));
1150
1149
  }
1151
- function os(t) {
1152
- Oe(t), Ge(t), Qe(t), nn(t), fn(t), pn(t), vn(t);
1150
+ function ns(t) {
1151
+ Oe(t), ze(t), Je(t), en(t), un(t), xn(t), Cn(t);
1153
1152
  }
1154
1153
  export {
1155
- ts as A,
1156
- es as B,
1157
- ns as C,
1154
+ Qn as A,
1155
+ Zn as B,
1156
+ ts as C,
1158
1157
  d as a,
1159
- On as b,
1158
+ An as b,
1160
1159
  u as c,
1161
1160
  p as d,
1162
1161
  x as e,
1163
1162
  f,
1164
1163
  l as g,
1165
1164
  n as h,
1166
- jn as i,
1167
- Rn as j,
1165
+ On as i,
1166
+ Fn as j,
1168
1167
  Q as k,
1169
- R as l,
1168
+ j as l,
1170
1169
  Z as m,
1171
- In as n,
1172
- ss as o,
1173
- os as p,
1174
- Mn as q,
1175
- Un as r,
1176
- zn as s,
1177
- Wn as t,
1178
- Gn as u,
1179
- Kn as v,
1180
- Xn as w,
1181
- Jn as x,
1182
- Qn as y,
1183
- Zn as z
1170
+ Rn as n,
1171
+ es as o,
1172
+ ns as p,
1173
+ Wn as q,
1174
+ In as r,
1175
+ Mn as s,
1176
+ jn as t,
1177
+ Un as u,
1178
+ zn as v,
1179
+ Gn as w,
1180
+ Kn as x,
1181
+ Xn as y,
1182
+ Jn as z
1184
1183
  };