@picked/analytics 0.0.24-next.3 → 0.0.25-next.1
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/cjs/index.js +1 -1
- package/dist/cjs/plugins/analytics/index.js +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/plugins/analytics/index.js +1 -1
- package/dist/types/plugins/analytics/plugin.d.ts +1 -1
- package/dist/types/plugins/analytics/plugin.d.ts.map +1 -1
- package/dist/types/schemas/deployment/1-0-0.d.ts +45 -0
- package/dist/types/schemas/deployment/1-0-0.d.ts.map +1 -0
- package/dist/types/schemas/deployment/1-0-1.d.ts +45 -0
- package/dist/types/schemas/deployment/1-0-1.d.ts.map +1 -0
- package/dist/types/schemas/deployment/index.d.ts +91 -0
- package/dist/types/schemas/deployment/index.d.ts.map +1 -0
- package/dist/types/schemas/index.d.ts +2 -0
- package/dist/types/schemas/index.d.ts.map +1 -1
- package/dist/types/tracker.d.ts +1 -1
- package/dist/types/tracker.d.ts.map +1 -1
- package/dist/types/types.d.ts +24 -1
- package/dist/types/types.d.ts.map +1 -1
- package/dist/{user-interaction-C-k3krrK.js → user-interaction-2T_Z5GUX.js} +205 -197
- package/dist/user-interaction-DhvEw3hD.cjs +1 -0
- package/package.json +2 -2
- package/dist/user-interaction-CGONOKWq.cjs +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { trackSelfDescribingEvent as
|
|
2
|
-
import { ButtonClickTrackingPlugin as
|
|
3
|
-
import { PerformanceNavigationTimingPlugin as
|
|
4
|
-
import { ErrorTrackingPlugin as
|
|
5
|
-
import { WebVitalsPlugin as
|
|
6
|
-
import { supportsDocument as X, supportsWindow as
|
|
1
|
+
import { trackSelfDescribingEvent as Pt, newTracker as Vt, addGlobalContexts as St, enableActivityTracking as Yt, enableActivityTrackingCallback as Bt } from "@snowplow/browser-tracker";
|
|
2
|
+
import { ButtonClickTrackingPlugin as Ht, enableButtonClickTracking as jt } from "@snowplow/browser-plugin-button-click-tracking";
|
|
3
|
+
import { PerformanceNavigationTimingPlugin as qt } from "@snowplow/browser-plugin-performance-navigation-timing";
|
|
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 Wt } from "@picked/client";
|
|
7
7
|
function J(t, e) {
|
|
8
8
|
return `iglu:dev.pckd/${t}/jsonschema/${e}`;
|
|
9
9
|
}
|
|
@@ -34,7 +34,7 @@ function n(t, e, s) {
|
|
|
34
34
|
function u(t, e) {
|
|
35
35
|
return (s, i) => {
|
|
36
36
|
const a = e(s, i);
|
|
37
|
-
|
|
37
|
+
Pt(a);
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
function _(t, e, s = { passive: !0 }) {
|
|
@@ -50,7 +50,7 @@ function _(t, e, s = { passive: !0 }) {
|
|
|
50
50
|
a.addEventListener(t, c, s), r.add(t);
|
|
51
51
|
};
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function It(t, e) {
|
|
54
54
|
const s = /* @__PURE__ */ new Set();
|
|
55
55
|
return (i) => {
|
|
56
56
|
if (s.has(t) || !X())
|
|
@@ -65,7 +65,7 @@ function Wt(t, e) {
|
|
|
65
65
|
function h(t, e) {
|
|
66
66
|
const s = /* @__PURE__ */ new Set();
|
|
67
67
|
return (i) => {
|
|
68
|
-
if (s.has(t) || !
|
|
68
|
+
if (s.has(t) || !Rt())
|
|
69
69
|
return;
|
|
70
70
|
function a(o) {
|
|
71
71
|
const r = i();
|
|
@@ -86,7 +86,7 @@ function f(t) {
|
|
|
86
86
|
const D = "unknown";
|
|
87
87
|
function d(t) {
|
|
88
88
|
var i, a, o, r;
|
|
89
|
-
const e =
|
|
89
|
+
const e = Mt(), s = {
|
|
90
90
|
id: t.sessionId || null
|
|
91
91
|
};
|
|
92
92
|
return t.isUser !== void 0 && (s.is_user = t.isUser), (i = t.identifiers) != null && i.fingerprintjs_visitor_id && (s.fingerprintjs_visitor_id = t.identifiers.fingerprintjs_visitor_id), e && (s.gaid = e), (a = t.shopifySession) != null && a.clientId && (s.shopify_client_id = t.shopifySession.clientId), (o = t.shopifySession) != null && o.customerId && (s.shopify_customer_id = t.shopifySession.customerId), (r = t.shopifySession) != null && r.checkoutToken && (s.shopify_checkout_token = t.shopifySession.checkoutToken), s;
|
|
@@ -126,7 +126,7 @@ function x(t, e = !1) {
|
|
|
126
126
|
title: D
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function An(t, e = !1) {
|
|
130
130
|
const { productList: s } = t;
|
|
131
131
|
if (s) {
|
|
132
132
|
const i = {};
|
|
@@ -166,7 +166,7 @@ function qn(t, e = !1) {
|
|
|
166
166
|
items: []
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function On(t, e = !1) {
|
|
170
170
|
const { order: s } = t;
|
|
171
171
|
if (s) {
|
|
172
172
|
const i = {
|
|
@@ -213,7 +213,7 @@ function w(t) {
|
|
|
213
213
|
title: D
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function Fn(t) {
|
|
217
217
|
const { modal: e } = t;
|
|
218
218
|
return e ? {
|
|
219
219
|
id: e.id,
|
|
@@ -238,8 +238,8 @@ function y(t) {
|
|
|
238
238
|
if (!isNaN(e))
|
|
239
239
|
return e;
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
if (!X() || !
|
|
241
|
+
function Mt() {
|
|
242
|
+
if (!X() || !Wt())
|
|
243
243
|
return null;
|
|
244
244
|
const t = "_ga=", e = document.cookie ? document.cookie.split(";") : [];
|
|
245
245
|
for (const s of e) {
|
|
@@ -251,83 +251,91 @@ function It() {
|
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function Ut(t) {
|
|
255
255
|
const e = [];
|
|
256
|
-
return t.trackErrors && ($(), e.push(
|
|
256
|
+
return t.trackErrors && ($(), e.push(At())), t.trackVitals && ($(), e.push(Ft())), t.trackPerformance && ($(), e.push(qt())), (t.trackButtonClickAllowList || t.trackButtonClickFilter) && e.push(Ht()), e;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
259
|
-
t.trackActivity && !t.trackActivityCallback && ($(),
|
|
258
|
+
function zt(t) {
|
|
259
|
+
t.trackActivity && !t.trackActivityCallback && ($(), Yt({
|
|
260
260
|
minimumVisitLength: 30,
|
|
261
261
|
heartbeatDelay: 10
|
|
262
|
-
})), t.trackActivity && t.trackActivityCallback && ($(),
|
|
262
|
+
})), t.trackActivity && t.trackActivityCallback && ($(), Bt({
|
|
263
263
|
minimumVisitLength: 30,
|
|
264
264
|
heartbeatDelay: 10,
|
|
265
265
|
callback: t.trackActivityCallback
|
|
266
|
-
})), (t.trackButtonClickAllowList || t.trackButtonClickFilter) && ($(),
|
|
266
|
+
})), (t.trackButtonClickAllowList || t.trackButtonClickFilter) && ($(), jt({
|
|
267
267
|
filter: t.trackButtonClickAllowList ? {
|
|
268
268
|
allowlist: t.trackButtonClickAllowList
|
|
269
269
|
} : t.trackButtonClickFilter
|
|
270
|
-
})), t.trackErrors && ($(),
|
|
270
|
+
})), t.trackErrors && ($(), Ot());
|
|
271
271
|
}
|
|
272
|
-
function
|
|
272
|
+
function Rn({
|
|
273
273
|
organizationId: t,
|
|
274
274
|
projectId: e,
|
|
275
275
|
cvlyX: s,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
276
|
+
deployment: i,
|
|
277
|
+
collectorUrl: a = "evnts.pckd.dev",
|
|
278
|
+
appId: o = "picked-analytics",
|
|
279
|
+
trackVitals: r = !1,
|
|
280
|
+
trackPerformance: c = !1,
|
|
281
|
+
trackWebPage: m = !0,
|
|
282
|
+
trackSessions: C = !0,
|
|
283
|
+
trackBrowser: $t = !0,
|
|
284
|
+
trackActivity: gt = !1,
|
|
285
|
+
trackErrors: Lt = !1,
|
|
286
|
+
trackActivityCallback: ht,
|
|
287
|
+
trackButtonClickAllowList: yt
|
|
287
288
|
}) {
|
|
288
289
|
$();
|
|
289
290
|
const W = {
|
|
290
|
-
trackVitals:
|
|
291
|
-
trackErrors:
|
|
292
|
-
trackActivity:
|
|
293
|
-
trackPerformance:
|
|
294
|
-
trackActivityCallback:
|
|
295
|
-
trackButtonClickAllowList:
|
|
296
|
-
},
|
|
297
|
-
appId:
|
|
291
|
+
trackVitals: r,
|
|
292
|
+
trackErrors: Lt,
|
|
293
|
+
trackActivity: gt,
|
|
294
|
+
trackPerformance: c,
|
|
295
|
+
trackActivityCallback: ht,
|
|
296
|
+
trackButtonClickAllowList: yt
|
|
297
|
+
}, Nt = {
|
|
298
|
+
appId: o,
|
|
298
299
|
platform: "web",
|
|
299
300
|
contexts: {
|
|
300
|
-
webPage:
|
|
301
|
-
session:
|
|
302
|
-
browser:
|
|
301
|
+
webPage: m,
|
|
302
|
+
session: C,
|
|
303
|
+
browser: $t || !1
|
|
303
304
|
},
|
|
304
|
-
plugins:
|
|
305
|
-
},
|
|
306
|
-
return
|
|
305
|
+
plugins: Ut(W)
|
|
306
|
+
}, wt = Vt(o, a, Nt);
|
|
307
|
+
return Gt({
|
|
307
308
|
organizationId: t,
|
|
308
309
|
projectId: e,
|
|
309
|
-
cvlyX: s
|
|
310
|
-
|
|
310
|
+
cvlyX: s,
|
|
311
|
+
deployment: i
|
|
312
|
+
}), zt(W), wt;
|
|
311
313
|
}
|
|
312
|
-
function
|
|
314
|
+
function Gt({ organizationId: t, projectId: e, cvlyX: s, deployment: i }) {
|
|
313
315
|
if (!t || !e)
|
|
314
316
|
throw new Error("bindGlobalContext: Both organizationId and projectId are required");
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
+
const a = [];
|
|
318
|
+
a.push(
|
|
317
319
|
n("app", "1-0-0", {
|
|
318
320
|
organization_id: t,
|
|
319
321
|
project_id: e
|
|
322
|
+
}),
|
|
323
|
+
n("deployment", "1-0-1", {
|
|
324
|
+
sha: i.sha,
|
|
325
|
+
id: i.id,
|
|
326
|
+
env: i.env,
|
|
327
|
+
host: i.host
|
|
320
328
|
})
|
|
321
|
-
), s &&
|
|
329
|
+
), s && a.push(
|
|
322
330
|
n("cvly_x", "1-0-1", {
|
|
323
331
|
vercel_deployment_id: s.vercelDeploymentId,
|
|
324
332
|
vercel_env: s.vercelEnv,
|
|
325
333
|
vercel_url: s.vercelUrl
|
|
326
334
|
})
|
|
327
|
-
),
|
|
335
|
+
), St(a);
|
|
328
336
|
}
|
|
329
337
|
const tt = "app_close";
|
|
330
|
-
function
|
|
338
|
+
function Kt(t, e) {
|
|
331
339
|
const s = f(t), i = d(t), a = p(t), o = x(t);
|
|
332
340
|
return l(
|
|
333
341
|
tt,
|
|
@@ -340,8 +348,8 @@ function Gt(t, e) {
|
|
|
340
348
|
e
|
|
341
349
|
);
|
|
342
350
|
}
|
|
343
|
-
const
|
|
344
|
-
function
|
|
351
|
+
const Wn = u(tt, Kt), et = "app_initialize";
|
|
352
|
+
function Xt(t, e) {
|
|
345
353
|
const s = f(t), i = d(t), a = p(t), o = x(t);
|
|
346
354
|
return l(
|
|
347
355
|
et,
|
|
@@ -354,8 +362,8 @@ function Kt(t, e) {
|
|
|
354
362
|
e
|
|
355
363
|
);
|
|
356
364
|
}
|
|
357
|
-
const
|
|
358
|
-
function
|
|
365
|
+
const In = u(et, Xt), nt = "app_load";
|
|
366
|
+
function Jt(t, e) {
|
|
359
367
|
const s = f(t), i = d(t), a = p(t), o = x(t);
|
|
360
368
|
return l(
|
|
361
369
|
nt,
|
|
@@ -368,8 +376,8 @@ function Xt(t, e) {
|
|
|
368
376
|
e
|
|
369
377
|
);
|
|
370
378
|
}
|
|
371
|
-
const
|
|
372
|
-
function
|
|
379
|
+
const Mn = u(nt, Jt), st = "app_open";
|
|
380
|
+
function Qt(t, e) {
|
|
373
381
|
const s = f(t), i = d(t), a = p(t), o = x(t);
|
|
374
382
|
return l(
|
|
375
383
|
st,
|
|
@@ -382,8 +390,8 @@ function Jt(t, e) {
|
|
|
382
390
|
e
|
|
383
391
|
);
|
|
384
392
|
}
|
|
385
|
-
const
|
|
386
|
-
function
|
|
393
|
+
const Un = u(st, Qt), ot = "experience_load";
|
|
394
|
+
function Zt(t, e) {
|
|
387
395
|
const s = f(t), i = d(t), a = p(t, !0), o = x(t);
|
|
388
396
|
return l(
|
|
389
397
|
ot,
|
|
@@ -396,8 +404,8 @@ function Qt(t, e) {
|
|
|
396
404
|
e
|
|
397
405
|
);
|
|
398
406
|
}
|
|
399
|
-
const
|
|
400
|
-
function
|
|
407
|
+
const zn = u(ot, Zt), at = "feature_decide";
|
|
408
|
+
function te(t, e) {
|
|
401
409
|
const s = f(t), i = d(t), a = p(t), o = x(t);
|
|
402
410
|
return l(
|
|
403
411
|
at,
|
|
@@ -410,8 +418,8 @@ function Zt(t, e) {
|
|
|
410
418
|
e
|
|
411
419
|
);
|
|
412
420
|
}
|
|
413
|
-
const
|
|
414
|
-
function
|
|
421
|
+
const Gn = u(at, te), it = "field_validation_error";
|
|
422
|
+
function ee(t, e) {
|
|
415
423
|
const s = f(t), i = d(t), a = w(t), o = Z(t, !0), r = p(t), c = x(t);
|
|
416
424
|
return l(
|
|
417
425
|
it,
|
|
@@ -426,8 +434,8 @@ function te(t, e) {
|
|
|
426
434
|
e
|
|
427
435
|
);
|
|
428
436
|
}
|
|
429
|
-
const
|
|
430
|
-
function
|
|
437
|
+
const Kn = u(it, ee), rt = "form_submit";
|
|
438
|
+
function ne(t, e) {
|
|
431
439
|
const s = f(t), i = d(t), a = w(t), o = p(t), r = x(t);
|
|
432
440
|
return l(
|
|
433
441
|
rt,
|
|
@@ -441,8 +449,8 @@ function ee(t, e) {
|
|
|
441
449
|
e
|
|
442
450
|
);
|
|
443
451
|
}
|
|
444
|
-
const
|
|
445
|
-
function
|
|
452
|
+
const Xn = u(rt, ne), ct = "form_submit_error";
|
|
453
|
+
function se(t, e) {
|
|
446
454
|
const s = f(t), i = d(t), a = w(t), o = Z(t, !0), r = p(t), c = x(t);
|
|
447
455
|
return l(
|
|
448
456
|
ct,
|
|
@@ -457,8 +465,8 @@ function ne(t, e) {
|
|
|
457
465
|
e
|
|
458
466
|
);
|
|
459
467
|
}
|
|
460
|
-
const
|
|
461
|
-
function
|
|
468
|
+
const Jn = u(ct, se), lt = "form_submit_success";
|
|
469
|
+
function oe(t, e) {
|
|
462
470
|
const s = f(t), i = d(t), a = w(t), o = p(t), r = x(t);
|
|
463
471
|
return l(
|
|
464
472
|
lt,
|
|
@@ -472,8 +480,8 @@ function se(t, e) {
|
|
|
472
480
|
e
|
|
473
481
|
);
|
|
474
482
|
}
|
|
475
|
-
const
|
|
476
|
-
function
|
|
483
|
+
const Qn = u(lt, oe), ut = "step_enter";
|
|
484
|
+
function ae(t, e) {
|
|
477
485
|
const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = R(t);
|
|
478
486
|
return l(
|
|
479
487
|
ut,
|
|
@@ -487,8 +495,8 @@ function oe(t, e) {
|
|
|
487
495
|
e
|
|
488
496
|
);
|
|
489
497
|
}
|
|
490
|
-
const
|
|
491
|
-
function
|
|
498
|
+
const Zn = u(ut, ae), ft = "step_submit";
|
|
499
|
+
function ie(t, e) {
|
|
492
500
|
const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = Q(t), c = R(t);
|
|
493
501
|
return l(
|
|
494
502
|
ft,
|
|
@@ -503,8 +511,8 @@ function ae(t, e) {
|
|
|
503
511
|
e
|
|
504
512
|
);
|
|
505
513
|
}
|
|
506
|
-
const
|
|
507
|
-
function
|
|
514
|
+
const ts = u(ft, ie), dt = "step_submit_success";
|
|
515
|
+
function re(t, e) {
|
|
508
516
|
const s = f(t), i = d(t), a = p(t), o = x(t, !0), r = R(t), c = Q(t);
|
|
509
517
|
return l(
|
|
510
518
|
dt,
|
|
@@ -519,7 +527,7 @@ function ie(t, e) {
|
|
|
519
527
|
e
|
|
520
528
|
);
|
|
521
529
|
}
|
|
522
|
-
const
|
|
530
|
+
const es = u(dt, re);
|
|
523
531
|
function k(t) {
|
|
524
532
|
return t instanceof Element;
|
|
525
533
|
}
|
|
@@ -596,12 +604,12 @@ function b(t) {
|
|
|
596
604
|
}
|
|
597
605
|
return "placeholder" in t && typeof t.placeholder == "string" ? t.placeholder : null;
|
|
598
606
|
}
|
|
599
|
-
const
|
|
607
|
+
const ce = 255;
|
|
600
608
|
function E(t) {
|
|
601
|
-
return t ? t.slice(0,
|
|
609
|
+
return t ? t.slice(0, ce) : null;
|
|
602
610
|
}
|
|
603
611
|
const S = "rapid_scroll";
|
|
604
|
-
function
|
|
612
|
+
function le(t, e) {
|
|
605
613
|
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;
|
|
606
614
|
if (!k(r)) {
|
|
607
615
|
const C = {
|
|
@@ -637,23 +645,23 @@ function ce(t, e) {
|
|
|
637
645
|
e
|
|
638
646
|
);
|
|
639
647
|
}
|
|
640
|
-
const
|
|
648
|
+
const ue = u(S, le), fe = 100, de = 100, xe = 300;
|
|
641
649
|
let I = 0, M = 0;
|
|
642
|
-
const
|
|
650
|
+
const pe = P(
|
|
643
651
|
(t, e) => {
|
|
644
|
-
|
|
652
|
+
ue(t, e);
|
|
645
653
|
},
|
|
646
|
-
|
|
654
|
+
xe
|
|
647
655
|
);
|
|
648
|
-
function
|
|
656
|
+
function me(t, e) {
|
|
649
657
|
const s = t.event.target || document.documentElement;
|
|
650
658
|
if (!(s instanceof HTMLElement))
|
|
651
659
|
return;
|
|
652
660
|
const i = s.scrollTop, a = Date.now() - M;
|
|
653
|
-
Math.abs(i - I) >
|
|
661
|
+
Math.abs(i - I) > fe && a < de && pe(t.event, e), I = i, M = Date.now();
|
|
654
662
|
}
|
|
655
|
-
const
|
|
656
|
-
function
|
|
663
|
+
const Ee = _("scroll", me, !0), Y = "rapid_click";
|
|
664
|
+
function Ce(t, e) {
|
|
657
665
|
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;
|
|
658
666
|
if (!k(r)) {
|
|
659
667
|
const C = {
|
|
@@ -689,15 +697,15 @@ function Ee(t, e) {
|
|
|
689
697
|
e
|
|
690
698
|
);
|
|
691
699
|
}
|
|
692
|
-
const
|
|
700
|
+
const ve = u(Y, Ce);
|
|
693
701
|
let N = 0, U = 0;
|
|
694
|
-
const
|
|
695
|
-
function
|
|
702
|
+
const De = 3, _e = 500;
|
|
703
|
+
function ke(t, e) {
|
|
696
704
|
const s = (/* @__PURE__ */ new Date()).getTime();
|
|
697
|
-
s - U <
|
|
705
|
+
s - U < _e ? N++ : N = 1, U = s, N >= De && (ve(t, e), N = 0);
|
|
698
706
|
}
|
|
699
|
-
const
|
|
700
|
-
function
|
|
707
|
+
const Te = _("click", ke), B = "right_click";
|
|
708
|
+
function be(t, e) {
|
|
701
709
|
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;
|
|
702
710
|
if (!k(r)) {
|
|
703
711
|
const C = {
|
|
@@ -729,12 +737,12 @@ function Te(t, e) {
|
|
|
729
737
|
e
|
|
730
738
|
);
|
|
731
739
|
}
|
|
732
|
-
const
|
|
733
|
-
function
|
|
734
|
-
|
|
740
|
+
const $e = u(B, be);
|
|
741
|
+
function ge(t, e) {
|
|
742
|
+
$e(t, e);
|
|
735
743
|
}
|
|
736
|
-
const
|
|
737
|
-
function
|
|
744
|
+
const Le = _("contextmenu", ge), xt = "mouse_shake";
|
|
745
|
+
function he(t, e) {
|
|
738
746
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
739
747
|
return l(
|
|
740
748
|
xt,
|
|
@@ -747,20 +755,20 @@ function Le(t, e) {
|
|
|
747
755
|
e
|
|
748
756
|
);
|
|
749
757
|
}
|
|
750
|
-
const
|
|
758
|
+
const ye = u(xt, he), Ne = 5, we = 500, Pe = 500;
|
|
751
759
|
let z = { x: 0 }, g = [], G = 0;
|
|
752
|
-
const
|
|
760
|
+
const Ve = P(
|
|
753
761
|
(t, e) => {
|
|
754
|
-
|
|
762
|
+
ye(t, e);
|
|
755
763
|
},
|
|
756
|
-
|
|
764
|
+
we
|
|
757
765
|
);
|
|
758
|
-
function
|
|
766
|
+
function Se(t, e) {
|
|
759
767
|
const s = Date.now(), i = t.event.clientX - z.x, a = Math.sign(i);
|
|
760
|
-
s - G >
|
|
768
|
+
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;
|
|
761
769
|
}
|
|
762
|
-
const
|
|
763
|
-
function
|
|
770
|
+
const Ye = _("mousemove", Se), pt = "page_visible";
|
|
771
|
+
function Be(t, e) {
|
|
764
772
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
765
773
|
return l(
|
|
766
774
|
pt,
|
|
@@ -773,8 +781,8 @@ function Ye(t, e) {
|
|
|
773
781
|
e
|
|
774
782
|
);
|
|
775
783
|
}
|
|
776
|
-
const
|
|
777
|
-
function
|
|
784
|
+
const He = u(pt, Be), mt = "page_hidden";
|
|
785
|
+
function je(t, e) {
|
|
778
786
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
779
787
|
return l(
|
|
780
788
|
mt,
|
|
@@ -787,16 +795,16 @@ function He(t, e) {
|
|
|
787
795
|
e
|
|
788
796
|
);
|
|
789
797
|
}
|
|
790
|
-
const
|
|
791
|
-
function
|
|
798
|
+
const qe = u(mt, je);
|
|
799
|
+
function Ae(t, e) {
|
|
792
800
|
if (document.visibilityState === "visible") {
|
|
793
|
-
|
|
801
|
+
He(t, e);
|
|
794
802
|
return;
|
|
795
803
|
}
|
|
796
|
-
|
|
804
|
+
qe(t, e);
|
|
797
805
|
}
|
|
798
|
-
const
|
|
799
|
-
function
|
|
806
|
+
const Oe = It("visibilitychange", Ae), H = "backspace";
|
|
807
|
+
function Fe(t, e) {
|
|
800
808
|
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;
|
|
801
809
|
if (!k(r)) {
|
|
802
810
|
const C = {
|
|
@@ -832,12 +840,12 @@ function Oe(t, e) {
|
|
|
832
840
|
e
|
|
833
841
|
);
|
|
834
842
|
}
|
|
835
|
-
const
|
|
836
|
-
function
|
|
837
|
-
t.event.key === "Backspace" &&
|
|
843
|
+
const Re = u(H, Fe);
|
|
844
|
+
function We(t, e) {
|
|
845
|
+
t.event.key === "Backspace" && Re(t, e);
|
|
838
846
|
}
|
|
839
|
-
const
|
|
840
|
-
function
|
|
847
|
+
const Ie = _("keydown", We), Et = "page_hide";
|
|
848
|
+
function Me(t, e) {
|
|
841
849
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
842
850
|
return l(
|
|
843
851
|
Et,
|
|
@@ -850,12 +858,12 @@ function Ie(t, e) {
|
|
|
850
858
|
e
|
|
851
859
|
);
|
|
852
860
|
}
|
|
853
|
-
const
|
|
854
|
-
function
|
|
855
|
-
|
|
861
|
+
const Ue = u(Et, Me);
|
|
862
|
+
function ze(t, e) {
|
|
863
|
+
Ue(t, e);
|
|
856
864
|
}
|
|
857
|
-
const
|
|
858
|
-
function
|
|
865
|
+
const Ge = h("pagehide", ze), Ct = "page_show";
|
|
866
|
+
function Ke(t, e) {
|
|
859
867
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
860
868
|
return l(
|
|
861
869
|
Ct,
|
|
@@ -868,12 +876,12 @@ function Ge(t, e) {
|
|
|
868
876
|
e
|
|
869
877
|
);
|
|
870
878
|
}
|
|
871
|
-
const
|
|
872
|
-
function
|
|
873
|
-
|
|
879
|
+
const Xe = u(Ct, Ke);
|
|
880
|
+
function Je(t, e) {
|
|
881
|
+
Xe(t, e);
|
|
874
882
|
}
|
|
875
|
-
const
|
|
876
|
-
function
|
|
883
|
+
const Qe = h("pageshow", Je), vt = "offline";
|
|
884
|
+
function Ze(t, e) {
|
|
877
885
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
878
886
|
return l(
|
|
879
887
|
vt,
|
|
@@ -886,12 +894,12 @@ function Qe(t, e) {
|
|
|
886
894
|
e
|
|
887
895
|
);
|
|
888
896
|
}
|
|
889
|
-
const
|
|
890
|
-
function
|
|
891
|
-
|
|
897
|
+
const tn = u(vt, Ze);
|
|
898
|
+
function en(t, e) {
|
|
899
|
+
tn(t, e);
|
|
892
900
|
}
|
|
893
|
-
const
|
|
894
|
-
function
|
|
901
|
+
const nn = h("offline", en), j = "scroll";
|
|
902
|
+
function sn(t, e) {
|
|
895
903
|
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;
|
|
896
904
|
if (!k(r))
|
|
897
905
|
return l(
|
|
@@ -922,13 +930,13 @@ function nn(t, e) {
|
|
|
922
930
|
e
|
|
923
931
|
);
|
|
924
932
|
}
|
|
925
|
-
const
|
|
933
|
+
const on = u(j, sn), an = P(
|
|
926
934
|
(t, e) => {
|
|
927
|
-
|
|
935
|
+
on(t, e);
|
|
928
936
|
},
|
|
929
937
|
500
|
|
930
|
-
),
|
|
931
|
-
function
|
|
938
|
+
), rn = _("scroll", an, !0), Dt = "online";
|
|
939
|
+
function cn(t, e) {
|
|
932
940
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
933
941
|
return l(
|
|
934
942
|
Dt,
|
|
@@ -941,12 +949,12 @@ function rn(t, e) {
|
|
|
941
949
|
e
|
|
942
950
|
);
|
|
943
951
|
}
|
|
944
|
-
const
|
|
945
|
-
function
|
|
946
|
-
|
|
952
|
+
const ln = u(Dt, cn);
|
|
953
|
+
function un(t, e) {
|
|
954
|
+
ln(t, e);
|
|
947
955
|
}
|
|
948
|
-
const
|
|
949
|
-
function
|
|
956
|
+
const fn = h("online", un), _t = "resize";
|
|
957
|
+
function dn(t, e) {
|
|
950
958
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
951
959
|
return l(
|
|
952
960
|
_t,
|
|
@@ -959,16 +967,16 @@ function fn(t, e) {
|
|
|
959
967
|
e
|
|
960
968
|
);
|
|
961
969
|
}
|
|
962
|
-
const K = u(_t,
|
|
970
|
+
const K = u(_t, dn);
|
|
963
971
|
let V = 0;
|
|
964
|
-
const
|
|
972
|
+
const xn = P(
|
|
965
973
|
(t, e) => {
|
|
966
974
|
const s = window.innerWidth;
|
|
967
975
|
s !== V ? (K(t, e), V = s) : "ontouchstart" in window || K(t, e), V = s;
|
|
968
976
|
},
|
|
969
977
|
300
|
|
970
|
-
),
|
|
971
|
-
function
|
|
978
|
+
), pn = h("resize", xn), kt = "unload";
|
|
979
|
+
function mn(t, e) {
|
|
972
980
|
const s = f(t.analyticsContext), i = d(t.analyticsContext), a = p(t.analyticsContext), o = x(t.analyticsContext);
|
|
973
981
|
return l(
|
|
974
982
|
kt,
|
|
@@ -981,12 +989,12 @@ function pn(t, e) {
|
|
|
981
989
|
e
|
|
982
990
|
);
|
|
983
991
|
}
|
|
984
|
-
const
|
|
985
|
-
function
|
|
986
|
-
|
|
992
|
+
const En = u(kt, mn);
|
|
993
|
+
function Cn(t, e) {
|
|
994
|
+
En(t, e);
|
|
987
995
|
}
|
|
988
|
-
const
|
|
989
|
-
function
|
|
996
|
+
const vn = h("unload", Cn), q = "click";
|
|
997
|
+
function Dn(t, e) {
|
|
990
998
|
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;
|
|
991
999
|
if (!k(r)) {
|
|
992
1000
|
const C = {
|
|
@@ -1022,12 +1030,12 @@ function vn(t, e) {
|
|
|
1022
1030
|
e
|
|
1023
1031
|
);
|
|
1024
1032
|
}
|
|
1025
|
-
const
|
|
1026
|
-
function
|
|
1027
|
-
|
|
1033
|
+
const _n = u(q, Dn);
|
|
1034
|
+
function kn(t, e) {
|
|
1035
|
+
_n(t, e);
|
|
1028
1036
|
}
|
|
1029
|
-
const
|
|
1030
|
-
function
|
|
1037
|
+
const Tn = _("click", kn), A = "paste";
|
|
1038
|
+
function bn(t, e) {
|
|
1031
1039
|
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;
|
|
1032
1040
|
if (!k(r))
|
|
1033
1041
|
return l(
|
|
@@ -1058,12 +1066,12 @@ function Tn(t, e) {
|
|
|
1058
1066
|
e
|
|
1059
1067
|
);
|
|
1060
1068
|
}
|
|
1061
|
-
const
|
|
1062
|
-
function
|
|
1063
|
-
|
|
1069
|
+
const $n = u(A, bn);
|
|
1070
|
+
function gn(t, e) {
|
|
1071
|
+
$n(t, e);
|
|
1064
1072
|
}
|
|
1065
|
-
const
|
|
1066
|
-
function
|
|
1073
|
+
const Ln = _("paste", gn), O = "copy";
|
|
1074
|
+
function hn(t, e) {
|
|
1067
1075
|
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;
|
|
1068
1076
|
if (!k(r))
|
|
1069
1077
|
return l(
|
|
@@ -1094,12 +1102,12 @@ function Ln(t, e) {
|
|
|
1094
1102
|
e
|
|
1095
1103
|
);
|
|
1096
1104
|
}
|
|
1097
|
-
const
|
|
1098
|
-
function
|
|
1099
|
-
|
|
1105
|
+
const yn = u(O, hn);
|
|
1106
|
+
function Nn(t, e) {
|
|
1107
|
+
yn(t, e);
|
|
1100
1108
|
}
|
|
1101
|
-
const
|
|
1102
|
-
function
|
|
1109
|
+
const wn = _("copy", Nn), F = "drag";
|
|
1110
|
+
function Pn(t, e) {
|
|
1103
1111
|
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;
|
|
1104
1112
|
if (!k(r))
|
|
1105
1113
|
return l(
|
|
@@ -1130,7 +1138,7 @@ function wn(t, e) {
|
|
|
1130
1138
|
e
|
|
1131
1139
|
);
|
|
1132
1140
|
}
|
|
1133
|
-
const
|
|
1141
|
+
const Vn = u(F, Pn);
|
|
1134
1142
|
function Tt(t, e) {
|
|
1135
1143
|
const s = t.event.currentTarget;
|
|
1136
1144
|
if (!s || !(s instanceof HTMLElement))
|
|
@@ -1141,43 +1149,43 @@ function Tt(t, e) {
|
|
|
1141
1149
|
s.removeEventListener("drag", i), s.addEventListener(
|
|
1142
1150
|
"dragend",
|
|
1143
1151
|
() => bt(s, () => t.analyticsContext)
|
|
1144
|
-
),
|
|
1152
|
+
), Vn(t, e);
|
|
1145
1153
|
}
|
|
1146
1154
|
const bt = _("drag", Tt);
|
|
1147
|
-
function
|
|
1148
|
-
e && (
|
|
1155
|
+
function ns(t, e) {
|
|
1156
|
+
e && (Tn(e, t), Te(e, t), Le(e, t), wn(e, t), Ln(e, t), bt(e, t), Ie(e, t), rn(e, t), Ee(e, t), Ye(e, t));
|
|
1149
1157
|
}
|
|
1150
|
-
function
|
|
1151
|
-
|
|
1158
|
+
function ss(t) {
|
|
1159
|
+
Oe(t), Ge(t), Qe(t), nn(t), fn(t), pn(t), vn(t);
|
|
1152
1160
|
}
|
|
1153
1161
|
export {
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1162
|
+
Zn as A,
|
|
1163
|
+
ts as B,
|
|
1164
|
+
es as C,
|
|
1157
1165
|
d as a,
|
|
1158
|
-
|
|
1166
|
+
An as b,
|
|
1159
1167
|
u as c,
|
|
1160
1168
|
p as d,
|
|
1161
1169
|
x as e,
|
|
1162
1170
|
f,
|
|
1163
1171
|
l as g,
|
|
1164
1172
|
n as h,
|
|
1165
|
-
|
|
1166
|
-
|
|
1173
|
+
On as i,
|
|
1174
|
+
Fn as j,
|
|
1167
1175
|
Q as k,
|
|
1168
1176
|
R as l,
|
|
1169
1177
|
Z as m,
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1178
|
+
Rn as n,
|
|
1179
|
+
ns as o,
|
|
1180
|
+
ss as p,
|
|
1181
|
+
In as q,
|
|
1182
|
+
Mn as r,
|
|
1183
|
+
Un as s,
|
|
1184
|
+
Wn as t,
|
|
1185
|
+
zn as u,
|
|
1186
|
+
Gn as v,
|
|
1187
|
+
Kn as w,
|
|
1188
|
+
Xn as x,
|
|
1189
|
+
Jn as y,
|
|
1190
|
+
Qn as z
|
|
1183
1191
|
};
|