wineater-bot 1.8.2 → 2.0.0

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.
@@ -32,8 +32,6 @@ const _n = `
32
32
  position: fixed;
33
33
  bottom: 20px;
34
34
  right: 20px;
35
- /* Other styles for the bottom-right button */
36
- /* ... */
37
35
  }
38
36
 
39
37
  .chat-icon-right-center {
@@ -41,35 +39,31 @@ const _n = `
41
39
  top: 50%;
42
40
  right: -85px;
43
41
  transform: translateY(-50%) rotate(90deg);
44
- /* Additional styling for the button */
45
- /* ... */
46
42
  }
47
43
 
48
44
  #chat-icon img {
49
- width: 40px; /* Adjust icon size as needed */
45
+ width: 40px;
50
46
  height: auto;
51
47
  margin-right: 8px;
52
48
  }
53
49
 
54
50
  #chat-icon span {
55
51
  color: black; /* Text color */
56
- font-family: 'Poppins', sans-serif; /* Font family from your style guide */
57
- /* Add more text styles if needed */
52
+ font-family: 'Poppins', sans-serif;
58
53
  }
59
54
 
60
55
  /* Chat window styles */
61
56
  #chat-window {
62
57
  position: fixed;
63
- bottom: 20px; /* Set to the desired distance from the bottom */
64
- right: 20px; /* Set to the desired distance from the right */
65
- width: 350px; /* Width of the chat window */
58
+ bottom: 20px;
59
+ right: 20px;
60
+ width: 350px;
66
61
  background-color: white;
67
62
  border-radius: 8px;
68
63
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
69
- display: none; /* Initially hidden */
64
+ display: none;
70
65
  }
71
66
 
72
- /* Header of the chat window */
73
67
  #chat-header {
74
68
  background-color: #fff;
75
69
  color: white;
@@ -79,34 +73,30 @@ const _n = `
79
73
  display: flex;
80
74
  justify-content: space-between;
81
75
  align-items: center;
82
- position: relative; /* Needed for absolute positioning of the close button */
83
76
  }
84
77
 
85
- /* Powered by and logo styles */
86
78
  #powered-by {
87
79
  display: flex;
88
80
  align-items: center;
89
- background-color: #fff; /* White background */
81
+ background-color: #fff;
90
82
  width: 100%;
91
- border-radius: 16px; /* Rounded corners for the container */
83
+ border-radius: 16px;
92
84
  }
93
85
 
94
86
  #powered-by a span {
95
87
  font-family: 'Poppins', sans-serif;
96
- color: #7E27ED; /* Text color - using the primary color from your style guide */
97
- margin-right: 8px; /* Space between the text and the logo */
88
+ color: #7E27ED;
89
+ margin-right: 8px;
98
90
  }
99
91
 
100
92
  #chatbot-logo {
101
- height: 20px; /* Adjust the logo size as needed */
102
- width: auto; /* Keep the logo's aspect ratio */
93
+ height: 20px;
94
+ width: auto;
103
95
  }
104
96
 
105
-
106
- /* Style for the close button */
107
97
  #close-btn {
108
- font-size: 24px; /* Size of the close button */
109
- color: #7E27ED; /* Text color - using the primary color from your style guide */
98
+ font-size: 24px;
99
+ color: #7E27ED;
110
100
  cursor: pointer;
111
101
  padding: 0 10px;
112
102
  line-height: 24px;
@@ -118,67 +108,80 @@ const _n = `
118
108
  height: 400px;
119
109
  overflow-y: auto;
120
110
  padding: 15px;
121
- background: #f7f7f7; /* Light grey background for the message area */
111
+ background: #f7f7f7;
122
112
  }
123
113
 
124
114
  /* Input area */
125
115
  #input-container {
126
- border-top: 2px solid #ececec; /* Light border for input area */
127
- background-color: white; /* White background for input area */
116
+ border-top: 2px solid #ececec;
117
+ background-color: white;
128
118
  padding: 12px;
129
119
  display: flex;
130
- align-items: center; /* Align button and input vertically */
131
- gap: 10px; /* Adds space between input and button */
120
+ align-items: center;
121
+ gap: 10px;
132
122
  }
133
123
 
134
124
  #input-container input {
135
125
  flex-grow: 1;
136
- border: 2px solid #B928EB; /* Input border color based on style guide */
126
+ border: 2px solid #B928EB;
137
127
  padding: 10px;
138
128
  border-radius: 4px;
139
- font-family: 'Poppins', sans-serif; /* Use Poppins font */
129
+ font-family: 'Poppins', sans-serif;
140
130
  }
141
131
 
142
132
  #input-container button {
143
- padding: 10px 20px; /* Larger padding for a larger button */
144
- background-color: #7E27ED; /* Button background color from style guide */
133
+ padding: 10px 20px;
134
+ background-color: #7E27ED;
145
135
  border: none;
146
136
  color: white;
147
137
  border-radius: 4px;
148
- font-family: 'Poppins', sans-serif; /* Use Poppins font */
149
- font-size: 1rem; /* Adjust font size as needed */
138
+ font-family: 'Poppins', sans-serif;
139
+ font-size: 1rem;
150
140
  cursor: pointer;
151
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* Add subtle shadow for depth */
152
- transition: background-color 0.3s ease; /* Smooth transition for background color */
141
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
142
+ transition: background-color 0.3s ease;
153
143
  }
154
144
 
155
145
  #input-container button:hover {
156
- background-color: #2FC0BF; /* Hover color based on style guide */
157
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Darker shadow for hover state */
146
+ background-color: #2FC0BF;
147
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
158
148
  }
159
149
 
160
150
  /* Message bubble styling */
161
151
  .message {
162
152
  margin: 8px 0;
163
153
  padding: 12px;
164
- background-color: #e0e0e0; /* Light grey for message bubbles */
154
+ background-color: #e0e0e0;
165
155
  border-radius: 16px;
166
156
  font-size: 14px;
167
157
  line-height: 1.4;
168
158
  }
169
159
 
170
160
  .message.user {
171
- background-color: #B928EB; /* User message bubble color */
161
+ background-color: #B928EB;
172
162
  color: white;
173
163
  align-self: flex-end;
174
164
  }
175
165
 
176
166
  .message.api {
177
- background-color: #e0e0e0; /* API message bubble color */
167
+ background-color: #e0e0e0;
178
168
  color: black;
179
169
  align-self: flex-start;
180
170
  }
181
171
 
172
+ /* Dish item styling */
173
+ .dish-message {
174
+ border: 2px solid #7E27ED; /* Bold yellow border */
175
+ cursor: pointer;
176
+ padding: 14px;
177
+ font-weight: bold;
178
+ font-size: 16px;
179
+ border-radius: 12px;
180
+ color: #333;
181
+ margin-top: 10px;
182
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Light shadow for depth */
183
+ }
184
+
182
185
  /* Wine item styling */
183
186
  .wine-item {
184
187
  display: flex;
@@ -187,7 +190,7 @@ const _n = `
187
190
  border-radius: 8px;
188
191
  padding: 10px;
189
192
  margin-top: 10px;
190
- background: white; /* White background for wine items */
193
+ background: white;
191
194
  }
192
195
 
193
196
  .wine-item a {
@@ -195,14 +198,14 @@ const _n = `
195
198
  }
196
199
 
197
200
  .wine-item img {
198
- width: 80px; /* Smaller wine image size */
201
+ width: 80px;
199
202
  height: auto;
200
- border-radius: 4px; /* Rounded corners for images */
203
+ border-radius: 4px;
201
204
  margin-right: 12px;
202
205
  }
203
206
 
204
207
  .wine-item div {
205
- font-size: 0.9rem; /* Smaller font size for wine info */
208
+ font-size: 0.9rem;
206
209
  }
207
210
 
208
211
  /* Ensure the chat window is visible when the 'visible' class is added */
@@ -212,14 +215,14 @@ const _n = `
212
215
 
213
216
  /* Loader Styles */
214
217
  .loader {
215
- display: none; /* Loader is hidden by default */
216
- border: 4px solid #f3f3f3; /* Light grey */
217
- border-top: 4px solid #3498db; /* Blue, could be your primary color */
218
+ display: none;
219
+ border: 4px solid #f3f3f3;
220
+ border-top: 4px solid #3498db;
218
221
  border-radius: 50%;
219
222
  width: 40px;
220
223
  height: 40px;
221
224
  animation: spin 2s linear infinite;
222
- margin: 20px auto; /* Centered horizontally */
225
+ margin: 20px auto;
223
226
  }
224
227
 
225
228
  .loader.visible {
@@ -236,8 +239,8 @@ const _n = `
236
239
  display: flex;
237
240
  justify-content: center;
238
241
  align-items: center;
239
- height: 0; /* Adjust as needed */
240
- visibility: hidden; /* Start off invisible */
242
+ height: 0;
243
+ visibility: hidden;
241
244
  background-color: #f7f7f7;
242
245
  }
243
246
 
@@ -246,13 +249,12 @@ const _n = `
246
249
  width: 8px;
247
250
  height: 8px;
248
251
  margin: 0 4px;
249
- background-color: #3498db; /* Or use a color from your style guide */
252
+ background-color: #3498db;
250
253
  border-radius: 50%;
251
254
  opacity: 0.4;
252
255
  animation: typing 1.5s infinite;
253
256
  }
254
257
 
255
- /* Animation keyframes */
256
258
  @keyframes typing {
257
259
  0% { transform: translateY(0); }
258
260
  20% { transform: translateY(-10px); }
@@ -262,7 +264,7 @@ const _n = `
262
264
  100% { transform: translateY(0); }
263
265
  }
264
266
 
265
- /* To stagger the animation for each dot */
267
+ /* Staggered animation for typing dots */
266
268
  .typing-indicator span:nth-child(1) {
267
269
  animation-delay: 0s;
268
270
  }
@@ -277,16 +279,16 @@ const _n = `
277
279
  .typing-indicator.visible {
278
280
  visibility: visible;
279
281
  height: 50px;
280
- }`, Us = document.createElement("style");
281
- Us.textContent = _n;
282
- document.head.appendChild(Us);
282
+ }`, js = document.createElement("style");
283
+ js.textContent = _n;
284
+ document.head.appendChild(js);
283
285
  function On() {
284
286
  return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(t) {
285
287
  const e = Math.random() * 16 | 0;
286
288
  return (t === "x" ? e : e & 3 | 8).toString(16);
287
289
  });
288
290
  }
289
- function Pe(t, e, s) {
291
+ function Fe(t, e, s) {
290
292
  console.log(t, s);
291
293
  let n = "";
292
294
  if (s) {
@@ -312,7 +314,7 @@ function Rn(t) {
312
314
  function Dn() {
313
315
  const t = "uniqueUserID";
314
316
  let e = j(t);
315
- return e || (e = On(), Pe(t, e, 365)), e;
317
+ return e || (e = On(), Fe(t, e, 365)), e;
316
318
  }
317
319
  function Se(t, e) {
318
320
  fetch("https://api.wineater.com/proxy/track", {
@@ -330,26 +332,26 @@ function Se(t, e) {
330
332
  console.error("Mixpanel tracking error", i);
331
333
  });
332
334
  }
333
- function Hs() {
335
+ function zs() {
334
336
  Se("Chatbot Opened", { distinct_id: j("uniqueUserID"), client: j("chatbotToken") });
335
337
  }
336
338
  function Mn(t) {
337
339
  Se("Chatbot Opened Auto", { distinct_id: j("uniqueUserID"), url: t, client: j("chatbotToken") });
338
340
  }
339
- function js() {
341
+ function Ws() {
340
342
  Se("Chatbot Closed", { distinct_id: j("uniqueUserID"), client: j("chatbotToken") });
341
343
  }
342
344
  function An(t) {
343
345
  Se("Message Sent", { distinct_id: j("uniqueUserID"), message_content: t, client: j("chatbotToken") });
344
346
  }
345
- function Ln(t) {
347
+ function Pn(t) {
346
348
  Se("Products Got", { distinct_id: j("uniqueUserID"), products: t, client: j("chatbotToken") });
347
349
  }
348
- function Pn(t) {
350
+ function Ln(t) {
349
351
  Se("Product Clicked", { distinct_id: j("uniqueUserID"), product_id: t, client: j("chatbotToken") });
350
352
  }
351
- var Xt = {}, Fn = function(t, e, s, n, i) {
352
- var r = new Worker(Xt[e] || (Xt[e] = URL.createObjectURL(new Blob([
353
+ var Kt = {}, Fn = function(t, e, s, n, i) {
354
+ var r = new Worker(Kt[e] || (Kt[e] = URL.createObjectURL(new Blob([
353
355
  t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
354
356
  ], { type: "text/javascript" }))));
355
357
  return r.onmessage = function(o) {
@@ -360,7 +362,7 @@ var Xt = {}, Fn = function(t, e, s, n, i) {
360
362
  } else
361
363
  i(null, l);
362
364
  }, r.postMessage(s, n), r;
363
- }, $ = Uint8Array, z = Uint16Array, Xe = Int32Array, Ge = new $([
365
+ }, V = Uint8Array, z = Uint16Array, Ge = Int32Array, Ke = new V([
364
366
  0,
365
367
  0,
366
368
  0,
@@ -395,7 +397,7 @@ var Xt = {}, Fn = function(t, e, s, n, i) {
395
397
  0,
396
398
  /* impossible */
397
399
  0
398
- ]), Ke = new $([
400
+ ]), Je = new V([
399
401
  0,
400
402
  0,
401
403
  0,
@@ -429,19 +431,19 @@ var Xt = {}, Fn = function(t, e, s, n, i) {
429
431
  /* unused */
430
432
  0,
431
433
  0
432
- ]), pt = new $([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), zs = function(t, e) {
434
+ ]), gt = new V([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), qs = function(t, e) {
433
435
  for (var s = new z(31), n = 0; n < 31; ++n)
434
436
  s[n] = e += 1 << t[n - 1];
435
- for (var i = new Xe(s[30]), n = 1; n < 30; ++n)
437
+ for (var i = new Ge(s[30]), n = 1; n < 30; ++n)
436
438
  for (var r = s[n]; r < s[n + 1]; ++r)
437
439
  i[r] = r - s[n] << 5 | n;
438
440
  return { b: s, r: i };
439
- }, Ws = zs(Ge, 2), Bn = Ws.b, Fe = Ws.r;
440
- Bn[28] = 258, Fe[258] = 28;
441
- var Un = zs(Ke, 0), gt = Un.r, Be = new z(32768);
442
- for (var L = 0; L < 32768; ++L) {
443
- var te = (L & 43690) >> 1 | (L & 21845) << 1;
444
- te = (te & 52428) >> 2 | (te & 13107) << 2, te = (te & 61680) >> 4 | (te & 3855) << 4, Be[L] = ((te & 65280) >> 8 | (te & 255) << 8) >> 1;
441
+ }, $s = qs(Ke, 2), Bn = $s.b, Be = $s.r;
442
+ Bn[28] = 258, Be[258] = 28;
443
+ var Un = qs(Je, 0), mt = Un.r, Ue = new z(32768);
444
+ for (var P = 0; P < 32768; ++P) {
445
+ var te = (P & 43690) >> 1 | (P & 21845) << 1;
446
+ te = (te & 52428) >> 2 | (te & 13107) << 2, te = (te & 61680) >> 4 | (te & 3855) << 4, Ue[P] = ((te & 65280) >> 8 | (te & 255) << 8) >> 1;
445
447
  }
446
448
  var me = function(t, e, s) {
447
449
  for (var n = t.length, i = 0, r = new z(e); i < n; ++i)
@@ -456,27 +458,27 @@ var me = function(t, e, s) {
456
458
  for (i = 0; i < n; ++i)
457
459
  if (t[i])
458
460
  for (var h = i << 4 | t[i], c = e - t[i], u = o[t[i] - 1]++ << c, d = u | (1 << c) - 1; u <= d; ++u)
459
- l[Be[u] >> a] = h;
461
+ l[Ue[u] >> a] = h;
460
462
  } else
461
463
  for (l = new z(n), i = 0; i < n; ++i)
462
- t[i] && (l[i] = Be[o[t[i] - 1]++] >> 15 - t[i]);
464
+ t[i] && (l[i] = Ue[o[t[i] - 1]++] >> 15 - t[i]);
463
465
  return l;
464
- }, ie = new $(288);
465
- for (var L = 0; L < 144; ++L)
466
- ie[L] = 8;
467
- for (var L = 144; L < 256; ++L)
468
- ie[L] = 9;
469
- for (var L = 256; L < 280; ++L)
470
- ie[L] = 7;
471
- for (var L = 280; L < 288; ++L)
472
- ie[L] = 8;
473
- var Ie = new $(32);
474
- for (var L = 0; L < 32; ++L)
475
- Ie[L] = 5;
476
- var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = function(t) {
466
+ }, ie = new V(288);
467
+ for (var P = 0; P < 144; ++P)
468
+ ie[P] = 8;
469
+ for (var P = 144; P < 256; ++P)
470
+ ie[P] = 9;
471
+ for (var P = 256; P < 280; ++P)
472
+ ie[P] = 7;
473
+ for (var P = 280; P < 288; ++P)
474
+ ie[P] = 8;
475
+ var Ie = new V(32);
476
+ for (var P = 0; P < 32; ++P)
477
+ Ie[P] = 5;
478
+ var Vs = /* @__PURE__ */ me(ie, 9, 0), Xs = /* @__PURE__ */ me(Ie, 5, 0), Dt = function(t) {
477
479
  return (t + 7) / 8 | 0;
478
- }, Vs = function(t, e, s) {
479
- return (e == null || e < 0) && (e = 0), (s == null || s > t.length) && (s = t.length), new $(t.subarray(e, s));
480
+ }, Gs = function(t, e, s) {
481
+ return (e == null || e < 0) && (e = 0), (s == null || s > t.length) && (s = t.length), new V(t.subarray(e, s));
480
482
  }, Hn = [
481
483
  "unexpected EOF",
482
484
  "invalid block type",
@@ -493,12 +495,12 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
493
495
  "stream finishing",
494
496
  "invalid zip data"
495
497
  // determined by unknown compression method
496
- ], Xs = function(t, e, s) {
498
+ ], Ks = function(t, e, s) {
497
499
  var n = new Error(e || Hn[t]);
498
- if (n.code = t, Error.captureStackTrace && Error.captureStackTrace(n, Xs), !s)
500
+ if (n.code = t, Error.captureStackTrace && Error.captureStackTrace(n, Ks), !s)
499
501
  throw n;
500
502
  return n;
501
- }, K = function(t, e, s) {
503
+ }, J = function(t, e, s) {
502
504
  s <<= e & 7;
503
505
  var n = e / 8 | 0;
504
506
  t[n] |= s, t[n + 1] |= s >> 8;
@@ -511,9 +513,9 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
511
513
  t[n] && s.push({ s: n, f: t[n] });
512
514
  var i = s.length, r = s.slice();
513
515
  if (!i)
514
- return { t: Mt, l: 0 };
516
+ return { t: At, l: 0 };
515
517
  if (i == 1) {
516
- var o = new $(s[0].s + 1);
518
+ var o = new V(s[0].s + 1);
517
519
  return o[s[0].s] = 1, { t: o, l: 1 };
518
520
  }
519
521
  s.sort(function(w, k) {
@@ -524,7 +526,7 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
524
526
  l = s[s[h].f < s[u].f ? h++ : u++], a = s[h != c && s[h].f < s[u].f ? h++ : u++], s[c++] = { s: -1, f: l.f + a.f, l, r: a };
525
527
  for (var d = r[0].s, n = 1; n < i; ++n)
526
528
  r[n].s > d && (d = r[n].s);
527
- var f = new z(d + 1), g = Ue(s[c - 1], f, 0);
529
+ var f = new z(d + 1), g = He(s[c - 1], f, 0);
528
530
  if (g > e) {
529
531
  var n = 0, p = 0, y = g - e, E = 1 << y;
530
532
  for (r.sort(function(k, x) {
@@ -546,10 +548,10 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
546
548
  }
547
549
  g = e;
548
550
  }
549
- return { t: new $(f), l: g };
550
- }, Ue = function(t, e, s) {
551
- return t.s == -1 ? Math.max(Ue(t.l, e, s + 1), Ue(t.r, e, s + 1)) : e[t.s] = s;
552
- }, mt = function(t) {
551
+ return { t: new V(f), l: g };
552
+ }, He = function(t, e, s) {
553
+ return t.s == -1 ? Math.max(He(t.l, e, s + 1), He(t.r, e, s + 1)) : e[t.s] = s;
554
+ }, bt = function(t) {
553
555
  for (var e = t.length; e && !t[--e]; )
554
556
  ;
555
557
  for (var s = new z(++e), n = 0, i = t[0], r = 1, o = function(a) {
@@ -576,127 +578,127 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
576
578
  for (var s = 0, n = 0; n < e.length; ++n)
577
579
  s += t[n] * e[n];
578
580
  return s;
579
- }, Dt = function(t, e, s) {
580
- var n = s.length, i = Rt(e + 2);
581
+ }, Mt = function(t, e, s) {
582
+ var n = s.length, i = Dt(e + 2);
581
583
  t[i] = n & 255, t[i + 1] = n >> 8, t[i + 2] = t[i] ^ 255, t[i + 3] = t[i + 1] ^ 255;
582
584
  for (var r = 0; r < n; ++r)
583
585
  t[i + r + 4] = s[r];
584
586
  return (i + 4 + n) * 8;
585
- }, bt = function(t, e, s, n, i, r, o, l, a, h, c) {
586
- K(e, c++, s), ++i[256];
587
- for (var u = De(i, 15), d = u.t, f = u.l, g = De(r, 15), p = g.t, y = g.l, E = mt(d), N = E.c, T = E.n, m = mt(p), w = m.c, k = m.n, x = new z(19), S = 0; S < N.length; ++S)
587
+ }, yt = function(t, e, s, n, i, r, o, l, a, h, c) {
588
+ J(e, c++, s), ++i[256];
589
+ for (var u = De(i, 15), d = u.t, f = u.l, g = De(r, 15), p = g.t, y = g.l, E = bt(d), N = E.c, T = E.n, m = bt(p), w = m.c, k = m.n, x = new z(19), S = 0; S < N.length; ++S)
588
590
  ++x[N[S] & 31];
589
591
  for (var S = 0; S < w.length; ++S)
590
592
  ++x[w[S] & 31];
591
- for (var b = De(x, 7), _ = b.t, M = b.l, O = 19; O > 4 && !_[pt[O - 1]]; --O)
593
+ for (var b = De(x, 7), _ = b.t, M = b.l, O = 19; O > 4 && !_[gt[O - 1]]; --O)
592
594
  ;
593
595
  var D = h + 5 << 3, v = pe(i, ie) + pe(r, Ie) + o, I = pe(i, d) + pe(r, p) + o + 14 + 3 * O + pe(x, _) + 2 * x[16] + 3 * x[17] + 7 * x[18];
594
596
  if (a >= 0 && D <= v && D <= I)
595
- return Dt(e, c, t.subarray(a, a + h));
596
- var A, P, R, U;
597
- if (K(e, c, 1 + (I < v)), c += 2, I < v) {
598
- A = me(d, f, 0), P = d, R = me(p, y, 0), U = p;
599
- var Qe = me(_, M, 0);
600
- K(e, c, T - 257), K(e, c + 5, k - 1), K(e, c + 10, O - 4), c += 14;
597
+ return Mt(e, c, t.subarray(a, a + h));
598
+ var A, L, R, U;
599
+ if (J(e, c, 1 + (I < v)), c += 2, I < v) {
600
+ A = me(d, f, 0), L = d, R = me(p, y, 0), U = p;
601
+ var Ze = me(_, M, 0);
602
+ J(e, c, T - 257), J(e, c + 5, k - 1), J(e, c + 10, O - 4), c += 14;
601
603
  for (var S = 0; S < O; ++S)
602
- K(e, c + 3 * S, _[pt[S]]);
604
+ J(e, c + 3 * S, _[gt[S]]);
603
605
  c += 3 * O;
604
- for (var X = [N, w], we = 0; we < 2; ++we)
605
- for (var ce = X[we], S = 0; S < ce.length; ++S) {
606
- var G = ce[S] & 31;
607
- K(e, c, Qe[G]), c += _[G], G > 15 && (K(e, c, ce[S] >> 5 & 127), c += ce[S] >> 12);
606
+ for (var G = [N, w], we = 0; we < 2; ++we)
607
+ for (var ce = G[we], S = 0; S < ce.length; ++S) {
608
+ var K = ce[S] & 31;
609
+ J(e, c, Ze[K]), c += _[K], K > 15 && (J(e, c, ce[S] >> 5 & 127), c += ce[S] >> 12);
608
610
  }
609
611
  } else
610
- A = qs, P = ie, R = $s, U = Ie;
612
+ A = Vs, L = ie, R = Xs, U = Ie;
611
613
  for (var S = 0; S < l; ++S) {
612
614
  var H = n[S];
613
615
  if (H > 255) {
614
- var G = H >> 18 & 31;
615
- fe(e, c, A[G + 257]), c += P[G + 257], G > 7 && (K(e, c, H >> 23 & 31), c += Ge[G]);
616
+ var K = H >> 18 & 31;
617
+ fe(e, c, A[K + 257]), c += L[K + 257], K > 7 && (J(e, c, H >> 23 & 31), c += Ke[K]);
616
618
  var le = H & 31;
617
- fe(e, c, R[le]), c += U[le], le > 3 && (fe(e, c, H >> 5 & 8191), c += Ke[le]);
619
+ fe(e, c, R[le]), c += U[le], le > 3 && (fe(e, c, H >> 5 & 8191), c += Je[le]);
618
620
  } else
619
- fe(e, c, A[H]), c += P[H];
621
+ fe(e, c, A[H]), c += L[H];
620
622
  }
621
- return fe(e, c, A[256]), c + P[256];
622
- }, Gs = /* @__PURE__ */ new Xe([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Mt = /* @__PURE__ */ new $(0), Ks = function(t, e, s, n, i, r) {
623
- var o = r.z || t.length, l = new $(n + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(n, l.length - i), h = r.l, c = (r.r || 0) & 7;
623
+ return fe(e, c, A[256]), c + L[256];
624
+ }, Js = /* @__PURE__ */ new Ge([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), At = /* @__PURE__ */ new V(0), Ys = function(t, e, s, n, i, r) {
625
+ var o = r.z || t.length, l = new V(n + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(n, l.length - i), h = r.l, c = (r.r || 0) & 7;
624
626
  if (e) {
625
627
  c && (a[0] = r.r >> 3);
626
- for (var u = Gs[e - 1], d = u >> 13, f = u & 8191, g = (1 << s) - 1, p = r.p || new z(32768), y = r.h || new z(g + 1), E = Math.ceil(s / 3), N = 2 * E, T = function(tt) {
627
- return (t[tt] ^ t[tt + 1] << E ^ t[tt + 2] << N) & g;
628
- }, m = new Xe(25e3), w = new z(288), k = new z(32), x = 0, S = 0, b = r.i || 0, _ = 0, M = r.w || 0, O = 0; b + 2 < o; ++b) {
628
+ for (var u = Js[e - 1], d = u >> 13, f = u & 8191, g = (1 << s) - 1, p = r.p || new z(32768), y = r.h || new z(g + 1), E = Math.ceil(s / 3), N = 2 * E, T = function(st) {
629
+ return (t[st] ^ t[st + 1] << E ^ t[st + 2] << N) & g;
630
+ }, m = new Ge(25e3), w = new z(288), k = new z(32), x = 0, S = 0, b = r.i || 0, _ = 0, M = r.w || 0, O = 0; b + 2 < o; ++b) {
629
631
  var D = T(b), v = b & 32767, I = y[D];
630
632
  if (p[v] = I, y[D] = v, M <= b) {
631
633
  var A = o - b;
632
634
  if ((x > 7e3 || _ > 24576) && (A > 423 || !h)) {
633
- c = bt(t, a, 0, m, w, k, S, _, O, b - O, c), _ = x = S = 0, O = b;
634
- for (var P = 0; P < 286; ++P)
635
- w[P] = 0;
636
- for (var P = 0; P < 30; ++P)
637
- k[P] = 0;
635
+ c = yt(t, a, 0, m, w, k, S, _, O, b - O, c), _ = x = S = 0, O = b;
636
+ for (var L = 0; L < 286; ++L)
637
+ w[L] = 0;
638
+ for (var L = 0; L < 30; ++L)
639
+ k[L] = 0;
638
640
  }
639
- var R = 2, U = 0, Qe = f, X = v - I & 32767;
640
- if (A > 2 && D == T(b - X))
641
- for (var we = Math.min(d, A) - 1, ce = Math.min(32767, b), G = Math.min(258, A); X <= ce && --Qe && v != I; ) {
642
- if (t[b + R] == t[b + R - X]) {
643
- for (var H = 0; H < G && t[b + H] == t[b + H - X]; ++H)
641
+ var R = 2, U = 0, Ze = f, G = v - I & 32767;
642
+ if (A > 2 && D == T(b - G))
643
+ for (var we = Math.min(d, A) - 1, ce = Math.min(32767, b), K = Math.min(258, A); G <= ce && --Ze && v != I; ) {
644
+ if (t[b + R] == t[b + R - G]) {
645
+ for (var H = 0; H < K && t[b + H] == t[b + H - G]; ++H)
644
646
  ;
645
647
  if (H > R) {
646
- if (R = H, U = X, H > we)
648
+ if (R = H, U = G, H > we)
647
649
  break;
648
- for (var le = Math.min(X, H - 2), Wt = 0, P = 0; P < le; ++P) {
649
- var Ze = b - X + P & 32767, Nn = p[Ze], qt = Ze - Nn & 32767;
650
- qt > Wt && (Wt = qt, I = Ze);
650
+ for (var le = Math.min(G, H - 2), $t = 0, L = 0; L < le; ++L) {
651
+ var et = b - G + L & 32767, Nn = p[et], Vt = et - Nn & 32767;
652
+ Vt > $t && ($t = Vt, I = et);
651
653
  }
652
654
  }
653
655
  }
654
- v = I, I = p[v], X += v - I & 32767;
656
+ v = I, I = p[v], G += v - I & 32767;
655
657
  }
656
658
  if (U) {
657
- m[_++] = 268435456 | Fe[R] << 18 | gt[U];
658
- var $t = Fe[R] & 31, Vt = gt[U] & 31;
659
- S += Ge[$t] + Ke[Vt], ++w[257 + $t], ++k[Vt], M = b + R, ++x;
659
+ m[_++] = 268435456 | Be[R] << 18 | mt[U];
660
+ var Xt = Be[R] & 31, Gt = mt[U] & 31;
661
+ S += Ke[Xt] + Je[Gt], ++w[257 + Xt], ++k[Gt], M = b + R, ++x;
660
662
  } else
661
663
  m[_++] = t[b], ++w[t[b]];
662
664
  }
663
665
  }
664
666
  for (b = Math.max(b, M); b < o; ++b)
665
667
  m[_++] = t[b], ++w[t[b]];
666
- c = bt(t, a, h, m, w, k, S, _, O, b - O, c), h || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = y, r.p = p, r.i = b, r.w = M);
668
+ c = yt(t, a, h, m, w, k, S, _, O, b - O, c), h || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = y, r.p = p, r.i = b, r.w = M);
667
669
  } else {
668
670
  for (var b = r.w || 0; b < o + h; b += 65535) {
669
- var et = b + 65535;
670
- et >= o && (a[c / 8 | 0] = h, et = o), c = Dt(a, c + 1, t.subarray(b, et));
671
+ var tt = b + 65535;
672
+ tt >= o && (a[c / 8 | 0] = h, tt = o), c = Mt(a, c + 1, t.subarray(b, tt));
671
673
  }
672
674
  r.i = o;
673
675
  }
674
- return Vs(l, 0, n + Rt(c) + i);
675
- }, Js = /* @__PURE__ */ function() {
676
+ return Gs(l, 0, n + Dt(c) + i);
677
+ }, Qs = /* @__PURE__ */ function() {
676
678
  for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
677
679
  for (var s = e, n = 9; --n; )
678
680
  s = (s & 1 && -306674912) ^ s >>> 1;
679
681
  t[e] = s;
680
682
  }
681
683
  return t;
682
- }(), Ys = function() {
684
+ }(), Zs = function() {
683
685
  var t = -1;
684
686
  return {
685
687
  p: function(e) {
686
688
  for (var s = t, n = 0; n < e.length; ++n)
687
- s = Js[s & 255 ^ e[n]] ^ s >>> 8;
689
+ s = Qs[s & 255 ^ e[n]] ^ s >>> 8;
688
690
  t = s;
689
691
  },
690
692
  d: function() {
691
693
  return ~t;
692
694
  }
693
695
  };
694
- }, At = function(t, e, s, n, i) {
696
+ }, Pt = function(t, e, s, n, i) {
695
697
  if (!i && (i = { l: 1 }, e.dictionary)) {
696
- var r = e.dictionary.subarray(-32768), o = new $(r.length + t.length);
698
+ var r = e.dictionary.subarray(-32768), o = new V(r.length + t.length);
697
699
  o.set(r), o.set(t, r.length), t = o, i.w = r.length;
698
700
  }
699
- return Ks(t, e.level == null ? 6 : e.level, e.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, s, n, i);
701
+ return Ys(t, e.level == null ? 6 : e.level, e.mem == null ? i.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(t.length))) * 1.5) : 20 : 12 + e.mem, s, n, i);
700
702
  }, jn = function(t, e) {
701
703
  var s = {};
702
704
  for (var n in t)
@@ -704,7 +706,7 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
704
706
  for (var n in e)
705
707
  s[n] = e[n];
706
708
  return s;
707
- }, Gt = function(t, e, s) {
709
+ }, Jt = function(t, e, s) {
708
710
  for (var n = t(), i = t.toString(), r = i.slice(i.indexOf("[") + 1, i.lastIndexOf("]")).replace(/\s+/g, "").split(","), o = 0; o < n.length; ++o) {
709
711
  var l = n[o], a = r[o];
710
712
  if (typeof l == "function") {
@@ -733,16 +735,16 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
733
735
  }, Wn = function(t, e, s, n) {
734
736
  if (!xe[s]) {
735
737
  for (var i = "", r = {}, o = t.length - 1, l = 0; l < o; ++l)
736
- i = Gt(t[l], i, r);
737
- xe[s] = { c: Gt(t[o], i, r), e: r };
738
+ i = Jt(t[l], i, r);
739
+ xe[s] = { c: Jt(t[o], i, r), e: r };
738
740
  }
739
741
  var a = jn({}, xe[s].e);
740
742
  return Fn(xe[s].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", s, a, zn(a), n);
741
743
  }, qn = function() {
742
- return [$, z, Xe, Ge, Ke, pt, Fe, gt, qs, ie, $s, Ie, Be, Gs, Mt, me, K, fe, De, Ue, mt, pe, Dt, bt, Rt, Vs, Ks, At, Xn, Qs];
744
+ return [V, z, Ge, Ke, Je, gt, Be, mt, Vs, ie, Xs, Ie, Ue, Js, At, me, J, fe, De, He, bt, pe, Mt, yt, Dt, Gs, Ys, Pt, Xn, en];
743
745
  }, $n = function() {
744
- return [Zs, en, He, Ys, Js];
745
- }, Qs = function(t) {
746
+ return [tn, sn, je, Zs, Qs];
747
+ }, en = function(t) {
746
748
  return postMessage(t, [t.buffer]);
747
749
  }, Vn = function(t, e, s, n, i, r) {
748
750
  var o = Wn(s, n, i, function(l, a) {
@@ -751,46 +753,46 @@ var qs = /* @__PURE__ */ me(ie, 9, 0), $s = /* @__PURE__ */ me(Ie, 5, 0), Rt = f
751
753
  return o.postMessage([t, e], e.consume ? [t.buffer] : []), function() {
752
754
  o.terminate();
753
755
  };
754
- }, He = function(t, e, s) {
756
+ }, je = function(t, e, s) {
755
757
  for (; s; ++e)
756
758
  t[e] = s, s >>>= 8;
757
- }, Zs = function(t, e) {
759
+ }, tn = function(t, e) {
758
760
  var s = e.filename;
759
- if (t[0] = 31, t[1] = 139, t[2] = 8, t[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, t[9] = 3, e.mtime != 0 && He(t, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), s) {
761
+ if (t[0] = 31, t[1] = 139, t[2] = 8, t[8] = e.level < 2 ? 4 : e.level == 9 ? 2 : 0, t[9] = 3, e.mtime != 0 && je(t, 4, Math.floor(new Date(e.mtime || Date.now()) / 1e3)), s) {
760
762
  t[3] = 8;
761
763
  for (var n = 0; n <= s.length; ++n)
762
764
  t[n + 10] = s.charCodeAt(n);
763
765
  }
764
- }, en = function(t) {
766
+ }, sn = function(t) {
765
767
  return 10 + (t.filename ? t.filename.length + 1 : 0);
766
768
  };
767
769
  function Xn(t, e) {
768
- return At(t, e || {}, 0, 0);
770
+ return Pt(t, e || {}, 0, 0);
769
771
  }
770
772
  function Gn(t, e, s) {
771
- return s || (s = e, e = {}), typeof s != "function" && Xs(7), Vn(t, e, [
773
+ return s || (s = e, e = {}), typeof s != "function" && Ks(7), Vn(t, e, [
772
774
  qn,
773
775
  $n,
774
776
  function() {
775
- return [Kt];
777
+ return [Yt];
776
778
  }
777
779
  ], function(n) {
778
- return Qs(Kt(n.data[0], n.data[1]));
780
+ return en(Yt(n.data[0], n.data[1]));
779
781
  }, 2, s);
780
782
  }
781
- function Kt(t, e) {
783
+ function Yt(t, e) {
782
784
  e || (e = {});
783
- var s = Ys(), n = t.length;
785
+ var s = Zs(), n = t.length;
784
786
  s.p(t);
785
- var i = At(t, e, en(e), 8), r = i.length;
786
- return Zs(i, e), He(i, r - 8, s.d()), He(i, r - 4, n), i;
787
+ var i = Pt(t, e, sn(e), 8), r = i.length;
788
+ return tn(i, e), je(i, r - 8, s.d()), je(i, r - 4, n), i;
787
789
  }
788
790
  var Kn = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), Jn = 0;
789
791
  try {
790
- Kn.decode(Mt, { stream: !0 }), Jn = 1;
792
+ Kn.decode(At, { stream: !0 }), Jn = 1;
791
793
  } catch {
792
794
  }
793
- class Jt {
795
+ class Qt {
794
796
  constructor() {
795
797
  this.idx = 1, this.backDict = {};
796
798
  }
@@ -801,7 +803,7 @@ class Jt {
801
803
  }
802
804
  class Yn {
803
805
  constructor(e, s) {
804
- this.app = e, this.isDictDisabled = s, this.dict = new Jt();
806
+ this.app = e, this.isDictDisabled = s, this.dict = new Qt();
805
807
  }
806
808
  sendSetAttribute(e, s, n) {
807
809
  if (this.isDictDisabled) {
@@ -822,7 +824,7 @@ class Yn {
822
824
  return n && this.app.send([50, s, e]), s;
823
825
  }
824
826
  clear() {
825
- this.dict = new Jt();
827
+ this.dict = new Qt();
826
828
  }
827
829
  }
828
830
  class Qn {
@@ -1151,35 +1153,35 @@ class ei {
1151
1153
  return e.filter((r) => i.findIndex((o) => o.key === r.key) === -1);
1152
1154
  }
1153
1155
  }
1154
- const Yt = { htmlmasked: "hidden", masked: "obscured" }, Z = !(typeof window > "u"), ti = Z && navigator.userAgent.match(/firefox|fxios/i), si = 1e5;
1156
+ const Zt = { htmlmasked: "hidden", masked: "obscured" }, Z = !(typeof window > "u"), ti = Z && navigator.userAgent.match(/firefox|fxios/i), si = 1e5;
1155
1157
  let Lt = Z ? Date.now() - performance.now() : 0;
1156
- function st() {
1158
+ function nt() {
1157
1159
  Lt = Date.now() - performance.now();
1158
1160
  }
1159
1161
  function ye() {
1160
1162
  return Lt;
1161
1163
  }
1162
- const V = Z && performance.now ? () => Math.round(performance.now() + Lt) : () => Date.now(), nt = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
1163
- function tn(t) {
1164
+ const X = Z && performance.now ? () => Math.round(performance.now() + Lt) : () => Date.now(), it = "repeat" in String.prototype ? (t) => "*".repeat(t.length) : (t) => t.replace(/./g, "*");
1165
+ function nn(t) {
1164
1166
  return t.trim().replace(/\s+/g, " ");
1165
1167
  }
1166
- function sn(t) {
1168
+ function rn(t) {
1167
1169
  return t.startsWith("https://") || t.startsWith("http://");
1168
1170
  }
1169
- const je = "https://docs.openreplay.com", Qt = {};
1171
+ const ze = "https://docs.openreplay.com", es = {};
1170
1172
  function ne(t, e, s = "/") {
1171
- Qt[t] || (console.warn(`OpenReplay: ${t} is deprecated. ${e ? `Please, use ${e} instead.` : ""} Visit ${je}${s} for more information.`), Qt[t] = !0);
1173
+ es[t] || (console.warn(`OpenReplay: ${t} is deprecated. ${e ? `Please, use ${e} instead.` : ""} Visit ${ze}${s} for more information.`), es[t] = !0);
1172
1174
  }
1173
- function Pt(t) {
1175
+ function Ft(t) {
1174
1176
  let e = t.getAttribute("data-openreplay-label");
1175
1177
  return e !== null || (e = t.getAttribute("data-asayer-label"), e !== null && ne('"data-asayer-label" attribute', '"data-openreplay-label" attribute', "/")), e;
1176
1178
  }
1177
1179
  function ae(t, e) {
1178
1180
  const s = `data-openreplay-${e}`;
1179
- return t.hasAttribute(s) ? (Yt[e] && ne(
1181
+ return t.hasAttribute(s) ? (Zt[e] && ne(
1180
1182
  `"${s}" attribute`,
1181
1183
  // @ts-ignore
1182
- `"${Yt[e]}" attribute`,
1184
+ `"${Zt[e]}" attribute`,
1183
1185
  "/installation/sanitize-data"
1184
1186
  ), !0) : !1;
1185
1187
  }
@@ -1190,12 +1192,12 @@ function ni(t) {
1190
1192
  return !1;
1191
1193
  }
1192
1194
  }
1193
- function Zt(t) {
1195
+ function ts(t) {
1194
1196
  return t.toString(16).padStart(2, "0");
1195
1197
  }
1196
1198
  function ii(t) {
1197
1199
  const e = new Uint8Array((t || 40) / 2), s = window.crypto || window.msCrypto;
1198
- return s ? (s.getRandomValues(e), Array.from(e, Zt).join("")) : Array.from({ length: t || 40 }, () => Zt(Math.floor(Math.random() * 16))).join("");
1200
+ return s ? (s.getRandomValues(e), Array.from(e, ts).join("")) : Array.from({ length: t || 40 }, () => ts(Math.floor(Math.random() * 16))).join("");
1199
1201
  }
1200
1202
  function ri() {
1201
1203
  try {
@@ -1204,18 +1206,18 @@ function ri() {
1204
1206
  return !0;
1205
1207
  }
1206
1208
  }
1207
- function Ft(t) {
1209
+ function Bt(t) {
1208
1210
  return window.Zone && "__symbol__" in window.Zone ? (
1209
1211
  // @ts-ignore
1210
1212
  window.Zone.__symbol__(t)
1211
1213
  ) : t;
1212
1214
  }
1213
- function nn(t) {
1214
- const e = Ft("MutationObserver");
1215
+ function on(t) {
1216
+ const e = Bt("MutationObserver");
1215
1217
  return new window[e](t);
1216
1218
  }
1217
- function rn(t, e, s, n) {
1218
- const i = Ft("addEventListener");
1219
+ function an(t, e, s, n) {
1220
+ const i = Bt("addEventListener");
1219
1221
  try {
1220
1222
  t[i](e, s, n);
1221
1223
  } catch (r) {
@@ -1226,8 +1228,8 @@ function rn(t, e, s, n) {
1226
1228
  );
1227
1229
  }
1228
1230
  }
1229
- function on(t, e, s, n) {
1230
- const i = Ft("removeEventListener");
1231
+ function cn(t, e, s, n) {
1232
+ const i = Bt("removeEventListener");
1231
1233
  try {
1232
1234
  t[i](e, s, n);
1233
1235
  } catch (r) {
@@ -1268,12 +1270,12 @@ const ai = new oi();
1268
1270
  function ci(t) {
1269
1271
  ai.addTask(t);
1270
1272
  }
1271
- function an(t, e) {
1273
+ function ln(t, e) {
1272
1274
  const s = { ...t };
1273
1275
  for (const n in e)
1274
1276
  if (e.hasOwnProperty(n)) {
1275
1277
  const i = e[n], r = t[n];
1276
- typeof i == "object" && !Array.isArray(i) && i !== null ? s[n] = an(r || {}, i) : s[n] = i;
1278
+ typeof i == "object" && !Array.isArray(i) && i !== null ? s[n] = ln(r || {}, i) : s[n] = i;
1277
1279
  }
1278
1280
  return s;
1279
1281
  }
@@ -1334,7 +1336,7 @@ function gi(t) {
1334
1336
  t
1335
1337
  ];
1336
1338
  }
1337
- function es(t, e) {
1339
+ function ss(t, e) {
1338
1340
  return [
1339
1341
  13,
1340
1342
  t,
@@ -1426,7 +1428,7 @@ function Ei(t) {
1426
1428
  t
1427
1429
  ];
1428
1430
  }
1429
- function ts(t, e) {
1431
+ function ns(t, e) {
1430
1432
  return [
1431
1433
  30,
1432
1434
  t,
@@ -1455,7 +1457,7 @@ function _i(t) {
1455
1457
  t
1456
1458
  ];
1457
1459
  }
1458
- function ss(t, e, s, n) {
1460
+ function is(t, e, s, n) {
1459
1461
  return [
1460
1462
  57,
1461
1463
  t,
@@ -1464,13 +1466,13 @@ function ss(t, e, s, n) {
1464
1466
  n
1465
1467
  ];
1466
1468
  }
1467
- function ns(t) {
1469
+ function rs(t) {
1468
1470
  return [
1469
1471
  58,
1470
1472
  t
1471
1473
  ];
1472
1474
  }
1473
- function yt(t, e, s, n) {
1475
+ function St(t, e, s, n) {
1474
1476
  return [
1475
1477
  60,
1476
1478
  t,
@@ -1512,14 +1514,14 @@ function Mi(t, e, s, n, i, r) {
1512
1514
  r
1513
1515
  ];
1514
1516
  }
1515
- function St(t, e) {
1517
+ function wt(t, e) {
1516
1518
  return [
1517
1519
  70,
1518
1520
  t,
1519
1521
  e
1520
1522
  ];
1521
1523
  }
1522
- function is(t, e, s) {
1524
+ function os(t, e, s) {
1523
1525
  return [
1524
1526
  71,
1525
1527
  t,
@@ -1527,7 +1529,7 @@ function is(t, e, s) {
1527
1529
  s
1528
1530
  ];
1529
1531
  }
1530
- function wt(t, e, s, n) {
1532
+ function vt(t, e, s, n) {
1531
1533
  return [
1532
1534
  73,
1533
1535
  t,
@@ -1536,14 +1538,14 @@ function wt(t, e, s, n) {
1536
1538
  n
1537
1539
  ];
1538
1540
  }
1539
- function rs(t, e) {
1541
+ function as(t, e) {
1540
1542
  return [
1541
1543
  75,
1542
1544
  t,
1543
1545
  e
1544
1546
  ];
1545
1547
  }
1546
- function cn(t, e) {
1548
+ function hn(t, e) {
1547
1549
  return [
1548
1550
  76,
1549
1551
  t,
@@ -1557,7 +1559,7 @@ function Ai(t, e) {
1557
1559
  e
1558
1560
  ];
1559
1561
  }
1560
- function vt(t, e, s, n) {
1562
+ function kt(t, e, s, n) {
1561
1563
  return [
1562
1564
  78,
1563
1565
  t,
@@ -1566,7 +1568,7 @@ function vt(t, e, s, n) {
1566
1568
  n
1567
1569
  ];
1568
1570
  }
1569
- function ze(t, e, s, n, i, r, o, l, a) {
1571
+ function We(t, e, s, n, i, r, o, l, a) {
1570
1572
  return [
1571
1573
  83,
1572
1574
  t,
@@ -1580,7 +1582,7 @@ function ze(t, e, s, n, i, r, o, l, a) {
1580
1582
  a
1581
1583
  ];
1582
1584
  }
1583
- function Li(t, e, s, n, i, r) {
1585
+ function Pi(t, e, s, n, i, r) {
1584
1586
  return [
1585
1587
  84,
1586
1588
  t,
@@ -1591,7 +1593,7 @@ function Li(t, e, s, n, i, r) {
1591
1593
  r
1592
1594
  ];
1593
1595
  }
1594
- function Pi(t, e, s, n, i, r) {
1596
+ function Li(t, e, s, n, i, r) {
1595
1597
  return [
1596
1598
  112,
1597
1599
  t,
@@ -1602,7 +1604,7 @@ function Pi(t, e, s, n, i, r) {
1602
1604
  r
1603
1605
  ];
1604
1606
  }
1605
- function os(t, e, s) {
1607
+ function cs(t, e, s) {
1606
1608
  return [
1607
1609
  113,
1608
1610
  t,
@@ -1622,7 +1624,7 @@ function Bi(t) {
1622
1624
  t
1623
1625
  ];
1624
1626
  }
1625
- function ln(t, e, s, n, i, r, o, l, a, h) {
1627
+ function un(t, e, s, n, i, r, o, l, a, h) {
1626
1628
  return [
1627
1629
  116,
1628
1630
  t,
@@ -1671,7 +1673,7 @@ function ji(t, e, s, n) {
1671
1673
  n
1672
1674
  ];
1673
1675
  }
1674
- const kt = Z && "performance" in window && "memory" in performance ? performance : { memory: {} }, it = Z ? (navigator.deviceMemory || 0) * 1024 : 0, rt = kt.memory.jsHeapSizeLimit || 0;
1676
+ const Tt = Z && "performance" in window && "memory" in performance ? performance : { memory: {} }, rt = Z ? (navigator.deviceMemory || 0) * 1024 : 0, ot = Tt.memory.jsHeapSizeLimit || 0;
1675
1677
  function zi(t, e) {
1676
1678
  if (!Object.assign({
1677
1679
  capturePerformance: !0
@@ -1685,7 +1687,7 @@ function zi(t, e) {
1685
1687
  i === void 0 || i === -1 || i++;
1686
1688
  }, 0, !1);
1687
1689
  const o = () => {
1688
- n === void 0 || i === void 0 || (t.send(Ci(n, i, kt.memory.totalJSHeapSize || 0, kt.memory.usedJSHeapSize || 0)), i = n = document.hidden ? -1 : 0);
1690
+ n === void 0 || i === void 0 || (t.send(Ci(n, i, Tt.memory.totalJSHeapSize || 0, Tt.memory.usedJSHeapSize || 0)), i = n = document.hidden ? -1 : 0);
1689
1691
  };
1690
1692
  t.attachStartCallback(() => {
1691
1693
  i = n = -1, o(), r();
@@ -1693,11 +1695,11 @@ function zi(t, e) {
1693
1695
  i = n = void 0;
1694
1696
  }), t.ticker.attach(o, 40, !1), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", o, !1, !1);
1695
1697
  }
1696
- const as = "__or__watched_tags__";
1698
+ const ls = "__or__watched_tags__";
1697
1699
  class Wi {
1698
1700
  constructor(e, s, n) {
1699
1701
  this.sessionStorage = e, this.errLog = s, this.onTag = n, this.intervals = {}, this.tags = [];
1700
- const i = JSON.parse(e.getItem(as) ?? "[]");
1702
+ const i = JSON.parse(e.getItem(ls) ?? "[]");
1701
1703
  this.setTags(i), this.observer = new IntersectionObserver((r) => {
1702
1704
  r.forEach((o) => {
1703
1705
  if (o.isIntersecting && o.target) {
@@ -1717,7 +1719,7 @@ class Wi {
1717
1719
  if (n && n.length) {
1718
1720
  this.setTags(n);
1719
1721
  const i = JSON.stringify(n);
1720
- this.sessionStorage.setItem(as, i || "");
1722
+ this.sessionStorage.setItem(ls, i || "");
1721
1723
  }
1722
1724
  }).catch((n) => this.errLog(n));
1723
1725
  }
@@ -1810,7 +1812,7 @@ const qi = {
1810
1812
  fontWeight: "500",
1811
1813
  lineHeight: "1.5rem",
1812
1814
  cursor: "pointer"
1813
- }, cs = {
1815
+ }, hs = {
1814
1816
  fontFamily: "Verdana, sans-serif",
1815
1817
  fontSize: "13px",
1816
1818
  fontWeight: "500",
@@ -1861,12 +1863,12 @@ const qi = {
1861
1863
  flexDirection: "column",
1862
1864
  alignItems: "center",
1863
1865
  gap: "0.625rem"
1864
- }, ls = {
1866
+ }, us = {
1865
1867
  fontSize: "1.25rem",
1866
1868
  fontWeight: "500",
1867
1869
  cursor: "pointer",
1868
1870
  color: "#394EFF"
1869
- }, hs = {
1871
+ }, ds = {
1870
1872
  display: "flex",
1871
1873
  padding: "0.4rem 0.9375rem",
1872
1874
  justifyContent: "center",
@@ -1886,7 +1888,7 @@ const qi = {
1886
1888
  width: "100%",
1887
1889
  boxSizing: "border-box",
1888
1890
  cursor: "pointer"
1889
- }, us = {
1891
+ }, fs = {
1890
1892
  marginTop: "1rem",
1891
1893
  marginBottom: "1rem",
1892
1894
  cursor: "pointer",
@@ -1902,7 +1904,7 @@ const qi = {
1902
1904
  padding: "0.5rem",
1903
1905
  width: "100%",
1904
1906
  boxSizing: "border-box"
1905
- }, ds = {
1907
+ }, ps = {
1906
1908
  display: "flex",
1907
1909
  flexDirection: "column",
1908
1910
  alignItems: "center",
@@ -1924,7 +1926,7 @@ const qi = {
1924
1926
  fontSize: "13px",
1925
1927
  height: "24px",
1926
1928
  width: "24px"
1927
- }, fs = {
1929
+ }, gs = {
1928
1930
  borderRadius: "0.375rem",
1929
1931
  border: "1px solid rgba(0, 0, 0, 0.06)",
1930
1932
  background: "#F5F7FF",
@@ -1934,12 +1936,12 @@ const qi = {
1934
1936
  padding: "0.625rem 0.9375rem",
1935
1937
  gap: "0.5rem",
1936
1938
  alignSelf: "stretch"
1937
- }, ps = {
1939
+ }, ms = {
1938
1940
  fontWeight: "bold"
1939
1941
  }, Zi = {
1940
1942
  fontSize: "13px",
1941
1943
  lineHeight: "auto"
1942
- }, hn = {
1944
+ }, dn = {
1943
1945
  marginRight: "0.5rem",
1944
1946
  cursor: "pointer",
1945
1947
  color: "#394EFF",
@@ -1950,7 +1952,7 @@ const qi = {
1950
1952
  fontWeight: "500",
1951
1953
  lineHeight: "auto"
1952
1954
  }, er = {
1953
- ...hn,
1955
+ ...dn,
1954
1956
  display: "flex",
1955
1957
  padding: "0.25rem 0.9375rem",
1956
1958
  justifyContent: "center",
@@ -1971,7 +1973,7 @@ const qi = {
1971
1973
  borderRadius: "50%",
1972
1974
  borderLeftColor: "#fff",
1973
1975
  animation: "spin 0.5s linear infinite"
1974
- }, gs = {
1976
+ }, bs = {
1975
1977
  Standard: { width: 1280, height: 720 },
1976
1978
  High: { width: 1920, height: 1080 }
1977
1979
  };
@@ -2111,7 +2113,7 @@ function C(t, e, s, n, i) {
2111
2113
  const r = document.createElement(t);
2112
2114
  return r.className = e, Object.assign(r.style, s), n && (r.textContent = n), i && (r.id = i), r;
2113
2115
  }
2114
- const Ae = "or_uxt_test_start", Tt = "or_uxt_task_index", It = "or_uxt_session_id", lr = "or_uxt_test_id";
2116
+ const Ae = "or_uxt_test_start", It = "or_uxt_task_index", xt = "or_uxt_session_id", lr = "or_uxt_test_id";
2115
2117
  class hr {
2116
2118
  constructor(e, s, n, i, r, o, l, a, h) {
2117
2119
  this.ingestPoint = e, this.getTimestamp = s, this.token = n, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = a, this.getSessionId = h, this.durations = {
@@ -2142,9 +2144,9 @@ class hr {
2142
2144
  const d = this.getTimestamp();
2143
2145
  if (u === "begin" && this.testId) {
2144
2146
  const p = this.getSessionId();
2145
- this.setStorageKey(It, p), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(Ae, d.toString());
2147
+ this.setStorageKey(xt, p), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(Ae, d.toString());
2146
2148
  } else
2147
- this.removeStorageKey(this.storageKey), this.removeStorageKey(Tt), this.removeStorageKey(Ae);
2149
+ this.removeStorageKey(this.storageKey), this.removeStorageKey(It), this.removeStorageKey(Ae);
2148
2150
  const f = this.durations.testStart || d, g = d - f;
2149
2151
  return fetch(`${this.ingestPoint}/v1/web/uxt/signals/test`, {
2150
2152
  method: "POST",
@@ -2174,15 +2176,15 @@ class ur {
2174
2176
  Authorization: `Bearer ${l}`
2175
2177
  }
2176
2178
  }).then((c) => c.json()).then(({ test: c }) => {
2177
- this.isActive = !0, this.test = c, this.signalManager = new hr(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, d) => this.app.localStorage.setItem(u, d), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, gs.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
2179
+ this.isActive = !0, this.test = c, this.signalManager = new hr(this.app.options.ingestPoint, () => this.app.timestamp(), l, o, this.storageKey, (u, d) => this.app.localStorage.setItem(u, d), (u) => this.app.localStorage.removeItem(u), (u) => this.app.localStorage.getItem(u), () => this.app.getSessionID()), this.createGreeting(c.title, c.reqMic, c.reqCamera), a && ((c.reqMic || c.reqCamera) && this.userRecorder.startRecording(30, bs.Standard, c.reqMic, c.reqCamera), this.showWidget(c.description, c.tasks, !0), this.showTaskSection());
2178
2180
  }).then(() => o).catch((c) => {
2179
2181
  console.log("OR: Error fetching test", c);
2180
2182
  });
2181
2183
  }, this.hideTaskSection = () => !1, this.showTaskSection = () => !0, this.collapseWidget = () => !1, this.removeGreeting = () => !1, this.toggleDescriptionVisibility = () => {
2182
2184
  }, this.currentTaskIndex = 0, this.userRecorder = new nr(e);
2183
- const n = this.app.getSessionID(), i = this.app.localStorage.getItem(It);
2184
- n !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(It), this.app.localStorage.removeItem(lr), this.app.localStorage.removeItem(Tt), this.app.localStorage.removeItem(Ae));
2185
- const r = this.app.localStorage.getItem(Tt);
2185
+ const n = this.app.getSessionID(), i = this.app.localStorage.getItem(xt);
2186
+ n !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(xt), this.app.localStorage.removeItem(lr), this.app.localStorage.removeItem(It), this.app.localStorage.removeItem(Ae));
2187
+ const r = this.app.localStorage.getItem(It);
2186
2188
  r && (this.currentTaskIndex = parseInt(r, 10));
2187
2189
  }
2188
2190
  getTestId() {
@@ -2193,7 +2195,7 @@ class ur {
2193
2195
 
2194
2196
  📹 We're recording this browser tab to learn from your experience.
2195
2197
  🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = C("div", "button", Gi, "Read guidelines to begin");
2196
- this.removeGreeting = () => ((s || n) && this.userRecorder.startRecording(30, gs.Standard, s, n), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
2198
+ this.removeGreeting = () => ((s || n) && this.userRecorder.startRecording(30, bs.Standard, s, n), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
2197
2199
  var a, h, c, u;
2198
2200
  this.removeGreeting();
2199
2201
  const l = (a = this.signalManager) == null ? void 0 : a.getDurations();
@@ -2216,7 +2218,7 @@ class ur {
2216
2218
  });
2217
2219
  const i = this.createTitleSection();
2218
2220
  this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, Ee);
2219
- const r = this.createDescriptionSection(e), o = this.createTasksSection(s), l = C("div", "stop_bn_or", us, "Abort Session"), a = C("div", "stop_ct_or", { fontSize: "13px!important" });
2221
+ const r = this.createDescriptionSection(e), o = this.createTasksSection(s), l = C("div", "stop_bn_or", fs, "Abort Session"), a = C("div", "stop_ct_or", { fontSize: "13px!important" });
2220
2222
  a.style.fontSize = "13px", a.append(l), this.container.append(i, r, o, a), this.taskSection = o, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = a, l.onclick = () => {
2221
2223
  var h;
2222
2224
  this.userRecorder.discard(), (h = this.signalManager) == null || h.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
@@ -2234,7 +2236,7 @@ class ur {
2234
2236
  cursor: "pointer"
2235
2237
  }, (l = this.test) == null ? void 0 : l.title), i = or();
2236
2238
  e.append(s, n, i);
2237
- const r = (a) => (this.widgetVisible = a, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? Ee : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? ge : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? ge : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? ge : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? us : { display: "none" }), a), o = () => {
2239
+ const r = (a) => (this.widgetVisible = a, this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, this.widgetVisible ? Ee : { border: "none", background: "none", padding: 0 }), this.taskSection && Object.assign(this.taskSection.style, this.widgetVisible ? ge : { display: "none" }), this.descriptionSection && Object.assign(this.descriptionSection.style, this.widgetVisible ? ge : { display: "none" }), this.endSection && Object.assign(this.endSection.style, this.widgetVisible ? ge : { display: "none" }), this.stopButton && Object.assign(this.stopButton.style, this.widgetVisible ? fs : { display: "none" }), a), o = () => {
2238
2240
  Object.assign(i.style, {
2239
2241
  transform: this.widgetVisible ? "rotate(0deg)" : "rotate(180deg)"
2240
2242
  }), r(!this.widgetVisible);
@@ -2242,11 +2244,11 @@ class ur {
2242
2244
  return n.onclick = o, i.onclick = o, ir(this.bg, s), this.collapseWidget = () => r(!1), e;
2243
2245
  }
2244
2246
  createDescriptionSection(e) {
2245
- const s = C("div", "description_section_or", ge), n = C("div", "description_s_title_or", cs), i = C("div", "title", {
2247
+ const s = C("div", "description_section_or", ge), n = C("div", "description_s_title_or", hs), i = C("div", "title", {
2246
2248
  fontSize: 13,
2247
2249
  fontWeight: 500,
2248
2250
  lineHeight: "auto"
2249
- }, "Introduction & Guidelines"), r = C("div", "icon", ls, "-"), o = C("div", "content", ue), l = C("div", "text_description", {
2251
+ }, "Introduction & Guidelines"), r = C("div", "icon", us, "-"), o = C("div", "content", ue), l = C("div", "text_description", {
2250
2252
  maxHeight: "250px",
2251
2253
  overflowY: "auto",
2252
2254
  whiteSpace: "pre-wrap",
@@ -2255,7 +2257,7 @@ class ur {
2255
2257
  lineHeight: "auto"
2256
2258
  });
2257
2259
  l.innerHTML = e;
2258
- const a = C("div", "button_begin_or", hs, "Begin Test");
2260
+ const a = C("div", "button_begin_or", ds, "Begin Test");
2259
2261
  n.append(i, r), o.append(l, a), s.append(n, o);
2260
2262
  const h = () => {
2261
2263
  this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? ue : { display: "none" });
@@ -2276,17 +2278,17 @@ class ur {
2276
2278
  }
2277
2279
  createTasksSection(e) {
2278
2280
  this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, Ee);
2279
- const s = C("div", "task_section_or", ge), n = C("div", "description_t_title_or", cs), i = C("div", "title", {
2281
+ const s = C("div", "task_section_or", ge), n = C("div", "description_t_title_or", hs), i = C("div", "title", {
2280
2282
  fontSize: "13px",
2281
2283
  fontWeight: "500",
2282
2284
  lineHeight: "auto"
2283
- }, "Tasks"), r = C("div", "icon", ls, "-"), o = C("div", "content", ue), l = C("div", "pagination", Yi), a = C("div", "taskCard", fs), h = C("div", "taskText", ps), c = C("div", "taskDescription", Zi), u = C("div", "taskButtons", tr), d = C("div", "taskText", ps);
2285
+ }, "Tasks"), r = C("div", "icon", us, "-"), o = C("div", "content", ue), l = C("div", "pagination", Yi), a = C("div", "taskCard", gs), h = C("div", "taskText", ms), c = C("div", "taskDescription", Zi), u = C("div", "taskButtons", tr), d = C("div", "taskText", ms);
2284
2286
  d.textContent = "Your answer";
2285
2287
  const f = C("textarea", "taskDescription", {
2286
2288
  resize: "vertical"
2287
- }), g = C("div", "inputArea", fs);
2289
+ }), g = C("div", "inputArea", gs);
2288
2290
  g.append(d, f);
2289
- const p = C("div", "closePanelButton", hn, "Collapse Panel"), y = C("div", "nextButton", er, "Done, Next");
2291
+ const p = C("div", "closePanelButton", dn, "Collapse Panel"), y = C("div", "nextButton", er, "Done, Next");
2290
2292
  n.append(i, r), a.append(h, c), u.append(p, y), o.append(l, a, g, u), s.append(n, o);
2291
2293
  const E = () => {
2292
2294
  const m = e[this.currentTaskIndex];
@@ -2314,7 +2316,7 @@ class ur {
2314
2316
  }), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(o.style, ue), this.widgetTasksVisible = !0, !0);
2315
2317
  const T = () => {
2316
2318
  const m = document.getElementById(`or_task_${this.currentTaskIndex}`);
2317
- m && Object.assign(m.style, ds);
2319
+ m && Object.assign(m.style, ps);
2318
2320
  for (let w = 0; w < this.currentTaskIndex; w++) {
2319
2321
  const k = document.getElementById(`or_task_${w}`);
2320
2322
  k && Object.assign(k.style, Qi);
@@ -2335,7 +2337,7 @@ class ur {
2335
2337
  this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
2336
2338
  }, setTimeout(() => {
2337
2339
  const m = document.getElementById("or_task_0");
2338
- m && Object.assign(m.style, ds), E(), T();
2340
+ m && Object.assign(m.style, ps), E(), T();
2339
2341
  }, 1), s;
2340
2342
  }
2341
2343
  showEndSection() {
@@ -2347,7 +2349,7 @@ class ur {
2347
2349
  fontWeight: "500"
2348
2350
  }, "Thank you! 👍"), i = C("div", "end_description_or", {}, ((a = this.test) == null ? void 0 : a.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
2349
2351
 
2350
- We appreciate your time and valuable input.`), r = C("div", "end_button_or", hs, "Submitting Feedback"), o = cr();
2352
+ We appreciate your time and valuable input.`), r = C("div", "end_button_or", ds, "Submitting Feedback"), o = cr();
2351
2353
  r.appendChild(o), (h = this.test) != null && h.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
2352
2354
  r.removeChild(o), r.textContent = "End Session", e = !1;
2353
2355
  }).catch((u) => {
@@ -2357,10 +2359,10 @@ We appreciate your time and valuable input.`), r = C("div", "end_button_or", hs,
2357
2359
  }, s.append(n, i, r), this.endSection = s, this.container.append(s);
2358
2360
  }
2359
2361
  }
2360
- function un(t) {
2362
+ function fn(t) {
2361
2363
  return !!t && t.nodeType != null;
2362
2364
  }
2363
- function xt(t) {
2365
+ function Et(t) {
2364
2366
  return t.namespaceURI === "http://www.w3.org/2000/svg";
2365
2367
  }
2366
2368
  function ee(t) {
@@ -2369,13 +2371,13 @@ function ee(t) {
2369
2371
  function dr(t) {
2370
2372
  return t.nodeType === Node.COMMENT_NODE;
2371
2373
  }
2372
- function Et(t) {
2374
+ function Ct(t) {
2373
2375
  return t.nodeType === Node.TEXT_NODE;
2374
2376
  }
2375
- function We(t) {
2377
+ function qe(t) {
2376
2378
  return t.nodeType === Node.DOCUMENT_NODE;
2377
2379
  }
2378
- function Je(t) {
2380
+ function Ye(t) {
2379
2381
  return t.nodeType === Node.DOCUMENT_NODE || t.nodeType === Node.DOCUMENT_FRAGMENT_NODE;
2380
2382
  }
2381
2383
  function B(t, e) {
@@ -2445,7 +2447,7 @@ class fr {
2445
2447
  this.intervals.forEach((e) => clearInterval(e)), this.snapshots = {};
2446
2448
  }
2447
2449
  }
2448
- const ms = {
2450
+ const ys = {
2449
2451
  low: 0.35,
2450
2452
  medium: 0.55,
2451
2453
  high: 0.8
@@ -2458,9 +2460,9 @@ function pr(t, e = "medium", s, n = !1, i, r) {
2458
2460
  const a = s.getContext("2d");
2459
2461
  if (!a)
2460
2462
  return "";
2461
- a.clearRect(0, 0, s.width, s.height), a.drawImage(t, 0, 0, s.width, s.height), s.toBlob(r, o, ms[e]);
2463
+ a.clearRect(0, 0, s.width, s.height), a.drawImage(t, 0, 0, s.width, s.height), s.toBlob(r, o, ys[e]);
2462
2464
  } else
2463
- t.toBlob(r, o, ms[e]);
2465
+ t.toBlob(r, o, ys[e]);
2464
2466
  }
2465
2467
  function gr(t, e) {
2466
2468
  const s = URL.createObjectURL(t), n = document.createElement("a");
@@ -2504,7 +2506,7 @@ class br {
2504
2506
  const r = this.getID(e);
2505
2507
  if (r === void 0)
2506
2508
  return;
2507
- rn(e, s, n, i);
2509
+ an(e, s, n, i);
2508
2510
  let o = this.elementListeners.get(r);
2509
2511
  o === void 0 && (o = [], this.elementListeners.set(r, o)), o.push([s, n, i]);
2510
2512
  }
@@ -2518,7 +2520,7 @@ class br {
2518
2520
  if (s !== void 0) {
2519
2521
  e[this.node_id] = void 0, delete e[this.node_id], delete this.nodes[s];
2520
2522
  const n = this.elementListeners.get(s);
2521
- n !== void 0 && (this.elementListeners.delete(s), n.forEach((i) => on(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
2523
+ n !== void 0 && (this.elementListeners.delete(s), n.forEach((i) => cn(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
2522
2524
  }
2523
2525
  return s;
2524
2526
  }
@@ -2549,10 +2551,10 @@ class br {
2549
2551
  this.nextNodeId = 0, this.nodes.length = 0;
2550
2552
  }
2551
2553
  }
2552
- function Ct(t) {
2554
+ function Nt(t) {
2553
2555
  if (dr(t))
2554
2556
  return !0;
2555
- if (Et(t))
2557
+ if (Ct(t))
2556
2558
  return !1;
2557
2559
  if (!ee(t))
2558
2560
  return !0;
@@ -2563,30 +2565,30 @@ function Ct(t) {
2563
2565
  }
2564
2566
  return e === "SCRIPT" || e === "NOSCRIPT" || e === "META" || e === "TITLE" || e === "BASE";
2565
2567
  }
2566
- function ot(t) {
2567
- return Je(t) ? !0 : !Ct(t);
2568
+ function at(t) {
2569
+ return Ye(t) ? !0 : !Nt(t);
2568
2570
  }
2569
- var J;
2571
+ var Y;
2570
2572
  (function(t) {
2571
2573
  t[t.New = 0] = "New", t[t.Removed = 1] = "Removed", t[t.Changed = 2] = "Changed";
2572
- })(J || (J = {}));
2573
- class Bt {
2574
+ })(Y || (Y = {}));
2575
+ class Ut {
2574
2576
  constructor(e, s = !1) {
2575
- this.app = e, this.isTopContext = s, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = nn(this.app.safe((n) => {
2577
+ this.app = e, this.isTopContext = s, this.commited = [], this.recents = /* @__PURE__ */ new Map(), this.indexes = [], this.attributesMap = /* @__PURE__ */ new Map(), this.textSet = /* @__PURE__ */ new Set(), this.observer = on(this.app.safe((n) => {
2576
2578
  for (const i of n) {
2577
2579
  const r = i.target, o = i.type;
2578
- if (!ot(r))
2580
+ if (!at(r))
2579
2581
  continue;
2580
2582
  if (o === "childList") {
2581
2583
  for (let a = 0; a < i.removedNodes.length; a++)
2582
- ot(i.removedNodes[a]) && this.bindNode(i.removedNodes[a]);
2584
+ at(i.removedNodes[a]) && this.bindNode(i.removedNodes[a]);
2583
2585
  for (let a = 0; a < i.addedNodes.length; a++)
2584
2586
  this.bindTree(i.addedNodes[a]);
2585
2587
  continue;
2586
2588
  }
2587
2589
  const l = this.app.nodes.getID(r);
2588
2590
  if (l !== void 0) {
2589
- if (this.recents.has(l) || this.recents.set(l, J.Changed), o === "attributes") {
2591
+ if (this.recents.has(l) || this.recents.set(l, Y.Changed), o === "attributes") {
2590
2592
  const a = i.attributeName;
2591
2593
  if (a === null)
2592
2594
  continue;
@@ -2607,17 +2609,17 @@ class Bt {
2607
2609
  this.commited.length = 0, this.recents.clear(), this.indexes.length = 1, this.attributesMap.clear(), this.textSet.clear();
2608
2610
  }
2609
2611
  sendNodeAttribute(e, s, n, i) {
2610
- if (xt(s)) {
2611
- n.substr(0, 6) === "xlink:" && (n = n.substr(6)), i === null ? this.app.send(es(e, n)) : n === "href" ? (i.length > 1e5 && (i = ""), this.app.send(yt(e, n, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, n, i);
2612
+ if (Et(s)) {
2613
+ n.substr(0, 6) === "xlink:" && (n = n.substr(6)), i === null ? this.app.send(ss(e, n)) : n === "href" ? (i.length > 1e5 && (i = ""), this.app.send(St(e, n, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, n, i);
2612
2614
  return;
2613
2615
  }
2614
2616
  if (!(n === "src" || n === "srcset" || n === "integrity" || n === "crossorigin" || n === "autocomplete" || n.substr(0, 2) === "on") && !(n === "value" && B(s, "input") && s.type !== "button" && s.type !== "reset" && s.type !== "submit")) {
2615
2617
  if (i === null) {
2616
- this.app.send(es(e, n));
2618
+ this.app.send(ss(e, n));
2617
2619
  return;
2618
2620
  }
2619
2621
  if (n === "style" || n === "href" && B(s, "link")) {
2620
- this.app.send(yt(e, n, i, this.app.getBaseHref()));
2622
+ this.app.send(St(e, n, i, this.app.getBaseHref()));
2621
2623
  return;
2622
2624
  }
2623
2625
  (n === "href" || i.length > 1e5) && (i = ""), this.app.attributeSender.sendSetAttribute(e, n, i);
@@ -2632,17 +2634,17 @@ class Bt {
2632
2634
  }
2633
2635
  bindNode(e) {
2634
2636
  const [s, n] = this.app.nodes.registerNode(e);
2635
- n ? this.recents.set(s, J.New) : this.recents.get(s) !== J.New && this.recents.set(s, J.Removed);
2637
+ n ? this.recents.set(s, Y.New) : this.recents.get(s) !== Y.New && this.recents.set(s, Y.Removed);
2636
2638
  }
2637
2639
  bindTree(e) {
2638
- if (!ot(e))
2640
+ if (!at(e))
2639
2641
  return;
2640
2642
  this.bindNode(e);
2641
2643
  const s = document.createTreeWalker(
2642
2644
  e,
2643
2645
  NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_TEXT,
2644
2646
  {
2645
- acceptNode: (n) => (this.app.nodes.getID(n) !== void 0 && this.app.debug.error("! Node is already bound", n), Ct(n) || this.app.nodes.getID(n) !== void 0 ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT)
2647
+ acceptNode: (n) => (this.app.nodes.getID(n) !== void 0 && this.app.debug.error("! Node is already bound", n), Nt(n) || this.app.nodes.getID(n) !== void 0 ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT)
2646
2648
  },
2647
2649
  // @ts-ignore
2648
2650
  !1
@@ -2652,13 +2654,13 @@ class Bt {
2652
2654
  }
2653
2655
  unbindTree(e) {
2654
2656
  const s = this.app.nodes.unregisterNode(e);
2655
- if (s !== void 0 && this.recents.get(s) === J.Removed) {
2657
+ if (s !== void 0 && this.recents.get(s) === Y.Removed) {
2656
2658
  this.app.send(gi(s));
2657
2659
  const n = document.createTreeWalker(
2658
2660
  e,
2659
2661
  NodeFilter.SHOW_ELEMENT + NodeFilter.SHOW_TEXT,
2660
2662
  {
2661
- acceptNode: (l) => Ct(l) || this.app.nodes.getID(l) === void 0 ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2663
+ acceptNode: (l) => Nt(l) || this.app.nodes.getID(l) === void 0 ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
2662
2664
  },
2663
2665
  // @ts-ignore
2664
2666
  !1
@@ -2673,7 +2675,7 @@ class Bt {
2673
2675
  }
2674
2676
  // A top-consumption function on the infinite lists test. (~1% of performance resources)
2675
2677
  _commitNode(e, s) {
2676
- if (Je(s))
2678
+ if (Ye(s))
2677
2679
  return !0;
2678
2680
  const n = s.parentNode;
2679
2681
  let i;
@@ -2697,7 +2699,7 @@ class Bt {
2697
2699
  r = r.previousSibling;
2698
2700
  }
2699
2701
  r === null && (this.indexes[e] = 0);
2700
- const o = this.recents.get(e), l = o === J.New, a = this.indexes[e];
2702
+ const o = this.recents.get(e), l = o === Y.New, a = this.indexes[e];
2701
2703
  if (a === void 0)
2702
2704
  throw "commitNode: missing node index";
2703
2705
  if (l) {
@@ -2708,17 +2710,17 @@ class Bt {
2708
2710
  const u = c.clientWidth, d = c.clientHeight;
2709
2711
  c = s.cloneNode(), c.style.width = `${u}px`, c.style.height = `${d}px`;
2710
2712
  }
2711
- this.app.send(di(e, i, a, c.tagName, xt(s)));
2713
+ this.app.send(di(e, i, a, c.tagName, Et(s)));
2712
2714
  }
2713
2715
  for (let u = 0; u < c.attributes.length; u++) {
2714
2716
  const d = c.attributes[u];
2715
2717
  this.sendNodeAttribute(e, c, d.nodeName, d.value);
2716
2718
  }
2717
2719
  } else
2718
- Et(s) && (this.app.send(fi(e, i, a)), this.sendNodeData(e, n, s.data));
2720
+ Ct(s) && (this.app.send(fi(e, i, a)), this.sendNodeData(e, n, s.data));
2719
2721
  return !0;
2720
2722
  }
2721
- o === J.Removed && i !== void 0 && this.app.send(pi(e, i, a));
2723
+ o === Y.Removed && i !== void 0 && this.app.send(pi(e, i, a));
2722
2724
  const h = this.attributesMap.get(e);
2723
2725
  if (h !== void 0) {
2724
2726
  if (!ee(s))
@@ -2727,7 +2729,7 @@ class Bt {
2727
2729
  this.sendNodeAttribute(e, s, c, s.getAttribute(c));
2728
2730
  }
2729
2731
  if (this.textSet.has(e)) {
2730
- if (!Et(s))
2732
+ if (!Ct(s))
2731
2733
  throw "commitNode: node is not a text";
2732
2734
  this.sendNodeData(e, n, s.data);
2733
2735
  }
@@ -2743,7 +2745,7 @@ class Bt {
2743
2745
  commitNodes(e = !1) {
2744
2746
  let s;
2745
2747
  this.recents.forEach((n, i) => {
2746
- this.commitNode(i), n === J.New && (s = this.app.nodes.getNode(i)) && this.app.nodes.callNodeCallbacks(s, e);
2748
+ this.commitNode(i), n === Y.New && (s = this.app.nodes.getNode(i)) && this.app.nodes.callNodeCallbacks(s, e);
2747
2749
  }), this.clear();
2748
2750
  }
2749
2751
  // ISSSUE (nodeToBinde should be the same as node in all cases. Look at the comment about 0-node at the beginning of the file.)
@@ -2762,7 +2764,7 @@ class Bt {
2762
2764
  this.observer.disconnect(), this.clear();
2763
2765
  }
2764
2766
  }
2765
- class bs extends Bt {
2767
+ class Ss extends Ut {
2766
2768
  observe(e) {
2767
2769
  const s = e.contentDocument, n = this.app.nodes.getID(e);
2768
2770
  !s || n === void 0 || this.observeRoot(s, (i) => {
@@ -2770,7 +2772,7 @@ class bs extends Bt {
2770
2772
  this.app.debug.log("OpenReplay: Iframe document not bound");
2771
2773
  return;
2772
2774
  }
2773
- this.app.send(St(n, i));
2775
+ this.app.send(wt(n, i));
2774
2776
  });
2775
2777
  }
2776
2778
  syntheticObserve(e, s) {
@@ -2779,11 +2781,11 @@ class bs extends Bt {
2779
2781
  this.app.debug.log("OpenReplay: Iframe document not bound");
2780
2782
  return;
2781
2783
  }
2782
- this.app.send(St(e, n));
2784
+ this.app.send(wt(e, n));
2783
2785
  });
2784
2786
  }
2785
2787
  }
2786
- class yr extends Bt {
2788
+ class yr extends Ut {
2787
2789
  observe(e) {
2788
2790
  const s = e.shadowRoot, n = this.app.nodes.getID(e);
2789
2791
  !s || n === void 0 || this.observeRoot(s, (i) => {
@@ -2791,7 +2793,7 @@ class yr extends Bt {
2791
2793
  this.app.debug.error("OpenReplay: Shadow Root was not bound");
2792
2794
  return;
2793
2795
  }
2794
- this.app.send(St(n, i));
2796
+ this.app.send(wt(n, i));
2795
2797
  });
2796
2798
  }
2797
2799
  }
@@ -2834,8 +2836,8 @@ class Sr {
2834
2836
  this.states.forEach((e) => e.clear()), this.states.clear();
2835
2837
  }
2836
2838
  }
2837
- const at = Z ? Element.prototype.attachShadow : () => new ShadowRoot();
2838
- class wr extends Bt {
2839
+ const ct = Z ? Element.prototype.attachShadow : () => new ShadowRoot();
2840
+ class wr extends Ut {
2839
2841
  constructor(e, s) {
2840
2842
  super(e, !0), this.iframeOffsets = new Sr(), this.contextCallbacks = [], this.contextsSet = /* @__PURE__ */ new Set(), this.iframeObservers = [], this.shadowRootObservers = [], this.options = Object.assign({
2841
2843
  captureIFrames: !0
@@ -2858,7 +2860,7 @@ class wr extends Bt {
2858
2860
  return;
2859
2861
  const r = e.contentWindow, o = e.contentDocument;
2860
2862
  if (o && o !== s) {
2861
- const l = new bs(this.app);
2863
+ const l = new Ss(this.app);
2862
2864
  this.iframeObservers.push(l), l.observe(e), s = o, this.iframeOffsets.observe(e);
2863
2865
  }
2864
2866
  r && // Sometimes currentWin.window is null (not in specification). Such window object is not functional
@@ -2873,7 +2875,7 @@ class wr extends Bt {
2873
2875
  observe() {
2874
2876
  const e = this;
2875
2877
  Element.prototype.attachShadow = function() {
2876
- const s = at.apply(this, arguments);
2878
+ const s = ct.apply(this, arguments);
2877
2879
  return e.handleShadowRoot(s), s;
2878
2880
  }, this.app.nodes.clear(), this.observeRoot(window.document, () => {
2879
2881
  this.app.send(ui()), this.app.nodes.callNodeCallbacks(document, !0);
@@ -2882,20 +2884,20 @@ class wr extends Bt {
2882
2884
  crossdomainObserve(e, s) {
2883
2885
  const n = this;
2884
2886
  Element.prototype.attachShadow = function() {
2885
- const r = at.apply(this, arguments);
2887
+ const r = ct.apply(this, arguments);
2886
2888
  return n.handleShadowRoot(r), r;
2887
2889
  }, this.app.nodes.clear(), this.app.nodes.syntheticMode(s);
2888
- const i = new bs(this.app);
2890
+ const i = new Ss(this.app);
2889
2891
  this.iframeObservers.push(i), i.syntheticObserve(e, window.document);
2890
2892
  }
2891
2893
  disconnect() {
2892
- this.iframeOffsets.clear(), Element.prototype.attachShadow = at, this.iframeObservers.forEach((e) => e.disconnect()), this.iframeObservers = [], this.shadowRootObservers.forEach((e) => e.disconnect()), this.shadowRootObservers = [], super.disconnect();
2894
+ this.iframeOffsets.clear(), Element.prototype.attachShadow = ct, this.iframeObservers.forEach((e) => e.disconnect()), this.iframeObservers = [], this.shadowRootObservers.forEach((e) => e.disconnect()), this.shadowRootObservers = [], super.disconnect();
2893
2895
  }
2894
2896
  }
2895
- var qe;
2897
+ var $e;
2896
2898
  (function(t) {
2897
2899
  t[t.Plain = 0] = "Plain", t[t.Obscured = 1] = "Obscured", t[t.Hidden = 2] = "Hidden";
2898
- })(qe || (qe = {}));
2900
+ })($e || ($e = {}));
2899
2901
  const vr = (t) => t.trim().replace(/[^\f\n\r\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g, "█");
2900
2902
  class kr {
2901
2903
  constructor(e, s) {
@@ -2907,13 +2909,13 @@ class kr {
2907
2909
  handleNode(e, s, n) {
2908
2910
  if ((this.obscured.has(s) || ee(n) && (ae(n, "masked") || ae(n, "obscured"))) && this.obscured.add(e), (this.hidden.has(s) || ee(n) && (ae(n, "htmlmasked") || ae(n, "hidden"))) && this.hidden.add(e), this.options.domSanitizer !== void 0 && ee(n)) {
2909
2911
  const i = this.options.domSanitizer(n);
2910
- i === qe.Obscured && this.obscured.add(e), i === qe.Hidden && this.hidden.add(e);
2912
+ i === $e.Obscured && this.obscured.add(e), i === $e.Hidden && this.hidden.add(e);
2911
2913
  }
2912
2914
  }
2913
2915
  sanitize(e, s) {
2914
2916
  return this.obscured.has(e) ? vr(s) : (this.options.obscureTextNumbers && (s = s.replace(/\d/g, "0")), this.options.obscureTextEmails && (s = s.replace(/^\w+([+.-]\w+)*@\w+([.-]\w+)*\.\w{2,3}$/g, (n) => {
2915
2917
  const [i, r] = n.split("@"), [o, l] = r.split(".");
2916
- return `${nt(i)}@${nt(o)}.${nt(l)}`;
2918
+ return `${it(i)}@${it(o)}.${it(l)}`;
2917
2919
  })), s);
2918
2920
  }
2919
2921
  isObscured(e) {
@@ -3029,13 +3031,13 @@ class xr {
3029
3031
  this.timer !== null && (clearInterval(this.timer), this.timer = null);
3030
3032
  }
3031
3033
  }
3032
- const ve = "canceled", ys = "or_uxt_active", ct = "or_buffer_1", se = (t) => ({ reason: t, success: !1 }), Er = (t) => ({ ...t, success: !0 });
3034
+ const ve = "canceled", ws = "or_uxt_active", lt = "or_buffer_1", se = (t) => ({ reason: t, success: !1 }), Er = (t) => ({ ...t, success: !0 });
3033
3035
  var F;
3034
3036
  (function(t) {
3035
3037
  t[t.NotActive = 0] = "NotActive", t[t.Starting = 1] = "Starting", t[t.Active = 2] = "Active", t[t.ColdStart = 3] = "ColdStart";
3036
3038
  })(F || (F = {}));
3037
- const dn = "https://api.openreplay.com/ingest";
3038
- function lt() {
3039
+ const pn = "https://api.openreplay.com/ingest";
3040
+ function ht() {
3039
3041
  const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", s = Math.floor(Math.abs(t) / 60), n = Math.abs(t) % 60;
3040
3042
  return `UTC${e}${String(s).padStart(2, "0")}:${String(n).padStart(2, "0")}`;
3041
3043
  }
@@ -3083,7 +3085,7 @@ class Nr {
3083
3085
  session_reset_key: "__openreplay_reset",
3084
3086
  session_tabid_key: "__openreplay_tabid",
3085
3087
  local_uuid_key: "__openreplay_uuid",
3086
- ingestPoint: dn,
3088
+ ingestPoint: pn,
3087
3089
  resourceBaseHref: null,
3088
3090
  __is_snippet: !1,
3089
3091
  __debug_report_edp: null,
@@ -3109,14 +3111,14 @@ class Nr {
3109
3111
  useAnimationFrame: !1
3110
3112
  }
3111
3113
  };
3112
- if (this.options = an(o, n), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
3114
+ if (this.options = ln(o, n), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
3113
3115
  const a = location.hostname.split(".").slice(-2).join("_");
3114
3116
  this.bc = new BroadcastChannel(`rick_${a}`);
3115
3117
  }
3116
3118
  this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new kr(this, n), this.nodes = new br(this.options.node_id), this.observer = new wr(this, n), this.ticker = new xr(this), this.ticker.attach(() => this.commit()), this.debug = new mr(this.options.__debug__), this.session = new Tr(this, this.options), this.attributeSender = new Yn(this, !!this.options.disableStringDict), this.featureFlags = new ei(this), this.tagWatcher = new Wi(this.sessionStorage, this.debug.error, (a) => {
3117
3119
  this.send(Hi(a));
3118
3120
  }), this.session.attachUpdateCallback(({ userID: a, metadata: h }) => {
3119
- a != null && this.send(xi(a)), h != null && Object.entries(h).forEach(([c, u]) => this.send(ts(c, u)));
3121
+ a != null && this.send(xi(a)), h != null && Object.entries(h).forEach(([c, u]) => this.send(ns(c, u)));
3120
3122
  }), s != null && this.session.applySessionHash(s), this.initWorker();
3121
3123
  const l = this.session.getTabId();
3122
3124
  if (this.insideIframe) {
@@ -3179,7 +3181,7 @@ class Nr {
3179
3181
  let p = g;
3180
3182
  return this.pageFrames.forEach((y) => {
3181
3183
  if (y.dataset.domain === c.data.domain) {
3182
- const [E, N, T, m, w, k, x] = g, { left: S, top: b, width: _, height: M } = y.getBoundingClientRect(), O = document.documentElement.scrollWidth, D = document.documentElement.scrollHeight, v = k / 100 * _ + S, I = x / 100 * M + b, A = v / O, P = I / D;
3184
+ const [E, N, T, m, w, k, x] = g, { left: S, top: b, width: _, height: M } = y.getBoundingClientRect(), O = document.documentElement.scrollWidth, D = document.documentElement.scrollHeight, v = k / 100 * _ + S, I = x / 100 * M + b, A = v / O, L = I / D;
3183
3185
  p = [
3184
3186
  E,
3185
3187
  N,
@@ -3187,7 +3189,7 @@ class Nr {
3187
3189
  m,
3188
3190
  w,
3189
3191
  Math.round(A * 1e3) / 10,
3190
- Math.round(P * 1e3) / 10
3192
+ Math.round(L * 1e3) / 10
3191
3193
  ];
3192
3194
  }
3193
3195
  }), p;
@@ -3334,7 +3336,7 @@ class Nr {
3334
3336
  (s = this.worker) == null || s.postMessage(e), this.commitCallbacks.forEach((n) => n(e)), e.length = 0;
3335
3337
  }
3336
3338
  timestamp() {
3337
- return V() + this.delay;
3339
+ return X() + this.delay;
3338
3340
  }
3339
3341
  safe(e) {
3340
3342
  const s = this;
@@ -3358,7 +3360,7 @@ class Nr {
3358
3360
  // Use app.nodes.attachNodeListener for registered nodes instead
3359
3361
  attachEventListener(e, s, n, i = !0, r = !0) {
3360
3362
  i && (n = this.safe(n));
3361
- const o = () => e ? rn(e, s, n, r) : null, l = () => e ? on(e, s, n, r) : null;
3363
+ const o = () => e ? an(e, s, n, r) : null, l = () => e ? cn(e, s, n, r) : null;
3362
3364
  this.attachStartCallback(o, i), this.attachStopCallback(l, i);
3363
3365
  }
3364
3366
  // TODO: full correct semantic
@@ -3403,7 +3405,7 @@ class Nr {
3403
3405
  }
3404
3406
  const r = this.options.ingestPoint, a = (/api\.openreplay\.com/.test(r) ? "https://app.openreplay.com/ingest" : r).replace(/ingest$/, `${s}/session/${n}`);
3405
3407
  if (e != null && e.withCurrentTime) {
3406
- const h = V() - i;
3408
+ const h = X() - i;
3407
3409
  return `${a}?jumpto=${h}`;
3408
3410
  }
3409
3411
  return a;
@@ -3445,7 +3447,7 @@ class Nr {
3445
3447
  const n = 1e3, i = this.checkSessionToken(e.forceNew);
3446
3448
  s && await this.setupConditionalStart(e);
3447
3449
  const r = () => {
3448
- this.orderNumber += 1, st(), this.coldStartTs = V(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(re(this.timestamp())), this.bufferedMessages1.push(oe(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(re(this.timestamp())), this.bufferedMessages2.push(oe(this.session.getTabId()))), this.stop(!1), this.activityState = F.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3450
+ this.orderNumber += 1, nt(), this.coldStartTs = X(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(re(this.timestamp())), this.bufferedMessages1.push(oe(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(re(this.timestamp())), this.bufferedMessages2.push(oe(this.session.getTabId()))), this.stop(!1), this.activityState = F.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3449
3451
  userID: e.userID,
3450
3452
  metadata: e.metadata
3451
3453
  }), i || (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(Me(this.session.getTabId()))), this.observer.observe(), this.ticker.start();
@@ -3464,14 +3466,14 @@ class Nr {
3464
3466
  },
3465
3467
  body: JSON.stringify({
3466
3468
  ...this.getTrackerInfo(),
3467
- timestamp: V(),
3469
+ timestamp: X(),
3468
3470
  doNotRecord: !0,
3469
3471
  bufferDiff: 0,
3470
3472
  userID: this.session.getInfo().userID,
3471
3473
  token: void 0,
3472
- deviceMemory: it,
3473
- jsHeapSizeLimit: rt,
3474
- timezone: lt(),
3474
+ deviceMemory: rt,
3475
+ jsHeapSizeLimit: ot,
3476
+ timezone: ht(),
3475
3477
  width: window.screen.width,
3476
3478
  height: window.screen.height
3477
3479
  })
@@ -3506,11 +3508,11 @@ class Nr {
3506
3508
  offlineRecording(e = {}, s) {
3507
3509
  this.onSessionSent = s, this.singleBuffer = !0;
3508
3510
  const n = this.checkSessionToken(e.forceNew);
3509
- st(), this.coldStartTs = V();
3510
- const i = this.localStorage.getItem(ct);
3511
+ nt(), this.coldStartTs = X();
3512
+ const i = this.localStorage.getItem(lt);
3511
3513
  if (i) {
3512
3514
  const o = JSON.parse(i);
3513
- this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(ct);
3515
+ this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(lt);
3514
3516
  }
3515
3517
  this.bufferedMessages1.push(re(this.timestamp())), this.bufferedMessages1.push(oe(this.session.getTabId())), this.activityState = F.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3516
3518
  userID: e.userID,
@@ -3531,7 +3533,7 @@ class Nr {
3531
3533
  * Keeping the size of local storage reasonable is up to the end users of this library
3532
3534
  * */
3533
3535
  saveBuffer() {
3534
- this.localStorage.setItem(ct, JSON.stringify(this.bufferedMessages1));
3536
+ this.localStorage.setItem(lt, JSON.stringify(this.bufferedMessages1));
3535
3537
  }
3536
3538
  /**
3537
3539
  * @returns buffer with stored messages for offline recording
@@ -3555,7 +3557,7 @@ class Nr {
3555
3557
  async uploadOfflineRecording() {
3556
3558
  var d, f;
3557
3559
  this.stop(!1);
3558
- const e = V();
3560
+ const e = X();
3559
3561
  (d = this.worker) == null || d.postMessage({
3560
3562
  type: "start",
3561
3563
  pageNo: this.session.incPageNo(),
@@ -3578,9 +3580,9 @@ class Nr {
3578
3580
  bufferDiff: e - this.coldStartTs,
3579
3581
  userID: this.session.getInfo().userID,
3580
3582
  token: void 0,
3581
- deviceMemory: it,
3582
- jsHeapSizeLimit: rt,
3583
- timezone: lt()
3583
+ deviceMemory: rt,
3584
+ jsHeapSizeLimit: ot,
3585
+ timezone: ht()
3584
3586
  })
3585
3587
  }), { token: n, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: a, userState: h, beaconSizeLimit: c, projectID: u } = await s.json();
3586
3588
  for ((f = this.worker) == null || f.postMessage({
@@ -3606,12 +3608,12 @@ class Nr {
3606
3608
  }
3607
3609
  if (this.activityState === F.Active || this.activityState === F.Starting)
3608
3610
  return Promise.resolve(se("OpenReplay: trying to call `start()` on the instance that has been started already."));
3609
- this.activityState = F.Starting, i || st(), e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3611
+ this.activityState = F.Starting, i || nt(), e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
3610
3612
  // MBTODO: maybe it would make sense to `forceNew` if the `userID` was changed
3611
3613
  userID: e.userID,
3612
3614
  metadata: e.metadata
3613
3615
  });
3614
- const r = V();
3616
+ const r = X();
3615
3617
  this.worker.postMessage({
3616
3618
  type: "start",
3617
3619
  pageNo: this.session.incPageNo(),
@@ -3637,9 +3639,9 @@ class Nr {
3637
3639
  bufferDiff: r - this.coldStartTs,
3638
3640
  userID: this.session.getInfo().userID,
3639
3641
  token: l ? void 0 : o,
3640
- deviceMemory: it,
3641
- jsHeapSizeLimit: rt,
3642
- timezone: lt(),
3642
+ deviceMemory: rt,
3643
+ jsHeapSizeLimit: ot,
3644
+ timezone: ht(),
3643
3645
  condition: n,
3644
3646
  assistOnly: e.assistOnly ?? this.socketMode,
3645
3647
  width: window.screen.width,
@@ -3697,7 +3699,7 @@ class Nr {
3697
3699
  type: "auth",
3698
3700
  token: h,
3699
3701
  beaconSizeLimit: d
3700
- }), !l && h === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(Me(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([v, I]) => this.send(ts(v, I))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = f;
3702
+ }), !l && h === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(Me(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([v, I]) => this.send(ns(v, I))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = f;
3701
3703
  const M = { sessionToken: h, userUUID: c, sessionID: p };
3702
3704
  if (this.startCallbacks.forEach((v) => v(M)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, h), this.activityState = F.Active, x && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new fr(this, {
3703
3705
  fps: b,
@@ -3712,9 +3714,9 @@ class Nr {
3712
3714
  this.clearBuffers(), this.commit();
3713
3715
  } else
3714
3716
  this.insideIframe && this.rootId ? this.observer.crossdomainObserve(this.rootId, this.frameOderNumber) : this.observer.observe(), this.ticker.start();
3715
- this.uxtManager = this.uxtManager ? this.uxtManager : new ur(this, ys);
3717
+ this.uxtManager = this.uxtManager ? this.uxtManager : new ur(this, ws);
3716
3718
  let O;
3717
- const D = this.localStorage.getItem(ys);
3719
+ const D = this.localStorage.getItem(ws);
3718
3720
  if (D && (O = parseInt(D, 10)), location != null && location.search) {
3719
3721
  const v = new URLSearchParams(location.search);
3720
3722
  if (v.has("oruxt")) {
@@ -3786,7 +3788,7 @@ class Nr {
3786
3788
  trackWs(e) {
3787
3789
  const s = e;
3788
3790
  return (n, i, r = "down") => {
3789
- typeof n != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || n.length > 255 || this.send(Li("websocket", s, i, this.timestamp(), r, n));
3791
+ typeof n != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || n.length > 255 || this.send(Pi("websocket", s, i, this.timestamp(), r, n));
3790
3792
  };
3791
3793
  }
3792
3794
  stop(e = !0) {
@@ -3806,10 +3808,10 @@ function _r(t) {
3806
3808
  const s = () => t.send(Ni(Math.round(e.downlink * 1e3), e.type || "unknown"));
3807
3809
  s(), e.addEventListener("change", s);
3808
3810
  }
3809
- const fn = Z && "InstallTrigger" in window ? (t) => t.message + `
3811
+ const gn = Z && "InstallTrigger" in window ? (t) => t.message + `
3810
3812
  ` + t.stack : (t) => t.stack || t.message;
3811
- function Nt(t) {
3812
- return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? fn(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
3813
+ function _t(t) {
3814
+ return t === void 0 ? "undefined" : t === null ? "null" : t instanceof Error ? gn(t) : Array.isArray(t) ? `Array(${t.length})` : String(t);
3813
3815
  }
3814
3816
  function Or(t) {
3815
3817
  return typeof t != "number" ? "NaN" : t.toString();
@@ -3817,15 +3819,15 @@ function Or(t) {
3817
3819
  function Rr(t) {
3818
3820
  return typeof t != "number" ? "NaN" : Math.floor(t).toString();
3819
3821
  }
3820
- function Ss(t) {
3822
+ function vs(t) {
3821
3823
  if (t === void 0)
3822
3824
  return "undefined";
3823
3825
  if (t === null)
3824
3826
  return "null";
3825
3827
  if (t instanceof Error)
3826
- return fn(t);
3828
+ return gn(t);
3827
3829
  if (Array.isArray(t)) {
3828
- const e = t.length, s = t.slice(0, 10).map(Nt).join(", ");
3830
+ const e = t.length, s = t.slice(0, 10).map(_t).join(", ");
3829
3831
  return `Array(${e})[${s}]`;
3830
3832
  }
3831
3833
  if (typeof t == "object") {
@@ -3835,7 +3837,7 @@ function Ss(t) {
3835
3837
  if (++s === 10)
3836
3838
  break;
3837
3839
  const i = t[n];
3838
- e.push(n + ": " + Nt(i));
3840
+ e.push(n + ": " + _t(i));
3839
3841
  }
3840
3842
  return "{" + e.join(", ") + "}";
3841
3843
  }
@@ -3848,9 +3850,9 @@ function Dr(t) {
3848
3850
  return e;
3849
3851
  switch (s) {
3850
3852
  case "o":
3851
- return Ss(n);
3853
+ return vs(n);
3852
3854
  case "s":
3853
- return Nt(n);
3855
+ return _t(n);
3854
3856
  case "f":
3855
3857
  return Or(n);
3856
3858
  case "d":
@@ -3859,12 +3861,12 @@ function Dr(t) {
3859
3861
  default:
3860
3862
  return e;
3861
3863
  }
3862
- })), t.map(Ss).join(" ");
3864
+ })), t.map(vs).join(" ");
3863
3865
  }
3864
- const ws = ["log", "info", "warn", "error", "debug", "assert"];
3866
+ const ks = ["log", "info", "warn", "error", "debug", "assert"];
3865
3867
  function Mr(t, e) {
3866
3868
  const s = Object.assign({
3867
- consoleMethods: ws,
3869
+ consoleMethods: ks,
3868
3870
  consoleThrottling: 30
3869
3871
  }, e);
3870
3872
  if (!Array.isArray(s.consoleMethods) || s.consoleMethods.length === 0)
@@ -3882,7 +3884,7 @@ function Mr(t, e) {
3882
3884
  }
3883
3885
  };
3884
3886
  s.consoleMethods.forEach((u) => {
3885
- if (ws.indexOf(u) === -1) {
3887
+ if (ks.indexOf(u) === -1) {
3886
3888
  t.debug.error(`OpenReplay: unsupported console method "${u}"`);
3887
3889
  return;
3888
3890
  }
@@ -3892,16 +3894,16 @@ function Mr(t, e) {
3892
3894
  }, l = t.safe((a) => o(a.console, a));
3893
3895
  l(window), t.observer.attachContextCallback(l);
3894
3896
  }
3895
- var pn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3897
+ var mn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3896
3898
  function Ar(t) {
3897
3899
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3898
3900
  }
3899
- var gn = { exports: {} }, ht = { exports: {} }, vs;
3900
- function Lr() {
3901
- return vs || (vs = 1, function(t, e) {
3901
+ var bn = { exports: {} }, ut = { exports: {} }, Ts;
3902
+ function Pr() {
3903
+ return Ts || (Ts = 1, function(t, e) {
3902
3904
  (function(s, n) {
3903
3905
  t.exports = n();
3904
- })(pn, function() {
3906
+ })(mn, function() {
3905
3907
  function s(p) {
3906
3908
  return !isNaN(parseFloat(p)) && isFinite(p);
3907
3909
  }
@@ -3977,12 +3979,12 @@ function Lr() {
3977
3979
  }(l[g]);
3978
3980
  return u;
3979
3981
  });
3980
- }(ht)), ht.exports;
3982
+ }(ut)), ut.exports;
3981
3983
  }
3982
3984
  (function(t, e) {
3983
3985
  (function(s, n) {
3984
- t.exports = n(Lr());
3985
- })(pn, function(n) {
3986
+ t.exports = n(Pr());
3987
+ })(mn, function(n) {
3986
3988
  var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
3987
3989
  return {
3988
3990
  /**
@@ -4101,10 +4103,10 @@ function Lr() {
4101
4103
  }
4102
4104
  };
4103
4105
  });
4104
- })(gn);
4105
- var Pr = gn.exports;
4106
- const Fr = /* @__PURE__ */ Ar(Pr);
4107
- function ks(t) {
4106
+ })(bn);
4107
+ var Lr = bn.exports;
4108
+ const Fr = /* @__PURE__ */ Ar(Lr);
4109
+ function Is(t) {
4108
4110
  return [
4109
4111
  {
4110
4112
  columnNumber: t.colno,
@@ -4115,25 +4117,25 @@ function ks(t) {
4115
4117
  }
4116
4118
  ];
4117
4119
  }
4118
- function $e(t, e, s = {}) {
4120
+ function Ve(t, e, s = {}) {
4119
4121
  let n = e;
4120
4122
  try {
4121
4123
  n = Fr.parse(t);
4122
4124
  } catch {
4123
4125
  }
4124
- return vt(t.name, t.message, JSON.stringify(n), JSON.stringify(s));
4126
+ return kt(t.name, t.message, JSON.stringify(n), JSON.stringify(s));
4125
4127
  }
4126
- function mn(t, e = window, s = {}) {
4128
+ function yn(t, e = window, s = {}) {
4127
4129
  if (t instanceof ErrorEvent) {
4128
4130
  if (t.error instanceof Error)
4129
- return $e(t.error, ks(t), s);
4131
+ return Ve(t.error, Is(t), s);
4130
4132
  {
4131
4133
  let [n, i] = t.message.split(":");
4132
- return i || (n = "Error", i = t.message), vt(n, i, JSON.stringify(ks(t)), JSON.stringify(s));
4134
+ return i || (n = "Error", i = t.message), kt(n, i, JSON.stringify(Is(t)), JSON.stringify(s));
4133
4135
  }
4134
4136
  } else if ("PromiseRejectionEvent" in e && t instanceof e.PromiseRejectionEvent) {
4135
4137
  if (t.reason instanceof Error)
4136
- return $e(t.reason, [], s);
4138
+ return Ve(t.reason, [], s);
4137
4139
  {
4138
4140
  let n;
4139
4141
  try {
@@ -4141,7 +4143,7 @@ function mn(t, e = window, s = {}) {
4141
4143
  } catch {
4142
4144
  n = String(t.reason);
4143
4145
  }
4144
- return vt("Unhandled Promise Rejection", n, "[]", JSON.stringify(s));
4146
+ return kt("Unhandled Promise Rejection", n, "[]", JSON.stringify(s));
4145
4147
  }
4146
4148
  }
4147
4149
  return null;
@@ -4152,14 +4154,14 @@ function Br(t, e) {
4152
4154
  }, e);
4153
4155
  function n(i) {
4154
4156
  function r(o) {
4155
- const l = mn(o, i);
4157
+ const l = yn(o, i);
4156
4158
  l != null && t.send(l);
4157
4159
  }
4158
4160
  t.attachEventListener(i, "unhandledrejection", r), t.attachEventListener(i, "error", r);
4159
4161
  }
4160
4162
  s.captureExceptions && (t.observer.attachContextCallback(n), n(window));
4161
4163
  }
4162
- function Ts(t, e = document.location) {
4164
+ function xs(t, e = document.location) {
4163
4165
  return t = t.trim(), t.startsWith("//") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:") ? t : t.startsWith("/") ? e.origin + t : e.origin + e.pathname + t;
4164
4166
  }
4165
4167
  function Ur(t) {
@@ -4176,17 +4178,17 @@ function jr(t) {
4176
4178
  const { srcset: h } = a;
4177
4179
  if (!h)
4178
4180
  return;
4179
- const c = h.split(h.match(/,\s+/) ? /,\s+/ : ",").map((u) => Ts(u)).join(", ");
4181
+ const c = h.split(h.match(/,\s+/) ? /,\s+/ : ",").map((u) => xs(u)).join(", ");
4180
4182
  t.attributeSender.sendSetAttribute(l, "srcset", c);
4181
4183
  }, n = function(l, a) {
4182
- a.src.length > si && e(l, a), t.send(yt(l, "src", a.src, t.getBaseHref()));
4184
+ a.src.length > si && e(l, a), t.send(St(l, "src", a.src, t.getBaseHref()));
4183
4185
  }, i = t.safe(function(l) {
4184
- const a = Ts(l.src || "");
4185
- sn(a) && t.send(ln(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
4186
+ const a = xs(l.src || "");
4187
+ rn(a) && t.send(un(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
4186
4188
  }), r = t.safe(function(l) {
4187
4189
  const a = t.nodes.getID(l);
4188
4190
  a !== void 0 && l.complete && (l.naturalHeight === 0 && l.naturalWidth === 0 && !Ur(l.src) ? i(l) : t.sanitizer.isHidden(a) || t.sanitizer.isObscured(a) ? e(a, l) : (n(a, l), s(a, l)));
4189
- }), o = nn(t.safe((l) => {
4191
+ }), o = on(t.safe((l) => {
4190
4192
  for (const a of l)
4191
4193
  if (a.type === "attributes") {
4192
4194
  const h = a.target, c = t.nodes.getID(h);
@@ -4241,13 +4243,13 @@ const $r = Z && "labels" in HTMLInputElement.prototype ? (t) => {
4241
4243
  return n[0];
4242
4244
  }
4243
4245
  };
4244
- function bn(t) {
4245
- let e = Pt(t);
4246
+ function Sn(t) {
4247
+ let e = Ft(t);
4246
4248
  if (e === null) {
4247
4249
  const s = $r(t);
4248
4250
  e = s && s.innerText || t.placeholder || t.name || t.id || t.className || t.type;
4249
4251
  }
4250
- return tn(e).slice(0, 100);
4252
+ return nn(e).slice(0, 100);
4251
4253
  }
4252
4254
  const de = {
4253
4255
  Plain: 0,
@@ -4303,8 +4305,8 @@ function Vr(t, e) {
4303
4305
  });
4304
4306
  }, 3);
4305
4307
  function h(c, u, d, f) {
4306
- const { value: g, mask: p } = n(c, u), y = bn(u);
4307
- t.send(Pi(c, g, p !== 0, y, d, f));
4308
+ const { value: g, mask: p } = n(c, u), y = Sn(u);
4309
+ t.send(Li(c, g, p !== 0, y, d, f));
4308
4310
  }
4309
4311
  t.nodes.attachNodeCallback(t.safe((c) => {
4310
4312
  const u = t.nodes.getID(c);
@@ -4313,11 +4315,11 @@ function Vr(t, e) {
4313
4315
  l(u, c);
4314
4316
  let d = 0, f = 0, g = 0;
4315
4317
  const p = () => {
4316
- d = V();
4318
+ d = X();
4317
4319
  }, y = () => {
4318
- f === 0 && d !== 0 && (f = V() - d);
4320
+ f === 0 && d !== 0 && (f = X() - d);
4319
4321
  }, E = () => {
4320
- d !== 0 && (g = V() - d), h(u, c, f, g), f = 0, g = 0, d = 0;
4322
+ d !== 0 && (g = X() - d), h(u, c, f, g), f = 0, g = 0, d = 0;
4321
4323
  };
4322
4324
  t.nodes.attachNodeListener(c, "focus", p), t.nodes.attachNodeListener(c, "input", y), t.nodes.attachNodeListener(c, "change", E);
4323
4325
  return;
@@ -4329,9 +4331,9 @@ function Vr(t, e) {
4329
4331
  }
4330
4332
  }));
4331
4333
  }
4332
- let q, Ut, yn;
4334
+ let $, Ht, wn;
4333
4335
  function Xr(t, e) {
4334
- if (yn = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
4336
+ if (wn = /* @__PURE__ */ new Date(), t.nodeType !== Node.ELEMENT_NODE)
4335
4337
  throw new Error("Can't generate CSS selector for non-element node type.");
4336
4338
  if (t.tagName.toLowerCase() === "html")
4337
4339
  return "html";
@@ -4347,11 +4349,11 @@ function Xr(t, e) {
4347
4349
  maxNumberOfTries: 1e4,
4348
4350
  timeoutMs: void 0
4349
4351
  };
4350
- q = { ...s, ...e }, Ut = Gr(q.root, s);
4352
+ $ = { ...s, ...e }, Ht = Gr($.root, s);
4351
4353
  let n = Ce(t, "all", () => Ce(t, "two", () => Ce(t, "one", () => Ce(t, "none"))));
4352
4354
  if (n) {
4353
- const i = vn(kn(n, t));
4354
- return i.length > 0 && (n = i[0]), Ye(n);
4355
+ const i = Tn(In(n, t));
4356
+ return i.length > 0 && (n = i[0]), Qe(n);
4355
4357
  } else
4356
4358
  throw new Error("Selector was not found.");
4357
4359
  }
@@ -4361,38 +4363,38 @@ function Gr(t, e) {
4361
4363
  function Ce(t, e, s) {
4362
4364
  let n = null, i = [], r = t, o = 0;
4363
4365
  for (; r; ) {
4364
- const l = (/* @__PURE__ */ new Date()).getTime() - yn.getTime();
4365
- if (q.timeoutMs !== void 0 && l > q.timeoutMs)
4366
+ const l = (/* @__PURE__ */ new Date()).getTime() - wn.getTime();
4367
+ if ($.timeoutMs !== void 0 && l > $.timeoutMs)
4366
4368
  throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
4367
- let a = _e(Kr(r)) || _e(...Jr(r)) || _e(...Yr(r)) || _e(Qr(r)) || [Es()];
4369
+ let a = _e(Kr(r)) || _e(...Jr(r)) || _e(...Yr(r)) || _e(Qr(r)) || [Ns()];
4368
4370
  const h = Zr(r);
4369
4371
  if (e == "all")
4370
- h && (a = a.concat(a.filter(ut).map((c) => Ne(c, h))));
4372
+ h && (a = a.concat(a.filter(dt).map((c) => Ne(c, h))));
4371
4373
  else if (e == "two")
4372
- a = a.slice(0, 1), h && (a = a.concat(a.filter(ut).map((c) => Ne(c, h))));
4374
+ a = a.slice(0, 1), h && (a = a.concat(a.filter(dt).map((c) => Ne(c, h))));
4373
4375
  else if (e == "one") {
4374
4376
  const [c] = a = a.slice(0, 1);
4375
- h && ut(c) && (a = [Ne(c, h)]);
4377
+ h && dt(c) && (a = [Ne(c, h)]);
4376
4378
  } else
4377
- e == "none" && (a = [Es()], h && (a = [Ne(a[0], h)]));
4379
+ e == "none" && (a = [Ns()], h && (a = [Ne(a[0], h)]));
4378
4380
  for (let c of a)
4379
4381
  c.level = o;
4380
- if (i.push(a), i.length >= q.seedMinLength && (n = Is(i, s), n))
4382
+ if (i.push(a), i.length >= $.seedMinLength && (n = Es(i, s), n))
4381
4383
  break;
4382
4384
  r = r.parentElement, o++;
4383
4385
  }
4384
- return n || (n = Is(i, s)), !n && s ? s() : n;
4386
+ return n || (n = Es(i, s)), !n && s ? s() : n;
4385
4387
  }
4386
- function Is(t, e) {
4387
- const s = vn(wn(t));
4388
- if (s.length > q.threshold)
4388
+ function Es(t, e) {
4389
+ const s = Tn(kn(t));
4390
+ if (s.length > $.threshold)
4389
4391
  return e ? e() : null;
4390
4392
  for (let n of s)
4391
- if (Sn(n))
4393
+ if (vn(n))
4392
4394
  return n;
4393
4395
  return null;
4394
4396
  }
4395
- function Ye(t) {
4397
+ function Qe(t) {
4396
4398
  let e = t[0], s = e.name;
4397
4399
  for (let n = 1; n < t.length; n++) {
4398
4400
  const i = t[n].level || 0;
@@ -4400,12 +4402,12 @@ function Ye(t) {
4400
4402
  }
4401
4403
  return s;
4402
4404
  }
4403
- function xs(t) {
4405
+ function Cs(t) {
4404
4406
  return t.map((e) => e.penalty).reduce((e, s) => e + s, 0);
4405
4407
  }
4406
- function Sn(t) {
4407
- const e = Ye(t);
4408
- switch (Ut.querySelectorAll(e).length) {
4408
+ function vn(t) {
4409
+ const e = Qe(t);
4410
+ switch (Ht.querySelectorAll(e).length) {
4409
4411
  case 0:
4410
4412
  throw new Error(`Can't select any node with this selector: ${e}`);
4411
4413
  case 1:
@@ -4416,31 +4418,31 @@ function Sn(t) {
4416
4418
  }
4417
4419
  function Kr(t) {
4418
4420
  const e = t.getAttribute("id");
4419
- return e && q.idName(e) ? {
4421
+ return e && $.idName(e) ? {
4420
4422
  name: "#" + CSS.escape(e),
4421
4423
  penalty: 0
4422
4424
  } : null;
4423
4425
  }
4424
4426
  function Jr(t) {
4425
- return Array.from(t.attributes).filter((s) => q.attr(s.name, s.value)).map((s) => ({
4427
+ return Array.from(t.attributes).filter((s) => $.attr(s.name, s.value)).map((s) => ({
4426
4428
  name: `[${CSS.escape(s.name)}="${CSS.escape(s.value)}"]`,
4427
4429
  penalty: 0.5
4428
4430
  }));
4429
4431
  }
4430
4432
  function Yr(t) {
4431
- return Array.from(t.classList).filter(q.className).map((s) => ({
4433
+ return Array.from(t.classList).filter($.className).map((s) => ({
4432
4434
  name: "." + CSS.escape(s),
4433
4435
  penalty: 1
4434
4436
  }));
4435
4437
  }
4436
4438
  function Qr(t) {
4437
4439
  const e = t.tagName.toLowerCase();
4438
- return q.tagName(e) ? {
4440
+ return $.tagName(e) ? {
4439
4441
  name: e,
4440
4442
  penalty: 2
4441
4443
  } : null;
4442
4444
  }
4443
- function Es() {
4445
+ function Ns() {
4444
4446
  return {
4445
4447
  name: "*",
4446
4448
  penalty: 3
@@ -4464,7 +4466,7 @@ function Ne(t, e) {
4464
4466
  penalty: t.penalty + 1
4465
4467
  };
4466
4468
  }
4467
- function ut(t) {
4469
+ function dt(t) {
4468
4470
  return t.name !== "html" && !t.name.startsWith("#");
4469
4471
  }
4470
4472
  function _e(...t) {
@@ -4474,35 +4476,35 @@ function _e(...t) {
4474
4476
  function eo(t) {
4475
4477
  return t != null;
4476
4478
  }
4477
- function* wn(t, e = []) {
4479
+ function* kn(t, e = []) {
4478
4480
  if (t.length > 0)
4479
4481
  for (let s of t[0])
4480
- yield* wn(t.slice(1, t.length), e.concat(s));
4482
+ yield* kn(t.slice(1, t.length), e.concat(s));
4481
4483
  else
4482
4484
  yield e;
4483
4485
  }
4484
- function vn(t) {
4485
- return [...t].sort((e, s) => xs(e) - xs(s));
4486
+ function Tn(t) {
4487
+ return [...t].sort((e, s) => Cs(e) - Cs(s));
4486
4488
  }
4487
- function* kn(t, e, s = {
4489
+ function* In(t, e, s = {
4488
4490
  counter: 0,
4489
4491
  visited: /* @__PURE__ */ new Map()
4490
4492
  }) {
4491
- if (t.length > 2 && t.length > q.optimizedMinLength)
4493
+ if (t.length > 2 && t.length > $.optimizedMinLength)
4492
4494
  for (let n = 1; n < t.length - 1; n++) {
4493
- if (s.counter > q.maxNumberOfTries)
4495
+ if (s.counter > $.maxNumberOfTries)
4494
4496
  return;
4495
4497
  s.counter += 1;
4496
4498
  const i = [...t];
4497
4499
  i.splice(n, 1);
4498
- const r = Ye(i);
4500
+ const r = Qe(i);
4499
4501
  if (s.visited.has(r))
4500
4502
  return;
4501
- Sn(i) && to(i, e) && (yield i, s.visited.set(r, !0), yield* kn(i, e, s));
4503
+ vn(i) && to(i, e) && (yield i, s.visited.set(r, !0), yield* In(i, e, s));
4502
4504
  }
4503
4505
  }
4504
4506
  function to(t, e) {
4505
- return Ut.querySelector(Ye(t)) === e;
4507
+ return Ht.querySelector(Qe(t)) === e;
4506
4508
  }
4507
4509
  function so(t, e, s) {
4508
4510
  return Xr(t, {
@@ -4513,11 +4515,11 @@ function so(t, e, s) {
4513
4515
  maxNumberOfTries: (s == null ? void 0 : s.maxOptimiseTries) || 1e4
4514
4516
  });
4515
4517
  }
4516
- function _t(t) {
4518
+ function Ot(t) {
4517
4519
  const e = t.tagName.toUpperCase();
4518
4520
  return e === "BUTTON" || e === "A" || e === "LI" || e === "SELECT" || e === "TR" || e === "TH" || t.onclick != null || t.getAttribute("role") === "button";
4519
4521
  }
4520
- function Cs(t, e) {
4522
+ function _s(t, e) {
4521
4523
  return t instanceof Element ? no(t, e) : null;
4522
4524
  }
4523
4525
  function no(t, e) {
@@ -4527,7 +4529,7 @@ function no(t, e) {
4527
4529
  return null;
4528
4530
  s = s.parentElement;
4529
4531
  }
4530
- if (xt(t)) {
4532
+ if (Et(t)) {
4531
4533
  let n = t.ownerSVGElement;
4532
4534
  for (; n !== null; )
4533
4535
  t = n, n = n.ownerSVGElement;
@@ -4536,7 +4538,7 @@ function no(t, e) {
4536
4538
  const n = s.tagName.toUpperCase();
4537
4539
  if (n === "LABEL")
4538
4540
  return null;
4539
- if (n === "INPUT" || _t(s) || Pt(s) !== null)
4541
+ if (n === "INPUT" || Ot(s) || Ft(s) !== null)
4540
4542
  return s;
4541
4543
  s = s.parentElement;
4542
4544
  }
@@ -4545,14 +4547,14 @@ function no(t, e) {
4545
4547
  function io(t, e) {
4546
4548
  const { disableClickmaps: s = !1 } = e || {};
4547
4549
  function n(m) {
4548
- const w = Pt(m);
4550
+ const w = Ft(m);
4549
4551
  if (w !== null)
4550
4552
  return w;
4551
4553
  if (B(m, "input"))
4552
- return bn(m);
4553
- if (_t(m)) {
4554
+ return Sn(m);
4555
+ if (Ot(m)) {
4554
4556
  let k = "";
4555
- return m instanceof HTMLElement && (k = t.sanitizer.getInnerTextSecure(m)), k = k || m.id || m.className, tn(k).slice(0, 100);
4557
+ return m instanceof HTMLElement && (k = t.sanitizer.getInnerTextSecure(m)), k = k || m.id || m.className, nn(k).slice(0, 100);
4556
4558
  }
4557
4559
  return "";
4558
4560
  }
@@ -4565,7 +4567,7 @@ function io(t, e) {
4565
4567
  return;
4566
4568
  }
4567
4569
  const w = (m - c) / y;
4568
- d > 4 && w > p && t.send(Fi(V())), f = 0, d = 0, c = m;
4570
+ d > 4 && w > p && t.send(Fi(X())), f = 0, d = 0, c = m;
4569
4571
  }
4570
4572
  t.attachStartCallback(() => {
4571
4573
  g = setInterval(() => E(), y);
@@ -4580,7 +4582,7 @@ function io(t, e) {
4580
4582
  }
4581
4583
  const x = w ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
4582
4584
  x(m.documentElement, "mouseover", (S) => {
4583
- const b = Cs(S.target, m);
4585
+ const b = _s(S.target, m);
4584
4586
  b !== l && (l = b, a = performance.now());
4585
4587
  }), x(m, "mousemove", (S) => {
4586
4588
  const [b, _] = t.observer.getDocumentOffset(m);
@@ -4588,22 +4590,22 @@ function io(t, e) {
4588
4590
  const M = Math.sign(S.movementX);
4589
4591
  f += Math.abs(S.movementX) + Math.abs(S.movementY), M !== u && (u = M, d++);
4590
4592
  }, !1), x(m, "click", (S) => {
4591
- const b = Cs(S.target, m);
4593
+ const b = _s(S.target, m);
4592
4594
  if (!S.clientX && !S.clientY || b === null)
4593
4595
  return;
4594
4596
  const _ = t.nodes.getID(b);
4595
4597
  if (_ !== void 0) {
4596
- const M = S.pageX, O = S.pageY, D = m.documentElement.scrollWidth, v = m.documentElement.scrollHeight, I = Ns(M / D), A = Ns(O / v);
4597
- N(), t.send(Mi(_, l === b ? Math.round(performance.now() - a) : 0, n(b), _t(b) && !s ? k(_, b, e) : "", I, A), !0);
4598
+ const M = S.pageX, O = S.pageY, D = m.documentElement.scrollWidth, v = m.documentElement.scrollHeight, I = Os(M / D), A = Os(O / v);
4599
+ N(), t.send(Mi(_, l === b ? Math.round(performance.now() - a) : 0, n(b), Ot(b) && !s ? k(_, b, e) : "", I, A), !0);
4598
4600
  }
4599
4601
  l = null;
4600
4602
  });
4601
4603
  };
4602
4604
  t.nodes.attachNodeCallback((m) => {
4603
- We(m) && T(m);
4605
+ qe(m) && T(m);
4604
4606
  }), T(document, !0), t.ticker.attach(N, (e == null ? void 0 : e.trackingOffset) || 7);
4605
4607
  }
4606
- function Ns(t) {
4608
+ function Os(t) {
4607
4609
  return Math.round(t * 1e4);
4608
4610
  }
4609
4611
  function ro(t) {
@@ -4651,7 +4653,7 @@ function ao(t, e) {
4651
4653
  let n = {};
4652
4654
  function i(h) {
4653
4655
  var u;
4654
- if (h.duration < 0 || !sn(h.name) || t.isServiceURL(h.name))
4656
+ if (h.duration < 0 || !rn(h.name) || t.isServiceURL(h.name))
4655
4657
  return;
4656
4658
  n !== null && (n[h.name] = h.startTime + h.duration);
4657
4659
  let c = !1;
@@ -4660,7 +4662,7 @@ function ao(t, e) {
4660
4662
  c = !0;
4661
4663
  return;
4662
4664
  }
4663
- }), !c && t.send(ln(
4665
+ }), !c && t.send(un(
4664
4666
  h.startTime + ye(),
4665
4667
  h.duration,
4666
4668
  h.responseStart && h.startTime ? h.responseStart - h.startTime : 0,
@@ -4728,7 +4730,7 @@ function ao(t, e) {
4728
4730
  });
4729
4731
  }
4730
4732
  }
4731
- function dt(t) {
4733
+ function ft(t) {
4732
4734
  const e = t.defaultView;
4733
4735
  return [
4734
4736
  e && e.scrollX || t.documentElement && t.documentElement.scrollLeft || t.body && t.body.scrollLeft || 0,
@@ -4739,10 +4741,10 @@ function co(t, e) {
4739
4741
  let s = !1;
4740
4742
  const n = /* @__PURE__ */ new Map();
4741
4743
  function i(l) {
4742
- un(l) && (ee(l) && n.set(l, [l.scrollLeft, l.scrollTop]), We(l) && n.set(l, dt(l)));
4744
+ fn(l) && (ee(l) && n.set(l, [l.scrollLeft, l.scrollTop]), qe(l) && n.set(l, ft(l)));
4743
4745
  }
4744
4746
  const r = t.safe(() => {
4745
- e || t.send(hi(...dt(document)));
4747
+ e || t.send(hi(...ft(document)));
4746
4748
  }), o = t.safe((l, a) => {
4747
4749
  const h = t.nodes.getID(a);
4748
4750
  h !== void 0 && t.send(bi(h, l[0], l[1]));
@@ -4750,7 +4752,7 @@ function co(t, e) {
4750
4752
  t.attachStartCallback(r), t.attachStopCallback(() => {
4751
4753
  s = !1, n.clear();
4752
4754
  }), t.nodes.attachNodeCallback((l, a) => {
4753
- a && (ee(l) && l.scrollLeft + l.scrollTop > 0 ? n.set(l, [l.scrollLeft, l.scrollTop]) : We(l) && n.set(l, dt(l))), Je(l) && t.nodes.attachNodeListener(l, "scroll", (h) => {
4755
+ a && (ee(l) && l.scrollLeft + l.scrollTop > 0 ? n.set(l, [l.scrollLeft, l.scrollTop]) : qe(l) && n.set(l, ft(l))), Ye(l) && t.nodes.attachNodeListener(l, "scroll", (h) => {
4754
4756
  i(h.target);
4755
4757
  });
4756
4758
  }), t.attachEventListener(document, "scroll", (l) => {
@@ -4777,17 +4779,17 @@ function lo(t) {
4777
4779
  e = null, i = ye(), s = n = -1, o(), l(), a();
4778
4780
  }), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
4779
4781
  }
4780
- function _s(t) {
4781
- return Je(t) && // @ts-ignore
4782
+ function Rs(t) {
4783
+ return Ye(t) && // @ts-ignore
4782
4784
  !!t.adoptedStyleSheets;
4783
4785
  }
4784
4786
  let ho = 15;
4785
- function Tn() {
4787
+ function xn() {
4786
4788
  return ho++;
4787
4789
  }
4788
4790
  const Oe = /* @__PURE__ */ new Map();
4789
4791
  function uo(t) {
4790
- if (t === null || !_s(document))
4792
+ if (t === null || !Rs(document))
4791
4793
  return;
4792
4794
  const e = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), n = (o) => setTimeout(() => {
4793
4795
  let l = t.nodes.getID(o);
@@ -4800,10 +4802,10 @@ function uo(t) {
4800
4802
  for (const u of c) {
4801
4803
  let d = e.get(u);
4802
4804
  const f = !d;
4803
- if (d || (d = Tn(), e.set(u, d)), a.includes(d) || t.send(cn(d, l)), f) {
4805
+ if (d || (d = xn(), e.set(u, d)), a.includes(d) || t.send(hn(d, l)), f) {
4804
4806
  const g = u.cssRules;
4805
4807
  for (let p = 0; p < g.length; p++)
4806
- t.send(wt(d, g[p].cssText, p, t.getBaseHref()));
4808
+ t.send(vt(d, g[p].cssText, p, t.getBaseHref()));
4807
4809
  }
4808
4810
  h.push(d);
4809
4811
  }
@@ -4830,11 +4832,11 @@ function uo(t) {
4830
4832
  o.CSSStyleSheet.prototype.replace = function(h) {
4831
4833
  return l.call(this, h).then((c) => {
4832
4834
  const u = e.get(this);
4833
- return u && t.send(is(u, h, t.getBaseHref())), c;
4835
+ return u && t.send(os(u, h, t.getBaseHref())), c;
4834
4836
  });
4835
4837
  }, o.CSSStyleSheet.prototype.replaceSync = function(h) {
4836
4838
  const c = e.get(this);
4837
- return c && t.send(is(c, h, t.getBaseHref())), a.call(this, h);
4839
+ return c && t.send(os(c, h, t.getBaseHref())), a.call(this, h);
4838
4840
  };
4839
4841
  };
4840
4842
  r(window), t.observer.attachContextCallback(t.safe(r)), t.attachStopCallback(() => {
@@ -4842,7 +4844,7 @@ function uo(t) {
4842
4844
  }), t.attachStartCallback(() => {
4843
4845
  n(document);
4844
4846
  }), t.nodes.attachNodeCallback((o) => {
4845
- _s(o) && n(o);
4847
+ Rs(o) && n(o);
4846
4848
  });
4847
4849
  }
4848
4850
  function fo(t) {
@@ -4854,7 +4856,7 @@ function fo(t) {
4854
4856
  }
4855
4857
  const e = t.safe((i, r, o) => {
4856
4858
  const l = Oe.get(i);
4857
- l && (typeof o == "string" ? t.send(wt(l, o, r, t.getBaseHref())) : t.send(rs(l, r)));
4859
+ l && (typeof o == "string" ? t.send(vt(l, o, r, t.getBaseHref())) : t.send(as(l, r)));
4858
4860
  }), s = t.safe((i) => {
4859
4861
  let r = i;
4860
4862
  for (; r.parentRule; )
@@ -4870,7 +4872,7 @@ function fo(t) {
4870
4872
  return;
4871
4873
  }
4872
4874
  const a = r.cssText, h = o.cssRules, c = Array.from(h).indexOf(r);
4873
- c >= 0 ? (t.send(wt(l, a, c, t.getBaseHref())), t.send(rs(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
4875
+ c >= 0 ? (t.send(vt(l, a, c, t.getBaseHref())), t.send(as(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
4874
4876
  }), n = t.safe((i) => {
4875
4877
  const { insertRule: r, deleteRule: o } = i.CSSStyleSheet.prototype, { insertRule: l, deleteRule: a } = i.CSSGroupingRule.prototype;
4876
4878
  i.CSSStyleSheet.prototype.insertRule = function(h, c = 0) {
@@ -4891,8 +4893,8 @@ function fo(t) {
4891
4893
  const r = t.nodes.getID(i);
4892
4894
  if (!r)
4893
4895
  return;
4894
- const o = i.sheet, l = Tn();
4895
- Oe.set(o, l), t.send(cn(l, r));
4896
+ const o = i.sheet, l = xn();
4897
+ Oe.set(o, l), t.send(hn(l, r));
4896
4898
  const a = o.cssRules;
4897
4899
  for (let h = 0; h < a.length; h++)
4898
4900
  e(o, h, a[h].cssText);
@@ -4901,15 +4903,15 @@ function fo(t) {
4901
4903
  function po(t) {
4902
4904
  function e(n) {
4903
4905
  const i = t.nodes.getID(n);
4904
- i !== void 0 && t.send(ns(i));
4906
+ i !== void 0 && t.send(rs(i));
4905
4907
  }
4906
4908
  let s = !1;
4907
4909
  t.nodes.attachNodeCallback((n) => {
4908
4910
  B(n, "body") && (t.nodes.attachNodeListener(n, "focus", (i) => {
4909
- un(i.target) && (e(i.target), s = !1);
4911
+ fn(i.target) && (e(i.target), s = !1);
4910
4912
  }), t.nodes.attachNodeListener(n, "blur", (i) => {
4911
4913
  i.relatedTarget === null && (s = !0, setTimeout(() => {
4912
- s && t.send(ns(-1));
4914
+ s && t.send(rs(-1));
4913
4915
  }, 0));
4914
4916
  }));
4915
4917
  }), t.attachStartCallback(() => {
@@ -4935,7 +4937,7 @@ function go(t) {
4935
4937
  const c = n === window ? 0 : t.nodes.getID(n.document);
4936
4938
  if (c === void 0)
4937
4939
  return;
4938
- t.active() && t.send(ss(c, ...a));
4940
+ t.active() && t.send(is(c, ...a));
4939
4941
  }
4940
4942
  super(...o);
4941
4943
  }
@@ -4943,14 +4945,14 @@ function go(t) {
4943
4945
  n.FontFace = i;
4944
4946
  };
4945
4947
  t.observer.attachContextCallback(s), s(window), t.nodes.attachNodeCallback(t.safe((n) => {
4946
- if (!We(n))
4948
+ if (!qe(n))
4947
4949
  return;
4948
4950
  const i = e.get(n);
4949
4951
  if (!i)
4950
4952
  return;
4951
4953
  const r = n.defaultView === window ? 0 : t.nodes.getID(n);
4952
4954
  r !== void 0 && i.forEach((o) => {
4953
- t.send(ss(r, ...o));
4955
+ t.send(is(r, ...o));
4954
4956
  });
4955
4957
  }));
4956
4958
  }
@@ -4985,8 +4987,8 @@ function mo(t, e, s, n, i) {
4985
4987
  t.debug.log("Openreplay: empty request/response info, skipping");
4986
4988
  return;
4987
4989
  }
4988
- const A = d.config.__openreplay_timing, P = performance.now() - A;
4989
- t.debug.log("Openreplay: final req object", I), t.send(ze("xhr", String(p), String(I.url), i(I.request), i(I.response), I.status, A + ye(), P, 0));
4990
+ const A = d.config.__openreplay_timing, L = performance.now() - A;
4991
+ t.debug.log("Openreplay: final req object", I), t.send(We("xhr", String(p), String(I.url), i(I.request), i(I.response), I.status, A + ye(), L, 0));
4990
4992
  }
4991
4993
  function o(d) {
4992
4994
  if (t.debug.log("Openreplay: capturing API request", d), d.__openreplay_timing = performance.now(), s.sessionTokenHeader) {
@@ -4999,7 +5001,7 @@ function mo(t, e, s, n, i) {
4999
5001
  return s.failuresOnly || r(d), d;
5000
5002
  }
5001
5003
  function a(d) {
5002
- return t.debug.log("Openreplay: capturing API request error", d), bo(d) && d.response ? r(d.response) : d instanceof Error && t.send($e(d, [])), Promise.reject(d);
5004
+ return t.debug.log("Openreplay: capturing API request error", d), bo(d) && d.response ? r(d.response) : d instanceof Error && t.send(Ve(d, [])), Promise.reject(d);
5003
5005
  }
5004
5006
  function h(d) {
5005
5007
  t.debug.log("Openreplay: failed API request, skipping", d);
@@ -5020,11 +5022,11 @@ function bo(t) {
5020
5022
  function yo(t) {
5021
5023
  return t !== null && typeof t == "object";
5022
5024
  }
5023
- var Y;
5025
+ var Q;
5024
5026
  (function(t) {
5025
5027
  t[t.UNSENT = 0] = "UNSENT", t[t.OPENED = 1] = "OPENED", t[t.HEADERS_RECEIVED = 2] = "HEADERS_RECEIVED", t[t.LOADING = 3] = "LOADING", t[t.DONE = 4] = "DONE";
5026
- })(Y || (Y = {}));
5027
- class Ht {
5028
+ })(Q || (Q = {}));
5029
+ class jt {
5028
5030
  constructor(e = [], s, n) {
5029
5031
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.id = "", this.name = "", this.method = "", this.url = "", this.status = 0, this.statusText = "", this.cancelState = 0, this.readyState = 0, this.header = {}, this.responseType = "", this.requestHeader = {}, this.responseSize = 0, this.responseSizeText = "", this.startTime = 0, this.endTime = 0, this.duration = 0, this.getData = {}, this.requestData = null;
5030
5032
  }
@@ -5040,7 +5042,7 @@ class Ht {
5040
5042
  response: i
5041
5043
  });
5042
5044
  if (r)
5043
- return ze(this.requestType, r.method, r.url, JSON.stringify(r.request), JSON.stringify(r.response), r.status, this.startTime + ye(), this.duration, this.responseSize);
5045
+ return We(this.requestType, r.method, r.url, JSON.stringify(r.request), JSON.stringify(r.response), r.status, this.startTime + ye(), this.duration, this.responseSize);
5044
5046
  }
5045
5047
  writeHeaders() {
5046
5048
  const e = {};
@@ -5064,7 +5066,7 @@ const Te = (t, e) => {
5064
5066
  case "":
5065
5067
  case "text":
5066
5068
  case "json":
5067
- typeof e == "string" ? s = e : zt(e) || Array.isArray(e) ? s = JSON.stringify(e) : typeof e < "u" && (s = Object.prototype.toString.call(e));
5069
+ typeof e == "string" ? s = e : Wt(e) || Array.isArray(e) ? s = JSON.stringify(e) : typeof e < "u" && (s = Object.prototype.toString.call(e));
5068
5070
  break;
5069
5071
  case "blob":
5070
5072
  case "document":
@@ -5074,7 +5076,7 @@ const Te = (t, e) => {
5074
5076
  break;
5075
5077
  }
5076
5078
  return s;
5077
- }, jt = (t) => {
5079
+ }, zt = (t) => {
5078
5080
  if (!t)
5079
5081
  return null;
5080
5082
  let e;
@@ -5088,10 +5090,10 @@ const Te = (t, e) => {
5088
5090
  s.push(`${n}=${typeof i == "string" ? i : "[object Object]"}`);
5089
5091
  e = s.join(",");
5090
5092
  } else
5091
- t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" : zt(t) ? e = t : e = `can't parse body ${typeof t}`;
5093
+ t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" : Wt(t) ? e = t : e = `can't parse body ${typeof t}`;
5092
5094
  return e;
5093
5095
  }, So = (t, e = {}) => {
5094
- zt(e) || (e = {});
5096
+ Wt(e) || (e = {});
5095
5097
  let s = t ? t.split("?") : [];
5096
5098
  if (s.shift(), s.length > 0) {
5097
5099
  s = s.join("?").split("&");
@@ -5106,16 +5108,16 @@ const Te = (t, e) => {
5106
5108
  }
5107
5109
  return e;
5108
5110
  };
5109
- function zt(t) {
5111
+ function Wt(t) {
5110
5112
  return t !== null && typeof t == "object";
5111
5113
  }
5112
5114
  function wo(t) {
5113
5115
  return t == null || ArrayBuffer.isView(t) ? !1 : typeof Symbol < "u" && typeof t[Symbol.iterator] == "function";
5114
5116
  }
5115
- function Ve(t) {
5117
+ function Xe(t) {
5116
5118
  return t <= 0 ? "" : t >= 1e3 * 1e3 ? (t / 1e3 / 1e3).toFixed(1) + " MB" : t >= 1e3 ? (t / 1e3).toFixed(1) + " KB" : `${t}B`;
5117
5119
  }
5118
- const Ot = (t) => (t.startsWith("//") && (t = `${new URL(window.location.href).protocol}${t}`), t.startsWith("http") ? new URL(t) : new URL(t, window.location.href));
5120
+ const Rt = (t) => (t.startsWith("//") && (t = `${new URL(window.location.href).protocol}${t}`), t.startsWith("http") ? new URL(t) : new URL(t, window.location.href));
5119
5121
  class vo {
5120
5122
  constructor(e, s) {
5121
5123
  this.resp = e, this.item = s, this.mockReader();
@@ -5142,7 +5144,7 @@ class vo {
5142
5144
  const s = this.resp.body.getReader;
5143
5145
  this.resp.body.getReader = () => {
5144
5146
  const n = s.apply(this.resp.body);
5145
- if (this.item.readyState === Y.DONE)
5147
+ if (this.item.readyState === Q.DONE)
5146
5148
  return n;
5147
5149
  const i = n.read, r = n.cancel;
5148
5150
  return this.item.responseType = "arraybuffer", n.read = () => i.apply(n).then((o) => {
@@ -5152,7 +5154,7 @@ class vo {
5152
5154
  const l = new Uint8Array(e.length + o.value.length);
5153
5155
  l.set(e), l.set(o.value, e.length), e = l;
5154
5156
  }
5155
- return this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.readyState = o.done ? 4 : 3, this.item.statusText = o.done ? String(this.item.status) : "Loading", this.item.responseSize = e.length, this.item.responseSizeText = Ve(this.item.responseSize), o.done && (this.item.response = Te(this.item.responseType, e)), o;
5157
+ return this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.readyState = o.done ? 4 : 3, this.item.statusText = o.done ? String(this.item.status) : "Loading", this.item.responseSize = e.length, this.item.responseSizeText = Xe(this.item.responseSize), o.done && (this.item.response = Te(this.item.responseType, e)), o;
5156
5158
  }), n.cancel = (...o) => (this.item.cancelState = 2, this.item.statusText = "Cancel", this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = Te(this.item.responseType, e), r.apply(n, o)), n;
5157
5159
  };
5158
5160
  }
@@ -5166,7 +5168,7 @@ class ko {
5166
5168
  if (!i || // @ts-ignore
5167
5169
  typeof i != "string" && !(i != null && i.url) || (i instanceof URL || typeof i == "string" ? this.isServiceUrl(String(i)) : this.isServiceUrl(String(i.url))))
5168
5170
  return e.apply(window, n);
5169
- const l = new Ht(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
5171
+ const l = new jt(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
5170
5172
  return this.beforeFetch(l, i, r), this.setSessionTokenHeader((a, h) => {
5171
5173
  if (!(this.tokenUrlMatcher !== void 0 && !this.tokenUrlMatcher(l.url))) {
5172
5174
  if (n[1] === void 0 && n[0] instanceof Request)
@@ -5179,7 +5181,7 @@ class ko {
5179
5181
  }
5180
5182
  beforeFetch(e, s, n) {
5181
5183
  let i, r = "GET", o = {};
5182
- if (typeof s == "string" ? (r = (n == null ? void 0 : n.method) || "GET", i = Ot(s), o = (n == null ? void 0 : n.headers) || {}) : (r = s.method || "GET", i = Ot(s.url), o = s.headers), e.method = r, e.requestType = "fetch", e.requestHeader = o, e.url = i.toString(), e.name = (i.pathname.split("/").pop() || "") + i.search, e.status = 0, e.statusText = "Pending", e.readyState = 1, e.startTime || (e.startTime = performance.now()), Object.prototype.toString.call(o) === "[object Headers]") {
5184
+ if (typeof s == "string" ? (r = (n == null ? void 0 : n.method) || "GET", i = Rt(s), o = (n == null ? void 0 : n.headers) || {}) : (r = s.method || "GET", i = Rt(s.url), o = s.headers), e.method = r, e.requestType = "fetch", e.requestHeader = o, e.url = i.toString(), e.name = (i.pathname.split("/").pop() || "") + i.search, e.status = 0, e.statusText = "Pending", e.readyState = 1, e.startTime || (e.startTime = performance.now()), Object.prototype.toString.call(o) === "[object Headers]") {
5183
5185
  e.requestHeader = {};
5184
5186
  for (const [l, a] of o)
5185
5187
  e.requestHeader[l] = a;
@@ -5190,7 +5192,7 @@ class ko {
5190
5192
  for (const [l, a] of i.searchParams)
5191
5193
  e.getData[l] = a;
5192
5194
  }
5193
- n != null && n.body && (e.requestData = jt(n.body));
5195
+ n != null && n.body && (e.requestData = zt(n.body));
5194
5196
  }
5195
5197
  afterFetch(e) {
5196
5198
  return (s) => {
@@ -5200,7 +5202,7 @@ class ko {
5200
5202
  for (const [i, r] of s.headers)
5201
5203
  e.header[i] = r, n = r.toLowerCase().indexOf("chunked") > -1 ? !0 : n;
5202
5204
  return n ? e.readyState = 3 : (e.readyState = 4, this.handleResponseBody(s.clone(), e).then((i) => {
5203
- e.responseSize = typeof i == "string" ? i.length : i.byteLength, e.responseSizeText = Ve(e.responseSize), e.response = Te(e.responseType, i);
5205
+ e.responseSize = typeof i == "string" ? i.length : i.byteLength, e.responseSizeText = Xe(e.responseSize), e.response = Te(e.responseType, i);
5204
5206
  const r = e.getMessage();
5205
5207
  r && this.sendMessage(r);
5206
5208
  }).catch((i) => {
@@ -5227,7 +5229,7 @@ class Io {
5227
5229
  this.onAbort();
5228
5230
  }, this.XMLReq.ontimeout = () => {
5229
5231
  this.onTimeout();
5230
- }, this.item = new Ht(s, n, i), this.item.requestType = "xhr";
5232
+ }, this.item = new jt(s, n, i), this.item.requestType = "xhr";
5231
5233
  }
5232
5234
  get(e, s) {
5233
5235
  switch (s) {
@@ -5258,7 +5260,7 @@ class Io {
5258
5260
  onReadyStateChange() {
5259
5261
  if (!(this.item.url && this.isServiceUrl(this.item.url)) && (this.item.readyState = this.XMLReq.readyState, this.item.responseType = this.XMLReq.responseType, this.item.endTime = performance.now(), this.item.duration = this.item.endTime - this.item.startTime, this.updateItemByReadyState(), setTimeout(() => {
5260
5262
  this.item.response = Te(this.item.responseType, this.item.response);
5261
- }, 0), this.XMLReq.readyState === Y.DONE)) {
5263
+ }, 0), this.XMLReq.readyState === Q.DONE)) {
5262
5264
  const e = this.item.getMessage();
5263
5265
  e && this.sendMessage(e);
5264
5266
  }
@@ -5285,7 +5287,7 @@ class Io {
5285
5287
  const s = Reflect.get(e, "send");
5286
5288
  return (...n) => {
5287
5289
  const i = n[0];
5288
- return this.item.requestData = jt(i), s.apply(e, n);
5290
+ return this.item.requestData = zt(i), s.apply(e, n);
5289
5291
  };
5290
5292
  }
5291
5293
  getSetRequestHeader(e) {
@@ -5312,11 +5314,11 @@ class Io {
5312
5314
  */
5313
5315
  updateItemByReadyState() {
5314
5316
  switch (this.XMLReq.readyState) {
5315
- case Y.UNSENT:
5316
- case Y.OPENED:
5317
- this.item.status = Y.UNSENT, this.item.statusText = "Pending", this.item.startTime || (this.item.startTime = performance.now());
5317
+ case Q.UNSENT:
5318
+ case Q.OPENED:
5319
+ this.item.status = Q.UNSENT, this.item.statusText = "Pending", this.item.startTime || (this.item.startTime = performance.now());
5318
5320
  break;
5319
- case Y.HEADERS_RECEIVED:
5321
+ case Q.HEADERS_RECEIVED:
5320
5322
  this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.item.header = {};
5321
5323
  const e = this.XMLReq.getAllResponseHeaders() || "", s = e.split(`
5322
5324
  `);
@@ -5328,11 +5330,11 @@ class Io {
5328
5330
  this.item.header[o] = r.slice(1).join(": ");
5329
5331
  }
5330
5332
  break;
5331
- case Y.LOADING:
5332
- this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Ve(this.item.responseSize));
5333
+ case Q.LOADING:
5334
+ this.item.status = this.XMLReq.status, this.item.statusText = "Loading", this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Xe(this.item.responseSize));
5333
5335
  break;
5334
- case Y.DONE:
5335
- this.item.status = this.XMLReq.status || this.item.status || 0, this.item.statusText = String(this.item.status), this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = this.XMLReq.response, this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Ve(this.item.responseSize));
5336
+ case Q.DONE:
5337
+ this.item.status = this.XMLReq.status || this.item.status || 0, this.item.statusText = String(this.item.status), this.item.endTime = performance.now(), this.item.duration = this.item.endTime - (this.item.startTime || this.item.endTime), this.item.response = this.XMLReq.response, this.XMLReq.response && this.XMLReq.response.length && (this.item.responseSize = this.XMLReq.response.length, this.item.responseSizeText = Xe(this.item.responseSize));
5336
5338
  break;
5337
5339
  default:
5338
5340
  this.item.status = this.XMLReq.status, this.item.statusText = "Unknown";
@@ -5356,16 +5358,16 @@ class Co {
5356
5358
  this.ignoredHeaders = e, this.setSessionTokenHeader = s, this.sanitize = n, this.sendMessage = i, this.isServiceUrl = r;
5357
5359
  }
5358
5360
  apply(e, s, n) {
5359
- const i = n[0], r = n[1], o = new Ht(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
5361
+ const i = n[0], r = n[1], o = new jt(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
5360
5362
  if (this.isServiceUrl(i))
5361
5363
  return e.apply(s, n);
5362
- const l = Ot(i);
5364
+ const l = Rt(i);
5363
5365
  if (o.method = "POST", o.url = i, o.name = (l.pathname.split("/").pop() || "") + l.search, o.requestType = "beacon", o.requestHeader = { "Content-Type": Eo(r) }, o.status = 0, o.statusText = "Pending", l.search && l.searchParams) {
5364
5366
  o.getData = {};
5365
5367
  for (const [c, u] of l.searchParams)
5366
5368
  o.getData[c] = u;
5367
5369
  }
5368
- o.requestData = jt(r), o.startTime || (o.startTime = performance.now());
5370
+ o.requestData = zt(r), o.startTime || (o.startTime = performance.now());
5369
5371
  const a = e.apply(s, n);
5370
5372
  a ? (o.endTime = performance.now(), o.duration = o.endTime - (o.startTime || o.endTime), o.status = 0, o.statusText = "Sent", o.readyState = 4) : (o.status = 500, o.statusText = "Unknown");
5371
5373
  const h = o.getMessage();
@@ -5381,18 +5383,18 @@ class be {
5381
5383
  return new Proxy(be.origSendBeacon, new Co(e, s, n, i, r));
5382
5384
  }
5383
5385
  }
5384
- var Ms;
5385
- be.origSendBeacon = (Ms = window == null ? void 0 : window.navigator) == null ? void 0 : Ms.sendBeacon;
5386
- const Os = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
5386
+ var Ps;
5387
+ be.origSendBeacon = (Ps = window == null ? void 0 : window.navigator) == null ? void 0 : Ps.sendBeacon;
5388
+ const Ds = (t) => console.warn(`Openreplay: Can't find ${t} in global context.
5387
5389
  If you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ${t} won't be tracked.`);
5388
5390
  function No(t, e, s, n, i, r, o) {
5389
5391
  var l;
5390
- t.XMLHttpRequest ? t.XMLHttpRequest = xo.create(e, s, n, i, r, o) : Os("XMLHttpRequest"), t.fetch ? t.fetch = To.create(e, s, n, i, r, o) : Os("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = be.create(e, s, n, i, r));
5392
+ t.XMLHttpRequest ? t.XMLHttpRequest = xo.create(e, s, n, i, r, o) : Ds("XMLHttpRequest"), t.fetch ? t.fetch = To.create(e, s, n, i, r, o) : Ds("fetch"), (l = t == null ? void 0 : t.navigator) != null && l.sendBeacon && (t.navigator.sendBeacon = be.create(e, s, n, i, r));
5391
5393
  }
5392
- function ft(t) {
5394
+ function pt(t) {
5393
5395
  return t.__or_req_data__ || (t.__or_req_data__ = { body: void 0, headers: {} }), t.__or_req_data__;
5394
5396
  }
5395
- function Rs(t) {
5397
+ function Ms(t) {
5396
5398
  return typeof t == "string" ? t.toUpperCase() : "GET";
5397
5399
  }
5398
5400
  function _o(t, e = {}) {
@@ -5459,7 +5461,7 @@ function _o(t, e = {}) {
5459
5461
  i(A) || (M[A] = I);
5460
5462
  });
5461
5463
  }
5462
- const O = Rs(m.method), D = l({
5464
+ const O = Ms(m.method), D = l({
5463
5465
  url: String(T),
5464
5466
  method: O,
5465
5467
  status: S.status,
@@ -5473,7 +5475,7 @@ function _o(t, e = {}) {
5473
5475
  body: b
5474
5476
  }
5475
5477
  });
5476
- D && t.send(ze("fetch", O, String(D.url), a(D.request), a(D.response), S.status, w + ye(), x, 0));
5478
+ D && t.send(We("fetch", O, String(D.url), a(D.request), a(D.response), S.status, w + ye(), x, 0));
5477
5479
  }).catch((b) => t.debug.error("Could not process Fetch response:", b)), k;
5478
5480
  });
5479
5481
  };
@@ -5486,12 +5488,12 @@ function _o(t, e = {}) {
5486
5488
  return w.addEventListener("loadstart", (x) => {
5487
5489
  k = x.timeStamp;
5488
5490
  }), w.addEventListener("load", t.safe((x) => {
5489
- const { headers: S, body: b } = ft(w), _ = k > 0 ? x.timeStamp - k : 0, O = (w.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), D = {};
5491
+ const { headers: S, body: b } = pt(w), _ = k > 0 ? x.timeStamp - k : 0, O = (w.getAllResponseHeaders() || "").trim().split(/[\r\n]+/), D = {};
5490
5492
  O.forEach(function(A) {
5491
- const P = A.split(": "), R = P.shift();
5492
- i(R) || (D[R] = P.join(": "));
5493
+ const L = A.split(": "), R = L.shift();
5494
+ i(R) || (D[R] = L.join(": "));
5493
5495
  });
5494
- const v = Rs(T), I = l({
5496
+ const v = Ms(T), I = l({
5495
5497
  url: String(m),
5496
5498
  method: v,
5497
5499
  status: w.status,
@@ -5505,16 +5507,16 @@ function _o(t, e = {}) {
5505
5507
  body: w.response
5506
5508
  }
5507
5509
  });
5508
- I && t.send(ze("xhr", v, String(I.url), a(I.request), a(I.response), w.status, k + ye(), _, 0));
5510
+ I && t.send(We("xhr", v, String(I.url), a(I.request), a(I.response), w.status, k + ye(), _, 0));
5509
5511
  })), f.apply(this, arguments);
5510
5512
  }
5511
5513
  function E(T) {
5512
- const m = ft(this);
5514
+ const m = pt(this);
5513
5515
  return m.body = T, p.apply(this, arguments);
5514
5516
  }
5515
5517
  function N(T, m) {
5516
5518
  if (!i(T)) {
5517
- const w = ft(this);
5519
+ const w = pt(this);
5518
5520
  w.headers[T] = m;
5519
5521
  }
5520
5522
  return g.apply(this, arguments);
@@ -5530,9 +5532,9 @@ function Oo(t) {
5530
5532
  const e = document.getSelection();
5531
5533
  if (e !== null && !e.isCollapsed) {
5532
5534
  const s = t.nodes.getID(e.anchorNode), n = t.nodes.getID(e.focusNode), i = e.toString().replace(/\s+/g, " ");
5533
- s && n && t.send(os(s, n, i));
5535
+ s && n && t.send(cs(s, n, i));
5534
5536
  } else
5535
- t.send(os(-1, -1, ""));
5537
+ t.send(cs(-1, -1, ""));
5536
5538
  });
5537
5539
  }
5538
5540
  function Ro(t) {
@@ -5541,15 +5543,15 @@ function Ro(t) {
5541
5543
  }
5542
5544
  t.attachEventListener(window, "focus", e, !1, !1);
5543
5545
  }
5544
- const Le = "/installation/javascript-sdk";
5546
+ const Pe = "/installation/javascript-sdk";
5545
5547
  function Do(t) {
5546
5548
  if (t == null)
5547
- return console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${je}${Le}`), !1;
5549
+ return console.error(`OpenReplay: invalid options argument type. Please, check documentation on ${ze}${Pe}`), !1;
5548
5550
  if (typeof t.projectKey != "string")
5549
5551
  if (typeof t.projectKey != "number") {
5550
5552
  if (typeof t.projectID != "number")
5551
- return console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${je}${Le} for more information.`), !1;
5552
- t.projectKey = t.projectID.toString(), ne("`projectID` option", "`projectKey` option", Le);
5553
+ return console.error(`OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ${ze}${Pe} for more information.`), !1;
5554
+ t.projectKey = t.projectID.toString(), ne("`projectID` option", "`projectKey` option", Pe);
5553
5555
  } else
5554
5556
  console.warn("OpenReplay: projectKey is expected to have a string type."), t.projectKey = t.projectKey.toString();
5555
5557
  return t.sessionToken != null && ne("`sessionToken` option", "`sessionHash` start() option", "/"), !0;
@@ -5559,7 +5561,7 @@ class Mo {
5559
5561
  var l;
5560
5562
  if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
5561
5563
  window.doNotTrack == "1"), this.signalStartIssue = (a, h) => {
5562
- const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), d = this.options.ingestPoint || dn;
5564
+ const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), d = this.options.ingestPoint || pn;
5563
5565
  u.open("POST", d + "/v1/web/not-started"), u.send(JSON.stringify({
5564
5566
  trackerVersion: "14.0.4",
5565
5567
  projectKey: this.options.projectKey,
@@ -5571,10 +5573,10 @@ class Mo {
5571
5573
  }, this.handleError = (a, h = {}) => {
5572
5574
  if (this.app !== null) {
5573
5575
  if (a instanceof Error) {
5574
- const c = $e(a, [], h);
5576
+ const c = Ve(a, [], h);
5575
5577
  this.app.send(c);
5576
5578
  } else if (a instanceof ErrorEvent || "PromiseRejectionEvent" in window && a instanceof PromiseRejectionEvent) {
5577
- const c = mn(a, void 0, h);
5579
+ const c = yn(a, void 0, h);
5578
5580
  c != null && this.app.send(c);
5579
5581
  }
5580
5582
  }
@@ -5677,7 +5679,7 @@ class Mo {
5677
5679
  return this.browserEnvCheck() ? this.app === null ? Promise.reject("Browser doesn't support required api, or doNotTrack is active.") : this.app.start(e) : Promise.reject("Trying to start not in browser.");
5678
5680
  }
5679
5681
  browserEnvCheck() {
5680
- return Z ? !0 : (console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${je}${Le}`), !1);
5682
+ return Z ? !0 : (console.error(`OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the \`tracker.start()\` line. Check documentation on ${ze}${Pe}`), !1);
5681
5683
  }
5682
5684
  /**
5683
5685
  * start buffering messages without starting the actual session, which gives user 30 seconds to "activate" and record
@@ -5789,27 +5791,11 @@ class Mo {
5789
5791
  }
5790
5792
  }
5791
5793
  }
5792
- const Ao = 3;
5793
- function In() {
5794
- const t = document.getElementById("chat-window"), e = document.getElementById("chat-icon");
5795
- t.classList.contains("visible") ? (js(), xn(), e.style.display = "flex") : (Hs(), t.classList.add("visible"), e.style.display = "none");
5796
- }
5797
- function xn() {
5798
- console.log("ghbdtn"), js(), document.getElementById("chat-window").classList.remove("visible");
5799
- let e = parseInt(j("chatCloseCount")) || 0;
5800
- e += 1, e >= Ao ? (console.log(e), Pe("disableAutoOpen", "true", 1), Rn("chatCloseCount")) : (console.log(e), Pe("chatCloseCount", e, 1));
5801
- }
5802
- function En(t = null) {
5803
- t ? Mn(t) : Hs(), document.getElementById("chat-window").classList.add("visible");
5804
- }
5805
- document.addEventListener("DOMContentLoaded", () => {
5806
- setupCloseButton(), setupOutsideClick();
5807
- });
5808
- const Lo = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"], Po = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
5809
- class Cn {
5794
+ const Ao = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"], Po = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
5795
+ class qt {
5810
5796
  constructor(e) {
5811
5797
  var s;
5812
- this.baseURL = "https://api.wineater.com/", this.store = Lo.find((n) => window.location.href.includes(n)), this.token = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.CLIENT_TOKEN) || Po;
5798
+ this.baseURL = "https://api.wineater.com/", this.store = Ao.find((n) => window.location.href.includes(n)), this.token = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.CLIENT_TOKEN) || Po;
5813
5799
  }
5814
5800
  async getStoreConfig(e) {
5815
5801
  console.log(e);
@@ -5847,10 +5833,30 @@ class Cn {
5847
5833
  throw console.error("Fetching wine recommendations failed:", s.message), new Error(`Error in getWineRecommendations: ${s.message}`);
5848
5834
  }
5849
5835
  }
5836
+ async getPossibleDishesWithMeta(e, s) {
5837
+ try {
5838
+ const n = await fetch(`${this.baseURL}dish/possible_dishes`, {
5839
+ method: "POST",
5840
+ headers: {
5841
+ Authorization: `Bearer ${this.token}`,
5842
+ "Content-Type": "application/json"
5843
+ },
5844
+ body: JSON.stringify({
5845
+ title: e,
5846
+ description: s
5847
+ })
5848
+ }), i = await n.json();
5849
+ if (console.log(i), !n.ok)
5850
+ throw new Error(`API call failed with status ${n.status}: ${i.message || "No additional error information"}`);
5851
+ return i;
5852
+ } catch (n) {
5853
+ throw console.error("Error fetching possible dishes:", n), n;
5854
+ }
5855
+ }
5850
5856
  }
5851
- class Fo {
5857
+ class Lo {
5852
5858
  constructor() {
5853
- this.api = new Cn(), this.language = "en", this.translations = {
5859
+ this.api = new qt(), this.language = "en", this.translations = {
5854
5860
  fr: {
5855
5861
  welcomeMessage: "Sublimez votre expérience gastronomique. Il vous suffit de donner les détails de votre plat, et obtenez la recommandation de compagnon de vin idéale. Que voulez-vous manger?",
5856
5862
  noResultsFound: "Aucun résultat trouvé.",
@@ -5862,7 +5868,10 @@ class Fo {
5862
5868
  region: "Région",
5863
5869
  type: "Type",
5864
5870
  reason: "Suggestion",
5865
- moreInfo: "Plus d'infos"
5871
+ moreInfo: "Plus d'infos",
5872
+ winePairingIntro: "Pour ce vin, voici quelques suggestions de plats :",
5873
+ askForDinner: "Que voulez-vous manger ce soir?",
5874
+ clearChatButton: "Effacer le chat"
5866
5875
  },
5867
5876
  es: {
5868
5877
  welcomeMessage: "Mejore su experiencia gastronómica. Solo proporcione los detalles de su plato y obtenga la recomendación de vino ideal. ¿Qué le gustaría comer?",
@@ -5875,7 +5884,10 @@ class Fo {
5875
5884
  region: "Región",
5876
5885
  type: "Tipo",
5877
5886
  reason: "Sugerencia",
5878
- moreInfo: "Más info"
5887
+ moreInfo: "Más info",
5888
+ winePairingIntro: "Para este vino, aquí tienes algunas sugerencias de platos:",
5889
+ askForDinner: "¿Qué te gustaría cenar?",
5890
+ clearChatButton: "Limpiar el chat"
5879
5891
  },
5880
5892
  en: {
5881
5893
  welcomeMessage: "Enhance your dining experience. Just provide your dish details and get the ideal wine pairing. What would you like to eat?",
@@ -5888,7 +5900,10 @@ class Fo {
5888
5900
  region: "Region",
5889
5901
  type: "Type",
5890
5902
  reason: "Suggestion",
5891
- moreInfo: "More info"
5903
+ moreInfo: "More info",
5904
+ winePairingIntro: "For this wine, here are some suggested dishes:",
5905
+ askForDinner: "What would you like to have for dinner?",
5906
+ clearChatButton: "Clear Chat"
5892
5907
  },
5893
5908
  de: {
5894
5909
  welcomeMessage: "Verbessern Sie Ihr kulinarisches Erlebnis. Geben Sie einfach die Details Ihres Gerichts an und erhalten Sie die ideale Weinempfehlung. Was möchten Sie essen?",
@@ -5901,7 +5916,10 @@ class Fo {
5901
5916
  region: "Region",
5902
5917
  type: "Typ",
5903
5918
  reason: "Anregung",
5904
- moreInfo: "Mehr Info"
5919
+ moreInfo: "Mehr Info",
5920
+ winePairingIntro: "Für diesen Wein gibt es folgende Essensvorschläge:",
5921
+ askForDinner: "Was möchten Sie zum Abendessen essen?",
5922
+ clearChatButton: "Chat löschen"
5905
5923
  }
5906
5924
  };
5907
5925
  }
@@ -5917,12 +5935,44 @@ class Fo {
5917
5935
  return this.translations[this.language][e] || e;
5918
5936
  }
5919
5937
  }
5920
- const Q = new Fo();
5921
- class Bo {
5938
+ const q = new Lo(), Fo = 3;
5939
+ let Le = null;
5940
+ function En() {
5941
+ const t = document.getElementById("chat-window"), e = document.getElementById("chat-icon");
5942
+ t.classList.contains("visible") ? (Ws(), Cn(), e.style.display = "flex") : (Le && (clearTimeout(Le), Le = null), zs(), t.classList.add("visible"), e.style.display = "none");
5943
+ }
5944
+ function Cn() {
5945
+ console.log("ghbdtn"), Ws(), document.getElementById("chat-window").classList.remove("visible");
5946
+ let e = parseInt(j("chatCloseCount")) || 0;
5947
+ e += 1, e >= Fo ? (console.log(e), Fe("disableAutoOpen", "true", 1), Rn("chatCloseCount")) : (console.log(e), Fe("chatCloseCount", e, 1));
5948
+ }
5949
+ function Bo(t) {
5950
+ const e = document.getElementById("chat-window"), s = document.getElementById("message-container"), n = document.querySelector("#input-container input");
5951
+ s.innerHTML = "", e.classList.add("visible");
5952
+ const i = document.createElement("div");
5953
+ i.className = "message api", i.textContent = q.translate("winePairingIntro"), s.appendChild(i), t.slice(0, 3).forEach((o) => {
5954
+ const l = document.createElement("div");
5955
+ l.className = "message dish-message", l.textContent = o, l.addEventListener("click", () => {
5956
+ n.value = o;
5957
+ }), s.appendChild(l);
5958
+ });
5959
+ const r = document.createElement("div");
5960
+ r.className = "message api", r.textContent = q.translate("askForDinner"), s.appendChild(r), s.scrollTop = s.scrollHeight;
5961
+ }
5962
+ function Uo(t = null) {
5963
+ t ? Mn(t) : zs(), document.getElementById("chat-window").classList.add("visible");
5964
+ }
5965
+ document.addEventListener("DOMContentLoaded", () => {
5966
+ setupCloseButton(), setupOutsideClick();
5967
+ });
5968
+ function Ho(t) {
5969
+ Le = t;
5970
+ }
5971
+ class jo {
5922
5972
  constructor() {
5923
5973
  var s;
5924
- this.api = new Cn();
5925
- const e = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.FIRST_MESSAGE_TEXT) || Q.translate("welcomeMessage");
5974
+ this.api = new qt();
5975
+ const e = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.FIRST_MESSAGE_TEXT) || q.translate("welcomeMessage");
5926
5976
  this.displayFirstMessage(e);
5927
5977
  }
5928
5978
  initialize() {
@@ -5943,7 +5993,7 @@ class Bo {
5943
5993
  const n = await this.api.getWineRecommendations(s);
5944
5994
  this.hideTypingIndicator(), n && n.length ? this.displayResults(n) : this.displayMessage("No results found.", "api");
5945
5995
  } catch {
5946
- this.hideTypingIndicator(), this.displayMessage(Q.translate("somethingWentWrong"), "api");
5996
+ this.hideTypingIndicator(), this.displayMessage(q.translate("somethingWentWrong"), "api");
5947
5997
  }
5948
5998
  }
5949
5999
  }
@@ -5958,11 +6008,11 @@ class Bo {
5958
6008
  i.textContent = e, i.className = "message " + s, n.appendChild(i), n.scrollTop = n.scrollHeight;
5959
6009
  }
5960
6010
  sendAnalytics(e) {
5961
- console.log(e), Pn(e);
6011
+ console.log(e), Ln(e);
5962
6012
  }
5963
6013
  displayResults(e) {
5964
6014
  const s = document.getElementById("message-container");
5965
- Ln(e.map((n) => n.Title)), e.forEach((n) => {
6015
+ Pn(e.map((n) => n.Title)), e.forEach((n) => {
5966
6016
  const i = document.createElement("div");
5967
6017
  i.className = "wine-item";
5968
6018
  const r = document.createElement("img");
@@ -5970,60 +6020,70 @@ class Bo {
5970
6020
  const o = document.createElement("div");
5971
6021
  o.innerHTML = `
5972
6022
  <strong>${n.Title}</strong><br>
5973
- ${Q.translate("price")}: ${n.Price}<br>
5974
- ${Q.translate("region")}: ${n.Region}<br>
5975
- ${Q.translate("type")}: ${n.Type}<br>
5976
- <a href="${n.Url}" target="_blank">${Q.translate("moreInfo")}</a>
6023
+ ${q.translate("price")}: ${n.Price}<br>
6024
+ ${q.translate("region")}: ${n.Region}<br>
6025
+ ${q.translate("type")}: ${n.Type}<br>
6026
+ <a href="${n.Url}" target="_blank">${q.translate("moreInfo")}</a>
5977
6027
  `, o.querySelector("a").addEventListener("click", (a) => {
5978
6028
  a.preventDefault(), this.sendAnalytics(n.Title), window.open(n.Url, "_blank");
5979
6029
  }), i.appendChild(o), s.appendChild(i), this.displayFirstMessage(n.Reason);
5980
6030
  }), s.scrollTop = s.scrollHeight;
5981
6031
  }
5982
6032
  }
5983
- const Re = {
6033
+ const zo = new qt(), Re = {
5984
6034
  PRODUCT_PAGES: /producto\/[^\/]+\/$/
5985
6035
  // Matches any product page like 'producto/any-product-name/'
5986
6036
  // CART_PAGE: /carrito\/$/ // Matches the cart page like 'carrito/'
5987
- }, Ds = {
6037
+ }, As = {
5988
6038
  FESTIVAL_PAGES: /festival/,
5989
6039
  // Matches any URL containing 'festival'
5990
6040
  TASTING_PAGES: /tasting/
5991
6041
  // Matches any URL containing 'tasting'
5992
6042
  };
5993
- var As, Ls;
5994
- const Uo = {
5995
- FESTIVAL_PAGES: ((As = window.wineaterData) == null ? void 0 : As.FESTIVAL_PAGES) || Ds.FESTIVAL_PAGES,
5996
- TASTING_PAGES: ((Ls = window.wineaterData) == null ? void 0 : Ls.TASTING_PAGES) || Ds.TASTING_PAGES
6043
+ var Ls, Fs;
6044
+ const Wo = {
6045
+ FESTIVAL_PAGES: ((Ls = window.wineaterData) == null ? void 0 : Ls.FESTIVAL_PAGES) || As.FESTIVAL_PAGES,
6046
+ TASTING_PAGES: ((Fs = window.wineaterData) == null ? void 0 : Fs.TASTING_PAGES) || As.TASTING_PAGES
5997
6047
  };
5998
- var Ps, Fs;
5999
- const Ho = {
6000
- PRODUCT_PAGES: ((Ps = window.wineaterData) == null ? void 0 : Ps.PRODUCT_PAGES) || Re.PRODUCT_PAGES,
6001
- CART_PAGE: ((Fs = window.wineaterData) == null ? void 0 : Fs.CART_PAGE) || (Re == null ? void 0 : Re.CART_PAGE)
6048
+ var Bs, Us;
6049
+ const qo = {
6050
+ PRODUCT_PAGES: ((Bs = window.wineaterData) == null ? void 0 : Bs.PRODUCT_PAGES) || Re.PRODUCT_PAGES,
6051
+ CART_PAGE: ((Us = window.wineaterData) == null ? void 0 : Us.CART_PAGE) || (Re == null ? void 0 : Re.CART_PAGE)
6002
6052
  };
6003
- function jo() {
6053
+ async function $o() {
6054
+ var e, s;
6004
6055
  const t = window.location.href;
6005
- for (const [e, s] of Object.entries(Uo))
6006
- if (s.test(t))
6056
+ for (const [n, i] of Object.entries(Wo))
6057
+ if (i.test(t))
6007
6058
  return !1;
6008
- for (const [e, s] of Object.entries(Ho))
6009
- if (s.test(t))
6010
- return !0;
6059
+ for (const [n, i] of Object.entries(qo))
6060
+ if (i.test(t))
6061
+ try {
6062
+ const r = ((e = document.querySelector('meta[name="title"]')) == null ? void 0 : e.getAttribute("content")) || document.title, o = ((s = document.querySelector('meta[name="description"]')) == null ? void 0 : s.getAttribute("content")) || "", l = await zo.getPossibleDishesWithMeta(r, o);
6063
+ console.log(l);
6064
+ const a = setTimeout(() => {
6065
+ Bo(l);
6066
+ }, 15e3);
6067
+ return Ho(a), !0;
6068
+ } catch (r) {
6069
+ return console.error("Error fetching dishes:", r), !1;
6070
+ }
6011
6071
  return !1;
6012
6072
  }
6013
- const zo = new Mo({
6073
+ const Vo = new Mo({
6014
6074
  projectKey: "PA8j9fAi49i6g2QnvpNs"
6015
- }), Wo = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
6075
+ }), Xo = "OuhXJRleF6sROjsQZPWx1yqjrL6APeJxmHswqyOBWbgIqtXcht3MDadvI9DtOOoL";
6016
6076
  document.addEventListener("DOMContentLoaded", () => {
6017
- window.toggleChatWindow = In, window.closeChatWindow = xn, window.openChatWindow = En;
6077
+ window.toggleChatWindow = En, window.closeChatWindow = Cn, window.openChatWindow = Uo;
6018
6078
  });
6019
- function qo() {
6079
+ function Go() {
6020
6080
  var s;
6021
- zo.start();
6081
+ Vo.start();
6022
6082
  const e = `
6023
6083
  <div id="chatbot-container">
6024
6084
  <div id="chat-icon" onclick="toggleChatWindow()">
6025
6085
  <img src="https://landing-static.s3.eu-central-1.amazonaws.com/images/chat-icon.svg" alt="Chat Icon"> <!-- Update the path to your logo image -->
6026
- <span>${((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.BUTTON_TEXT) || Q.translate("chatButton")}</span>
6086
+ <span>${((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.BUTTON_TEXT) || q.translate("chatButton")}</span>
6027
6087
  </div>
6028
6088
 
6029
6089
  <div id="chat-window" class="hidden">
@@ -6042,48 +6102,43 @@ function qo() {
6042
6102
  <span></span><span></span><span></span>
6043
6103
  </div>
6044
6104
  <div id="input-container">
6045
- <input type="text" id="user-input" placeholder="${Q.translate("inputPlaceholder")}">
6046
- <button id="send-button">${Q.translate("sendButton")}</button>
6105
+ <input type="text" id="user-input" placeholder="${q.translate("inputPlaceholder")}">
6106
+ <button id="send-button">${q.translate("sendButton")}</button>
6047
6107
  </div>
6048
6108
  </div>
6049
6109
  </div>
6050
6110
  `;
6051
6111
  document.body.insertAdjacentHTML("beforeend", e);
6052
6112
  }
6053
- function $o() {
6054
- document.getElementById("close-btn").addEventListener("click", In);
6113
+ function Ko() {
6114
+ document.getElementById("close-btn").addEventListener("click", En);
6055
6115
  }
6056
- function Vo() {
6116
+ function Jo() {
6057
6117
  window.addEventListener("click", function(t) {
6058
6118
  const e = document.getElementById("chat-window"), s = document.getElementById("chat-icon");
6059
6119
  !e.contains(t.target) && !s.contains(t.target) && (e.classList.remove("visible"), s.style.display = "flex");
6060
6120
  });
6061
6121
  }
6062
- function Xo(t) {
6122
+ function Yo(t) {
6063
6123
  console.log(t);
6064
6124
  const e = document.getElementById("chat-icon"), s = document.getElementById("chat-window");
6065
6125
  e.className = "", s.className = "", t === "right-center" ? (e.classList.add("chat-icon-right-center"), s.classList.add("right-center-aligned")) : e.classList.add("chat-icon-bottom-right");
6066
6126
  }
6067
- function Go(t = 1e4) {
6068
- setTimeout(() => {
6069
- En(window.location.href);
6070
- }, t);
6071
- }
6072
6127
  document.addEventListener("DOMContentLoaded", () => {
6073
- !j("disableAutoOpen") && jo() && Go(1e4);
6128
+ j("disableAutoOpen") || $o();
6074
6129
  });
6075
- var Bs;
6130
+ var Hs;
6076
6131
  if (typeof window < "u") {
6077
- let t = ((Bs = window == null ? void 0 : window.wineaterData) == null ? void 0 : Bs.POSITION) || "bottom-right";
6132
+ let t = ((Hs = window == null ? void 0 : window.wineaterData) == null ? void 0 : Hs.POSITION) || "bottom-right";
6078
6133
  window.addEventListener("DOMContentLoaded", async () => {
6079
6134
  var r;
6080
6135
  const s = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi"].find((o) => window.location.href.includes(o)) || null;
6081
6136
  let n;
6082
- s && (n = s.charAt(0).toUpperCase() + s.slice(1), n === "Biobio" && (t = "right-center")), await Q.fetchConfig(n || "Demo"), qo(), $o(), Vo(), Xo(t), Pe("chatbotToken", ((r = window.wineaterData) == null ? void 0 : r.CLIENT_TOKEN) || Wo, 365), Dn(), new Bo().initialize();
6137
+ s && (n = s.charAt(0).toUpperCase() + s.slice(1), n === "Biobio" && (t = "right-center")), await q.fetchConfig(n || "Demo"), Go(), Ko(), Jo(), Yo(t), Fe("chatbotToken", ((r = window.wineaterData) == null ? void 0 : r.CLIENT_TOKEN) || Xo, 365), Dn(), new jo().initialize();
6083
6138
  });
6084
6139
  }
6085
6140
  export {
6086
- xn as closeChatWindow,
6087
- En as openChatWindow,
6088
- In as toggleChatWindow
6141
+ Cn as closeChatWindow,
6142
+ Uo as openChatWindow,
6143
+ En as toggleChatWindow
6089
6144
  };