@sailfish-ai/recorder 1.8.2 → 1.8.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/recorder.js CHANGED
@@ -82,12 +82,12 @@ var D = function Event2(e, a) {
82
82
  return __extends(CloseEvent, e), CloseEvent;
83
83
  })(D), getGlobalWebSocket = function() {
84
84
  if ("undefined" != typeof WebSocket) return WebSocket;
85
- }, $ = { maxReconnectionDelay: 1e4, minReconnectionDelay: 1e3 + 4e3 * Math.random(), minUptime: 5e3, reconnectionDelayGrowFactor: 1.3, connectionTimeout: 4e3, maxRetries: 1 / 0, maxEnqueuedMessages: 1 / 0 }, B = (function() {
85
+ }, B = { maxReconnectionDelay: 1e4, minReconnectionDelay: 1e3 + 4e3 * Math.random(), minUptime: 5e3, reconnectionDelayGrowFactor: 1.3, connectionTimeout: 4e3, maxRetries: 1 / 0, maxEnqueuedMessages: 1 / 0 }, $ = (function() {
86
86
  function ReconnectingWebSocket(e, a, u) {
87
87
  var m2 = this;
88
88
  void 0 === u && (u = {}), this._listeners = { error: [], message: [], open: [], close: [] }, this._retryCount = -1, this._shouldReconnect = true, this._connectLock = false, this._binaryType = "blob", this._closeCalled = false, this._messageQueue = [], this.onclose = null, this.onerror = null, this.onmessage = null, this.onopen = null, this._handleOpen = function(e2) {
89
89
  m2._debug("open event");
90
- var a2 = m2._options.minUptime, u2 = void 0 === a2 ? $.minUptime : a2;
90
+ var a2 = m2._options.minUptime, u2 = void 0 === a2 ? B.minUptime : a2;
91
91
  clearTimeout(m2._connectTimeout), m2._uptimeTimeout = setTimeout(function() {
92
92
  return m2._acceptOpen();
93
93
  }, u2), m2._ws.binaryType = m2._binaryType, m2._messageQueue.forEach(function(e3) {
@@ -150,7 +150,7 @@ var D = function Event2(e, a) {
150
150
  }, ReconnectingWebSocket.prototype.send = function(e) {
151
151
  if (this._ws && this._ws.readyState === this.OPEN) this._debug("send", e), this._ws.send(e);
152
152
  else {
153
- var a = this._options.maxEnqueuedMessages, u = void 0 === a ? $.maxEnqueuedMessages : a;
153
+ var a = this._options.maxEnqueuedMessages, u = void 0 === a ? B.maxEnqueuedMessages : a;
154
154
  this._messageQueue.length < u && (this._debug("enqueue", e), this._messageQueue.push(e));
155
155
  }
156
156
  }, ReconnectingWebSocket.prototype.addEventListener = function(e, a) {
@@ -188,7 +188,7 @@ var D = function Event2(e, a) {
188
188
  return e2;
189
189
  })(["RWS>"], e));
190
190
  }, ReconnectingWebSocket.prototype._getNextDelay = function() {
191
- var e = this._options, a = e.reconnectionDelayGrowFactor, u = void 0 === a ? $.reconnectionDelayGrowFactor : a, m2 = e.minReconnectionDelay, w2 = void 0 === m2 ? $.minReconnectionDelay : m2, b2 = e.maxReconnectionDelay, C2 = void 0 === b2 ? $.maxReconnectionDelay : b2, x2 = 0;
191
+ var e = this._options, a = e.reconnectionDelayGrowFactor, u = void 0 === a ? B.reconnectionDelayGrowFactor : a, m2 = e.minReconnectionDelay, w2 = void 0 === m2 ? B.minReconnectionDelay : m2, b2 = e.maxReconnectionDelay, C2 = void 0 === b2 ? B.maxReconnectionDelay : b2, x2 = 0;
192
192
  return this._retryCount > 0 && (x2 = w2 * Math.pow(u, this._retryCount - 1)) > C2 && (x2 = C2), this._debug("next delay", x2), x2;
193
193
  }, ReconnectingWebSocket.prototype._wait = function() {
194
194
  var e = this;
@@ -207,7 +207,7 @@ var D = function Event2(e, a) {
207
207
  var e = this;
208
208
  if (!this._connectLock && this._shouldReconnect) {
209
209
  this._connectLock = true;
210
- var a = this._options, u = a.maxRetries, m2 = void 0 === u ? $.maxRetries : u, w2 = a.connectionTimeout, b2 = void 0 === w2 ? $.connectionTimeout : w2, C2 = a.WebSocket, x2 = void 0 === C2 ? getGlobalWebSocket() : C2;
210
+ var a = this._options, u = a.maxRetries, m2 = void 0 === u ? B.maxRetries : u, w2 = a.connectionTimeout, b2 = void 0 === w2 ? B.connectionTimeout : w2, C2 = a.WebSocket, x2 = void 0 === C2 ? getGlobalWebSocket() : C2;
211
211
  if (this._retryCount >= m2) this._debug("max retries reached", this._retryCount, ">=", m2);
212
212
  else {
213
213
  if (this._retryCount++, this._debug("connect", this._retryCount), this._removeListeners(), !(function(e2) {
@@ -325,7 +325,7 @@ async function deleteNotifyMessageById(e) {
325
325
  a.delete(e);
326
326
  });
327
327
  }
328
- const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, Y = "undefined" != typeof globalThis && void 0 !== globalThis.document, J = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis;
328
+ const H = "undefined" != typeof globalThis && void 0 !== globalThis.window, J = "undefined" != typeof globalThis && void 0 !== globalThis.document, Y = "undefined" != typeof globalThis && "localStorage" in globalThis, X = "undefined" != typeof globalThis && "sessionStorage" in globalThis;
329
329
  function getOrSetSessionId() {
330
330
  return H ? (window.name || (window.name = v4()), window.name) : v4();
331
331
  }
@@ -356,8 +356,8 @@ function withAppUrlMetadata(e) {
356
356
  return { ...e ?? {}, appUrl: (e == null ? void 0 : e.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
357
357
  }
358
358
  /[1-9][0-9]{12}/.test(Date.now().toString()) || (Q = () => (/* @__PURE__ */ new Date()).getTime());
359
- const ee = readDebugFlag();
360
- let te = null, ne = false, re = null, oe = null;
359
+ const ee = readDebugFlag(), te = "per_session";
360
+ let ne = null, re = false, oe = null, se = null, ie = false, le = null, ce = null, pe = false;
361
361
  function isWebSocketOpen(e) {
362
362
  return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
363
363
  }
@@ -368,15 +368,15 @@ async function flushNotifyQueue() {
368
368
  u.onsuccess = () => a(u.result), u.onerror = () => a([]);
369
369
  })) ?? [];
370
370
  })();
371
- if (isWebSocketOpen(te)) try {
372
- for (const a of e) te.send(a.value), await deleteNotifyMessageById(a.id);
371
+ if (isWebSocketOpen(ne)) try {
372
+ for (const a of e) ne.send(a.value), await deleteNotifyMessageById(a.id);
373
373
  } catch (e2) {
374
374
  }
375
375
  }
376
376
  async function flushBufferedEvents() {
377
- if (isWebSocketOpen(te)) if (re) await re;
377
+ if (isWebSocketOpen(ne)) if (oe) await oe;
378
378
  else {
379
- re = (async () => {
379
+ oe = (async () => {
380
380
  var _a2, _b;
381
381
  const e = await (async function getAllIndexedEvents() {
382
382
  return await withStore$1("readonly", (e2) => new Promise((a2) => {
@@ -391,33 +391,33 @@ async function flushBufferedEvents() {
391
391
  for (const e2 of Object.values(a)) {
392
392
  const a2 = buildBatches(e2, (e3) => eventSize(e3.data), 52428800);
393
393
  for (const e3 of a2) {
394
- if (!isWebSocketOpen(te)) break;
394
+ if (!isWebSocketOpen(ne)) break;
395
395
  const a3 = e3.map((e4) => {
396
396
  var _a3, _b2;
397
397
  return { ...e4.data, appUrl: ((_a3 = e4.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
398
398
  }), u = e3.map((e4) => e4.id).filter((e4) => null != e4);
399
399
  try {
400
400
  const e4 = JSON.stringify({ type: "events", events: a3, mapUuid: window.sfMapUuid });
401
- te.send(e4), await deleteEventsByIds(u);
401
+ ne.send(e4), await deleteEventsByIds(u);
402
402
  } catch (e4) {
403
403
  }
404
404
  }
405
405
  }
406
406
  })();
407
407
  try {
408
- await re;
408
+ await oe;
409
409
  } finally {
410
- re = null;
410
+ oe = null;
411
411
  }
412
412
  }
413
413
  }
414
414
  function sendEvent(e) {
415
415
  var _a2;
416
416
  const a = { ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
417
- if (ne || !isWebSocketOpen(te)) return void saveEventToIDB(a);
417
+ if (re || !isWebSocketOpen(ne)) return void saveEventToIDB(a);
418
418
  const u = JSON.stringify({ type: "event", event: a, mapUuid: window.sfMapUuid });
419
419
  try {
420
- te.send(u);
420
+ ne.send(u);
421
421
  } catch (e2) {
422
422
  saveEventToIDB(a);
423
423
  }
@@ -427,49 +427,104 @@ function initializeWebSocket(e, a, u) {
427
427
  const a2 = document.createElement("a");
428
428
  return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
429
429
  })(e), w2 = new URL(e).protocol;
430
- return te = new B(`${"https:" === w2 ? "wss" : "ws"}://${m2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.2`, [], { connectionTimeout: 3e4 }), te.addEventListener("open", () => {
431
- ee && console.log("WebSocket opened."), (async () => {
430
+ return ne = new $(`${"https:" === w2 ? "wss" : "ws"}://${m2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.7`, [], { connectionTimeout: 3e4 }), ne.addEventListener("open", () => {
431
+ ee && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (ie ? "ENABLED" : "DISABLED"))), (async () => {
432
432
  try {
433
- ne = true, await flushNotifyQueue(), await flushBufferedEvents();
433
+ re = true, await flushNotifyQueue(), await flushBufferedEvents();
434
434
  } finally {
435
- ne = false;
435
+ re = false;
436
436
  }
437
- null != oe && clearInterval(oe), oe = window.setInterval(() => {
437
+ null != se && clearInterval(se), se = window.setInterval(() => {
438
438
  flushBufferedEvents();
439
439
  }, 2e3);
440
440
  })();
441
- }), te.addEventListener("close", () => {
442
- console.log("WebSocket closed.");
443
- }), te;
441
+ }), ne.addEventListener("close", () => {
442
+ ee && console.log("[Sailfish] WebSocket closed");
443
+ }), ne.addEventListener("message", (e2) => {
444
+ try {
445
+ const a2 = JSON.parse(e2.data);
446
+ if ("funcSpanTrackingControl" === a2.type) if (ee && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== le && (window.clearTimeout(le), le = null), ie = a2.enabled, pe = false, ee && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
447
+ if (a2.expirationTimestampMs) {
448
+ ce = a2.expirationTimestampMs;
449
+ const e3 = Date.now(), u2 = ce - e3;
450
+ ee && console.log(`[Sailfish] Server expiration timestamp: ${ce}, ms until expiration: ${u2}`), u2 > 0 ? le = window.setTimeout(() => {
451
+ pe || (ie = false, ce = null, ee && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"));
452
+ }, u2) : (ie = false, ce = null, ee && console.log("[Sailfish] Tracking already expired, not enabling"));
453
+ } else {
454
+ const e3 = a2.timeoutSeconds || 3600;
455
+ e3 > 0 && (ce = Date.now() + 1e3 * e3, le = window.setTimeout(() => {
456
+ pe || (ie = false, ce = null, ee && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`));
457
+ }, 1e3 * e3));
458
+ }
459
+ try {
460
+ const e3 = getOrSetSessionId();
461
+ ne.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" })), ee && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
462
+ } catch (e3) {
463
+ ee && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
464
+ }
465
+ } else ce = null;
466
+ } catch (e3) {
467
+ }
468
+ }), ne;
444
469
  }
445
470
  function sendMessage(e) {
446
471
  var _a2;
447
472
  "sessionId" in e || (e.sessionId = getOrSetSessionId());
448
473
  const a = JSON.stringify({ ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) });
449
- if (isWebSocketOpen(te)) try {
450
- te.send(a);
474
+ if (isWebSocketOpen(ne)) try {
475
+ ne.send(a);
451
476
  } catch (e2) {
452
477
  saveNotifyMessageToIDB(a);
453
478
  }
454
479
  else saveNotifyMessageToIDB(a);
455
480
  }
456
- var se, ie, le = {}, ce = {}, pe = {}, de = {};
481
+ function enableFunctionSpanTracking() {
482
+ if (ee && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), ie = true, pe = true, ce = null, null !== le && (window.clearTimeout(le), le = null), isWebSocketOpen(ne)) try {
483
+ const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: te };
484
+ ne.send(JSON.stringify(e));
485
+ } catch (e) {
486
+ console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e);
487
+ }
488
+ else ee && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
489
+ }
490
+ function disableFunctionSpanTracking() {
491
+ if (ee && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(ne)) try {
492
+ const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: te };
493
+ ne.send(JSON.stringify(e));
494
+ } catch (e) {
495
+ console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
496
+ }
497
+ else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
498
+ pe && (ie = false, pe = false, ce = null, ee && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== le && (window.clearTimeout(le), le = null);
499
+ }
500
+ function isFunctionSpanTrackingEnabled() {
501
+ return ie;
502
+ }
503
+ function getFuncSpanHeader() {
504
+ if (!ie) return null;
505
+ if (null !== ce) {
506
+ if (Date.now() >= ce) return ie = false, ce = null, ee && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
507
+ }
508
+ return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
509
+ }
510
+ const de = Object.freeze(Object.defineProperty({ __proto__: null, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
511
+ var he, me, ge = {}, ye = {}, we = {}, be = {};
457
512
  function requireBase64() {
458
- if (se) return de;
459
- se = 1;
513
+ if (he) return be;
514
+ he = 1;
460
515
  var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
461
- return de.encode = function(a) {
516
+ return be.encode = function(a) {
462
517
  if (0 <= a && a < e.length) return e[a];
463
518
  throw new TypeError("Must be between 0 and 63: " + a);
464
- }, de.decode = function(e2) {
519
+ }, be.decode = function(e2) {
465
520
  return 65 <= e2 && e2 <= 90 ? e2 - 65 : 97 <= e2 && e2 <= 122 ? e2 - 97 + 26 : 48 <= e2 && e2 <= 57 ? e2 - 48 + 52 : 43 == e2 ? 62 : 47 == e2 ? 63 : -1;
466
- }, de;
521
+ }, be;
467
522
  }
468
523
  function requireBase64Vlq() {
469
- if (ie) return pe;
470
- ie = 1;
524
+ if (me) return we;
525
+ me = 1;
471
526
  var e = requireBase64();
472
- return pe.encode = function base64VLQ_encode(a) {
527
+ return we.encode = function base64VLQ_encode(a) {
473
528
  var u, m2 = "", w2 = (function toVLQSigned(e2) {
474
529
  return e2 < 0 ? 1 + (-e2 << 1) : 0 + (e2 << 1);
475
530
  })(a);
@@ -477,7 +532,7 @@ function requireBase64Vlq() {
477
532
  u = 31 & w2, (w2 >>>= 5) > 0 && (u |= 32), m2 += e.encode(u);
478
533
  } while (w2 > 0);
479
534
  return m2;
480
- }, pe.decode = function base64VLQ_decode(a, u, m2) {
535
+ }, we.decode = function base64VLQ_decode(a, u, m2) {
481
536
  var w2, b2, C2 = a.length, x2 = 0, I2 = 0;
482
537
  do {
483
538
  if (u >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
@@ -488,11 +543,11 @@ function requireBase64Vlq() {
488
543
  var a2 = e2 >> 1;
489
544
  return 1 & ~e2 ? a2 : -a2;
490
545
  })(x2), m2.rest = u;
491
- }, pe;
546
+ }, we;
492
547
  }
493
- var he, me = {};
548
+ var ve, Ce = {};
494
549
  function requireUtil() {
495
- return he || (he = 1, (function(e) {
550
+ return ve || (ve = 1, (function(e) {
496
551
  e.getArg = function getArg(e2, a2, u2) {
497
552
  if (a2 in e2) return e2[a2];
498
553
  if (3 === arguments.length) return u2;
@@ -604,12 +659,12 @@ function requireUtil() {
604
659
  }
605
660
  return m2(a2);
606
661
  };
607
- })(me)), me;
662
+ })(Ce)), Ce;
608
663
  }
609
- var ge, ye = {};
664
+ var ke, xe = {};
610
665
  function requireArraySet() {
611
- if (ge) return ye;
612
- ge = 1;
666
+ if (ke) return xe;
667
+ ke = 1;
613
668
  var e = requireUtil(), a = Object.prototype.hasOwnProperty, u = "undefined" != typeof Map;
614
669
  function ArraySet() {
615
670
  this._array = [], this._set = u ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
@@ -640,12 +695,12 @@ function requireArraySet() {
640
695
  throw new Error("No element indexed by " + e2);
641
696
  }, ArraySet.prototype.toArray = function ArraySet_toArray() {
642
697
  return this._array.slice();
643
- }, ye.ArraySet = ArraySet, ye;
698
+ }, xe.ArraySet = ArraySet, xe;
644
699
  }
645
- var we, be, ve = {};
700
+ var Me, Ie, Oe = {};
646
701
  function requireMappingList() {
647
- if (we) return ve;
648
- we = 1;
702
+ if (Me) return Oe;
703
+ Me = 1;
649
704
  var e = requireUtil();
650
705
  function MappingList() {
651
706
  this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
@@ -659,11 +714,11 @@ function requireMappingList() {
659
714
  })(this._last, a) ? (this._sorted = false, this._array.push(a)) : (this._last = a, this._array.push(a));
660
715
  }, MappingList.prototype.toArray = function MappingList_toArray() {
661
716
  return this._sorted || (this._array.sort(e.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
662
- }, ve.MappingList = MappingList, ve;
717
+ }, Oe.MappingList = MappingList, Oe;
663
718
  }
664
719
  function requireSourceMapGenerator() {
665
- if (be) return ce;
666
- be = 1;
720
+ if (Ie) return ye;
721
+ Ie = 1;
667
722
  var e = requireBase64Vlq(), a = requireUtil(), u = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
668
723
  function SourceMapGenerator(e2) {
669
724
  e2 || (e2 = {}), this._file = a.getArg(e2, "file", null), this._sourceRoot = a.getArg(e2, "sourceRoot", null), this._skipValidation = a.getArg(e2, "skipValidation", false), this._ignoreInvalidMapping = a.getArg(e2, "ignoreInvalidMapping", false), this._sources = new u(), this._names = new u(), this._mappings = new m2(), this._sourcesContents = null;
@@ -719,7 +774,7 @@ function requireSourceMapGenerator() {
719
774
  throw new Error(w2);
720
775
  }
721
776
  }, SourceMapGenerator.prototype._serializeMappings = function SourceMapGenerator_serializeMappings() {
722
- for (var u2, m3, w2, b2, C2 = 0, x2 = 1, I2 = 0, _2 = 0, O2 = 0, E2 = 0, D2 = "", F2 = this._mappings.toArray(), U2 = 0, $2 = F2.length; U2 < $2; U2++) {
777
+ for (var u2, m3, w2, b2, C2 = 0, x2 = 1, I2 = 0, _2 = 0, O2 = 0, E2 = 0, D2 = "", F2 = this._mappings.toArray(), U2 = 0, B2 = F2.length; U2 < B2; U2++) {
723
778
  if (u2 = "", (m3 = F2[U2]).generatedLine !== x2) for (C2 = 0; m3.generatedLine !== x2; ) u2 += ";", x2++;
724
779
  else if (U2 > 0) {
725
780
  if (!a.compareByGeneratedPositionsInflated(m3, F2[U2 - 1])) continue;
@@ -740,11 +795,11 @@ function requireSourceMapGenerator() {
740
795
  return null != this._file && (e2.file = this._file), null != this._sourceRoot && (e2.sourceRoot = this._sourceRoot), this._sourcesContents && (e2.sourcesContent = this._generateSourcesContent(e2.sources, e2.sourceRoot)), e2;
741
796
  }, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
742
797
  return JSON.stringify(this.toJSON());
743
- }, ce.SourceMapGenerator = SourceMapGenerator, ce;
798
+ }, ye.SourceMapGenerator = SourceMapGenerator, ye;
744
799
  }
745
- var Ce, ke = {}, xe = {};
800
+ var Ee, Le = {}, Ae = {};
746
801
  function requireBinarySearch() {
747
- return Ce || (Ce = 1, (function(e) {
802
+ return Ee || (Ee = 1, (function(e) {
748
803
  function recursiveSearch(a, u, m2, w2, b2, C2) {
749
804
  var x2 = Math.floor((u - a) / 2) + a, I2 = b2(m2, w2[x2], true);
750
805
  return 0 === I2 ? x2 : I2 > 0 ? u - x2 > 1 ? recursiveSearch(x2, u, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? u < w2.length ? u : -1 : x2 : x2 - a > 1 ? recursiveSearch(a, x2, m2, w2, b2, C2) : C2 == e.LEAST_UPPER_BOUND ? x2 : a < 0 ? -1 : a;
@@ -756,11 +811,11 @@ function requireBinarySearch() {
756
811
  for (; b2 - 1 >= 0 && 0 === m2(u[b2], u[b2 - 1], true); ) --b2;
757
812
  return b2;
758
813
  };
759
- })(xe)), xe;
814
+ })(Ae)), Ae;
760
815
  }
761
- var Me, Ie, Oe = {};
816
+ var Te, De, Ue = {};
762
817
  function requireQuickSort() {
763
- if (Me) return Oe;
818
+ if (Te) return Ue;
764
819
  function SortTemplate(e2) {
765
820
  function swap(e3, a, u) {
766
821
  var m2 = e3[a];
@@ -779,21 +834,21 @@ function requireQuickSort() {
779
834
  }
780
835
  };
781
836
  }
782
- Me = 1;
837
+ Te = 1;
783
838
  let e = /* @__PURE__ */ new WeakMap();
784
- return Oe.quickSort = function(a, u, m2 = 0) {
839
+ return Ue.quickSort = function(a, u, m2 = 0) {
785
840
  let w2 = e.get(u);
786
841
  void 0 === w2 && (w2 = (function cloneSort(e2) {
787
842
  let a2 = SortTemplate.toString();
788
843
  return new Function(`return ${a2}`)()(e2);
789
844
  })(u), e.set(u, w2)), w2(a, u, m2, a.length - 1);
790
- }, Oe;
845
+ }, Ue;
791
846
  }
792
- var Ee, Le, Ae = {};
793
- var Te = (function requireSourceMap() {
794
- return Le || (Le = 1, le.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, le.SourceMapConsumer = (function requireSourceMapConsumer() {
795
- if (Ie) return ke;
796
- Ie = 1;
847
+ var Be, je, Ge = {};
848
+ var Ve = (function requireSourceMap() {
849
+ return je || (je = 1, ge.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, ge.SourceMapConsumer = (function requireSourceMapConsumer() {
850
+ if (De) return Le;
851
+ De = 1;
797
852
  var e = requireUtil(), a = requireBinarySearch(), u = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
798
853
  function SourceMapConsumer(a2, u2) {
799
854
  var m3 = a2;
@@ -850,7 +905,7 @@ var Te = (function requireSourceMap() {
850
905
  else for (var _2 = x2.originalColumn; x2 && x2.originalLine === m3 && x2.originalColumn == _2; ) b3.push({ line: e.getArg(x2, "generatedLine", null), column: e.getArg(x2, "generatedColumn", null), lastColumn: e.getArg(x2, "lastGeneratedColumn", null) }), x2 = this._originalMappings[++C2];
851
906
  }
852
907
  return b3;
853
- }, ke.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
908
+ }, Le.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
854
909
  var u2, m3 = a2;
855
910
  if (null != this.sourceRoot && (m3 = e.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
856
911
  for (u2 = 0; u2 < this._absoluteSources.length; ++u2) if (this._absoluteSources[u2] == a2) return u2;
@@ -896,13 +951,13 @@ var Te = (function requireSourceMap() {
896
951
  });
897
952
  }
898
953
  return BasicSourceMapConsumer.prototype._parseMappings = function SourceMapConsumer_parseMappings(a2, u2) {
899
- var b3, C2, x2, I2, _2 = 1, O2 = 0, E2 = 0, D2 = 0, F2 = 0, U2 = 0, $2 = a2.length, B2 = 0, z2 = {}, j2 = [], V2 = [];
954
+ var b3, C2, x2, I2, _2 = 1, O2 = 0, E2 = 0, D2 = 0, F2 = 0, U2 = 0, B2 = a2.length, $2 = 0, z2 = {}, j2 = [], V2 = [];
900
955
  let q2 = 0;
901
- for (; B2 < $2; ) if (";" === a2.charAt(B2)) _2++, B2++, O2 = 0, sortGenerated(V2, q2), q2 = V2.length;
902
- else if ("," === a2.charAt(B2)) B2++;
956
+ for (; $2 < B2; ) if (";" === a2.charAt($2)) _2++, $2++, O2 = 0, sortGenerated(V2, q2), q2 = V2.length;
957
+ else if ("," === a2.charAt($2)) $2++;
903
958
  else {
904
- for ((b3 = new Mapping()).generatedLine = _2, x2 = B2; x2 < $2 && !this._charIsMappingSeparator(a2, x2); x2++) ;
905
- for (a2.slice(B2, x2), C2 = []; B2 < x2; ) m2.decode(a2, B2, z2), I2 = z2.value, B2 = z2.rest, C2.push(I2);
959
+ for ((b3 = new Mapping()).generatedLine = _2, x2 = $2; x2 < B2 && !this._charIsMappingSeparator(a2, x2); x2++) ;
960
+ for (a2.slice($2, x2), C2 = []; $2 < x2; ) m2.decode(a2, $2, z2), I2 = z2.value, $2 = z2.rest, C2.push(I2);
906
961
  if (2 === C2.length) throw new Error("Found a source, but no line and column");
907
962
  if (3 === C2.length) throw new Error("Found a source and line, but no column");
908
963
  if (b3.generatedColumn = O2 + C2[0], O2 = b3.generatedColumn, C2.length > 1 && (b3.source = F2 + C2[1], F2 += C2[1], b3.originalLine = E2 + C2[2], E2 = b3.originalLine, b3.originalLine += 1, b3.originalColumn = D2 + C2[3], D2 = b3.originalColumn, C2.length > 4 && (b3.name = U2 + C2[4], U2 += C2[4])), V2.push(b3), "number" == typeof b3.originalLine) {
@@ -967,7 +1022,7 @@ var Te = (function requireSourceMap() {
967
1022
  if (b3.source === m3.source) return { line: e.getArg(b3, "generatedLine", null), column: e.getArg(b3, "generatedColumn", null), lastColumn: e.getArg(b3, "lastGeneratedColumn", null) };
968
1023
  }
969
1024
  return { line: null, column: null, lastColumn: null };
970
- }, ke.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
1025
+ }, Le.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
971
1026
  for (var e2 = [], a2 = 0; a2 < this._sections.length; a2++) for (var u2 = 0; u2 < this._sections[a2].consumer.sources.length; u2++) e2.push(this._sections[a2].consumer.sources[u2]);
972
1027
  return e2;
973
1028
  } }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u2) {
@@ -1006,10 +1061,10 @@ var Te = (function requireSourceMap() {
1006
1061
  this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
1007
1062
  }
1008
1063
  w2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e.compareByOriginalPositions);
1009
- }, ke.IndexedSourceMapConsumer = IndexedSourceMapConsumer, ke;
1010
- })().SourceMapConsumer, le.SourceNode = (function requireSourceNode() {
1011
- if (Ee) return Ae;
1012
- Ee = 1;
1064
+ }, Le.IndexedSourceMapConsumer = IndexedSourceMapConsumer, Le;
1065
+ })().SourceMapConsumer, ge.SourceNode = (function requireSourceNode() {
1066
+ if (Be) return Ge;
1067
+ Be = 1;
1013
1068
  var e = requireSourceMapGenerator().SourceMapGenerator, a = requireUtil(), u = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
1014
1069
  function SourceNode(e2, a2, u2, w2, b2) {
1015
1070
  this.children = [], this.sourceContents = {}, this.line = null == e2 ? null : e2, this.column = null == a2 ? null : a2, this.source = null == u2 ? null : u2, this.name = null == b2 ? null : b2, this[m2] = true, null != w2 && this.add(w2);
@@ -1093,9 +1148,24 @@ var Te = (function requireSourceMap() {
1093
1148
  }), this.walkSourceContents(function(e2, a3) {
1094
1149
  m3.setSourceContent(e2, a3);
1095
1150
  }), { code: u2.code, map: m3 };
1096
- }, Ae.SourceNode = SourceNode, Ae;
1097
- })().SourceNode), le;
1151
+ }, Ge.SourceNode = SourceNode, Ge;
1152
+ })().SourceNode), ge;
1098
1153
  })();
1154
+ const qe = /* @__PURE__ */ new Map(), He = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
1155
+ async function getConsumerFor(e, a) {
1156
+ const u = (e || `/assets/${a}`).split("?")[0], m2 = [`${u}.map`, u.replace(/\.js$/, ".js.map"), `/assets/${a}.map`];
1157
+ for (const e2 of m2) try {
1158
+ if (qe.has(e2)) return qe.get(e2);
1159
+ const a2 = await fetch(e2);
1160
+ if (!a2.ok) continue;
1161
+ const u2 = await a2.json();
1162
+ if (!u2 || !u2.mappings || !u2.sources) continue;
1163
+ const m3 = await new Ve.SourceMapConsumer(u2);
1164
+ return qe.set(e2, m3), m3;
1165
+ } catch {
1166
+ }
1167
+ return null;
1168
+ }
1099
1169
  async function captureError(e, a = false) {
1100
1170
  let u, m2;
1101
1171
  e instanceof Error ? (u = e.message, m2 = e.stack || "No stack trace") : "string" == typeof e ? (u = e, m2 = "No stack trace available") : (u = "Unknown error occurred", m2 = "No stack trace available");
@@ -1103,46 +1173,37 @@ async function captureError(e, a = false) {
1103
1173
  if (!e2) return ["No stack trace available"];
1104
1174
  const a2 = Array.isArray(e2) ? e2 : e2.split("\n"), u2 = [];
1105
1175
  for (const e3 of a2) {
1106
- const a3 = e3.match(/\/assets\/([^\/]+\.js):(\d+):(\d+)/);
1176
+ const a3 = e3.match(He);
1107
1177
  if (!a3) {
1108
1178
  u2.push(e3);
1109
1179
  continue;
1110
1180
  }
1111
- const [, m3, w3, b2] = a3, C2 = `/assets/${m3.split("/").pop()}.map`;
1112
- try {
1113
- const a4 = await fetch(C2);
1114
- if (!a4.ok) break;
1115
- const m4 = await a4.json();
1116
- if (!m4.sources || !Array.isArray(m4.sources)) {
1117
- u2.push(e3);
1118
- continue;
1119
- }
1120
- const x2 = (await new Te.SourceMapConsumer(m4)).originalPositionFor({ line: parseInt(w3, 10) - 1, column: parseInt(b2, 10) });
1121
- if (x2.source && x2.line) {
1122
- const e4 = m4.sources.indexOf(x2.source);
1123
- let a5 = [];
1124
- if (-1 !== e4 && m4.sourcesContent && m4.sourcesContent[e4]) {
1125
- const u3 = m4.sourcesContent[e4].split("\n"), w4 = x2.line || 1, b3 = Math.max(w4 - 6, 0), C3 = Math.min(w4 + 4, u3.length);
1126
- a5 = u3.slice(b3, C3).map((e5, a6) => {
1127
- const u4 = b3 + a6 + 1;
1128
- return `${u4 === w4 ? "👉" : " "} ${u4.toString().padStart(4)} | ${e5.trim()}`;
1129
- });
1130
- }
1131
- u2.push(`${x2.source}:${x2.line}:${x2.column} (${x2.name || "anonymous"})`);
1132
- } else u2.push(e3);
1133
- } catch (a4) {
1134
- u2.push(e3);
1181
+ const [, m3, w3, b3, C2] = a3, x2 = parseInt(b3, 10), I2 = Math.max(0, parseInt(C2, 10) - 1);
1182
+ if (!Number.isFinite(x2) || !Number.isFinite(I2)) {
1183
+ u2.push(e3 + " [Invalid line/column]");
1184
+ continue;
1185
+ }
1186
+ const _2 = await getConsumerFor(m3, w3);
1187
+ if (!_2) {
1188
+ u2.push(`${e3} [No source map found for ${w3}]`);
1189
+ continue;
1135
1190
  }
1191
+ let O2 = _2.originalPositionFor({ line: x2, column: I2, bias: Ve.SourceMapConsumer.GREATEST_LOWER_BOUND });
1192
+ if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x2, column: Math.max(0, I2 - e4), bias: Ve.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e4++) ;
1193
+ if (O2.source && null != O2.line) {
1194
+ const e4 = O2.name || "anonymous";
1195
+ u2.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e4})`);
1196
+ } else u2.push(`${e3} [No mapping found in ${w3}]`);
1136
1197
  }
1137
1198
  return u2;
1138
- })(m2);
1139
- sendMessage({ type: "event", event: { type: 6, data: { payload: { message: u, stack: m2, filteredStack: w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom")), userAgent: navigator.userAgent, url: window.location.href, timestamp: Date.now(), level: "error" } } } });
1199
+ })(m2), b2 = w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom"));
1200
+ sendMessage({ type: "event", event: { type: 6, data: { payload: { message: u, stack: m2, trace: b2.length > 0 ? b2 : w2, filteredStack: b2, userAgent: navigator.userAgent, url: window.location.href, timestamp: Date.now(), level: "error" } } } });
1140
1201
  }
1141
- const De = readDebugFlag();
1142
- const Ue = readDebugFlag();
1202
+ const Je = readDebugFlag();
1203
+ const Ye = readDebugFlag();
1143
1204
  function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
1144
1205
  const C2 = `${u.backendApi}/graphql/?apiKey=${u.apiKey}`;
1145
- return Ue && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
1206
+ return Ye && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
1146
1207
  let b3 = 0;
1147
1208
  const attemptRequest = async () => {
1148
1209
  try {
@@ -1150,12 +1211,12 @@ function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
1150
1211
  } catch (e3) {
1151
1212
  if (b3++, b3 > u2) throw e3;
1152
1213
  const C3 = m3 * Math.pow(w3, b3 - 1);
1153
- return De && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
1214
+ return Je && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
1154
1215
  }
1155
1216
  };
1156
1217
  return attemptRequest();
1157
1218
  })(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e, query: a, variables: u }) }).then((e2) => {
1158
- if (Ue && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
1219
+ if (Ye && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
1159
1220
  return e2.json();
1160
1221
  }), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
1161
1222
  }
@@ -1171,9 +1232,9 @@ function sendDomainsToNotPropagateHeaderTo(e, a, u) {
1171
1232
  function createTriageFromRecorder(e, a, u, m2, w2, b2) {
1172
1233
  return sendGraphQLRequest("CreateTriageFromRecorder", "mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description\n ) {\n id\n }\n }\n ", { apiKey: e, recordingSessionId: u, timestampStart: m2, timestampEnd: w2, description: b2, backendApi: a });
1173
1234
  }
1174
- const Be = { enabled: false, openModalExistingMode: { key: "e", requireCmdCtrl: false }, openModalCaptureNewMode: { key: "n", requireCmdCtrl: false }, closeModal: { key: "escape", requireCmdCtrl: false }, submitReport: { key: "enter", requireCmdCtrl: true }, startRecording: { key: "r", requireCmdCtrl: false }, stopRecording: { key: "escape", requireCmdCtrl: true } }, je = { shortcuts: { ...Be }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
1235
+ const Xe = { enabled: false, openModalExistingMode: { key: "e", requireCmdCtrl: false }, openModalCaptureNewMode: { key: "n", requireCmdCtrl: false }, closeModal: { key: "escape", requireCmdCtrl: false }, submitReport: { key: "enter", requireCmdCtrl: true }, startRecording: { key: "r", requireCmdCtrl: false }, stopRecording: { key: "escape", requireCmdCtrl: true } }, Qe = { shortcuts: { ...Xe }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
1175
1236
  } };
1176
- let Ge = null, Ve = { mode: "lookback", description: "" }, qe = null, He = null, Ye = null, Je = false;
1237
+ let et = null, nt = { mode: "lookback", description: "" }, ot = null, st = null, it = null, at = false;
1177
1238
  function getShortcutKeyCmdCtrlLabel() {
1178
1239
  return (function isMacPlatform() {
1179
1240
  const e = navigator.userAgentData;
@@ -1186,11 +1247,11 @@ function getShortcutLabelFromContext(e) {
1186
1247
  return e2.requireCmdCtrl && a.push(getShortcutKeyCmdCtrlLabel()), a.push((function formatShortcutKeyLabel(e3) {
1187
1248
  return ({ escape: "esc" }[e3.toLowerCase()] || e3).toUpperCase();
1188
1249
  })(e2.key)), a.map((e3) => `<span style="background: #F1F5F9; border:1px solid #cbd5e1; border-radius: 4px; padding: 0 4px; font-weight: 500; font-size: 12px; color: #94A3B8; line-height: 16px;">${e3}</span>`).join(e2.requireCmdCtrl ? " + " : "");
1189
- })(je.shortcuts[e]);
1250
+ })(Qe.shortcuts[e]);
1190
1251
  }
1191
1252
  function setupIssueReporting(e) {
1192
- je.apiKey = e.apiKey, je.backendApi = e.backendApi, je.resolveSessionId = e.getSessionId, e.customBaseUrl && (je.triageBaseUrl = e.customBaseUrl), je.shortcuts = (function mergeShortcutsConfig(e2) {
1193
- const a2 = { ...Be };
1253
+ Qe.apiKey = e.apiKey, Qe.backendApi = e.backendApi, Qe.resolveSessionId = e.getSessionId, e.customBaseUrl && (Qe.triageBaseUrl = e.customBaseUrl), Qe.shortcuts = (function mergeShortcutsConfig(e2) {
1254
+ const a2 = { ...Xe };
1194
1255
  if (!e2) return a2;
1195
1256
  "boolean" == typeof e2.enabled && (a2.enabled = e2.enabled);
1196
1257
  const u = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
@@ -1200,7 +1261,7 @@ function setupIssueReporting(e) {
1200
1261
  }
1201
1262
  return a2;
1202
1263
  })(e.shortcuts);
1203
- const { shortcuts: a } = je;
1264
+ const { shortcuts: a } = Qe;
1204
1265
  window.addEventListener("keydown", (e2) => {
1205
1266
  const u = (function isTypingInInput() {
1206
1267
  const e3 = document.activeElement;
@@ -1210,23 +1271,23 @@ function setupIssueReporting(e) {
1210
1271
  } : injectModalHTML;
1211
1272
  if (C2 && shortcutUsed("openModalExistingMode")) return e2.preventDefault(), void x2("lookback");
1212
1273
  if (C2 && shortcutUsed("openModalCaptureNewMode")) return e2.preventDefault(), void x2("startnow");
1213
- if (b2 && !Je && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
1274
+ if (b2 && !at && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
1214
1275
  if (b2 && shortcutUsed("submitReport")) {
1215
1276
  const a2 = document.getElementById("sf-issue-submit-btn");
1216
1277
  return void (a2 && !a2.disabled && (e2.preventDefault(), a2.click()));
1217
1278
  }
1218
- if (Je && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
1219
- if (b2 && "startnow" === Ve.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
1279
+ if (at && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
1280
+ if (b2 && "startnow" === nt.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
1220
1281
  const a2 = document.getElementById("sf-start-recording-btn");
1221
1282
  return void (a2 && (e2.preventDefault(), a2.click()));
1222
1283
  }
1223
1284
  });
1224
1285
  }
1225
1286
  function openReportIssueModal() {
1226
- Je ? stopRecording() : (injectModalHTML(), Ge && document.body.appendChild(Ge));
1287
+ at ? stopRecording() : (injectModalHTML(), et && document.body.appendChild(et));
1227
1288
  }
1228
1289
  function closeModal() {
1229
- je.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (Ge == null ? void 0 : Ge.parentNode) && Ge.parentNode.removeChild(Ge), Ge = null, Je || (Ve = { mode: "lookback", description: "", occurredInThisTab: true }, qe = null, He = null), Ye && clearInterval(Ye);
1290
+ Qe.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (et == null ? void 0 : et.parentNode) && et.parentNode.removeChild(et), et = null, at || (nt = { mode: "lookback", description: "", occurredInThisTab: true }, ot = null, st = null), it && clearInterval(it);
1230
1291
  }
1231
1292
  function activateModalIsolation(e) {
1232
1293
  e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
@@ -1285,9 +1346,9 @@ function activateModalIsolation(e) {
1285
1346
  };
1286
1347
  }
1287
1348
  function injectModalHTML(e = "lookback") {
1288
- Ge && (Ge.remove(), Ge = null), Ge = document.createElement("div"), Ge.id = "sf-report-issue-modal";
1349
+ et && (et.remove(), et = null), et = document.createElement("div"), et.id = "sf-report-issue-modal";
1289
1350
  const a = "startnow" === e;
1290
- Ge.innerHTML = `
1351
+ et.innerHTML = `
1291
1352
  <div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
1292
1353
  <div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
1293
1354
  background:#fff; padding:24px; border-radius:12px;
@@ -1335,7 +1396,7 @@ function injectModalHTML(e = "lookback") {
1335
1396
  <textarea id="sf-issue-description" placeholder="Add description here"
1336
1397
  style="width:100%; height:80px; padding:8px 12px; font-size:14px;
1337
1398
  border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
1338
- resize:none; outline:none;">${Ve.description}</textarea>
1399
+ resize:none; outline:none;">${nt.description}</textarea>
1339
1400
 
1340
1401
  <div id="sf-lookback-container" style="display:${a ? "none" : "block"}; margin-bottom:20px;">
1341
1402
  <label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
@@ -1423,8 +1484,8 @@ function injectModalHTML(e = "lookback") {
1423
1484
  <a href="mailto:info@sailfishqa.com?subject=I'd%20love%20to%20learn%20more&body=Hey%2C%20Sailfish%20AI%20team%20-%20I'd%20love%20to%20learn%20more%20about%20Sailfish%20AI!">Powered by Sailfish AI</a>
1424
1485
  </div>
1425
1486
  </div>
1426
- `, Ve.mode = e, document.body.appendChild(Ge), (function bindListeners() {
1427
- const e2 = Ge == null ? void 0 : Ge.querySelectorAll(".sf-issue-tab"), a2 = document.getElementById("sf-start-recording-btn"), u = document.getElementById("sf-modal-close-btn"), m2 = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-lookback-minutes");
1487
+ `, nt.mode = e, document.body.appendChild(et), (function bindListeners() {
1488
+ const e2 = et == null ? void 0 : et.querySelectorAll(".sf-issue-tab"), a2 = document.getElementById("sf-start-recording-btn"), u = document.getElementById("sf-modal-close-btn"), m2 = document.getElementById("sf-issue-submit-btn"), w2 = document.getElementById("sf-lookback-minutes");
1428
1489
  e2 == null ? void 0 : e2.forEach((e3) => {
1429
1490
  e3.addEventListener("click", (e4) => {
1430
1491
  const a3 = e4.currentTarget.dataset.mode;
@@ -1432,20 +1493,29 @@ function injectModalHTML(e = "lookback") {
1432
1493
  });
1433
1494
  }), u && (u.onclick = closeModal);
1434
1495
  w2 && w2.addEventListener("change", () => {
1435
- "lookback" === Ve.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
1496
+ "lookback" === nt.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
1436
1497
  });
1437
1498
  a2 && (a2.onclick = () => {
1438
1499
  const e3 = document.getElementById("sf-issue-description");
1439
- e3 && (Ve.description = e3.value), (function startCountdownThenRecord() {
1500
+ e3 && (nt.description = e3.value), (function startCountdownThenRecord() {
1440
1501
  if (document.getElementById("sf-countdown-overlay")) return;
1441
1502
  const e4 = document.createElement("div");
1442
1503
  e4.id = "sf-countdown-overlay", e4.style.cssText = "\n position: fixed;\n inset: 0;\n background: rgba(0,0,0,0.6);\n z-index: 10001;\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 80px;\n font-weight: bold;\n color: white;\n font-family: sans-serif;\n ";
1443
1504
  let a3 = 3;
1444
1505
  e4.textContent = a3.toString(), document.body.appendChild(e4);
1445
- const u2 = setInterval(() => {
1446
- a3--, a3 > 0 ? e4.textContent = a3.toString() : (clearInterval(u2), document.body.removeChild(e4), qe = Date.now(), Je = true, closeModal(), (function showFloatingTimer() {
1447
- const e5 = document.createElement("div");
1448
- e5.id = "sf-recording-indicator", e5.style.cssText = "\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n padding: 8px 12px;\n font-family: sans-serif;\n font-size: 14px;\n display: flex;\n align-items: start;\n gap: 24px;\n z-index: 10000;\n cursor: pointer;\n ", e5.innerHTML = `
1506
+ const u2 = setInterval(async () => {
1507
+ if (a3--, a3 > 0) e4.textContent = a3.toString();
1508
+ else {
1509
+ clearInterval(u2), document.body.removeChild(e4), ot = Date.now(), at = true;
1510
+ try {
1511
+ const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => de);
1512
+ e5();
1513
+ } catch (e5) {
1514
+ console.error("[Report Issue] Failed to enable function span tracking:", e5);
1515
+ }
1516
+ closeModal(), (function showFloatingTimer() {
1517
+ const e5 = document.createElement("div");
1518
+ e5.id = "sf-recording-indicator", e5.style.cssText = "\n position: fixed;\n bottom: 20px;\n right: 20px;\n background: white;\n border-radius: 8px;\n box-shadow: 0 4px 20px rgba(0,0,0,0.15);\n padding: 8px 12px;\n font-family: sans-serif;\n font-size: 14px;\n display: flex;\n align-items: start;\n gap: 24px;\n z-index: 10000;\n cursor: pointer;\n ", e5.innerHTML = `
1449
1519
  <div style="display:flex; align-items:center; gap:8px;">
1450
1520
  <div style="width:32px; height:32px; background:#FC5555; border-radius:6px; border:1px solid #991b1b; display:flex; align-items:center; justify-content:center;">
1451
1521
  <div style="width:10px; height:10px; background:white; border-radius:2px;"></div>
@@ -1462,22 +1532,23 @@ function injectModalHTML(e = "lookback") {
1462
1532
  </span>
1463
1533
  </div>
1464
1534
  `, e5.addEventListener("click", () => stopRecording()), document.body.appendChild(e5);
1465
- const a4 = e5.querySelector("#sf-recording-timer");
1466
- if (!a4) return;
1467
- Ye = setInterval(() => {
1468
- const e6 = Date.now() - (qe ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
1469
- a4.textContent = `${u3}:${m3}`;
1470
- }, 1e3);
1471
- })());
1535
+ const a4 = e5.querySelector("#sf-recording-timer");
1536
+ if (!a4) return;
1537
+ it = setInterval(() => {
1538
+ const e6 = Date.now() - (ot ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
1539
+ a4.textContent = `${u3}:${m3}`;
1540
+ }, 1e3);
1541
+ })();
1542
+ }
1472
1543
  }, 1e3);
1473
1544
  })();
1474
1545
  });
1475
- Ge == null ? void 0 : Ge.addEventListener("click", (e3) => {
1546
+ et == null ? void 0 : et.addEventListener("click", (e3) => {
1476
1547
  var _a2;
1477
1548
  if (e3.target.closest("#sf-issue-submit-btn")) {
1478
- const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = Ve.mode;
1549
+ const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = nt.mode;
1479
1550
  let u2, m3;
1480
- if (Ve.description = e4, "startnow" === a3) u2 = qe ?? Date.now() - 3e5, m3 = He ?? Date.now();
1551
+ if (nt.description = e4, "startnow" === a3) u2 = ot ?? Date.now() - 3e5, m3 = st ?? Date.now();
1481
1552
  else {
1482
1553
  const e5 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
1483
1554
  m3 = Date.now(), u2 = m3 - e5;
@@ -1486,9 +1557,9 @@ function injectModalHTML(e = "lookback") {
1486
1557
  var _a3, _b;
1487
1558
  try {
1488
1559
  showTriageStatusModal(true);
1489
- const m4 = await createTriageFromRecorder(je.apiKey, je.backendApi, (function getSessionIdSafely() {
1490
- if (!je.resolveSessionId) throw new Error("getSessionId not defined");
1491
- return je.resolveSessionId();
1560
+ const m4 = await createTriageFromRecorder(Qe.apiKey, Qe.backendApi, (function getSessionIdSafely() {
1561
+ if (!Qe.resolveSessionId) throw new Error("getSessionId not defined");
1562
+ return Qe.resolveSessionId();
1492
1563
  })(), e5, a4, u3), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
1493
1564
  w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
1494
1565
  } catch (e6) {
@@ -1497,27 +1568,34 @@ function injectModalHTML(e = "lookback") {
1497
1568
  })(`${u2}`, `${m3}`, e4);
1498
1569
  }
1499
1570
  });
1500
- })(), je.deactivateIsolation = activateModalIsolation(Ge);
1571
+ })(), Qe.deactivateIsolation = activateModalIsolation(et);
1501
1572
  }
1502
1573
  function setActiveTab(e) {
1503
- Ve.mode = e;
1504
- const a = Ge == null ? void 0 : Ge.querySelector("#sf-tab-lookback"), u = Ge == null ? void 0 : Ge.querySelector("#sf-tab-startnow");
1574
+ nt.mode = e;
1575
+ const a = et == null ? void 0 : et.querySelector("#sf-tab-lookback"), u = et == null ? void 0 : et.querySelector("#sf-tab-startnow");
1505
1576
  "lookback" === e ? (a.style.background = "white", a.style.color = "#0F172A", u.style.background = "transparent", u.style.color = "#64748B") : (u.style.background = "white", u.style.color = "#0F172A", a.style.background = "transparent", a.style.color = "#64748B");
1506
1577
  }
1507
1578
  function updateModeSpecificUI(e) {
1508
1579
  const a = document.querySelector("#sf-issue-mode-info div"), u = document.getElementById("sf-issue-submit-btn"), m2 = document.getElementById("sf-record-button-container"), w2 = document.getElementById("sf-recording-timer-label"), b2 = document.getElementById("sf-recording-timer-display"), C2 = document.getElementById("sf-modal-footer"), x2 = document.getElementById("sf-lookback-container");
1509
1580
  if (a && u && m2 && w2 && b2 && C2 && x2) if ("startnow" === e) {
1510
1581
  m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
1511
- const e2 = null !== qe && null !== He;
1512
- if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", qe && He) {
1513
- const e3 = Math.floor((He - qe) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
1582
+ const e2 = null !== ot && null !== st;
1583
+ if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", ot && st) {
1584
+ const e3 = Math.floor((st - ot) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
1514
1585
  w2.style.display = "block", b2.textContent = `${a2}:${u2}`;
1515
1586
  } else w2.style.display = "none";
1516
1587
  } else m2.style.display = "none", w2.style.display = "none", x2.style.display = "block", C2.style.justifyContent = "flex-end", a.textContent = "Something already happened. Capture the past few minutes.", u.disabled = false, u.style.opacity = "1", u.style.cursor = "pointer";
1517
1588
  }
1518
- function stopRecording() {
1589
+ async function stopRecording() {
1519
1590
  var _a2;
1520
- He = Date.now(), Je = false, Ye && clearInterval(Ye), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove(), (function reopenModalAfterStop() {
1591
+ st = Date.now(), at = false, it && clearInterval(it), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
1592
+ try {
1593
+ const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => de);
1594
+ e();
1595
+ } catch (e) {
1596
+ console.error("[Report Issue] Failed to disable function span tracking:", e);
1597
+ }
1598
+ !(function reopenModalAfterStop() {
1521
1599
  injectModalHTML("startnow");
1522
1600
  const e = document.getElementById("sf-start-recording-btn");
1523
1601
  if (e) {
@@ -1525,17 +1603,17 @@ function stopRecording() {
1525
1603
  a2 && (a2.textContent = "Re-record");
1526
1604
  }
1527
1605
  const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
1528
- if (a && u && qe && He) {
1529
- const e2 = Math.floor((He - qe) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
1606
+ if (a && u && ot && st) {
1607
+ const e2 = Math.floor((st - ot) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
1530
1608
  u.textContent = `${m3}:${w3}`, a.style.display = "block";
1531
1609
  }
1532
1610
  const m2 = document.getElementById("sf-issue-description");
1533
- m2 && (m2.value = Ve.description);
1611
+ m2 && (m2.value = nt.description);
1534
1612
  const w2 = document.querySelector('input[value="startnow"]');
1535
1613
  w2 && (w2.checked = true);
1536
1614
  const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
1537
1615
  if (b2 && C2) {
1538
- const e2 = Math.floor(((He ?? 0) - (qe ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
1616
+ const e2 = Math.floor(((st ?? 0) - (ot ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
1539
1617
  C2.textContent = `${a2}:${u2}`, C2.style.color = "black", b2.style.display = "flex";
1540
1618
  }
1541
1619
  const x2 = document.getElementById("sf-issue-submit-btn");
@@ -1548,7 +1626,7 @@ function showTriageStatusModal(e, a) {
1548
1626
  var _a3, _b;
1549
1627
  (_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
1550
1628
  })();
1551
- const u = a ? `${je.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
1629
+ const u = a ? `${Qe.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
1552
1630
  m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
1553
1631
  const w2 = e ? "Reporting Issue..." : "Issue reported!", b2 = e ? '<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>' : "", C2 = e ? '<div style="display:flex; justify-content:center; align-items:center; padding: 40px 0;">\n <div style="width:24px; height:24px; border:2px solid #295dbf; border-top:2px solid white; border-radius:50%; animation:spin 1s linear infinite;"></div>\n </div>' : "", x2 = e ? "" : '<div id="sf-copied-status" style="display:none; font-size:12px; font-weight:500; color:white;\n background-color:#22c55e; padding:4px 8px; border-radius:6px; white-space:nowrap; align-items:center; gap:6px;">\n <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M21 7.5L9 19.5L3 13.5L5.25 11.25L9 15L18.75 5.25L21 7.5Z" fill="white"/>\n </svg>\n Copied\n </div>';
1554
1632
  m2.innerHTML = `
@@ -1610,7 +1688,7 @@ function showTriageStatusModal(e, a) {
1610
1688
  function fadeCardAndRemove(e, a, u = 300) {
1611
1689
  a.style.opacity = "0", a.addEventListener("transitionend", () => e.remove(), { once: true }), setTimeout(() => e.remove(), u + 100);
1612
1690
  }
1613
- var Xe = Object.defineProperty, b$1 = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? Xe(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), Qe = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? Qe(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), et = ((e) => (e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment", e))(et || {});
1691
+ var lt = Object.defineProperty, b$1 = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? lt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), ct = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? ct(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), ut = ((e) => (e[e.Document = 0] = "Document", e[e.DocumentType = 1] = "DocumentType", e[e.Element = 2] = "Element", e[e.Text = 3] = "Text", e[e.CDATA = 4] = "CDATA", e[e.Comment = 5] = "Comment", e))(ut || {});
1614
1692
  function vr(e) {
1615
1693
  return e.nodeType === e.ELEMENT_NODE;
1616
1694
  }
@@ -1652,7 +1730,7 @@ function kr(e) {
1652
1730
  })(e.cssText);
1653
1731
  return a || e.cssText;
1654
1732
  }
1655
- let nt = class {
1733
+ let pt = class {
1656
1734
  constructor() {
1657
1735
  xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
1658
1736
  }
@@ -1704,7 +1782,7 @@ function Zt({ element: e, maskInputOptions: a, tagName: u, type: m2, value: w2,
1704
1782
  function fe(e) {
1705
1783
  return e.toLowerCase();
1706
1784
  }
1707
- const ot = "__rrweb_original__";
1785
+ const dt = "__rrweb_original__";
1708
1786
  function Yt(e) {
1709
1787
  const a = e.type;
1710
1788
  return e.hasAttribute("data-rr-is-password") ? "password" : a ? fe(a) : null;
@@ -1719,19 +1797,19 @@ function xr(e, a) {
1719
1797
  const m2 = u.pathname.match(/\.([0-9a-z]+)(?:$)/i);
1720
1798
  return (null == m2 ? void 0 : m2[1]) ?? null;
1721
1799
  }
1722
- let st = 1;
1723
- const it = new RegExp("[^a-z0-9-_:]");
1800
+ let ht = 1;
1801
+ const gt = new RegExp("[^a-z0-9-_:]");
1724
1802
  function Ir() {
1725
- return st++;
1803
+ return ht++;
1726
1804
  }
1727
- let at, lt;
1728
- const ct = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, ut = /^(?:[a-z+]+:)?\/\//i, pt = /^www\..*/i, dt = /^(data:)([^,]*),(.*)/i;
1805
+ let yt, wt;
1806
+ const bt = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, St = /^(?:[a-z+]+:)?\/\//i, vt = /^www\..*/i, Ct = /^(data:)([^,]*),(.*)/i;
1729
1807
  function Pt(e, a) {
1730
- return (e || "").replace(ct, (e2, u, m2, w2, b2, C2) => {
1808
+ return (e || "").replace(bt, (e2, u, m2, w2, b2, C2) => {
1731
1809
  const x2 = m2 || b2 || C2, I2 = u || w2 || "";
1732
1810
  if (!x2) return e2;
1733
- if (ut.test(x2) || pt.test(x2)) return `url(${I2}${x2}${I2})`;
1734
- if (dt.test(x2)) return `url(${I2}${x2}${I2})`;
1811
+ if (St.test(x2) || vt.test(x2)) return `url(${I2}${x2}${I2})`;
1812
+ if (Ct.test(x2)) return `url(${I2}${x2}${I2})`;
1735
1813
  if ("/" === x2[0]) return `url(${I2}${(function Ei(e3) {
1736
1814
  let a2 = "";
1737
1815
  return a2 = e3.indexOf("//") > -1 ? e3.split("/").slice(0, 3).join("/") : e3.split("/")[0], a2 = a2.split("?")[0], a2;
@@ -1742,8 +1820,8 @@ function Pt(e, a) {
1742
1820
  return `url(${I2}${_2.join("/")}${I2})`;
1743
1821
  });
1744
1822
  }
1745
- const ht = /^[^ \t\n\r\u000c]+/, gt = /^[, \t\n\r\u000c]+/;
1746
- const yt = /* @__PURE__ */ new WeakMap();
1823
+ const kt = /^[^ \t\n\r\u000c]+/, xt = /^[, \t\n\r\u000c]+/;
1824
+ const Mt = /* @__PURE__ */ new WeakMap();
1747
1825
  function At(e, a) {
1748
1826
  return a && "" !== a.trim() ? $t(e, a) : a;
1749
1827
  }
@@ -1751,8 +1829,8 @@ function Fi(e) {
1751
1829
  return !("svg" !== e.tagName && !e.ownerSVGElement);
1752
1830
  }
1753
1831
  function $t(e, a) {
1754
- let u = yt.get(e);
1755
- if (u || (u = e.createElement("a"), yt.set(e, u)), a) {
1832
+ let u = Mt.get(e);
1833
+ if (u || (u = e.createElement("a"), Mt.set(e, u)), a) {
1756
1834
  if (a.startsWith("blob:") || a.startsWith("data:")) return a;
1757
1835
  } else a = "";
1758
1836
  return u.setAttribute("href", a), u.href;
@@ -1767,8 +1845,8 @@ function Mr(e, a, u, m2) {
1767
1845
  return w2 ? (m4 = w2[0], u2 += m4.length, m4) : "";
1768
1846
  }
1769
1847
  const m3 = [];
1770
- for (; n(gt), !(u2 >= a2.length); ) {
1771
- let w2 = n(ht);
1848
+ for (; n(xt), !(u2 >= a2.length); ) {
1849
+ let w2 = n(kt);
1772
1850
  if ("," === w2.slice(-1)) w2 = At(e2, w2.substring(0, w2.length - 1)), m3.push(w2);
1773
1851
  else {
1774
1852
  let b2 = "";
@@ -1831,16 +1909,16 @@ function Er(e, a, u, m2) {
1831
1909
  return false;
1832
1910
  }
1833
1911
  function zi(e, a) {
1834
- const { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: C2, inlineStylesheet: x2, maskInputOptions: I2 = {}, maskTextFn: _2, maskInputFn: O2, dataURLOptions: E2 = {}, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: $2 = false } = a, B2 = (function Bi(e2, a2) {
1912
+ const { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: C2, inlineStylesheet: x2, maskInputOptions: I2 = {}, maskTextFn: _2, maskInputFn: O2, dataURLOptions: E2 = {}, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: B2 = false } = a, $2 = (function Bi(e2, a2) {
1835
1913
  if (!a2.hasNode(e2)) return;
1836
1914
  const u2 = a2.getId(e2);
1837
1915
  return 1 === u2 ? void 0 : u2;
1838
1916
  })(u, m2);
1839
1917
  switch (e.nodeType) {
1840
1918
  case e.DOCUMENT_NODE:
1841
- return "CSS1Compat" !== e.compatMode ? { type: et.Document, childNodes: [], compatMode: e.compatMode } : { type: et.Document, childNodes: [] };
1919
+ return "CSS1Compat" !== e.compatMode ? { type: ut.Document, childNodes: [], compatMode: e.compatMode } : { type: ut.Document, childNodes: [] };
1842
1920
  case e.DOCUMENT_TYPE_NODE:
1843
- return { type: et.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: B2 };
1921
+ return { type: ut.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: $2 };
1844
1922
  case e.ELEMENT_NODE:
1845
1923
  return (function Vi(e2, a2) {
1846
1924
  const { doc: u2, blockClass: m3, blockSelector: w3, inlineStylesheet: b3, maskInputOptions: C3 = {}, maskInputFn: x3, dataURLOptions: I3 = {}, inlineImages: _3, recordCanvas: O3, keepIframeSrcFn: E3, newlyAddedElement: D3 = false, rootId: F3 } = a2, U3 = (function Ui(e3, a3, u3) {
@@ -1855,79 +1933,79 @@ function zi(e, a) {
1855
1933
  } catch {
1856
1934
  }
1857
1935
  return false;
1858
- })(e2, m3, w3), $3 = (function Oi(e3) {
1936
+ })(e2, m3, w3), B3 = (function Oi(e3) {
1859
1937
  if (e3 instanceof HTMLFormElement) return "form";
1860
1938
  const a3 = fe(e3.tagName);
1861
- return it.test(a3) ? "div" : a3;
1939
+ return gt.test(a3) ? "div" : a3;
1862
1940
  })(e2);
1863
- let B3 = {};
1941
+ let $3 = {};
1864
1942
  const z2 = e2.attributes.length;
1865
1943
  for (let a3 = 0; a3 < z2; a3++) {
1866
1944
  const m4 = e2.attributes[a3];
1867
- Or($3, m4.name, m4.value) || (B3[m4.name] = Mr(u2, $3, fe(m4.name), m4.value));
1945
+ Or(B3, m4.name, m4.value) || ($3[m4.name] = Mr(u2, B3, fe(m4.name), m4.value));
1868
1946
  }
1869
- if ("link" === $3 && b3) {
1947
+ if ("link" === B3 && b3) {
1870
1948
  const a3 = Array.from(u2.styleSheets).find((a4) => a4.href === e2.href);
1871
1949
  let m4 = null;
1872
- a3 && (m4 = Tt(a3)), m4 && (delete B3.rel, delete B3.href, B3._cssText = Pt(m4, a3.href));
1950
+ a3 && (m4 = Tt(a3)), m4 && (delete $3.rel, delete $3.href, $3._cssText = Pt(m4, a3.href));
1873
1951
  }
1874
- if ("style" === $3 && e2.sheet && !(e2.innerText || e2.textContent || "").trim().length) {
1952
+ if ("style" === B3 && e2.sheet && !(e2.innerText || e2.textContent || "").trim().length) {
1875
1953
  const a3 = Tt(e2.sheet);
1876
- a3 && (B3._cssText = Pt(a3, $t(u2)));
1954
+ a3 && ($3._cssText = Pt(a3, $t(u2)));
1877
1955
  }
1878
- if ("input" === $3 || "textarea" === $3 || "select" === $3) {
1956
+ if ("input" === B3 || "textarea" === B3 || "select" === B3) {
1879
1957
  const a3 = e2.value, u3 = e2.checked;
1880
- if ("radio" !== B3.type && "checkbox" !== B3.type && "submit" !== B3.type && "button" !== B3.type && a3) {
1881
- const u4 = Zt({ element: e2, type: Yt(e2), tagName: $3, value: a3, maskInputOptions: C3, maskInputFn: x3 });
1882
- B3.value = u4.value, u4.masked && (B3.masked = true);
1883
- } else u3 && (B3.checked = u3);
1958
+ if ("radio" !== $3.type && "checkbox" !== $3.type && "submit" !== $3.type && "button" !== $3.type && a3) {
1959
+ const u4 = Zt({ element: e2, type: Yt(e2), tagName: B3, value: a3, maskInputOptions: C3, maskInputFn: x3 });
1960
+ $3.value = u4.value, u4.masked && ($3.masked = true);
1961
+ } else u3 && ($3.checked = u3);
1884
1962
  }
1885
- if ("option" === $3 && (e2.selected && !C3.select ? B3.selected = true : delete B3.selected), "canvas" === $3 && O3) {
1963
+ if ("option" === B3 && (e2.selected && !C3.select ? $3.selected = true : delete $3.selected), "canvas" === B3 && O3) {
1886
1964
  if ("2d" === e2.__context) (function xi(e3) {
1887
1965
  const a3 = e3.getContext("2d");
1888
1966
  if (!a3) return true;
1889
1967
  for (let u3 = 0; u3 < e3.width; u3 += 50) for (let m4 = 0; m4 < e3.height; m4 += 50) {
1890
- const w4 = a3.getImageData, b4 = ot in w4 ? w4[ot] : w4;
1968
+ const w4 = a3.getImageData, b4 = dt in w4 ? w4[dt] : w4;
1891
1969
  if (new Uint32Array(b4.call(a3, u3, m4, Math.min(50, e3.width - u3), Math.min(50, e3.height - m4)).data.buffer).some((e4) => 0 !== e4)) return false;
1892
1970
  }
1893
1971
  return true;
1894
- })(e2) || (B3.rr_dataURL = e2.toDataURL(I3.type, I3.quality));
1972
+ })(e2) || ($3.rr_dataURL = e2.toDataURL(I3.type, I3.quality));
1895
1973
  else if (!("__context" in e2)) {
1896
1974
  const a3 = e2.toDataURL(I3.type, I3.quality), m4 = u2.createElement("canvas");
1897
1975
  m4.width = e2.width, m4.height = e2.height;
1898
- a3 !== m4.toDataURL(I3.type, I3.quality) && (B3.rr_dataURL = a3);
1976
+ a3 !== m4.toDataURL(I3.type, I3.quality) && ($3.rr_dataURL = a3);
1899
1977
  }
1900
1978
  }
1901
- if ("img" === $3 && _3) {
1902
- at || (at = u2.createElement("canvas"), lt = at.getContext("2d"));
1979
+ if ("img" === B3 && _3) {
1980
+ yt || (yt = u2.createElement("canvas"), wt = yt.getContext("2d"));
1903
1981
  const a3 = e2, m4 = a3.currentSrc || a3.getAttribute("src") || "<unknown-src>", w4 = a3.crossOrigin, A = () => {
1904
1982
  a3.removeEventListener("load", A);
1905
1983
  try {
1906
- at.width = a3.naturalWidth, at.height = a3.naturalHeight, lt.drawImage(a3, 0, 0), B3.rr_dataURL = at.toDataURL(I3.type, I3.quality);
1984
+ yt.width = a3.naturalWidth, yt.height = a3.naturalHeight, wt.drawImage(a3, 0, 0), $3.rr_dataURL = yt.toDataURL(I3.type, I3.quality);
1907
1985
  } catch (e3) {
1908
1986
  if ("anonymous" !== a3.crossOrigin) return a3.crossOrigin = "anonymous", void (a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A));
1909
1987
  console.warn(`Cannot inline img src=${m4}! Error: ${e3}`);
1910
1988
  }
1911
- "anonymous" === a3.crossOrigin && (w4 ? B3.crossOrigin = w4 : a3.removeAttribute("crossorigin"));
1989
+ "anonymous" === a3.crossOrigin && (w4 ? $3.crossOrigin = w4 : a3.removeAttribute("crossorigin"));
1912
1990
  };
1913
1991
  a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A);
1914
1992
  }
1915
- if ("audio" === $3 || "video" === $3) {
1916
- const a3 = B3;
1993
+ if ("audio" === B3 || "video" === B3) {
1994
+ const a3 = $3;
1917
1995
  a3.rr_mediaState = e2.paused ? "paused" : "played", a3.rr_mediaCurrentTime = e2.currentTime, a3.rr_mediaPlaybackRate = e2.playbackRate, a3.rr_mediaMuted = e2.muted, a3.rr_mediaLoop = e2.loop, a3.rr_mediaVolume = e2.volume;
1918
1996
  }
1919
- if (D3 || (e2.scrollLeft && (B3.rr_scrollLeft = e2.scrollLeft), e2.scrollTop && (B3.rr_scrollTop = e2.scrollTop)), U3) {
1997
+ if (D3 || (e2.scrollLeft && ($3.rr_scrollLeft = e2.scrollLeft), e2.scrollTop && ($3.rr_scrollTop = e2.scrollTop)), U3) {
1920
1998
  const { width: a3, height: u3 } = e2.getBoundingClientRect();
1921
- B3 = { class: B3.class, rr_width: `${a3}px`, rr_height: `${u3}px` };
1999
+ $3 = { class: $3.class, rr_width: `${a3}px`, rr_height: `${u3}px` };
1922
2000
  }
1923
2001
  let j2;
1924
- "iframe" === $3 && !E3(B3.src) && (e2.contentDocument || (B3.rr_src = B3.src), delete B3.src);
2002
+ "iframe" === B3 && !E3($3.src) && (e2.contentDocument || ($3.rr_src = $3.src), delete $3.src);
1925
2003
  try {
1926
- customElements.get($3) && (j2 = true);
2004
+ customElements.get(B3) && (j2 = true);
1927
2005
  } catch {
1928
2006
  }
1929
- return { type: et.Element, tagName: $3, attributes: B3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
1930
- })(e, { doc: u, blockClass: w2, blockSelector: b2, inlineStylesheet: x2, maskInputOptions: I2, maskInputFn: O2, dataURLOptions: E2, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: $2, rootId: B2 });
2007
+ return { type: ut.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
2008
+ })(e, { doc: u, blockClass: w2, blockSelector: b2, inlineStylesheet: x2, maskInputOptions: I2, maskInputFn: O2, dataURLOptions: E2, inlineImages: D2, recordCanvas: F2, keepIframeSrcFn: U2, newlyAddedElement: B2, rootId: $2 });
1931
2009
  case e.TEXT_NODE:
1932
2010
  return (function ji(e2, a2) {
1933
2011
  var u2;
@@ -1942,12 +2020,12 @@ function zi(e, a) {
1942
2020
  }
1943
2021
  x3 = Pt(x3, $t(a2.doc));
1944
2022
  }
1945
- return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: et.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
1946
- })(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: B2 });
2023
+ return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: ut.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
2024
+ })(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: $2 });
1947
2025
  case e.CDATA_SECTION_NODE:
1948
- return { type: et.CDATA, textContent: "", rootId: B2 };
2026
+ return { type: ut.CDATA, textContent: "", rootId: $2 };
1949
2027
  case e.COMMENT_NODE:
1950
- return { type: et.Comment, textContent: e.textContent || "", rootId: B2 };
2028
+ return { type: ut.Comment, textContent: e.textContent || "", rootId: $2 };
1951
2029
  default:
1952
2030
  return false;
1953
2031
  }
@@ -1956,28 +2034,28 @@ function N(e) {
1956
2034
  return null == e ? "" : e.toLowerCase();
1957
2035
  }
1958
2036
  function Se(e, a) {
1959
- const { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2 = false, inlineStylesheet: _2 = true, maskInputOptions: O2 = {}, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2 = {}, inlineImages: $2 = false, recordCanvas: B2 = false, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2 = 5e3, onStylesheetLoad: q2, stylesheetLoadTimeout: H2 = 5e3, keepIframeSrcFn: Y2 = () => false, newlyAddedElement: J2 = false } = a;
2037
+ const { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2 = false, inlineStylesheet: _2 = true, maskInputOptions: O2 = {}, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2 = {}, inlineImages: B2 = false, recordCanvas: $2 = false, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2 = 5e3, onStylesheetLoad: q2, stylesheetLoadTimeout: H2 = 5e3, keepIframeSrcFn: J2 = () => false, newlyAddedElement: Y2 = false } = a;
1960
2038
  let { needsMask: X2 } = a, { preserveWhiteSpace: Q2 = true } = a;
1961
2039
  X2 || (X2 = Er(e, C2, x2, void 0 === X2));
1962
- const ee2 = zi(e, { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, dataURLOptions: U2, inlineImages: $2, recordCanvas: B2, keepIframeSrcFn: Y2, newlyAddedElement: J2 });
2040
+ const ee2 = zi(e, { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, keepIframeSrcFn: J2, newlyAddedElement: Y2 });
1963
2041
  if (!ee2) return console.warn(e, "not serialized"), null;
1964
2042
  let te2;
1965
2043
  te2 = m2.hasNode(e) ? m2.getId(e) : (function Gi(e2, a2) {
1966
- return !!(a2.comment && e2.type === et.Comment || e2.type === et.Element && (a2.script && ("script" === e2.tagName || "link" === e2.tagName && ("preload" === e2.attributes.rel || "modulepreload" === e2.attributes.rel) && "script" === e2.attributes.as || "link" === e2.tagName && "prefetch" === e2.attributes.rel && "string" == typeof e2.attributes.href && "js" === xr(e2.attributes.href)) || a2.headFavicon && ("link" === e2.tagName && "shortcut icon" === e2.attributes.rel || "meta" === e2.tagName && (N(e2.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === N(e2.attributes.name) || "icon" === N(e2.attributes.rel) || "apple-touch-icon" === N(e2.attributes.rel) || "shortcut icon" === N(e2.attributes.rel))) || "meta" === e2.tagName && (a2.headMetaDescKeywords && N(e2.attributes.name).match(/^description|keywords$/) || a2.headMetaSocial && (N(e2.attributes.property).match(/^(og|twitter|fb):/) || N(e2.attributes.name).match(/^(og|twitter):/) || "pinterest" === N(e2.attributes.name)) || a2.headMetaRobots && ("robots" === N(e2.attributes.name) || "googlebot" === N(e2.attributes.name) || "bingbot" === N(e2.attributes.name)) || a2.headMetaHttpEquiv && void 0 !== e2.attributes["http-equiv"] || a2.headMetaAuthorship && ("author" === N(e2.attributes.name) || "generator" === N(e2.attributes.name) || "framework" === N(e2.attributes.name) || "publisher" === N(e2.attributes.name) || "progid" === N(e2.attributes.name) || N(e2.attributes.property).match(/^article:/) || N(e2.attributes.property).match(/^product:/)) || a2.headMetaVerification && ("google-site-verification" === N(e2.attributes.name) || "yandex-verification" === N(e2.attributes.name) || "csrf-token" === N(e2.attributes.name) || "p:domain_verify" === N(e2.attributes.name) || "verify-v1" === N(e2.attributes.name) || "verification" === N(e2.attributes.name) || "shopify-checkout-api-token" === N(e2.attributes.name)))));
1967
- })(ee2, F2) || !Q2 && ee2.type === et.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
2044
+ return !!(a2.comment && e2.type === ut.Comment || e2.type === ut.Element && (a2.script && ("script" === e2.tagName || "link" === e2.tagName && ("preload" === e2.attributes.rel || "modulepreload" === e2.attributes.rel) && "script" === e2.attributes.as || "link" === e2.tagName && "prefetch" === e2.attributes.rel && "string" == typeof e2.attributes.href && "js" === xr(e2.attributes.href)) || a2.headFavicon && ("link" === e2.tagName && "shortcut icon" === e2.attributes.rel || "meta" === e2.tagName && (N(e2.attributes.name).match(/^msapplication-tile(image|color)$/) || "application-name" === N(e2.attributes.name) || "icon" === N(e2.attributes.rel) || "apple-touch-icon" === N(e2.attributes.rel) || "shortcut icon" === N(e2.attributes.rel))) || "meta" === e2.tagName && (a2.headMetaDescKeywords && N(e2.attributes.name).match(/^description|keywords$/) || a2.headMetaSocial && (N(e2.attributes.property).match(/^(og|twitter|fb):/) || N(e2.attributes.name).match(/^(og|twitter):/) || "pinterest" === N(e2.attributes.name)) || a2.headMetaRobots && ("robots" === N(e2.attributes.name) || "googlebot" === N(e2.attributes.name) || "bingbot" === N(e2.attributes.name)) || a2.headMetaHttpEquiv && void 0 !== e2.attributes["http-equiv"] || a2.headMetaAuthorship && ("author" === N(e2.attributes.name) || "generator" === N(e2.attributes.name) || "framework" === N(e2.attributes.name) || "publisher" === N(e2.attributes.name) || "progid" === N(e2.attributes.name) || N(e2.attributes.property).match(/^article:/) || N(e2.attributes.property).match(/^product:/)) || a2.headMetaVerification && ("google-site-verification" === N(e2.attributes.name) || "yandex-verification" === N(e2.attributes.name) || "csrf-token" === N(e2.attributes.name) || "p:domain_verify" === N(e2.attributes.name) || "verify-v1" === N(e2.attributes.name) || "verification" === N(e2.attributes.name) || "shopify-checkout-api-token" === N(e2.attributes.name)))));
2045
+ })(ee2, F2) || !Q2 && ee2.type === ut.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
1968
2046
  const ne2 = Object.assign(ee2, { id: te2 });
1969
2047
  if (m2.add(e, ne2), -2 === te2) return null;
1970
2048
  z2 && z2(e);
1971
2049
  let re2 = !I2;
1972
- if (ne2.type === et.Element) {
2050
+ if (ne2.type === ut.Element) {
1973
2051
  re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
1974
2052
  const a2 = e.shadowRoot;
1975
2053
  a2 && ze(a2) && (ne2.isShadowHost = true);
1976
2054
  }
1977
- if ((ne2.type === et.Document || ne2.type === et.Element) && re2) {
1978
- F2.headWhitespace && ne2.type === et.Element && "head" === ne2.tagName && (Q2 = false);
1979
- const a2 = { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: $2, recordCanvas: B2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: Y2 };
1980
- if (ne2.type !== et.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
2055
+ if ((ne2.type === ut.Document || ne2.type === ut.Element) && re2) {
2056
+ F2.headWhitespace && ne2.type === ut.Element && "head" === ne2.tagName && (Q2 = false);
2057
+ const a2 = { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: I2, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 };
2058
+ if (ne2.type !== ut.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
1981
2059
  const e2 = Se(u2, a2);
1982
2060
  e2 && ne2.childNodes.push(e2);
1983
2061
  }
@@ -1986,7 +2064,7 @@ function Se(e, a) {
1986
2064
  m3 && (ze(e.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
1987
2065
  }
1988
2066
  }
1989
- return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === et.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
2067
+ return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === ut.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
1990
2068
  const m3 = e2.contentWindow;
1991
2069
  if (!m3) return;
1992
2070
  let w3, b3 = false;
@@ -2009,10 +2087,10 @@ function Se(e, a) {
2009
2087
  })(e, () => {
2010
2088
  const a2 = e.contentDocument;
2011
2089
  if (a2 && j2) {
2012
- const u2 = Se(a2, { doc: a2, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: false, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: $2, recordCanvas: B2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: Y2 });
2090
+ const u2 = Se(a2, { doc: a2, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: false, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 });
2013
2091
  u2 && j2(e, u2);
2014
2092
  }
2015
- }, V2), ne2.type === et.Element && "link" === ne2.tagName && "string" == typeof ne2.attributes.rel && ("stylesheet" === ne2.attributes.rel || "preload" === ne2.attributes.rel && "string" == typeof ne2.attributes.href && "css" === xr(ne2.attributes.href)) && (function Wi(e2, a2, u2) {
2093
+ }, V2), ne2.type === ut.Element && "link" === ne2.tagName && "string" == typeof ne2.attributes.rel && ("stylesheet" === ne2.attributes.rel || "preload" === ne2.attributes.rel && "string" == typeof ne2.attributes.href && "css" === xr(ne2.attributes.href)) && (function Wi(e2, a2, u2) {
2016
2094
  let m3, w3 = false;
2017
2095
  try {
2018
2096
  m3 = e2.sheet;
@@ -2028,7 +2106,7 @@ function Se(e, a) {
2028
2106
  });
2029
2107
  })(e, () => {
2030
2108
  if (q2) {
2031
- const a2 = Se(e, { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: false, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: $2, recordCanvas: B2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: Y2 });
2109
+ const a2 = Se(e, { doc: u, mirror: m2, blockClass: w2, blockSelector: b2, needsMask: X2, maskTextClass: C2, maskTextSelector: x2, skipChild: false, inlineStylesheet: _2, maskInputOptions: O2, maskTextFn: E2, maskInputFn: D2, slimDOMOptions: F2, dataURLOptions: U2, inlineImages: B2, recordCanvas: $2, preserveWhiteSpace: Q2, onSerialize: z2, onIframeLoad: j2, iframeLoadTimeout: V2, onStylesheetLoad: q2, stylesheetLoadTimeout: H2, keepIframeSrcFn: J2 });
2032
2110
  a2 && q2(e, a2);
2033
2111
  }
2034
2112
  }, H2), ne2;
@@ -2052,13 +2130,13 @@ function $i(e) {
2052
2130
  } });
2053
2131
  }), u;
2054
2132
  }
2055
- var wt = { exports: {} }, bt = String, Rr = function() {
2056
- return { isColorSupported: false, reset: bt, bold: bt, dim: bt, italic: bt, underline: bt, inverse: bt, hidden: bt, strikethrough: bt, black: bt, red: bt, green: bt, yellow: bt, blue: bt, magenta: bt, cyan: bt, white: bt, gray: bt, bgBlack: bt, bgRed: bt, bgGreen: bt, bgYellow: bt, bgBlue: bt, bgMagenta: bt, bgCyan: bt, bgWhite: bt, blackBright: bt, redBright: bt, greenBright: bt, yellowBright: bt, blueBright: bt, magentaBright: bt, cyanBright: bt, whiteBright: bt, bgBlackBright: bt, bgRedBright: bt, bgGreenBright: bt, bgYellowBright: bt, bgBlueBright: bt, bgMagentaBright: bt, bgCyanBright: bt, bgWhiteBright: bt };
2133
+ var It = { exports: {} }, Et = String, Rr = function() {
2134
+ return { isColorSupported: false, reset: Et, bold: Et, dim: Et, italic: Et, underline: Et, inverse: Et, hidden: Et, strikethrough: Et, black: Et, red: Et, green: Et, yellow: Et, blue: Et, magenta: Et, cyan: Et, white: Et, gray: Et, bgBlack: Et, bgRed: Et, bgGreen: Et, bgYellow: Et, bgBlue: Et, bgMagenta: Et, bgCyan: Et, bgWhite: Et, blackBright: Et, redBright: Et, greenBright: Et, yellowBright: Et, blueBright: Et, magentaBright: Et, cyanBright: Et, whiteBright: Et, bgBlackBright: Et, bgRedBright: Et, bgGreenBright: Et, bgYellowBright: Et, bgBlueBright: Et, bgMagentaBright: Et, bgCyanBright: Et, bgWhiteBright: Et };
2057
2135
  };
2058
- wt.exports = Rr(), wt.exports.createColors = Rr;
2059
- var St = wt.exports;
2060
- const vt = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
2061
- let Ct = St, kt = vt, xt = class Lr extends Error {
2136
+ It.exports = Rr(), It.exports.createColors = Rr;
2137
+ var Lt = It.exports;
2138
+ const Rt = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
2139
+ let Dt = Lt, Ft = Rt, Ut = class Lr extends Error {
2062
2140
  constructor(e, a, u, m2, w2, b2) {
2063
2141
  super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, Lr);
2064
2142
  }
@@ -2068,11 +2146,11 @@ let Ct = St, kt = vt, xt = class Lr extends Error {
2068
2146
  showSourceCode(e) {
2069
2147
  if (!this.source) return "";
2070
2148
  let a = this.source;
2071
- null == e && (e = Ct.isColorSupported);
2149
+ null == e && (e = Dt.isColorSupported);
2072
2150
  let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
2073
2151
  if (e) {
2074
- let { bold: e2, gray: a2, red: u2 } = Ct.createColors(true);
2075
- r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), kt && (i = (e3) => kt(e3));
2152
+ let { bold: e2, gray: a2, red: u2 } = Dt.createColors(true);
2153
+ r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), Ft && (i = (e3) => Ft(e3));
2076
2154
  }
2077
2155
  let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
2078
2156
  return u.slice(m2, w2).map((e2, a2) => {
@@ -2093,10 +2171,10 @@ let Ct = St, kt = vt, xt = class Lr extends Error {
2093
2171
  return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
2094
2172
  }
2095
2173
  };
2096
- var Mt = xt;
2097
- xt.default = xt;
2098
- const It = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
2099
- let Et = class {
2174
+ var Bt = Ut;
2175
+ Ut.default = Ut;
2176
+ const Wt = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
2177
+ let jt = class {
2100
2178
  constructor(e) {
2101
2179
  this.builder = e;
2102
2180
  }
@@ -2148,7 +2226,7 @@ let Et = class {
2148
2226
  if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
2149
2227
  let w2 = e.parent;
2150
2228
  if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
2151
- if (!w2) return It[u];
2229
+ if (!w2) return Wt[u];
2152
2230
  let b2 = e.root();
2153
2231
  if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
2154
2232
  if ("before" === u || "after" === u) return this.beforeAfter(e, u);
@@ -2160,7 +2238,7 @@ let Et = class {
2160
2238
  if (m2 = e2.raws[a], typeof m2 < "u") return false;
2161
2239
  });
2162
2240
  }
2163
- return typeof m2 > "u" && (m2 = It[u]), b2.rawCache[u] = m2, m2;
2241
+ return typeof m2 > "u" && (m2 = Wt[u]), b2.rawCache[u] = m2, m2;
2164
2242
  }
2165
2243
  rawBeforeClose(e) {
2166
2244
  let a;
@@ -2236,17 +2314,17 @@ let Et = class {
2236
2314
  this[e.type](e, a);
2237
2315
  }
2238
2316
  };
2239
- var Lt = Et;
2240
- Et.default = Et;
2241
- let Rt = Lt;
2317
+ var Vt = jt;
2318
+ jt.default = jt;
2319
+ let Ht = Vt;
2242
2320
  function ks(e, a) {
2243
- new Rt(a).stringify(e);
2321
+ new Ht(a).stringify(e);
2244
2322
  }
2245
- var Dt = ks;
2323
+ var Kt = ks;
2246
2324
  ks.default = ks;
2247
- var Ft = {};
2248
- Ft.isClean = Symbol("isClean"), Ft.my = Symbol("my");
2249
- let Ut = Mt, Bt = Lt, Wt = Dt, { isClean: jt, my: Vt } = Ft;
2325
+ var Jt = {};
2326
+ Jt.isClean = Symbol("isClean"), Jt.my = Symbol("my");
2327
+ let Xt = Bt, Qt = Vt, en = Kt, { isClean: tn, my: nn } = Jt;
2250
2328
  function Cs(e, a) {
2251
2329
  let u = new e.constructor();
2252
2330
  for (let m2 in e) {
@@ -2268,12 +2346,12 @@ function Pe(e, a) {
2268
2346
  }
2269
2347
  return w2;
2270
2348
  }
2271
- let Ht = class {
2349
+ let rn = class {
2272
2350
  get proxyOf() {
2273
2351
  return this;
2274
2352
  }
2275
2353
  constructor(e = {}) {
2276
- this.raws = {}, this[jt] = false, this[Vt] = true;
2354
+ this.raws = {}, this[tn] = false, this[nn] = true;
2277
2355
  for (let a in e) if ("nodes" === a) {
2278
2356
  this.nodes = [];
2279
2357
  for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
@@ -2317,19 +2395,19 @@ let Ht = class {
2317
2395
  let { end: u, start: m2 } = this.rangeBy(a);
2318
2396
  return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
2319
2397
  }
2320
- return new Ut(e);
2398
+ return new Xt(e);
2321
2399
  }
2322
2400
  getProxyProcessor() {
2323
2401
  return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
2324
2402
  }
2325
2403
  markClean() {
2326
- this[jt] = true;
2404
+ this[tn] = true;
2327
2405
  }
2328
2406
  markDirty() {
2329
- if (this[jt]) {
2330
- this[jt] = false;
2407
+ if (this[tn]) {
2408
+ this[tn] = false;
2331
2409
  let e = this;
2332
- for (; e = e.parent; ) e[jt] = false;
2410
+ for (; e = e.parent; ) e[tn] = false;
2333
2411
  }
2334
2412
  }
2335
2413
  next() {
@@ -2365,7 +2443,7 @@ let Ht = class {
2365
2443
  return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
2366
2444
  }
2367
2445
  raw(e, a) {
2368
- return new Bt().raw(this, e, a);
2446
+ return new Qt().raw(this, e, a);
2369
2447
  }
2370
2448
  remove() {
2371
2449
  return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
@@ -2402,7 +2480,7 @@ let Ht = class {
2402
2480
  toProxy() {
2403
2481
  return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
2404
2482
  }
2405
- toString(e = Wt) {
2483
+ toString(e = en) {
2406
2484
  e.stringify && (e = e.stringify);
2407
2485
  let a = "";
2408
2486
  return e(this, (e2) => {
@@ -2415,16 +2493,16 @@ let Ht = class {
2415
2493
  return e.warn(a, m2);
2416
2494
  }
2417
2495
  };
2418
- var Kt = Ht;
2419
- Ht.default = Ht;
2420
- let Jt = Kt, Xt = class extends Jt {
2496
+ var on = rn;
2497
+ rn.default = rn;
2498
+ let sn = on, an = class extends sn {
2421
2499
  constructor(e) {
2422
2500
  super(e), this.type = "comment";
2423
2501
  }
2424
2502
  };
2425
- var Qt = Xt;
2426
- Xt.default = Xt;
2427
- let en = Kt, tn = class extends en {
2503
+ var ln = an;
2504
+ an.default = an;
2505
+ let cn = on, un = class extends cn {
2428
2506
  get variable() {
2429
2507
  return this.prop.startsWith("--") || "$" === this.prop[0];
2430
2508
  }
@@ -2432,16 +2510,16 @@ let en = Kt, tn = class extends en {
2432
2510
  e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
2433
2511
  }
2434
2512
  };
2435
- var nn = tn;
2436
- tn.default = tn;
2437
- let rn, on, sn, an, ln = Qt, cn = nn, un = Kt, { isClean: pn, my: dn } = Ft;
2513
+ var pn = un;
2514
+ un.default = un;
2515
+ let dn, hn, fn, mn, gn = ln, yn = pn, wn = on, { isClean: bn, my: Sn } = Jt;
2438
2516
  function _r(e) {
2439
2517
  return e.map((e2) => (e2.nodes && (e2.nodes = _r(e2.nodes)), delete e2.source, e2));
2440
2518
  }
2441
2519
  function Wr(e) {
2442
- if (e[pn] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
2520
+ if (e[bn] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
2443
2521
  }
2444
- let hn = class zr extends un {
2522
+ let Mn = class zr extends wn {
2445
2523
  get first() {
2446
2524
  if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
2447
2525
  }
@@ -2493,7 +2571,7 @@ let hn = class zr extends un {
2493
2571
  return this.markDirty(), this;
2494
2572
  }
2495
2573
  normalize(e, a) {
2496
- if ("string" == typeof e) e = _r(on(e).nodes);
2574
+ if ("string" == typeof e) e = _r(hn(e).nodes);
2497
2575
  else if (typeof e > "u") e = [];
2498
2576
  else if (Array.isArray(e)) {
2499
2577
  e = e.slice(0);
@@ -2504,14 +2582,14 @@ let hn = class zr extends un {
2504
2582
  } else if (e.type) e = [e];
2505
2583
  else if (e.prop) {
2506
2584
  if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
2507
- "string" != typeof e.value && (e.value = String(e.value)), e = [new cn(e)];
2508
- } else if (e.selector || e.selectors) e = [new an(e)];
2509
- else if (e.name) e = [new rn(e)];
2585
+ "string" != typeof e.value && (e.value = String(e.value)), e = [new yn(e)];
2586
+ } else if (e.selector || e.selectors) e = [new mn(e)];
2587
+ else if (e.name) e = [new dn(e)];
2510
2588
  else {
2511
2589
  if (!e.text) throw new Error("Unknown node type in node creation");
2512
- e = [new ln(e)];
2590
+ e = [new gn(e)];
2513
2591
  }
2514
- return e.map((e2) => (e2[dn] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[pn] && Wr(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
2592
+ return e.map((e2) => (e2[Sn] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[bn] && Wr(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
2515
2593
  }
2516
2594
  prepend(...e) {
2517
2595
  e = e.reverse();
@@ -2587,22 +2665,22 @@ let hn = class zr extends un {
2587
2665
  }));
2588
2666
  }
2589
2667
  };
2590
- hn.registerParse = (e) => {
2591
- on = e;
2592
- }, hn.registerRule = (e) => {
2593
- an = e;
2594
- }, hn.registerAtRule = (e) => {
2595
- rn = e;
2596
- }, hn.registerRoot = (e) => {
2597
- sn = e;
2668
+ Mn.registerParse = (e) => {
2669
+ hn = e;
2670
+ }, Mn.registerRule = (e) => {
2671
+ mn = e;
2672
+ }, Mn.registerAtRule = (e) => {
2673
+ dn = e;
2674
+ }, Mn.registerRoot = (e) => {
2675
+ fn = e;
2598
2676
  };
2599
- var fn = hn;
2600
- hn.default = hn, hn.rebuild = (e) => {
2601
- "atrule" === e.type ? Object.setPrototypeOf(e, rn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, an.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, cn.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, ln.prototype) : "root" === e.type && Object.setPrototypeOf(e, sn.prototype), e[dn] = true, e.nodes && e.nodes.forEach((e2) => {
2602
- hn.rebuild(e2);
2677
+ var In = Mn;
2678
+ Mn.default = Mn, Mn.rebuild = (e) => {
2679
+ "atrule" === e.type ? Object.setPrototypeOf(e, dn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, mn.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, yn.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, gn.prototype) : "root" === e.type && Object.setPrototypeOf(e, fn.prototype), e[Sn] = true, e.nodes && e.nodes.forEach((e2) => {
2680
+ Mn.rebuild(e2);
2603
2681
  });
2604
2682
  };
2605
- let mn = fn, gn = class extends mn {
2683
+ let _n = In, On = class extends _n {
2606
2684
  constructor(e) {
2607
2685
  super(e), this.type = "atrule";
2608
2686
  }
@@ -2613,38 +2691,38 @@ let mn = fn, gn = class extends mn {
2613
2691
  return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
2614
2692
  }
2615
2693
  };
2616
- var yn = gn;
2617
- gn.default = gn, mn.registerAtRule(gn);
2618
- let wn, bn, Sn = fn, Mn = class extends Sn {
2694
+ var En = On;
2695
+ On.default = On, _n.registerAtRule(On);
2696
+ let Ln, Rn, An = In, Tn = class extends An {
2619
2697
  constructor(e) {
2620
2698
  super({ type: "document", ...e }), this.nodes || (this.nodes = []);
2621
2699
  }
2622
2700
  toResult(e = {}) {
2623
- return new wn(new bn(), this, e).stringify();
2701
+ return new Ln(new Rn(), this, e).stringify();
2624
2702
  }
2625
2703
  };
2626
- Mn.registerLazyResult = (e) => {
2627
- wn = e;
2628
- }, Mn.registerProcessor = (e) => {
2629
- bn = e;
2704
+ Tn.registerLazyResult = (e) => {
2705
+ Ln = e;
2706
+ }, Tn.registerProcessor = (e) => {
2707
+ Rn = e;
2630
2708
  };
2631
- var In = Mn;
2632
- Mn.default = Mn;
2633
- var _n = { nanoid: (e = 21) => {
2709
+ var Nn = Tn;
2710
+ Tn.default = Tn;
2711
+ var Pn = { nanoid: (e = 21) => {
2634
2712
  let a = "", u = 0 | e;
2635
2713
  for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
2636
2714
  return a;
2637
2715
  } };
2638
- let { existsSync: On, readFileSync: En } = vt, { dirname: Ln, join: Rn } = vt, { SourceMapConsumer: An, SourceMapGenerator: Tn } = vt;
2639
- let Nn = class {
2716
+ let { existsSync: Dn, readFileSync: Fn } = Rt, { dirname: Un, join: Bn } = Rt, { SourceMapConsumer: Wn, SourceMapGenerator: zn } = Rt;
2717
+ let jn = class {
2640
2718
  constructor(e, a) {
2641
2719
  if (false === a.map) return;
2642
2720
  this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
2643
2721
  let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
2644
- !this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Ln(this.mapFile)), m2 && (this.text = m2);
2722
+ !this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Un(this.mapFile)), m2 && (this.text = m2);
2645
2723
  }
2646
2724
  consumer() {
2647
- return this.consumerCache || (this.consumerCache = new An(this.text)), this.consumerCache;
2725
+ return this.consumerCache || (this.consumerCache = new Wn(this.text)), this.consumerCache;
2648
2726
  }
2649
2727
  decodeInline(e) {
2650
2728
  let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
@@ -2669,15 +2747,15 @@ let Nn = class {
2669
2747
  u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
2670
2748
  }
2671
2749
  loadFile(e) {
2672
- if (this.root = Ln(e), On(e)) return this.mapFile = e, En(e, "utf-8").toString().trim();
2750
+ if (this.root = Un(e), Dn(e)) return this.mapFile = e, Fn(e, "utf-8").toString().trim();
2673
2751
  }
2674
2752
  loadMap(e, a) {
2675
2753
  if (false === a) return false;
2676
2754
  if (a) {
2677
2755
  if ("string" == typeof a) return a;
2678
2756
  if ("function" != typeof a) {
2679
- if (a instanceof An) return Tn.fromSourceMap(a).toString();
2680
- if (a instanceof Tn) return a.toString();
2757
+ if (a instanceof Wn) return zn.fromSourceMap(a).toString();
2758
+ if (a instanceof zn) return a.toString();
2681
2759
  if (this.isMap(a)) return JSON.stringify(a);
2682
2760
  throw new Error("Unsupported previous source map format: " + a.toString());
2683
2761
  }
@@ -2693,7 +2771,7 @@ let Nn = class {
2693
2771
  if (this.inline) return this.decodeInline(this.annotation);
2694
2772
  if (this.annotation) {
2695
2773
  let a2 = this.annotation;
2696
- return e && (a2 = Rn(Ln(e), a2)), this.loadFile(a2);
2774
+ return e && (a2 = Bn(Un(e), a2)), this.loadFile(a2);
2697
2775
  }
2698
2776
  }
2699
2777
  }
@@ -2704,23 +2782,23 @@ let Nn = class {
2704
2782
  return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
2705
2783
  }
2706
2784
  };
2707
- var Pn = Nn;
2708
- Nn.default = Nn;
2709
- let { nanoid: Dn } = _n, { isAbsolute: Fn, resolve: Un } = vt, { SourceMapConsumer: Bn, SourceMapGenerator: Wn } = vt, { fileURLToPath: zn, pathToFileURL: jn } = vt, Vn = Mt, qn = Pn, Zn = vt, Kn = Symbol("fromOffsetCache"), Qn = !(!Bn || !Wn), nr = !(!Un || !Fn), rr = class {
2785
+ var Vn = jn;
2786
+ jn.default = jn;
2787
+ let { nanoid: qn } = Pn, { isAbsolute: Zn, resolve: Kn } = Rt, { SourceMapConsumer: Qn, SourceMapGenerator: nr } = Rt, { fileURLToPath: rr, pathToFileURL: or } = Rt, sr = Bt, ir = Vn, ar = Rt, lr = Symbol("fromOffsetCache"), cr = !(!Qn || !nr), ur = !(!Kn || !Zn), pr = class {
2710
2788
  get from() {
2711
2789
  return this.file || this.id;
2712
2790
  }
2713
2791
  constructor(e, a = {}) {
2714
2792
  if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
2715
- if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!nr || /^\w+:\/\//.test(a.from) || Fn(a.from) ? this.file = a.from : this.file = Un(a.from)), nr && Qn) {
2716
- let e2 = new qn(this.css, a);
2793
+ if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!ur || /^\w+:\/\//.test(a.from) || Zn(a.from) ? this.file = a.from : this.file = Kn(a.from)), ur && cr) {
2794
+ let e2 = new ir(this.css, a);
2717
2795
  if (e2.text) {
2718
2796
  this.map = e2;
2719
2797
  let a2 = e2.consumer().file;
2720
2798
  !this.file && a2 && (this.file = this.mapResolve(a2));
2721
2799
  }
2722
2800
  }
2723
- this.file || (this.id = "<input css " + Dn(6) + ">"), this.map && (this.map.file = this.from);
2801
+ this.file || (this.id = "<input css " + qn(6) + ">"), this.map && (this.map.file = this.from);
2724
2802
  }
2725
2803
  error(e, a, u, m2 = {}) {
2726
2804
  let w2, b2, C2;
@@ -2739,17 +2817,17 @@ let { nanoid: Dn } = _n, { isAbsolute: Fn, resolve: Un } = vt, { SourceMapConsum
2739
2817
  a = e2.line, u = e2.col;
2740
2818
  }
2741
2819
  let x2 = this.origin(a, u, b2, w2);
2742
- return C2 = x2 ? new Vn(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new Vn(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (jn && (C2.input.url = jn(this.file).toString()), C2.input.file = this.file), C2;
2820
+ return C2 = x2 ? new sr(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new sr(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (or && (C2.input.url = or(this.file).toString()), C2.input.file = this.file), C2;
2743
2821
  }
2744
2822
  fromOffset(e) {
2745
2823
  let a, u;
2746
- if (this[Kn]) u = this[Kn];
2824
+ if (this[lr]) u = this[lr];
2747
2825
  else {
2748
2826
  let e2 = this.css.split("\n");
2749
2827
  u = new Array(e2.length);
2750
2828
  let a2 = 0;
2751
2829
  for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
2752
- this[Kn] = u;
2830
+ this[lr] = u;
2753
2831
  }
2754
2832
  a = u[u.length - 1];
2755
2833
  let m2 = 0;
@@ -2768,17 +2846,17 @@ let { nanoid: Dn } = _n, { isAbsolute: Fn, resolve: Un } = vt, { SourceMapConsum
2768
2846
  return { col: e - u[m2] + 1, line: m2 + 1 };
2769
2847
  }
2770
2848
  mapResolve(e) {
2771
- return /^\w+:\/\//.test(e) ? e : Un(this.map.consumer().sourceRoot || this.map.root || ".", e);
2849
+ return /^\w+:\/\//.test(e) ? e : Kn(this.map.consumer().sourceRoot || this.map.root || ".", e);
2772
2850
  }
2773
2851
  origin(e, a, u, m2) {
2774
2852
  if (!this.map) return false;
2775
2853
  let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
2776
2854
  if (!x2.source) return false;
2777
- "number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = Fn(x2.source) ? jn(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || jn(this.map.mapFile));
2855
+ "number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = Zn(x2.source) ? or(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || or(this.map.mapFile));
2778
2856
  let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
2779
2857
  if ("file:" === b2.protocol) {
2780
- if (!zn) throw new Error("file: protocol is not available in this PostCSS build");
2781
- I2.file = zn(b2);
2858
+ if (!rr) throw new Error("file: protocol is not available in this PostCSS build");
2859
+ I2.file = rr(b2);
2782
2860
  }
2783
2861
  let _2 = C2.sourceContentFor(x2.source);
2784
2862
  return _2 && (I2.source = _2), I2;
@@ -2789,9 +2867,9 @@ let { nanoid: Dn } = _n, { isAbsolute: Fn, resolve: Un } = vt, { SourceMapConsum
2789
2867
  return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
2790
2868
  }
2791
2869
  };
2792
- var or = rr;
2793
- rr.default = rr, Zn && Zn.registerInput && Zn.registerInput(rr);
2794
- let sr, ir, ar = fn, lr = class extends ar {
2870
+ var dr = pr;
2871
+ pr.default = pr, ar && ar.registerInput && ar.registerInput(pr);
2872
+ let hr, fr, mr = In, gr = class extends mr {
2795
2873
  constructor(e) {
2796
2874
  super(e), this.type = "root", this.nodes || (this.nodes = []);
2797
2875
  }
@@ -2808,29 +2886,29 @@ let sr, ir, ar = fn, lr = class extends ar {
2808
2886
  return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
2809
2887
  }
2810
2888
  toResult(e = {}) {
2811
- return new sr(new ir(), this, e).stringify();
2889
+ return new hr(new fr(), this, e).stringify();
2812
2890
  }
2813
2891
  };
2814
- lr.registerLazyResult = (e) => {
2815
- sr = e;
2816
- }, lr.registerProcessor = (e) => {
2817
- ir = e;
2892
+ gr.registerLazyResult = (e) => {
2893
+ hr = e;
2894
+ }, gr.registerProcessor = (e) => {
2895
+ fr = e;
2818
2896
  };
2819
- var cr = lr;
2820
- lr.default = lr, ar.registerRoot(lr);
2821
- let ur = { comma: (e) => ur.split(e, [","], true), space(e) {
2897
+ var yr = gr;
2898
+ gr.default = gr, mr.registerRoot(gr);
2899
+ let wr = { comma: (e) => wr.split(e, [","], true), space(e) {
2822
2900
  let a = [" ", "\n", " "];
2823
- return ur.split(e, a);
2901
+ return wr.split(e, a);
2824
2902
  }, split(e, a, u) {
2825
2903
  let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
2826
2904
  for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
2827
2905
  return (u || "" !== w2) && m2.push(w2.trim()), m2;
2828
2906
  } };
2829
- var pr = ur;
2830
- ur.default = ur;
2831
- let dr = fn, hr = pr, fr = class extends dr {
2907
+ var Sr = wr;
2908
+ wr.default = wr;
2909
+ let Cr = In, Ar = Sr, Tr = class extends Cr {
2832
2910
  get selectors() {
2833
- return hr.comma(this.selector);
2911
+ return Ar.comma(this.selector);
2834
2912
  }
2835
2913
  set selectors(e) {
2836
2914
  let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
@@ -2840,34 +2918,34 @@ let dr = fn, hr = pr, fr = class extends dr {
2840
2918
  super(e), this.type = "rule", this.nodes || (this.nodes = []);
2841
2919
  }
2842
2920
  };
2843
- var mr = fr;
2844
- fr.default = fr, dr.registerRule(fr);
2845
- let gr = yn, yr = Qt, wr = nn, Sr = or, Cr = Pn, Ar = cr, Tr = mr;
2921
+ var Nr = Tr;
2922
+ Tr.default = Tr, Cr.registerRule(Tr);
2923
+ let Pr = En, Dr = ln, Fr = pn, Ur = dr, Br = Vn, $r = yr, jr = Nr;
2846
2924
  function Ze(e, a) {
2847
2925
  if (Array.isArray(e)) return e.map((e2) => Ze(e2));
2848
2926
  let { inputs: u, ...m2 } = e;
2849
2927
  if (u) {
2850
2928
  a = [];
2851
2929
  for (let e2 of u) {
2852
- let u2 = { ...e2, __proto__: Sr.prototype };
2853
- u2.map && (u2.map = { ...u2.map, __proto__: Cr.prototype }), a.push(u2);
2930
+ let u2 = { ...e2, __proto__: Ur.prototype };
2931
+ u2.map && (u2.map = { ...u2.map, __proto__: Br.prototype }), a.push(u2);
2854
2932
  }
2855
2933
  }
2856
2934
  if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ze(e2, a))), m2.source) {
2857
2935
  let { inputId: e2, ...u2 } = m2.source;
2858
2936
  m2.source = u2, null != e2 && (m2.source.input = a[e2]);
2859
2937
  }
2860
- if ("root" === m2.type) return new Ar(m2);
2861
- if ("decl" === m2.type) return new wr(m2);
2862
- if ("rule" === m2.type) return new Tr(m2);
2863
- if ("comment" === m2.type) return new yr(m2);
2864
- if ("atrule" === m2.type) return new gr(m2);
2938
+ if ("root" === m2.type) return new $r(m2);
2939
+ if ("decl" === m2.type) return new Fr(m2);
2940
+ if ("rule" === m2.type) return new jr(m2);
2941
+ if ("comment" === m2.type) return new Dr(m2);
2942
+ if ("atrule" === m2.type) return new Pr(m2);
2865
2943
  throw new Error("Unknown node type: " + e.type);
2866
2944
  }
2867
- var Nr = Ze;
2945
+ var Gr = Ze;
2868
2946
  Ze.default = Ze;
2869
- let { dirname: Pr, relative: Dr, resolve: Fr, sep: Ur } = vt, { SourceMapConsumer: $r, SourceMapGenerator: Br } = vt, { pathToFileURL: jr } = vt, Gr = or, Vr = !(!$r || !Br), qr = !!(Pr && Fr && Dr && Ur);
2870
- var Hr = class {
2947
+ let { dirname: Vr, relative: qr, resolve: Hr, sep: Zr } = Rt, { SourceMapConsumer: Kr, SourceMapGenerator: Jr } = Rt, { pathToFileURL: Yr } = Rt, Xr = dr, Qr = !(!Kr || !Jr), eo = !!(Vr && Hr && qr && Zr);
2948
+ var to = class {
2871
2949
  constructor(e, a, u, m2) {
2872
2950
  this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
2873
2951
  }
@@ -2879,8 +2957,8 @@ var Hr = class {
2879
2957
  }
2880
2958
  applyPrevMaps() {
2881
2959
  for (let e of this.previous()) {
2882
- let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Pr(e.file);
2883
- false === this.mapOpts.sourcesContent ? (a = new $r(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
2960
+ let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Vr(e.file);
2961
+ false === this.mapOpts.sourcesContent ? (a = new Kr(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
2884
2962
  }
2885
2963
  }
2886
2964
  clearAnnotation() {
@@ -2890,7 +2968,7 @@ var Hr = class {
2890
2968
  } else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
2891
2969
  }
2892
2970
  generate() {
2893
- if (this.clearAnnotation(), qr && Vr && this.isMap()) return this.generateMap();
2971
+ if (this.clearAnnotation(), eo && Qr && this.isMap()) return this.generateMap();
2894
2972
  {
2895
2973
  let e = "";
2896
2974
  return this.stringify(this.root, (a) => {
@@ -2902,12 +2980,12 @@ var Hr = class {
2902
2980
  if (this.root) this.generateString();
2903
2981
  else if (1 === this.previous().length) {
2904
2982
  let e = this.previous()[0].consumer();
2905
- e.file = this.outputFile(), this.map = Br.fromSourceMap(e, { ignoreInvalidMapping: true });
2906
- } else this.map = new Br({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
2983
+ e.file = this.outputFile(), this.map = Jr.fromSourceMap(e, { ignoreInvalidMapping: true });
2984
+ } else this.map = new Jr({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
2907
2985
  return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
2908
2986
  }
2909
2987
  generateString() {
2910
- this.css = "", this.map = new Br({ file: this.outputFile(), ignoreInvalidMapping: true });
2988
+ this.css = "", this.map = new Jr({ file: this.outputFile(), ignoreInvalidMapping: true });
2911
2989
  let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
2912
2990
  this.stringify(this.root, (C2, x2, I2) => {
2913
2991
  if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
@@ -2937,9 +3015,9 @@ var Hr = class {
2937
3015
  if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
2938
3016
  let a = this.memoizedPaths.get(e);
2939
3017
  if (a) return a;
2940
- let u = this.opts.to ? Pr(this.opts.to) : ".";
2941
- "string" == typeof this.mapOpts.annotation && (u = Pr(Fr(u, this.mapOpts.annotation)));
2942
- let m2 = Dr(u, e);
3018
+ let u = this.opts.to ? Vr(this.opts.to) : ".";
3019
+ "string" == typeof this.mapOpts.annotation && (u = Vr(Hr(u, this.mapOpts.annotation)));
3020
+ let m2 = qr(u, e);
2943
3021
  return this.memoizedPaths.set(e, m2), m2;
2944
3022
  }
2945
3023
  previous() {
@@ -2950,7 +3028,7 @@ var Hr = class {
2950
3028
  }
2951
3029
  });
2952
3030
  else {
2953
- let e = new Gr(this.originalCSS, this.opts);
3031
+ let e = new Xr(this.originalCSS, this.opts);
2954
3032
  e.map && this.previousMaps.push(e.map);
2955
3033
  }
2956
3034
  return this.previousMaps;
@@ -2981,8 +3059,8 @@ var Hr = class {
2981
3059
  toFileUrl(e) {
2982
3060
  let a = this.memoizedFileURLs.get(e);
2983
3061
  if (a) return a;
2984
- if (jr) {
2985
- let a2 = jr(e).toString();
3062
+ if (Yr) {
3063
+ let a2 = Yr(e).toString();
2986
3064
  return this.memoizedFileURLs.set(e, a2), a2;
2987
3065
  }
2988
3066
  throw new Error("`map.absolute` option is not available in this PostCSS build");
@@ -2990,36 +3068,36 @@ var Hr = class {
2990
3068
  toUrl(e) {
2991
3069
  let a = this.memoizedURLs.get(e);
2992
3070
  if (a) return a;
2993
- "\\" === Ur && (e = e.replace(/\\/g, "/"));
3071
+ "\\" === Zr && (e = e.replace(/\\/g, "/"));
2994
3072
  let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
2995
3073
  return this.memoizedURLs.set(e, u), u;
2996
3074
  }
2997
3075
  };
2998
- const Zr = /[\t\n\f\r "#'()/;[\\\]{}]/g, Kr = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, Yr = /.[\r\n"'(/\\]/, Jr = /[\da-f]/i;
2999
- let Xr = yn, Qr = Qt, eo = nn, to = cr, oo = mr, Xa = function(e, a = {}) {
3000
- let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, $2 = 0, B2 = [], z2 = [];
3076
+ const oo = /[\t\n\f\r "#'()/;[\\\]{}]/g, io = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, ao = /.[\r\n"'(/\\]/, lo = /[\da-f]/i;
3077
+ let co = En, uo = ln, ho = pn, Mo = yr, _o = Nr, Xa = function(e, a = {}) {
3078
+ let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
3001
3079
  function y2(a2) {
3002
- throw e.error("Unclosed " + a2, $2);
3080
+ throw e.error("Unclosed " + a2, B2);
3003
3081
  }
3004
3082
  return { back: function A(e2) {
3005
3083
  z2.push(e2);
3006
3084
  }, endOfFile: function v() {
3007
- return 0 === z2.length && $2 >= U2;
3085
+ return 0 === z2.length && B2 >= U2;
3008
3086
  }, nextToken: function P(e2) {
3009
3087
  if (z2.length) return z2.pop();
3010
- if ($2 >= U2) return;
3088
+ if (B2 >= U2) return;
3011
3089
  let a2 = !!e2 && e2.ignoreUnclosed;
3012
- switch (u = D2.charCodeAt($2), u) {
3090
+ switch (u = D2.charCodeAt(B2), u) {
3013
3091
  case 10:
3014
3092
  case 32:
3015
3093
  case 9:
3016
3094
  case 13:
3017
3095
  case 12:
3018
- b2 = $2;
3096
+ b2 = B2;
3019
3097
  do {
3020
3098
  b2 += 1, u = D2.charCodeAt(b2);
3021
3099
  } while (32 === u || 10 === u || 9 === u || 13 === u || 12 === u);
3022
- x2 = ["space", D2.slice($2, b2)], $2 = b2 - 1;
3100
+ x2 = ["space", D2.slice(B2, b2)], B2 = b2 - 1;
3023
3101
  break;
3024
3102
  case 91:
3025
3103
  case 93:
@@ -3029,66 +3107,66 @@ let Xr = yn, Qr = Qt, eo = nn, to = cr, oo = mr, Xa = function(e, a = {}) {
3029
3107
  case 59:
3030
3108
  case 41: {
3031
3109
  let e3 = String.fromCharCode(u);
3032
- x2 = [e3, e3, $2];
3110
+ x2 = [e3, e3, B2];
3033
3111
  break;
3034
3112
  }
3035
3113
  case 40:
3036
- if (E2 = B2.length ? B2.pop()[1] : "", O2 = D2.charCodeAt($2 + 1), "url" === E2 && 39 !== O2 && 34 !== O2 && 32 !== O2 && 10 !== O2 && 9 !== O2 && 12 !== O2 && 13 !== O2) {
3037
- b2 = $2;
3114
+ if (E2 = $2.length ? $2.pop()[1] : "", O2 = D2.charCodeAt(B2 + 1), "url" === E2 && 39 !== O2 && 34 !== O2 && 32 !== O2 && 10 !== O2 && 9 !== O2 && 12 !== O2 && 13 !== O2) {
3115
+ b2 = B2;
3038
3116
  do {
3039
3117
  if (I2 = false, b2 = D2.indexOf(")", b2 + 1), -1 === b2) {
3040
3118
  if (F2 || a2) {
3041
- b2 = $2;
3119
+ b2 = B2;
3042
3120
  break;
3043
3121
  }
3044
3122
  y2("bracket");
3045
3123
  }
3046
3124
  for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
3047
3125
  } while (I2);
3048
- x2 = ["brackets", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
3049
- } else b2 = D2.indexOf(")", $2 + 1), m2 = D2.slice($2, b2 + 1), -1 === b2 || Yr.test(m2) ? x2 = ["(", "(", $2] : (x2 = ["brackets", m2, $2, b2], $2 = b2);
3126
+ x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
3127
+ } else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || ao.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
3050
3128
  break;
3051
3129
  case 39:
3052
3130
  case 34:
3053
- C2 = 39 === u ? "'" : '"', b2 = $2;
3131
+ C2 = 39 === u ? "'" : '"', b2 = B2;
3054
3132
  do {
3055
3133
  if (I2 = false, b2 = D2.indexOf(C2, b2 + 1), -1 === b2) {
3056
3134
  if (F2 || a2) {
3057
- b2 = $2 + 1;
3135
+ b2 = B2 + 1;
3058
3136
  break;
3059
3137
  }
3060
3138
  y2("string");
3061
3139
  }
3062
3140
  for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
3063
3141
  } while (I2);
3064
- x2 = ["string", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
3142
+ x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
3065
3143
  break;
3066
3144
  case 64:
3067
- Zr.lastIndex = $2 + 1, Zr.test(D2), b2 = 0 === Zr.lastIndex ? D2.length - 1 : Zr.lastIndex - 2, x2 = ["at-word", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
3145
+ oo.lastIndex = B2 + 1, oo.test(D2), b2 = 0 === oo.lastIndex ? D2.length - 1 : oo.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
3068
3146
  break;
3069
3147
  case 92:
3070
- for (b2 = $2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
3071
- if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, Jr.test(D2.charAt(b2)))) {
3072
- for (; Jr.test(D2.charAt(b2 + 1)); ) b2 += 1;
3148
+ for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
3149
+ if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, lo.test(D2.charAt(b2)))) {
3150
+ for (; lo.test(D2.charAt(b2 + 1)); ) b2 += 1;
3073
3151
  32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
3074
3152
  }
3075
- x2 = ["word", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
3153
+ x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
3076
3154
  break;
3077
3155
  default:
3078
- 47 === u && 42 === D2.charCodeAt($2 + 1) ? (b2 = D2.indexOf("*/", $2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice($2, b2 + 1), $2, b2], $2 = b2) : (Kr.lastIndex = $2 + 1, Kr.test(D2), b2 = 0 === Kr.lastIndex ? D2.length - 1 : Kr.lastIndex - 2, x2 = ["word", D2.slice($2, b2 + 1), $2, b2], B2.push(x2), $2 = b2);
3156
+ 47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (io.lastIndex = B2 + 1, io.test(D2), b2 = 0 === io.lastIndex ? D2.length - 1 : io.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
3079
3157
  }
3080
- return $2++, x2;
3158
+ return B2++, x2;
3081
3159
  }, position: function S() {
3082
- return $2;
3160
+ return B2;
3083
3161
  } };
3084
3162
  };
3085
- const io = { empty: true, space: true };
3086
- var ao = class {
3163
+ const Ao = { empty: true, space: true };
3164
+ var No = class {
3087
3165
  constructor(e) {
3088
- this.input = e, this.root = new to(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
3166
+ this.input = e, this.root = new Mo(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
3089
3167
  }
3090
3168
  atrule(e) {
3091
- let a = new Xr();
3169
+ let a = new co();
3092
3170
  a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
3093
3171
  let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
3094
3172
  for (; !this.tokenizer.endOfFile(); ) {
@@ -3140,7 +3218,7 @@ var ao = class {
3140
3218
  return false;
3141
3219
  }
3142
3220
  comment(e) {
3143
- let a = new Qr();
3221
+ let a = new uo();
3144
3222
  this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
3145
3223
  let u = e[1].slice(2, -2);
3146
3224
  if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
@@ -3153,7 +3231,7 @@ var ao = class {
3153
3231
  this.tokenizer = Xa(this.input);
3154
3232
  }
3155
3233
  decl(e, a) {
3156
- let u = new eo();
3234
+ let u = new ho();
3157
3235
  this.init(u, e[0][2]);
3158
3236
  let m2, w2 = e[e.length - 1];
3159
3237
  for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e2) {
@@ -3202,7 +3280,7 @@ var ao = class {
3202
3280
  throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
3203
3281
  }
3204
3282
  emptyRule(e) {
3205
- let a = new oo();
3283
+ let a = new _o();
3206
3284
  this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
3207
3285
  }
3208
3286
  end(e) {
@@ -3278,7 +3356,7 @@ var ao = class {
3278
3356
  }
3279
3357
  raw(e, a, u, m2) {
3280
3358
  let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
3281
- for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", io[x2] || io[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
3359
+ for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", Ao[x2] || Ao[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
3282
3360
  if (!O2) {
3283
3361
  let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
3284
3362
  e.raws[a] = { raw: m3, value: _2 };
@@ -3287,7 +3365,7 @@ var ao = class {
3287
3365
  }
3288
3366
  rule(e) {
3289
3367
  e.pop();
3290
- let a = new oo();
3368
+ let a = new _o();
3291
3369
  this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
3292
3370
  }
3293
3371
  spacesAndCommentsFromEnd(e) {
@@ -3327,9 +3405,9 @@ var ao = class {
3327
3405
  throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
3328
3406
  }
3329
3407
  };
3330
- let lo = fn, co = or, uo = ao;
3408
+ let Po = In, Do = dr, Fo = No;
3331
3409
  function _t(e, a) {
3332
- let u = new co(e, a), m2 = new uo(u);
3410
+ let u = new Do(e, a), m2 = new Fo(u);
3333
3411
  try {
3334
3412
  m2.parse();
3335
3413
  } catch (e2) {
@@ -3337,9 +3415,9 @@ function _t(e, a) {
3337
3415
  }
3338
3416
  return m2.root;
3339
3417
  }
3340
- var ho = _t;
3341
- _t.default = _t, lo.registerParse(_t);
3342
- let Mo = class {
3418
+ var Uo = _t;
3419
+ _t.default = _t, Po.registerParse(_t);
3420
+ let $o = class {
3343
3421
  constructor(e, a = {}) {
3344
3422
  if (this.type = "warning", this.text = e, a.node && a.node.source) {
3345
3423
  let e2 = a.node.rangeBy(a);
@@ -3351,9 +3429,9 @@ let Mo = class {
3351
3429
  return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
3352
3430
  }
3353
3431
  };
3354
- var _o = Mo;
3355
- Mo.default = Mo;
3356
- let Ao = _o, No = class {
3432
+ var jo = $o;
3433
+ $o.default = $o;
3434
+ let Go = jo, Vo = class {
3357
3435
  get content() {
3358
3436
  return this.css;
3359
3437
  }
@@ -3365,26 +3443,26 @@ let Ao = _o, No = class {
3365
3443
  }
3366
3444
  warn(e, a = {}) {
3367
3445
  a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
3368
- let u = new Ao(e, a);
3446
+ let u = new Go(e, a);
3369
3447
  return this.messages.push(u), u;
3370
3448
  }
3371
3449
  warnings() {
3372
3450
  return this.messages.filter((e) => "warning" === e.type);
3373
3451
  }
3374
3452
  };
3375
- var Po = No;
3376
- No.default = No;
3377
- let Do = {};
3453
+ var qo = Vo;
3454
+ Vo.default = Vo;
3455
+ let Ho = {};
3378
3456
  var so = function(e) {
3379
- Do[e] || (Do[e] = true, typeof console < "u" && console.warn && console.warn(e));
3457
+ Ho[e] || (Ho[e] = true, typeof console < "u" && console.warn && console.warn(e));
3380
3458
  };
3381
- let Fo = fn, Uo = In, $o = Hr, jo = ho, Go = Po, Vo = cr, qo = Dt, { isClean: Ho, my: Zo } = Ft, Ko = so;
3382
- const Yo = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Jo = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Xo = { Once: true, postcssPlugin: true, prepare: true };
3459
+ let Zo = In, Ko = Nn, Jo = to, Yo = Uo, Xo = qo, Qo = yr, es = Kt, { isClean: ts, my: ns } = Jt, rs = so;
3460
+ const os = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, ss = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, is = { Once: true, postcssPlugin: true, prepare: true };
3383
3461
  function Ne(e) {
3384
3462
  return "object" == typeof e && "function" == typeof e.then;
3385
3463
  }
3386
3464
  function no(e) {
3387
- let a = false, u = Yo[e.type];
3465
+ let a = false, u = os[e.type];
3388
3466
  return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
3389
3467
  }
3390
3468
  function Gn(e) {
@@ -3392,9 +3470,9 @@ function Gn(e) {
3392
3470
  return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : no(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
3393
3471
  }
3394
3472
  function Ps(e) {
3395
- return e[Ho] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
3473
+ return e[ts] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
3396
3474
  }
3397
- let Qo = {}, es = class ro {
3475
+ let as = {}, ls = class ro {
3398
3476
  get content() {
3399
3477
  return this.stringify().content;
3400
3478
  }
@@ -3421,19 +3499,19 @@ let Qo = {}, es = class ro {
3421
3499
  }
3422
3500
  constructor(e, a, u) {
3423
3501
  let m2;
3424
- if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof Go) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
3502
+ if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof Xo) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
3425
3503
  else {
3426
- let e2 = jo;
3504
+ let e2 = Yo;
3427
3505
  u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
3428
3506
  try {
3429
3507
  m2 = e2(a, u);
3430
3508
  } catch (e3) {
3431
3509
  this.processed = true, this.error = e3;
3432
3510
  }
3433
- m2 && !m2[Zo] && Fo.rebuild(m2);
3511
+ m2 && !m2[ns] && Zo.rebuild(m2);
3434
3512
  }
3435
3513
  else m2 = Ps(a);
3436
- this.result = new Go(e, m2, u), this.helpers = { ...Qo, postcss: Qo, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
3514
+ this.result = new Xo(e, m2, u), this.helpers = { ...as, postcss: as, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
3437
3515
  }
3438
3516
  async() {
3439
3517
  return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
@@ -3467,8 +3545,8 @@ let Qo = {}, es = class ro {
3467
3545
  this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
3468
3546
  };
3469
3547
  for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
3470
- if (!Jo[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
3471
- if (!Xo[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
3548
+ if (!ss[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
3549
+ if (!is[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
3472
3550
  else "function" == typeof e[a] && t(e, a, e[a]);
3473
3551
  }
3474
3552
  this.hasListener = Object.keys(this.listeners).length > 0;
@@ -3485,8 +3563,8 @@ let Qo = {}, es = class ro {
3485
3563
  }
3486
3564
  if (this.prepareVisitors(), this.hasListener) {
3487
3565
  let e = this.result.root;
3488
- for (; !e[Ho]; ) {
3489
- e[Ho] = true;
3566
+ for (; !e[ts]; ) {
3567
+ e[ts] = true;
3490
3568
  let a = [Gn(e)];
3491
3569
  for (; a.length > 0; ) {
3492
3570
  let e2 = this.visitTick(a);
@@ -3531,9 +3609,9 @@ let Qo = {}, es = class ro {
3531
3609
  if (this.error) throw this.error;
3532
3610
  if (this.stringified) return this.result;
3533
3611
  this.stringified = true, this.sync();
3534
- let e = this.result.opts, a = qo;
3612
+ let e = this.result.opts, a = es;
3535
3613
  e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
3536
- let u = new $o(a, this.result.root, this.result.opts).generate();
3614
+ let u = new Jo(a, this.result.root, this.result.opts).generate();
3537
3615
  return this.result.css = u[0], this.result.map = u[1], this.result;
3538
3616
  }
3539
3617
  sync() {
@@ -3545,14 +3623,14 @@ let Qo = {}, es = class ro {
3545
3623
  }
3546
3624
  if (this.prepareVisitors(), this.hasListener) {
3547
3625
  let e = this.result.root;
3548
- for (; !e[Ho]; ) e[Ho] = true, this.walkSync(e);
3626
+ for (; !e[ts]; ) e[ts] = true, this.walkSync(e);
3549
3627
  if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
3550
3628
  else this.visitSync(this.listeners.OnceExit, e);
3551
3629
  }
3552
3630
  return this.result;
3553
3631
  }
3554
3632
  then(e, a) {
3555
- return "production" !== process.env.NODE_ENV && ("from" in this.opts || Ko("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
3633
+ return "production" !== process.env.NODE_ENV && ("from" in this.opts || rs("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
3556
3634
  }
3557
3635
  toString() {
3558
3636
  return this.css;
@@ -3584,22 +3662,22 @@ let Qo = {}, es = class ro {
3584
3662
  }
3585
3663
  if (0 !== a.iterator) {
3586
3664
  let m3, w3 = a.iterator;
3587
- for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[Ho]) return m3[Ho] = true, void e.push(Gn(m3));
3665
+ for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[ts]) return m3[ts] = true, void e.push(Gn(m3));
3588
3666
  a.iterator = 0, delete u.indexes[w3];
3589
3667
  }
3590
3668
  let w2 = a.events;
3591
3669
  for (; a.eventIndex < w2.length; ) {
3592
3670
  let e2 = w2[a.eventIndex];
3593
- if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[Ho] = true, a.iterator = u.getIterator()));
3671
+ if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[ts] = true, a.iterator = u.getIterator()));
3594
3672
  if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
3595
3673
  }
3596
3674
  e.pop();
3597
3675
  }
3598
3676
  walkSync(e) {
3599
- e[Ho] = true;
3677
+ e[ts] = true;
3600
3678
  let a = no(e);
3601
3679
  for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
3602
- e2[Ho] || this.walkSync(e2);
3680
+ e2[ts] || this.walkSync(e2);
3603
3681
  });
3604
3682
  else {
3605
3683
  let a2 = this.listeners[u];
@@ -3610,14 +3688,14 @@ let Qo = {}, es = class ro {
3610
3688
  return this.sync().warnings();
3611
3689
  }
3612
3690
  };
3613
- es.registerPostcss = (e) => {
3614
- Qo = e;
3691
+ ls.registerPostcss = (e) => {
3692
+ as = e;
3615
3693
  };
3616
- var ts = es;
3617
- es.default = es, Vo.registerLazyResult(es), Uo.registerLazyResult(es);
3618
- let ns = Hr, rs = ho;
3619
- const os = Po;
3620
- let ss = Dt, is = so, as = class {
3694
+ var cs = ls;
3695
+ ls.default = ls, Qo.registerLazyResult(ls), Ko.registerLazyResult(ls);
3696
+ let us = to, ps = Uo;
3697
+ const ds = qo;
3698
+ let hs = Kt, ms = so, gs = class {
3621
3699
  get content() {
3622
3700
  return this.result.css;
3623
3701
  }
@@ -3638,7 +3716,7 @@ let ss = Dt, is = so, as = class {
3638
3716
  }
3639
3717
  get root() {
3640
3718
  if (this._root) return this._root;
3641
- let e, a = rs;
3719
+ let e, a = ps;
3642
3720
  try {
3643
3721
  e = a(this._css, this._opts);
3644
3722
  } catch (e2) {
@@ -3652,11 +3730,11 @@ let ss = Dt, is = so, as = class {
3652
3730
  }
3653
3731
  constructor(e, a, u) {
3654
3732
  a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
3655
- let m2, w2 = ss;
3656
- this.result = new os(this._processor, m2, this._opts), this.result.css = a;
3733
+ let m2, w2 = hs;
3734
+ this.result = new ds(this._processor, m2, this._opts), this.result.css = a;
3657
3735
  let b2 = this;
3658
3736
  Object.defineProperty(this.result, "root", { get: () => b2.root });
3659
- let C2 = new ns(w2, m2, this._opts, a);
3737
+ let C2 = new us(w2, m2, this._opts, a);
3660
3738
  if (C2.isMap()) {
3661
3739
  let [e2, a2] = C2.generate();
3662
3740
  e2 && (this.result.css = e2), a2 && (this.result.map = a2);
@@ -3676,7 +3754,7 @@ let ss = Dt, is = so, as = class {
3676
3754
  return this.result;
3677
3755
  }
3678
3756
  then(e, a) {
3679
- return "production" !== process.env.NODE_ENV && ("from" in this._opts || is("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
3757
+ return "production" !== process.env.NODE_ENV && ("from" in this._opts || ms("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
3680
3758
  }
3681
3759
  toString() {
3682
3760
  return this._css;
@@ -3685,9 +3763,9 @@ let ss = Dt, is = so, as = class {
3685
3763
  return [];
3686
3764
  }
3687
3765
  };
3688
- var ls = as;
3689
- as.default = as;
3690
- let cs = In, us = ts, ps = ls, ds = cr, hs = class {
3766
+ var ys = gs;
3767
+ gs.default = gs;
3768
+ let ws = Nn, bs = cs, Ss = ys, vs = yr, xs = class {
3691
3769
  constructor(e = []) {
3692
3770
  this.version = "8.5.3", this.plugins = this.normalize(e);
3693
3771
  }
@@ -3703,43 +3781,43 @@ let cs = In, us = ts, ps = ls, ds = cr, hs = class {
3703
3781
  return a;
3704
3782
  }
3705
3783
  process(e, a = {}) {
3706
- return this.plugins.length || a.parser || a.stringifier || a.syntax ? new us(this, e, a) : new ps(this, e, a);
3784
+ return this.plugins.length || a.parser || a.stringifier || a.syntax ? new bs(this, e, a) : new Ss(this, e, a);
3707
3785
  }
3708
3786
  use(e) {
3709
3787
  return this.plugins = this.plugins.concat(this.normalize([e])), this;
3710
3788
  }
3711
3789
  };
3712
- var ms = hs;
3713
- hs.default = hs, ds.registerProcessor(hs), cs.registerProcessor(hs);
3714
- let gs = yn, ys = Qt, ws = fn, bs = Mt, Ss = nn, vs = In, xs = Nr, Ms = or, Is = ts, _s = pr, Os = Kt, Es = ho, Ls = ms, Rs = Po, As = cr, Ts = mr, Ns = Dt, $s = _o;
3790
+ var Ms = xs;
3791
+ xs.default = xs, vs.registerProcessor(xs), ws.registerProcessor(xs);
3792
+ let Is = En, _s = ln, Os = In, Es = Bt, Ls = pn, Rs = Nn, As = Gr, Ts = dr, Ns = cs, $s = Sr, Ws = on, js = Uo, Gs = Ms, Vs = qo, qs = yr, Hs = Nr, Zs = Kt, Ks = jo;
3715
3793
  function L$1(...e) {
3716
- return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Ls(e);
3794
+ return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Gs(e);
3717
3795
  }
3718
3796
  L$1.plugin = function(e, a) {
3719
3797
  let u, m2 = false;
3720
3798
  function n(...u2) {
3721
3799
  console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
3722
3800
  let w2 = a(...u2);
3723
- return w2.postcssPlugin = e, w2.postcssVersion = new Ls().version, w2;
3801
+ return w2.postcssPlugin = e, w2.postcssVersion = new Gs().version, w2;
3724
3802
  }
3725
3803
  return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
3726
3804
  return L$1([n(u2)]).process(e2, a2);
3727
3805
  }, n;
3728
- }, L$1.stringify = Ns, L$1.parse = Es, L$1.fromJSON = xs, L$1.list = _s, L$1.comment = (e) => new ys(e), L$1.atRule = (e) => new gs(e), L$1.decl = (e) => new Ss(e), L$1.rule = (e) => new Ts(e), L$1.root = (e) => new As(e), L$1.document = (e) => new vs(e), L$1.CssSyntaxError = bs, L$1.Declaration = Ss, L$1.Container = ws, L$1.Processor = Ls, L$1.Document = vs, L$1.Comment = ys, L$1.Warning = $s, L$1.AtRule = gs, L$1.Result = Rs, L$1.Input = Ms, L$1.Rule = Ts, L$1.Root = As, L$1.Node = Os, Is.registerPostcss(L$1);
3729
- var Ws = L$1;
3806
+ }, L$1.stringify = Zs, L$1.parse = js, L$1.fromJSON = As, L$1.list = $s, L$1.comment = (e) => new _s(e), L$1.atRule = (e) => new Is(e), L$1.decl = (e) => new Ls(e), L$1.rule = (e) => new Hs(e), L$1.root = (e) => new qs(e), L$1.document = (e) => new Rs(e), L$1.CssSyntaxError = Es, L$1.Declaration = Ls, L$1.Container = Os, L$1.Processor = Gs, L$1.Document = Rs, L$1.Comment = _s, L$1.Warning = Ks, L$1.AtRule = Is, L$1.Result = Vs, L$1.Input = Ts, L$1.Rule = Hs, L$1.Root = qs, L$1.Node = Ws, Ns.registerPostcss(L$1);
3807
+ var Ys = L$1;
3730
3808
  L$1.default = L$1;
3731
- const js = Yi(Ws);
3732
- js.stringify, js.fromJSON, js.plugin, js.parse, js.list, js.document, js.comment, js.atRule, js.rule, js.decl, js.root, js.CssSyntaxError, js.Declaration, js.Container, js.Processor, js.Document, js.Comment, js.Warning, js.AtRule, js.Result, js.Input, js.Rule, js.Root, js.Node;
3733
- var Gs = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(Gs || {}), Vs = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e[e.Typing = 17] = "Typing", e))(Vs || {}), qs = ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(qs || {}), Hs = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(Hs || {}), Zs = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(Zs || {}), Ks = ((e) => (e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause", e[e.Seeked = 2] = "Seeked", e[e.VolumeChange = 3] = "VolumeChange", e[e.RateChange = 4] = "RateChange", e))(Ks || {});
3809
+ const Xs = Yi(Ys);
3810
+ Xs.stringify, Xs.fromJSON, Xs.plugin, Xs.parse, Xs.list, Xs.document, Xs.comment, Xs.atRule, Xs.rule, Xs.decl, Xs.root, Xs.CssSyntaxError, Xs.Declaration, Xs.Container, Xs.Processor, Xs.Document, Xs.Comment, Xs.Warning, Xs.AtRule, Xs.Result, Xs.Input, Xs.Rule, Xs.Root, Xs.Node;
3811
+ var Qs = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(Qs || {}), ei = ((e) => (e[e.Mutation = 0] = "Mutation", e[e.MouseMove = 1] = "MouseMove", e[e.MouseInteraction = 2] = "MouseInteraction", e[e.Scroll = 3] = "Scroll", e[e.ViewportResize = 4] = "ViewportResize", e[e.Input = 5] = "Input", e[e.TouchMove = 6] = "TouchMove", e[e.MediaInteraction = 7] = "MediaInteraction", e[e.StyleSheetRule = 8] = "StyleSheetRule", e[e.CanvasMutation = 9] = "CanvasMutation", e[e.Font = 10] = "Font", e[e.Log = 11] = "Log", e[e.Drag = 12] = "Drag", e[e.StyleDeclaration = 13] = "StyleDeclaration", e[e.Selection = 14] = "Selection", e[e.AdoptedStyleSheet = 15] = "AdoptedStyleSheet", e[e.CustomElement = 16] = "CustomElement", e[e.Typing = 17] = "Typing", e))(ei || {}), ti = ((e) => (e[e.MouseUp = 0] = "MouseUp", e[e.MouseDown = 1] = "MouseDown", e[e.Click = 2] = "Click", e[e.ContextMenu = 3] = "ContextMenu", e[e.DblClick = 4] = "DblClick", e[e.Focus = 5] = "Focus", e[e.Blur = 6] = "Blur", e[e.TouchStart = 7] = "TouchStart", e[e.TouchMove_Departed = 8] = "TouchMove_Departed", e[e.TouchEnd = 9] = "TouchEnd", e[e.TouchCancel = 10] = "TouchCancel", e))(ti || {}), si = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(si || {}), ii = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(ii || {}), ai = ((e) => (e[e.Play = 0] = "Play", e[e.Pause = 1] = "Pause", e[e.Seeked = 2] = "Seeked", e[e.VolumeChange = 3] = "VolumeChange", e[e.RateChange = 4] = "RateChange", e))(ai || {});
3734
3812
  function G(e, a, u = document) {
3735
3813
  const m2 = { capture: true, passive: true };
3736
3814
  return u.addEventListener(e, a, m2), () => u.removeEventListener(e, a, m2);
3737
3815
  }
3738
- const Ys = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
3739
- let Xs = { map: {}, getId: () => (console.error(Ys), -1), getNode: () => (console.error(Ys), null), removeNodeFromMap() {
3740
- console.error(Ys);
3741
- }, has: () => (console.error(Ys), false), reset() {
3742
- console.error(Ys);
3816
+ const li = "Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";
3817
+ let ci = { map: {}, getId: () => (console.error(li), -1), getNode: () => (console.error(li), null), removeNodeFromMap() {
3818
+ console.error(li);
3819
+ }, has: () => (console.error(li), false), reset() {
3820
+ console.error(li);
3743
3821
  } };
3744
3822
  function $e(e, a, u = {}) {
3745
3823
  let m2 = null, w2 = 0;
@@ -3773,8 +3851,8 @@ function Re(e, a, u) {
3773
3851
  };
3774
3852
  }
3775
3853
  }
3776
- typeof window < "u" && window.Proxy && window.Reflect && (Xs = new Proxy(Xs, { get: (e, a, u) => ("map" === a && console.error(Ys), Reflect.get(e, a, u)) }));
3777
- let Qs, ei = Date.now;
3854
+ typeof window < "u" && window.Proxy && window.Reflect && (ci = new Proxy(ci, { get: (e, a, u) => ("map" === a && console.error(li), Reflect.get(e, a, u)) }));
3855
+ let ui, pi = Date.now;
3778
3856
  function po(e) {
3779
3857
  var a, u, m2, w2, b2, C2;
3780
3858
  const x2 = e.document;
@@ -3821,7 +3899,7 @@ function bo(e, a) {
3821
3899
  function Fs(e) {
3822
3900
  return !(null == e || !e.shadowRoot);
3823
3901
  }
3824
- /[1-9][0-9]{12}/.test(Date.now().toString()) || (ei = () => (/* @__PURE__ */ new Date()).getTime());
3902
+ /[1-9][0-9]{12}/.test(Date.now().toString()) || (pi = () => (/* @__PURE__ */ new Date()).getTime());
3825
3903
  class _l {
3826
3904
  constructor() {
3827
3905
  b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
@@ -3866,11 +3944,11 @@ function vo(e) {
3866
3944
  const a = e.ownerDocument;
3867
3945
  return !!a && (a.contains(e) || zl(e));
3868
3946
  }
3869
- const M = (e) => Qs ? (...a) => {
3947
+ const M = (e) => ui ? (...a) => {
3870
3948
  try {
3871
3949
  return e(...a);
3872
3950
  } catch (e2) {
3873
- if (Qs && true === Qs(e2)) return;
3951
+ if (ui && true === ui(e2)) return;
3874
3952
  throw e2;
3875
3953
  }
3876
3954
  } : e;
@@ -3929,22 +4007,22 @@ class Vl {
3929
4007
  transformCrossOriginEvent(e, a) {
3930
4008
  var u;
3931
4009
  switch (a.type) {
3932
- case Gs.FullSnapshot: {
4010
+ case Qs.FullSnapshot: {
3933
4011
  this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(a.data.node, e);
3934
4012
  const u2 = a.data.node.id;
3935
- return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: Gs.IncrementalSnapshot, data: { source: Vs.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
4013
+ return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: Qs.IncrementalSnapshot, data: { source: ei.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
3936
4014
  }
3937
- case Gs.Meta:
3938
- case Gs.Load:
3939
- case Gs.DomContentLoaded:
4015
+ case Qs.Meta:
4016
+ case Qs.Load:
4017
+ case Qs.DomContentLoaded:
3940
4018
  return false;
3941
- case Gs.Plugin:
4019
+ case Qs.Plugin:
3942
4020
  return a;
3943
- case Gs.Custom:
4021
+ case Qs.Custom:
3944
4022
  return this.replaceIds(a.data.payload, e, ["id", "parentId", "previousId", "nextId"]), a;
3945
- case Gs.IncrementalSnapshot:
4023
+ case Qs.IncrementalSnapshot:
3946
4024
  switch (a.data.source) {
3947
- case Vs.Mutation:
4025
+ case ei.Mutation:
3948
4026
  return a.data.adds.forEach((a2) => {
3949
4027
  this.replaceIds(a2, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a2.node, e);
3950
4028
  const u2 = this.crossOriginIframeRootIdMap.get(e);
@@ -3956,30 +4034,30 @@ class Vl {
3956
4034
  }), a.data.texts.forEach((a2) => {
3957
4035
  this.replaceIds(a2, e, ["id"]);
3958
4036
  }), a;
3959
- case Vs.Drag:
3960
- case Vs.TouchMove:
3961
- case Vs.MouseMove:
4037
+ case ei.Drag:
4038
+ case ei.TouchMove:
4039
+ case ei.MouseMove:
3962
4040
  return a.data.positions.forEach((a2) => {
3963
4041
  this.replaceIds(a2, e, ["id"]);
3964
4042
  }), a;
3965
- case Vs.ViewportResize:
4043
+ case ei.ViewportResize:
3966
4044
  return false;
3967
- case Vs.MediaInteraction:
3968
- case Vs.MouseInteraction:
3969
- case Vs.Scroll:
3970
- case Vs.CanvasMutation:
3971
- case Vs.Input:
4045
+ case ei.MediaInteraction:
4046
+ case ei.MouseInteraction:
4047
+ case ei.Scroll:
4048
+ case ei.CanvasMutation:
4049
+ case ei.Input:
3972
4050
  return this.replaceIds(a.data, e, ["id"]), a;
3973
- case Vs.StyleSheetRule:
3974
- case Vs.StyleDeclaration:
4051
+ case ei.StyleSheetRule:
4052
+ case ei.StyleDeclaration:
3975
4053
  return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleId"]), a;
3976
- case Vs.Font:
4054
+ case ei.Font:
3977
4055
  return a;
3978
- case Vs.Selection:
4056
+ case ei.Selection:
3979
4057
  return a.data.ranges.forEach((a2) => {
3980
4058
  this.replaceIds(a2, e, ["start", "end"]);
3981
4059
  }), a;
3982
- case Vs.AdoptedStyleSheet:
4060
+ case ei.AdoptedStyleSheet:
3983
4061
  return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleIds"]), null == (u = a.data.styles) || u.forEach((a2) => {
3984
4062
  this.replaceStyleIds(a2, e, ["styleId"]);
3985
4063
  }), a;
@@ -4003,7 +4081,7 @@ class Vl {
4003
4081
  });
4004
4082
  }
4005
4083
  patchRootIdOnNode(e, a) {
4006
- e.type !== et.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
4084
+ e.type !== ut.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
4007
4085
  this.patchRootIdOnNode(e2, a);
4008
4086
  });
4009
4087
  }
@@ -4221,7 +4299,7 @@ function ko(e, a) {
4221
4299
  const { parentNode: u } = a;
4222
4300
  return !!u && (!!e.has(u) || ko(e, u));
4223
4301
  }
4224
- const ti = [];
4302
+ const di = [];
4225
4303
  function tt(e) {
4226
4304
  try {
4227
4305
  if ("composedPath" in e) {
@@ -4235,7 +4313,7 @@ function tt(e) {
4235
4313
  function Co(e, a) {
4236
4314
  var u, m2;
4237
4315
  const w2 = new Zl();
4238
- ti.push(w2), w2.init(e);
4316
+ di.push(w2), w2.init(e);
4239
4317
  let b2 = window.MutationObserver || window.__rrMutationObserver;
4240
4318
  const C2 = null == (m2 = null == (u = null == window ? void 0 : window.Zone) ? void 0 : u.__symbol__) ? void 0 : m2.call(u, "MutationObserver");
4241
4319
  C2 && window[C2] && (b2 = window[C2]);
@@ -4247,7 +4325,7 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
4247
4325
  };
4248
4326
  const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
4249
4327
  let I2 = null;
4250
- return Object.keys(qs).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
4328
+ return Object.keys(ti).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
4251
4329
  let C3 = fe(b3);
4252
4330
  const _2 = /* @__PURE__ */ ((a2) => (b4) => {
4253
4331
  const C4 = tt(b4);
@@ -4256,29 +4334,29 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
4256
4334
  if ("pointerType" in b4) {
4257
4335
  switch (b4.pointerType) {
4258
4336
  case "mouse":
4259
- x3 = Hs.Mouse;
4337
+ x3 = si.Mouse;
4260
4338
  break;
4261
4339
  case "touch":
4262
- x3 = Hs.Touch;
4340
+ x3 = si.Touch;
4263
4341
  break;
4264
4342
  case "pen":
4265
- x3 = Hs.Pen;
4343
+ x3 = si.Pen;
4266
4344
  }
4267
- x3 === Hs.Touch ? qs[a2] === qs.MouseDown ? _3 = "TouchStart" : qs[a2] === qs.MouseUp && (_3 = "TouchEnd") : Hs.Pen;
4268
- } else Ds(b4) && (x3 = Hs.Touch);
4269
- null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === Hs.Touch || _3.startsWith("Mouse") && x3 === Hs.Mouse) && (x3 = null)) : qs[a2] === qs.Click && (x3 = I2, I2 = null);
4345
+ x3 === si.Touch ? ti[a2] === ti.MouseDown ? _3 = "TouchStart" : ti[a2] === ti.MouseUp && (_3 = "TouchEnd") : si.Pen;
4346
+ } else Ds(b4) && (x3 = si.Touch);
4347
+ null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === si.Touch || _3.startsWith("Mouse") && x3 === si.Mouse) && (x3 = null)) : ti[a2] === ti.Click && (x3 = I2, I2 = null);
4270
4348
  const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
4271
4349
  if (!O2) return;
4272
4350
  const E2 = u.getId(C4), { clientX: D2, clientY: F2 } = O2;
4273
- M(e)({ type: qs[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
4351
+ M(e)({ type: ti[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
4274
4352
  })(b3);
4275
- if (window.PointerEvent) switch (qs[b3]) {
4276
- case qs.MouseDown:
4277
- case qs.MouseUp:
4353
+ if (window.PointerEvent) switch (ti[b3]) {
4354
+ case ti.MouseDown:
4355
+ case ti.MouseUp:
4278
4356
  C3 = C3.replace("mouse", "pointer");
4279
4357
  break;
4280
- case qs.TouchStart:
4281
- case qs.TouchEnd:
4358
+ case ti.TouchStart:
4359
+ case ti.TouchEnd:
4282
4360
  return;
4283
4361
  }
4284
4362
  x2.push(G(C3, _2, a));
@@ -4297,7 +4375,7 @@ function xo({ scrollCb: e, doc: a, mirror: u, blockClass: m2, blockSelector: w2,
4297
4375
  } else e({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
4298
4376
  }), b2.scroll || 100)), a);
4299
4377
  }
4300
- const si = ["INPUT", "TEXTAREA", "SELECT"], ii = /* @__PURE__ */ new WeakMap();
4378
+ const hi = ["INPUT", "TEXTAREA", "SELECT"], fi = /* @__PURE__ */ new WeakMap();
4301
4379
  function ql({ deviceChangeCb: e }) {
4302
4380
  const t = (a2, u2) => {
4303
4381
  const m2 = a2.device.productName ? [a2.device.productName] : ["Unknown USB Device"];
@@ -4374,7 +4452,7 @@ function au(e, a = {}) {
4374
4452
  };
4375
4453
  let m2;
4376
4454
  !(function iu(e2, a2) {
4377
- const { mutationCb: u2, mousemoveCb: m3, mouseInteractionCb: w3, scrollCb: b3, viewportResizeCb: C3, inputCb: x3, typingCb: I3, deviceChangeCb: _3, mediaInteractionCb: O3, styleSheetRuleCb: E3, styleDeclarationCb: D3, canvasMutationCb: F3, fontCb: U3, selectionCb: $2, customElementCb: B2 } = e2;
4455
+ const { mutationCb: u2, mousemoveCb: m3, mouseInteractionCb: w3, scrollCb: b3, viewportResizeCb: C3, inputCb: x3, typingCb: I3, deviceChangeCb: _3, mediaInteractionCb: O3, styleSheetRuleCb: E3, styleDeclarationCb: D3, canvasMutationCb: F3, fontCb: U3, selectionCb: B2, customElementCb: $2 } = e2;
4378
4456
  e2.mutationCb = (...e3) => {
4379
4457
  a2.mutation && a2.mutation(...e3), u2(...e3);
4380
4458
  }, e2.mousemoveCb = (...e3) => {
@@ -4402,9 +4480,9 @@ function au(e, a = {}) {
4402
4480
  }, e2.fontCb = (...e3) => {
4403
4481
  a2.font && a2.font(...e3), U3(...e3);
4404
4482
  }, e2.selectionCb = (...e3) => {
4405
- a2.selection && a2.selection(...e3), $2(...e3);
4483
+ a2.selection && a2.selection(...e3), B2(...e3);
4406
4484
  }, e2.customElementCb = (...e3) => {
4407
- a2.customElement && a2.customElement(...e3), B2(...e3);
4485
+ a2.customElement && a2.customElement(...e3), $2(...e3);
4408
4486
  };
4409
4487
  })(e, a), e.recordDOM && (m2 = Co(e, e.doc));
4410
4488
  const w2 = (function $l({ mousemoveCb: e2, sampling: a2, doc: u2, mirror: m3 }) {
@@ -4417,7 +4495,7 @@ function au(e, a = {}) {
4417
4495
  e2(x3.map((e3) => (e3.timeOffset -= u3, e3)), a3), x3 = [], C3 = null;
4418
4496
  }), b3), _3 = M($e(M((e3) => {
4419
4497
  const a3 = tt(e3), { clientX: u3, clientY: w4 } = Ds(e3) ? e3.changedTouches[0] : e3;
4420
- C3 || (C3 = ei()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: ei() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? Vs.Drag : e3 instanceof MouseEvent ? Vs.MouseMove : Vs.TouchMove);
4498
+ C3 || (C3 = pi()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: pi() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? ei.Drag : e3 instanceof MouseEvent ? ei.MouseMove : ei.TouchMove);
4421
4499
  }), w3, { trailing: false })), O3 = [G("mousemove", _3, u2), G("touchmove", _3, u2), G("drag", _3, u2)];
4422
4500
  return M(() => {
4423
4501
  O3.forEach((e3) => e3());
@@ -4433,22 +4511,22 @@ function au(e, a = {}) {
4433
4511
  function p(e3) {
4434
4512
  let u3 = tt(e3);
4435
4513
  const _4 = e3.isTrusted, E4 = u3 && u3.tagName;
4436
- if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || si.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
4514
+ if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || hi.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
4437
4515
  let D4 = u3.value, F4 = false;
4438
- const U4 = Yt(u3) || "", { value: $2, masked: B2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
4439
- D4 = $2, ("radio" === U4 || "checkbox" === U4) && (F4 = u3.checked), f2(u3, O3 ? { text: D4, isChecked: F4, masked: B2, userTriggered: _4 } : { text: D4, isChecked: F4, masked: B2 });
4516
+ const U4 = Yt(u3) || "", { value: B2, masked: $2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
4517
+ D4 = B2, ("radio" === U4 || "checkbox" === U4) && (F4 = u3.checked), f2(u3, O3 ? { text: D4, isChecked: F4, masked: $2, userTriggered: _4 } : { text: D4, isChecked: F4, masked: $2 });
4440
4518
  const z2 = u3.name;
4441
4519
  "radio" === U4 && z2 && F4 && a2.querySelectorAll(`input[type='radio'][name='${z2}']`).forEach((e4) => {
4442
4520
  if (e4 !== u3) {
4443
4521
  const a3 = e4.value;
4444
- f2(e4, O3 ? { text: a3, isChecked: !F4, masked: B2, userTriggered: false } : { text: a3, isChecked: !F4, masked: B2 });
4522
+ f2(e4, O3 ? { text: a3, isChecked: !F4, masked: $2, userTriggered: false } : { text: a3, isChecked: !F4, masked: $2 });
4445
4523
  }
4446
4524
  });
4447
4525
  }
4448
4526
  function f2(a3, m4) {
4449
- const w4 = ii.get(a3);
4527
+ const w4 = fi.get(a3);
4450
4528
  if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
4451
- ii.set(a3, m4);
4529
+ fi.set(a3, m4);
4452
4530
  const w5 = u2.getId(a3);
4453
4531
  M(e2)({ ...m4, id: w5 });
4454
4532
  }
@@ -4473,7 +4551,7 @@ function au(e, a = {}) {
4473
4551
  const { value: e3, masked: a4 } = Zt({ element: w4, maskInputOptions: u2, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
4474
4552
  _3 = e3, b3 = a4;
4475
4553
  }
4476
- e2({ source: Vs.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
4554
+ e2({ source: ei.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
4477
4555
  var a4;
4478
4556
  const u3 = [];
4479
4557
  for (; e3; ) {
@@ -4501,7 +4579,7 @@ function au(e, a = {}) {
4501
4579
  if (!C4 || Z(C4, a2, u2, true)) return;
4502
4580
  const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
4503
4581
  e2({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
4504
- }), w3.media || 500)), x3 = [G("play", C3(Ks.Play), b3), G("pause", C3(Ks.Pause), b3), G("seeked", C3(Ks.Seeked), b3), G("volumechange", C3(Ks.VolumeChange), b3), G("ratechange", C3(Ks.RateChange), b3)];
4582
+ }), w3.media || 500)), x3 = [G("play", C3(ai.Play), b3), G("pause", C3(ai.Pause), b3), G("seeked", C3(ai.Seeked), b3), G("volumechange", C3(ai.VolumeChange), b3), G("ratechange", C3(ai.RateChange), b3)];
4505
4583
  return M(() => {
4506
4584
  x3.forEach((e3) => e3());
4507
4585
  });
@@ -4622,7 +4700,7 @@ function au(e, a = {}) {
4622
4700
  })(e), U2 = [];
4623
4701
  for (const a2 of e.plugins) U2.push(a2.observer(a2.callback, u, a2.options));
4624
4702
  return M(() => {
4625
- ti.forEach((e2) => e2.reset()), null == m2 || m2.disconnect(), w2(), b2(), C2(), x2(), I2(), _2(), E2(), f(), d2(), g2(), h(), D2(), F2(), O2(), U2.forEach((e2) => e2());
4703
+ di.forEach((e2) => e2.reset()), null == m2 || m2.disconnect(), w2(), b2(), C2(), x2(), I2(), _2(), E2(), f(), d2(), g2(), h(), D2(), F2(), O2(), U2.forEach((e2) => e2());
4626
4704
  });
4627
4705
  }
4628
4706
  function ft(e) {
@@ -4631,29 +4709,29 @@ function ft(e) {
4631
4709
  function mt(e) {
4632
4710
  return !!(typeof window[e] < "u" && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype);
4633
4711
  }
4634
- const ai = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", li = typeof self < "u" && self.Blob && new Blob([(ci = ai, Uint8Array.from(atob(ci), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
4635
- var ci;
4712
+ const mi = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", gi = typeof self < "u" && self.Blob && new Blob([(yi = mi, Uint8Array.from(atob(yi), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
4713
+ var yi;
4636
4714
  function uu(e) {
4637
4715
  let a;
4638
4716
  try {
4639
- if (a = li && (self.URL || self.webkitURL).createObjectURL(li), !a) throw "";
4717
+ if (a = gi && (self.URL || self.webkitURL).createObjectURL(gi), !a) throw "";
4640
4718
  const u = new Worker(a, { name: null == e ? void 0 : e.name });
4641
4719
  return u.addEventListener("error", () => {
4642
4720
  (self.URL || self.webkitURL).revokeObjectURL(a);
4643
4721
  }), u;
4644
4722
  } catch {
4645
- return new Worker("data:text/javascript;base64," + ai, { name: null == e ? void 0 : e.name });
4723
+ return new Worker("data:text/javascript;base64," + mi, { name: null == e ? void 0 : e.name });
4646
4724
  } finally {
4647
4725
  a && (self.URL || self.webkitURL).revokeObjectURL(a);
4648
4726
  }
4649
4727
  }
4650
- for (var ui = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", pi = typeof Uint8Array > "u" ? [] : new Uint8Array(256), di = 0; di < 64; di++) pi[ui.charCodeAt(di)] = di;
4651
- const hi = /* @__PURE__ */ new Map();
4728
+ for (var Mi = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ii = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Li = 0; Li < 64; Li++) Ii[Mi.charCodeAt(Li)] = Li;
4729
+ const Ri = /* @__PURE__ */ new Map();
4652
4730
  const Oo = (e, a, u) => {
4653
4731
  if (!e || !Ro(e, a) && "object" != typeof e) return;
4654
4732
  const m2 = (function pu(e2, a2) {
4655
- let u2 = hi.get(e2);
4656
- return u2 || (u2 = /* @__PURE__ */ new Map(), hi.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
4733
+ let u2 = Ri.get(e2);
4734
+ return u2 || (u2 = /* @__PURE__ */ new Map(), Ri.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
4657
4735
  })(u, e.constructor.name);
4658
4736
  let w2 = m2.indexOf(e);
4659
4737
  return -1 === w2 && (w2 = m2.length, m2.push(e)), w2;
@@ -4665,7 +4743,7 @@ function Ot(e, a, u) {
4665
4743
  if (e instanceof ArrayBuffer) {
4666
4744
  const a2 = e.constructor.name, u2 = (function(e2) {
4667
4745
  var a3, u3 = new Uint8Array(e2), m2 = u3.length, w2 = "";
4668
- for (a3 = 0; a3 < m2; a3 += 3) w2 += ui[u3[a3] >> 2], w2 += ui[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += ui[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += ui[63 & u3[a3 + 2]];
4746
+ for (a3 = 0; a3 < m2; a3 += 3) w2 += Mi[u3[a3] >> 2], w2 += Mi[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += Mi[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += Mi[63 & u3[a3 + 2]];
4669
4747
  return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
4670
4748
  })(e);
4671
4749
  return { rr_type: a2, base64: u2 };
@@ -4762,7 +4840,7 @@ class gu {
4762
4840
  const { id: a2 } = e2.data;
4763
4841
  if (C2.set(a2, false), !("base64" in e2.data)) return;
4764
4842
  const { base64: u2, type: m3, width: w3, height: b3 } = e2.data;
4765
- this.mutationCb({ id: a2, type: Zs["2D"], commands: [{ property: "clearRect", args: [0, 0, w3, b3] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: u2 }], type: m3 }] }, 0, 0] }] });
4843
+ this.mutationCb({ id: a2, type: ii["2D"], commands: [{ property: "clearRect", args: [0, 0, w3, b3] }, { property: "drawImage", args: [{ rr_type: "ImageBitmap", args: [{ rr_type: "Blob", data: [{ rr_type: "ArrayBuffer", base64: u2 }], type: m3 }] }, 0, 0] }] });
4766
4844
  };
4767
4845
  const I2 = 1e3 / e;
4768
4846
  let _2, O2 = 0;
@@ -4798,14 +4876,14 @@ class gu {
4798
4876
  return function(...b5) {
4799
4877
  return Z(this.canvas, u2, m3, true) || setTimeout(() => {
4800
4878
  const u3 = Eo(b5, a2, this);
4801
- e2(this.canvas, { type: Zs["2D"], property: C2, args: u3 });
4879
+ e2(this.canvas, { type: ii["2D"], property: C2, args: u3 });
4802
4880
  }, 0), w4.apply(this, b5);
4803
4881
  };
4804
4882
  });
4805
4883
  w3.push(b4);
4806
4884
  } catch {
4807
4885
  const u3 = qt(a2.CanvasRenderingContext2D.prototype, C2, { set(a3) {
4808
- e2(this.canvas, { type: Zs["2D"], property: C2, args: [a3], setter: true });
4886
+ e2(this.canvas, { type: ii["2D"], property: C2, args: [a3], setter: true });
4809
4887
  } });
4810
4888
  w3.push(u3);
4811
4889
  }
@@ -4814,7 +4892,7 @@ class gu {
4814
4892
  };
4815
4893
  })(this.processMutation.bind(this), e, a, u), b2 = (function mu(e2, a2, u2, m3) {
4816
4894
  const w3 = [];
4817
- return w3.push(...tr(a2.WebGLRenderingContext.prototype, Zs.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, Zs.WebGL2, e2, u2, m3, a2)), () => {
4895
+ return w3.push(...tr(a2.WebGLRenderingContext.prototype, ii.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, ii.WebGL2, e2, u2, m3, a2)), () => {
4818
4896
  w3.forEach((e3) => e3());
4819
4897
  };
4820
4898
  })(this.processMutation.bind(this), e, a, u);
@@ -4925,25 +5003,25 @@ class bu {
4925
5003
  trackStylesheetInLinkElement(e) {
4926
5004
  }
4927
5005
  }
4928
- let fi, mi, gi, yi = false;
4929
- var Mi;
5006
+ let Ai, Ti, Ni, Pi = false;
5007
+ var qi;
4930
5008
  try {
4931
5009
  if (2 !== Array.from([1], (e) => 2 * e)[0]) {
4932
5010
  const e = document.createElement("iframe");
4933
- document.body.appendChild(e), Array.from = (null == (Mi = e.contentWindow) ? void 0 : Mi.Array.from) || Array.from, document.body.removeChild(e);
5011
+ document.body.appendChild(e), Array.from = (null == (qi = e.contentWindow) ? void 0 : qi.Array.from) || Array.from, document.body.removeChild(e);
4934
5012
  }
4935
- } catch (ci2) {
4936
- console.debug("Unable to override Array.from", ci2);
5013
+ } catch (yi2) {
5014
+ console.debug("Unable to override Array.from", yi2);
4937
5015
  }
4938
- const Ii = (function Ci() {
4939
- return new nt();
5016
+ const Hi = (function Ci() {
5017
+ return new pt();
4940
5018
  })();
4941
5019
  function ae(e = {}) {
4942
- const { emit: a, checkoutEveryNms: u, checkoutEveryNth: m2, blockClass: w2 = "rr-block", blockSelector: b2 = null, ignoreClass: C2 = "rr-ignore", ignoreSelector: x2 = null, maskTextClass: I2 = "rr-mask", maskTextSelector: _2 = null, inlineStylesheet: O2 = true, maskAllInputs: E2, maskInputOptions: D2, slimDOMOptions: F2, maskInputFn: U2, maskTextFn: $2, hooks: B2, packFn: z2, sampling: j2 = {}, dataURLOptions: V2 = {}, mousemoveWait: q2, recordDOM: H2 = true, recordCanvas: Y2 = false, recordCrossOriginIframes: J2 = false, recordAfter: X2 = "DOMContentLoaded" === e.recordAfter ? e.recordAfter : "load", userTriggeredOnInput: Q2 = false, collectFonts: ee2 = false, inlineImages: te2 = false, plugins: ne2, keepIframeSrcFn: re2 = () => false, ignoreCSSAttributes: oe2 = /* @__PURE__ */ new Set([]), errorHandler: se2 } = e;
5020
+ const { emit: a, checkoutEveryNms: u, checkoutEveryNth: m2, blockClass: w2 = "rr-block", blockSelector: b2 = null, ignoreClass: C2 = "rr-ignore", ignoreSelector: x2 = null, maskTextClass: I2 = "rr-mask", maskTextSelector: _2 = null, inlineStylesheet: O2 = true, maskAllInputs: E2, maskInputOptions: D2, slimDOMOptions: F2, maskInputFn: U2, maskTextFn: B2, hooks: $2, packFn: z2, sampling: j2 = {}, dataURLOptions: V2 = {}, mousemoveWait: q2, recordDOM: H2 = true, recordCanvas: J2 = false, recordCrossOriginIframes: Y2 = false, recordAfter: X2 = "DOMContentLoaded" === e.recordAfter ? e.recordAfter : "load", userTriggeredOnInput: Q2 = false, collectFonts: ee2 = false, inlineImages: te2 = false, plugins: ne2, keepIframeSrcFn: re2 = () => false, ignoreCSSAttributes: oe2 = /* @__PURE__ */ new Set([]), errorHandler: se2 } = e;
4943
5021
  !(function Bl(e2) {
4944
- Qs = e2;
5022
+ ui = e2;
4945
5023
  })(se2);
4946
- const ie2 = !J2 || window.parent === window;
5024
+ const ie2 = !Y2 || window.parent === window;
4947
5025
  let le2 = false;
4948
5026
  if (!ie2) try {
4949
5027
  window.parent.document && (le2 = false);
@@ -4953,7 +5031,7 @@ function ae(e = {}) {
4953
5031
  if (ie2 && !a) throw new Error("emit function is required");
4954
5032
  if (!ie2 && !le2) return () => {
4955
5033
  };
4956
- void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), Ii.reset();
5034
+ void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), Hi.reset();
4957
5035
  const ce2 = true === E2 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : void 0 !== D2 ? D2 : { password: true }, pe2 = true === F2 || "all" === F2 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaVerification: true, headMetaAuthorship: "all" === F2, headMetaDescKeywords: "all" === F2, headTitleMutations: "all" === F2 } : F2 || {};
4958
5036
  !(function Ul(e2 = window) {
4959
5037
  "NodeList" in e2 && !e2.NodeList.prototype.forEach && (e2.NodeList.prototype.forEach = Array.prototype.forEach), "DOMTokenList" in e2 && !e2.DOMTokenList.prototype.forEach && (e2.DOMTokenList.prototype.forEach = Array.prototype.forEach), Node.prototype.contains || (Node.prototype.contains = (...e3) => {
@@ -4970,57 +5048,57 @@ function ae(e = {}) {
4970
5048
  for (const a2 of ne2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
4971
5049
  return z2 && !le2 && (e2 = z2(e2)), e2;
4972
5050
  };
4973
- fi = (e2, w3) => {
5051
+ Ai = (e2, w3) => {
4974
5052
  var b3;
4975
5053
  const C3 = e2;
4976
- if (C3.timestamp = ei(), null != (b3 = ti[0]) && b3.isFrozen() && C3.type !== Gs.FullSnapshot && !(C3.type === Gs.IncrementalSnapshot && C3.data.source === Vs.Mutation) && ti.forEach((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
5054
+ if (C3.timestamp = pi(), null != (b3 = di[0]) && b3.isFrozen() && C3.type !== Qs.FullSnapshot && !(C3.type === Qs.IncrementalSnapshot && C3.data.source === ei.Mutation) && di.forEach((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
4977
5055
  else if (le2) {
4978
5056
  const e3 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
4979
5057
  window.parent.postMessage(e3, "*");
4980
5058
  }
4981
- if (C3.type === Gs.FullSnapshot) de2 = C3, he2 = 0;
4982
- else if (C3.type === Gs.IncrementalSnapshot) {
4983
- if (C3.data.source === Vs.Mutation && C3.data.isAttachIframe) return;
5059
+ if (C3.type === Qs.FullSnapshot) de2 = C3, he2 = 0;
5060
+ else if (C3.type === Qs.IncrementalSnapshot) {
5061
+ if (C3.data.source === ei.Mutation && C3.data.isAttachIframe) return;
4984
5062
  he2++;
4985
5063
  const e3 = m2 && he2 >= m2, a2 = u && C3.timestamp - de2.timestamp > u;
4986
- (e3 || a2) && mi(true);
5064
+ (e3 || a2) && Ti(true);
4987
5065
  }
4988
5066
  };
4989
5067
  const rt = (e2) => {
4990
- fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.Mutation, ...e2 } });
4991
- }, kn = (e2) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.Scroll, ...e2 } }), Cn = (e2) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: Ii, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: J2, wrappedEmit: fi });
4992
- for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: Ii, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
5068
+ Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Mutation, ...e2 } });
5069
+ }, kn = (e2) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Scroll, ...e2 } }), Cn = (e2) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: Hi, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: Ai });
5070
+ for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: Hi, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
4993
5071
  const ye2 = new yu();
4994
- gi = new gu({ recordCanvas: Y2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: Ii, sampling: j2.canvas, dataURLOptions: V2 });
4995
- const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: $2, maskInputFn: U2, recordCanvas: Y2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager: gi, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: Ii });
4996
- mi = (e2 = false) => {
5072
+ Ni = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: Hi, sampling: j2.canvas, dataURLOptions: V2 });
5073
+ const we2 = new wu({ mutationCb: rt, scrollCb: kn, bypassOptions: { blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskInputOptions: ce2, dataURLOptions: V2, maskTextFn: B2, maskInputFn: U2, recordCanvas: J2, inlineImages: te2, sampling: j2, slimDOMOptions: pe2, iframeManager: ge2, stylesheetManager: me2, canvasManager: Ni, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: Hi });
5074
+ Ti = (e2 = false) => {
4997
5075
  if (!H2) return;
4998
- fi({ type: Gs.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), ti.forEach((e3) => e3.lock());
5076
+ Ai({ type: Qs.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), di.forEach((e3) => e3.lock());
4999
5077
  const a2 = (function Zi(e3, a3) {
5000
- const { mirror: u2 = new nt(), blockClass: m3 = "rr-block", blockSelector: w3 = null, maskTextClass: b3 = "rr-mask", maskTextSelector: C3 = null, inlineStylesheet: x3 = true, inlineImages: I3 = false, recordCanvas: _3 = false, maskAllInputs: O3 = false, maskTextFn: E3, maskInputFn: D3, slimDOM: F3 = false, dataURLOptions: U3, preserveWhiteSpace: $3, onSerialize: B3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3 = () => false } = a3 || {};
5001
- return Se(e3, { doc: e3, mirror: u2, blockClass: m3, blockSelector: w3, maskTextClass: b3, maskTextSelector: C3, skipChild: false, inlineStylesheet: x3, maskInputOptions: true === O3 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : false === O3 ? { password: true } : O3, maskTextFn: E3, maskInputFn: D3, slimDOMOptions: true === F3 || "all" === F3 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: "all" === F3, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true } : false === F3 ? {} : F3, dataURLOptions: U3, inlineImages: I3, recordCanvas: _3, preserveWhiteSpace: $3, onSerialize: B3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3, newlyAddedElement: false });
5002
- })(document, { mirror: Ii, blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskAllInputs: ce2, maskTextFn: $2, maskInputFn: U2, slimDOM: pe2, dataURLOptions: V2, recordCanvas: Y2, inlineImages: te2, onSerialize: (e3) => {
5003
- wo(e3, Ii) && ge2.addIframe(e3), bo(e3, Ii) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
5078
+ const { mirror: u2 = new pt(), blockClass: m3 = "rr-block", blockSelector: w3 = null, maskTextClass: b3 = "rr-mask", maskTextSelector: C3 = null, inlineStylesheet: x3 = true, inlineImages: I3 = false, recordCanvas: _3 = false, maskAllInputs: O3 = false, maskTextFn: E3, maskInputFn: D3, slimDOM: F3 = false, dataURLOptions: U3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3 = () => false } = a3 || {};
5079
+ return Se(e3, { doc: e3, mirror: u2, blockClass: m3, blockSelector: w3, maskTextClass: b3, maskTextSelector: C3, skipChild: false, inlineStylesheet: x3, maskInputOptions: true === O3 ? { color: true, date: true, "datetime-local": true, email: true, month: true, number: true, range: true, search: true, tel: true, text: true, time: true, url: true, week: true, textarea: true, select: true, password: true } : false === O3 ? { password: true } : O3, maskTextFn: E3, maskInputFn: D3, slimDOMOptions: true === F3 || "all" === F3 ? { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: "all" === F3, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true } : false === F3 ? {} : F3, dataURLOptions: U3, inlineImages: I3, recordCanvas: _3, preserveWhiteSpace: B3, onSerialize: $3, onIframeLoad: z3, iframeLoadTimeout: j3, onStylesheetLoad: V3, stylesheetLoadTimeout: q3, keepIframeSrcFn: H3, newlyAddedElement: false });
5080
+ })(document, { mirror: Hi, blockClass: w2, blockSelector: b2, maskTextClass: I2, maskTextSelector: _2, inlineStylesheet: O2, maskAllInputs: ce2, maskTextFn: B2, maskInputFn: U2, slimDOM: pe2, dataURLOptions: V2, recordCanvas: J2, inlineImages: te2, onSerialize: (e3) => {
5081
+ wo(e3, Hi) && ge2.addIframe(e3), bo(e3, Hi) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
5004
5082
  }, onIframeLoad: (e3, a3) => {
5005
5083
  ge2.attachIframe(e3, a3), we2.observeAttachShadow(e3);
5006
5084
  }, onStylesheetLoad: (e3, a3) => {
5007
5085
  me2.attachLinkElement(e3, a3);
5008
5086
  }, keepIframeSrcFn: re2 });
5009
5087
  if (!a2) return console.warn("Failed to snapshot the document");
5010
- fi({ type: Gs.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), ti.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, Ii.getId(document));
5088
+ Ai({ type: Qs.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), di.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, Hi.getId(document));
5011
5089
  };
5012
5090
  try {
5013
5091
  const e2 = [], K = (e3) => {
5014
5092
  var a2;
5015
- return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => fi({ type: Gs.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.ViewportResize, ...e4 } }), inputCb: (e4) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.Input, ...e4 } }), mediaInteractionCb: (e4) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.Font, ...e4 } }), selectionCb: (e4) => {
5016
- fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.Selection, ...e4 } });
5093
+ return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => Ai({ type: Qs.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.ViewportResize, ...e4 } }), inputCb: (e4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Input, ...e4 } }), mediaInteractionCb: (e4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Font, ...e4 } }), selectionCb: (e4) => {
5094
+ Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.Selection, ...e4 } });
5017
5095
  }, customElementCb: (e4) => {
5018
- fi({ type: Gs.IncrementalSnapshot, data: { source: Vs.CustomElement, ...e4 } });
5096
+ Ai({ type: Qs.IncrementalSnapshot, data: { source: ei.CustomElement, ...e4 } });
5019
5097
  }, typingCb: (e4) => {
5020
- fi({ type: Gs.IncrementalSnapshot, data: { ...e4 } });
5098
+ Ai({ type: Qs.IncrementalSnapshot, data: { ...e4 } });
5021
5099
  }, deviceChangeCb: (e4) => {
5022
- fi({ type: Gs.Device, data: { ...e4 } });
5023
- }, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: Y2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e3, maskInputFn: U2, maskTextFn: $2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror: Ii, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: gi, ignoreCSSAttributes: oe2, plugins: (null == (a2 = null == ne2 ? void 0 : ne2.filter((e4) => e4.observer)) ? void 0 : a2.map((e4) => ({ observer: e4.observer, options: e4.options, callback: (a3) => fi({ type: Gs.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, B2);
5100
+ Ai({ type: Qs.Device, data: { ...e4 } });
5101
+ }, blockClass: w2, ignoreClass: C2, ignoreSelector: x2, maskTextClass: I2, maskTextSelector: _2, maskInputOptions: ce2, inlineStylesheet: O2, sampling: j2, recordDOM: H2, recordCanvas: J2, inlineImages: te2, userTriggeredOnInput: Q2, collectFonts: ee2, doc: e3, maskInputFn: U2, maskTextFn: B2, keepIframeSrcFn: re2, blockSelector: b2, slimDOMOptions: pe2, dataURLOptions: V2, mirror: Hi, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: Ni, ignoreCSSAttributes: oe2, plugins: (null == (a2 = null == ne2 ? void 0 : ne2.filter((e4) => e4.observer)) ? void 0 : a2.map((e4) => ({ observer: e4.observer, options: e4.options, callback: (a3) => Ai({ type: Qs.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, $2);
5024
5102
  };
5025
5103
  ge2.addLoadListener((a2) => {
5026
5104
  try {
@@ -5030,15 +5108,15 @@ function ae(e = {}) {
5030
5108
  }
5031
5109
  });
5032
5110
  const W = () => {
5033
- mi(), e2.push(K(document)), yi = true;
5111
+ Ti(), e2.push(K(document)), Pi = true;
5034
5112
  };
5035
5113
  return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e2.push(G("DOMContentLoaded", () => {
5036
- fi({ type: Gs.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
5114
+ Ai({ type: Qs.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
5037
5115
  })), e2.push(G("load", () => {
5038
- fi({ type: Gs.Load, data: {} }), "load" === X2 && W();
5116
+ Ai({ type: Qs.Load, data: {} }), "load" === X2 && W();
5039
5117
  }, window))), () => {
5040
- e2.forEach((e3) => e3()), ye2.destroy(), yi = false, (function jl() {
5041
- Qs = void 0;
5118
+ e2.forEach((e3) => e3()), ye2.destroy(), Pi = false, (function jl() {
5119
+ ui = void 0;
5042
5120
  })();
5043
5121
  };
5044
5122
  } catch (e2) {
@@ -5065,24 +5143,24 @@ function vu(e) {
5065
5143
  }), u;
5066
5144
  }
5067
5145
  ae.addCustomEvent = (e, a) => {
5068
- if (!yi) throw new Error("please add custom event after start recording");
5069
- fi({ type: Gs.Custom, data: { tag: e, payload: a } });
5146
+ if (!Pi) throw new Error("please add custom event after start recording");
5147
+ Ai({ type: Qs.Custom, data: { tag: e, payload: a } });
5070
5148
  }, ae.addSailfishEvent = (e, a) => {
5071
- if (!yi) throw new Error("please add Sailfish event after start recording");
5072
- fi({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
5149
+ if (!Pi) throw new Error("please add Sailfish event after start recording");
5150
+ Ai({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
5073
5151
  }, ae.freezePage = () => {
5074
- ti.forEach((e) => e.freeze());
5152
+ di.forEach((e) => e.freeze());
5075
5153
  }, ae.takeFullSnapshot = (e) => {
5076
- if (!yi) throw new Error("please take full snapshot after start recording");
5077
- mi(e);
5078
- }, ae.mirror = Ii;
5079
- var Li = { exports: {} }, Ri = String, Lo = function() {
5080
- return { isColorSupported: false, reset: Ri, bold: Ri, dim: Ri, italic: Ri, underline: Ri, inverse: Ri, hidden: Ri, strikethrough: Ri, black: Ri, red: Ri, green: Ri, yellow: Ri, blue: Ri, magenta: Ri, cyan: Ri, white: Ri, gray: Ri, bgBlack: Ri, bgRed: Ri, bgGreen: Ri, bgYellow: Ri, bgBlue: Ri, bgMagenta: Ri, bgCyan: Ri, bgWhite: Ri, blackBright: Ri, redBright: Ri, greenBright: Ri, yellowBright: Ri, blueBright: Ri, magentaBright: Ri, cyanBright: Ri, whiteBright: Ri, bgBlackBright: Ri, bgRedBright: Ri, bgGreenBright: Ri, bgYellowBright: Ri, bgBlueBright: Ri, bgMagentaBright: Ri, bgCyanBright: Ri, bgWhiteBright: Ri };
5154
+ if (!Pi) throw new Error("please take full snapshot after start recording");
5155
+ Ti(e);
5156
+ }, ae.mirror = Hi;
5157
+ var Ji = { exports: {} }, Xi = String, Lo = function() {
5158
+ return { isColorSupported: false, reset: Xi, bold: Xi, dim: Xi, italic: Xi, underline: Xi, inverse: Xi, hidden: Xi, strikethrough: Xi, black: Xi, red: Xi, green: Xi, yellow: Xi, blue: Xi, magenta: Xi, cyan: Xi, white: Xi, gray: Xi, bgBlack: Xi, bgRed: Xi, bgGreen: Xi, bgYellow: Xi, bgBlue: Xi, bgMagenta: Xi, bgCyan: Xi, bgWhite: Xi, blackBright: Xi, redBright: Xi, greenBright: Xi, yellowBright: Xi, blueBright: Xi, magentaBright: Xi, cyanBright: Xi, whiteBright: Xi, bgBlackBright: Xi, bgRedBright: Xi, bgGreenBright: Xi, bgYellowBright: Xi, bgBlueBright: Xi, bgMagentaBright: Xi, bgCyanBright: Xi, bgWhiteBright: Xi };
5081
5159
  };
5082
- Li.exports = Lo(), Li.exports.createColors = Lo;
5083
- var Ai = Li.exports;
5084
- const Ti = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
5085
- let Ni = Ai, Pi = Ti, qi = class To extends Error {
5160
+ Ji.exports = Lo(), Ji.exports.createColors = Lo;
5161
+ var Qi = Ji.exports;
5162
+ const ea = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
5163
+ let ta = Qi, na = ea, ra = class To extends Error {
5086
5164
  constructor(e, a, u, m2, w2, b2) {
5087
5165
  super(e), this.name = "CssSyntaxError", this.reason = e, w2 && (this.file = w2), m2 && (this.source = m2), b2 && (this.plugin = b2), typeof a < "u" && typeof u < "u" && ("number" == typeof a ? (this.line = a, this.column = u) : (this.line = a.line, this.column = a.column, this.endLine = u.line, this.endColumn = u.column)), this.setMessage(), Error.captureStackTrace && Error.captureStackTrace(this, To);
5088
5166
  }
@@ -5092,11 +5170,11 @@ let Ni = Ai, Pi = Ti, qi = class To extends Error {
5092
5170
  showSourceCode(e) {
5093
5171
  if (!this.source) return "";
5094
5172
  let a = this.source;
5095
- null == e && (e = Ni.isColorSupported);
5173
+ null == e && (e = ta.isColorSupported);
5096
5174
  let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
5097
5175
  if (e) {
5098
- let { bold: e2, gray: a2, red: u2 } = Ni.createColors(true);
5099
- r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), Pi && (i = (e3) => Pi(e3));
5176
+ let { bold: e2, gray: a2, red: u2 } = ta.createColors(true);
5177
+ r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), na && (i = (e3) => na(e3));
5100
5178
  }
5101
5179
  let u = a.split(/\r?\n/), m2 = Math.max(this.line - 3, 0), w2 = Math.min(this.line + 2, u.length), b2 = String(w2).length;
5102
5180
  return u.slice(m2, w2).map((e2, a2) => {
@@ -5117,10 +5195,10 @@ let Ni = Ai, Pi = Ti, qi = class To extends Error {
5117
5195
  return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
5118
5196
  }
5119
5197
  };
5120
- var Hi = qi;
5121
- qi.default = qi;
5122
- const Ji = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
5123
- let Xi = class {
5198
+ var oa = ra;
5199
+ ra.default = ra;
5200
+ const sa = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
5201
+ let ia = class {
5124
5202
  constructor(e) {
5125
5203
  this.builder = e;
5126
5204
  }
@@ -5172,7 +5250,7 @@ let Xi = class {
5172
5250
  if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
5173
5251
  let w2 = e.parent;
5174
5252
  if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
5175
- if (!w2) return Ji[u];
5253
+ if (!w2) return sa[u];
5176
5254
  let b2 = e.root();
5177
5255
  if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
5178
5256
  if ("before" === u || "after" === u) return this.beforeAfter(e, u);
@@ -5184,7 +5262,7 @@ let Xi = class {
5184
5262
  if (m2 = e2.raws[a], typeof m2 < "u") return false;
5185
5263
  });
5186
5264
  }
5187
- return typeof m2 > "u" && (m2 = Ji[u]), b2.rawCache[u] = m2, m2;
5265
+ return typeof m2 > "u" && (m2 = sa[u]), b2.rawCache[u] = m2, m2;
5188
5266
  }
5189
5267
  rawBeforeClose(e) {
5190
5268
  let a;
@@ -5260,17 +5338,17 @@ let Xi = class {
5260
5338
  this[e.type](e, a);
5261
5339
  }
5262
5340
  };
5263
- var Qi = Xi;
5264
- Xi.default = Xi;
5265
- let ea = Qi;
5341
+ var aa = ia;
5342
+ ia.default = ia;
5343
+ let la = aa;
5266
5344
  function zs(e, a) {
5267
- new ea(a).stringify(e);
5345
+ new la(a).stringify(e);
5268
5346
  }
5269
- var ta = zs;
5347
+ var ca = zs;
5270
5348
  zs.default = zs;
5271
- var na = {};
5272
- na.isClean = Symbol("isClean"), na.my = Symbol("my");
5273
- let ra = Hi, oa = Qi, sa = ta, { isClean: ia, my: aa } = na;
5349
+ var ua = {};
5350
+ ua.isClean = Symbol("isClean"), ua.my = Symbol("my");
5351
+ let pa = oa, ha = aa, fa = ca, { isClean: ma, my: ga } = ua;
5274
5352
  function Bs(e, a) {
5275
5353
  let u = new e.constructor();
5276
5354
  for (let m2 in e) {
@@ -5292,12 +5370,12 @@ function Fe(e, a) {
5292
5370
  }
5293
5371
  return w2;
5294
5372
  }
5295
- let la = class {
5373
+ let ya = class {
5296
5374
  get proxyOf() {
5297
5375
  return this;
5298
5376
  }
5299
5377
  constructor(e = {}) {
5300
- this.raws = {}, this[ia] = false, this[aa] = true;
5378
+ this.raws = {}, this[ma] = false, this[ga] = true;
5301
5379
  for (let a in e) if ("nodes" === a) {
5302
5380
  this.nodes = [];
5303
5381
  for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
@@ -5341,19 +5419,19 @@ let la = class {
5341
5419
  let { end: u, start: m2 } = this.rangeBy(a);
5342
5420
  return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
5343
5421
  }
5344
- return new ra(e);
5422
+ return new pa(e);
5345
5423
  }
5346
5424
  getProxyProcessor() {
5347
5425
  return { get: (e, a) => "proxyOf" === a ? e : "root" === a ? () => e.root().toProxy() : e[a], set: (e, a, u) => (e[a] === u || (e[a] = u, ("prop" === a || "value" === a || "name" === a || "params" === a || "important" === a || "text" === a) && e.markDirty()), true) };
5348
5426
  }
5349
5427
  markClean() {
5350
- this[ia] = true;
5428
+ this[ma] = true;
5351
5429
  }
5352
5430
  markDirty() {
5353
- if (this[ia]) {
5354
- this[ia] = false;
5431
+ if (this[ma]) {
5432
+ this[ma] = false;
5355
5433
  let e = this;
5356
- for (; e = e.parent; ) e[ia] = false;
5434
+ for (; e = e.parent; ) e[ma] = false;
5357
5435
  }
5358
5436
  }
5359
5437
  next() {
@@ -5389,7 +5467,7 @@ let la = class {
5389
5467
  return (u.line < a.line || u.line === a.line && u.column <= a.column) && (u = { column: a.column + 1, line: a.line }), { end: u, start: a };
5390
5468
  }
5391
5469
  raw(e, a) {
5392
- return new oa().raw(this, e, a);
5470
+ return new ha().raw(this, e, a);
5393
5471
  }
5394
5472
  remove() {
5395
5473
  return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
@@ -5426,7 +5504,7 @@ let la = class {
5426
5504
  toProxy() {
5427
5505
  return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
5428
5506
  }
5429
- toString(e = sa) {
5507
+ toString(e = fa) {
5430
5508
  e.stringify && (e = e.stringify);
5431
5509
  let a = "";
5432
5510
  return e(this, (e2) => {
@@ -5439,16 +5517,16 @@ let la = class {
5439
5517
  return e.warn(a, m2);
5440
5518
  }
5441
5519
  };
5442
- var ca = la;
5443
- la.default = la;
5444
- let ua = ca, pa = class extends ua {
5520
+ var wa = ya;
5521
+ ya.default = ya;
5522
+ let ba = wa, Sa = class extends ba {
5445
5523
  constructor(e) {
5446
5524
  super(e), this.type = "comment";
5447
5525
  }
5448
5526
  };
5449
- var ha = pa;
5450
- pa.default = pa;
5451
- let fa = ca, ma = class extends fa {
5527
+ var va = Sa;
5528
+ Sa.default = Sa;
5529
+ let Ca = wa, ka = class extends Ca {
5452
5530
  get variable() {
5453
5531
  return this.prop.startsWith("--") || "$" === this.prop[0];
5454
5532
  }
@@ -5456,16 +5534,16 @@ let fa = ca, ma = class extends fa {
5456
5534
  e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
5457
5535
  }
5458
5536
  };
5459
- var ga = ma;
5460
- ma.default = ma;
5461
- let ya, wa, ba, Sa, va = ha, Ca = ga, ka = ca, { isClean: xa, my: Ma } = na;
5537
+ var xa = ka;
5538
+ ka.default = ka;
5539
+ let Ma, Ia, _a, Oa, Ea = va, La = xa, Ra = wa, { isClean: Aa, my: Ta } = ua;
5462
5540
  function Wo(e) {
5463
5541
  return e.map((e2) => (e2.nodes && (e2.nodes = Wo(e2.nodes)), delete e2.source, e2));
5464
5542
  }
5465
5543
  function zo(e) {
5466
- if (e[xa] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
5544
+ if (e[Aa] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
5467
5545
  }
5468
- let Ia = class Bo extends ka {
5546
+ let Na = class Bo extends Ra {
5469
5547
  get first() {
5470
5548
  if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
5471
5549
  }
@@ -5517,7 +5595,7 @@ let Ia = class Bo extends ka {
5517
5595
  return this.markDirty(), this;
5518
5596
  }
5519
5597
  normalize(e, a) {
5520
- if ("string" == typeof e) e = Wo(wa(e).nodes);
5598
+ if ("string" == typeof e) e = Wo(Ia(e).nodes);
5521
5599
  else if (typeof e > "u") e = [];
5522
5600
  else if (Array.isArray(e)) {
5523
5601
  e = e.slice(0);
@@ -5528,14 +5606,14 @@ let Ia = class Bo extends ka {
5528
5606
  } else if (e.type) e = [e];
5529
5607
  else if (e.prop) {
5530
5608
  if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
5531
- "string" != typeof e.value && (e.value = String(e.value)), e = [new Ca(e)];
5532
- } else if (e.selector || e.selectors) e = [new Sa(e)];
5533
- else if (e.name) e = [new ya(e)];
5609
+ "string" != typeof e.value && (e.value = String(e.value)), e = [new La(e)];
5610
+ } else if (e.selector || e.selectors) e = [new Oa(e)];
5611
+ else if (e.name) e = [new Ma(e)];
5534
5612
  else {
5535
5613
  if (!e.text) throw new Error("Unknown node type in node creation");
5536
- e = [new va(e)];
5614
+ e = [new Ea(e)];
5537
5615
  }
5538
- return e.map((e2) => (e2[Ma] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[xa] && zo(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
5616
+ return e.map((e2) => (e2[Ta] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Aa] && zo(e2), e2.raws || (e2.raws = {}), typeof e2.raws.before > "u" && a && typeof a.raws.before < "u" && (e2.raws.before = a.raws.before.replace(/\S/g, "")), e2.parent = this.proxyOf, e2));
5539
5617
  }
5540
5618
  prepend(...e) {
5541
5619
  e = e.reverse();
@@ -5611,22 +5689,22 @@ let Ia = class Bo extends ka {
5611
5689
  }));
5612
5690
  }
5613
5691
  };
5614
- Ia.registerParse = (e) => {
5615
- wa = e;
5616
- }, Ia.registerRule = (e) => {
5617
- Sa = e;
5618
- }, Ia.registerAtRule = (e) => {
5619
- ya = e;
5620
- }, Ia.registerRoot = (e) => {
5621
- ba = e;
5692
+ Na.registerParse = (e) => {
5693
+ Ia = e;
5694
+ }, Na.registerRule = (e) => {
5695
+ Oa = e;
5696
+ }, Na.registerAtRule = (e) => {
5697
+ Ma = e;
5698
+ }, Na.registerRoot = (e) => {
5699
+ _a = e;
5622
5700
  };
5623
- var _a = Ia;
5624
- Ia.default = Ia, Ia.rebuild = (e) => {
5625
- "atrule" === e.type ? Object.setPrototypeOf(e, ya.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Sa.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Ca.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, va.prototype) : "root" === e.type && Object.setPrototypeOf(e, ba.prototype), e[Ma] = true, e.nodes && e.nodes.forEach((e2) => {
5626
- Ia.rebuild(e2);
5701
+ var Pa = Na;
5702
+ Na.default = Na, Na.rebuild = (e) => {
5703
+ "atrule" === e.type ? Object.setPrototypeOf(e, Ma.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Oa.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, La.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Ea.prototype) : "root" === e.type && Object.setPrototypeOf(e, _a.prototype), e[Ta] = true, e.nodes && e.nodes.forEach((e2) => {
5704
+ Na.rebuild(e2);
5627
5705
  });
5628
5706
  };
5629
- let Oa = _a, Ea = class extends Oa {
5707
+ let Da = Pa, Fa = class extends Da {
5630
5708
  constructor(e) {
5631
5709
  super(e), this.type = "atrule";
5632
5710
  }
@@ -5637,38 +5715,38 @@ let Oa = _a, Ea = class extends Oa {
5637
5715
  return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
5638
5716
  }
5639
5717
  };
5640
- var La = Ea;
5641
- Ea.default = Ea, Oa.registerAtRule(Ea);
5642
- let Ra, Aa, Ta = _a, Na = class extends Ta {
5718
+ var Ua = Fa;
5719
+ Fa.default = Fa, Da.registerAtRule(Fa);
5720
+ let Ba, $a, Wa = Pa, za = class extends Wa {
5643
5721
  constructor(e) {
5644
5722
  super({ type: "document", ...e }), this.nodes || (this.nodes = []);
5645
5723
  }
5646
5724
  toResult(e = {}) {
5647
- return new Ra(new Aa(), this, e).stringify();
5725
+ return new Ba(new $a(), this, e).stringify();
5648
5726
  }
5649
5727
  };
5650
- Na.registerLazyResult = (e) => {
5651
- Ra = e;
5652
- }, Na.registerProcessor = (e) => {
5653
- Aa = e;
5728
+ za.registerLazyResult = (e) => {
5729
+ Ba = e;
5730
+ }, za.registerProcessor = (e) => {
5731
+ $a = e;
5654
5732
  };
5655
- var Pa = Na;
5656
- Na.default = Na;
5657
- var Da = { nanoid: (e = 21) => {
5733
+ var ja = za;
5734
+ za.default = za;
5735
+ var Ga = { nanoid: (e = 21) => {
5658
5736
  let a = "", u = 0 | e;
5659
5737
  for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
5660
5738
  return a;
5661
5739
  } };
5662
- let { existsSync: Fa, readFileSync: Ua } = Ti, { dirname: $a, join: Ba } = Ti, { SourceMapConsumer: Wa, SourceMapGenerator: za } = Ti;
5663
- let ja = class {
5740
+ let { existsSync: Va, readFileSync: qa } = ea, { dirname: Za, join: Ka } = ea, { SourceMapConsumer: Ja, SourceMapGenerator: Ya } = ea;
5741
+ let Qa = class {
5664
5742
  constructor(e, a) {
5665
5743
  if (false === a.map) return;
5666
5744
  this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
5667
5745
  let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
5668
- !this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = $a(this.mapFile)), m2 && (this.text = m2);
5746
+ !this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Za(this.mapFile)), m2 && (this.text = m2);
5669
5747
  }
5670
5748
  consumer() {
5671
- return this.consumerCache || (this.consumerCache = new Wa(this.text)), this.consumerCache;
5749
+ return this.consumerCache || (this.consumerCache = new Ja(this.text)), this.consumerCache;
5672
5750
  }
5673
5751
  decodeInline(e) {
5674
5752
  let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
@@ -5693,15 +5771,15 @@ let ja = class {
5693
5771
  u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
5694
5772
  }
5695
5773
  loadFile(e) {
5696
- if (this.root = $a(e), Fa(e)) return this.mapFile = e, Ua(e, "utf-8").toString().trim();
5774
+ if (this.root = Za(e), Va(e)) return this.mapFile = e, qa(e, "utf-8").toString().trim();
5697
5775
  }
5698
5776
  loadMap(e, a) {
5699
5777
  if (false === a) return false;
5700
5778
  if (a) {
5701
5779
  if ("string" == typeof a) return a;
5702
5780
  if ("function" != typeof a) {
5703
- if (a instanceof Wa) return za.fromSourceMap(a).toString();
5704
- if (a instanceof za) return a.toString();
5781
+ if (a instanceof Ja) return Ya.fromSourceMap(a).toString();
5782
+ if (a instanceof Ya) return a.toString();
5705
5783
  if (this.isMap(a)) return JSON.stringify(a);
5706
5784
  throw new Error("Unsupported previous source map format: " + a.toString());
5707
5785
  }
@@ -5717,7 +5795,7 @@ let ja = class {
5717
5795
  if (this.inline) return this.decodeInline(this.annotation);
5718
5796
  if (this.annotation) {
5719
5797
  let a2 = this.annotation;
5720
- return e && (a2 = Ba($a(e), a2)), this.loadFile(a2);
5798
+ return e && (a2 = Ka(Za(e), a2)), this.loadFile(a2);
5721
5799
  }
5722
5800
  }
5723
5801
  }
@@ -5728,23 +5806,23 @@ let ja = class {
5728
5806
  return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
5729
5807
  }
5730
5808
  };
5731
- var Ga = ja;
5732
- ja.default = ja;
5733
- let { nanoid: Va } = Da, { isAbsolute: qa, resolve: Za } = Ti, { SourceMapConsumer: Ka, SourceMapGenerator: Ya } = Ti, { fileURLToPath: Ja, pathToFileURL: Qa } = Ti, el = Hi, tl = Ga, nl = Ti, rl = Symbol("fromOffsetCache"), ol = !(!Ka || !Ya), sl = !(!Za || !qa), il = class {
5809
+ var el = Qa;
5810
+ Qa.default = Qa;
5811
+ let { nanoid: tl } = Ga, { isAbsolute: nl, resolve: rl } = ea, { SourceMapConsumer: ol, SourceMapGenerator: sl } = ea, { fileURLToPath: il, pathToFileURL: al } = ea, ll = oa, cl = el, ul = ea, pl = Symbol("fromOffsetCache"), dl = !(!ol || !sl), hl = !(!rl || !nl), fl = class {
5734
5812
  get from() {
5735
5813
  return this.file || this.id;
5736
5814
  }
5737
5815
  constructor(e, a = {}) {
5738
5816
  if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
5739
- if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!sl || /^\w+:\/\//.test(a.from) || qa(a.from) ? this.file = a.from : this.file = Za(a.from)), sl && ol) {
5740
- let e2 = new tl(this.css, a);
5817
+ if (this.css = e.toString(), "\uFEFF" === this.css[0] || "￾" === this.css[0] ? (this.hasBOM = true, this.css = this.css.slice(1)) : this.hasBOM = false, this.document = this.css, a.document && (this.document = a.document.toString()), a.from && (!hl || /^\w+:\/\//.test(a.from) || nl(a.from) ? this.file = a.from : this.file = rl(a.from)), hl && dl) {
5818
+ let e2 = new cl(this.css, a);
5741
5819
  if (e2.text) {
5742
5820
  this.map = e2;
5743
5821
  let a2 = e2.consumer().file;
5744
5822
  !this.file && a2 && (this.file = this.mapResolve(a2));
5745
5823
  }
5746
5824
  }
5747
- this.file || (this.id = "<input css " + Va(6) + ">"), this.map && (this.map.file = this.from);
5825
+ this.file || (this.id = "<input css " + tl(6) + ">"), this.map && (this.map.file = this.from);
5748
5826
  }
5749
5827
  error(e, a, u, m2 = {}) {
5750
5828
  let w2, b2, C2;
@@ -5763,17 +5841,17 @@ let { nanoid: Va } = Da, { isAbsolute: qa, resolve: Za } = Ti, { SourceMapConsum
5763
5841
  a = e2.line, u = e2.col;
5764
5842
  }
5765
5843
  let x2 = this.origin(a, u, b2, w2);
5766
- return C2 = x2 ? new el(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new el(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (Qa && (C2.input.url = Qa(this.file).toString()), C2.input.file = this.file), C2;
5844
+ return C2 = x2 ? new ll(e, void 0 === x2.endLine ? x2.line : { column: x2.column, line: x2.line }, void 0 === x2.endLine ? x2.column : { column: x2.endColumn, line: x2.endLine }, x2.source, x2.file, m2.plugin) : new ll(e, void 0 === b2 ? a : { column: u, line: a }, void 0 === b2 ? u : { column: w2, line: b2 }, this.css, this.file, m2.plugin), C2.input = { column: u, endColumn: w2, endLine: b2, line: a, source: this.css }, this.file && (al && (C2.input.url = al(this.file).toString()), C2.input.file = this.file), C2;
5767
5845
  }
5768
5846
  fromOffset(e) {
5769
5847
  let a, u;
5770
- if (this[rl]) u = this[rl];
5848
+ if (this[pl]) u = this[pl];
5771
5849
  else {
5772
5850
  let e2 = this.css.split("\n");
5773
5851
  u = new Array(e2.length);
5774
5852
  let a2 = 0;
5775
5853
  for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
5776
- this[rl] = u;
5854
+ this[pl] = u;
5777
5855
  }
5778
5856
  a = u[u.length - 1];
5779
5857
  let m2 = 0;
@@ -5792,17 +5870,17 @@ let { nanoid: Va } = Da, { isAbsolute: qa, resolve: Za } = Ti, { SourceMapConsum
5792
5870
  return { col: e - u[m2] + 1, line: m2 + 1 };
5793
5871
  }
5794
5872
  mapResolve(e) {
5795
- return /^\w+:\/\//.test(e) ? e : Za(this.map.consumer().sourceRoot || this.map.root || ".", e);
5873
+ return /^\w+:\/\//.test(e) ? e : rl(this.map.consumer().sourceRoot || this.map.root || ".", e);
5796
5874
  }
5797
5875
  origin(e, a, u, m2) {
5798
5876
  if (!this.map) return false;
5799
5877
  let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
5800
5878
  if (!x2.source) return false;
5801
- "number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = qa(x2.source) ? Qa(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || Qa(this.map.mapFile));
5879
+ "number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = nl(x2.source) ? al(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || al(this.map.mapFile));
5802
5880
  let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
5803
5881
  if ("file:" === b2.protocol) {
5804
- if (!Ja) throw new Error("file: protocol is not available in this PostCSS build");
5805
- I2.file = Ja(b2);
5882
+ if (!il) throw new Error("file: protocol is not available in this PostCSS build");
5883
+ I2.file = il(b2);
5806
5884
  }
5807
5885
  let _2 = C2.sourceContentFor(x2.source);
5808
5886
  return _2 && (I2.source = _2), I2;
@@ -5813,9 +5891,9 @@ let { nanoid: Va } = Da, { isAbsolute: qa, resolve: Za } = Ti, { SourceMapConsum
5813
5891
  return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
5814
5892
  }
5815
5893
  };
5816
- var al = il;
5817
- il.default = il, nl && nl.registerInput && nl.registerInput(il);
5818
- let ll, cl, ul = _a, pl = class extends ul {
5894
+ var ml = fl;
5895
+ fl.default = fl, ul && ul.registerInput && ul.registerInput(fl);
5896
+ let gl, yl, wl = Pa, bl = class extends wl {
5819
5897
  constructor(e) {
5820
5898
  super(e), this.type = "root", this.nodes || (this.nodes = []);
5821
5899
  }
@@ -5832,29 +5910,29 @@ let ll, cl, ul = _a, pl = class extends ul {
5832
5910
  return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
5833
5911
  }
5834
5912
  toResult(e = {}) {
5835
- return new ll(new cl(), this, e).stringify();
5913
+ return new gl(new yl(), this, e).stringify();
5836
5914
  }
5837
5915
  };
5838
- pl.registerLazyResult = (e) => {
5839
- ll = e;
5840
- }, pl.registerProcessor = (e) => {
5841
- cl = e;
5916
+ bl.registerLazyResult = (e) => {
5917
+ gl = e;
5918
+ }, bl.registerProcessor = (e) => {
5919
+ yl = e;
5842
5920
  };
5843
- var dl = pl;
5844
- pl.default = pl, ul.registerRoot(pl);
5845
- let hl = { comma: (e) => hl.split(e, [","], true), space(e) {
5921
+ var Sl = bl;
5922
+ bl.default = bl, wl.registerRoot(bl);
5923
+ let vl = { comma: (e) => vl.split(e, [","], true), space(e) {
5846
5924
  let a = [" ", "\n", " "];
5847
- return hl.split(e, a);
5925
+ return vl.split(e, a);
5848
5926
  }, split(e, a, u) {
5849
5927
  let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
5850
5928
  for (let u2 of e) _2 ? _2 = false : "\\" === u2 ? _2 = true : x2 ? u2 === I2 && (x2 = false) : '"' === u2 || "'" === u2 ? (x2 = true, I2 = u2) : "(" === u2 ? C2 += 1 : ")" === u2 ? C2 > 0 && (C2 -= 1) : 0 === C2 && a.includes(u2) && (b2 = true), b2 ? ("" !== w2 && m2.push(w2.trim()), w2 = "", b2 = false) : w2 += u2;
5851
5929
  return (u || "" !== w2) && m2.push(w2.trim()), m2;
5852
5930
  } };
5853
- var fl = hl;
5854
- hl.default = hl;
5855
- let ml = _a, gl = fl, yl = class extends ml {
5931
+ var Cl = vl;
5932
+ vl.default = vl;
5933
+ let kl = Pa, xl = Cl, Ml = class extends kl {
5856
5934
  get selectors() {
5857
- return gl.comma(this.selector);
5935
+ return xl.comma(this.selector);
5858
5936
  }
5859
5937
  set selectors(e) {
5860
5938
  let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
@@ -5864,34 +5942,34 @@ let ml = _a, gl = fl, yl = class extends ml {
5864
5942
  super(e), this.type = "rule", this.nodes || (this.nodes = []);
5865
5943
  }
5866
5944
  };
5867
- var wl = yl;
5868
- yl.default = yl, ml.registerRule(yl);
5869
- let bl = La, Sl = ha, vl = ga, Cl = al, kl = Ga, xl = dl, Ml = wl;
5945
+ var Il = Ml;
5946
+ Ml.default = Ml, kl.registerRule(Ml);
5947
+ let Ol = Ua, El = va, Ll = xa, Rl = ml, Al = el, Tl = Sl, Nl = Il;
5870
5948
  function Ke(e, a) {
5871
5949
  if (Array.isArray(e)) return e.map((e2) => Ke(e2));
5872
5950
  let { inputs: u, ...m2 } = e;
5873
5951
  if (u) {
5874
5952
  a = [];
5875
5953
  for (let e2 of u) {
5876
- let u2 = { ...e2, __proto__: Cl.prototype };
5877
- u2.map && (u2.map = { ...u2.map, __proto__: kl.prototype }), a.push(u2);
5954
+ let u2 = { ...e2, __proto__: Rl.prototype };
5955
+ u2.map && (u2.map = { ...u2.map, __proto__: Al.prototype }), a.push(u2);
5878
5956
  }
5879
5957
  }
5880
5958
  if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ke(e2, a))), m2.source) {
5881
5959
  let { inputId: e2, ...u2 } = m2.source;
5882
5960
  m2.source = u2, null != e2 && (m2.source.input = a[e2]);
5883
5961
  }
5884
- if ("root" === m2.type) return new xl(m2);
5885
- if ("decl" === m2.type) return new vl(m2);
5886
- if ("rule" === m2.type) return new Ml(m2);
5887
- if ("comment" === m2.type) return new Sl(m2);
5888
- if ("atrule" === m2.type) return new bl(m2);
5962
+ if ("root" === m2.type) return new Tl(m2);
5963
+ if ("decl" === m2.type) return new Ll(m2);
5964
+ if ("rule" === m2.type) return new Nl(m2);
5965
+ if ("comment" === m2.type) return new El(m2);
5966
+ if ("atrule" === m2.type) return new Ol(m2);
5889
5967
  throw new Error("Unknown node type: " + e.type);
5890
5968
  }
5891
- var Il = Ke;
5969
+ var Pl = Ke;
5892
5970
  Ke.default = Ke;
5893
- let { dirname: Ol, relative: El, resolve: Ll, sep: Rl } = Ti, { SourceMapConsumer: Al, SourceMapGenerator: Tl } = Ti, { pathToFileURL: Nl } = Ti, Pl = al, Dl = !(!Al || !Tl), Jl = !!(Ol && Ll && El && Rl);
5894
- var ec = class {
5971
+ let { dirname: Dl, relative: Jl, resolve: ec, sep: tc } = ea, { SourceMapConsumer: nc, SourceMapGenerator: rc } = ea, { pathToFileURL: oc } = ea, sc = ml, ic = !(!nc || !rc), ac = !!(Dl && ec && Jl && tc);
5972
+ var lc = class {
5895
5973
  constructor(e, a, u, m2) {
5896
5974
  this.stringify = e, this.mapOpts = u.map || {}, this.root = a, this.opts = u, this.css = m2, this.originalCSS = m2, this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute, this.memoizedFileURLs = /* @__PURE__ */ new Map(), this.memoizedPaths = /* @__PURE__ */ new Map(), this.memoizedURLs = /* @__PURE__ */ new Map();
5897
5975
  }
@@ -5903,8 +5981,8 @@ var ec = class {
5903
5981
  }
5904
5982
  applyPrevMaps() {
5905
5983
  for (let e of this.previous()) {
5906
- let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Ol(e.file);
5907
- false === this.mapOpts.sourcesContent ? (a = new Al(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
5984
+ let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Dl(e.file);
5985
+ false === this.mapOpts.sourcesContent ? (a = new nc(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
5908
5986
  }
5909
5987
  }
5910
5988
  clearAnnotation() {
@@ -5914,7 +5992,7 @@ var ec = class {
5914
5992
  } else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
5915
5993
  }
5916
5994
  generate() {
5917
- if (this.clearAnnotation(), Jl && Dl && this.isMap()) return this.generateMap();
5995
+ if (this.clearAnnotation(), ac && ic && this.isMap()) return this.generateMap();
5918
5996
  {
5919
5997
  let e = "";
5920
5998
  return this.stringify(this.root, (a) => {
@@ -5926,12 +6004,12 @@ var ec = class {
5926
6004
  if (this.root) this.generateString();
5927
6005
  else if (1 === this.previous().length) {
5928
6006
  let e = this.previous()[0].consumer();
5929
- e.file = this.outputFile(), this.map = Tl.fromSourceMap(e, { ignoreInvalidMapping: true });
5930
- } else this.map = new Tl({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
6007
+ e.file = this.outputFile(), this.map = rc.fromSourceMap(e, { ignoreInvalidMapping: true });
6008
+ } else this.map = new rc({ file: this.outputFile(), ignoreInvalidMapping: true }), this.map.addMapping({ generated: { column: 0, line: 1 }, original: { column: 0, line: 1 }, source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : "<no source>" });
5931
6009
  return this.isSourcesContent() && this.setSourcesContent(), this.root && this.previous().length > 0 && this.applyPrevMaps(), this.isAnnotation() && this.addAnnotation(), this.isInline() ? [this.css] : [this.css, this.map];
5932
6010
  }
5933
6011
  generateString() {
5934
- this.css = "", this.map = new Tl({ file: this.outputFile(), ignoreInvalidMapping: true });
6012
+ this.css = "", this.map = new rc({ file: this.outputFile(), ignoreInvalidMapping: true });
5935
6013
  let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
5936
6014
  this.stringify(this.root, (C2, x2, I2) => {
5937
6015
  if (this.css += C2, x2 && "end" !== I2 && (b2.generated.line = u, b2.generated.column = m2 - 1, x2.source && x2.source.start ? (b2.source = this.sourcePath(x2), b2.original.line = x2.source.start.line, b2.original.column = x2.source.start.column - 1, this.map.addMapping(b2)) : (b2.source = w2, b2.original.line = 1, b2.original.column = 0, this.map.addMapping(b2))), a = C2.match(/\n/g), a ? (u += a.length, e = C2.lastIndexOf("\n"), m2 = C2.length - e) : m2 += C2.length, x2 && "start" !== I2) {
@@ -5961,9 +6039,9 @@ var ec = class {
5961
6039
  if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
5962
6040
  let a = this.memoizedPaths.get(e);
5963
6041
  if (a) return a;
5964
- let u = this.opts.to ? Ol(this.opts.to) : ".";
5965
- "string" == typeof this.mapOpts.annotation && (u = Ol(Ll(u, this.mapOpts.annotation)));
5966
- let m2 = El(u, e);
6042
+ let u = this.opts.to ? Dl(this.opts.to) : ".";
6043
+ "string" == typeof this.mapOpts.annotation && (u = Dl(ec(u, this.mapOpts.annotation)));
6044
+ let m2 = Jl(u, e);
5967
6045
  return this.memoizedPaths.set(e, m2), m2;
5968
6046
  }
5969
6047
  previous() {
@@ -5974,7 +6052,7 @@ var ec = class {
5974
6052
  }
5975
6053
  });
5976
6054
  else {
5977
- let e = new Pl(this.originalCSS, this.opts);
6055
+ let e = new sc(this.originalCSS, this.opts);
5978
6056
  e.map && this.previousMaps.push(e.map);
5979
6057
  }
5980
6058
  return this.previousMaps;
@@ -6005,8 +6083,8 @@ var ec = class {
6005
6083
  toFileUrl(e) {
6006
6084
  let a = this.memoizedFileURLs.get(e);
6007
6085
  if (a) return a;
6008
- if (Nl) {
6009
- let a2 = Nl(e).toString();
6086
+ if (oc) {
6087
+ let a2 = oc(e).toString();
6010
6088
  return this.memoizedFileURLs.set(e, a2), a2;
6011
6089
  }
6012
6090
  throw new Error("`map.absolute` option is not available in this PostCSS build");
@@ -6014,36 +6092,36 @@ var ec = class {
6014
6092
  toUrl(e) {
6015
6093
  let a = this.memoizedURLs.get(e);
6016
6094
  if (a) return a;
6017
- "\\" === Rl && (e = e.replace(/\\/g, "/"));
6095
+ "\\" === tc && (e = e.replace(/\\/g, "/"));
6018
6096
  let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
6019
6097
  return this.memoizedURLs.set(e, u), u;
6020
6098
  }
6021
6099
  };
6022
- const tc = /[\t\n\f\r "#'()/;[\\\]{}]/g, nc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, rc = /.[\r\n"'(/\\]/, oc = /[\da-f]/i;
6023
- let sc = La, ic = ha, ac = ga, lc = dl, cc = wl, kc = function(e, a = {}) {
6024
- let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, $2 = 0, B2 = [], z2 = [];
6100
+ const cc = /[\t\n\f\r "#'()/;[\\\]{}]/g, uc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, pc = /.[\r\n"'(/\\]/, dc = /[\da-f]/i;
6101
+ let hc = Ua, fc = va, mc = xa, gc = Sl, yc = Il, kc = function(e, a = {}) {
6102
+ let u, m2, w2, b2, C2, x2, I2, _2, O2, E2, D2 = e.css.valueOf(), F2 = a.ignoreErrors, U2 = D2.length, B2 = 0, $2 = [], z2 = [];
6025
6103
  function y2(a2) {
6026
- throw e.error("Unclosed " + a2, $2);
6104
+ throw e.error("Unclosed " + a2, B2);
6027
6105
  }
6028
6106
  return { back: function A(e2) {
6029
6107
  z2.push(e2);
6030
6108
  }, endOfFile: function v() {
6031
- return 0 === z2.length && $2 >= U2;
6109
+ return 0 === z2.length && B2 >= U2;
6032
6110
  }, nextToken: function P(e2) {
6033
6111
  if (z2.length) return z2.pop();
6034
- if ($2 >= U2) return;
6112
+ if (B2 >= U2) return;
6035
6113
  let a2 = !!e2 && e2.ignoreUnclosed;
6036
- switch (u = D2.charCodeAt($2), u) {
6114
+ switch (u = D2.charCodeAt(B2), u) {
6037
6115
  case 10:
6038
6116
  case 32:
6039
6117
  case 9:
6040
6118
  case 13:
6041
6119
  case 12:
6042
- b2 = $2;
6120
+ b2 = B2;
6043
6121
  do {
6044
6122
  b2 += 1, u = D2.charCodeAt(b2);
6045
6123
  } while (32 === u || 10 === u || 9 === u || 13 === u || 12 === u);
6046
- x2 = ["space", D2.slice($2, b2)], $2 = b2 - 1;
6124
+ x2 = ["space", D2.slice(B2, b2)], B2 = b2 - 1;
6047
6125
  break;
6048
6126
  case 91:
6049
6127
  case 93:
@@ -6053,66 +6131,66 @@ let sc = La, ic = ha, ac = ga, lc = dl, cc = wl, kc = function(e, a = {}) {
6053
6131
  case 59:
6054
6132
  case 41: {
6055
6133
  let e3 = String.fromCharCode(u);
6056
- x2 = [e3, e3, $2];
6134
+ x2 = [e3, e3, B2];
6057
6135
  break;
6058
6136
  }
6059
6137
  case 40:
6060
- if (E2 = B2.length ? B2.pop()[1] : "", O2 = D2.charCodeAt($2 + 1), "url" === E2 && 39 !== O2 && 34 !== O2 && 32 !== O2 && 10 !== O2 && 9 !== O2 && 12 !== O2 && 13 !== O2) {
6061
- b2 = $2;
6138
+ if (E2 = $2.length ? $2.pop()[1] : "", O2 = D2.charCodeAt(B2 + 1), "url" === E2 && 39 !== O2 && 34 !== O2 && 32 !== O2 && 10 !== O2 && 9 !== O2 && 12 !== O2 && 13 !== O2) {
6139
+ b2 = B2;
6062
6140
  do {
6063
6141
  if (I2 = false, b2 = D2.indexOf(")", b2 + 1), -1 === b2) {
6064
6142
  if (F2 || a2) {
6065
- b2 = $2;
6143
+ b2 = B2;
6066
6144
  break;
6067
6145
  }
6068
6146
  y2("bracket");
6069
6147
  }
6070
6148
  for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
6071
6149
  } while (I2);
6072
- x2 = ["brackets", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
6073
- } else b2 = D2.indexOf(")", $2 + 1), m2 = D2.slice($2, b2 + 1), -1 === b2 || rc.test(m2) ? x2 = ["(", "(", $2] : (x2 = ["brackets", m2, $2, b2], $2 = b2);
6150
+ x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
6151
+ } else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || pc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
6074
6152
  break;
6075
6153
  case 39:
6076
6154
  case 34:
6077
- C2 = 39 === u ? "'" : '"', b2 = $2;
6155
+ C2 = 39 === u ? "'" : '"', b2 = B2;
6078
6156
  do {
6079
6157
  if (I2 = false, b2 = D2.indexOf(C2, b2 + 1), -1 === b2) {
6080
6158
  if (F2 || a2) {
6081
- b2 = $2 + 1;
6159
+ b2 = B2 + 1;
6082
6160
  break;
6083
6161
  }
6084
6162
  y2("string");
6085
6163
  }
6086
6164
  for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
6087
6165
  } while (I2);
6088
- x2 = ["string", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
6166
+ x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
6089
6167
  break;
6090
6168
  case 64:
6091
- tc.lastIndex = $2 + 1, tc.test(D2), b2 = 0 === tc.lastIndex ? D2.length - 1 : tc.lastIndex - 2, x2 = ["at-word", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
6169
+ cc.lastIndex = B2 + 1, cc.test(D2), b2 = 0 === cc.lastIndex ? D2.length - 1 : cc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
6092
6170
  break;
6093
6171
  case 92:
6094
- for (b2 = $2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
6095
- if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, oc.test(D2.charAt(b2)))) {
6096
- for (; oc.test(D2.charAt(b2 + 1)); ) b2 += 1;
6172
+ for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
6173
+ if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, dc.test(D2.charAt(b2)))) {
6174
+ for (; dc.test(D2.charAt(b2 + 1)); ) b2 += 1;
6097
6175
  32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
6098
6176
  }
6099
- x2 = ["word", D2.slice($2, b2 + 1), $2, b2], $2 = b2;
6177
+ x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
6100
6178
  break;
6101
6179
  default:
6102
- 47 === u && 42 === D2.charCodeAt($2 + 1) ? (b2 = D2.indexOf("*/", $2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice($2, b2 + 1), $2, b2], $2 = b2) : (nc.lastIndex = $2 + 1, nc.test(D2), b2 = 0 === nc.lastIndex ? D2.length - 1 : nc.lastIndex - 2, x2 = ["word", D2.slice($2, b2 + 1), $2, b2], B2.push(x2), $2 = b2);
6180
+ 47 === u && 42 === D2.charCodeAt(B2 + 1) ? (b2 = D2.indexOf("*/", B2 + 2) + 1, 0 === b2 && (F2 || a2 ? b2 = D2.length : y2("comment")), x2 = ["comment", D2.slice(B2, b2 + 1), B2, b2], B2 = b2) : (uc.lastIndex = B2 + 1, uc.test(D2), b2 = 0 === uc.lastIndex ? D2.length - 1 : uc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
6103
6181
  }
6104
- return $2++, x2;
6182
+ return B2++, x2;
6105
6183
  }, position: function S() {
6106
- return $2;
6184
+ return B2;
6107
6185
  } };
6108
6186
  };
6109
- const uc = { empty: true, space: true };
6110
- var pc = class {
6187
+ const wc = { empty: true, space: true };
6188
+ var bc = class {
6111
6189
  constructor(e) {
6112
- this.input = e, this.root = new lc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
6190
+ this.input = e, this.root = new gc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
6113
6191
  }
6114
6192
  atrule(e) {
6115
- let a = new sc();
6193
+ let a = new hc();
6116
6194
  a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
6117
6195
  let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
6118
6196
  for (; !this.tokenizer.endOfFile(); ) {
@@ -6164,7 +6242,7 @@ var pc = class {
6164
6242
  return false;
6165
6243
  }
6166
6244
  comment(e) {
6167
- let a = new ic();
6245
+ let a = new fc();
6168
6246
  this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
6169
6247
  let u = e[1].slice(2, -2);
6170
6248
  if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
@@ -6177,7 +6255,7 @@ var pc = class {
6177
6255
  this.tokenizer = kc(this.input);
6178
6256
  }
6179
6257
  decl(e, a) {
6180
- let u = new ac();
6258
+ let u = new mc();
6181
6259
  this.init(u, e[0][2]);
6182
6260
  let m2, w2 = e[e.length - 1];
6183
6261
  for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e2) {
@@ -6226,7 +6304,7 @@ var pc = class {
6226
6304
  throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
6227
6305
  }
6228
6306
  emptyRule(e) {
6229
- let a = new cc();
6307
+ let a = new yc();
6230
6308
  this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
6231
6309
  }
6232
6310
  end(e) {
@@ -6302,7 +6380,7 @@ var pc = class {
6302
6380
  }
6303
6381
  raw(e, a, u, m2) {
6304
6382
  let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
6305
- for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", uc[x2] || uc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
6383
+ for (let e2 = 0; e2 < I2; e2 += 1) w2 = u[e2], b2 = w2[0], "space" !== b2 || e2 !== I2 - 1 || m2 ? "comment" === b2 ? (x2 = u[e2 - 1] ? u[e2 - 1][0] : "empty", C2 = u[e2 + 1] ? u[e2 + 1][0] : "empty", wc[x2] || wc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
6306
6384
  if (!O2) {
6307
6385
  let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
6308
6386
  e.raws[a] = { raw: m3, value: _2 };
@@ -6311,7 +6389,7 @@ var pc = class {
6311
6389
  }
6312
6390
  rule(e) {
6313
6391
  e.pop();
6314
- let a = new cc();
6392
+ let a = new yc();
6315
6393
  this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
6316
6394
  }
6317
6395
  spacesAndCommentsFromEnd(e) {
@@ -6351,9 +6429,9 @@ var pc = class {
6351
6429
  throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
6352
6430
  }
6353
6431
  };
6354
- let dc = _a, hc = al, fc = pc;
6432
+ let Sc = Pa, vc = ml, xc = bc;
6355
6433
  function Gt(e, a) {
6356
- let u = new hc(e, a), m2 = new fc(u);
6434
+ let u = new vc(e, a), m2 = new xc(u);
6357
6435
  try {
6358
6436
  m2.parse();
6359
6437
  } catch (e2) {
@@ -6361,9 +6439,9 @@ function Gt(e, a) {
6361
6439
  }
6362
6440
  return m2.root;
6363
6441
  }
6364
- var mc = Gt;
6365
- Gt.default = Gt, dc.registerParse(Gt);
6366
- let gc = class {
6442
+ var Mc = Gt;
6443
+ Gt.default = Gt, Sc.registerParse(Gt);
6444
+ let Ic = class {
6367
6445
  constructor(e, a = {}) {
6368
6446
  if (this.type = "warning", this.text = e, a.node && a.node.source) {
6369
6447
  let e2 = a.node.rangeBy(a);
@@ -6375,9 +6453,9 @@ let gc = class {
6375
6453
  return this.node ? this.node.error(this.text, { index: this.index, plugin: this.plugin, word: this.word }).message : this.plugin ? this.plugin + ": " + this.text : this.text;
6376
6454
  }
6377
6455
  };
6378
- var yc = gc;
6379
- gc.default = gc;
6380
- let wc = yc, bc = class {
6456
+ var _c = Ic;
6457
+ Ic.default = Ic;
6458
+ let Oc = _c, Ec = class {
6381
6459
  get content() {
6382
6460
  return this.css;
6383
6461
  }
@@ -6389,26 +6467,26 @@ let wc = yc, bc = class {
6389
6467
  }
6390
6468
  warn(e, a = {}) {
6391
6469
  a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
6392
- let u = new wc(e, a);
6470
+ let u = new Oc(e, a);
6393
6471
  return this.messages.push(u), u;
6394
6472
  }
6395
6473
  warnings() {
6396
6474
  return this.messages.filter((e) => "warning" === e.type);
6397
6475
  }
6398
6476
  };
6399
- var Sc = bc;
6400
- bc.default = bc;
6401
- let vc = {};
6477
+ var Lc = Ec;
6478
+ Ec.default = Ec;
6479
+ let Rc = {};
6402
6480
  var ni = function(e) {
6403
- vc[e] || (vc[e] = true, typeof console < "u" && console.warn && console.warn(e));
6481
+ Rc[e] || (Rc[e] = true, typeof console < "u" && console.warn && console.warn(e));
6404
6482
  };
6405
- let xc = _a, Mc = Pa, Ic = ec, _c = mc, Oc = Sc, Ec = dl, Lc = ta, { isClean: Rc, my: Ac } = na, Tc = ni;
6406
- const Nc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Pc = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Dc = { Once: true, postcssPlugin: true, prepare: true };
6483
+ let Ac = Pa, Tc = ja, Nc = lc, Pc = Mc, Dc = Lc, Fc = Sl, Uc = ca, { isClean: Bc, my: $c } = ua, Wc = ni;
6484
+ const zc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, jc = { AtRule: true, AtRuleExit: true, Comment: true, CommentExit: true, Declaration: true, DeclarationExit: true, Document: true, DocumentExit: true, Once: true, OnceExit: true, postcssPlugin: true, prepare: true, Root: true, RootExit: true, Rule: true, RuleExit: true }, Gc = { Once: true, postcssPlugin: true, prepare: true };
6407
6485
  function _e(e) {
6408
6486
  return "object" == typeof e && "function" == typeof e.then;
6409
6487
  }
6410
6488
  function ri(e) {
6411
- let a = false, u = Nc[e.type];
6489
+ let a = false, u = zc[e.type];
6412
6490
  return "decl" === e.type ? a = e.prop.toLowerCase() : "atrule" === e.type && (a = e.name.toLowerCase()), a && e.append ? [u, u + "-" + a, 0, u + "Exit", u + "Exit-" + a] : a ? [u, u + "-" + a, u + "Exit", u + "Exit-" + a] : e.append ? [u, 0, u + "Exit"] : [u, u + "Exit"];
6413
6491
  }
6414
6492
  function br(e) {
@@ -6416,9 +6494,9 @@ function br(e) {
6416
6494
  return a = "document" === e.type ? ["Document", 0, "DocumentExit"] : "root" === e.type ? ["Root", 0, "RootExit"] : ri(e), { eventIndex: 0, events: a, iterator: 0, node: e, visitorIndex: 0, visitors: [] };
6417
6495
  }
6418
6496
  function Js(e) {
6419
- return e[Rc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
6497
+ return e[Bc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
6420
6498
  }
6421
- let Fc = {}, Uc = class oi {
6499
+ let Vc = {}, qc = class oi {
6422
6500
  get content() {
6423
6501
  return this.stringify().content;
6424
6502
  }
@@ -6445,19 +6523,19 @@ let Fc = {}, Uc = class oi {
6445
6523
  }
6446
6524
  constructor(e, a, u) {
6447
6525
  let m2;
6448
- if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof Oc) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
6526
+ if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof Dc) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
6449
6527
  else {
6450
- let e2 = _c;
6528
+ let e2 = Pc;
6451
6529
  u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
6452
6530
  try {
6453
6531
  m2 = e2(a, u);
6454
6532
  } catch (e3) {
6455
6533
  this.processed = true, this.error = e3;
6456
6534
  }
6457
- m2 && !m2[Ac] && xc.rebuild(m2);
6535
+ m2 && !m2[$c] && Ac.rebuild(m2);
6458
6536
  }
6459
6537
  else m2 = Js(a);
6460
- this.result = new Oc(e, m2, u), this.helpers = { ...Fc, postcss: Fc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
6538
+ this.result = new Dc(e, m2, u), this.helpers = { ...Vc, postcss: Vc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
6461
6539
  }
6462
6540
  async() {
6463
6541
  return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
@@ -6491,8 +6569,8 @@ let Fc = {}, Uc = class oi {
6491
6569
  this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
6492
6570
  };
6493
6571
  for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
6494
- if (!Pc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
6495
- if (!Dc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
6572
+ if (!jc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
6573
+ if (!Gc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
6496
6574
  else "function" == typeof e[a] && t(e, a, e[a]);
6497
6575
  }
6498
6576
  this.hasListener = Object.keys(this.listeners).length > 0;
@@ -6509,8 +6587,8 @@ let Fc = {}, Uc = class oi {
6509
6587
  }
6510
6588
  if (this.prepareVisitors(), this.hasListener) {
6511
6589
  let e = this.result.root;
6512
- for (; !e[Rc]; ) {
6513
- e[Rc] = true;
6590
+ for (; !e[Bc]; ) {
6591
+ e[Bc] = true;
6514
6592
  let a = [br(e)];
6515
6593
  for (; a.length > 0; ) {
6516
6594
  let e2 = this.visitTick(a);
@@ -6555,9 +6633,9 @@ let Fc = {}, Uc = class oi {
6555
6633
  if (this.error) throw this.error;
6556
6634
  if (this.stringified) return this.result;
6557
6635
  this.stringified = true, this.sync();
6558
- let e = this.result.opts, a = Lc;
6636
+ let e = this.result.opts, a = Uc;
6559
6637
  e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
6560
- let u = new Ic(a, this.result.root, this.result.opts).generate();
6638
+ let u = new Nc(a, this.result.root, this.result.opts).generate();
6561
6639
  return this.result.css = u[0], this.result.map = u[1], this.result;
6562
6640
  }
6563
6641
  sync() {
@@ -6569,14 +6647,14 @@ let Fc = {}, Uc = class oi {
6569
6647
  }
6570
6648
  if (this.prepareVisitors(), this.hasListener) {
6571
6649
  let e = this.result.root;
6572
- for (; !e[Rc]; ) e[Rc] = true, this.walkSync(e);
6650
+ for (; !e[Bc]; ) e[Bc] = true, this.walkSync(e);
6573
6651
  if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
6574
6652
  else this.visitSync(this.listeners.OnceExit, e);
6575
6653
  }
6576
6654
  return this.result;
6577
6655
  }
6578
6656
  then(e, a) {
6579
- return "production" !== process.env.NODE_ENV && ("from" in this.opts || Tc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
6657
+ return "production" !== process.env.NODE_ENV && ("from" in this.opts || Wc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
6580
6658
  }
6581
6659
  toString() {
6582
6660
  return this.css;
@@ -6608,22 +6686,22 @@ let Fc = {}, Uc = class oi {
6608
6686
  }
6609
6687
  if (0 !== a.iterator) {
6610
6688
  let m3, w3 = a.iterator;
6611
- for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[Rc]) return m3[Rc] = true, void e.push(br(m3));
6689
+ for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[Bc]) return m3[Bc] = true, void e.push(br(m3));
6612
6690
  a.iterator = 0, delete u.indexes[w3];
6613
6691
  }
6614
6692
  let w2 = a.events;
6615
6693
  for (; a.eventIndex < w2.length; ) {
6616
6694
  let e2 = w2[a.eventIndex];
6617
- if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[Rc] = true, a.iterator = u.getIterator()));
6695
+ if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[Bc] = true, a.iterator = u.getIterator()));
6618
6696
  if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
6619
6697
  }
6620
6698
  e.pop();
6621
6699
  }
6622
6700
  walkSync(e) {
6623
- e[Rc] = true;
6701
+ e[Bc] = true;
6624
6702
  let a = ri(e);
6625
6703
  for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
6626
- e2[Rc] || this.walkSync(e2);
6704
+ e2[Bc] || this.walkSync(e2);
6627
6705
  });
6628
6706
  else {
6629
6707
  let a2 = this.listeners[u];
@@ -6634,14 +6712,14 @@ let Fc = {}, Uc = class oi {
6634
6712
  return this.sync().warnings();
6635
6713
  }
6636
6714
  };
6637
- Uc.registerPostcss = (e) => {
6638
- Fc = e;
6715
+ qc.registerPostcss = (e) => {
6716
+ Vc = e;
6639
6717
  };
6640
- var $c = Uc;
6641
- Uc.default = Uc, Ec.registerLazyResult(Uc), Mc.registerLazyResult(Uc);
6642
- let Bc = ec, Wc = mc;
6643
- const zc = Sc;
6644
- let jc = ta, Gc = ni, Vc = class {
6718
+ var Hc = qc;
6719
+ qc.default = qc, Fc.registerLazyResult(qc), Tc.registerLazyResult(qc);
6720
+ let Zc = lc, Kc = Mc;
6721
+ const Jc = Lc;
6722
+ let Yc = ca, Xc = ni, Qc = class {
6645
6723
  get content() {
6646
6724
  return this.result.css;
6647
6725
  }
@@ -6662,7 +6740,7 @@ let jc = ta, Gc = ni, Vc = class {
6662
6740
  }
6663
6741
  get root() {
6664
6742
  if (this._root) return this._root;
6665
- let e, a = Wc;
6743
+ let e, a = Kc;
6666
6744
  try {
6667
6745
  e = a(this._css, this._opts);
6668
6746
  } catch (e2) {
@@ -6676,11 +6754,11 @@ let jc = ta, Gc = ni, Vc = class {
6676
6754
  }
6677
6755
  constructor(e, a, u) {
6678
6756
  a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
6679
- let m2, w2 = jc;
6680
- this.result = new zc(this._processor, m2, this._opts), this.result.css = a;
6757
+ let m2, w2 = Yc;
6758
+ this.result = new Jc(this._processor, m2, this._opts), this.result.css = a;
6681
6759
  let b2 = this;
6682
6760
  Object.defineProperty(this.result, "root", { get: () => b2.root });
6683
- let C2 = new Bc(w2, m2, this._opts, a);
6761
+ let C2 = new Zc(w2, m2, this._opts, a);
6684
6762
  if (C2.isMap()) {
6685
6763
  let [e2, a2] = C2.generate();
6686
6764
  e2 && (this.result.css = e2), a2 && (this.result.map = a2);
@@ -6700,7 +6778,7 @@ let jc = ta, Gc = ni, Vc = class {
6700
6778
  return this.result;
6701
6779
  }
6702
6780
  then(e, a) {
6703
- return "production" !== process.env.NODE_ENV && ("from" in this._opts || Gc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
6781
+ return "production" !== process.env.NODE_ENV && ("from" in this._opts || Xc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
6704
6782
  }
6705
6783
  toString() {
6706
6784
  return this._css;
@@ -6709,9 +6787,9 @@ let jc = ta, Gc = ni, Vc = class {
6709
6787
  return [];
6710
6788
  }
6711
6789
  };
6712
- var qc = Vc;
6713
- Vc.default = Vc;
6714
- let Hc = Pa, Zc = $c, Kc = qc, Yc = dl, Jc = class {
6790
+ var lu = Qc;
6791
+ Qc.default = Qc;
6792
+ let cu = ja, hu = Hc, Cu = lu, ku = Sl, xu = class {
6715
6793
  constructor(e = []) {
6716
6794
  this.version = "8.5.3", this.plugins = this.normalize(e);
6717
6795
  }
@@ -6727,39 +6805,39 @@ let Hc = Pa, Zc = $c, Kc = qc, Yc = dl, Jc = class {
6727
6805
  return a;
6728
6806
  }
6729
6807
  process(e, a = {}) {
6730
- return this.plugins.length || a.parser || a.stringifier || a.syntax ? new Zc(this, e, a) : new Kc(this, e, a);
6808
+ return this.plugins.length || a.parser || a.stringifier || a.syntax ? new hu(this, e, a) : new Cu(this, e, a);
6731
6809
  }
6732
6810
  use(e) {
6733
6811
  return this.plugins = this.plugins.concat(this.normalize([e])), this;
6734
6812
  }
6735
6813
  };
6736
- var Xc = Jc;
6737
- Jc.default = Jc, Yc.registerProcessor(Jc), Hc.registerProcessor(Jc);
6738
- let Qc = La, lu = ha, cu = _a, hu = Hi, Cu = ga, ku = Pa, xu = Il, Mu = al, _u = $c, Ou = fl, Eu = ca, Lu = mc, Ru = Xc, Au = Sc, Tu = dl, Nu = wl, Pu = ta, Du = yc;
6814
+ var Mu = xu;
6815
+ xu.default = xu, ku.registerProcessor(xu), cu.registerProcessor(xu);
6816
+ let _u = Ua, Ou = va, Eu = Pa, Lu = oa, Ru = xa, Au = ja, Tu = Pl, Nu = ml, Pu = Hc, Du = Cl, Fu = wa, Uu = Mc, $u = Mu, Wu = Lc, zu = Sl, ju = Il, Gu = ca, Vu = _c;
6739
6817
  function T$1(...e) {
6740
- return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Ru(e);
6818
+ return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new $u(e);
6741
6819
  }
6742
6820
  T$1.plugin = function(e, a) {
6743
6821
  let u, m2 = false;
6744
6822
  function n(...u2) {
6745
6823
  console && console.warn && !m2 && (m2 = true, console.warn(e + ": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"), process.env.LANG && process.env.LANG.startsWith("cn") && console.warn(e + ": 里面 postcss.plugin 被弃用. 迁移指南:\nhttps://www.w3ctech.com/topic/2226"));
6746
6824
  let w2 = a(...u2);
6747
- return w2.postcssPlugin = e, w2.postcssVersion = new Ru().version, w2;
6825
+ return w2.postcssPlugin = e, w2.postcssVersion = new $u().version, w2;
6748
6826
  }
6749
6827
  return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
6750
6828
  return T$1([n(u2)]).process(e2, a2);
6751
6829
  }, n;
6752
- }, T$1.stringify = Pu, T$1.parse = Lu, T$1.fromJSON = xu, T$1.list = Ou, T$1.comment = (e) => new lu(e), T$1.atRule = (e) => new Qc(e), T$1.decl = (e) => new Cu(e), T$1.rule = (e) => new Nu(e), T$1.root = (e) => new Tu(e), T$1.document = (e) => new ku(e), T$1.CssSyntaxError = hu, T$1.Declaration = Cu, T$1.Container = cu, T$1.Processor = Ru, T$1.Document = ku, T$1.Comment = lu, T$1.Warning = Du, T$1.AtRule = Qc, T$1.Result = Au, T$1.Input = Mu, T$1.Rule = Nu, T$1.Root = Tu, T$1.Node = Eu, _u.registerPostcss(T$1);
6753
- var Fu = T$1;
6830
+ }, T$1.stringify = Gu, T$1.parse = Uu, T$1.fromJSON = Tu, T$1.list = Du, T$1.comment = (e) => new Ou(e), T$1.atRule = (e) => new _u(e), T$1.decl = (e) => new Ru(e), T$1.rule = (e) => new ju(e), T$1.root = (e) => new zu(e), T$1.document = (e) => new Au(e), T$1.CssSyntaxError = Lu, T$1.Declaration = Ru, T$1.Container = Eu, T$1.Processor = $u, T$1.Document = Au, T$1.Comment = Ou, T$1.Warning = Vu, T$1.AtRule = _u, T$1.Result = Wu, T$1.Input = Nu, T$1.Rule = ju, T$1.Root = zu, T$1.Node = Fu, Pu.registerPostcss(T$1);
6831
+ var qu = T$1;
6754
6832
  T$1.default = T$1;
6755
- const Uu = Su(Fu);
6756
- var $u;
6757
- Uu.stringify, Uu.fromJSON, Uu.plugin, Uu.parse, Uu.list, Uu.document, Uu.comment, Uu.atRule, Uu.rule, Uu.decl, Uu.root, Uu.CssSyntaxError, Uu.Declaration, Uu.Container, Uu.Processor, Uu.Document, Uu.Comment, Uu.Warning, Uu.AtRule, Uu.Result, Uu.Input, Uu.Rule, Uu.Root, Uu.Node, (function(e) {
6833
+ const Hu = Su(qu);
6834
+ var Zu;
6835
+ Hu.stringify, Hu.fromJSON, Hu.plugin, Hu.parse, Hu.list, Hu.document, Hu.comment, Hu.atRule, Hu.rule, Hu.decl, Hu.root, Hu.CssSyntaxError, Hu.Declaration, Hu.Container, Hu.Processor, Hu.Document, Hu.Comment, Hu.Warning, Hu.AtRule, Hu.Result, Hu.Input, Hu.Rule, Hu.Root, Hu.Node, (function(e) {
6758
6836
  e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
6759
- })($u || ($u = {}));
6760
- const { addCustomEvent: Wu } = ae, { addSailfishEvent: zu } = ae, { freezePage: ju } = ae, { takeFullSnapshot: Gu } = ae;
6761
- var Vu = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? Vu(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
6762
- let qu = class d {
6837
+ })(Zu || (Zu = {}));
6838
+ const { addCustomEvent: Ku } = ae, { addSailfishEvent: Ju } = ae, { freezePage: Yu } = ae, { takeFullSnapshot: Xu } = ae;
6839
+ var Qu = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? Qu(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
6840
+ let ep = class d {
6763
6841
  constructor(e) {
6764
6842
  y(this, "fileName"), y(this, "functionName"), y(this, "lineNumber"), y(this, "columnNumber"), this.fileName = e.fileName || "", this.functionName = e.functionName || "", this.lineNumber = e.lineNumber, this.columnNumber = e.columnNumber;
6765
6843
  }
@@ -6768,8 +6846,8 @@ let qu = class d {
6768
6846
  return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
6769
6847
  }
6770
6848
  };
6771
- const Hu = /(^|@)\S+:\d+/, Zu = /^\s*at .*(\S+:\d+|\(native\))/m, Ku = /^(eval@)?(\[native code])?$/, Yu = { parse: function(e) {
6772
- return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(Zu) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
6849
+ const tp = /(^|@)\S+:\d+/, np = /^\s*at .*(\S+:\d+|\(native\))/m, rp = /^(eval@)?(\[native code])?$/, op = { parse: function(e) {
6850
+ return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(np) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
6773
6851
  }, extractLocation: function(e) {
6774
6852
  if (-1 === e.indexOf(":")) return [e];
6775
6853
  const a = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
@@ -6777,23 +6855,23 @@ const Hu = /(^|@)\S+:\d+/, Zu = /^\s*at .*(\S+:\d+|\(native\))/m, Ku = /^(eval@)
6777
6855
  return [a[1], a[2] || void 0, a[3] || void 0];
6778
6856
  }, parseV8OrIE: function(e) {
6779
6857
  return e.stack.split("\n").filter(function(e2) {
6780
- return !!e2.match(Zu);
6858
+ return !!e2.match(np);
6781
6859
  }, this).map(function(e2) {
6782
6860
  e2.indexOf("(eval ") > -1 && (e2 = e2.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
6783
6861
  let a = e2.replace(/^\s+/, "").replace(/\(eval code/g, "(");
6784
6862
  const u = a.match(/ (\((.+):(\d+):(\d+)\)$)/);
6785
6863
  a = u ? a.replace(u[0], "") : a;
6786
6864
  const m2 = a.split(/\s+/).slice(1), w2 = this.extractLocation(u ? u[1] : m2.pop()), b2 = m2.join(" ") || void 0, C2 = ["eval", "<anonymous>"].indexOf(w2[0]) > -1 ? void 0 : w2[0];
6787
- return new qu({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
6865
+ return new ep({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
6788
6866
  }, this);
6789
6867
  }, parseFFOrSafari: function(e) {
6790
6868
  return e.stack.split("\n").filter(function(e2) {
6791
- return !e2.match(Ku);
6869
+ return !e2.match(rp);
6792
6870
  }, this).map(function(e2) {
6793
- if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new qu({ functionName: e2 });
6871
+ if (e2.indexOf(" > eval") > -1 && (e2 = e2.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), -1 === e2.indexOf("@") && -1 === e2.indexOf(":")) return new ep({ functionName: e2 });
6794
6872
  {
6795
6873
  const a = /((.*".+"[^@]*)?[^@]*)(?:@)/, u = e2.match(a), m2 = u && u[1] ? u[1] : void 0, w2 = this.extractLocation(e2.replace(a, ""));
6796
- return new qu({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
6874
+ return new ep({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
6797
6875
  }
6798
6876
  }, this);
6799
6877
  }, parseOpera: function(e) {
@@ -6802,22 +6880,22 @@ const Hu = /(^|@)\S+:\d+/, Zu = /^\s*at .*(\S+:\d+|\(native\))/m, Ku = /^(eval@)
6802
6880
  const a = /Line (\d+).*script (?:in )?(\S+)/i, u = e.message.split("\n"), m2 = [];
6803
6881
  for (let e2 = 2, w2 = u.length; e2 < w2; e2 += 2) {
6804
6882
  const w3 = a.exec(u[e2]);
6805
- w3 && m2.push(new qu({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
6883
+ w3 && m2.push(new ep({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
6806
6884
  }
6807
6885
  return m2;
6808
6886
  }, parseOpera10: function(e) {
6809
6887
  const a = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u = e.stacktrace.split("\n"), m2 = [];
6810
6888
  for (let e2 = 0, w2 = u.length; e2 < w2; e2 += 2) {
6811
6889
  const w3 = a.exec(u[e2]);
6812
- w3 && m2.push(new qu({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
6890
+ w3 && m2.push(new ep({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
6813
6891
  }
6814
6892
  return m2;
6815
6893
  }, parseOpera11: function(e) {
6816
6894
  return e.stack.split("\n").filter(function(e2) {
6817
- return !!e2.match(Hu) && !e2.match(/^Error created at/);
6895
+ return !!e2.match(tp) && !e2.match(/^Error created at/);
6818
6896
  }, this).map(function(e2) {
6819
6897
  const a = e2.split("@"), u = this.extractLocation(a.pop()), m2 = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
6820
- return new qu({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
6898
+ return new ep({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
6821
6899
  }, this);
6822
6900
  } };
6823
6901
  function T(e) {
@@ -6874,9 +6952,9 @@ function g(e, a) {
6874
6952
  return a2 instanceof Node ? a2 instanceof HTMLElement ? a2 ? a2.outerHTML : "" : a2.nodeName : a2 instanceof Error ? a2.stack ? a2.stack + "\nEnd of stack for Error object" : a2.name + ": " + a2.message : a2;
6875
6953
  });
6876
6954
  }
6877
- const Ju = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
6955
+ const sp = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
6878
6956
  function R(e, a, u) {
6879
- const m2 = u ? Object.assign({}, Ju, u) : Ju, w2 = m2.logger;
6957
+ const m2 = u ? Object.assign({}, sp, u) : sp, w2 = m2.logger;
6880
6958
  if (!w2) return () => {
6881
6959
  };
6882
6960
  let b2;
@@ -6885,7 +6963,7 @@ function R(e, a, u) {
6885
6963
  const I2 = [];
6886
6964
  if (m2.level.includes("error")) {
6887
6965
  const l = (a2) => {
6888
- const u2 = a2.message, w3 = a2.error, b3 = Yu.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
6966
+ const u2 = a2.message, w3 = a2.error, b3 = op.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
6889
6967
  e({ level: "error", trace: b3, payload: C3 });
6890
6968
  };
6891
6969
  a.addEventListener("error", l), I2.push(() => {
@@ -6894,7 +6972,7 @@ function R(e, a, u) {
6894
6972
  const f = (a2) => {
6895
6973
  let u2, w3;
6896
6974
  a2.reason instanceof Error ? (u2 = a2.reason, w3 = [g(`Uncaught (in promise) ${u2.name}: ${u2.message}`, m2.stringifyOptions)]) : (u2 = new Error(), w3 = [g("Uncaught (in promise)", m2.stringifyOptions), g(a2.reason, m2.stringifyOptions)]);
6897
- const b3 = Yu.parse(u2).map((e2) => e2.toString());
6975
+ const b3 = op.parse(u2).map((e2) => e2.toString());
6898
6976
  e({ level: "error", trace: b3, payload: w3 });
6899
6977
  };
6900
6978
  a.addEventListener("unhandledrejection", f), I2.push(() => {
@@ -6922,7 +7000,7 @@ function R(e, a, u) {
6922
7000
  if (a3.apply(this, w3), !("assert" === u2 && w3[0] || x2)) {
6923
7001
  x2 = true;
6924
7002
  try {
6925
- const a4 = Yu.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
7003
+ const a4 = op.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
6926
7004
  C2++, C2 < m2.lengthThreshold ? e({ level: u2, trace: a4, payload: b3 }) : C2 === m2.lengthThreshold && e({ level: "warn", trace: [], payload: [g("The number of log records reached the threshold.")] });
6927
7005
  } catch (e2) {
6928
7006
  a3("@sailfish-rrweb/rrweb logger error:", e2, ...w3);
@@ -6934,7 +7012,7 @@ function R(e, a, u) {
6934
7012
  };
6935
7013
  }
6936
7014
  }
6937
- var Xu = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(Xu || {});
7015
+ var ip = ((e) => (e[e.DomContentLoaded = 0] = "DomContentLoaded", e[e.Load = 1] = "Load", e[e.FullSnapshot = 2] = "FullSnapshot", e[e.IncrementalSnapshot = 3] = "IncrementalSnapshot", e[e.Meta = 4] = "Meta", e[e.Custom = 5] = "Custom", e[e.Plugin = 6] = "Plugin", e[e.Device = 24] = "Device", e[e.SailfishCustom = 25] = "SailfishCustom", e))(ip || {});
6938
7016
  function suppressConsoleLogsDuringCall(e) {
6939
7017
  const a = console.log, u = console.warn, m2 = console.error;
6940
7018
  console.log = () => {
@@ -6947,7 +7025,7 @@ function suppressConsoleLogsDuringCall(e) {
6947
7025
  console.log = a, console.warn = u, console.error = m2;
6948
7026
  }
6949
7027
  }
6950
- const Qu = "zendesk_chat", ep = "Zendesk";
7028
+ const ap = "zendesk_chat", lp = "Zendesk";
6951
7029
  function zE_safe(...e) {
6952
7030
  try {
6953
7031
  if ((function hasZendesk() {
@@ -6963,7 +7041,7 @@ function maskInputFn(e, a) {
6963
7041
  const u = { creditCard: /\b(?:\d[ -]*?){13,16}\b/, ssn: /\b\d{3}-\d{2}-\d{4}\b/ };
6964
7042
  return a.closest(".mask") ? "*".repeat(e.length) : a.hasAttribute("data-cc") || ((_a2 = a.getAttribute("autocomplete")) == null ? void 0 : _a2.startsWith("cc-")) || u.creditCard.test(e) ? "**** **** **** " + e.slice(-4) : a.hasAttribute("data-ssn") || u.ssn.test(e) ? "***-**-" + e.slice(-4) : a.hasAttribute("data-dob") ? "**/**/" + e.slice(-4) : e;
6965
7043
  }
6966
- const getUrlAndStoredUuids = () => ({ page_visit_uuid: sessionStorage.getItem("pageVisitUUID"), prev_page_visit_uuid: sessionStorage.getItem("prevPageVisitUUID"), href: location.origin + location.pathname });
7044
+ const getUrlAndStoredUuids = () => ({ page_visit_uuid: sessionStorage.getItem("pageVisitUUID"), prev_page_visit_uuid: sessionStorage.getItem("prevPageVisitUUID"), href: location.origin + location.pathname, tabVisibilityChanged: sessionStorage.getItem("tabVisibilityChanged"), tabVisibilityState: sessionStorage.getItem("tabVisibilityState") });
6967
7045
  function initializeDomContentEvents(e) {
6968
7046
  document.addEventListener("readystatechange", () => {
6969
7047
  const a = { type: 24, data: { source: 0, info: "" }, timestamp: Date.now(), sessionId: e, ...getUrlAndStoredUuids() };
@@ -6986,7 +7064,7 @@ function initializeDomContentEvents(e) {
6986
7064
  function initializeConsolePlugin(e, a) {
6987
7065
  const { name: u, observer: m2 } = /* @__PURE__ */ ((e2) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e2 }))(e);
6988
7066
  m2((e2) => {
6989
- sendEvent({ type: Xu.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
7067
+ sendEvent({ type: ip.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
6990
7068
  }, window, e);
6991
7069
  }
6992
7070
  async function initializeRecording(e, a, u, m2) {
@@ -7006,11 +7084,11 @@ async function initializeRecording(e, a, u, m2) {
7006
7084
  zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
7007
7085
  });
7008
7086
  const handleWidgetOpen = () => {
7009
- ae.addSailfishEvent(Xu.SailfishCustom, { action: "customer support chat opened", element_id: Qu, provider: ep });
7087
+ ae.addSailfishEvent(ip.SailfishCustom, { action: "customer support chat opened", element_id: ap, provider: lp });
7010
7088
  }, handleWidgetClose = () => {
7011
- ae.addSailfishEvent(Xu.SailfishCustom, { action: "customer support chat closed", element_id: Qu, provider: ep });
7089
+ ae.addSailfishEvent(ip.SailfishCustom, { action: "customer support chat closed", element_id: ap, provider: lp });
7012
7090
  }, handleUnreadMessages = (e2) => {
7013
- ae.addSailfishEvent(Xu.SailfishCustom, { action: "zendesk unreadmessages", element_id: Qu, provider: ep });
7091
+ ae.addSailfishEvent(ip.SailfishCustom, { action: "zendesk unreadmessages", element_id: ap, provider: lp });
7014
7092
  };
7015
7093
  suppressConsoleLogsDuringCall(() => {
7016
7094
  zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
@@ -7021,19 +7099,19 @@ async function initializeRecording(e, a, u, m2) {
7021
7099
  }
7022
7100
  return w2;
7023
7101
  }
7024
- let tp = null, np = null;
7102
+ let cp = null, up = null;
7025
7103
  function identify(e, a = {}, u = false) {
7026
7104
  const m2 = { type: "identify", userId: e, traits: a };
7027
- tp && tp.userId === e && JSON.stringify(tp.traits) === JSON.stringify(a) || (tp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
7105
+ cp && cp.userId === e && JSON.stringify(cp.traits) === JSON.stringify(a) || (cp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
7028
7106
  }
7029
7107
  function addOrUpdateMetadata(e) {
7030
7108
  const a = { type: "addOrUpdateMetadata", metadata: e };
7031
- np && JSON.stringify(np) === JSON.stringify(e) || (np = e, sendMessage(a));
7109
+ up && JSON.stringify(up) === JSON.stringify(e) || (up = e, sendMessage(a));
7032
7110
  }
7033
7111
  function trackingEvent(e) {
7034
7112
  sendMessage({ type: "trackingEvent", trackingData: e, timestamp: Q() });
7035
7113
  }
7036
- const rp = readDebugFlag(), op = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], sp = [400, 403], ip = "CORS", ap = 1, lp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, cp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
7114
+ const pp = readDebugFlag(), dp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], hp = [400, 403], fp = "CORS", mp = 1, gp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, yp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
7037
7115
  function trackDomainChangesOnce() {
7038
7116
  const e = window.__sailfish_recorder || (window.__sailfish_recorder = {});
7039
7117
  if (e.routeWatcherIntervalId) return;
@@ -7054,6 +7132,9 @@ function trackDomainChangesOnce() {
7054
7132
  })(() => checkDomainChange(), 500);
7055
7133
  checkDomainChange(true), e.routeWatcherIntervalId = window.setInterval(u, 1e3);
7056
7134
  }
7135
+ function clearPageVisitDataFromSessionStorage() {
7136
+ X && (sessionStorage.removeItem("pageVisitUUID"), sessionStorage.removeItem("prevPageVisitUUID"), sessionStorage.removeItem("tabVisibilityChanged"), sessionStorage.removeItem("tabVisibilityState"));
7137
+ }
7057
7138
  function matchUrlWithWildcard(e, a) {
7058
7139
  let u, m2;
7059
7140
  if ("string" == typeof e ? u = e : "undefined" != typeof URL && e instanceof URL ? u = e.href : "undefined" != typeof Request && e instanceof Request ? u = e.url : null != e && "function" == typeof e.toString && (u = e.toString()), !u) return false;
@@ -7097,7 +7178,7 @@ function shouldSkipHeadersPropagation(e, a = []) {
7097
7178
  return true;
7098
7179
  }
7099
7180
  for (const e2 of E) if (u.pathname.toLowerCase().endsWith(e2)) return true;
7100
- return !!matchUrlWithWildcard(e, [...op, ...a]);
7181
+ return !!matchUrlWithWildcard(e, [...dp, ...a]);
7101
7182
  }
7102
7183
  function setupFetchInterceptor(e = []) {
7103
7184
  const a = window.fetch, u = getOrSetSessionId();
@@ -7113,20 +7194,41 @@ function setupFetchInterceptor(e = []) {
7113
7194
  var _a2, _b;
7114
7195
  if (!C3) return e2.apply(a3, u2);
7115
7196
  const I3 = v4(), _2 = getUrlAndStoredUuids(), O2 = w3.method || "GET", E2 = Date.now();
7197
+ let D2, F2 = {};
7116
7198
  try {
7117
- let D2 = await (async function injectHeader(e3, a4, u3, m4, w4, C4, x4) {
7199
+ if (m3 instanceof Request) {
7200
+ m3.headers.forEach((e3, a4) => {
7201
+ F2[a4] = e3;
7202
+ });
7203
+ try {
7204
+ const e3 = m3.clone();
7205
+ D2 = await e3.text();
7206
+ } catch (e3) {
7207
+ D2 = null;
7208
+ }
7209
+ } else w3.headers && (w3.headers instanceof Headers ? w3.headers.forEach((e3, a4) => {
7210
+ F2[a4] = e3;
7211
+ }) : Array.isArray(w3.headers) ? w3.headers.forEach(([e3, a4]) => {
7212
+ F2[e3] = a4;
7213
+ }) : F2 = { ...w3.headers }), D2 = w3.body;
7214
+ } catch (e3) {
7215
+ pp && console.warn("[Sailfish] Failed to capture request data:", e3);
7216
+ }
7217
+ try {
7218
+ let U2 = await (async function injectHeader(e3, a4, u3, m4, w4, C4, x4) {
7219
+ const I4 = getFuncSpanHeader();
7118
7220
  if (u3 instanceof Request) {
7119
- const I4 = u3.clone(), _3 = new Headers(I4.headers);
7120
- _3.set(b, `${w4}/${C4}/${x4}`);
7121
- const O3 = new Request(I4, { headers: _3 });
7122
- return await e3.call(a4, O3, m4);
7221
+ const _3 = u3.clone(), O3 = new Headers(_3.headers);
7222
+ O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), pp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: I4.name }));
7223
+ const E3 = new Request(_3, { headers: O3 });
7224
+ return await e3.call(a4, E3, m4);
7123
7225
  }
7124
7226
  {
7125
- const I4 = { ...m4 }, _3 = new Headers(m4.headers || {});
7126
- return _3.set(b, `${w4}/${C4}/${x4}`), I4.headers = _3, await e3.call(a4, u3, I4);
7227
+ const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
7228
+ return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), pp && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof u3 ? u3 : u3.href, header: I4.name })), _3.headers = O3, await e3.call(a4, u3, _3);
7127
7229
  }
7128
- })(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), F2 = false;
7129
- sp.includes(D2.status) && (rp && console.log("Perform retry as status was fail:", D2), D2 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
7230
+ })(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), B2 = false;
7231
+ hp.includes(U2.status) && (pp && console.log("Perform retry as status was fail:", U2), U2 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
7130
7232
  try {
7131
7233
  let m5 = u3[0], w4 = u3[1] || {};
7132
7234
  if ("string" == typeof m5 || m5 instanceof URL) {
@@ -7142,15 +7244,30 @@ function setupFetchInterceptor(e = []) {
7142
7244
  }
7143
7245
  return e3.apply(a4, u3);
7144
7246
  } catch (e4) {
7145
- throw rp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
7247
+ throw pp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
7146
7248
  }
7147
- })(e2, a3, u2, x3), F2 = true);
7148
- const U2 = Date.now(), $2 = D2.status, B2 = D2.ok, z2 = B2 ? "" : `Request Error: ${D2.statusText}`;
7149
- return sendEvent({ type: 27, timestamp: U2, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: U2, response_code: $2, success: B2, error: z2, method: O2, url: x3, retry_without_trace_id: F2 }, ..._2 }), D2;
7249
+ })(e2, a3, u2, x3), B2 = true);
7250
+ const $2 = Date.now(), z2 = U2.status, j2 = U2.ok, V2 = j2 ? "" : `Request Error: ${U2.statusText}`;
7251
+ let q2;
7252
+ try {
7253
+ const e3 = U2.clone();
7254
+ q2 = await e3.text();
7255
+ } catch (e3) {
7256
+ pp && console.warn("[Sailfish] Failed to capture response data:", e3), q2 = null;
7257
+ }
7258
+ let H2 = null;
7259
+ try {
7260
+ H2 = {}, U2.headers.forEach((e3, a4) => {
7261
+ H2[a4] = e3;
7262
+ });
7263
+ } catch (e3) {
7264
+ pp && console.warn("[Sailfish] Failed to capture response headers:", e3), H2 = null;
7265
+ }
7266
+ return sendEvent({ type: 27, timestamp: $2, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: $2, response_code: z2, success: j2, error: V2, method: O2, url: x3, retry_without_trace_id: B2, request_headers: F2, request_body: D2, response_headers: H2, response_body: q2 }, ..._2 }), U2;
7150
7267
  } catch (m4) {
7151
- const w4 = Date.now(), b2 = false, D2 = ((_a2 = m4.response) == null ? void 0 : _a2.status) || 500, F2 = m4.message || "Fetch request failed";
7152
- if (m4 instanceof TypeError && ((_b = m4 == null ? void 0 : m4.message) == null ? void 0 : _b.toLowerCase().includes(ip.toLowerCase()))) return e2.apply(a3, u2);
7153
- throw sendEvent({ type: 27, timestamp: w4, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: w4, response_code: D2, success: b2, error: F2, method: O2, url: x3 }, ..._2 }), m4;
7268
+ const w4 = Date.now(), b2 = false, U2 = ((_a2 = m4.response) == null ? void 0 : _a2.status) || 500, B2 = m4.message || "Fetch request failed";
7269
+ if (m4 instanceof TypeError && ((_b = m4 == null ? void 0 : m4.message) == null ? void 0 : _b.toLowerCase().includes(fp.toLowerCase()))) return e2.apply(a3, u2);
7270
+ throw sendEvent({ type: 27, timestamp: w4, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: w4, response_code: U2, success: b2, error: B2, method: O2, url: x3, request_headers: F2, request_body: D2, response_body: null }, ..._2 }), m4;
7154
7271
  }
7155
7272
  })(a2, m2, w2, x2, I2, u, C2);
7156
7273
  } });
@@ -7183,7 +7300,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
7183
7300
  })(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
7184
7301
  if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
7185
7302
  else {
7186
- U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(cp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
7303
+ U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(yp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
7187
7304
  window.addEventListener("error", (e2) => {
7188
7305
  captureError(e2.error || e2.message);
7189
7306
  }), window.addEventListener("unhandledrejection", (e2) => {
@@ -7191,7 +7308,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
7191
7308
  });
7192
7309
  })(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
7193
7310
  X && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
7194
- })({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...op], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
7311
+ })({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...dp], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
7195
7312
  const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
7196
7313
  XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
7197
7314
  return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, m3.call(this, e3, a3);
@@ -7207,20 +7324,42 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
7207
7324
  } catch (e3) {
7208
7325
  console.warn(`Could not set X-Sf3-Rid for ${m4}`, e3);
7209
7326
  }
7210
- const _3 = Date.now();
7211
- let O3 = false;
7212
- const emitFinished = (e3, a4, u3) => {
7213
- if (O3) return;
7214
- O3 = true;
7215
- const b2 = Date.now();
7216
- sendEvent({ type: 27, timestamp: b2, sessionId: w3, data: { request_id: x3, session_id: w3, timestamp_start: _3, timestamp_end: b2, response_code: a4, success: e3, error: u3, method: this._requestMethod, url: m4 }, ...getUrlAndStoredUuids() });
7327
+ const _3 = getFuncSpanHeader();
7328
+ if (_3) try {
7329
+ this.setRequestHeader(_3.name, _3.value), pp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
7330
+ } catch (e3) {
7331
+ pp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e3);
7332
+ }
7333
+ const O3 = Date.now();
7334
+ let E3 = false;
7335
+ const D3 = a3[0], F3 = { ...this._capturedRequestHeaders }, emitFinished = (e3, a4, u3, b2, C4) => {
7336
+ if (E3) return;
7337
+ E3 = true;
7338
+ const I4 = Date.now();
7339
+ sendEvent({ type: 27, timestamp: I4, sessionId: w3, data: { request_id: x3, session_id: w3, timestamp_start: O3, timestamp_end: I4, response_code: a4, success: e3, error: u3, method: this._requestMethod, url: m4, request_headers: F3, request_body: D3, response_headers: C4, response_body: b2 }, ...getUrlAndStoredUuids() });
7217
7340
  };
7218
7341
  return this.addEventListener("load", () => {
7219
7342
  const e3 = this.status || 0;
7220
- if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "");
7343
+ let a4, u3 = null;
7344
+ try {
7345
+ a4 = this.responseText || this.response;
7346
+ } catch (e4) {
7347
+ a4 = null;
7348
+ }
7349
+ try {
7350
+ u3 = {};
7351
+ const e4 = this.getAllResponseHeaders();
7352
+ e4 && e4.split("\r\n").forEach((e5) => {
7353
+ const a5 = e5.split(": ");
7354
+ 2 === a5.length && (u3[a5[0]] = a5[1]);
7355
+ });
7356
+ } catch (e4) {
7357
+ pp && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
7358
+ }
7359
+ if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
7221
7360
  else {
7222
- const a4 = this.statusText || `HTTP ${e3}`;
7223
- emitFinished(false, e3, a4);
7361
+ const m5 = this.statusText || `HTTP ${e3}`;
7362
+ emitFinished(false, e3, m5, a4, u3);
7224
7363
  }
7225
7364
  }, { once: true }), this.addEventListener("error", () => {
7226
7365
  const e3 = this.status || 0, a4 = 0 === e3 ? "Network or CORS failure" : this.statusText || `Error ${e3}`;
@@ -7231,7 +7370,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
7231
7370
  sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
7232
7371
  })();
7233
7372
  try {
7234
- const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || lp;
7373
+ const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || gp;
7235
7374
  if (U2.ws && 1 === U2.ws.readyState) return;
7236
7375
  const b2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e, F2, a, O2, E2, D2, _2, "JS/TS", b2);
7237
7376
  if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
@@ -7248,14 +7387,14 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
7248
7387
  H && (!(function sendUserDeviceUuid() {
7249
7388
  sendMessage({ type: "userDeviceUuid", userDeviceUuid: (function getOrSetUserDeviceUuid() {
7250
7389
  let e = null;
7251
- if (J) try {
7390
+ if (Y) try {
7252
7391
  e = localStorage.getItem("sailfishUserDeviceUuid");
7253
7392
  } catch {
7254
7393
  }
7255
7394
  if (!e) {
7256
7395
  e = v4();
7257
7396
  try {
7258
- J && localStorage.setItem("sailfishUserDeviceUuid", e);
7397
+ Y && localStorage.setItem("sailfishUserDeviceUuid", e);
7259
7398
  } catch {
7260
7399
  }
7261
7400
  }
@@ -7263,32 +7402,40 @@ H && (!(function sendUserDeviceUuid() {
7263
7402
  })() });
7264
7403
  })(), (function sendTimeZone() {
7265
7404
  sendMessage({ type: "timeZone", timezone: Intl.DateTimeFormat().resolvedOptions().timeZone });
7266
- })()), Y && document.addEventListener("visibilitychange", function handleVisibilityChange() {
7267
- "visible" === document.visibilityState && getOrSetSessionId();
7405
+ })()), J && document.addEventListener("visibilitychange", function handleVisibilityChange() {
7406
+ const e = document.visibilityState, a = Date.now();
7407
+ "visible" === e && getOrSetSessionId();
7408
+ try {
7409
+ sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), pp && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
7410
+ } catch (e2) {
7411
+ console.warn("[Sailfish] Failed to send visibility change event:", e2);
7412
+ }
7413
+ sessionStorage.setItem("tabVisibilityChanged", a.toString()), sessionStorage.setItem("tabVisibilityState", e);
7268
7414
  }), H && window.addEventListener("beforeunload", () => {
7269
- window.name = "", (function clearPageVisitUuid() {
7270
- X && (sessionStorage.removeItem("pageVisitUUID"), sessionStorage.removeItem("prevPageVisitUUID"));
7271
- })();
7415
+ clearPageVisitDataFromSessionStorage();
7272
7416
  });
7273
7417
  const initRecorder = async (e) => {
7274
7418
  if ("undefined" == typeof window) return;
7275
7419
  const a = window.__sailfish_recorder || (window.__sailfish_recorder = {}), u = getOrSetSessionId();
7276
- return a.initialized && a.sessionId === u && a.ws && 1 === a.ws.readyState ? void 0 : (a.initPromise || (a.initPromise = (async () => {
7420
+ return clearPageVisitDataFromSessionStorage(), a.initialized && a.sessionId === u && a.ws && 1 === a.ws.readyState ? void 0 : (a.initPromise || (a.initPromise = (async () => {
7277
7421
  a.hasLoggedInitOnce || (console.log("Initializing Sailfish Recorder (first run) …"), a.hasLoggedInitOnce = true), await startRecording(e), a.issueReportingInit || (setupIssueReporting({ apiKey: e.apiKey, backendApi: e.backendApi ?? "https://api-service.sailfishqa.com", getSessionId: () => getOrSetSessionId(), shortcuts: e.reportIssueShortcuts, customBaseUrl: e.customBaseUrl }), a.issueReportingInit = true);
7278
7422
  })().finally(() => {
7279
7423
  delete a.initPromise;
7280
7424
  })), a.initPromise);
7281
7425
  };
7282
7426
  export {
7283
- lp as DEFAULT_CAPTURE_SETTINGS,
7284
- cp as DEFAULT_CONSOLE_RECORDING_SETTINGS,
7285
- ap as STORAGE_VERSION,
7427
+ gp as DEFAULT_CAPTURE_SETTINGS,
7428
+ yp as DEFAULT_CONSOLE_RECORDING_SETTINGS,
7429
+ mp as STORAGE_VERSION,
7286
7430
  addOrUpdateMetadata,
7287
7431
  buildBatches,
7288
7432
  createTriageFromRecorder,
7433
+ disableFunctionSpanTracking,
7434
+ enableFunctionSpanTracking,
7289
7435
  eventSize,
7290
7436
  fetchCaptureSettings,
7291
7437
  flushBufferedEvents,
7438
+ getFuncSpanHeader,
7292
7439
  getUrlAndStoredUuids,
7293
7440
  identify,
7294
7441
  initRecorder,
@@ -7296,6 +7443,7 @@ export {
7296
7443
  initializeDomContentEvents,
7297
7444
  initializeRecording,
7298
7445
  initializeWebSocket,
7446
+ isFunctionSpanTrackingEnabled,
7299
7447
  matchUrlWithWildcard,
7300
7448
  Q as nowTimestamp,
7301
7449
  openReportIssueModal,