@gemx-dev/clarity-js 0.8.84 → 0.8.86

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/build/clarity.js CHANGED
@@ -20,8 +20,18 @@ var dom = /*#__PURE__*/Object.freeze({
20
20
  get update () { return update; },
21
21
  get updates () { return updates$2; }
22
22
  });
23
+ var timeline = /*#__PURE__*/Object.freeze({
24
+ __proto__: null,
25
+ get compute () { return compute$5; },
26
+ get reset () { return reset$5; },
27
+ get start () { return start$j; },
28
+ get stop () { return stop$h; },
29
+ get track () { return track$2; },
30
+ get updates () { return updates$1; }
31
+ });
23
32
  var upload$1 = /*#__PURE__*/Object.freeze({
24
33
  __proto__: null,
34
+ get flush () { return flush; },
25
35
  get queue () { return queue; },
26
36
  get start () { return start$h; },
27
37
  get stop () { return stop$f; },
@@ -178,6 +188,7 @@ var config$2 = {
178
188
  externalSession: false,
179
189
  userId: null,
180
190
  sessionId: null,
191
+ mode: "gemx",
181
192
  };
182
193
 
183
194
  function api(method) {
@@ -207,11 +218,11 @@ function time(event) {
207
218
  var origin = event && event.view ? event.view.performance.timeOrigin : performance.timeOrigin;
208
219
  return Math.max(Math.round(ts + origin - baseline), 0);
209
220
  }
210
- function stop$L() {
221
+ function stop$M() {
211
222
  startTime = 0;
212
223
  }
213
224
 
214
- var version$1 = "0.8.84";
225
+ var version$1 = "0.8.86";
215
226
 
216
227
  // tslint:disable: no-bitwise
217
228
  function hash (input, precision) {
@@ -558,7 +569,7 @@ function track$8(event, x, y, time) {
558
569
  function activity(t) {
559
570
  buffer.activityTime = t;
560
571
  }
561
- function visibility(t, visible) {
572
+ function visibility$1(t, visible) {
562
573
  buffer.visible = visible;
563
574
  if (!buffer.visible) {
564
575
  activity(t);
@@ -574,7 +585,7 @@ function compute$g() {
574
585
  encode$1(4 /* Event.Baseline */);
575
586
  }
576
587
  }
577
- function stop$K() {
588
+ function stop$L() {
578
589
  reset$u();
579
590
  }
580
591
 
@@ -586,9 +597,9 @@ var baseline = /*#__PURE__*/Object.freeze({
586
597
  reset: reset$u,
587
598
  start: start$O,
588
599
  get state () { return state$b; },
589
- stop: stop$K,
600
+ stop: stop$L,
590
601
  track: track$8,
591
- visibility: visibility
602
+ visibility: visibility$1
592
603
  });
593
604
 
594
605
  var data$l = null;
@@ -616,7 +627,7 @@ function start$N() {
616
627
  updates$3 = {};
617
628
  count$1(5 /* Metric.InvokeCount */);
618
629
  }
619
- function stop$J() {
630
+ function stop$K() {
620
631
  data$k = {};
621
632
  updates$3 = {};
622
633
  }
@@ -694,7 +705,7 @@ function ping() {
694
705
  suspend();
695
706
  }
696
707
  }
697
- function stop$I() {
708
+ function stop$J() {
698
709
  clearTimeout$1(timeout$7);
699
710
  last = 0;
700
711
  interval = 0;
@@ -705,14 +716,14 @@ var ping$1 = /*#__PURE__*/Object.freeze({
705
716
  get data () { return data$j; },
706
717
  reset: reset$s,
707
718
  start: start$M,
708
- stop: stop$I
719
+ stop: stop$J
709
720
  });
710
721
 
711
722
  var data$i = null;
712
723
  function start$L() {
713
724
  data$i = {};
714
725
  }
715
- function stop$H() {
726
+ function stop$I() {
716
727
  data$i = {};
717
728
  }
718
729
  function track$7(event, time) {
@@ -745,7 +756,7 @@ var summary = /*#__PURE__*/Object.freeze({
745
756
  get data () { return data$i; },
746
757
  reset: reset$r,
747
758
  start: start$L,
748
- stop: stop$H,
759
+ stop: stop$I,
749
760
  track: track$7
750
761
  });
751
762
 
@@ -946,7 +957,7 @@ function compute$d() {
946
957
  function reset$q() {
947
958
  data$h = {};
948
959
  }
949
- function stop$G() {
960
+ function stop$H() {
950
961
  reset$q();
951
962
  }
952
963
  function redact(input) {
@@ -987,7 +998,7 @@ var variable = /*#__PURE__*/Object.freeze({
987
998
  reset: reset$q,
988
999
  set: set$1,
989
1000
  start: start$K,
990
- stop: stop$G
1001
+ stop: stop$H
991
1002
  });
992
1003
 
993
1004
  var data$g = {};
@@ -1112,7 +1123,7 @@ function update$1(key, subkey, value) {
1112
1123
  }
1113
1124
  return;
1114
1125
  }
1115
- function stop$F() {
1126
+ function stop$G() {
1116
1127
  reset$p();
1117
1128
  }
1118
1129
  function parse$1(variable) {
@@ -1186,7 +1197,7 @@ var extract = /*#__PURE__*/Object.freeze({
1186
1197
  keys: keys,
1187
1198
  reset: reset$p,
1188
1199
  start: start$J,
1189
- stop: stop$F,
1200
+ stop: stop$G,
1190
1201
  trigger: trigger$2,
1191
1202
  update: update$1
1192
1203
  });
@@ -1217,7 +1228,7 @@ var COOKIE_SEP = "^" /* Constant.Caret */;
1217
1228
  function start$I() {
1218
1229
  rootDomain = null;
1219
1230
  }
1220
- function stop$E() {
1231
+ function stop$F() {
1221
1232
  rootDomain = null;
1222
1233
  }
1223
1234
  function getCookie(key, limit) {
@@ -1300,20 +1311,22 @@ var cookie = /*#__PURE__*/Object.freeze({
1300
1311
  getCookie: getCookie,
1301
1312
  setCookie: setCookie,
1302
1313
  start: start$I,
1303
- stop: stop$E
1314
+ stop: stop$F
1304
1315
  });
1305
1316
 
1306
1317
  var defaultConfig = {
1307
1318
  excludeClassNames: [],
1319
+ ignoreMutationClassNames: [],
1308
1320
  };
1309
1321
  var _config = __assign({}, defaultConfig);
1310
1322
  function start$H() {
1311
- var _a, _b;
1323
+ var _a, _b, _c, _d;
1312
1324
  _config = {
1313
1325
  excludeClassNames: ((_b = (_a = window === null || window === void 0 ? void 0 : window.GemXHeatmap) === null || _a === void 0 ? void 0 : _a.excludeClassNames) !== null && _b !== void 0 ? _b : []),
1326
+ ignoreMutationClassNames: ((_d = (_c = window === null || window === void 0 ? void 0 : window.GemXHeatmap) === null || _c === void 0 ? void 0 : _c.ignoreMutationClassNames) !== null && _d !== void 0 ? _d : []),
1314
1327
  };
1315
1328
  }
1316
- function stop$D() {
1329
+ function stop$E() {
1317
1330
  _config = __assign({}, defaultConfig);
1318
1331
  }
1319
1332
  function set(config) {
@@ -1328,7 +1341,7 @@ var gemx = /*#__PURE__*/Object.freeze({
1328
1341
  get: get$2,
1329
1342
  set: set,
1330
1343
  start: start$H,
1331
- stop: stop$D
1344
+ stop: stop$E
1332
1345
  });
1333
1346
 
1334
1347
  var signalCallback = null;
@@ -1359,29 +1372,31 @@ function signalsEvent(signalsPayload) {
1359
1372
  }
1360
1373
  }
1361
1374
 
1362
- var modules$2 = [gemx, baseline, dimension, variable, limit, summary, cookie, consent$2, metadata$1, envelope$1, upload$1, ping$1, upgrade$1, extract];
1375
+ var modules$3 = [gemx, baseline, dimension, variable, limit, summary, cookie, consent$2, metadata$1, envelope$1, upload$1, ping$1, upgrade$1, extract];
1363
1376
  function start$G() {
1364
1377
  // Metric needs to be initialized before we can start measuring. so metric is not wrapped in measure
1365
1378
  start$N();
1366
- modules$2.forEach(function (x) { return measure(x.start)(); });
1379
+ modules$3.forEach(function (x) { return measure(x.start)(); });
1367
1380
  }
1368
- function stop$C() {
1381
+ function stop$D() {
1369
1382
  // Stop modules in the reverse order of their initialization
1370
1383
  // The ordering below should respect inter-module dependency.
1371
1384
  // E.g. if upgrade depends on upload, then upgrade needs to end before upload.
1372
1385
  // Similarly, if upload depends on metadata, upload needs to end before metadata.
1373
- modules$2.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
1374
- stop$J();
1386
+ modules$3.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
1387
+ stop$K();
1375
1388
  }
1376
1389
  function compute$b() {
1377
- compute$d();
1378
1390
  compute$g();
1379
- compute$3();
1380
- compute$f();
1381
- compute$e();
1382
1391
  compute$4();
1383
- compute$c();
1384
1392
  compute$2();
1393
+ if (config$2.mode !== "gemx") {
1394
+ compute$d();
1395
+ compute$3();
1396
+ compute$f();
1397
+ compute$e();
1398
+ compute$c();
1399
+ }
1385
1400
  }
1386
1401
 
1387
1402
  var history$5 = [];
@@ -1440,10 +1455,19 @@ function recompute$8(evt) {
1440
1455
  function reset$o() {
1441
1456
  state$a = [];
1442
1457
  }
1443
- function stop$B() {
1458
+ function stop$C() {
1444
1459
  reset$o();
1445
1460
  }
1446
1461
 
1462
+ var change = /*#__PURE__*/Object.freeze({
1463
+ __proto__: null,
1464
+ observe: observe$c,
1465
+ reset: reset$o,
1466
+ start: start$E,
1467
+ get state () { return state$a; },
1468
+ stop: stop$C
1469
+ });
1470
+
1447
1471
  function offset(element) {
1448
1472
  var output = { x: 0, y: 0 };
1449
1473
  // Walk up the chain to ensure we compute offset distance correctly
@@ -1694,10 +1718,19 @@ function source() {
1694
1718
  function reset$n() {
1695
1719
  state$9 = [];
1696
1720
  }
1697
- function stop$A() {
1721
+ function stop$B() {
1698
1722
  reset$n();
1699
1723
  }
1700
1724
 
1725
+ var click = /*#__PURE__*/Object.freeze({
1726
+ __proto__: null,
1727
+ observe: observe$b,
1728
+ reset: reset$n,
1729
+ start: start$D,
1730
+ get state () { return state$9; },
1731
+ stop: stop$B
1732
+ });
1733
+
1701
1734
  var state$8 = [];
1702
1735
  function start$C() {
1703
1736
  reset$m();
@@ -1714,10 +1747,19 @@ function recompute$7(action, evt) {
1714
1747
  function reset$m() {
1715
1748
  state$8 = [];
1716
1749
  }
1717
- function stop$z() {
1750
+ function stop$A() {
1718
1751
  reset$m();
1719
1752
  }
1720
1753
 
1754
+ var clipboard = /*#__PURE__*/Object.freeze({
1755
+ __proto__: null,
1756
+ observe: observe$a,
1757
+ reset: reset$m,
1758
+ start: start$C,
1759
+ get state () { return state$8; },
1760
+ stop: stop$A
1761
+ });
1762
+
1721
1763
  var timeout$6 = null;
1722
1764
  var state$7 = [];
1723
1765
  function start$B() {
@@ -1754,11 +1796,20 @@ function process$7(event) {
1754
1796
  function reset$l() {
1755
1797
  state$7 = [];
1756
1798
  }
1757
- function stop$y() {
1799
+ function stop$z() {
1758
1800
  clearTimeout$1(timeout$6);
1759
1801
  reset$l();
1760
1802
  }
1761
1803
 
1804
+ var input = /*#__PURE__*/Object.freeze({
1805
+ __proto__: null,
1806
+ observe: observe$9,
1807
+ reset: reset$l,
1808
+ start: start$B,
1809
+ get state () { return state$7; },
1810
+ stop: stop$z
1811
+ });
1812
+
1762
1813
  var state$6 = [];
1763
1814
  var timeout$5 = null;
1764
1815
  var hasPrimaryTouch = false;
@@ -1872,7 +1923,7 @@ function similar$1(last, current) {
1872
1923
  var sameId = current.data.id !== undefined ? current.data.id === last.data.id : true;
1873
1924
  return current.event === last.event && match && distance < 20 /* Setting.Distance */ && gap < 25 /* Setting.PointerInterval */ && sameId;
1874
1925
  }
1875
- function stop$x() {
1926
+ function stop$y() {
1876
1927
  clearTimeout$1(timeout$5);
1877
1928
  // Send out any pending pointer events in the pipeline
1878
1929
  if (state$6.length > 0) {
@@ -1880,6 +1931,15 @@ function stop$x() {
1880
1931
  }
1881
1932
  }
1882
1933
 
1934
+ var pointer = /*#__PURE__*/Object.freeze({
1935
+ __proto__: null,
1936
+ observe: observe$8,
1937
+ reset: reset$k,
1938
+ start: start$A,
1939
+ get state () { return state$6; },
1940
+ stop: stop$y
1941
+ });
1942
+
1883
1943
  /**
1884
1944
  * Creates a throttled version of the provided function that only executes at most once
1885
1945
  * every specified duration in milliseconds, ensuring the last event is not lost.
@@ -1962,10 +2022,18 @@ function reset$j() {
1962
2022
  clearTimeout$1(timeout$4);
1963
2023
  throttledRecompute$1.cleanup();
1964
2024
  }
1965
- function stop$w() {
2025
+ function stop$x() {
1966
2026
  reset$j();
1967
2027
  }
1968
2028
 
2029
+ var resize = /*#__PURE__*/Object.freeze({
2030
+ __proto__: null,
2031
+ get data () { return data$e; },
2032
+ reset: reset$j,
2033
+ start: start$z,
2034
+ stop: stop$x
2035
+ });
2036
+
1969
2037
  var state$5 = [];
1970
2038
  var initialTop = null;
1971
2039
  var initialBottom = null;
@@ -2067,7 +2135,7 @@ function compute$a() {
2067
2135
  log(32 /* Dimension.InitialScrollBottom */, (_b = bottom === null || bottom === void 0 ? void 0 : bottom.hash) === null || _b === void 0 ? void 0 : _b.join("." /* Constant.Dot */));
2068
2136
  }
2069
2137
  }
2070
- function stop$v() {
2138
+ function stop$w() {
2071
2139
  clearTimeout$1(timeout$3);
2072
2140
  throttledRecompute.cleanup();
2073
2141
  state$5 = [];
@@ -2075,6 +2143,16 @@ function stop$v() {
2075
2143
  initialBottom = null;
2076
2144
  }
2077
2145
 
2146
+ var scroll = /*#__PURE__*/Object.freeze({
2147
+ __proto__: null,
2148
+ compute: compute$a,
2149
+ observe: observe$7,
2150
+ reset: reset$i,
2151
+ start: start$y,
2152
+ get state () { return state$5; },
2153
+ stop: stop$w
2154
+ });
2155
+
2078
2156
  var data$d = null;
2079
2157
  var previous = null;
2080
2158
  var timeout$2 = null;
@@ -2122,11 +2200,20 @@ function reset$h() {
2122
2200
  previous = null;
2123
2201
  data$d = { start: 0, startOffset: 0, end: 0, endOffset: 0 };
2124
2202
  }
2125
- function stop$u() {
2203
+ function stop$v() {
2126
2204
  reset$h();
2127
2205
  clearTimeout$1(timeout$2);
2128
2206
  }
2129
2207
 
2208
+ var selection = /*#__PURE__*/Object.freeze({
2209
+ __proto__: null,
2210
+ get data () { return data$d; },
2211
+ observe: observe$6,
2212
+ reset: reset$h,
2213
+ start: start$x,
2214
+ stop: stop$v
2215
+ });
2216
+
2130
2217
  var state$4 = [];
2131
2218
  function start$w() {
2132
2219
  reset$g();
@@ -2141,13 +2228,26 @@ function recompute$2(evt) {
2141
2228
  function reset$g() {
2142
2229
  state$4 = [];
2143
2230
  }
2144
- function stop$t() {
2231
+ function stop$u() {
2145
2232
  reset$g();
2146
2233
  }
2147
2234
 
2235
+ var submit = /*#__PURE__*/Object.freeze({
2236
+ __proto__: null,
2237
+ observe: observe$5,
2238
+ reset: reset$g,
2239
+ start: start$w,
2240
+ get state () { return state$4; },
2241
+ stop: stop$u
2242
+ });
2243
+
2148
2244
  var data$c;
2149
2245
  function start$v() {
2150
2246
  bind(window, "pagehide", recompute$1);
2247
+ bind(window, "beforeunload", beforeUnload);
2248
+ }
2249
+ function beforeUnload() {
2250
+ flush();
2151
2251
  }
2152
2252
  function recompute$1(evt) {
2153
2253
  data$c = { name: evt.type, persisted: evt.persisted ? 1 /* BooleanFlag.True */ : 0 /* BooleanFlag.False */ };
@@ -2157,10 +2257,18 @@ function recompute$1(evt) {
2157
2257
  function reset$f() {
2158
2258
  data$c = null;
2159
2259
  }
2160
- function stop$s() {
2260
+ function stop$t() {
2161
2261
  reset$f();
2162
2262
  }
2163
2263
 
2264
+ var unload = /*#__PURE__*/Object.freeze({
2265
+ __proto__: null,
2266
+ get data () { return data$c; },
2267
+ reset: reset$f,
2268
+ start: start$v,
2269
+ stop: stop$t
2270
+ });
2271
+
2164
2272
  var data$b;
2165
2273
  function start$u() {
2166
2274
  bind(document, "visibilitychange", recompute);
@@ -2177,16 +2285,24 @@ function recompute(evt) {
2177
2285
  function reset$e() {
2178
2286
  data$b = null;
2179
2287
  }
2180
- function stop$r() {
2288
+ function stop$s() {
2181
2289
  reset$e();
2182
2290
  }
2183
2291
 
2292
+ var visibility = /*#__PURE__*/Object.freeze({
2293
+ __proto__: null,
2294
+ get data () { return data$b; },
2295
+ reset: reset$e,
2296
+ start: start$u,
2297
+ stop: stop$s
2298
+ });
2299
+
2184
2300
  var data$a;
2185
2301
  function start$t() {
2186
2302
  bind(window, "focus", function () { return compute$9(1 /* BooleanFlag.True */); });
2187
2303
  bind(window, "blur", function () { return compute$9(0 /* BooleanFlag.False */); });
2188
2304
  }
2189
- function stop$q() {
2305
+ function stop$r() {
2190
2306
  reset$d();
2191
2307
  }
2192
2308
  function reset$d() {
@@ -2197,6 +2313,14 @@ function compute$9(focus) {
2197
2313
  encode$4(50 /* Event.Focus */);
2198
2314
  }
2199
2315
 
2316
+ var focus = /*#__PURE__*/Object.freeze({
2317
+ __proto__: null,
2318
+ get data () { return data$a; },
2319
+ reset: reset$d,
2320
+ start: start$t,
2321
+ stop: stop$r
2322
+ });
2323
+
2200
2324
  var bound = false;
2201
2325
  function start$s() {
2202
2326
  // Only bind once - this listener must persist even when Clarity stops
@@ -2219,50 +2343,57 @@ function handler$2(evt) {
2219
2343
  log$1(11 /* Code.BFCache */, 0 /* Severity.Info */);
2220
2344
  }
2221
2345
  }
2346
+ function stop$q() {
2347
+ // Intentionally don't remove the listener or reset 'bound' flag
2348
+ // We need the listener to persist to detect bfcache restoration
2349
+ }
2222
2350
 
2351
+ var pageshow = /*#__PURE__*/Object.freeze({
2352
+ __proto__: null,
2353
+ start: start$s,
2354
+ stop: stop$q
2355
+ });
2356
+
2357
+ var GEMX$1 = [
2358
+ timeline,
2359
+ click,
2360
+ resize,
2361
+ visibility,
2362
+ scroll,
2363
+ pageshow,
2364
+ unload,
2365
+ ];
2366
+ var ALL$1 = [
2367
+ timeline,
2368
+ click,
2369
+ clipboard,
2370
+ pointer,
2371
+ input,
2372
+ resize,
2373
+ visibility,
2374
+ focus,
2375
+ pageshow,
2376
+ scroll,
2377
+ selection,
2378
+ change,
2379
+ submit,
2380
+ unload
2381
+ ];
2382
+ var GEMX_OBSERVE = { allRoots: [scroll], documentOnly: [click] };
2383
+ var ALL_OBSERVE = { allRoots: [scroll], documentOnly: [click, clipboard, pointer, input, selection, change, submit] };
2384
+ var modules$2 = ALL$1;
2223
2385
  function start$r() {
2224
- start$j();
2225
- start$D();
2226
- start$C();
2227
- start$A();
2228
- start$B();
2229
- start$z();
2230
- start$u();
2231
- start$t();
2232
- start$s();
2233
- start$y();
2234
- start$x();
2235
- start$E();
2236
- start$w();
2237
- start$v();
2386
+ modules$2 = config$2.mode === "gemx" ? GEMX$1 : ALL$1;
2387
+ modules$2.forEach(function (m) { return m.start(); });
2238
2388
  }
2239
2389
  function stop$p() {
2240
- stop$h();
2241
- stop$A();
2242
- stop$z();
2243
- stop$x();
2244
- stop$y();
2245
- stop$w();
2246
- stop$r();
2247
- stop$q();
2248
- stop$v();
2249
- stop$u();
2250
- stop$B();
2251
- stop$t();
2252
- stop$s();
2390
+ modules$2.forEach(function (m) { return m.stop(); });
2253
2391
  }
2254
2392
  function observe$4(root) {
2255
- observe$7(root);
2256
- // Only monitor following interactions if the root node is a document
2257
- // In case of shadow DOM, following events automatically bubble up to the parent document.
2393
+ var observeModules = config$2.mode === "gemx" ? GEMX_OBSERVE : ALL_OBSERVE;
2394
+ observeModules.allRoots.forEach(function (m) { return m.observe(root); });
2258
2395
  if (root.nodeType === Node.DOCUMENT_NODE) {
2259
- observe$b(root);
2260
- observe$a(root);
2261
- observe$8(root);
2262
- observe$9(root);
2263
- observe$6(root);
2264
- observe$c(root);
2265
- observe$5(root);
2396
+ observeModules.documentOnly.forEach(function (m) { return m.observe(root); });
2266
2397
  }
2267
2398
  }
2268
2399
 
@@ -2954,7 +3085,7 @@ function handle$1(m) {
2954
3085
  }
2955
3086
  function processMutation(timer, mutation, instance, timestamp) {
2956
3087
  return __awaiter(this, void 0, void 0, function () {
2957
- var state$1, target, type;
3088
+ var state$1, target, ignoredClasses, el_1, type;
2958
3089
  return __generator(this, function (_a) {
2959
3090
  switch (_a.label) {
2960
3091
  case 0:
@@ -2969,6 +3100,13 @@ function processMutation(timer, mutation, instance, timestamp) {
2969
3100
  return [2 /*return*/];
2970
3101
  }
2971
3102
  target = mutation.target;
3103
+ ignoredClasses = get$2().ignoreMutationClassNames;
3104
+ if (ignoredClasses.length > 0 && target instanceof Element) {
3105
+ el_1 = target;
3106
+ if (ignoredClasses.some(function (cls) { return el_1.classList.contains(cls); })) {
3107
+ return [2 /*return*/];
3108
+ }
3109
+ }
2972
3110
  type = config$2.throttleDom ? track$5(mutation, timer, instance, timestamp) : mutation.type;
2973
3111
  if (type && target && target.ownerDocument) {
2974
3112
  parse(target.ownerDocument);
@@ -4346,10 +4484,10 @@ function metadata$2(node, event, text) {
4346
4484
  var output = { id: 0, hash: null, privacy: 2 /* Privacy.Text */ };
4347
4485
  if (node) {
4348
4486
  var value = get(node);
4349
- console.log("[GemX - Target - Metadata]", {
4350
- selector: value.selector,
4351
- hash: value.hash,
4352
- });
4487
+ if (!window.GemXHeatmap.__debug) {
4488
+ window.GemXHeatmap.__debug = [];
4489
+ }
4490
+ window.GemXHeatmap.__debug.push({ event: event, selector: value.selector, hash: value.hash });
4353
4491
  if (value !== null) {
4354
4492
  var metadata_1 = value.metadata;
4355
4493
  output.id = value.id;
@@ -4561,7 +4699,7 @@ function encode$4 (type, ts) {
4561
4699
  v = data$b;
4562
4700
  tokens.push(v.visible);
4563
4701
  queue(tokens);
4564
- visibility(t, v.visible);
4702
+ visibility$1(t, v.visible);
4565
4703
  reset$e();
4566
4704
  break;
4567
4705
  case 50 /* Event.Focus */: {
@@ -4914,6 +5052,14 @@ function queue(tokens, transmit) {
4914
5052
  check$2(playbackBytes);
4915
5053
  }
4916
5054
  }
5055
+ function flush() {
5056
+ if (!active$1) {
5057
+ return;
5058
+ }
5059
+ clearTimeout$1(timeout);
5060
+ timeout = null;
5061
+ upload(true);
5062
+ }
4917
5063
  function stop$f() {
4918
5064
  clearTimeout$1(timeout);
4919
5065
  upload(true);
@@ -6352,7 +6498,7 @@ function stop$5() {
6352
6498
  reset$2();
6353
6499
  reset$1();
6354
6500
  reset$4();
6355
- stop$L();
6501
+ stop$M();
6356
6502
  status = false;
6357
6503
  }
6358
6504
  function active() {
@@ -6745,9 +6891,12 @@ var performance$1 = /*#__PURE__*/Object.freeze({
6745
6891
  stop: stop$1
6746
6892
  });
6747
6893
 
6748
- var modules = [diagnostic, layout, interaction, performance$1, dynamic];
6894
+ var GEMX = [diagnostic, layout, interaction];
6895
+ var ALL = [diagnostic, layout, interaction, performance$1, dynamic];
6896
+ var modules = ALL;
6749
6897
  function start(config$1) {
6750
6898
  if (config$1 === void 0) { config$1 = null; }
6899
+ modules = config$1.mode === "gemx" ? GEMX : ALL;
6751
6900
  // Check that browser supports required APIs and we do not attempt to start Clarity multiple times
6752
6901
  if (check()) {
6753
6902
  config(config$1);
@@ -6783,7 +6932,7 @@ function stop() {
6783
6932
  if (active()) {
6784
6933
  // Stop modules in the reverse order of their initialization and start queuing up items again
6785
6934
  modules.slice().reverse().forEach(function (x) { return measure(x.stop)(); });
6786
- stop$C();
6935
+ stop$D();
6787
6936
  stop$5();
6788
6937
  setup();
6789
6938
  }