@sailfish-ai/recorder 1.8.7 → 1.8.9
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/README.md +2 -0
- package/dist/index.js +15 -1
- package/dist/recorder.cjs +808 -770
- package/dist/recorder.js +810 -772
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +808 -770
- package/dist/websocket.js +131 -15
- package/package.json +1 -1
package/dist/recorder.cjs
CHANGED
|
@@ -357,8 +357,26 @@ function withAppUrlMetadata(e) {
|
|
|
357
357
|
return { ...e ?? {}, appUrl: (e == null ? void 0 : e.appUrl) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
358
358
|
}
|
|
359
359
|
exports.nowTimestamp = Date.now, /[1-9][0-9]{12}/.test(Date.now().toString()) || (exports.nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime());
|
|
360
|
-
const Q = readDebugFlag(), ee = "per_session";
|
|
361
|
-
let
|
|
360
|
+
const Q = readDebugFlag(), ee = "per_session", te = "sailfish_funcspan_global_state";
|
|
361
|
+
let ne = null, re = false, oe = null, se = null;
|
|
362
|
+
function saveGlobalFuncSpanState(e, a) {
|
|
363
|
+
try {
|
|
364
|
+
if ("undefined" == typeof localStorage) return;
|
|
365
|
+
const u = { enabled: e, expirationTimestampMs: a };
|
|
366
|
+
localStorage.setItem(te, JSON.stringify(u)), Q && console.log("[Sailfish] Saved global function span state to localStorage:", u);
|
|
367
|
+
} catch (e2) {
|
|
368
|
+
Q && console.warn("[Sailfish] Failed to save global function span state to localStorage:", e2);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
function clearGlobalFuncSpanState() {
|
|
372
|
+
try {
|
|
373
|
+
if ("undefined" == typeof localStorage) return;
|
|
374
|
+
localStorage.removeItem(te), Q && console.log("[Sailfish] Cleared global function span state from localStorage");
|
|
375
|
+
} catch (e) {
|
|
376
|
+
Q && console.warn("[Sailfish] Failed to clear global function span state from localStorage:", e);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
let ie = false, le = null, ce = null, pe = false, de = null, he = null;
|
|
362
380
|
function isWebSocketOpen(e) {
|
|
363
381
|
return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
|
|
364
382
|
}
|
|
@@ -369,15 +387,15 @@ async function flushNotifyQueue() {
|
|
|
369
387
|
u.onsuccess = () => a(u.result), u.onerror = () => a([]);
|
|
370
388
|
})) ?? [];
|
|
371
389
|
})();
|
|
372
|
-
if (isWebSocketOpen(
|
|
373
|
-
for (const a of e)
|
|
390
|
+
if (isWebSocketOpen(ne)) try {
|
|
391
|
+
for (const a of e) ne.send(a.value), await deleteNotifyMessageById(a.id);
|
|
374
392
|
} catch (e2) {
|
|
375
393
|
}
|
|
376
394
|
}
|
|
377
395
|
async function flushBufferedEvents() {
|
|
378
|
-
if (isWebSocketOpen(
|
|
396
|
+
if (isWebSocketOpen(ne)) if (oe) await oe;
|
|
379
397
|
else {
|
|
380
|
-
|
|
398
|
+
oe = (async () => {
|
|
381
399
|
var _a2, _b;
|
|
382
400
|
const e = await (async function getAllIndexedEvents() {
|
|
383
401
|
return await withStore$1("readonly", (e2) => new Promise((a2) => {
|
|
@@ -392,33 +410,33 @@ async function flushBufferedEvents() {
|
|
|
392
410
|
for (const e2 of Object.values(a)) {
|
|
393
411
|
const a2 = buildBatches(e2, (e3) => eventSize(e3.data), 52428800);
|
|
394
412
|
for (const e3 of a2) {
|
|
395
|
-
if (!isWebSocketOpen(
|
|
413
|
+
if (!isWebSocketOpen(ne)) break;
|
|
396
414
|
const a3 = e3.map((e4) => {
|
|
397
415
|
var _a3, _b2;
|
|
398
416
|
return { ...e4.data, appUrl: ((_a3 = e4.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
399
417
|
}), u = e3.map((e4) => e4.id).filter((e4) => null != e4);
|
|
400
418
|
try {
|
|
401
419
|
const e4 = JSON.stringify({ type: "events", events: a3, mapUuid: window.sfMapUuid });
|
|
402
|
-
|
|
420
|
+
ne.send(e4), await deleteEventsByIds(u);
|
|
403
421
|
} catch (e4) {
|
|
404
422
|
}
|
|
405
423
|
}
|
|
406
424
|
}
|
|
407
425
|
})();
|
|
408
426
|
try {
|
|
409
|
-
await
|
|
427
|
+
await oe;
|
|
410
428
|
} finally {
|
|
411
|
-
|
|
429
|
+
oe = null;
|
|
412
430
|
}
|
|
413
431
|
}
|
|
414
432
|
}
|
|
415
433
|
function sendEvent(e) {
|
|
416
434
|
var _a2;
|
|
417
435
|
const a = { ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
418
|
-
if (
|
|
436
|
+
if (re || !isWebSocketOpen(ne)) return void saveEventToIDB(a);
|
|
419
437
|
const u = JSON.stringify({ type: "event", event: a, mapUuid: window.sfMapUuid });
|
|
420
438
|
try {
|
|
421
|
-
|
|
439
|
+
ne.send(u);
|
|
422
440
|
} catch (e2) {
|
|
423
441
|
saveEventToIDB(a);
|
|
424
442
|
}
|
|
@@ -428,104 +446,118 @@ function initializeWebSocket(e, a, u) {
|
|
|
428
446
|
const a2 = document.createElement("a");
|
|
429
447
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
430
448
|
})(e), w2 = new URL(e).protocol;
|
|
431
|
-
return
|
|
432
|
-
Q && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (
|
|
449
|
+
return ne = new $(`${"https:" === w2 ? "wss" : "ws"}://${m2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.9`, [], { connectionTimeout: 3e4 }), ne.addEventListener("open", () => {
|
|
450
|
+
Q && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (ie ? "ENABLED" : "DISABLED"))), (async () => {
|
|
433
451
|
try {
|
|
434
|
-
|
|
452
|
+
re = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
435
453
|
} finally {
|
|
436
|
-
|
|
454
|
+
re = false;
|
|
437
455
|
}
|
|
438
|
-
null !=
|
|
456
|
+
null != se && clearInterval(se), se = window.setInterval(() => {
|
|
439
457
|
flushBufferedEvents();
|
|
440
458
|
}, 2e3);
|
|
441
459
|
})();
|
|
442
|
-
}),
|
|
460
|
+
}), ne.addEventListener("close", () => {
|
|
443
461
|
Q && console.log("[Sailfish] WebSocket closed");
|
|
444
|
-
}),
|
|
462
|
+
}), ne.addEventListener("message", (e2) => {
|
|
445
463
|
try {
|
|
446
464
|
const a2 = JSON.parse(e2.data);
|
|
447
|
-
if ("funcSpanTrackingControl" === a2.type) if (Q && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !==
|
|
465
|
+
if ("funcSpanTrackingControl" === a2.type) if (Q && 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, Q && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
|
|
448
466
|
if (a2.expirationTimestampMs) {
|
|
449
|
-
|
|
450
|
-
const e3 = Date.now(), u2 =
|
|
451
|
-
Q && console.log(`[Sailfish] Server expiration timestamp: ${
|
|
452
|
-
|
|
453
|
-
}, u2) : (
|
|
467
|
+
ce = a2.expirationTimestampMs;
|
|
468
|
+
const e3 = Date.now(), u2 = ce - e3;
|
|
469
|
+
Q && console.log(`[Sailfish] Server expiration timestamp: ${ce}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, ce), le = window.setTimeout(() => {
|
|
470
|
+
pe || (ie = false, ce = null, clearGlobalFuncSpanState(), Q && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"));
|
|
471
|
+
}, u2)) : (ie = false, ce = null, clearGlobalFuncSpanState(), Q && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
454
472
|
} else {
|
|
455
473
|
const e3 = a2.timeoutSeconds || 3600;
|
|
456
|
-
e3 > 0 && (
|
|
457
|
-
|
|
474
|
+
e3 > 0 && (ce = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, ce), le = window.setTimeout(() => {
|
|
475
|
+
pe || (ie = false, ce = null, clearGlobalFuncSpanState(), Q && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`));
|
|
458
476
|
}, 1e3 * e3));
|
|
459
477
|
}
|
|
460
478
|
try {
|
|
461
479
|
const e3 = getOrSetSessionId();
|
|
462
|
-
|
|
480
|
+
ne.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" })), Q && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
|
|
463
481
|
} catch (e3) {
|
|
464
482
|
Q && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
|
|
465
483
|
}
|
|
466
|
-
} else
|
|
484
|
+
} else ce = null, clearGlobalFuncSpanState();
|
|
467
485
|
} catch (e3) {
|
|
468
486
|
}
|
|
469
|
-
}),
|
|
487
|
+
}), ne;
|
|
470
488
|
}
|
|
471
489
|
function sendMessage(e) {
|
|
472
490
|
var _a2;
|
|
473
491
|
"sessionId" in e || (e.sessionId = getOrSetSessionId());
|
|
474
492
|
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) });
|
|
475
|
-
if (isWebSocketOpen(
|
|
476
|
-
|
|
493
|
+
if (isWebSocketOpen(ne)) try {
|
|
494
|
+
ne.send(a);
|
|
477
495
|
} catch (e2) {
|
|
478
496
|
saveNotifyMessageToIDB(a);
|
|
479
497
|
}
|
|
480
498
|
else saveNotifyMessageToIDB(a);
|
|
481
499
|
}
|
|
482
500
|
function enableFunctionSpanTracking() {
|
|
483
|
-
if (Q && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"),
|
|
501
|
+
if (Q && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), ie && !pe && (de = le, he = ce, Q && console.log("[Sailfish] Saved global tracking state while switching to local mode")), ie = true, pe = true, ce = null, le = null, isWebSocketOpen(ne)) try {
|
|
484
502
|
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: ee };
|
|
485
|
-
|
|
503
|
+
ne.send(JSON.stringify(e));
|
|
486
504
|
} catch (e) {
|
|
487
505
|
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e);
|
|
488
506
|
}
|
|
489
507
|
else Q && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
490
508
|
}
|
|
491
509
|
function disableFunctionSpanTracking() {
|
|
492
|
-
if (Q && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(
|
|
510
|
+
if (Q && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(ne)) try {
|
|
493
511
|
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: ee };
|
|
494
|
-
|
|
512
|
+
ne.send(JSON.stringify(e));
|
|
495
513
|
} catch (e) {
|
|
496
514
|
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
|
|
497
515
|
}
|
|
498
516
|
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
499
|
-
|
|
517
|
+
pe && (pe = false, null !== de || null !== he ? (ie = true, ce = he, le = de, Q && console.log("[Sailfish] LOCAL tracking mode disabled, restored GLOBAL tracking state"), de = null, he = null) : (ie = false, ce = null, le = null, Q && console.log("[Sailfish] LOCAL tracking mode disabled, no global tracking to restore")));
|
|
500
518
|
}
|
|
501
519
|
function isFunctionSpanTrackingEnabled() {
|
|
502
|
-
return
|
|
520
|
+
return ie;
|
|
503
521
|
}
|
|
504
522
|
function getFuncSpanHeader() {
|
|
505
|
-
if (!
|
|
506
|
-
if (null !==
|
|
507
|
-
if (Date.now() >=
|
|
523
|
+
if (!ie) return null;
|
|
524
|
+
if (null !== ce) {
|
|
525
|
+
if (Date.now() >= ce) return ie = false, ce = null, Q && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
508
526
|
}
|
|
509
527
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
510
528
|
}
|
|
511
|
-
|
|
512
|
-
|
|
529
|
+
(() => {
|
|
530
|
+
const e = (function loadGlobalFuncSpanState() {
|
|
531
|
+
try {
|
|
532
|
+
if ("undefined" == typeof localStorage) return null;
|
|
533
|
+
const e2 = localStorage.getItem(te);
|
|
534
|
+
if (!e2) return null;
|
|
535
|
+
const a = JSON.parse(e2);
|
|
536
|
+
return a.enabled && a.expirationTimestampMs && Date.now() >= a.expirationTimestampMs ? (Q && console.log("[Sailfish] Stored global function span state has expired, clearing"), localStorage.removeItem(te), null) : (Q && console.log("[Sailfish] Loaded global function span state from localStorage:", a), a);
|
|
537
|
+
} catch (e2) {
|
|
538
|
+
return Q && console.warn("[Sailfish] Failed to load global function span state from localStorage:", e2), null;
|
|
539
|
+
}
|
|
540
|
+
})();
|
|
541
|
+
e && e.enabled && (ie = true, ce = e.expirationTimestampMs, pe = false, Q && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTimestampMs: ce }));
|
|
542
|
+
})();
|
|
543
|
+
const me = Object.freeze(Object.defineProperty({ __proto__: null, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
544
|
+
var ge, ye, we = {}, be = {}, ve = {}, Ce = {};
|
|
513
545
|
function requireBase64() {
|
|
514
|
-
if (
|
|
515
|
-
|
|
546
|
+
if (ge) return Ce;
|
|
547
|
+
ge = 1;
|
|
516
548
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
517
|
-
return
|
|
549
|
+
return Ce.encode = function(a) {
|
|
518
550
|
if (0 <= a && a < e.length) return e[a];
|
|
519
551
|
throw new TypeError("Must be between 0 and 63: " + a);
|
|
520
|
-
},
|
|
552
|
+
}, Ce.decode = function(e2) {
|
|
521
553
|
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;
|
|
522
|
-
},
|
|
554
|
+
}, Ce;
|
|
523
555
|
}
|
|
524
556
|
function requireBase64Vlq() {
|
|
525
|
-
if (
|
|
526
|
-
|
|
557
|
+
if (ye) return ve;
|
|
558
|
+
ye = 1;
|
|
527
559
|
var e = requireBase64();
|
|
528
|
-
return
|
|
560
|
+
return ve.encode = function base64VLQ_encode(a) {
|
|
529
561
|
var u, m2 = "", w2 = (function toVLQSigned(e2) {
|
|
530
562
|
return e2 < 0 ? 1 + (-e2 << 1) : 0 + (e2 << 1);
|
|
531
563
|
})(a);
|
|
@@ -533,7 +565,7 @@ function requireBase64Vlq() {
|
|
|
533
565
|
u = 31 & w2, (w2 >>>= 5) > 0 && (u |= 32), m2 += e.encode(u);
|
|
534
566
|
} while (w2 > 0);
|
|
535
567
|
return m2;
|
|
536
|
-
},
|
|
568
|
+
}, ve.decode = function base64VLQ_decode(a, u, m2) {
|
|
537
569
|
var w2, b2, C2 = a.length, x2 = 0, I2 = 0;
|
|
538
570
|
do {
|
|
539
571
|
if (u >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -544,11 +576,11 @@ function requireBase64Vlq() {
|
|
|
544
576
|
var a2 = e2 >> 1;
|
|
545
577
|
return 1 & ~e2 ? a2 : -a2;
|
|
546
578
|
})(x2), m2.rest = u;
|
|
547
|
-
},
|
|
579
|
+
}, ve;
|
|
548
580
|
}
|
|
549
|
-
var
|
|
581
|
+
var ke, xe = {};
|
|
550
582
|
function requireUtil() {
|
|
551
|
-
return
|
|
583
|
+
return ke || (ke = 1, (function(e) {
|
|
552
584
|
e.getArg = function getArg(e2, a2, u2) {
|
|
553
585
|
if (a2 in e2) return e2[a2];
|
|
554
586
|
if (3 === arguments.length) return u2;
|
|
@@ -660,12 +692,12 @@ function requireUtil() {
|
|
|
660
692
|
}
|
|
661
693
|
return m2(a2);
|
|
662
694
|
};
|
|
663
|
-
})(
|
|
695
|
+
})(xe)), xe;
|
|
664
696
|
}
|
|
665
|
-
var
|
|
697
|
+
var Me, Ie = {};
|
|
666
698
|
function requireArraySet() {
|
|
667
|
-
if (
|
|
668
|
-
|
|
699
|
+
if (Me) return Ie;
|
|
700
|
+
Me = 1;
|
|
669
701
|
var e = requireUtil(), a = Object.prototype.hasOwnProperty, u = "undefined" != typeof Map;
|
|
670
702
|
function ArraySet() {
|
|
671
703
|
this._array = [], this._set = u ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -696,12 +728,12 @@ function requireArraySet() {
|
|
|
696
728
|
throw new Error("No element indexed by " + e2);
|
|
697
729
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
698
730
|
return this._array.slice();
|
|
699
|
-
},
|
|
731
|
+
}, Ie.ArraySet = ArraySet, Ie;
|
|
700
732
|
}
|
|
701
|
-
var
|
|
733
|
+
var Oe, Ee, Le = {};
|
|
702
734
|
function requireMappingList() {
|
|
703
|
-
if (
|
|
704
|
-
|
|
735
|
+
if (Oe) return Le;
|
|
736
|
+
Oe = 1;
|
|
705
737
|
var e = requireUtil();
|
|
706
738
|
function MappingList() {
|
|
707
739
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -715,11 +747,11 @@ function requireMappingList() {
|
|
|
715
747
|
})(this._last, a) ? (this._sorted = false, this._array.push(a)) : (this._last = a, this._array.push(a));
|
|
716
748
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
717
749
|
return this._sorted || (this._array.sort(e.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
718
|
-
},
|
|
750
|
+
}, Le.MappingList = MappingList, Le;
|
|
719
751
|
}
|
|
720
752
|
function requireSourceMapGenerator() {
|
|
721
|
-
if (
|
|
722
|
-
|
|
753
|
+
if (Ee) return be;
|
|
754
|
+
Ee = 1;
|
|
723
755
|
var e = requireBase64Vlq(), a = requireUtil(), u = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
724
756
|
function SourceMapGenerator(e2) {
|
|
725
757
|
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;
|
|
@@ -796,11 +828,11 @@ function requireSourceMapGenerator() {
|
|
|
796
828
|
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;
|
|
797
829
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
798
830
|
return JSON.stringify(this.toJSON());
|
|
799
|
-
},
|
|
831
|
+
}, be.SourceMapGenerator = SourceMapGenerator, be;
|
|
800
832
|
}
|
|
801
|
-
var
|
|
833
|
+
var Ae, Te = {}, De = {};
|
|
802
834
|
function requireBinarySearch() {
|
|
803
|
-
return
|
|
835
|
+
return Ae || (Ae = 1, (function(e) {
|
|
804
836
|
function recursiveSearch(a, u, m2, w2, b2, C2) {
|
|
805
837
|
var x2 = Math.floor((u - a) / 2) + a, I2 = b2(m2, w2[x2], true);
|
|
806
838
|
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;
|
|
@@ -812,11 +844,11 @@ function requireBinarySearch() {
|
|
|
812
844
|
for (; b2 - 1 >= 0 && 0 === m2(u[b2], u[b2 - 1], true); ) --b2;
|
|
813
845
|
return b2;
|
|
814
846
|
};
|
|
815
|
-
})(
|
|
847
|
+
})(De)), De;
|
|
816
848
|
}
|
|
817
|
-
var
|
|
849
|
+
var Ue, Be, je = {};
|
|
818
850
|
function requireQuickSort() {
|
|
819
|
-
if (
|
|
851
|
+
if (Ue) return je;
|
|
820
852
|
function SortTemplate(e2) {
|
|
821
853
|
function swap(e3, a, u) {
|
|
822
854
|
var m2 = e3[a];
|
|
@@ -835,21 +867,21 @@ function requireQuickSort() {
|
|
|
835
867
|
}
|
|
836
868
|
};
|
|
837
869
|
}
|
|
838
|
-
|
|
870
|
+
Ue = 1;
|
|
839
871
|
let e = /* @__PURE__ */ new WeakMap();
|
|
840
|
-
return
|
|
872
|
+
return je.quickSort = function(a, u, m2 = 0) {
|
|
841
873
|
let w2 = e.get(u);
|
|
842
874
|
void 0 === w2 && (w2 = (function cloneSort(e2) {
|
|
843
875
|
let a2 = SortTemplate.toString();
|
|
844
876
|
return new Function(`return ${a2}`)()(e2);
|
|
845
877
|
})(u), e.set(u, w2)), w2(a, u, m2, a.length - 1);
|
|
846
|
-
},
|
|
878
|
+
}, je;
|
|
847
879
|
}
|
|
848
|
-
var
|
|
849
|
-
var
|
|
850
|
-
return
|
|
851
|
-
if (
|
|
852
|
-
|
|
880
|
+
var Ge, Ve, qe = {};
|
|
881
|
+
var He = (function requireSourceMap() {
|
|
882
|
+
return Ve || (Ve = 1, we.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, we.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
883
|
+
if (Be) return Te;
|
|
884
|
+
Be = 1;
|
|
853
885
|
var e = requireUtil(), a = requireBinarySearch(), u = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
854
886
|
function SourceMapConsumer(a2, u2) {
|
|
855
887
|
var m3 = a2;
|
|
@@ -906,7 +938,7 @@ var Ge = (function requireSourceMap() {
|
|
|
906
938
|
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];
|
|
907
939
|
}
|
|
908
940
|
return b3;
|
|
909
|
-
},
|
|
941
|
+
}, Te.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
|
|
910
942
|
var u2, m3 = a2;
|
|
911
943
|
if (null != this.sourceRoot && (m3 = e.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
912
944
|
for (u2 = 0; u2 < this._absoluteSources.length; ++u2) if (this._absoluteSources[u2] == a2) return u2;
|
|
@@ -1023,7 +1055,7 @@ var Ge = (function requireSourceMap() {
|
|
|
1023
1055
|
if (b3.source === m3.source) return { line: e.getArg(b3, "generatedLine", null), column: e.getArg(b3, "generatedColumn", null), lastColumn: e.getArg(b3, "lastGeneratedColumn", null) };
|
|
1024
1056
|
}
|
|
1025
1057
|
return { line: null, column: null, lastColumn: null };
|
|
1026
|
-
},
|
|
1058
|
+
}, Te.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
1027
1059
|
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]);
|
|
1028
1060
|
return e2;
|
|
1029
1061
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u2) {
|
|
@@ -1062,10 +1094,10 @@ var Ge = (function requireSourceMap() {
|
|
|
1062
1094
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1063
1095
|
}
|
|
1064
1096
|
w2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e.compareByOriginalPositions);
|
|
1065
|
-
},
|
|
1066
|
-
})().SourceMapConsumer,
|
|
1067
|
-
if (
|
|
1068
|
-
|
|
1097
|
+
}, Te.IndexedSourceMapConsumer = IndexedSourceMapConsumer, Te;
|
|
1098
|
+
})().SourceMapConsumer, we.SourceNode = (function requireSourceNode() {
|
|
1099
|
+
if (Ge) return qe;
|
|
1100
|
+
Ge = 1;
|
|
1069
1101
|
var e = requireSourceMapGenerator().SourceMapGenerator, a = requireUtil(), u = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1070
1102
|
function SourceNode(e2, a2, u2, w2, b2) {
|
|
1071
1103
|
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);
|
|
@@ -1149,20 +1181,20 @@ var Ge = (function requireSourceMap() {
|
|
|
1149
1181
|
}), this.walkSourceContents(function(e2, a3) {
|
|
1150
1182
|
m3.setSourceContent(e2, a3);
|
|
1151
1183
|
}), { code: u2.code, map: m3 };
|
|
1152
|
-
},
|
|
1153
|
-
})().SourceNode),
|
|
1184
|
+
}, qe.SourceNode = SourceNode, qe;
|
|
1185
|
+
})().SourceNode), we;
|
|
1154
1186
|
})();
|
|
1155
|
-
const
|
|
1187
|
+
const Je = /* @__PURE__ */ new Map(), Ye = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1156
1188
|
async function getConsumerFor(e, a) {
|
|
1157
1189
|
const u = (e || `/assets/${a}`).split("?")[0], m2 = [`${u}.map`, u.replace(/\.js$/, ".js.map"), `/assets/${a}.map`];
|
|
1158
1190
|
for (const e2 of m2) try {
|
|
1159
|
-
if (
|
|
1191
|
+
if (Je.has(e2)) return Je.get(e2);
|
|
1160
1192
|
const a2 = await fetch(e2);
|
|
1161
1193
|
if (!a2.ok) continue;
|
|
1162
1194
|
const u2 = await a2.json();
|
|
1163
1195
|
if (!u2 || !u2.mappings || !u2.sources) continue;
|
|
1164
|
-
const m3 = await new
|
|
1165
|
-
return
|
|
1196
|
+
const m3 = await new He.SourceMapConsumer(u2);
|
|
1197
|
+
return Je.set(e2, m3), m3;
|
|
1166
1198
|
} catch {
|
|
1167
1199
|
}
|
|
1168
1200
|
return null;
|
|
@@ -1174,7 +1206,7 @@ async function captureError(e, a = false) {
|
|
|
1174
1206
|
if (!e2) return ["No stack trace available"];
|
|
1175
1207
|
const a2 = Array.isArray(e2) ? e2 : e2.split("\n"), u2 = [];
|
|
1176
1208
|
for (const e3 of a2) {
|
|
1177
|
-
const a3 = e3.match(
|
|
1209
|
+
const a3 = e3.match(Ye);
|
|
1178
1210
|
if (!a3) {
|
|
1179
1211
|
u2.push(e3);
|
|
1180
1212
|
continue;
|
|
@@ -1189,8 +1221,8 @@ async function captureError(e, a = false) {
|
|
|
1189
1221
|
u2.push(`${e3} [No source map found for ${w3}]`);
|
|
1190
1222
|
continue;
|
|
1191
1223
|
}
|
|
1192
|
-
let O2 = _2.originalPositionFor({ line: x2, column: I2, bias:
|
|
1193
|
-
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x2, column: Math.max(0, I2 - e4), bias:
|
|
1224
|
+
let O2 = _2.originalPositionFor({ line: x2, column: I2, bias: He.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1225
|
+
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x2, column: Math.max(0, I2 - e4), bias: He.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e4++) ;
|
|
1194
1226
|
if (O2.source && null != O2.line) {
|
|
1195
1227
|
const e4 = O2.name || "anonymous";
|
|
1196
1228
|
u2.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e4})`);
|
|
@@ -1200,11 +1232,11 @@ async function captureError(e, a = false) {
|
|
|
1200
1232
|
})(m2), b2 = w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom"));
|
|
1201
1233
|
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" } } } });
|
|
1202
1234
|
}
|
|
1203
|
-
const
|
|
1204
|
-
const
|
|
1235
|
+
const Xe = readDebugFlag();
|
|
1236
|
+
const Qe = readDebugFlag();
|
|
1205
1237
|
function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1206
1238
|
const C2 = `${u.backendApi}/graphql/?apiKey=${u.apiKey}`;
|
|
1207
|
-
return
|
|
1239
|
+
return Qe && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
|
|
1208
1240
|
let b3 = 0;
|
|
1209
1241
|
const attemptRequest = async () => {
|
|
1210
1242
|
try {
|
|
@@ -1212,12 +1244,12 @@ function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
|
1212
1244
|
} catch (e3) {
|
|
1213
1245
|
if (b3++, b3 > u2) throw e3;
|
|
1214
1246
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1215
|
-
return
|
|
1247
|
+
return Xe && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
|
|
1216
1248
|
}
|
|
1217
1249
|
};
|
|
1218
1250
|
return attemptRequest();
|
|
1219
1251
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e, query: a, variables: u }) }).then((e2) => {
|
|
1220
|
-
if (
|
|
1252
|
+
if (Qe && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
|
|
1221
1253
|
return e2.json();
|
|
1222
1254
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1223
1255
|
}
|
|
@@ -1233,9 +1265,9 @@ function sendDomainsToNotPropagateHeaderTo(e, a, u) {
|
|
|
1233
1265
|
function createTriageFromRecorder(e, a, u, m2, w2, b2) {
|
|
1234
1266
|
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 });
|
|
1235
1267
|
}
|
|
1236
|
-
const
|
|
1268
|
+
const et = { 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 } }, nt = { shortcuts: { ...et }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1237
1269
|
} };
|
|
1238
|
-
let
|
|
1270
|
+
let ot = null, st = { mode: "lookback", description: "" }, it = null, at = null, lt = null, ct = false;
|
|
1239
1271
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1240
1272
|
return (function isMacPlatform() {
|
|
1241
1273
|
const e = navigator.userAgentData;
|
|
@@ -1248,11 +1280,11 @@ function getShortcutLabelFromContext(e) {
|
|
|
1248
1280
|
return e2.requireCmdCtrl && a.push(getShortcutKeyCmdCtrlLabel()), a.push((function formatShortcutKeyLabel(e3) {
|
|
1249
1281
|
return ({ escape: "esc" }[e3.toLowerCase()] || e3).toUpperCase();
|
|
1250
1282
|
})(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 ? " + " : "");
|
|
1251
|
-
})(
|
|
1283
|
+
})(nt.shortcuts[e]);
|
|
1252
1284
|
}
|
|
1253
1285
|
function setupIssueReporting(e) {
|
|
1254
|
-
|
|
1255
|
-
const a2 = { ...
|
|
1286
|
+
nt.apiKey = e.apiKey, nt.backendApi = e.backendApi, nt.resolveSessionId = e.getSessionId, e.customBaseUrl && (nt.triageBaseUrl = e.customBaseUrl), nt.shortcuts = (function mergeShortcutsConfig(e2) {
|
|
1287
|
+
const a2 = { ...et };
|
|
1256
1288
|
if (!e2) return a2;
|
|
1257
1289
|
"boolean" == typeof e2.enabled && (a2.enabled = e2.enabled);
|
|
1258
1290
|
const u = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1262,7 +1294,7 @@ function setupIssueReporting(e) {
|
|
|
1262
1294
|
}
|
|
1263
1295
|
return a2;
|
|
1264
1296
|
})(e.shortcuts);
|
|
1265
|
-
const { shortcuts: a } =
|
|
1297
|
+
const { shortcuts: a } = nt;
|
|
1266
1298
|
window.addEventListener("keydown", (e2) => {
|
|
1267
1299
|
const u = (function isTypingInInput() {
|
|
1268
1300
|
const e3 = document.activeElement;
|
|
@@ -1272,20 +1304,20 @@ function setupIssueReporting(e) {
|
|
|
1272
1304
|
} : injectModalHTML;
|
|
1273
1305
|
if (C2 && shortcutUsed("openModalExistingMode")) return e2.preventDefault(), void x2("lookback");
|
|
1274
1306
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e2.preventDefault(), void x2("startnow");
|
|
1275
|
-
if (b2 && !
|
|
1307
|
+
if (b2 && !ct && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
|
|
1276
1308
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1277
1309
|
const a2 = document.getElementById("sf-issue-submit-btn");
|
|
1278
1310
|
return void (a2 && !a2.disabled && (e2.preventDefault(), a2.click()));
|
|
1279
1311
|
}
|
|
1280
|
-
if (
|
|
1281
|
-
if (b2 && "startnow" ===
|
|
1312
|
+
if (ct && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
|
|
1313
|
+
if (b2 && "startnow" === st.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
|
|
1282
1314
|
const a2 = document.getElementById("sf-start-recording-btn");
|
|
1283
1315
|
return void (a2 && (e2.preventDefault(), a2.click()));
|
|
1284
1316
|
}
|
|
1285
1317
|
});
|
|
1286
1318
|
}
|
|
1287
1319
|
function closeModal() {
|
|
1288
|
-
|
|
1320
|
+
nt.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (ot == null ? void 0 : ot.parentNode) && ot.parentNode.removeChild(ot), ot = null, ct || (st = { mode: "lookback", description: "", occurredInThisTab: true }, it = null, at = null), lt && clearInterval(lt);
|
|
1289
1321
|
}
|
|
1290
1322
|
function activateModalIsolation(e) {
|
|
1291
1323
|
e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
|
|
@@ -1344,9 +1376,9 @@ function activateModalIsolation(e) {
|
|
|
1344
1376
|
};
|
|
1345
1377
|
}
|
|
1346
1378
|
function injectModalHTML(e = "lookback") {
|
|
1347
|
-
|
|
1379
|
+
ot && (ot.remove(), ot = null), ot = document.createElement("div"), ot.id = "sf-report-issue-modal";
|
|
1348
1380
|
const a = "startnow" === e;
|
|
1349
|
-
|
|
1381
|
+
ot.innerHTML = `
|
|
1350
1382
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1351
1383
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1352
1384
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1394,7 +1426,7 @@ function injectModalHTML(e = "lookback") {
|
|
|
1394
1426
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1395
1427
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1396
1428
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1397
|
-
resize:none; outline:none;">${
|
|
1429
|
+
resize:none; outline:none;">${st.description}</textarea>
|
|
1398
1430
|
|
|
1399
1431
|
<div id="sf-lookback-container" style="display:${a ? "none" : "block"}; margin-bottom:20px;">
|
|
1400
1432
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1482,8 +1514,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1482
1514
|
<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>
|
|
1483
1515
|
</div>
|
|
1484
1516
|
</div>
|
|
1485
|
-
`,
|
|
1486
|
-
const e2 =
|
|
1517
|
+
`, st.mode = e, document.body.appendChild(ot), (function bindListeners() {
|
|
1518
|
+
const e2 = ot == null ? void 0 : ot.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
1519
|
e2 == null ? void 0 : e2.forEach((e3) => {
|
|
1488
1520
|
e3.addEventListener("click", (e4) => {
|
|
1489
1521
|
const a3 = e4.currentTarget.dataset.mode;
|
|
@@ -1491,11 +1523,11 @@ function injectModalHTML(e = "lookback") {
|
|
|
1491
1523
|
});
|
|
1492
1524
|
}), u && (u.onclick = closeModal);
|
|
1493
1525
|
w2 && w2.addEventListener("change", () => {
|
|
1494
|
-
"lookback" ===
|
|
1526
|
+
"lookback" === st.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1495
1527
|
});
|
|
1496
1528
|
a2 && (a2.onclick = () => {
|
|
1497
1529
|
const e3 = document.getElementById("sf-issue-description");
|
|
1498
|
-
e3 && (
|
|
1530
|
+
e3 && (st.description = e3.value), (function startCountdownThenRecord() {
|
|
1499
1531
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1500
1532
|
const e4 = document.createElement("div");
|
|
1501
1533
|
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 ";
|
|
@@ -1504,9 +1536,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1504
1536
|
const u2 = setInterval(async () => {
|
|
1505
1537
|
if (a3--, a3 > 0) e4.textContent = a3.toString();
|
|
1506
1538
|
else {
|
|
1507
|
-
clearInterval(u2), document.body.removeChild(e4),
|
|
1539
|
+
clearInterval(u2), document.body.removeChild(e4), it = Date.now(), ct = true;
|
|
1508
1540
|
try {
|
|
1509
|
-
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() =>
|
|
1541
|
+
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => me);
|
|
1510
1542
|
e5();
|
|
1511
1543
|
} catch (e5) {
|
|
1512
1544
|
console.error("[Report Issue] Failed to enable function span tracking:", e5);
|
|
@@ -1532,8 +1564,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1532
1564
|
`, e5.addEventListener("click", () => stopRecording()), document.body.appendChild(e5);
|
|
1533
1565
|
const a4 = e5.querySelector("#sf-recording-timer");
|
|
1534
1566
|
if (!a4) return;
|
|
1535
|
-
|
|
1536
|
-
const e6 = Date.now() - (
|
|
1567
|
+
lt = setInterval(() => {
|
|
1568
|
+
const e6 = Date.now() - (it ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1537
1569
|
a4.textContent = `${u3}:${m3}`;
|
|
1538
1570
|
}, 1e3);
|
|
1539
1571
|
})();
|
|
@@ -1541,12 +1573,12 @@ function injectModalHTML(e = "lookback") {
|
|
|
1541
1573
|
}, 1e3);
|
|
1542
1574
|
})();
|
|
1543
1575
|
});
|
|
1544
|
-
|
|
1576
|
+
ot == null ? void 0 : ot.addEventListener("click", (e3) => {
|
|
1545
1577
|
var _a2;
|
|
1546
1578
|
if (e3.target.closest("#sf-issue-submit-btn")) {
|
|
1547
|
-
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 =
|
|
1579
|
+
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = st.mode;
|
|
1548
1580
|
let u2, m3;
|
|
1549
|
-
if (
|
|
1581
|
+
if (st.description = e4, "startnow" === a3) u2 = it ?? Date.now() - 3e5, m3 = at ?? Date.now();
|
|
1550
1582
|
else {
|
|
1551
1583
|
const e5 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1552
1584
|
m3 = Date.now(), u2 = m3 - e5;
|
|
@@ -1555,9 +1587,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1555
1587
|
var _a3, _b;
|
|
1556
1588
|
try {
|
|
1557
1589
|
showTriageStatusModal(true);
|
|
1558
|
-
const m4 = await createTriageFromRecorder(
|
|
1559
|
-
if (!
|
|
1560
|
-
return
|
|
1590
|
+
const m4 = await createTriageFromRecorder(nt.apiKey, nt.backendApi, (function getSessionIdSafely() {
|
|
1591
|
+
if (!nt.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1592
|
+
return nt.resolveSessionId();
|
|
1561
1593
|
})(), e5, a4, u3), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1562
1594
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1563
1595
|
} catch (e6) {
|
|
@@ -1566,29 +1598,29 @@ function injectModalHTML(e = "lookback") {
|
|
|
1566
1598
|
})(`${u2}`, `${m3}`, e4);
|
|
1567
1599
|
}
|
|
1568
1600
|
});
|
|
1569
|
-
})(),
|
|
1601
|
+
})(), nt.deactivateIsolation = activateModalIsolation(ot);
|
|
1570
1602
|
}
|
|
1571
1603
|
function setActiveTab(e) {
|
|
1572
|
-
|
|
1573
|
-
const a =
|
|
1604
|
+
st.mode = e;
|
|
1605
|
+
const a = ot == null ? void 0 : ot.querySelector("#sf-tab-lookback"), u = ot == null ? void 0 : ot.querySelector("#sf-tab-startnow");
|
|
1574
1606
|
"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");
|
|
1575
1607
|
}
|
|
1576
1608
|
function updateModeSpecificUI(e) {
|
|
1577
1609
|
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");
|
|
1578
1610
|
if (a && u && m2 && w2 && b2 && C2 && x2) if ("startnow" === e) {
|
|
1579
1611
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
|
|
1580
|
-
const e2 = null !==
|
|
1581
|
-
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed",
|
|
1582
|
-
const e3 = Math.floor((
|
|
1612
|
+
const e2 = null !== it && null !== at;
|
|
1613
|
+
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", it && at) {
|
|
1614
|
+
const e3 = Math.floor((at - it) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
|
|
1583
1615
|
w2.style.display = "block", b2.textContent = `${a2}:${u2}`;
|
|
1584
1616
|
} else w2.style.display = "none";
|
|
1585
1617
|
} 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";
|
|
1586
1618
|
}
|
|
1587
1619
|
async function stopRecording() {
|
|
1588
1620
|
var _a2;
|
|
1589
|
-
|
|
1621
|
+
at = Date.now(), ct = false, lt && clearInterval(lt), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1590
1622
|
try {
|
|
1591
|
-
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() =>
|
|
1623
|
+
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => me);
|
|
1592
1624
|
e();
|
|
1593
1625
|
} catch (e) {
|
|
1594
1626
|
console.error("[Report Issue] Failed to disable function span tracking:", e);
|
|
@@ -1601,17 +1633,17 @@ async function stopRecording() {
|
|
|
1601
1633
|
a2 && (a2.textContent = "Re-record");
|
|
1602
1634
|
}
|
|
1603
1635
|
const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
|
|
1604
|
-
if (a && u &&
|
|
1605
|
-
const e2 = Math.floor((
|
|
1636
|
+
if (a && u && it && at) {
|
|
1637
|
+
const e2 = Math.floor((at - it) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
|
|
1606
1638
|
u.textContent = `${m3}:${w3}`, a.style.display = "block";
|
|
1607
1639
|
}
|
|
1608
1640
|
const m2 = document.getElementById("sf-issue-description");
|
|
1609
|
-
m2 && (m2.value =
|
|
1641
|
+
m2 && (m2.value = st.description);
|
|
1610
1642
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1611
1643
|
w2 && (w2.checked = true);
|
|
1612
1644
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1613
1645
|
if (b2 && C2) {
|
|
1614
|
-
const e2 = Math.floor(((
|
|
1646
|
+
const e2 = Math.floor(((at ?? 0) - (it ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
|
|
1615
1647
|
C2.textContent = `${a2}:${u2}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1616
1648
|
}
|
|
1617
1649
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1624,7 +1656,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1624
1656
|
var _a3, _b;
|
|
1625
1657
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1626
1658
|
})();
|
|
1627
|
-
const u = a ? `${
|
|
1659
|
+
const u = a ? `${nt.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1628
1660
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1629
1661
|
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>';
|
|
1630
1662
|
m2.innerHTML = `
|
|
@@ -1686,7 +1718,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1686
1718
|
function fadeCardAndRemove(e, a, u = 300) {
|
|
1687
1719
|
a.style.opacity = "0", a.addEventListener("transitionend", () => e.remove(), { once: true }), setTimeout(() => e.remove(), u + 100);
|
|
1688
1720
|
}
|
|
1689
|
-
var
|
|
1721
|
+
var ut = Object.defineProperty, b$1 = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? ut(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), pt = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? pt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), dt = ((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))(dt || {});
|
|
1690
1722
|
function vr(e) {
|
|
1691
1723
|
return e.nodeType === e.ELEMENT_NODE;
|
|
1692
1724
|
}
|
|
@@ -1728,7 +1760,7 @@ function kr(e) {
|
|
|
1728
1760
|
})(e.cssText);
|
|
1729
1761
|
return a || e.cssText;
|
|
1730
1762
|
}
|
|
1731
|
-
let
|
|
1763
|
+
let ht = class {
|
|
1732
1764
|
constructor() {
|
|
1733
1765
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1734
1766
|
}
|
|
@@ -1780,7 +1812,7 @@ function Zt({ element: e, maskInputOptions: a, tagName: u, type: m2, value: w2,
|
|
|
1780
1812
|
function fe(e) {
|
|
1781
1813
|
return e.toLowerCase();
|
|
1782
1814
|
}
|
|
1783
|
-
const
|
|
1815
|
+
const gt = "__rrweb_original__";
|
|
1784
1816
|
function Yt(e) {
|
|
1785
1817
|
const a = e.type;
|
|
1786
1818
|
return e.hasAttribute("data-rr-is-password") ? "password" : a ? fe(a) : null;
|
|
@@ -1795,19 +1827,19 @@ function xr(e, a) {
|
|
|
1795
1827
|
const m2 = u.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1796
1828
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1797
1829
|
}
|
|
1798
|
-
let
|
|
1799
|
-
const
|
|
1830
|
+
let yt = 1;
|
|
1831
|
+
const wt = new RegExp("[^a-z0-9-_:]");
|
|
1800
1832
|
function Ir() {
|
|
1801
|
-
return
|
|
1833
|
+
return yt++;
|
|
1802
1834
|
}
|
|
1803
|
-
let
|
|
1804
|
-
const
|
|
1835
|
+
let St, bt;
|
|
1836
|
+
const vt = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, Ct = /^(?:[a-z+]+:)?\/\//i, kt = /^www\..*/i, xt = /^(data:)([^,]*),(.*)/i;
|
|
1805
1837
|
function Pt(e, a) {
|
|
1806
|
-
return (e || "").replace(
|
|
1838
|
+
return (e || "").replace(vt, (e2, u, m2, w2, b2, C2) => {
|
|
1807
1839
|
const x2 = m2 || b2 || C2, I2 = u || w2 || "";
|
|
1808
1840
|
if (!x2) return e2;
|
|
1809
|
-
if (
|
|
1810
|
-
if (
|
|
1841
|
+
if (Ct.test(x2) || kt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1842
|
+
if (xt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1811
1843
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e3) {
|
|
1812
1844
|
let a2 = "";
|
|
1813
1845
|
return a2 = e3.indexOf("//") > -1 ? e3.split("/").slice(0, 3).join("/") : e3.split("/")[0], a2 = a2.split("?")[0], a2;
|
|
@@ -1818,8 +1850,8 @@ function Pt(e, a) {
|
|
|
1818
1850
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1819
1851
|
});
|
|
1820
1852
|
}
|
|
1821
|
-
const
|
|
1822
|
-
const
|
|
1853
|
+
const Mt = /^[^ \t\n\r\u000c]+/, It = /^[, \t\n\r\u000c]+/;
|
|
1854
|
+
const Et = /* @__PURE__ */ new WeakMap();
|
|
1823
1855
|
function At(e, a) {
|
|
1824
1856
|
return a && "" !== a.trim() ? $t(e, a) : a;
|
|
1825
1857
|
}
|
|
@@ -1827,8 +1859,8 @@ function Fi(e) {
|
|
|
1827
1859
|
return !("svg" !== e.tagName && !e.ownerSVGElement);
|
|
1828
1860
|
}
|
|
1829
1861
|
function $t(e, a) {
|
|
1830
|
-
let u =
|
|
1831
|
-
if (u || (u = e.createElement("a"),
|
|
1862
|
+
let u = Et.get(e);
|
|
1863
|
+
if (u || (u = e.createElement("a"), Et.set(e, u)), a) {
|
|
1832
1864
|
if (a.startsWith("blob:") || a.startsWith("data:")) return a;
|
|
1833
1865
|
} else a = "";
|
|
1834
1866
|
return u.setAttribute("href", a), u.href;
|
|
@@ -1843,8 +1875,8 @@ function Mr(e, a, u, m2) {
|
|
|
1843
1875
|
return w2 ? (m4 = w2[0], u2 += m4.length, m4) : "";
|
|
1844
1876
|
}
|
|
1845
1877
|
const m3 = [];
|
|
1846
|
-
for (; n(
|
|
1847
|
-
let w2 = n(
|
|
1878
|
+
for (; n(It), !(u2 >= a2.length); ) {
|
|
1879
|
+
let w2 = n(Mt);
|
|
1848
1880
|
if ("," === w2.slice(-1)) w2 = At(e2, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1849
1881
|
else {
|
|
1850
1882
|
let b2 = "";
|
|
@@ -1914,9 +1946,9 @@ function zi(e, a) {
|
|
|
1914
1946
|
})(u, m2);
|
|
1915
1947
|
switch (e.nodeType) {
|
|
1916
1948
|
case e.DOCUMENT_NODE:
|
|
1917
|
-
return "CSS1Compat" !== e.compatMode ? { type:
|
|
1949
|
+
return "CSS1Compat" !== e.compatMode ? { type: dt.Document, childNodes: [], compatMode: e.compatMode } : { type: dt.Document, childNodes: [] };
|
|
1918
1950
|
case e.DOCUMENT_TYPE_NODE:
|
|
1919
|
-
return { type:
|
|
1951
|
+
return { type: dt.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: $2 };
|
|
1920
1952
|
case e.ELEMENT_NODE:
|
|
1921
1953
|
return (function Vi(e2, a2) {
|
|
1922
1954
|
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) {
|
|
@@ -1934,7 +1966,7 @@ function zi(e, a) {
|
|
|
1934
1966
|
})(e2, m3, w3), B3 = (function Oi(e3) {
|
|
1935
1967
|
if (e3 instanceof HTMLFormElement) return "form";
|
|
1936
1968
|
const a3 = fe(e3.tagName);
|
|
1937
|
-
return
|
|
1969
|
+
return wt.test(a3) ? "div" : a3;
|
|
1938
1970
|
})(e2);
|
|
1939
1971
|
let $3 = {};
|
|
1940
1972
|
const z2 = e2.attributes.length;
|
|
@@ -1963,7 +1995,7 @@ function zi(e, a) {
|
|
|
1963
1995
|
const a3 = e3.getContext("2d");
|
|
1964
1996
|
if (!a3) return true;
|
|
1965
1997
|
for (let u3 = 0; u3 < e3.width; u3 += 50) for (let m4 = 0; m4 < e3.height; m4 += 50) {
|
|
1966
|
-
const w4 = a3.getImageData, b4 =
|
|
1998
|
+
const w4 = a3.getImageData, b4 = gt in w4 ? w4[gt] : w4;
|
|
1967
1999
|
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;
|
|
1968
2000
|
}
|
|
1969
2001
|
return true;
|
|
@@ -1975,11 +2007,11 @@ function zi(e, a) {
|
|
|
1975
2007
|
}
|
|
1976
2008
|
}
|
|
1977
2009
|
if ("img" === B3 && _3) {
|
|
1978
|
-
|
|
2010
|
+
St || (St = u2.createElement("canvas"), bt = St.getContext("2d"));
|
|
1979
2011
|
const a3 = e2, m4 = a3.currentSrc || a3.getAttribute("src") || "<unknown-src>", w4 = a3.crossOrigin, A = () => {
|
|
1980
2012
|
a3.removeEventListener("load", A);
|
|
1981
2013
|
try {
|
|
1982
|
-
|
|
2014
|
+
St.width = a3.naturalWidth, St.height = a3.naturalHeight, bt.drawImage(a3, 0, 0), $3.rr_dataURL = St.toDataURL(I3.type, I3.quality);
|
|
1983
2015
|
} catch (e3) {
|
|
1984
2016
|
if ("anonymous" !== a3.crossOrigin) return a3.crossOrigin = "anonymous", void (a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A));
|
|
1985
2017
|
console.warn(`Cannot inline img src=${m4}! Error: ${e3}`);
|
|
@@ -2002,7 +2034,7 @@ function zi(e, a) {
|
|
|
2002
2034
|
customElements.get(B3) && (j2 = true);
|
|
2003
2035
|
} catch {
|
|
2004
2036
|
}
|
|
2005
|
-
return { type:
|
|
2037
|
+
return { type: dt.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
2006
2038
|
})(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 });
|
|
2007
2039
|
case e.TEXT_NODE:
|
|
2008
2040
|
return (function ji(e2, a2) {
|
|
@@ -2018,12 +2050,12 @@ function zi(e, a) {
|
|
|
2018
2050
|
}
|
|
2019
2051
|
x3 = Pt(x3, $t(a2.doc));
|
|
2020
2052
|
}
|
|
2021
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2053
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: dt.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
2022
2054
|
})(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
2023
2055
|
case e.CDATA_SECTION_NODE:
|
|
2024
|
-
return { type:
|
|
2056
|
+
return { type: dt.CDATA, textContent: "", rootId: $2 };
|
|
2025
2057
|
case e.COMMENT_NODE:
|
|
2026
|
-
return { type:
|
|
2058
|
+
return { type: dt.Comment, textContent: e.textContent || "", rootId: $2 };
|
|
2027
2059
|
default:
|
|
2028
2060
|
return false;
|
|
2029
2061
|
}
|
|
@@ -2039,21 +2071,21 @@ function Se(e, a) {
|
|
|
2039
2071
|
if (!ee2) return console.warn(e, "not serialized"), null;
|
|
2040
2072
|
let te2;
|
|
2041
2073
|
te2 = m2.hasNode(e) ? m2.getId(e) : (function Gi(e2, a2) {
|
|
2042
|
-
return !!(a2.comment && e2.type ===
|
|
2043
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2074
|
+
return !!(a2.comment && e2.type === dt.Comment || e2.type === dt.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)))));
|
|
2075
|
+
})(ee2, F2) || !Q2 && ee2.type === dt.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
2044
2076
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
2045
2077
|
if (m2.add(e, ne2), -2 === te2) return null;
|
|
2046
2078
|
z2 && z2(e);
|
|
2047
2079
|
let re2 = !I2;
|
|
2048
|
-
if (ne2.type ===
|
|
2080
|
+
if (ne2.type === dt.Element) {
|
|
2049
2081
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
2050
2082
|
const a2 = e.shadowRoot;
|
|
2051
2083
|
a2 && ze(a2) && (ne2.isShadowHost = true);
|
|
2052
2084
|
}
|
|
2053
|
-
if ((ne2.type ===
|
|
2054
|
-
F2.headWhitespace && ne2.type ===
|
|
2085
|
+
if ((ne2.type === dt.Document || ne2.type === dt.Element) && re2) {
|
|
2086
|
+
F2.headWhitespace && ne2.type === dt.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2055
2087
|
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 };
|
|
2056
|
-
if (ne2.type !==
|
|
2088
|
+
if (ne2.type !== dt.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
|
|
2057
2089
|
const e2 = Se(u2, a2);
|
|
2058
2090
|
e2 && ne2.childNodes.push(e2);
|
|
2059
2091
|
}
|
|
@@ -2062,7 +2094,7 @@ function Se(e, a) {
|
|
|
2062
2094
|
m3 && (ze(e.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
2063
2095
|
}
|
|
2064
2096
|
}
|
|
2065
|
-
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2097
|
+
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === dt.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
|
|
2066
2098
|
const m3 = e2.contentWindow;
|
|
2067
2099
|
if (!m3) return;
|
|
2068
2100
|
let w3, b3 = false;
|
|
@@ -2088,7 +2120,7 @@ function Se(e, a) {
|
|
|
2088
2120
|
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 });
|
|
2089
2121
|
u2 && j2(e, u2);
|
|
2090
2122
|
}
|
|
2091
|
-
}, V2), ne2.type ===
|
|
2123
|
+
}, V2), ne2.type === dt.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) {
|
|
2092
2124
|
let m3, w3 = false;
|
|
2093
2125
|
try {
|
|
2094
2126
|
m3 = e2.sheet;
|
|
@@ -2128,13 +2160,13 @@ function $i(e) {
|
|
|
2128
2160
|
} });
|
|
2129
2161
|
}), u;
|
|
2130
2162
|
}
|
|
2131
|
-
var
|
|
2132
|
-
return { isColorSupported: false, reset:
|
|
2163
|
+
var Lt = { exports: {} }, Rt = String, Rr = function() {
|
|
2164
|
+
return { isColorSupported: false, reset: Rt, bold: Rt, dim: Rt, italic: Rt, underline: Rt, inverse: Rt, hidden: Rt, strikethrough: Rt, black: Rt, red: Rt, green: Rt, yellow: Rt, blue: Rt, magenta: Rt, cyan: Rt, white: Rt, gray: Rt, bgBlack: Rt, bgRed: Rt, bgGreen: Rt, bgYellow: Rt, bgBlue: Rt, bgMagenta: Rt, bgCyan: Rt, bgWhite: Rt, blackBright: Rt, redBright: Rt, greenBright: Rt, yellowBright: Rt, blueBright: Rt, magentaBright: Rt, cyanBright: Rt, whiteBright: Rt, bgBlackBright: Rt, bgRedBright: Rt, bgGreenBright: Rt, bgYellowBright: Rt, bgBlueBright: Rt, bgMagentaBright: Rt, bgCyanBright: Rt, bgWhiteBright: Rt };
|
|
2133
2165
|
};
|
|
2134
|
-
|
|
2135
|
-
var
|
|
2136
|
-
const
|
|
2137
|
-
let
|
|
2166
|
+
Lt.exports = Rr(), Lt.exports.createColors = Rr;
|
|
2167
|
+
var Dt = Lt.exports;
|
|
2168
|
+
const Ft = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2169
|
+
let Ut = Dt, Bt = Ft, Wt = class Lr extends Error {
|
|
2138
2170
|
constructor(e, a, u, m2, w2, b2) {
|
|
2139
2171
|
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);
|
|
2140
2172
|
}
|
|
@@ -2144,11 +2176,11 @@ let Rt = Et, Dt = Lt, Ft = class Lr extends Error {
|
|
|
2144
2176
|
showSourceCode(e) {
|
|
2145
2177
|
if (!this.source) return "";
|
|
2146
2178
|
let a = this.source;
|
|
2147
|
-
null == e && (e =
|
|
2179
|
+
null == e && (e = Ut.isColorSupported);
|
|
2148
2180
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
2149
2181
|
if (e) {
|
|
2150
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
2151
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
2182
|
+
let { bold: e2, gray: a2, red: u2 } = Ut.createColors(true);
|
|
2183
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), Bt && (i = (e3) => Bt(e3));
|
|
2152
2184
|
}
|
|
2153
2185
|
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;
|
|
2154
2186
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -2169,10 +2201,10 @@ let Rt = Et, Dt = Lt, Ft = class Lr extends Error {
|
|
|
2169
2201
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
2170
2202
|
}
|
|
2171
2203
|
};
|
|
2172
|
-
var
|
|
2173
|
-
|
|
2174
|
-
const
|
|
2175
|
-
let
|
|
2204
|
+
var jt = Wt;
|
|
2205
|
+
Wt.default = Wt;
|
|
2206
|
+
const Vt = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2207
|
+
let Ht = class {
|
|
2176
2208
|
constructor(e) {
|
|
2177
2209
|
this.builder = e;
|
|
2178
2210
|
}
|
|
@@ -2224,7 +2256,7 @@ let Wt = class {
|
|
|
2224
2256
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
2225
2257
|
let w2 = e.parent;
|
|
2226
2258
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
2227
|
-
if (!w2) return
|
|
2259
|
+
if (!w2) return Vt[u];
|
|
2228
2260
|
let b2 = e.root();
|
|
2229
2261
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
2230
2262
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -2236,7 +2268,7 @@ let Wt = class {
|
|
|
2236
2268
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
2237
2269
|
});
|
|
2238
2270
|
}
|
|
2239
|
-
return typeof m2 > "u" && (m2 =
|
|
2271
|
+
return typeof m2 > "u" && (m2 = Vt[u]), b2.rawCache[u] = m2, m2;
|
|
2240
2272
|
}
|
|
2241
2273
|
rawBeforeClose(e) {
|
|
2242
2274
|
let a;
|
|
@@ -2312,17 +2344,17 @@ let Wt = class {
|
|
|
2312
2344
|
this[e.type](e, a);
|
|
2313
2345
|
}
|
|
2314
2346
|
};
|
|
2315
|
-
var
|
|
2316
|
-
|
|
2317
|
-
let
|
|
2347
|
+
var Kt = Ht;
|
|
2348
|
+
Ht.default = Ht;
|
|
2349
|
+
let Jt = Kt;
|
|
2318
2350
|
function ks(e, a) {
|
|
2319
|
-
new
|
|
2351
|
+
new Jt(a).stringify(e);
|
|
2320
2352
|
}
|
|
2321
|
-
var
|
|
2353
|
+
var Xt = ks;
|
|
2322
2354
|
ks.default = ks;
|
|
2323
|
-
var
|
|
2324
|
-
|
|
2325
|
-
let
|
|
2355
|
+
var Qt = {};
|
|
2356
|
+
Qt.isClean = Symbol("isClean"), Qt.my = Symbol("my");
|
|
2357
|
+
let en = jt, tn = Kt, nn = Xt, { isClean: rn, my: on } = Qt;
|
|
2326
2358
|
function Cs(e, a) {
|
|
2327
2359
|
let u = new e.constructor();
|
|
2328
2360
|
for (let m2 in e) {
|
|
@@ -2344,12 +2376,12 @@ function Pe(e, a) {
|
|
|
2344
2376
|
}
|
|
2345
2377
|
return w2;
|
|
2346
2378
|
}
|
|
2347
|
-
let
|
|
2379
|
+
let sn = class {
|
|
2348
2380
|
get proxyOf() {
|
|
2349
2381
|
return this;
|
|
2350
2382
|
}
|
|
2351
2383
|
constructor(e = {}) {
|
|
2352
|
-
this.raws = {}, this[
|
|
2384
|
+
this.raws = {}, this[rn] = false, this[on] = true;
|
|
2353
2385
|
for (let a in e) if ("nodes" === a) {
|
|
2354
2386
|
this.nodes = [];
|
|
2355
2387
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -2393,19 +2425,19 @@ let nn = class {
|
|
|
2393
2425
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
2394
2426
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
2395
2427
|
}
|
|
2396
|
-
return new
|
|
2428
|
+
return new en(e);
|
|
2397
2429
|
}
|
|
2398
2430
|
getProxyProcessor() {
|
|
2399
2431
|
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) };
|
|
2400
2432
|
}
|
|
2401
2433
|
markClean() {
|
|
2402
|
-
this[
|
|
2434
|
+
this[rn] = true;
|
|
2403
2435
|
}
|
|
2404
2436
|
markDirty() {
|
|
2405
|
-
if (this[
|
|
2406
|
-
this[
|
|
2437
|
+
if (this[rn]) {
|
|
2438
|
+
this[rn] = false;
|
|
2407
2439
|
let e = this;
|
|
2408
|
-
for (; e = e.parent; ) e[
|
|
2440
|
+
for (; e = e.parent; ) e[rn] = false;
|
|
2409
2441
|
}
|
|
2410
2442
|
}
|
|
2411
2443
|
next() {
|
|
@@ -2441,7 +2473,7 @@ let nn = class {
|
|
|
2441
2473
|
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 };
|
|
2442
2474
|
}
|
|
2443
2475
|
raw(e, a) {
|
|
2444
|
-
return new
|
|
2476
|
+
return new tn().raw(this, e, a);
|
|
2445
2477
|
}
|
|
2446
2478
|
remove() {
|
|
2447
2479
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2478,7 +2510,7 @@ let nn = class {
|
|
|
2478
2510
|
toProxy() {
|
|
2479
2511
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2480
2512
|
}
|
|
2481
|
-
toString(e =
|
|
2513
|
+
toString(e = nn) {
|
|
2482
2514
|
e.stringify && (e = e.stringify);
|
|
2483
2515
|
let a = "";
|
|
2484
2516
|
return e(this, (e2) => {
|
|
@@ -2491,16 +2523,16 @@ let nn = class {
|
|
|
2491
2523
|
return e.warn(a, m2);
|
|
2492
2524
|
}
|
|
2493
2525
|
};
|
|
2494
|
-
var
|
|
2495
|
-
|
|
2496
|
-
let
|
|
2526
|
+
var an = sn;
|
|
2527
|
+
sn.default = sn;
|
|
2528
|
+
let ln = an, cn = class extends ln {
|
|
2497
2529
|
constructor(e) {
|
|
2498
2530
|
super(e), this.type = "comment";
|
|
2499
2531
|
}
|
|
2500
2532
|
};
|
|
2501
|
-
var
|
|
2502
|
-
|
|
2503
|
-
let
|
|
2533
|
+
var un = cn;
|
|
2534
|
+
cn.default = cn;
|
|
2535
|
+
let pn = an, dn = class extends pn {
|
|
2504
2536
|
get variable() {
|
|
2505
2537
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2506
2538
|
}
|
|
@@ -2508,16 +2540,16 @@ let ln = rn, cn = class extends ln {
|
|
|
2508
2540
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
2509
2541
|
}
|
|
2510
2542
|
};
|
|
2511
|
-
var
|
|
2512
|
-
|
|
2513
|
-
let
|
|
2543
|
+
var hn = dn;
|
|
2544
|
+
dn.default = dn;
|
|
2545
|
+
let fn, mn, gn, yn, wn = un, Sn = hn, bn = an, { isClean: Mn, my: In } = Qt;
|
|
2514
2546
|
function _r(e) {
|
|
2515
2547
|
return e.map((e2) => (e2.nodes && (e2.nodes = _r(e2.nodes)), delete e2.source, e2));
|
|
2516
2548
|
}
|
|
2517
2549
|
function Wr(e) {
|
|
2518
|
-
if (e[
|
|
2550
|
+
if (e[Mn] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
|
|
2519
2551
|
}
|
|
2520
|
-
let
|
|
2552
|
+
let _n = class zr extends bn {
|
|
2521
2553
|
get first() {
|
|
2522
2554
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2523
2555
|
}
|
|
@@ -2569,7 +2601,7 @@ let bn = class zr extends yn {
|
|
|
2569
2601
|
return this.markDirty(), this;
|
|
2570
2602
|
}
|
|
2571
2603
|
normalize(e, a) {
|
|
2572
|
-
if ("string" == typeof e) e = _r(
|
|
2604
|
+
if ("string" == typeof e) e = _r(mn(e).nodes);
|
|
2573
2605
|
else if (typeof e > "u") e = [];
|
|
2574
2606
|
else if (Array.isArray(e)) {
|
|
2575
2607
|
e = e.slice(0);
|
|
@@ -2580,14 +2612,14 @@ let bn = class zr extends yn {
|
|
|
2580
2612
|
} else if (e.type) e = [e];
|
|
2581
2613
|
else if (e.prop) {
|
|
2582
2614
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
2583
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
2584
|
-
} else if (e.selector || e.selectors) e = [new
|
|
2585
|
-
else if (e.name) e = [new
|
|
2615
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Sn(e)];
|
|
2616
|
+
} else if (e.selector || e.selectors) e = [new yn(e)];
|
|
2617
|
+
else if (e.name) e = [new fn(e)];
|
|
2586
2618
|
else {
|
|
2587
2619
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
2588
|
-
e = [new
|
|
2620
|
+
e = [new wn(e)];
|
|
2589
2621
|
}
|
|
2590
|
-
return e.map((e2) => (e2[
|
|
2622
|
+
return e.map((e2) => (e2[In] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Mn] && 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));
|
|
2591
2623
|
}
|
|
2592
2624
|
prepend(...e) {
|
|
2593
2625
|
e = e.reverse();
|
|
@@ -2663,22 +2695,22 @@ let bn = class zr extends yn {
|
|
|
2663
2695
|
}));
|
|
2664
2696
|
}
|
|
2665
2697
|
};
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
},
|
|
2698
|
+
_n.registerParse = (e) => {
|
|
2699
|
+
mn = e;
|
|
2700
|
+
}, _n.registerRule = (e) => {
|
|
2701
|
+
yn = e;
|
|
2702
|
+
}, _n.registerAtRule = (e) => {
|
|
2669
2703
|
fn = e;
|
|
2670
|
-
},
|
|
2671
|
-
|
|
2672
|
-
}, bn.registerRoot = (e) => {
|
|
2673
|
-
hn = e;
|
|
2704
|
+
}, _n.registerRoot = (e) => {
|
|
2705
|
+
gn = e;
|
|
2674
2706
|
};
|
|
2675
|
-
var
|
|
2676
|
-
|
|
2677
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
2678
|
-
|
|
2707
|
+
var On = _n;
|
|
2708
|
+
_n.default = _n, _n.rebuild = (e) => {
|
|
2709
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, fn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, yn.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Sn.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, wn.prototype) : "root" === e.type && Object.setPrototypeOf(e, gn.prototype), e[In] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
2710
|
+
_n.rebuild(e2);
|
|
2679
2711
|
});
|
|
2680
2712
|
};
|
|
2681
|
-
let
|
|
2713
|
+
let En = On, Ln = class extends En {
|
|
2682
2714
|
constructor(e) {
|
|
2683
2715
|
super(e), this.type = "atrule";
|
|
2684
2716
|
}
|
|
@@ -2689,38 +2721,38 @@ let In = Mn, _n = class extends In {
|
|
|
2689
2721
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
2690
2722
|
}
|
|
2691
2723
|
};
|
|
2692
|
-
var
|
|
2693
|
-
|
|
2694
|
-
let
|
|
2724
|
+
var Rn = Ln;
|
|
2725
|
+
Ln.default = Ln, En.registerAtRule(Ln);
|
|
2726
|
+
let An, Tn, Nn = On, Pn = class extends Nn {
|
|
2695
2727
|
constructor(e) {
|
|
2696
2728
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
2697
2729
|
}
|
|
2698
2730
|
toResult(e = {}) {
|
|
2699
|
-
return new
|
|
2731
|
+
return new An(new Tn(), this, e).stringify();
|
|
2700
2732
|
}
|
|
2701
2733
|
};
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
},
|
|
2705
|
-
|
|
2734
|
+
Pn.registerLazyResult = (e) => {
|
|
2735
|
+
An = e;
|
|
2736
|
+
}, Pn.registerProcessor = (e) => {
|
|
2737
|
+
Tn = e;
|
|
2706
2738
|
};
|
|
2707
|
-
var
|
|
2708
|
-
|
|
2709
|
-
var
|
|
2739
|
+
var Dn = Pn;
|
|
2740
|
+
Pn.default = Pn;
|
|
2741
|
+
var Fn = { nanoid: (e = 21) => {
|
|
2710
2742
|
let a = "", u = 0 | e;
|
|
2711
2743
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2712
2744
|
return a;
|
|
2713
2745
|
} };
|
|
2714
|
-
let { existsSync:
|
|
2715
|
-
let
|
|
2746
|
+
let { existsSync: Un, readFileSync: Bn } = Ft, { dirname: Wn, join: zn } = Ft, { SourceMapConsumer: jn, SourceMapGenerator: Vn } = Ft;
|
|
2747
|
+
let qn = class {
|
|
2716
2748
|
constructor(e, a) {
|
|
2717
2749
|
if (false === a.map) return;
|
|
2718
2750
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
2719
2751
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
2720
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
2752
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Wn(this.mapFile)), m2 && (this.text = m2);
|
|
2721
2753
|
}
|
|
2722
2754
|
consumer() {
|
|
2723
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2755
|
+
return this.consumerCache || (this.consumerCache = new jn(this.text)), this.consumerCache;
|
|
2724
2756
|
}
|
|
2725
2757
|
decodeInline(e) {
|
|
2726
2758
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -2745,15 +2777,15 @@ let zn = class {
|
|
|
2745
2777
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
2746
2778
|
}
|
|
2747
2779
|
loadFile(e) {
|
|
2748
|
-
if (this.root =
|
|
2780
|
+
if (this.root = Wn(e), Un(e)) return this.mapFile = e, Bn(e, "utf-8").toString().trim();
|
|
2749
2781
|
}
|
|
2750
2782
|
loadMap(e, a) {
|
|
2751
2783
|
if (false === a) return false;
|
|
2752
2784
|
if (a) {
|
|
2753
2785
|
if ("string" == typeof a) return a;
|
|
2754
2786
|
if ("function" != typeof a) {
|
|
2755
|
-
if (a instanceof
|
|
2756
|
-
if (a instanceof
|
|
2787
|
+
if (a instanceof jn) return Vn.fromSourceMap(a).toString();
|
|
2788
|
+
if (a instanceof Vn) return a.toString();
|
|
2757
2789
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
2758
2790
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
2759
2791
|
}
|
|
@@ -2769,7 +2801,7 @@ let zn = class {
|
|
|
2769
2801
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2770
2802
|
if (this.annotation) {
|
|
2771
2803
|
let a2 = this.annotation;
|
|
2772
|
-
return e && (a2 =
|
|
2804
|
+
return e && (a2 = zn(Wn(e), a2)), this.loadFile(a2);
|
|
2773
2805
|
}
|
|
2774
2806
|
}
|
|
2775
2807
|
}
|
|
@@ -2780,23 +2812,23 @@ let zn = class {
|
|
|
2780
2812
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2781
2813
|
}
|
|
2782
2814
|
};
|
|
2783
|
-
var
|
|
2784
|
-
|
|
2785
|
-
let { nanoid:
|
|
2815
|
+
var Zn = qn;
|
|
2816
|
+
qn.default = qn;
|
|
2817
|
+
let { nanoid: Kn } = Fn, { isAbsolute: Qn, resolve: nr } = Ft, { SourceMapConsumer: rr, SourceMapGenerator: or } = Ft, { fileURLToPath: sr, pathToFileURL: ir } = Ft, ar = jt, lr = Zn, cr = Ft, ur = Symbol("fromOffsetCache"), pr = !(!rr || !or), dr = !(!nr || !Qn), hr = class {
|
|
2786
2818
|
get from() {
|
|
2787
2819
|
return this.file || this.id;
|
|
2788
2820
|
}
|
|
2789
2821
|
constructor(e, a = {}) {
|
|
2790
2822
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
2791
|
-
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 && (!
|
|
2792
|
-
let e2 = new
|
|
2823
|
+
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 && (!dr || /^\w+:\/\//.test(a.from) || Qn(a.from) ? this.file = a.from : this.file = nr(a.from)), dr && pr) {
|
|
2824
|
+
let e2 = new lr(this.css, a);
|
|
2793
2825
|
if (e2.text) {
|
|
2794
2826
|
this.map = e2;
|
|
2795
2827
|
let a2 = e2.consumer().file;
|
|
2796
2828
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
2797
2829
|
}
|
|
2798
2830
|
}
|
|
2799
|
-
this.file || (this.id = "<input css " +
|
|
2831
|
+
this.file || (this.id = "<input css " + Kn(6) + ">"), this.map && (this.map.file = this.from);
|
|
2800
2832
|
}
|
|
2801
2833
|
error(e, a, u, m2 = {}) {
|
|
2802
2834
|
let w2, b2, C2;
|
|
@@ -2815,17 +2847,17 @@ let { nanoid: Vn } = Nn, { isAbsolute: qn, resolve: Zn } = Lt, { SourceMapConsum
|
|
|
2815
2847
|
a = e2.line, u = e2.col;
|
|
2816
2848
|
}
|
|
2817
2849
|
let x2 = this.origin(a, u, b2, w2);
|
|
2818
|
-
return C2 = x2 ? new
|
|
2850
|
+
return C2 = x2 ? new ar(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 ar(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 && (ir && (C2.input.url = ir(this.file).toString()), C2.input.file = this.file), C2;
|
|
2819
2851
|
}
|
|
2820
2852
|
fromOffset(e) {
|
|
2821
2853
|
let a, u;
|
|
2822
|
-
if (this[
|
|
2854
|
+
if (this[ur]) u = this[ur];
|
|
2823
2855
|
else {
|
|
2824
2856
|
let e2 = this.css.split("\n");
|
|
2825
2857
|
u = new Array(e2.length);
|
|
2826
2858
|
let a2 = 0;
|
|
2827
2859
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
2828
|
-
this[
|
|
2860
|
+
this[ur] = u;
|
|
2829
2861
|
}
|
|
2830
2862
|
a = u[u.length - 1];
|
|
2831
2863
|
let m2 = 0;
|
|
@@ -2844,17 +2876,17 @@ let { nanoid: Vn } = Nn, { isAbsolute: qn, resolve: Zn } = Lt, { SourceMapConsum
|
|
|
2844
2876
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
2845
2877
|
}
|
|
2846
2878
|
mapResolve(e) {
|
|
2847
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
2879
|
+
return /^\w+:\/\//.test(e) ? e : nr(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
2848
2880
|
}
|
|
2849
2881
|
origin(e, a, u, m2) {
|
|
2850
2882
|
if (!this.map) return false;
|
|
2851
2883
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
2852
2884
|
if (!x2.source) return false;
|
|
2853
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
2885
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = Qn(x2.source) ? ir(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ir(this.map.mapFile));
|
|
2854
2886
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2855
2887
|
if ("file:" === b2.protocol) {
|
|
2856
|
-
if (!
|
|
2857
|
-
I2.file =
|
|
2888
|
+
if (!sr) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2889
|
+
I2.file = sr(b2);
|
|
2858
2890
|
}
|
|
2859
2891
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2860
2892
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2865,9 +2897,9 @@ let { nanoid: Vn } = Nn, { isAbsolute: qn, resolve: Zn } = Lt, { SourceMapConsum
|
|
|
2865
2897
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
2866
2898
|
}
|
|
2867
2899
|
};
|
|
2868
|
-
var
|
|
2869
|
-
|
|
2870
|
-
let
|
|
2900
|
+
var fr = hr;
|
|
2901
|
+
hr.default = hr, cr && cr.registerInput && cr.registerInput(hr);
|
|
2902
|
+
let mr, gr, yr = On, wr = class extends yr {
|
|
2871
2903
|
constructor(e) {
|
|
2872
2904
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
2873
2905
|
}
|
|
@@ -2884,29 +2916,29 @@ let dr, hr, fr = Mn, mr = class extends fr {
|
|
|
2884
2916
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
2885
2917
|
}
|
|
2886
2918
|
toResult(e = {}) {
|
|
2887
|
-
return new
|
|
2919
|
+
return new mr(new gr(), this, e).stringify();
|
|
2888
2920
|
}
|
|
2889
2921
|
};
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
},
|
|
2893
|
-
|
|
2922
|
+
wr.registerLazyResult = (e) => {
|
|
2923
|
+
mr = e;
|
|
2924
|
+
}, wr.registerProcessor = (e) => {
|
|
2925
|
+
gr = e;
|
|
2894
2926
|
};
|
|
2895
|
-
var
|
|
2896
|
-
|
|
2897
|
-
let
|
|
2927
|
+
var Sr = wr;
|
|
2928
|
+
wr.default = wr, yr.registerRoot(wr);
|
|
2929
|
+
let Cr = { comma: (e) => Cr.split(e, [","], true), space(e) {
|
|
2898
2930
|
let a = [" ", "\n", " "];
|
|
2899
|
-
return
|
|
2931
|
+
return Cr.split(e, a);
|
|
2900
2932
|
}, split(e, a, u) {
|
|
2901
2933
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2902
2934
|
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;
|
|
2903
2935
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2904
2936
|
} };
|
|
2905
|
-
var
|
|
2906
|
-
|
|
2907
|
-
let
|
|
2937
|
+
var Ar = Cr;
|
|
2938
|
+
Cr.default = Cr;
|
|
2939
|
+
let Tr = On, Nr = Ar, Pr = class extends Tr {
|
|
2908
2940
|
get selectors() {
|
|
2909
|
-
return
|
|
2941
|
+
return Nr.comma(this.selector);
|
|
2910
2942
|
}
|
|
2911
2943
|
set selectors(e) {
|
|
2912
2944
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2916,34 +2948,34 @@ let Sr = Mn, Cr = wr, Ar = class extends Sr {
|
|
|
2916
2948
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2917
2949
|
}
|
|
2918
2950
|
};
|
|
2919
|
-
var
|
|
2920
|
-
|
|
2921
|
-
let
|
|
2951
|
+
var Dr = Pr;
|
|
2952
|
+
Pr.default = Pr, Tr.registerRule(Pr);
|
|
2953
|
+
let Fr = Rn, Ur = un, Br = hn, $r = fr, jr = Zn, Gr = Sr, Vr = Dr;
|
|
2922
2954
|
function Ze(e, a) {
|
|
2923
2955
|
if (Array.isArray(e)) return e.map((e2) => Ze(e2));
|
|
2924
2956
|
let { inputs: u, ...m2 } = e;
|
|
2925
2957
|
if (u) {
|
|
2926
2958
|
a = [];
|
|
2927
2959
|
for (let e2 of u) {
|
|
2928
|
-
let u2 = { ...e2, __proto__:
|
|
2929
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
2960
|
+
let u2 = { ...e2, __proto__: $r.prototype };
|
|
2961
|
+
u2.map && (u2.map = { ...u2.map, __proto__: jr.prototype }), a.push(u2);
|
|
2930
2962
|
}
|
|
2931
2963
|
}
|
|
2932
2964
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ze(e2, a))), m2.source) {
|
|
2933
2965
|
let { inputId: e2, ...u2 } = m2.source;
|
|
2934
2966
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
2935
2967
|
}
|
|
2936
|
-
if ("root" === m2.type) return new
|
|
2937
|
-
if ("decl" === m2.type) return new
|
|
2938
|
-
if ("rule" === m2.type) return new
|
|
2939
|
-
if ("comment" === m2.type) return new
|
|
2940
|
-
if ("atrule" === m2.type) return new
|
|
2968
|
+
if ("root" === m2.type) return new Gr(m2);
|
|
2969
|
+
if ("decl" === m2.type) return new Br(m2);
|
|
2970
|
+
if ("rule" === m2.type) return new Vr(m2);
|
|
2971
|
+
if ("comment" === m2.type) return new Ur(m2);
|
|
2972
|
+
if ("atrule" === m2.type) return new Fr(m2);
|
|
2941
2973
|
throw new Error("Unknown node type: " + e.type);
|
|
2942
2974
|
}
|
|
2943
|
-
var
|
|
2975
|
+
var qr = Ze;
|
|
2944
2976
|
Ze.default = Ze;
|
|
2945
|
-
let { dirname:
|
|
2946
|
-
var
|
|
2977
|
+
let { dirname: Hr, relative: Zr, resolve: Kr, sep: Jr } = Ft, { SourceMapConsumer: Yr, SourceMapGenerator: Xr } = Ft, { pathToFileURL: Qr } = Ft, eo = fr, to = !(!Yr || !Xr), oo = !!(Hr && Kr && Zr && Jr);
|
|
2978
|
+
var io = class {
|
|
2947
2979
|
constructor(e, a, u, m2) {
|
|
2948
2980
|
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();
|
|
2949
2981
|
}
|
|
@@ -2955,8 +2987,8 @@ var eo = class {
|
|
|
2955
2987
|
}
|
|
2956
2988
|
applyPrevMaps() {
|
|
2957
2989
|
for (let e of this.previous()) {
|
|
2958
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
2959
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
2990
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Hr(e.file);
|
|
2991
|
+
false === this.mapOpts.sourcesContent ? (a = new Yr(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
2960
2992
|
}
|
|
2961
2993
|
}
|
|
2962
2994
|
clearAnnotation() {
|
|
@@ -2966,7 +2998,7 @@ var eo = class {
|
|
|
2966
2998
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
2967
2999
|
}
|
|
2968
3000
|
generate() {
|
|
2969
|
-
if (this.clearAnnotation(),
|
|
3001
|
+
if (this.clearAnnotation(), oo && to && this.isMap()) return this.generateMap();
|
|
2970
3002
|
{
|
|
2971
3003
|
let e = "";
|
|
2972
3004
|
return this.stringify(this.root, (a) => {
|
|
@@ -2978,12 +3010,12 @@ var eo = class {
|
|
|
2978
3010
|
if (this.root) this.generateString();
|
|
2979
3011
|
else if (1 === this.previous().length) {
|
|
2980
3012
|
let e = this.previous()[0].consumer();
|
|
2981
|
-
e.file = this.outputFile(), this.map =
|
|
2982
|
-
} else this.map = new
|
|
3013
|
+
e.file = this.outputFile(), this.map = Xr.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
3014
|
+
} else this.map = new Xr({ 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
3015
|
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];
|
|
2984
3016
|
}
|
|
2985
3017
|
generateString() {
|
|
2986
|
-
this.css = "", this.map = new
|
|
3018
|
+
this.css = "", this.map = new Xr({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
2987
3019
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
2988
3020
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
2989
3021
|
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) {
|
|
@@ -3013,9 +3045,9 @@ var eo = class {
|
|
|
3013
3045
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
3014
3046
|
let a = this.memoizedPaths.get(e);
|
|
3015
3047
|
if (a) return a;
|
|
3016
|
-
let u = this.opts.to ?
|
|
3017
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
3018
|
-
let m2 =
|
|
3048
|
+
let u = this.opts.to ? Hr(this.opts.to) : ".";
|
|
3049
|
+
"string" == typeof this.mapOpts.annotation && (u = Hr(Kr(u, this.mapOpts.annotation)));
|
|
3050
|
+
let m2 = Zr(u, e);
|
|
3019
3051
|
return this.memoizedPaths.set(e, m2), m2;
|
|
3020
3052
|
}
|
|
3021
3053
|
previous() {
|
|
@@ -3026,7 +3058,7 @@ var eo = class {
|
|
|
3026
3058
|
}
|
|
3027
3059
|
});
|
|
3028
3060
|
else {
|
|
3029
|
-
let e = new
|
|
3061
|
+
let e = new eo(this.originalCSS, this.opts);
|
|
3030
3062
|
e.map && this.previousMaps.push(e.map);
|
|
3031
3063
|
}
|
|
3032
3064
|
return this.previousMaps;
|
|
@@ -3057,8 +3089,8 @@ var eo = class {
|
|
|
3057
3089
|
toFileUrl(e) {
|
|
3058
3090
|
let a = this.memoizedFileURLs.get(e);
|
|
3059
3091
|
if (a) return a;
|
|
3060
|
-
if (
|
|
3061
|
-
let a2 =
|
|
3092
|
+
if (Qr) {
|
|
3093
|
+
let a2 = Qr(e).toString();
|
|
3062
3094
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
3063
3095
|
}
|
|
3064
3096
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -3066,13 +3098,13 @@ var eo = class {
|
|
|
3066
3098
|
toUrl(e) {
|
|
3067
3099
|
let a = this.memoizedURLs.get(e);
|
|
3068
3100
|
if (a) return a;
|
|
3069
|
-
"\\" ===
|
|
3101
|
+
"\\" === Jr && (e = e.replace(/\\/g, "/"));
|
|
3070
3102
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
3071
3103
|
return this.memoizedURLs.set(e, u), u;
|
|
3072
3104
|
}
|
|
3073
3105
|
};
|
|
3074
|
-
const
|
|
3075
|
-
let
|
|
3106
|
+
const ao = /[\t\n\f\r "#'()/;[\\\]{}]/g, lo = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, co = /.[\r\n"'(/\\]/, uo = /[\da-f]/i;
|
|
3107
|
+
let ho = Rn, Mo = un, _o = hn, Ao = Sr, No = Dr, Xa = function(e, a = {}) {
|
|
3076
3108
|
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 = [];
|
|
3077
3109
|
function y2(a2) {
|
|
3078
3110
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -3122,7 +3154,7 @@ let lo = On, co = an, uo = un, ho = gr, Mo = Tr, Xa = function(e, a = {}) {
|
|
|
3122
3154
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3123
3155
|
} while (I2);
|
|
3124
3156
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3125
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3157
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || co.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
3126
3158
|
break;
|
|
3127
3159
|
case 39:
|
|
3128
3160
|
case 34:
|
|
@@ -3140,31 +3172,31 @@ let lo = On, co = an, uo = un, ho = gr, Mo = Tr, Xa = function(e, a = {}) {
|
|
|
3140
3172
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3141
3173
|
break;
|
|
3142
3174
|
case 64:
|
|
3143
|
-
|
|
3175
|
+
ao.lastIndex = B2 + 1, ao.test(D2), b2 = 0 === ao.lastIndex ? D2.length - 1 : ao.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3144
3176
|
break;
|
|
3145
3177
|
case 92:
|
|
3146
3178
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3147
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
3148
|
-
for (;
|
|
3179
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, uo.test(D2.charAt(b2)))) {
|
|
3180
|
+
for (; uo.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3149
3181
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3150
3182
|
}
|
|
3151
3183
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3152
3184
|
break;
|
|
3153
3185
|
default:
|
|
3154
|
-
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) : (
|
|
3186
|
+
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) : (lo.lastIndex = B2 + 1, lo.test(D2), b2 = 0 === lo.lastIndex ? D2.length - 1 : lo.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
3155
3187
|
}
|
|
3156
3188
|
return B2++, x2;
|
|
3157
3189
|
}, position: function S() {
|
|
3158
3190
|
return B2;
|
|
3159
3191
|
} };
|
|
3160
3192
|
};
|
|
3161
|
-
const
|
|
3162
|
-
var
|
|
3193
|
+
const Po = { empty: true, space: true };
|
|
3194
|
+
var Do = class {
|
|
3163
3195
|
constructor(e) {
|
|
3164
|
-
this.input = e, this.root = new
|
|
3196
|
+
this.input = e, this.root = new Ao(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
3165
3197
|
}
|
|
3166
3198
|
atrule(e) {
|
|
3167
|
-
let a = new
|
|
3199
|
+
let a = new ho();
|
|
3168
3200
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
3169
3201
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3170
3202
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3216,7 +3248,7 @@ var Ao = class {
|
|
|
3216
3248
|
return false;
|
|
3217
3249
|
}
|
|
3218
3250
|
comment(e) {
|
|
3219
|
-
let a = new
|
|
3251
|
+
let a = new Mo();
|
|
3220
3252
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
3221
3253
|
let u = e[1].slice(2, -2);
|
|
3222
3254
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -3229,7 +3261,7 @@ var Ao = class {
|
|
|
3229
3261
|
this.tokenizer = Xa(this.input);
|
|
3230
3262
|
}
|
|
3231
3263
|
decl(e, a) {
|
|
3232
|
-
let u = new
|
|
3264
|
+
let u = new _o();
|
|
3233
3265
|
this.init(u, e[0][2]);
|
|
3234
3266
|
let m2, w2 = e[e.length - 1];
|
|
3235
3267
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e2) {
|
|
@@ -3278,7 +3310,7 @@ var Ao = class {
|
|
|
3278
3310
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
3279
3311
|
}
|
|
3280
3312
|
emptyRule(e) {
|
|
3281
|
-
let a = new
|
|
3313
|
+
let a = new No();
|
|
3282
3314
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
3283
3315
|
}
|
|
3284
3316
|
end(e) {
|
|
@@ -3354,7 +3386,7 @@ var Ao = class {
|
|
|
3354
3386
|
}
|
|
3355
3387
|
raw(e, a, u, m2) {
|
|
3356
3388
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
3357
|
-
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",
|
|
3389
|
+
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", Po[x2] || Po[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3358
3390
|
if (!O2) {
|
|
3359
3391
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
3360
3392
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -3363,7 +3395,7 @@ var Ao = class {
|
|
|
3363
3395
|
}
|
|
3364
3396
|
rule(e) {
|
|
3365
3397
|
e.pop();
|
|
3366
|
-
let a = new
|
|
3398
|
+
let a = new No();
|
|
3367
3399
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
3368
3400
|
}
|
|
3369
3401
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -3403,9 +3435,9 @@ var Ao = class {
|
|
|
3403
3435
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
3404
3436
|
}
|
|
3405
3437
|
};
|
|
3406
|
-
let
|
|
3438
|
+
let Fo = On, Uo = fr, $o = Do;
|
|
3407
3439
|
function _t(e, a) {
|
|
3408
|
-
let u = new
|
|
3440
|
+
let u = new Uo(e, a), m2 = new $o(u);
|
|
3409
3441
|
try {
|
|
3410
3442
|
m2.parse();
|
|
3411
3443
|
} catch (e2) {
|
|
@@ -3413,9 +3445,9 @@ function _t(e, a) {
|
|
|
3413
3445
|
}
|
|
3414
3446
|
return m2.root;
|
|
3415
3447
|
}
|
|
3416
|
-
var
|
|
3417
|
-
_t.default = _t,
|
|
3418
|
-
let
|
|
3448
|
+
var jo = _t;
|
|
3449
|
+
_t.default = _t, Fo.registerParse(_t);
|
|
3450
|
+
let Go = class {
|
|
3419
3451
|
constructor(e, a = {}) {
|
|
3420
3452
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
3421
3453
|
let e2 = a.node.rangeBy(a);
|
|
@@ -3427,9 +3459,9 @@ let Uo = class {
|
|
|
3427
3459
|
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;
|
|
3428
3460
|
}
|
|
3429
3461
|
};
|
|
3430
|
-
var
|
|
3431
|
-
|
|
3432
|
-
let
|
|
3462
|
+
var Vo = Go;
|
|
3463
|
+
Go.default = Go;
|
|
3464
|
+
let qo = Vo, Ho = class {
|
|
3433
3465
|
get content() {
|
|
3434
3466
|
return this.css;
|
|
3435
3467
|
}
|
|
@@ -3441,26 +3473,26 @@ let jo = $o, Go = class {
|
|
|
3441
3473
|
}
|
|
3442
3474
|
warn(e, a = {}) {
|
|
3443
3475
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
3444
|
-
let u = new
|
|
3476
|
+
let u = new qo(e, a);
|
|
3445
3477
|
return this.messages.push(u), u;
|
|
3446
3478
|
}
|
|
3447
3479
|
warnings() {
|
|
3448
3480
|
return this.messages.filter((e) => "warning" === e.type);
|
|
3449
3481
|
}
|
|
3450
3482
|
};
|
|
3451
|
-
var
|
|
3452
|
-
|
|
3453
|
-
let
|
|
3483
|
+
var Zo = Ho;
|
|
3484
|
+
Ho.default = Ho;
|
|
3485
|
+
let Ko = {};
|
|
3454
3486
|
var so = function(e) {
|
|
3455
|
-
|
|
3487
|
+
Ko[e] || (Ko[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
3456
3488
|
};
|
|
3457
|
-
let
|
|
3458
|
-
const
|
|
3489
|
+
let Jo = On, Yo = Dn, Xo = io, Qo = jo, es = Zo, ts = Sr, ns = Xt, { isClean: rs, my: os } = Qt, ss = so;
|
|
3490
|
+
const is = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, as = { 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 }, ls = { Once: true, postcssPlugin: true, prepare: true };
|
|
3459
3491
|
function Ne(e) {
|
|
3460
3492
|
return "object" == typeof e && "function" == typeof e.then;
|
|
3461
3493
|
}
|
|
3462
3494
|
function no(e) {
|
|
3463
|
-
let a = false, u =
|
|
3495
|
+
let a = false, u = is[e.type];
|
|
3464
3496
|
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"];
|
|
3465
3497
|
}
|
|
3466
3498
|
function Gn(e) {
|
|
@@ -3468,9 +3500,9 @@ function Gn(e) {
|
|
|
3468
3500
|
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: [] };
|
|
3469
3501
|
}
|
|
3470
3502
|
function Ps(e) {
|
|
3471
|
-
return e[
|
|
3503
|
+
return e[rs] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
|
|
3472
3504
|
}
|
|
3473
|
-
let
|
|
3505
|
+
let cs = {}, us = class ro {
|
|
3474
3506
|
get content() {
|
|
3475
3507
|
return this.stringify().content;
|
|
3476
3508
|
}
|
|
@@ -3497,19 +3529,19 @@ let is = {}, as = class ro {
|
|
|
3497
3529
|
}
|
|
3498
3530
|
constructor(e, a, u) {
|
|
3499
3531
|
let m2;
|
|
3500
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof
|
|
3532
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof es) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
3501
3533
|
else {
|
|
3502
|
-
let e2 =
|
|
3534
|
+
let e2 = Qo;
|
|
3503
3535
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
3504
3536
|
try {
|
|
3505
3537
|
m2 = e2(a, u);
|
|
3506
3538
|
} catch (e3) {
|
|
3507
3539
|
this.processed = true, this.error = e3;
|
|
3508
3540
|
}
|
|
3509
|
-
m2 && !m2[
|
|
3541
|
+
m2 && !m2[os] && Jo.rebuild(m2);
|
|
3510
3542
|
}
|
|
3511
3543
|
else m2 = Ps(a);
|
|
3512
|
-
this.result = new
|
|
3544
|
+
this.result = new es(e, m2, u), this.helpers = { ...cs, postcss: cs, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
3513
3545
|
}
|
|
3514
3546
|
async() {
|
|
3515
3547
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3543,8 +3575,8 @@ let is = {}, as = class ro {
|
|
|
3543
3575
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
3544
3576
|
};
|
|
3545
3577
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
3546
|
-
if (!
|
|
3547
|
-
if (!
|
|
3578
|
+
if (!as[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3579
|
+
if (!ls[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
3548
3580
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
3549
3581
|
}
|
|
3550
3582
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3561,8 +3593,8 @@ let is = {}, as = class ro {
|
|
|
3561
3593
|
}
|
|
3562
3594
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3563
3595
|
let e = this.result.root;
|
|
3564
|
-
for (; !e[
|
|
3565
|
-
e[
|
|
3596
|
+
for (; !e[rs]; ) {
|
|
3597
|
+
e[rs] = true;
|
|
3566
3598
|
let a = [Gn(e)];
|
|
3567
3599
|
for (; a.length > 0; ) {
|
|
3568
3600
|
let e2 = this.visitTick(a);
|
|
@@ -3607,9 +3639,9 @@ let is = {}, as = class ro {
|
|
|
3607
3639
|
if (this.error) throw this.error;
|
|
3608
3640
|
if (this.stringified) return this.result;
|
|
3609
3641
|
this.stringified = true, this.sync();
|
|
3610
|
-
let e = this.result.opts, a =
|
|
3642
|
+
let e = this.result.opts, a = ns;
|
|
3611
3643
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
3612
|
-
let u = new
|
|
3644
|
+
let u = new Xo(a, this.result.root, this.result.opts).generate();
|
|
3613
3645
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
3614
3646
|
}
|
|
3615
3647
|
sync() {
|
|
@@ -3621,14 +3653,14 @@ let is = {}, as = class ro {
|
|
|
3621
3653
|
}
|
|
3622
3654
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3623
3655
|
let e = this.result.root;
|
|
3624
|
-
for (; !e[
|
|
3656
|
+
for (; !e[rs]; ) e[rs] = true, this.walkSync(e);
|
|
3625
3657
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
3626
3658
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
3627
3659
|
}
|
|
3628
3660
|
return this.result;
|
|
3629
3661
|
}
|
|
3630
3662
|
then(e, a) {
|
|
3631
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3663
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || ss("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);
|
|
3632
3664
|
}
|
|
3633
3665
|
toString() {
|
|
3634
3666
|
return this.css;
|
|
@@ -3660,22 +3692,22 @@ let is = {}, as = class ro {
|
|
|
3660
3692
|
}
|
|
3661
3693
|
if (0 !== a.iterator) {
|
|
3662
3694
|
let m3, w3 = a.iterator;
|
|
3663
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
3695
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[rs]) return m3[rs] = true, void e.push(Gn(m3));
|
|
3664
3696
|
a.iterator = 0, delete u.indexes[w3];
|
|
3665
3697
|
}
|
|
3666
3698
|
let w2 = a.events;
|
|
3667
3699
|
for (; a.eventIndex < w2.length; ) {
|
|
3668
3700
|
let e2 = w2[a.eventIndex];
|
|
3669
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
3701
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[rs] = true, a.iterator = u.getIterator()));
|
|
3670
3702
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
3671
3703
|
}
|
|
3672
3704
|
e.pop();
|
|
3673
3705
|
}
|
|
3674
3706
|
walkSync(e) {
|
|
3675
|
-
e[
|
|
3707
|
+
e[rs] = true;
|
|
3676
3708
|
let a = no(e);
|
|
3677
3709
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
3678
|
-
e2[
|
|
3710
|
+
e2[rs] || this.walkSync(e2);
|
|
3679
3711
|
});
|
|
3680
3712
|
else {
|
|
3681
3713
|
let a2 = this.listeners[u];
|
|
@@ -3686,14 +3718,14 @@ let is = {}, as = class ro {
|
|
|
3686
3718
|
return this.sync().warnings();
|
|
3687
3719
|
}
|
|
3688
3720
|
};
|
|
3689
|
-
|
|
3690
|
-
|
|
3721
|
+
us.registerPostcss = (e) => {
|
|
3722
|
+
cs = e;
|
|
3691
3723
|
};
|
|
3692
|
-
var
|
|
3693
|
-
|
|
3694
|
-
let
|
|
3695
|
-
const
|
|
3696
|
-
let
|
|
3724
|
+
var ps = us;
|
|
3725
|
+
us.default = us, ts.registerLazyResult(us), Yo.registerLazyResult(us);
|
|
3726
|
+
let ds = io, hs = jo;
|
|
3727
|
+
const ms = Zo;
|
|
3728
|
+
let gs = Xt, ys = so, ws = class {
|
|
3697
3729
|
get content() {
|
|
3698
3730
|
return this.result.css;
|
|
3699
3731
|
}
|
|
@@ -3714,7 +3746,7 @@ let ds = Ht, hs = so, ms = class {
|
|
|
3714
3746
|
}
|
|
3715
3747
|
get root() {
|
|
3716
3748
|
if (this._root) return this._root;
|
|
3717
|
-
let e, a =
|
|
3749
|
+
let e, a = hs;
|
|
3718
3750
|
try {
|
|
3719
3751
|
e = a(this._css, this._opts);
|
|
3720
3752
|
} catch (e2) {
|
|
@@ -3728,11 +3760,11 @@ let ds = Ht, hs = so, ms = class {
|
|
|
3728
3760
|
}
|
|
3729
3761
|
constructor(e, a, u) {
|
|
3730
3762
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
3731
|
-
let m2, w2 =
|
|
3732
|
-
this.result = new
|
|
3763
|
+
let m2, w2 = gs;
|
|
3764
|
+
this.result = new ms(this._processor, m2, this._opts), this.result.css = a;
|
|
3733
3765
|
let b2 = this;
|
|
3734
3766
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3735
|
-
let C2 = new
|
|
3767
|
+
let C2 = new ds(w2, m2, this._opts, a);
|
|
3736
3768
|
if (C2.isMap()) {
|
|
3737
3769
|
let [e2, a2] = C2.generate();
|
|
3738
3770
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -3752,7 +3784,7 @@ let ds = Ht, hs = so, ms = class {
|
|
|
3752
3784
|
return this.result;
|
|
3753
3785
|
}
|
|
3754
3786
|
then(e, a) {
|
|
3755
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3787
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || ys("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);
|
|
3756
3788
|
}
|
|
3757
3789
|
toString() {
|
|
3758
3790
|
return this._css;
|
|
@@ -3761,9 +3793,9 @@ let ds = Ht, hs = so, ms = class {
|
|
|
3761
3793
|
return [];
|
|
3762
3794
|
}
|
|
3763
3795
|
};
|
|
3764
|
-
var
|
|
3765
|
-
|
|
3766
|
-
let
|
|
3796
|
+
var Ss = ws;
|
|
3797
|
+
ws.default = ws;
|
|
3798
|
+
let bs = Dn, vs = ps, xs = Ss, Ms = Sr, Is = class {
|
|
3767
3799
|
constructor(e = []) {
|
|
3768
3800
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
3769
3801
|
}
|
|
@@ -3779,43 +3811,43 @@ let ys = Tn, ws = ls, Ss = gs, bs = gr, vs = class {
|
|
|
3779
3811
|
return a;
|
|
3780
3812
|
}
|
|
3781
3813
|
process(e, a = {}) {
|
|
3782
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
3814
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new vs(this, e, a) : new xs(this, e, a);
|
|
3783
3815
|
}
|
|
3784
3816
|
use(e) {
|
|
3785
3817
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
3786
3818
|
}
|
|
3787
3819
|
};
|
|
3788
|
-
var
|
|
3789
|
-
|
|
3790
|
-
let
|
|
3820
|
+
var _s = Is;
|
|
3821
|
+
Is.default = Is, Ms.registerProcessor(Is), bs.registerProcessor(Is);
|
|
3822
|
+
let Os = Rn, Es = un, Ls = On, Rs = jt, As = hn, Ts = Dn, Ns = qr, $s = fr, Ws = ps, js = Ar, Gs = an, Vs = jo, qs = _s, Hs = Zo, Zs = Sr, Ks = Dr, Ys = Xt, Xs = Vo;
|
|
3791
3823
|
function L$1(...e) {
|
|
3792
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
3824
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new qs(e);
|
|
3793
3825
|
}
|
|
3794
3826
|
L$1.plugin = function(e, a) {
|
|
3795
3827
|
let u, m2 = false;
|
|
3796
3828
|
function n(...u2) {
|
|
3797
3829
|
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"));
|
|
3798
3830
|
let w2 = a(...u2);
|
|
3799
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
3831
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new qs().version, w2;
|
|
3800
3832
|
}
|
|
3801
3833
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
3802
3834
|
return L$1([n(u2)]).process(e2, a2);
|
|
3803
3835
|
}, n;
|
|
3804
|
-
}, L$1.stringify =
|
|
3805
|
-
var
|
|
3836
|
+
}, L$1.stringify = Ys, L$1.parse = Vs, L$1.fromJSON = Ns, L$1.list = js, L$1.comment = (e) => new Es(e), L$1.atRule = (e) => new Os(e), L$1.decl = (e) => new As(e), L$1.rule = (e) => new Ks(e), L$1.root = (e) => new Zs(e), L$1.document = (e) => new Ts(e), L$1.CssSyntaxError = Rs, L$1.Declaration = As, L$1.Container = Ls, L$1.Processor = qs, L$1.Document = Ts, L$1.Comment = Es, L$1.Warning = Xs, L$1.AtRule = Os, L$1.Result = Hs, L$1.Input = $s, L$1.Rule = Ks, L$1.Root = Zs, L$1.Node = Gs, Ws.registerPostcss(L$1);
|
|
3837
|
+
var Qs = L$1;
|
|
3806
3838
|
L$1.default = L$1;
|
|
3807
|
-
const
|
|
3808
|
-
|
|
3809
|
-
var
|
|
3839
|
+
const ei = Yi(Qs);
|
|
3840
|
+
ei.stringify, ei.fromJSON, ei.plugin, ei.parse, ei.list, ei.document, ei.comment, ei.atRule, ei.rule, ei.decl, ei.root, ei.CssSyntaxError, ei.Declaration, ei.Container, ei.Processor, ei.Document, ei.Comment, ei.Warning, ei.AtRule, ei.Result, ei.Input, ei.Rule, ei.Root, ei.Node;
|
|
3841
|
+
var ti = ((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))(ti || {}), si = ((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))(si || {}), ii = ((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))(ii || {}), ai = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(ai || {}), li = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(li || {}), ci = ((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))(ci || {});
|
|
3810
3842
|
function G(e, a, u = document) {
|
|
3811
3843
|
const m2 = { capture: true, passive: true };
|
|
3812
3844
|
return u.addEventListener(e, a, m2), () => u.removeEventListener(e, a, m2);
|
|
3813
3845
|
}
|
|
3814
|
-
const
|
|
3815
|
-
let
|
|
3816
|
-
console.error(
|
|
3817
|
-
}, has: () => (console.error(
|
|
3818
|
-
console.error(
|
|
3846
|
+
const ui = "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.";
|
|
3847
|
+
let pi = { map: {}, getId: () => (console.error(ui), -1), getNode: () => (console.error(ui), null), removeNodeFromMap() {
|
|
3848
|
+
console.error(ui);
|
|
3849
|
+
}, has: () => (console.error(ui), false), reset() {
|
|
3850
|
+
console.error(ui);
|
|
3819
3851
|
} };
|
|
3820
3852
|
function $e(e, a, u = {}) {
|
|
3821
3853
|
let m2 = null, w2 = 0;
|
|
@@ -3849,8 +3881,8 @@ function Re(e, a, u) {
|
|
|
3849
3881
|
};
|
|
3850
3882
|
}
|
|
3851
3883
|
}
|
|
3852
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3853
|
-
let
|
|
3884
|
+
typeof window < "u" && window.Proxy && window.Reflect && (pi = new Proxy(pi, { get: (e, a, u) => ("map" === a && console.error(ui), Reflect.get(e, a, u)) }));
|
|
3885
|
+
let di, hi = Date.now;
|
|
3854
3886
|
function po(e) {
|
|
3855
3887
|
var a, u, m2, w2, b2, C2;
|
|
3856
3888
|
const x2 = e.document;
|
|
@@ -3897,7 +3929,7 @@ function bo(e, a) {
|
|
|
3897
3929
|
function Fs(e) {
|
|
3898
3930
|
return !(null == e || !e.shadowRoot);
|
|
3899
3931
|
}
|
|
3900
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3932
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (hi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3901
3933
|
class _l {
|
|
3902
3934
|
constructor() {
|
|
3903
3935
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3942,11 +3974,11 @@ function vo(e) {
|
|
|
3942
3974
|
const a = e.ownerDocument;
|
|
3943
3975
|
return !!a && (a.contains(e) || zl(e));
|
|
3944
3976
|
}
|
|
3945
|
-
const M = (e) =>
|
|
3977
|
+
const M = (e) => di ? (...a) => {
|
|
3946
3978
|
try {
|
|
3947
3979
|
return e(...a);
|
|
3948
3980
|
} catch (e2) {
|
|
3949
|
-
if (
|
|
3981
|
+
if (di && true === di(e2)) return;
|
|
3950
3982
|
throw e2;
|
|
3951
3983
|
}
|
|
3952
3984
|
} : e;
|
|
@@ -4005,22 +4037,22 @@ class Vl {
|
|
|
4005
4037
|
transformCrossOriginEvent(e, a) {
|
|
4006
4038
|
var u;
|
|
4007
4039
|
switch (a.type) {
|
|
4008
|
-
case
|
|
4040
|
+
case ti.FullSnapshot: {
|
|
4009
4041
|
this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(a.data.node, e);
|
|
4010
4042
|
const u2 = a.data.node.id;
|
|
4011
|
-
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type:
|
|
4043
|
+
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: ti.IncrementalSnapshot, data: { source: si.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
4012
4044
|
}
|
|
4013
|
-
case
|
|
4014
|
-
case
|
|
4015
|
-
case
|
|
4045
|
+
case ti.Meta:
|
|
4046
|
+
case ti.Load:
|
|
4047
|
+
case ti.DomContentLoaded:
|
|
4016
4048
|
return false;
|
|
4017
|
-
case
|
|
4049
|
+
case ti.Plugin:
|
|
4018
4050
|
return a;
|
|
4019
|
-
case
|
|
4051
|
+
case ti.Custom:
|
|
4020
4052
|
return this.replaceIds(a.data.payload, e, ["id", "parentId", "previousId", "nextId"]), a;
|
|
4021
|
-
case
|
|
4053
|
+
case ti.IncrementalSnapshot:
|
|
4022
4054
|
switch (a.data.source) {
|
|
4023
|
-
case
|
|
4055
|
+
case si.Mutation:
|
|
4024
4056
|
return a.data.adds.forEach((a2) => {
|
|
4025
4057
|
this.replaceIds(a2, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a2.node, e);
|
|
4026
4058
|
const u2 = this.crossOriginIframeRootIdMap.get(e);
|
|
@@ -4032,30 +4064,30 @@ class Vl {
|
|
|
4032
4064
|
}), a.data.texts.forEach((a2) => {
|
|
4033
4065
|
this.replaceIds(a2, e, ["id"]);
|
|
4034
4066
|
}), a;
|
|
4035
|
-
case
|
|
4036
|
-
case
|
|
4037
|
-
case
|
|
4067
|
+
case si.Drag:
|
|
4068
|
+
case si.TouchMove:
|
|
4069
|
+
case si.MouseMove:
|
|
4038
4070
|
return a.data.positions.forEach((a2) => {
|
|
4039
4071
|
this.replaceIds(a2, e, ["id"]);
|
|
4040
4072
|
}), a;
|
|
4041
|
-
case
|
|
4073
|
+
case si.ViewportResize:
|
|
4042
4074
|
return false;
|
|
4043
|
-
case
|
|
4044
|
-
case
|
|
4045
|
-
case
|
|
4046
|
-
case
|
|
4047
|
-
case
|
|
4075
|
+
case si.MediaInteraction:
|
|
4076
|
+
case si.MouseInteraction:
|
|
4077
|
+
case si.Scroll:
|
|
4078
|
+
case si.CanvasMutation:
|
|
4079
|
+
case si.Input:
|
|
4048
4080
|
return this.replaceIds(a.data, e, ["id"]), a;
|
|
4049
|
-
case
|
|
4050
|
-
case
|
|
4081
|
+
case si.StyleSheetRule:
|
|
4082
|
+
case si.StyleDeclaration:
|
|
4051
4083
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleId"]), a;
|
|
4052
|
-
case
|
|
4084
|
+
case si.Font:
|
|
4053
4085
|
return a;
|
|
4054
|
-
case
|
|
4086
|
+
case si.Selection:
|
|
4055
4087
|
return a.data.ranges.forEach((a2) => {
|
|
4056
4088
|
this.replaceIds(a2, e, ["start", "end"]);
|
|
4057
4089
|
}), a;
|
|
4058
|
-
case
|
|
4090
|
+
case si.AdoptedStyleSheet:
|
|
4059
4091
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleIds"]), null == (u = a.data.styles) || u.forEach((a2) => {
|
|
4060
4092
|
this.replaceStyleIds(a2, e, ["styleId"]);
|
|
4061
4093
|
}), a;
|
|
@@ -4079,7 +4111,7 @@ class Vl {
|
|
|
4079
4111
|
});
|
|
4080
4112
|
}
|
|
4081
4113
|
patchRootIdOnNode(e, a) {
|
|
4082
|
-
e.type !==
|
|
4114
|
+
e.type !== dt.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
|
|
4083
4115
|
this.patchRootIdOnNode(e2, a);
|
|
4084
4116
|
});
|
|
4085
4117
|
}
|
|
@@ -4297,7 +4329,7 @@ function ko(e, a) {
|
|
|
4297
4329
|
const { parentNode: u } = a;
|
|
4298
4330
|
return !!u && (!!e.has(u) || ko(e, u));
|
|
4299
4331
|
}
|
|
4300
|
-
const
|
|
4332
|
+
const fi = [];
|
|
4301
4333
|
function tt(e) {
|
|
4302
4334
|
try {
|
|
4303
4335
|
if ("composedPath" in e) {
|
|
@@ -4311,7 +4343,7 @@ function tt(e) {
|
|
|
4311
4343
|
function Co(e, a) {
|
|
4312
4344
|
var u, m2;
|
|
4313
4345
|
const w2 = new Zl();
|
|
4314
|
-
|
|
4346
|
+
fi.push(w2), w2.init(e);
|
|
4315
4347
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4316
4348
|
const C2 = null == (m2 = null == (u = null == window ? void 0 : window.Zone) ? void 0 : u.__symbol__) ? void 0 : m2.call(u, "MutationObserver");
|
|
4317
4349
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4323,7 +4355,7 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4323
4355
|
};
|
|
4324
4356
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4325
4357
|
let I2 = null;
|
|
4326
|
-
return Object.keys(
|
|
4358
|
+
return Object.keys(ii).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
|
|
4327
4359
|
let C3 = fe(b3);
|
|
4328
4360
|
const _2 = /* @__PURE__ */ ((a2) => (b4) => {
|
|
4329
4361
|
const C4 = tt(b4);
|
|
@@ -4332,29 +4364,29 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4332
4364
|
if ("pointerType" in b4) {
|
|
4333
4365
|
switch (b4.pointerType) {
|
|
4334
4366
|
case "mouse":
|
|
4335
|
-
x3 =
|
|
4367
|
+
x3 = ai.Mouse;
|
|
4336
4368
|
break;
|
|
4337
4369
|
case "touch":
|
|
4338
|
-
x3 =
|
|
4370
|
+
x3 = ai.Touch;
|
|
4339
4371
|
break;
|
|
4340
4372
|
case "pen":
|
|
4341
|
-
x3 =
|
|
4373
|
+
x3 = ai.Pen;
|
|
4342
4374
|
}
|
|
4343
|
-
x3 ===
|
|
4344
|
-
} else Ds(b4) && (x3 =
|
|
4345
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4375
|
+
x3 === ai.Touch ? ii[a2] === ii.MouseDown ? _3 = "TouchStart" : ii[a2] === ii.MouseUp && (_3 = "TouchEnd") : ai.Pen;
|
|
4376
|
+
} else Ds(b4) && (x3 = ai.Touch);
|
|
4377
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === ai.Touch || _3.startsWith("Mouse") && x3 === ai.Mouse) && (x3 = null)) : ii[a2] === ii.Click && (x3 = I2, I2 = null);
|
|
4346
4378
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4347
4379
|
if (!O2) return;
|
|
4348
4380
|
const E2 = u.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4349
|
-
M(e)({ type:
|
|
4381
|
+
M(e)({ type: ii[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4350
4382
|
})(b3);
|
|
4351
|
-
if (window.PointerEvent) switch (
|
|
4352
|
-
case
|
|
4353
|
-
case
|
|
4383
|
+
if (window.PointerEvent) switch (ii[b3]) {
|
|
4384
|
+
case ii.MouseDown:
|
|
4385
|
+
case ii.MouseUp:
|
|
4354
4386
|
C3 = C3.replace("mouse", "pointer");
|
|
4355
4387
|
break;
|
|
4356
|
-
case
|
|
4357
|
-
case
|
|
4388
|
+
case ii.TouchStart:
|
|
4389
|
+
case ii.TouchEnd:
|
|
4358
4390
|
return;
|
|
4359
4391
|
}
|
|
4360
4392
|
x2.push(G(C3, _2, a));
|
|
@@ -4373,7 +4405,7 @@ function xo({ scrollCb: e, doc: a, mirror: u, blockClass: m2, blockSelector: w2,
|
|
|
4373
4405
|
} else e({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4374
4406
|
}), b2.scroll || 100)), a);
|
|
4375
4407
|
}
|
|
4376
|
-
const
|
|
4408
|
+
const mi = ["INPUT", "TEXTAREA", "SELECT"], gi = /* @__PURE__ */ new WeakMap();
|
|
4377
4409
|
function ql({ deviceChangeCb: e }) {
|
|
4378
4410
|
const t = (a2, u2) => {
|
|
4379
4411
|
const m2 = a2.device.productName ? [a2.device.productName] : ["Unknown USB Device"];
|
|
@@ -4493,7 +4525,7 @@ function au(e, a = {}) {
|
|
|
4493
4525
|
e2(x3.map((e3) => (e3.timeOffset -= u3, e3)), a3), x3 = [], C3 = null;
|
|
4494
4526
|
}), b3), _3 = M($e(M((e3) => {
|
|
4495
4527
|
const a3 = tt(e3), { clientX: u3, clientY: w4 } = Ds(e3) ? e3.changedTouches[0] : e3;
|
|
4496
|
-
C3 || (C3 =
|
|
4528
|
+
C3 || (C3 = hi()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: hi() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? si.Drag : e3 instanceof MouseEvent ? si.MouseMove : si.TouchMove);
|
|
4497
4529
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u2), G("touchmove", _3, u2), G("drag", _3, u2)];
|
|
4498
4530
|
return M(() => {
|
|
4499
4531
|
O3.forEach((e3) => e3());
|
|
@@ -4509,7 +4541,7 @@ function au(e, a = {}) {
|
|
|
4509
4541
|
function p(e3) {
|
|
4510
4542
|
let u3 = tt(e3);
|
|
4511
4543
|
const _4 = e3.isTrusted, E4 = u3 && u3.tagName;
|
|
4512
|
-
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 ||
|
|
4544
|
+
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || mi.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
|
|
4513
4545
|
let D4 = u3.value, F4 = false;
|
|
4514
4546
|
const U4 = Yt(u3) || "", { value: B2, masked: $2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4515
4547
|
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 });
|
|
@@ -4522,9 +4554,9 @@ function au(e, a = {}) {
|
|
|
4522
4554
|
});
|
|
4523
4555
|
}
|
|
4524
4556
|
function f2(a3, m4) {
|
|
4525
|
-
const w4 =
|
|
4557
|
+
const w4 = gi.get(a3);
|
|
4526
4558
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4527
|
-
|
|
4559
|
+
gi.set(a3, m4);
|
|
4528
4560
|
const w5 = u2.getId(a3);
|
|
4529
4561
|
M(e2)({ ...m4, id: w5 });
|
|
4530
4562
|
}
|
|
@@ -4549,7 +4581,7 @@ function au(e, a = {}) {
|
|
|
4549
4581
|
const { value: e3, masked: a4 } = Zt({ element: w4, maskInputOptions: u2, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4550
4582
|
_3 = e3, b3 = a4;
|
|
4551
4583
|
}
|
|
4552
|
-
e2({ source:
|
|
4584
|
+
e2({ source: si.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
|
|
4553
4585
|
var a4;
|
|
4554
4586
|
const u3 = [];
|
|
4555
4587
|
for (; e3; ) {
|
|
@@ -4577,7 +4609,7 @@ function au(e, a = {}) {
|
|
|
4577
4609
|
if (!C4 || Z(C4, a2, u2, true)) return;
|
|
4578
4610
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4579
4611
|
e2({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4580
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4612
|
+
}), w3.media || 500)), x3 = [G("play", C3(ci.Play), b3), G("pause", C3(ci.Pause), b3), G("seeked", C3(ci.Seeked), b3), G("volumechange", C3(ci.VolumeChange), b3), G("ratechange", C3(ci.RateChange), b3)];
|
|
4581
4613
|
return M(() => {
|
|
4582
4614
|
x3.forEach((e3) => e3());
|
|
4583
4615
|
});
|
|
@@ -4698,7 +4730,7 @@ function au(e, a = {}) {
|
|
|
4698
4730
|
})(e), U2 = [];
|
|
4699
4731
|
for (const a2 of e.plugins) U2.push(a2.observer(a2.callback, u, a2.options));
|
|
4700
4732
|
return M(() => {
|
|
4701
|
-
|
|
4733
|
+
fi.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());
|
|
4702
4734
|
});
|
|
4703
4735
|
}
|
|
4704
4736
|
function ft(e) {
|
|
@@ -4707,29 +4739,29 @@ function ft(e) {
|
|
|
4707
4739
|
function mt(e) {
|
|
4708
4740
|
return !!(typeof window[e] < "u" && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype);
|
|
4709
4741
|
}
|
|
4710
|
-
const
|
|
4711
|
-
var
|
|
4742
|
+
const yi = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", Mi = typeof self < "u" && self.Blob && new Blob([(Ii = yi, Uint8Array.from(atob(Ii), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4743
|
+
var Ii;
|
|
4712
4744
|
function uu(e) {
|
|
4713
4745
|
let a;
|
|
4714
4746
|
try {
|
|
4715
|
-
if (a =
|
|
4747
|
+
if (a = Mi && (self.URL || self.webkitURL).createObjectURL(Mi), !a) throw "";
|
|
4716
4748
|
const u = new Worker(a, { name: null == e ? void 0 : e.name });
|
|
4717
4749
|
return u.addEventListener("error", () => {
|
|
4718
4750
|
(self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4719
4751
|
}), u;
|
|
4720
4752
|
} catch {
|
|
4721
|
-
return new Worker("data:text/javascript;base64," +
|
|
4753
|
+
return new Worker("data:text/javascript;base64," + yi, { name: null == e ? void 0 : e.name });
|
|
4722
4754
|
} finally {
|
|
4723
4755
|
a && (self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4724
4756
|
}
|
|
4725
4757
|
}
|
|
4726
|
-
for (var
|
|
4727
|
-
const
|
|
4758
|
+
for (var Li = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ri = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Ai = 0; Ai < 64; Ai++) Ri[Li.charCodeAt(Ai)] = Ai;
|
|
4759
|
+
const Ti = /* @__PURE__ */ new Map();
|
|
4728
4760
|
const Oo = (e, a, u) => {
|
|
4729
4761
|
if (!e || !Ro(e, a) && "object" != typeof e) return;
|
|
4730
4762
|
const m2 = (function pu(e2, a2) {
|
|
4731
|
-
let u2 =
|
|
4732
|
-
return u2 || (u2 = /* @__PURE__ */ new Map(),
|
|
4763
|
+
let u2 = Ti.get(e2);
|
|
4764
|
+
return u2 || (u2 = /* @__PURE__ */ new Map(), Ti.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
|
|
4733
4765
|
})(u, e.constructor.name);
|
|
4734
4766
|
let w2 = m2.indexOf(e);
|
|
4735
4767
|
return -1 === w2 && (w2 = m2.length, m2.push(e)), w2;
|
|
@@ -4741,7 +4773,7 @@ function Ot(e, a, u) {
|
|
|
4741
4773
|
if (e instanceof ArrayBuffer) {
|
|
4742
4774
|
const a2 = e.constructor.name, u2 = (function(e2) {
|
|
4743
4775
|
var a3, u3 = new Uint8Array(e2), m2 = u3.length, w2 = "";
|
|
4744
|
-
for (a3 = 0; a3 < m2; a3 += 3) w2 +=
|
|
4776
|
+
for (a3 = 0; a3 < m2; a3 += 3) w2 += Li[u3[a3] >> 2], w2 += Li[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += Li[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += Li[63 & u3[a3 + 2]];
|
|
4745
4777
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4746
4778
|
})(e);
|
|
4747
4779
|
return { rr_type: a2, base64: u2 };
|
|
@@ -4838,7 +4870,7 @@ class gu {
|
|
|
4838
4870
|
const { id: a2 } = e2.data;
|
|
4839
4871
|
if (C2.set(a2, false), !("base64" in e2.data)) return;
|
|
4840
4872
|
const { base64: u2, type: m3, width: w3, height: b3 } = e2.data;
|
|
4841
|
-
this.mutationCb({ id: a2, type:
|
|
4873
|
+
this.mutationCb({ id: a2, type: li["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] }] });
|
|
4842
4874
|
};
|
|
4843
4875
|
const I2 = 1e3 / e;
|
|
4844
4876
|
let _2, O2 = 0;
|
|
@@ -4874,14 +4906,14 @@ class gu {
|
|
|
4874
4906
|
return function(...b5) {
|
|
4875
4907
|
return Z(this.canvas, u2, m3, true) || setTimeout(() => {
|
|
4876
4908
|
const u3 = Eo(b5, a2, this);
|
|
4877
|
-
e2(this.canvas, { type:
|
|
4909
|
+
e2(this.canvas, { type: li["2D"], property: C2, args: u3 });
|
|
4878
4910
|
}, 0), w4.apply(this, b5);
|
|
4879
4911
|
};
|
|
4880
4912
|
});
|
|
4881
4913
|
w3.push(b4);
|
|
4882
4914
|
} catch {
|
|
4883
4915
|
const u3 = qt(a2.CanvasRenderingContext2D.prototype, C2, { set(a3) {
|
|
4884
|
-
e2(this.canvas, { type:
|
|
4916
|
+
e2(this.canvas, { type: li["2D"], property: C2, args: [a3], setter: true });
|
|
4885
4917
|
} });
|
|
4886
4918
|
w3.push(u3);
|
|
4887
4919
|
}
|
|
@@ -4890,7 +4922,7 @@ class gu {
|
|
|
4890
4922
|
};
|
|
4891
4923
|
})(this.processMutation.bind(this), e, a, u), b2 = (function mu(e2, a2, u2, m3) {
|
|
4892
4924
|
const w3 = [];
|
|
4893
|
-
return w3.push(...tr(a2.WebGLRenderingContext.prototype,
|
|
4925
|
+
return w3.push(...tr(a2.WebGLRenderingContext.prototype, li.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, li.WebGL2, e2, u2, m3, a2)), () => {
|
|
4894
4926
|
w3.forEach((e3) => e3());
|
|
4895
4927
|
};
|
|
4896
4928
|
})(this.processMutation.bind(this), e, a, u);
|
|
@@ -5001,23 +5033,23 @@ class bu {
|
|
|
5001
5033
|
trackStylesheetInLinkElement(e) {
|
|
5002
5034
|
}
|
|
5003
5035
|
}
|
|
5004
|
-
let
|
|
5005
|
-
var
|
|
5036
|
+
let Ni, Pi, qi, Hi = false;
|
|
5037
|
+
var Ji;
|
|
5006
5038
|
try {
|
|
5007
5039
|
if (2 !== Array.from([1], (e) => 2 * e)[0]) {
|
|
5008
5040
|
const e = document.createElement("iframe");
|
|
5009
|
-
document.body.appendChild(e), Array.from = (null == (
|
|
5041
|
+
document.body.appendChild(e), Array.from = (null == (Ji = e.contentWindow) ? void 0 : Ji.Array.from) || Array.from, document.body.removeChild(e);
|
|
5010
5042
|
}
|
|
5011
|
-
} catch (
|
|
5012
|
-
console.debug("Unable to override Array.from",
|
|
5043
|
+
} catch (Ii2) {
|
|
5044
|
+
console.debug("Unable to override Array.from", Ii2);
|
|
5013
5045
|
}
|
|
5014
|
-
const
|
|
5015
|
-
return new
|
|
5046
|
+
const Xi = (function Ci() {
|
|
5047
|
+
return new ht();
|
|
5016
5048
|
})();
|
|
5017
5049
|
function ae(e = {}) {
|
|
5018
5050
|
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;
|
|
5019
5051
|
!(function Bl(e2) {
|
|
5020
|
-
|
|
5052
|
+
di = e2;
|
|
5021
5053
|
})(se2);
|
|
5022
5054
|
const ie2 = !Y2 || window.parent === window;
|
|
5023
5055
|
let le2 = false;
|
|
@@ -5029,7 +5061,7 @@ function ae(e = {}) {
|
|
|
5029
5061
|
if (ie2 && !a) throw new Error("emit function is required");
|
|
5030
5062
|
if (!ie2 && !le2) return () => {
|
|
5031
5063
|
};
|
|
5032
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5064
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), Xi.reset();
|
|
5033
5065
|
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 || {};
|
|
5034
5066
|
!(function Ul(e2 = window) {
|
|
5035
5067
|
"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) => {
|
|
@@ -5046,57 +5078,57 @@ function ae(e = {}) {
|
|
|
5046
5078
|
for (const a2 of ne2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
|
|
5047
5079
|
return z2 && !le2 && (e2 = z2(e2)), e2;
|
|
5048
5080
|
};
|
|
5049
|
-
|
|
5081
|
+
Ni = (e2, w3) => {
|
|
5050
5082
|
var b3;
|
|
5051
5083
|
const C3 = e2;
|
|
5052
|
-
if (C3.timestamp =
|
|
5084
|
+
if (C3.timestamp = hi(), null != (b3 = fi[0]) && b3.isFrozen() && C3.type !== ti.FullSnapshot && !(C3.type === ti.IncrementalSnapshot && C3.data.source === si.Mutation) && fi.forEach((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
|
|
5053
5085
|
else if (le2) {
|
|
5054
5086
|
const e3 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
5055
5087
|
window.parent.postMessage(e3, "*");
|
|
5056
5088
|
}
|
|
5057
|
-
if (C3.type ===
|
|
5058
|
-
else if (C3.type ===
|
|
5059
|
-
if (C3.data.source ===
|
|
5089
|
+
if (C3.type === ti.FullSnapshot) de2 = C3, he2 = 0;
|
|
5090
|
+
else if (C3.type === ti.IncrementalSnapshot) {
|
|
5091
|
+
if (C3.data.source === si.Mutation && C3.data.isAttachIframe) return;
|
|
5060
5092
|
he2++;
|
|
5061
5093
|
const e3 = m2 && he2 >= m2, a2 = u && C3.timestamp - de2.timestamp > u;
|
|
5062
|
-
(e3 || a2) &&
|
|
5094
|
+
(e3 || a2) && Pi(true);
|
|
5063
5095
|
}
|
|
5064
5096
|
};
|
|
5065
5097
|
const rt = (e2) => {
|
|
5066
|
-
|
|
5067
|
-
}, kn = (e2) =>
|
|
5068
|
-
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror:
|
|
5098
|
+
Ni({ type: ti.IncrementalSnapshot, data: { source: si.Mutation, ...e2 } });
|
|
5099
|
+
}, kn = (e2) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.Scroll, ...e2 } }), Cn = (e2) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: Xi, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: Ni });
|
|
5100
|
+
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: Xi, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
5069
5101
|
const ye2 = new yu();
|
|
5070
|
-
|
|
5071
|
-
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:
|
|
5072
|
-
|
|
5102
|
+
qi = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: Xi, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5103
|
+
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: qi, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: Xi });
|
|
5104
|
+
Pi = (e2 = false) => {
|
|
5073
5105
|
if (!H2) return;
|
|
5074
|
-
|
|
5106
|
+
Ni({ type: ti.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), fi.forEach((e3) => e3.lock());
|
|
5075
5107
|
const a2 = (function Zi(e3, a3) {
|
|
5076
|
-
const { mirror: u2 = new
|
|
5108
|
+
const { mirror: u2 = new ht(), 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 || {};
|
|
5077
5109
|
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 });
|
|
5078
|
-
})(document, { mirror:
|
|
5079
|
-
wo(e3,
|
|
5110
|
+
})(document, { mirror: Xi, 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) => {
|
|
5111
|
+
wo(e3, Xi) && ge2.addIframe(e3), bo(e3, Xi) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
|
|
5080
5112
|
}, onIframeLoad: (e3, a3) => {
|
|
5081
5113
|
ge2.attachIframe(e3, a3), we2.observeAttachShadow(e3);
|
|
5082
5114
|
}, onStylesheetLoad: (e3, a3) => {
|
|
5083
5115
|
me2.attachLinkElement(e3, a3);
|
|
5084
5116
|
}, keepIframeSrcFn: re2 });
|
|
5085
5117
|
if (!a2) return console.warn("Failed to snapshot the document");
|
|
5086
|
-
|
|
5118
|
+
Ni({ type: ti.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), fi.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, Xi.getId(document));
|
|
5087
5119
|
};
|
|
5088
5120
|
try {
|
|
5089
5121
|
const e2 = [], K = (e3) => {
|
|
5090
5122
|
var a2;
|
|
5091
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) =>
|
|
5092
|
-
|
|
5123
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => Ni({ type: ti.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.ViewportResize, ...e4 } }), inputCb: (e4) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.Input, ...e4 } }), mediaInteractionCb: (e4) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => Ni({ type: ti.IncrementalSnapshot, data: { source: si.Font, ...e4 } }), selectionCb: (e4) => {
|
|
5124
|
+
Ni({ type: ti.IncrementalSnapshot, data: { source: si.Selection, ...e4 } });
|
|
5093
5125
|
}, customElementCb: (e4) => {
|
|
5094
|
-
|
|
5126
|
+
Ni({ type: ti.IncrementalSnapshot, data: { source: si.CustomElement, ...e4 } });
|
|
5095
5127
|
}, typingCb: (e4) => {
|
|
5096
|
-
|
|
5128
|
+
Ni({ type: ti.IncrementalSnapshot, data: { ...e4 } });
|
|
5097
5129
|
}, deviceChangeCb: (e4) => {
|
|
5098
|
-
|
|
5099
|
-
}, 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:
|
|
5130
|
+
Ni({ type: ti.Device, data: { ...e4 } });
|
|
5131
|
+
}, 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: Xi, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: qi, 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) => Ni({ type: ti.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, $2);
|
|
5100
5132
|
};
|
|
5101
5133
|
ge2.addLoadListener((a2) => {
|
|
5102
5134
|
try {
|
|
@@ -5106,15 +5138,15 @@ function ae(e = {}) {
|
|
|
5106
5138
|
}
|
|
5107
5139
|
});
|
|
5108
5140
|
const W = () => {
|
|
5109
|
-
|
|
5141
|
+
Pi(), e2.push(K(document)), Hi = true;
|
|
5110
5142
|
};
|
|
5111
5143
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e2.push(G("DOMContentLoaded", () => {
|
|
5112
|
-
|
|
5144
|
+
Ni({ type: ti.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5113
5145
|
})), e2.push(G("load", () => {
|
|
5114
|
-
|
|
5146
|
+
Ni({ type: ti.Load, data: {} }), "load" === X2 && W();
|
|
5115
5147
|
}, window))), () => {
|
|
5116
|
-
e2.forEach((e3) => e3()), ye2.destroy(),
|
|
5117
|
-
|
|
5148
|
+
e2.forEach((e3) => e3()), ye2.destroy(), Hi = false, (function jl() {
|
|
5149
|
+
di = void 0;
|
|
5118
5150
|
})();
|
|
5119
5151
|
};
|
|
5120
5152
|
} catch (e2) {
|
|
@@ -5141,24 +5173,24 @@ function vu(e) {
|
|
|
5141
5173
|
}), u;
|
|
5142
5174
|
}
|
|
5143
5175
|
ae.addCustomEvent = (e, a) => {
|
|
5144
|
-
if (!
|
|
5145
|
-
|
|
5176
|
+
if (!Hi) throw new Error("please add custom event after start recording");
|
|
5177
|
+
Ni({ type: ti.Custom, data: { tag: e, payload: a } });
|
|
5146
5178
|
}, ae.addSailfishEvent = (e, a) => {
|
|
5147
|
-
if (!
|
|
5148
|
-
|
|
5179
|
+
if (!Hi) throw new Error("please add Sailfish event after start recording");
|
|
5180
|
+
Ni({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
|
|
5149
5181
|
}, ae.freezePage = () => {
|
|
5150
|
-
|
|
5182
|
+
fi.forEach((e) => e.freeze());
|
|
5151
5183
|
}, ae.takeFullSnapshot = (e) => {
|
|
5152
|
-
if (!
|
|
5153
|
-
|
|
5154
|
-
}, ae.mirror =
|
|
5155
|
-
var
|
|
5156
|
-
return { isColorSupported: false, reset:
|
|
5184
|
+
if (!Hi) throw new Error("please take full snapshot after start recording");
|
|
5185
|
+
Pi(e);
|
|
5186
|
+
}, ae.mirror = Xi;
|
|
5187
|
+
var Qi = { exports: {} }, ea = String, Lo = function() {
|
|
5188
|
+
return { isColorSupported: false, reset: ea, bold: ea, dim: ea, italic: ea, underline: ea, inverse: ea, hidden: ea, strikethrough: ea, black: ea, red: ea, green: ea, yellow: ea, blue: ea, magenta: ea, cyan: ea, white: ea, gray: ea, bgBlack: ea, bgRed: ea, bgGreen: ea, bgYellow: ea, bgBlue: ea, bgMagenta: ea, bgCyan: ea, bgWhite: ea, blackBright: ea, redBright: ea, greenBright: ea, yellowBright: ea, blueBright: ea, magentaBright: ea, cyanBright: ea, whiteBright: ea, bgBlackBright: ea, bgRedBright: ea, bgGreenBright: ea, bgYellowBright: ea, bgBlueBright: ea, bgMagentaBright: ea, bgCyanBright: ea, bgWhiteBright: ea };
|
|
5157
5189
|
};
|
|
5158
|
-
|
|
5159
|
-
var
|
|
5160
|
-
const
|
|
5161
|
-
let
|
|
5190
|
+
Qi.exports = Lo(), Qi.exports.createColors = Lo;
|
|
5191
|
+
var ta = Qi.exports;
|
|
5192
|
+
const na = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5193
|
+
let ra = ta, oa = na, sa = class To extends Error {
|
|
5162
5194
|
constructor(e, a, u, m2, w2, b2) {
|
|
5163
5195
|
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);
|
|
5164
5196
|
}
|
|
@@ -5168,11 +5200,11 @@ let ea = Xi, ta = Qi, na = class To extends Error {
|
|
|
5168
5200
|
showSourceCode(e) {
|
|
5169
5201
|
if (!this.source) return "";
|
|
5170
5202
|
let a = this.source;
|
|
5171
|
-
null == e && (e =
|
|
5203
|
+
null == e && (e = ra.isColorSupported);
|
|
5172
5204
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
5173
5205
|
if (e) {
|
|
5174
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
5175
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
5206
|
+
let { bold: e2, gray: a2, red: u2 } = ra.createColors(true);
|
|
5207
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), oa && (i = (e3) => oa(e3));
|
|
5176
5208
|
}
|
|
5177
5209
|
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;
|
|
5178
5210
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -5193,10 +5225,10 @@ let ea = Xi, ta = Qi, na = class To extends Error {
|
|
|
5193
5225
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
5194
5226
|
}
|
|
5195
5227
|
};
|
|
5196
|
-
var
|
|
5197
|
-
|
|
5198
|
-
const
|
|
5199
|
-
let
|
|
5228
|
+
var ia = sa;
|
|
5229
|
+
sa.default = sa;
|
|
5230
|
+
const aa = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5231
|
+
let la = class {
|
|
5200
5232
|
constructor(e) {
|
|
5201
5233
|
this.builder = e;
|
|
5202
5234
|
}
|
|
@@ -5248,7 +5280,7 @@ let sa = class {
|
|
|
5248
5280
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
5249
5281
|
let w2 = e.parent;
|
|
5250
5282
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
5251
|
-
if (!w2) return
|
|
5283
|
+
if (!w2) return aa[u];
|
|
5252
5284
|
let b2 = e.root();
|
|
5253
5285
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
5254
5286
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -5260,7 +5292,7 @@ let sa = class {
|
|
|
5260
5292
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
5261
5293
|
});
|
|
5262
5294
|
}
|
|
5263
|
-
return typeof m2 > "u" && (m2 =
|
|
5295
|
+
return typeof m2 > "u" && (m2 = aa[u]), b2.rawCache[u] = m2, m2;
|
|
5264
5296
|
}
|
|
5265
5297
|
rawBeforeClose(e) {
|
|
5266
5298
|
let a;
|
|
@@ -5336,17 +5368,17 @@ let sa = class {
|
|
|
5336
5368
|
this[e.type](e, a);
|
|
5337
5369
|
}
|
|
5338
5370
|
};
|
|
5339
|
-
var
|
|
5340
|
-
|
|
5341
|
-
let
|
|
5371
|
+
var ca = la;
|
|
5372
|
+
la.default = la;
|
|
5373
|
+
let ua = ca;
|
|
5342
5374
|
function zs(e, a) {
|
|
5343
|
-
new
|
|
5375
|
+
new ua(a).stringify(e);
|
|
5344
5376
|
}
|
|
5345
|
-
var
|
|
5377
|
+
var pa = zs;
|
|
5346
5378
|
zs.default = zs;
|
|
5347
|
-
var
|
|
5348
|
-
|
|
5349
|
-
let
|
|
5379
|
+
var ha = {};
|
|
5380
|
+
ha.isClean = Symbol("isClean"), ha.my = Symbol("my");
|
|
5381
|
+
let fa = ia, ma = ca, ga = pa, { isClean: ya, my: wa } = ha;
|
|
5350
5382
|
function Bs(e, a) {
|
|
5351
5383
|
let u = new e.constructor();
|
|
5352
5384
|
for (let m2 in e) {
|
|
@@ -5368,12 +5400,12 @@ function Fe(e, a) {
|
|
|
5368
5400
|
}
|
|
5369
5401
|
return w2;
|
|
5370
5402
|
}
|
|
5371
|
-
let
|
|
5403
|
+
let Sa = class {
|
|
5372
5404
|
get proxyOf() {
|
|
5373
5405
|
return this;
|
|
5374
5406
|
}
|
|
5375
5407
|
constructor(e = {}) {
|
|
5376
|
-
this.raws = {}, this[
|
|
5408
|
+
this.raws = {}, this[ya] = false, this[wa] = true;
|
|
5377
5409
|
for (let a in e) if ("nodes" === a) {
|
|
5378
5410
|
this.nodes = [];
|
|
5379
5411
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -5417,19 +5449,19 @@ let ga = class {
|
|
|
5417
5449
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
5418
5450
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
5419
5451
|
}
|
|
5420
|
-
return new
|
|
5452
|
+
return new fa(e);
|
|
5421
5453
|
}
|
|
5422
5454
|
getProxyProcessor() {
|
|
5423
5455
|
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) };
|
|
5424
5456
|
}
|
|
5425
5457
|
markClean() {
|
|
5426
|
-
this[
|
|
5458
|
+
this[ya] = true;
|
|
5427
5459
|
}
|
|
5428
5460
|
markDirty() {
|
|
5429
|
-
if (this[
|
|
5430
|
-
this[
|
|
5461
|
+
if (this[ya]) {
|
|
5462
|
+
this[ya] = false;
|
|
5431
5463
|
let e = this;
|
|
5432
|
-
for (; e = e.parent; ) e[
|
|
5464
|
+
for (; e = e.parent; ) e[ya] = false;
|
|
5433
5465
|
}
|
|
5434
5466
|
}
|
|
5435
5467
|
next() {
|
|
@@ -5465,7 +5497,7 @@ let ga = class {
|
|
|
5465
5497
|
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 };
|
|
5466
5498
|
}
|
|
5467
5499
|
raw(e, a) {
|
|
5468
|
-
return new
|
|
5500
|
+
return new ma().raw(this, e, a);
|
|
5469
5501
|
}
|
|
5470
5502
|
remove() {
|
|
5471
5503
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5502,7 +5534,7 @@ let ga = class {
|
|
|
5502
5534
|
toProxy() {
|
|
5503
5535
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5504
5536
|
}
|
|
5505
|
-
toString(e =
|
|
5537
|
+
toString(e = ga) {
|
|
5506
5538
|
e.stringify && (e = e.stringify);
|
|
5507
5539
|
let a = "";
|
|
5508
5540
|
return e(this, (e2) => {
|
|
@@ -5515,16 +5547,16 @@ let ga = class {
|
|
|
5515
5547
|
return e.warn(a, m2);
|
|
5516
5548
|
}
|
|
5517
5549
|
};
|
|
5518
|
-
var
|
|
5519
|
-
|
|
5520
|
-
let
|
|
5550
|
+
var ba = Sa;
|
|
5551
|
+
Sa.default = Sa;
|
|
5552
|
+
let va = ba, Ca = class extends va {
|
|
5521
5553
|
constructor(e) {
|
|
5522
5554
|
super(e), this.type = "comment";
|
|
5523
5555
|
}
|
|
5524
5556
|
};
|
|
5525
|
-
var
|
|
5526
|
-
|
|
5527
|
-
let
|
|
5557
|
+
var ka = Ca;
|
|
5558
|
+
Ca.default = Ca;
|
|
5559
|
+
let xa = ba, Ma = class extends xa {
|
|
5528
5560
|
get variable() {
|
|
5529
5561
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5530
5562
|
}
|
|
@@ -5532,16 +5564,16 @@ let va = ya, Ca = class extends va {
|
|
|
5532
5564
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
5533
5565
|
}
|
|
5534
5566
|
};
|
|
5535
|
-
var
|
|
5536
|
-
|
|
5537
|
-
let
|
|
5567
|
+
var Ia = Ma;
|
|
5568
|
+
Ma.default = Ma;
|
|
5569
|
+
let _a, Oa, Ea, La, Ra = ka, Aa = Ia, Ta = ba, { isClean: Na, my: Pa } = ha;
|
|
5538
5570
|
function Wo(e) {
|
|
5539
5571
|
return e.map((e2) => (e2.nodes && (e2.nodes = Wo(e2.nodes)), delete e2.source, e2));
|
|
5540
5572
|
}
|
|
5541
5573
|
function zo(e) {
|
|
5542
|
-
if (e[
|
|
5574
|
+
if (e[Na] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
|
|
5543
5575
|
}
|
|
5544
|
-
let
|
|
5576
|
+
let Da = class Bo extends Ta {
|
|
5545
5577
|
get first() {
|
|
5546
5578
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5547
5579
|
}
|
|
@@ -5593,7 +5625,7 @@ let Ta = class Bo extends La {
|
|
|
5593
5625
|
return this.markDirty(), this;
|
|
5594
5626
|
}
|
|
5595
5627
|
normalize(e, a) {
|
|
5596
|
-
if ("string" == typeof e) e = Wo(
|
|
5628
|
+
if ("string" == typeof e) e = Wo(Oa(e).nodes);
|
|
5597
5629
|
else if (typeof e > "u") e = [];
|
|
5598
5630
|
else if (Array.isArray(e)) {
|
|
5599
5631
|
e = e.slice(0);
|
|
@@ -5604,14 +5636,14 @@ let Ta = class Bo extends La {
|
|
|
5604
5636
|
} else if (e.type) e = [e];
|
|
5605
5637
|
else if (e.prop) {
|
|
5606
5638
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
5607
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
5608
|
-
} else if (e.selector || e.selectors) e = [new
|
|
5609
|
-
else if (e.name) e = [new
|
|
5639
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Aa(e)];
|
|
5640
|
+
} else if (e.selector || e.selectors) e = [new La(e)];
|
|
5641
|
+
else if (e.name) e = [new _a(e)];
|
|
5610
5642
|
else {
|
|
5611
5643
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
5612
|
-
e = [new
|
|
5644
|
+
e = [new Ra(e)];
|
|
5613
5645
|
}
|
|
5614
|
-
return e.map((e2) => (e2[
|
|
5646
|
+
return e.map((e2) => (e2[Pa] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Na] && 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));
|
|
5615
5647
|
}
|
|
5616
5648
|
prepend(...e) {
|
|
5617
5649
|
e = e.reverse();
|
|
@@ -5687,22 +5719,22 @@ let Ta = class Bo extends La {
|
|
|
5687
5719
|
}));
|
|
5688
5720
|
}
|
|
5689
5721
|
};
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
},
|
|
5722
|
+
Da.registerParse = (e) => {
|
|
5723
|
+
Oa = e;
|
|
5724
|
+
}, Da.registerRule = (e) => {
|
|
5725
|
+
La = e;
|
|
5726
|
+
}, Da.registerAtRule = (e) => {
|
|
5693
5727
|
_a = e;
|
|
5694
|
-
},
|
|
5695
|
-
|
|
5696
|
-
}, Ta.registerRoot = (e) => {
|
|
5697
|
-
Ia = e;
|
|
5728
|
+
}, Da.registerRoot = (e) => {
|
|
5729
|
+
Ea = e;
|
|
5698
5730
|
};
|
|
5699
|
-
var
|
|
5700
|
-
|
|
5701
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
5702
|
-
|
|
5731
|
+
var Fa = Da;
|
|
5732
|
+
Da.default = Da, Da.rebuild = (e) => {
|
|
5733
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, _a.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, La.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Aa.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Ra.prototype) : "root" === e.type && Object.setPrototypeOf(e, Ea.prototype), e[Pa] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
5734
|
+
Da.rebuild(e2);
|
|
5703
5735
|
});
|
|
5704
5736
|
};
|
|
5705
|
-
let
|
|
5737
|
+
let Ua = Fa, Ba = class extends Ua {
|
|
5706
5738
|
constructor(e) {
|
|
5707
5739
|
super(e), this.type = "atrule";
|
|
5708
5740
|
}
|
|
@@ -5713,38 +5745,38 @@ let Pa = Na, Da = class extends Pa {
|
|
|
5713
5745
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
5714
5746
|
}
|
|
5715
5747
|
};
|
|
5716
|
-
var
|
|
5717
|
-
|
|
5718
|
-
let
|
|
5748
|
+
var $a = Ba;
|
|
5749
|
+
Ba.default = Ba, Ua.registerAtRule(Ba);
|
|
5750
|
+
let Wa, za, ja = Fa, Ga = class extends ja {
|
|
5719
5751
|
constructor(e) {
|
|
5720
5752
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
5721
5753
|
}
|
|
5722
5754
|
toResult(e = {}) {
|
|
5723
|
-
return new
|
|
5755
|
+
return new Wa(new za(), this, e).stringify();
|
|
5724
5756
|
}
|
|
5725
5757
|
};
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
},
|
|
5729
|
-
|
|
5758
|
+
Ga.registerLazyResult = (e) => {
|
|
5759
|
+
Wa = e;
|
|
5760
|
+
}, Ga.registerProcessor = (e) => {
|
|
5761
|
+
za = e;
|
|
5730
5762
|
};
|
|
5731
|
-
var
|
|
5732
|
-
|
|
5733
|
-
var
|
|
5763
|
+
var Va = Ga;
|
|
5764
|
+
Ga.default = Ga;
|
|
5765
|
+
var qa = { nanoid: (e = 21) => {
|
|
5734
5766
|
let a = "", u = 0 | e;
|
|
5735
5767
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5736
5768
|
return a;
|
|
5737
5769
|
} };
|
|
5738
|
-
let { existsSync:
|
|
5739
|
-
let
|
|
5770
|
+
let { existsSync: Za, readFileSync: Ka } = na, { dirname: Ja, join: Ya } = na, { SourceMapConsumer: Qa, SourceMapGenerator: el } = na;
|
|
5771
|
+
let tl = class {
|
|
5740
5772
|
constructor(e, a) {
|
|
5741
5773
|
if (false === a.map) return;
|
|
5742
5774
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
5743
5775
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
5744
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
5776
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Ja(this.mapFile)), m2 && (this.text = m2);
|
|
5745
5777
|
}
|
|
5746
5778
|
consumer() {
|
|
5747
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5779
|
+
return this.consumerCache || (this.consumerCache = new Qa(this.text)), this.consumerCache;
|
|
5748
5780
|
}
|
|
5749
5781
|
decodeInline(e) {
|
|
5750
5782
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -5769,15 +5801,15 @@ let Ya = class {
|
|
|
5769
5801
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
5770
5802
|
}
|
|
5771
5803
|
loadFile(e) {
|
|
5772
|
-
if (this.root =
|
|
5804
|
+
if (this.root = Ja(e), Za(e)) return this.mapFile = e, Ka(e, "utf-8").toString().trim();
|
|
5773
5805
|
}
|
|
5774
5806
|
loadMap(e, a) {
|
|
5775
5807
|
if (false === a) return false;
|
|
5776
5808
|
if (a) {
|
|
5777
5809
|
if ("string" == typeof a) return a;
|
|
5778
5810
|
if ("function" != typeof a) {
|
|
5779
|
-
if (a instanceof
|
|
5780
|
-
if (a instanceof
|
|
5811
|
+
if (a instanceof Qa) return el.fromSourceMap(a).toString();
|
|
5812
|
+
if (a instanceof el) return a.toString();
|
|
5781
5813
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
5782
5814
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
5783
5815
|
}
|
|
@@ -5793,7 +5825,7 @@ let Ya = class {
|
|
|
5793
5825
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5794
5826
|
if (this.annotation) {
|
|
5795
5827
|
let a2 = this.annotation;
|
|
5796
|
-
return e && (a2 =
|
|
5828
|
+
return e && (a2 = Ya(Ja(e), a2)), this.loadFile(a2);
|
|
5797
5829
|
}
|
|
5798
5830
|
}
|
|
5799
5831
|
}
|
|
@@ -5804,23 +5836,23 @@ let Ya = class {
|
|
|
5804
5836
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5805
5837
|
}
|
|
5806
5838
|
};
|
|
5807
|
-
var
|
|
5808
|
-
|
|
5809
|
-
let { nanoid:
|
|
5839
|
+
var nl = tl;
|
|
5840
|
+
tl.default = tl;
|
|
5841
|
+
let { nanoid: rl } = qa, { isAbsolute: ol, resolve: sl } = na, { SourceMapConsumer: il, SourceMapGenerator: al } = na, { fileURLToPath: ll, pathToFileURL: cl } = na, ul = ia, pl = nl, dl = na, hl = Symbol("fromOffsetCache"), fl = !(!il || !al), ml = !(!sl || !ol), gl = class {
|
|
5810
5842
|
get from() {
|
|
5811
5843
|
return this.file || this.id;
|
|
5812
5844
|
}
|
|
5813
5845
|
constructor(e, a = {}) {
|
|
5814
5846
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
5815
|
-
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 && (!
|
|
5816
|
-
let e2 = new
|
|
5847
|
+
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 && (!ml || /^\w+:\/\//.test(a.from) || ol(a.from) ? this.file = a.from : this.file = sl(a.from)), ml && fl) {
|
|
5848
|
+
let e2 = new pl(this.css, a);
|
|
5817
5849
|
if (e2.text) {
|
|
5818
5850
|
this.map = e2;
|
|
5819
5851
|
let a2 = e2.consumer().file;
|
|
5820
5852
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
5821
5853
|
}
|
|
5822
5854
|
}
|
|
5823
|
-
this.file || (this.id = "<input css " +
|
|
5855
|
+
this.file || (this.id = "<input css " + rl(6) + ">"), this.map && (this.map.file = this.from);
|
|
5824
5856
|
}
|
|
5825
5857
|
error(e, a, u, m2 = {}) {
|
|
5826
5858
|
let w2, b2, C2;
|
|
@@ -5839,17 +5871,17 @@ let { nanoid: el } = ja, { isAbsolute: tl, resolve: nl } = Qi, { SourceMapConsum
|
|
|
5839
5871
|
a = e2.line, u = e2.col;
|
|
5840
5872
|
}
|
|
5841
5873
|
let x2 = this.origin(a, u, b2, w2);
|
|
5842
|
-
return C2 = x2 ? new
|
|
5874
|
+
return C2 = x2 ? new ul(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 ul(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 && (cl && (C2.input.url = cl(this.file).toString()), C2.input.file = this.file), C2;
|
|
5843
5875
|
}
|
|
5844
5876
|
fromOffset(e) {
|
|
5845
5877
|
let a, u;
|
|
5846
|
-
if (this[
|
|
5878
|
+
if (this[hl]) u = this[hl];
|
|
5847
5879
|
else {
|
|
5848
5880
|
let e2 = this.css.split("\n");
|
|
5849
5881
|
u = new Array(e2.length);
|
|
5850
5882
|
let a2 = 0;
|
|
5851
5883
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
5852
|
-
this[
|
|
5884
|
+
this[hl] = u;
|
|
5853
5885
|
}
|
|
5854
5886
|
a = u[u.length - 1];
|
|
5855
5887
|
let m2 = 0;
|
|
@@ -5868,17 +5900,17 @@ let { nanoid: el } = ja, { isAbsolute: tl, resolve: nl } = Qi, { SourceMapConsum
|
|
|
5868
5900
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
5869
5901
|
}
|
|
5870
5902
|
mapResolve(e) {
|
|
5871
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
5903
|
+
return /^\w+:\/\//.test(e) ? e : sl(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
5872
5904
|
}
|
|
5873
5905
|
origin(e, a, u, m2) {
|
|
5874
5906
|
if (!this.map) return false;
|
|
5875
5907
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
5876
5908
|
if (!x2.source) return false;
|
|
5877
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
5909
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = ol(x2.source) ? cl(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || cl(this.map.mapFile));
|
|
5878
5910
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5879
5911
|
if ("file:" === b2.protocol) {
|
|
5880
|
-
if (!
|
|
5881
|
-
I2.file =
|
|
5912
|
+
if (!ll) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5913
|
+
I2.file = ll(b2);
|
|
5882
5914
|
}
|
|
5883
5915
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5884
5916
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5889,9 +5921,9 @@ let { nanoid: el } = ja, { isAbsolute: tl, resolve: nl } = Qi, { SourceMapConsum
|
|
|
5889
5921
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
5890
5922
|
}
|
|
5891
5923
|
};
|
|
5892
|
-
var
|
|
5893
|
-
|
|
5894
|
-
let
|
|
5924
|
+
var yl = gl;
|
|
5925
|
+
gl.default = gl, dl && dl.registerInput && dl.registerInput(gl);
|
|
5926
|
+
let wl, Sl, bl = Fa, vl = class extends bl {
|
|
5895
5927
|
constructor(e) {
|
|
5896
5928
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
5897
5929
|
}
|
|
@@ -5908,29 +5940,29 @@ let ml, gl, yl = Na, wl = class extends yl {
|
|
|
5908
5940
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
5909
5941
|
}
|
|
5910
5942
|
toResult(e = {}) {
|
|
5911
|
-
return new
|
|
5943
|
+
return new wl(new Sl(), this, e).stringify();
|
|
5912
5944
|
}
|
|
5913
5945
|
};
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
},
|
|
5917
|
-
|
|
5946
|
+
vl.registerLazyResult = (e) => {
|
|
5947
|
+
wl = e;
|
|
5948
|
+
}, vl.registerProcessor = (e) => {
|
|
5949
|
+
Sl = e;
|
|
5918
5950
|
};
|
|
5919
|
-
var
|
|
5920
|
-
|
|
5921
|
-
let
|
|
5951
|
+
var Cl = vl;
|
|
5952
|
+
vl.default = vl, bl.registerRoot(vl);
|
|
5953
|
+
let kl = { comma: (e) => kl.split(e, [","], true), space(e) {
|
|
5922
5954
|
let a = [" ", "\n", " "];
|
|
5923
|
-
return
|
|
5955
|
+
return kl.split(e, a);
|
|
5924
5956
|
}, split(e, a, u) {
|
|
5925
5957
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5926
5958
|
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;
|
|
5927
5959
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5928
5960
|
} };
|
|
5929
|
-
var
|
|
5930
|
-
|
|
5931
|
-
let
|
|
5961
|
+
var xl = kl;
|
|
5962
|
+
kl.default = kl;
|
|
5963
|
+
let Ml = Fa, Il = xl, Ol = class extends Ml {
|
|
5932
5964
|
get selectors() {
|
|
5933
|
-
return
|
|
5965
|
+
return Il.comma(this.selector);
|
|
5934
5966
|
}
|
|
5935
5967
|
set selectors(e) {
|
|
5936
5968
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5940,34 +5972,34 @@ let Cl = Na, kl = vl, xl = class extends Cl {
|
|
|
5940
5972
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5941
5973
|
}
|
|
5942
5974
|
};
|
|
5943
|
-
var
|
|
5944
|
-
|
|
5945
|
-
let
|
|
5975
|
+
var El = Ol;
|
|
5976
|
+
Ol.default = Ol, Ml.registerRule(Ol);
|
|
5977
|
+
let Ll = $a, Rl = ka, Al = Ia, Tl = yl, Nl = nl, Pl = Cl, Dl = El;
|
|
5946
5978
|
function Ke(e, a) {
|
|
5947
5979
|
if (Array.isArray(e)) return e.map((e2) => Ke(e2));
|
|
5948
5980
|
let { inputs: u, ...m2 } = e;
|
|
5949
5981
|
if (u) {
|
|
5950
5982
|
a = [];
|
|
5951
5983
|
for (let e2 of u) {
|
|
5952
|
-
let u2 = { ...e2, __proto__:
|
|
5953
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
5984
|
+
let u2 = { ...e2, __proto__: Tl.prototype };
|
|
5985
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Nl.prototype }), a.push(u2);
|
|
5954
5986
|
}
|
|
5955
5987
|
}
|
|
5956
5988
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ke(e2, a))), m2.source) {
|
|
5957
5989
|
let { inputId: e2, ...u2 } = m2.source;
|
|
5958
5990
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
5959
5991
|
}
|
|
5960
|
-
if ("root" === m2.type) return new
|
|
5961
|
-
if ("decl" === m2.type) return new
|
|
5962
|
-
if ("rule" === m2.type) return new
|
|
5963
|
-
if ("comment" === m2.type) return new
|
|
5964
|
-
if ("atrule" === m2.type) return new
|
|
5992
|
+
if ("root" === m2.type) return new Pl(m2);
|
|
5993
|
+
if ("decl" === m2.type) return new Al(m2);
|
|
5994
|
+
if ("rule" === m2.type) return new Dl(m2);
|
|
5995
|
+
if ("comment" === m2.type) return new Rl(m2);
|
|
5996
|
+
if ("atrule" === m2.type) return new Ll(m2);
|
|
5965
5997
|
throw new Error("Unknown node type: " + e.type);
|
|
5966
5998
|
}
|
|
5967
|
-
var
|
|
5999
|
+
var Jl = Ke;
|
|
5968
6000
|
Ke.default = Ke;
|
|
5969
|
-
let { dirname:
|
|
5970
|
-
var
|
|
6001
|
+
let { dirname: ec, relative: tc, resolve: nc, sep: rc } = na, { SourceMapConsumer: oc, SourceMapGenerator: sc } = na, { pathToFileURL: ic } = na, ac = yl, lc = !(!oc || !sc), cc = !!(ec && nc && tc && rc);
|
|
6002
|
+
var uc = class {
|
|
5971
6003
|
constructor(e, a, u, m2) {
|
|
5972
6004
|
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();
|
|
5973
6005
|
}
|
|
@@ -5979,8 +6011,8 @@ var ac = class {
|
|
|
5979
6011
|
}
|
|
5980
6012
|
applyPrevMaps() {
|
|
5981
6013
|
for (let e of this.previous()) {
|
|
5982
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
5983
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
6014
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || ec(e.file);
|
|
6015
|
+
false === this.mapOpts.sourcesContent ? (a = new oc(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
5984
6016
|
}
|
|
5985
6017
|
}
|
|
5986
6018
|
clearAnnotation() {
|
|
@@ -5990,7 +6022,7 @@ var ac = class {
|
|
|
5990
6022
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
5991
6023
|
}
|
|
5992
6024
|
generate() {
|
|
5993
|
-
if (this.clearAnnotation(),
|
|
6025
|
+
if (this.clearAnnotation(), cc && lc && this.isMap()) return this.generateMap();
|
|
5994
6026
|
{
|
|
5995
6027
|
let e = "";
|
|
5996
6028
|
return this.stringify(this.root, (a) => {
|
|
@@ -6002,12 +6034,12 @@ var ac = class {
|
|
|
6002
6034
|
if (this.root) this.generateString();
|
|
6003
6035
|
else if (1 === this.previous().length) {
|
|
6004
6036
|
let e = this.previous()[0].consumer();
|
|
6005
|
-
e.file = this.outputFile(), this.map =
|
|
6006
|
-
} else this.map = new
|
|
6037
|
+
e.file = this.outputFile(), this.map = sc.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
6038
|
+
} else this.map = new sc({ 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
6039
|
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];
|
|
6008
6040
|
}
|
|
6009
6041
|
generateString() {
|
|
6010
|
-
this.css = "", this.map = new
|
|
6042
|
+
this.css = "", this.map = new sc({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
6011
6043
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
6012
6044
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
6013
6045
|
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) {
|
|
@@ -6037,9 +6069,9 @@ var ac = class {
|
|
|
6037
6069
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
6038
6070
|
let a = this.memoizedPaths.get(e);
|
|
6039
6071
|
if (a) return a;
|
|
6040
|
-
let u = this.opts.to ?
|
|
6041
|
-
"string" == typeof this.mapOpts.annotation && (u =
|
|
6042
|
-
let m2 =
|
|
6072
|
+
let u = this.opts.to ? ec(this.opts.to) : ".";
|
|
6073
|
+
"string" == typeof this.mapOpts.annotation && (u = ec(nc(u, this.mapOpts.annotation)));
|
|
6074
|
+
let m2 = tc(u, e);
|
|
6043
6075
|
return this.memoizedPaths.set(e, m2), m2;
|
|
6044
6076
|
}
|
|
6045
6077
|
previous() {
|
|
@@ -6050,7 +6082,7 @@ var ac = class {
|
|
|
6050
6082
|
}
|
|
6051
6083
|
});
|
|
6052
6084
|
else {
|
|
6053
|
-
let e = new
|
|
6085
|
+
let e = new ac(this.originalCSS, this.opts);
|
|
6054
6086
|
e.map && this.previousMaps.push(e.map);
|
|
6055
6087
|
}
|
|
6056
6088
|
return this.previousMaps;
|
|
@@ -6081,8 +6113,8 @@ var ac = class {
|
|
|
6081
6113
|
toFileUrl(e) {
|
|
6082
6114
|
let a = this.memoizedFileURLs.get(e);
|
|
6083
6115
|
if (a) return a;
|
|
6084
|
-
if (
|
|
6085
|
-
let a2 =
|
|
6116
|
+
if (ic) {
|
|
6117
|
+
let a2 = ic(e).toString();
|
|
6086
6118
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
6087
6119
|
}
|
|
6088
6120
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6090,13 +6122,13 @@ var ac = class {
|
|
|
6090
6122
|
toUrl(e) {
|
|
6091
6123
|
let a = this.memoizedURLs.get(e);
|
|
6092
6124
|
if (a) return a;
|
|
6093
|
-
"\\" ===
|
|
6125
|
+
"\\" === rc && (e = e.replace(/\\/g, "/"));
|
|
6094
6126
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
6095
6127
|
return this.memoizedURLs.set(e, u), u;
|
|
6096
6128
|
}
|
|
6097
6129
|
};
|
|
6098
|
-
const
|
|
6099
|
-
let
|
|
6130
|
+
const pc = /[\t\n\f\r "#'()/;[\\\]{}]/g, dc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, hc = /.[\r\n"'(/\\]/, fc = /[\da-f]/i;
|
|
6131
|
+
let mc = $a, gc = ka, yc = Ia, wc = Cl, Sc = El, kc = function(e, a = {}) {
|
|
6100
6132
|
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 = [];
|
|
6101
6133
|
function y2(a2) {
|
|
6102
6134
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -6146,7 +6178,7 @@ let dc = Fa, hc = ba, fc = ka, mc = Sl, gc = Ml, kc = function(e, a = {}) {
|
|
|
6146
6178
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6147
6179
|
} while (I2);
|
|
6148
6180
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6149
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6181
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || hc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
6150
6182
|
break;
|
|
6151
6183
|
case 39:
|
|
6152
6184
|
case 34:
|
|
@@ -6164,31 +6196,31 @@ let dc = Fa, hc = ba, fc = ka, mc = Sl, gc = Ml, kc = function(e, a = {}) {
|
|
|
6164
6196
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6165
6197
|
break;
|
|
6166
6198
|
case 64:
|
|
6167
|
-
|
|
6199
|
+
pc.lastIndex = B2 + 1, pc.test(D2), b2 = 0 === pc.lastIndex ? D2.length - 1 : pc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6168
6200
|
break;
|
|
6169
6201
|
case 92:
|
|
6170
6202
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6171
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
6172
|
-
for (;
|
|
6203
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, fc.test(D2.charAt(b2)))) {
|
|
6204
|
+
for (; fc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6173
6205
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6174
6206
|
}
|
|
6175
6207
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6176
6208
|
break;
|
|
6177
6209
|
default:
|
|
6178
|
-
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) : (
|
|
6210
|
+
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) : (dc.lastIndex = B2 + 1, dc.test(D2), b2 = 0 === dc.lastIndex ? D2.length - 1 : dc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
6179
6211
|
}
|
|
6180
6212
|
return B2++, x2;
|
|
6181
6213
|
}, position: function S() {
|
|
6182
6214
|
return B2;
|
|
6183
6215
|
} };
|
|
6184
6216
|
};
|
|
6185
|
-
const
|
|
6186
|
-
var
|
|
6217
|
+
const bc = { empty: true, space: true };
|
|
6218
|
+
var vc = class {
|
|
6187
6219
|
constructor(e) {
|
|
6188
|
-
this.input = e, this.root = new
|
|
6220
|
+
this.input = e, this.root = new wc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
6189
6221
|
}
|
|
6190
6222
|
atrule(e) {
|
|
6191
|
-
let a = new
|
|
6223
|
+
let a = new mc();
|
|
6192
6224
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
6193
6225
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6194
6226
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6240,7 +6272,7 @@ var wc = class {
|
|
|
6240
6272
|
return false;
|
|
6241
6273
|
}
|
|
6242
6274
|
comment(e) {
|
|
6243
|
-
let a = new
|
|
6275
|
+
let a = new gc();
|
|
6244
6276
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
6245
6277
|
let u = e[1].slice(2, -2);
|
|
6246
6278
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -6253,7 +6285,7 @@ var wc = class {
|
|
|
6253
6285
|
this.tokenizer = kc(this.input);
|
|
6254
6286
|
}
|
|
6255
6287
|
decl(e, a) {
|
|
6256
|
-
let u = new
|
|
6288
|
+
let u = new yc();
|
|
6257
6289
|
this.init(u, e[0][2]);
|
|
6258
6290
|
let m2, w2 = e[e.length - 1];
|
|
6259
6291
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e2) {
|
|
@@ -6302,7 +6334,7 @@ var wc = class {
|
|
|
6302
6334
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
6303
6335
|
}
|
|
6304
6336
|
emptyRule(e) {
|
|
6305
|
-
let a = new
|
|
6337
|
+
let a = new Sc();
|
|
6306
6338
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
6307
6339
|
}
|
|
6308
6340
|
end(e) {
|
|
@@ -6378,7 +6410,7 @@ var wc = class {
|
|
|
6378
6410
|
}
|
|
6379
6411
|
raw(e, a, u, m2) {
|
|
6380
6412
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
6381
|
-
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",
|
|
6413
|
+
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", bc[x2] || bc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6382
6414
|
if (!O2) {
|
|
6383
6415
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
6384
6416
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -6387,7 +6419,7 @@ var wc = class {
|
|
|
6387
6419
|
}
|
|
6388
6420
|
rule(e) {
|
|
6389
6421
|
e.pop();
|
|
6390
|
-
let a = new
|
|
6422
|
+
let a = new Sc();
|
|
6391
6423
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
6392
6424
|
}
|
|
6393
6425
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -6427,9 +6459,9 @@ var wc = class {
|
|
|
6427
6459
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
6428
6460
|
}
|
|
6429
6461
|
};
|
|
6430
|
-
let
|
|
6462
|
+
let xc = Fa, Mc = yl, Ic = vc;
|
|
6431
6463
|
function Gt(e, a) {
|
|
6432
|
-
let u = new
|
|
6464
|
+
let u = new Mc(e, a), m2 = new Ic(u);
|
|
6433
6465
|
try {
|
|
6434
6466
|
m2.parse();
|
|
6435
6467
|
} catch (e2) {
|
|
@@ -6437,9 +6469,9 @@ function Gt(e, a) {
|
|
|
6437
6469
|
}
|
|
6438
6470
|
return m2.root;
|
|
6439
6471
|
}
|
|
6440
|
-
var
|
|
6441
|
-
Gt.default = Gt,
|
|
6442
|
-
let
|
|
6472
|
+
var _c = Gt;
|
|
6473
|
+
Gt.default = Gt, xc.registerParse(Gt);
|
|
6474
|
+
let Oc = class {
|
|
6443
6475
|
constructor(e, a = {}) {
|
|
6444
6476
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
6445
6477
|
let e2 = a.node.rangeBy(a);
|
|
@@ -6451,9 +6483,9 @@ let Mc = class {
|
|
|
6451
6483
|
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;
|
|
6452
6484
|
}
|
|
6453
6485
|
};
|
|
6454
|
-
var
|
|
6455
|
-
|
|
6456
|
-
let
|
|
6486
|
+
var Ec = Oc;
|
|
6487
|
+
Oc.default = Oc;
|
|
6488
|
+
let Lc = Ec, Rc = class {
|
|
6457
6489
|
get content() {
|
|
6458
6490
|
return this.css;
|
|
6459
6491
|
}
|
|
@@ -6465,26 +6497,26 @@ let _c = Ic, Oc = class {
|
|
|
6465
6497
|
}
|
|
6466
6498
|
warn(e, a = {}) {
|
|
6467
6499
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
6468
|
-
let u = new
|
|
6500
|
+
let u = new Lc(e, a);
|
|
6469
6501
|
return this.messages.push(u), u;
|
|
6470
6502
|
}
|
|
6471
6503
|
warnings() {
|
|
6472
6504
|
return this.messages.filter((e) => "warning" === e.type);
|
|
6473
6505
|
}
|
|
6474
6506
|
};
|
|
6475
|
-
var
|
|
6476
|
-
|
|
6477
|
-
let
|
|
6507
|
+
var Ac = Rc;
|
|
6508
|
+
Rc.default = Rc;
|
|
6509
|
+
let Tc = {};
|
|
6478
6510
|
var ni = function(e) {
|
|
6479
|
-
|
|
6511
|
+
Tc[e] || (Tc[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
6480
6512
|
};
|
|
6481
|
-
let
|
|
6482
|
-
const
|
|
6513
|
+
let Nc = Fa, Pc = Va, Dc = uc, Fc = _c, Uc = Ac, Bc = Cl, $c = pa, { isClean: Wc, my: zc } = ha, jc = ni;
|
|
6514
|
+
const Gc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, Vc = { 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 }, qc = { Once: true, postcssPlugin: true, prepare: true };
|
|
6483
6515
|
function _e(e) {
|
|
6484
6516
|
return "object" == typeof e && "function" == typeof e.then;
|
|
6485
6517
|
}
|
|
6486
6518
|
function ri(e) {
|
|
6487
|
-
let a = false, u =
|
|
6519
|
+
let a = false, u = Gc[e.type];
|
|
6488
6520
|
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"];
|
|
6489
6521
|
}
|
|
6490
6522
|
function br(e) {
|
|
@@ -6492,9 +6524,9 @@ function br(e) {
|
|
|
6492
6524
|
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: [] };
|
|
6493
6525
|
}
|
|
6494
6526
|
function Js(e) {
|
|
6495
|
-
return e[
|
|
6527
|
+
return e[Wc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
|
|
6496
6528
|
}
|
|
6497
|
-
let
|
|
6529
|
+
let Hc = {}, Zc = class oi {
|
|
6498
6530
|
get content() {
|
|
6499
6531
|
return this.stringify().content;
|
|
6500
6532
|
}
|
|
@@ -6521,19 +6553,19 @@ let Gc = {}, Vc = class oi {
|
|
|
6521
6553
|
}
|
|
6522
6554
|
constructor(e, a, u) {
|
|
6523
6555
|
let m2;
|
|
6524
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof
|
|
6556
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof Uc) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
6525
6557
|
else {
|
|
6526
|
-
let e2 =
|
|
6558
|
+
let e2 = Fc;
|
|
6527
6559
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
6528
6560
|
try {
|
|
6529
6561
|
m2 = e2(a, u);
|
|
6530
6562
|
} catch (e3) {
|
|
6531
6563
|
this.processed = true, this.error = e3;
|
|
6532
6564
|
}
|
|
6533
|
-
m2 && !m2[
|
|
6565
|
+
m2 && !m2[zc] && Nc.rebuild(m2);
|
|
6534
6566
|
}
|
|
6535
6567
|
else m2 = Js(a);
|
|
6536
|
-
this.result = new
|
|
6568
|
+
this.result = new Uc(e, m2, u), this.helpers = { ...Hc, postcss: Hc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
6537
6569
|
}
|
|
6538
6570
|
async() {
|
|
6539
6571
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6567,8 +6599,8 @@ let Gc = {}, Vc = class oi {
|
|
|
6567
6599
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
6568
6600
|
};
|
|
6569
6601
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
6570
|
-
if (!
|
|
6571
|
-
if (!
|
|
6602
|
+
if (!Vc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6603
|
+
if (!qc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
6572
6604
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
6573
6605
|
}
|
|
6574
6606
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6585,8 +6617,8 @@ let Gc = {}, Vc = class oi {
|
|
|
6585
6617
|
}
|
|
6586
6618
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6587
6619
|
let e = this.result.root;
|
|
6588
|
-
for (; !e[
|
|
6589
|
-
e[
|
|
6620
|
+
for (; !e[Wc]; ) {
|
|
6621
|
+
e[Wc] = true;
|
|
6590
6622
|
let a = [br(e)];
|
|
6591
6623
|
for (; a.length > 0; ) {
|
|
6592
6624
|
let e2 = this.visitTick(a);
|
|
@@ -6631,9 +6663,9 @@ let Gc = {}, Vc = class oi {
|
|
|
6631
6663
|
if (this.error) throw this.error;
|
|
6632
6664
|
if (this.stringified) return this.result;
|
|
6633
6665
|
this.stringified = true, this.sync();
|
|
6634
|
-
let e = this.result.opts, a =
|
|
6666
|
+
let e = this.result.opts, a = $c;
|
|
6635
6667
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
6636
|
-
let u = new
|
|
6668
|
+
let u = new Dc(a, this.result.root, this.result.opts).generate();
|
|
6637
6669
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
6638
6670
|
}
|
|
6639
6671
|
sync() {
|
|
@@ -6645,14 +6677,14 @@ let Gc = {}, Vc = class oi {
|
|
|
6645
6677
|
}
|
|
6646
6678
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6647
6679
|
let e = this.result.root;
|
|
6648
|
-
for (; !e[
|
|
6680
|
+
for (; !e[Wc]; ) e[Wc] = true, this.walkSync(e);
|
|
6649
6681
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
6650
6682
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
6651
6683
|
}
|
|
6652
6684
|
return this.result;
|
|
6653
6685
|
}
|
|
6654
6686
|
then(e, a) {
|
|
6655
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6687
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || jc("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);
|
|
6656
6688
|
}
|
|
6657
6689
|
toString() {
|
|
6658
6690
|
return this.css;
|
|
@@ -6684,22 +6716,22 @@ let Gc = {}, Vc = class oi {
|
|
|
6684
6716
|
}
|
|
6685
6717
|
if (0 !== a.iterator) {
|
|
6686
6718
|
let m3, w3 = a.iterator;
|
|
6687
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
6719
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[Wc]) return m3[Wc] = true, void e.push(br(m3));
|
|
6688
6720
|
a.iterator = 0, delete u.indexes[w3];
|
|
6689
6721
|
}
|
|
6690
6722
|
let w2 = a.events;
|
|
6691
6723
|
for (; a.eventIndex < w2.length; ) {
|
|
6692
6724
|
let e2 = w2[a.eventIndex];
|
|
6693
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
6725
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[Wc] = true, a.iterator = u.getIterator()));
|
|
6694
6726
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
6695
6727
|
}
|
|
6696
6728
|
e.pop();
|
|
6697
6729
|
}
|
|
6698
6730
|
walkSync(e) {
|
|
6699
|
-
e[
|
|
6731
|
+
e[Wc] = true;
|
|
6700
6732
|
let a = ri(e);
|
|
6701
6733
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
6702
|
-
e2[
|
|
6734
|
+
e2[Wc] || this.walkSync(e2);
|
|
6703
6735
|
});
|
|
6704
6736
|
else {
|
|
6705
6737
|
let a2 = this.listeners[u];
|
|
@@ -6710,14 +6742,14 @@ let Gc = {}, Vc = class oi {
|
|
|
6710
6742
|
return this.sync().warnings();
|
|
6711
6743
|
}
|
|
6712
6744
|
};
|
|
6713
|
-
|
|
6714
|
-
|
|
6745
|
+
Zc.registerPostcss = (e) => {
|
|
6746
|
+
Hc = e;
|
|
6715
6747
|
};
|
|
6716
|
-
var
|
|
6717
|
-
|
|
6718
|
-
let
|
|
6719
|
-
const
|
|
6720
|
-
let
|
|
6748
|
+
var Kc = Zc;
|
|
6749
|
+
Zc.default = Zc, Bc.registerLazyResult(Zc), Pc.registerLazyResult(Zc);
|
|
6750
|
+
let Jc = uc, Yc = _c;
|
|
6751
|
+
const Xc = Ac;
|
|
6752
|
+
let Qc = pa, lu = ni, cu = class {
|
|
6721
6753
|
get content() {
|
|
6722
6754
|
return this.result.css;
|
|
6723
6755
|
}
|
|
@@ -6738,7 +6770,7 @@ let Jc = la, Yc = ni, Xc = class {
|
|
|
6738
6770
|
}
|
|
6739
6771
|
get root() {
|
|
6740
6772
|
if (this._root) return this._root;
|
|
6741
|
-
let e, a =
|
|
6773
|
+
let e, a = Yc;
|
|
6742
6774
|
try {
|
|
6743
6775
|
e = a(this._css, this._opts);
|
|
6744
6776
|
} catch (e2) {
|
|
@@ -6752,11 +6784,11 @@ let Jc = la, Yc = ni, Xc = class {
|
|
|
6752
6784
|
}
|
|
6753
6785
|
constructor(e, a, u) {
|
|
6754
6786
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
6755
|
-
let m2, w2 =
|
|
6756
|
-
this.result = new
|
|
6787
|
+
let m2, w2 = Qc;
|
|
6788
|
+
this.result = new Xc(this._processor, m2, this._opts), this.result.css = a;
|
|
6757
6789
|
let b2 = this;
|
|
6758
6790
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6759
|
-
let C2 = new
|
|
6791
|
+
let C2 = new Jc(w2, m2, this._opts, a);
|
|
6760
6792
|
if (C2.isMap()) {
|
|
6761
6793
|
let [e2, a2] = C2.generate();
|
|
6762
6794
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -6776,7 +6808,7 @@ let Jc = la, Yc = ni, Xc = class {
|
|
|
6776
6808
|
return this.result;
|
|
6777
6809
|
}
|
|
6778
6810
|
then(e, a) {
|
|
6779
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6811
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || lu("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);
|
|
6780
6812
|
}
|
|
6781
6813
|
toString() {
|
|
6782
6814
|
return this._css;
|
|
@@ -6785,9 +6817,9 @@ let Jc = la, Yc = ni, Xc = class {
|
|
|
6785
6817
|
return [];
|
|
6786
6818
|
}
|
|
6787
6819
|
};
|
|
6788
|
-
var
|
|
6789
|
-
|
|
6790
|
-
let
|
|
6820
|
+
var hu = cu;
|
|
6821
|
+
cu.default = cu;
|
|
6822
|
+
let Cu = Va, ku = Kc, xu = hu, Mu = Cl, _u = class {
|
|
6791
6823
|
constructor(e = []) {
|
|
6792
6824
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
6793
6825
|
}
|
|
@@ -6803,39 +6835,39 @@ let lu = za, cu = qc, hu = Qc, Cu = Sl, ku = class {
|
|
|
6803
6835
|
return a;
|
|
6804
6836
|
}
|
|
6805
6837
|
process(e, a = {}) {
|
|
6806
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
6838
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new ku(this, e, a) : new xu(this, e, a);
|
|
6807
6839
|
}
|
|
6808
6840
|
use(e) {
|
|
6809
6841
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
6810
6842
|
}
|
|
6811
6843
|
};
|
|
6812
|
-
var
|
|
6813
|
-
|
|
6814
|
-
let
|
|
6844
|
+
var Ou = _u;
|
|
6845
|
+
_u.default = _u, Mu.registerProcessor(_u), Cu.registerProcessor(_u);
|
|
6846
|
+
let Eu = $a, Lu = ka, Ru = Fa, Au = ia, Tu = Ia, Nu = Va, Pu = Jl, Du = yl, Fu = Kc, Uu = xl, $u = ba, Wu = _c, zu = Ou, ju = Ac, Gu = Cl, Vu = El, qu = pa, Hu = Ec;
|
|
6815
6847
|
function T$1(...e) {
|
|
6816
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
6848
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new zu(e);
|
|
6817
6849
|
}
|
|
6818
6850
|
T$1.plugin = function(e, a) {
|
|
6819
6851
|
let u, m2 = false;
|
|
6820
6852
|
function n(...u2) {
|
|
6821
6853
|
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"));
|
|
6822
6854
|
let w2 = a(...u2);
|
|
6823
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
6855
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new zu().version, w2;
|
|
6824
6856
|
}
|
|
6825
6857
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
6826
6858
|
return T$1([n(u2)]).process(e2, a2);
|
|
6827
6859
|
}, n;
|
|
6828
|
-
}, T$1.stringify =
|
|
6829
|
-
var
|
|
6860
|
+
}, T$1.stringify = qu, T$1.parse = Wu, T$1.fromJSON = Pu, T$1.list = Uu, T$1.comment = (e) => new Lu(e), T$1.atRule = (e) => new Eu(e), T$1.decl = (e) => new Tu(e), T$1.rule = (e) => new Vu(e), T$1.root = (e) => new Gu(e), T$1.document = (e) => new Nu(e), T$1.CssSyntaxError = Au, T$1.Declaration = Tu, T$1.Container = Ru, T$1.Processor = zu, T$1.Document = Nu, T$1.Comment = Lu, T$1.Warning = Hu, T$1.AtRule = Eu, T$1.Result = ju, T$1.Input = Du, T$1.Rule = Vu, T$1.Root = Gu, T$1.Node = $u, Fu.registerPostcss(T$1);
|
|
6861
|
+
var Zu = T$1;
|
|
6830
6862
|
T$1.default = T$1;
|
|
6831
|
-
const
|
|
6832
|
-
var
|
|
6833
|
-
|
|
6863
|
+
const Ku = Su(Zu);
|
|
6864
|
+
var Ju;
|
|
6865
|
+
Ku.stringify, Ku.fromJSON, Ku.plugin, Ku.parse, Ku.list, Ku.document, Ku.comment, Ku.atRule, Ku.rule, Ku.decl, Ku.root, Ku.CssSyntaxError, Ku.Declaration, Ku.Container, Ku.Processor, Ku.Document, Ku.Comment, Ku.Warning, Ku.AtRule, Ku.Result, Ku.Input, Ku.Rule, Ku.Root, Ku.Node, (function(e) {
|
|
6834
6866
|
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
6835
|
-
})(
|
|
6836
|
-
const { addCustomEvent:
|
|
6837
|
-
var
|
|
6838
|
-
let
|
|
6867
|
+
})(Ju || (Ju = {}));
|
|
6868
|
+
const { addCustomEvent: Yu } = ae, { addSailfishEvent: Xu } = ae, { freezePage: Qu } = ae, { takeFullSnapshot: ep } = ae;
|
|
6869
|
+
var tp = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? tp(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
|
|
6870
|
+
let np = class d {
|
|
6839
6871
|
constructor(e) {
|
|
6840
6872
|
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;
|
|
6841
6873
|
}
|
|
@@ -6844,8 +6876,8 @@ let Qu = class d {
|
|
|
6844
6876
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
|
|
6845
6877
|
}
|
|
6846
6878
|
};
|
|
6847
|
-
const
|
|
6848
|
-
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(
|
|
6879
|
+
const rp = /(^|@)\S+:\d+/, op = /^\s*at .*(\S+:\d+|\(native\))/m, sp = /^(eval@)?(\[native code])?$/, ip = { parse: function(e) {
|
|
6880
|
+
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(op) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
|
|
6849
6881
|
}, extractLocation: function(e) {
|
|
6850
6882
|
if (-1 === e.indexOf(":")) return [e];
|
|
6851
6883
|
const a = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
|
|
@@ -6853,23 +6885,23 @@ const ep = /(^|@)\S+:\d+/, tp = /^\s*at .*(\S+:\d+|\(native\))/m, np = /^(eval@)
|
|
|
6853
6885
|
return [a[1], a[2] || void 0, a[3] || void 0];
|
|
6854
6886
|
}, parseV8OrIE: function(e) {
|
|
6855
6887
|
return e.stack.split("\n").filter(function(e2) {
|
|
6856
|
-
return !!e2.match(
|
|
6888
|
+
return !!e2.match(op);
|
|
6857
6889
|
}, this).map(function(e2) {
|
|
6858
6890
|
e2.indexOf("(eval ") > -1 && (e2 = e2.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6859
6891
|
let a = e2.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6860
6892
|
const u = a.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6861
6893
|
a = u ? a.replace(u[0], "") : a;
|
|
6862
6894
|
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];
|
|
6863
|
-
return new
|
|
6895
|
+
return new np({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6864
6896
|
}, this);
|
|
6865
6897
|
}, parseFFOrSafari: function(e) {
|
|
6866
6898
|
return e.stack.split("\n").filter(function(e2) {
|
|
6867
|
-
return !e2.match(
|
|
6899
|
+
return !e2.match(sp);
|
|
6868
6900
|
}, this).map(function(e2) {
|
|
6869
|
-
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
|
|
6901
|
+
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 np({ functionName: e2 });
|
|
6870
6902
|
{
|
|
6871
6903
|
const a = /((.*".+"[^@]*)?[^@]*)(?:@)/, u = e2.match(a), m2 = u && u[1] ? u[1] : void 0, w2 = this.extractLocation(e2.replace(a, ""));
|
|
6872
|
-
return new
|
|
6904
|
+
return new np({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6873
6905
|
}
|
|
6874
6906
|
}, this);
|
|
6875
6907
|
}, parseOpera: function(e) {
|
|
@@ -6878,22 +6910,22 @@ const ep = /(^|@)\S+:\d+/, tp = /^\s*at .*(\S+:\d+|\(native\))/m, np = /^(eval@)
|
|
|
6878
6910
|
const a = /Line (\d+).*script (?:in )?(\S+)/i, u = e.message.split("\n"), m2 = [];
|
|
6879
6911
|
for (let e2 = 2, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6880
6912
|
const w3 = a.exec(u[e2]);
|
|
6881
|
-
w3 && m2.push(new
|
|
6913
|
+
w3 && m2.push(new np({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6882
6914
|
}
|
|
6883
6915
|
return m2;
|
|
6884
6916
|
}, parseOpera10: function(e) {
|
|
6885
6917
|
const a = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u = e.stacktrace.split("\n"), m2 = [];
|
|
6886
6918
|
for (let e2 = 0, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6887
6919
|
const w3 = a.exec(u[e2]);
|
|
6888
|
-
w3 && m2.push(new
|
|
6920
|
+
w3 && m2.push(new np({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6889
6921
|
}
|
|
6890
6922
|
return m2;
|
|
6891
6923
|
}, parseOpera11: function(e) {
|
|
6892
6924
|
return e.stack.split("\n").filter(function(e2) {
|
|
6893
|
-
return !!e2.match(
|
|
6925
|
+
return !!e2.match(rp) && !e2.match(/^Error created at/);
|
|
6894
6926
|
}, this).map(function(e2) {
|
|
6895
6927
|
const a = e2.split("@"), u = this.extractLocation(a.pop()), m2 = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6896
|
-
return new
|
|
6928
|
+
return new np({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
|
|
6897
6929
|
}, this);
|
|
6898
6930
|
} };
|
|
6899
6931
|
function T(e) {
|
|
@@ -6950,9 +6982,9 @@ function g(e, a) {
|
|
|
6950
6982
|
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;
|
|
6951
6983
|
});
|
|
6952
6984
|
}
|
|
6953
|
-
const
|
|
6985
|
+
const ap = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
|
|
6954
6986
|
function R(e, a, u) {
|
|
6955
|
-
const m2 = u ? Object.assign({},
|
|
6987
|
+
const m2 = u ? Object.assign({}, ap, u) : ap, w2 = m2.logger;
|
|
6956
6988
|
if (!w2) return () => {
|
|
6957
6989
|
};
|
|
6958
6990
|
let b2;
|
|
@@ -6961,7 +6993,7 @@ function R(e, a, u) {
|
|
|
6961
6993
|
const I2 = [];
|
|
6962
6994
|
if (m2.level.includes("error")) {
|
|
6963
6995
|
const l = (a2) => {
|
|
6964
|
-
const u2 = a2.message, w3 = a2.error, b3 =
|
|
6996
|
+
const u2 = a2.message, w3 = a2.error, b3 = ip.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
|
|
6965
6997
|
e({ level: "error", trace: b3, payload: C3 });
|
|
6966
6998
|
};
|
|
6967
6999
|
a.addEventListener("error", l), I2.push(() => {
|
|
@@ -6970,7 +7002,7 @@ function R(e, a, u) {
|
|
|
6970
7002
|
const f = (a2) => {
|
|
6971
7003
|
let u2, w3;
|
|
6972
7004
|
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)]);
|
|
6973
|
-
const b3 =
|
|
7005
|
+
const b3 = ip.parse(u2).map((e2) => e2.toString());
|
|
6974
7006
|
e({ level: "error", trace: b3, payload: w3 });
|
|
6975
7007
|
};
|
|
6976
7008
|
a.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -6998,7 +7030,7 @@ function R(e, a, u) {
|
|
|
6998
7030
|
if (a3.apply(this, w3), !("assert" === u2 && w3[0] || x2)) {
|
|
6999
7031
|
x2 = true;
|
|
7000
7032
|
try {
|
|
7001
|
-
const a4 =
|
|
7033
|
+
const a4 = ip.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
|
|
7002
7034
|
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.")] });
|
|
7003
7035
|
} catch (e2) {
|
|
7004
7036
|
a3("@sailfish-rrweb/rrweb logger error:", e2, ...w3);
|
|
@@ -7010,7 +7042,7 @@ function R(e, a, u) {
|
|
|
7010
7042
|
};
|
|
7011
7043
|
}
|
|
7012
7044
|
}
|
|
7013
|
-
var
|
|
7045
|
+
var lp = ((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))(lp || {});
|
|
7014
7046
|
function suppressConsoleLogsDuringCall(e) {
|
|
7015
7047
|
const a = console.log, u = console.warn, m2 = console.error;
|
|
7016
7048
|
console.log = () => {
|
|
@@ -7023,7 +7055,7 @@ function suppressConsoleLogsDuringCall(e) {
|
|
|
7023
7055
|
console.log = a, console.warn = u, console.error = m2;
|
|
7024
7056
|
}
|
|
7025
7057
|
}
|
|
7026
|
-
const
|
|
7058
|
+
const cp = "zendesk_chat", up = "Zendesk";
|
|
7027
7059
|
function zE_safe(...e) {
|
|
7028
7060
|
try {
|
|
7029
7061
|
if ((function hasZendesk() {
|
|
@@ -7062,7 +7094,7 @@ function initializeDomContentEvents(e) {
|
|
|
7062
7094
|
function initializeConsolePlugin(e, a) {
|
|
7063
7095
|
const { name: u, observer: m2 } = /* @__PURE__ */ ((e2) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e2 }))(e);
|
|
7064
7096
|
m2((e2) => {
|
|
7065
|
-
sendEvent({ type:
|
|
7097
|
+
sendEvent({ type: lp.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
|
|
7066
7098
|
}, window, e);
|
|
7067
7099
|
}
|
|
7068
7100
|
async function initializeRecording(e, a, u, m2) {
|
|
@@ -7082,11 +7114,11 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7082
7114
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7083
7115
|
});
|
|
7084
7116
|
const handleWidgetOpen = () => {
|
|
7085
|
-
ae.addSailfishEvent(
|
|
7117
|
+
ae.addSailfishEvent(lp.SailfishCustom, { action: "customer support chat opened", element_id: cp, provider: up });
|
|
7086
7118
|
}, handleWidgetClose = () => {
|
|
7087
|
-
ae.addSailfishEvent(
|
|
7119
|
+
ae.addSailfishEvent(lp.SailfishCustom, { action: "customer support chat closed", element_id: cp, provider: up });
|
|
7088
7120
|
}, handleUnreadMessages = (e2) => {
|
|
7089
|
-
ae.addSailfishEvent(
|
|
7121
|
+
ae.addSailfishEvent(lp.SailfishCustom, { action: "zendesk unreadmessages", element_id: cp, provider: up });
|
|
7090
7122
|
};
|
|
7091
7123
|
suppressConsoleLogsDuringCall(() => {
|
|
7092
7124
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7097,8 +7129,8 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7097
7129
|
}
|
|
7098
7130
|
return w2;
|
|
7099
7131
|
}
|
|
7100
|
-
let
|
|
7101
|
-
const
|
|
7132
|
+
let pp = null, dp = null;
|
|
7133
|
+
const hp = readDebugFlag(), fp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], mp = [400, 403], gp = "CORS", yp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, wp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
|
|
7102
7134
|
function trackDomainChangesOnce() {
|
|
7103
7135
|
const e = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7104
7136
|
if (e.routeWatcherIntervalId) return;
|
|
@@ -7165,7 +7197,7 @@ function shouldSkipHeadersPropagation(e, a = []) {
|
|
|
7165
7197
|
return true;
|
|
7166
7198
|
}
|
|
7167
7199
|
for (const e2 of E) if (u.pathname.toLowerCase().endsWith(e2)) return true;
|
|
7168
|
-
return !!matchUrlWithWildcard(e, [...
|
|
7200
|
+
return !!matchUrlWithWildcard(e, [...fp, ...a]);
|
|
7169
7201
|
}
|
|
7170
7202
|
function setupFetchInterceptor(e = []) {
|
|
7171
7203
|
const a = window.fetch, u = getOrSetSessionId();
|
|
@@ -7178,9 +7210,10 @@ function setupFetchInterceptor(e = []) {
|
|
|
7178
7210
|
C2 = x2.href;
|
|
7179
7211
|
}
|
|
7180
7212
|
return shouldSkipHeadersPropagation(C2, e) ? a2.apply(m2, w2) : (async function injectHeaderWrapper(e2, a3, u2, m3, w3, C3, x3) {
|
|
7181
|
-
var _a2, _b;
|
|
7213
|
+
var _a2, _b, _c2;
|
|
7182
7214
|
if (!C3) return e2.apply(a3, u2);
|
|
7183
|
-
|
|
7215
|
+
let I3 = v4();
|
|
7216
|
+
const _2 = getUrlAndStoredUuids(), O2 = w3.method || "GET", E2 = Date.now();
|
|
7184
7217
|
let D2, F2 = {};
|
|
7185
7218
|
try {
|
|
7186
7219
|
if (m3 instanceof Request) {
|
|
@@ -7199,23 +7232,26 @@ function setupFetchInterceptor(e = []) {
|
|
|
7199
7232
|
F2[e3] = a4;
|
|
7200
7233
|
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7201
7234
|
} catch (e3) {
|
|
7202
|
-
|
|
7235
|
+
hp && console.warn("[Sailfish] Failed to capture request data:", e3);
|
|
7203
7236
|
}
|
|
7237
|
+
delete F2[b];
|
|
7238
|
+
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
7239
|
+
U2 && delete F2[U2];
|
|
7204
7240
|
try {
|
|
7205
|
-
let
|
|
7241
|
+
let U3 = await (async function injectHeader(e3, a4, u3, m4, w4, C4, x4) {
|
|
7206
7242
|
const I4 = getFuncSpanHeader();
|
|
7207
7243
|
if (u3 instanceof Request) {
|
|
7208
7244
|
const _3 = u3.clone(), O3 = new Headers(_3.headers);
|
|
7209
|
-
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7245
|
+
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), hp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: I4.name }));
|
|
7210
7246
|
const E3 = new Request(_3, { headers: O3 });
|
|
7211
7247
|
return await e3.call(a4, E3, m4);
|
|
7212
7248
|
}
|
|
7213
7249
|
{
|
|
7214
7250
|
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7215
|
-
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7251
|
+
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), hp && 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);
|
|
7216
7252
|
}
|
|
7217
7253
|
})(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), B2 = false;
|
|
7218
|
-
|
|
7254
|
+
mp.includes(U3.status) && (hp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
|
|
7219
7255
|
try {
|
|
7220
7256
|
let m5 = u3[0], w4 = u3[1] || {};
|
|
7221
7257
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7231,30 +7267,30 @@ function setupFetchInterceptor(e = []) {
|
|
|
7231
7267
|
}
|
|
7232
7268
|
return e3.apply(a4, u3);
|
|
7233
7269
|
} catch (e4) {
|
|
7234
|
-
throw
|
|
7270
|
+
throw hp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
|
|
7235
7271
|
}
|
|
7236
7272
|
})(e2, a3, u2, x3), B2 = true);
|
|
7237
|
-
const $2 = Date.now(), z2 =
|
|
7273
|
+
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
7238
7274
|
let q2;
|
|
7239
7275
|
try {
|
|
7240
|
-
const e3 =
|
|
7276
|
+
const e3 = U3.clone();
|
|
7241
7277
|
q2 = await e3.text();
|
|
7242
7278
|
} catch (e3) {
|
|
7243
|
-
|
|
7279
|
+
hp && console.warn("[Sailfish] Failed to capture response data:", e3), q2 = null;
|
|
7244
7280
|
}
|
|
7245
7281
|
let H2 = null;
|
|
7246
7282
|
try {
|
|
7247
|
-
H2 = {},
|
|
7283
|
+
H2 = {}, U3.headers.forEach((e3, a4) => {
|
|
7248
7284
|
H2[a4] = e3;
|
|
7249
7285
|
});
|
|
7250
7286
|
} catch (e3) {
|
|
7251
|
-
|
|
7287
|
+
hp && console.warn("[Sailfish] Failed to capture response headers:", e3), H2 = null;
|
|
7252
7288
|
}
|
|
7253
|
-
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 }),
|
|
7289
|
+
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 }), U3;
|
|
7254
7290
|
} catch (m4) {
|
|
7255
|
-
const w4 = Date.now(), b2 = false,
|
|
7256
|
-
if (m4 instanceof TypeError && ((
|
|
7257
|
-
throw sendEvent({ type: 27, timestamp: w4, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: w4, response_code:
|
|
7291
|
+
const w4 = Date.now(), b2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7292
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(gp.toLowerCase()))) return e2.apply(a3, u2);
|
|
7293
|
+
throw sendEvent({ type: 27, timestamp: w4, sessionId: C3, data: { request_id: I3, session_id: C3, timestamp_start: E2, timestamp_end: w4, response_code: U3, success: b2, error: B2, method: O2, url: x3, request_headers: F2, request_body: D2, response_body: null }, ..._2 }), m4;
|
|
7258
7294
|
}
|
|
7259
7295
|
})(a2, m2, w2, x2, I2, u, C2);
|
|
7260
7296
|
} });
|
|
@@ -7287,7 +7323,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7287
7323
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7288
7324
|
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7289
7325
|
else {
|
|
7290
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7326
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(wp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7291
7327
|
window.addEventListener("error", (e2) => {
|
|
7292
7328
|
captureError(e2.error || e2.message);
|
|
7293
7329
|
}), window.addEventListener("unhandledrejection", (e2) => {
|
|
@@ -7295,7 +7331,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7295
7331
|
});
|
|
7296
7332
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
|
|
7297
7333
|
X && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
|
|
7298
|
-
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...
|
|
7334
|
+
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...fp], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
|
|
7299
7335
|
const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7300
7336
|
XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
|
|
7301
7337
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, m3.call(this, e3, a3);
|
|
@@ -7313,13 +7349,15 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7313
7349
|
}
|
|
7314
7350
|
const _3 = getFuncSpanHeader();
|
|
7315
7351
|
if (_3) try {
|
|
7316
|
-
this.setRequestHeader(_3.name, _3.value),
|
|
7352
|
+
this.setRequestHeader(_3.name, _3.value), hp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7317
7353
|
} catch (e3) {
|
|
7318
|
-
|
|
7354
|
+
hp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e3);
|
|
7319
7355
|
}
|
|
7320
7356
|
const O3 = Date.now();
|
|
7321
7357
|
let E3 = false;
|
|
7322
|
-
const D3 = a3[0], F3 = { ...this._capturedRequestHeaders }
|
|
7358
|
+
const D3 = a3[0], F3 = { ...this._capturedRequestHeaders };
|
|
7359
|
+
delete F3[b], _3 && delete F3[_3.name];
|
|
7360
|
+
const emitFinished = (e3, a4, u3, b2, C4) => {
|
|
7323
7361
|
if (E3) return;
|
|
7324
7362
|
E3 = true;
|
|
7325
7363
|
const I4 = Date.now();
|
|
@@ -7341,7 +7379,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7341
7379
|
2 === a5.length && (u3[a5[0]] = a5[1]);
|
|
7342
7380
|
});
|
|
7343
7381
|
} catch (e4) {
|
|
7344
|
-
|
|
7382
|
+
hp && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
|
|
7345
7383
|
}
|
|
7346
7384
|
if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
|
|
7347
7385
|
else {
|
|
@@ -7357,7 +7395,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7357
7395
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7358
7396
|
})();
|
|
7359
7397
|
try {
|
|
7360
|
-
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7398
|
+
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || yp;
|
|
7361
7399
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7362
7400
|
const b2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e, F2, a, O2, E2, D2, _2, "JS/TS", b2);
|
|
7363
7401
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
@@ -7393,7 +7431,7 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7393
7431
|
const e = document.visibilityState, a = Date.now();
|
|
7394
7432
|
"visible" === e && getOrSetSessionId();
|
|
7395
7433
|
try {
|
|
7396
|
-
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }),
|
|
7434
|
+
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), hp && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
|
|
7397
7435
|
} catch (e2) {
|
|
7398
7436
|
console.warn("[Sailfish] Failed to send visibility change event:", e2);
|
|
7399
7437
|
}
|
|
@@ -7401,12 +7439,12 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7401
7439
|
}), H && window.addEventListener("beforeunload", () => {
|
|
7402
7440
|
clearPageVisitDataFromSessionStorage();
|
|
7403
7441
|
});
|
|
7404
|
-
exports.DEFAULT_CAPTURE_SETTINGS =
|
|
7442
|
+
exports.DEFAULT_CAPTURE_SETTINGS = yp, exports.DEFAULT_CONSOLE_RECORDING_SETTINGS = wp, exports.STORAGE_VERSION = 1, exports.addOrUpdateMetadata = function addOrUpdateMetadata(e) {
|
|
7405
7443
|
const a = { type: "addOrUpdateMetadata", metadata: e };
|
|
7406
|
-
|
|
7444
|
+
dp && JSON.stringify(dp) === JSON.stringify(e) || (dp = e, sendMessage(a));
|
|
7407
7445
|
}, exports.buildBatches = buildBatches, exports.createTriageFromRecorder = createTriageFromRecorder, exports.disableFunctionSpanTracking = disableFunctionSpanTracking, exports.enableFunctionSpanTracking = enableFunctionSpanTracking, exports.eventSize = eventSize, exports.fetchCaptureSettings = fetchCaptureSettings, exports.flushBufferedEvents = flushBufferedEvents, exports.getFuncSpanHeader = getFuncSpanHeader, exports.getUrlAndStoredUuids = getUrlAndStoredUuids, exports.identify = function identify(e, a = {}, u = false) {
|
|
7408
7446
|
const m2 = { type: "identify", userId: e, traits: a };
|
|
7409
|
-
|
|
7447
|
+
pp && pp.userId === e && JSON.stringify(pp.traits) === JSON.stringify(a) || (pp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
|
|
7410
7448
|
}, exports.initRecorder = async (e) => {
|
|
7411
7449
|
if ("undefined" == typeof window) return;
|
|
7412
7450
|
const a = window.__sailfish_recorder || (window.__sailfish_recorder = {}), u = getOrSetSessionId();
|
|
@@ -7416,7 +7454,7 @@ exports.DEFAULT_CAPTURE_SETTINGS = fp, exports.DEFAULT_CONSOLE_RECORDING_SETTING
|
|
|
7416
7454
|
delete a.initPromise;
|
|
7417
7455
|
})), a.initPromise);
|
|
7418
7456
|
}, exports.initializeConsolePlugin = initializeConsolePlugin, exports.initializeDomContentEvents = initializeDomContentEvents, exports.initializeRecording = initializeRecording, exports.initializeWebSocket = initializeWebSocket, exports.isFunctionSpanTrackingEnabled = isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = matchUrlWithWildcard, exports.openReportIssueModal = function openReportIssueModal() {
|
|
7419
|
-
|
|
7457
|
+
ct ? stopRecording() : (injectModalHTML(), ot && document.body.appendChild(ot));
|
|
7420
7458
|
}, exports.sendDomainsToNotPropagateHeaderTo = sendDomainsToNotPropagateHeaderTo, exports.sendEvent = sendEvent, exports.sendGraphQLRequest = sendGraphQLRequest, exports.sendMessage = sendMessage, exports.startRecording = startRecording, exports.startRecordingSession = startRecordingSession, exports.trackingEvent = function trackingEvent(e) {
|
|
7421
7459
|
sendMessage({ type: "trackingEvent", trackingData: e, timestamp: exports.nowTimestamp() });
|
|
7422
7460
|
}, exports.withAppUrlMetadata = withAppUrlMetadata;
|