@sailfish-ai/recorder 1.8.11 → 1.8.12-alpha-2
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/graphql.js +7 -0
- package/dist/index.js +34 -5
- package/dist/recorder.cjs +811 -779
- package/dist/recorder.js +814 -779
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +811 -779
- package/dist/recording.js +2 -2
- package/dist/types/graphql.d.ts +2 -1
- package/dist/types/recording.d.ts +1 -1
- package/dist/types/types.d.ts +3 -0
- package/dist/types/websocket.d.ts +11 -1
- package/dist/websocket.js +148 -66
- package/package.json +2 -2
package/dist/recorder.cjs
CHANGED
|
@@ -373,26 +373,29 @@ function withAppUrlMetadata(e) {
|
|
|
373
373
|
H && window.addEventListener("beforeunload", () => {
|
|
374
374
|
window.name = ee + window.name;
|
|
375
375
|
}), exports.nowTimestamp = Date.now, /[1-9][0-9]{12}/.test(Date.now().toString()) || (exports.nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime());
|
|
376
|
-
const ne = readDebugFlag(), re = "per_session"
|
|
377
|
-
let
|
|
376
|
+
const ne = readDebugFlag(), re = "per_session";
|
|
377
|
+
let oe = null, se = false, ie = null, le = null, ce = false, pe = null, de = null, he = false;
|
|
378
|
+
const me = "sailfish_funcspan_global_state";
|
|
378
379
|
function saveGlobalFuncSpanState(e, a) {
|
|
379
380
|
try {
|
|
380
381
|
if ("undefined" == typeof localStorage) return;
|
|
381
|
-
const u = { enabled: e, expirationTimestampMs: a };
|
|
382
|
-
localStorage.setItem(
|
|
382
|
+
const u = { enabled: e, expirationTimestampMs: a, savedAt: Date.now() };
|
|
383
|
+
localStorage.setItem(me, JSON.stringify(u)), ne && console.log("[Sailfish] Saved funcSpan state to localStorage:", u);
|
|
383
384
|
} catch (e2) {
|
|
384
|
-
ne && console.warn("[Sailfish] Failed to save
|
|
385
|
+
ne && console.warn("[Sailfish] Failed to save funcSpan state to localStorage:", e2);
|
|
385
386
|
}
|
|
386
387
|
}
|
|
387
388
|
function clearGlobalFuncSpanState() {
|
|
388
389
|
try {
|
|
389
390
|
if ("undefined" == typeof localStorage) return;
|
|
390
|
-
localStorage.removeItem(
|
|
391
|
+
localStorage.removeItem(me), ne && console.log("[Sailfish] Cleared funcSpan state from localStorage");
|
|
391
392
|
} catch (e) {
|
|
392
|
-
ne && console.warn("[Sailfish] Failed to clear
|
|
393
|
+
ne && console.warn("[Sailfish] Failed to clear funcSpan state from localStorage:", e);
|
|
393
394
|
}
|
|
394
395
|
}
|
|
395
|
-
|
|
396
|
+
function clearStaleFuncSpanState() {
|
|
397
|
+
ce = false, de = null, he = false, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
|
|
398
|
+
}
|
|
396
399
|
function isWebSocketOpen(e) {
|
|
397
400
|
return (e == null ? void 0 : e.readyState) === WebSocket.OPEN;
|
|
398
401
|
}
|
|
@@ -403,15 +406,15 @@ async function flushNotifyQueue() {
|
|
|
403
406
|
u.onsuccess = () => a(u.result), u.onerror = () => a([]);
|
|
404
407
|
})) ?? [];
|
|
405
408
|
})();
|
|
406
|
-
if (isWebSocketOpen(
|
|
407
|
-
for (const a of e)
|
|
409
|
+
if (isWebSocketOpen(oe)) try {
|
|
410
|
+
for (const a of e) oe.send(a.value), await deleteNotifyMessageById(a.id);
|
|
408
411
|
} catch (e2) {
|
|
409
412
|
}
|
|
410
413
|
}
|
|
411
414
|
async function flushBufferedEvents() {
|
|
412
|
-
if (isWebSocketOpen(
|
|
415
|
+
if (isWebSocketOpen(oe)) if (ie) await ie;
|
|
413
416
|
else {
|
|
414
|
-
|
|
417
|
+
ie = (async () => {
|
|
415
418
|
var _a2, _b;
|
|
416
419
|
const e = await (async function getAllIndexedEvents() {
|
|
417
420
|
return await withStore$1("readonly", (e2) => new Promise((a2) => {
|
|
@@ -426,119 +429,138 @@ async function flushBufferedEvents() {
|
|
|
426
429
|
for (const e2 of Object.values(a)) {
|
|
427
430
|
const a2 = buildBatches(e2, (e3) => eventSize(e3.data), 52428800);
|
|
428
431
|
for (const e3 of a2) {
|
|
429
|
-
if (!isWebSocketOpen(
|
|
432
|
+
if (!isWebSocketOpen(oe)) break;
|
|
430
433
|
const a3 = e3.map((e4) => {
|
|
431
434
|
var _a3, _b2;
|
|
432
435
|
return { ...e4.data, appUrl: ((_a3 = e4.data) == null ? void 0 : _a3.appUrl) ?? ((_b2 = window == null ? void 0 : window.location) == null ? void 0 : _b2.href) };
|
|
433
436
|
}), u = e3.map((e4) => e4.id).filter((e4) => null != e4);
|
|
434
437
|
try {
|
|
435
438
|
const e4 = JSON.stringify({ type: "events", events: a3, mapUuid: window.sfMapUuid });
|
|
436
|
-
|
|
439
|
+
oe.send(e4), await deleteEventsByIds(u);
|
|
437
440
|
} catch (e4) {
|
|
438
441
|
}
|
|
439
442
|
}
|
|
440
443
|
}
|
|
441
444
|
})();
|
|
442
445
|
try {
|
|
443
|
-
await
|
|
446
|
+
await ie;
|
|
444
447
|
} finally {
|
|
445
|
-
|
|
448
|
+
ie = null;
|
|
446
449
|
}
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
function sendEvent(e) {
|
|
450
453
|
var _a2;
|
|
451
454
|
const a = { ...e, app_url: (e == null ? void 0 : e.app_url) ?? ((_a2 = window == null ? void 0 : window.location) == null ? void 0 : _a2.href) };
|
|
452
|
-
if (
|
|
455
|
+
if (se || !isWebSocketOpen(oe)) return void saveEventToIDB(a);
|
|
453
456
|
const u = JSON.stringify({ type: "event", event: a, mapUuid: window.sfMapUuid });
|
|
454
457
|
try {
|
|
455
|
-
|
|
458
|
+
oe.send(u);
|
|
456
459
|
} catch (e2) {
|
|
457
460
|
saveEventToIDB(a);
|
|
458
461
|
}
|
|
459
462
|
}
|
|
460
|
-
function initializeWebSocket(e, a, u) {
|
|
461
|
-
const
|
|
463
|
+
function initializeWebSocket(e, a, u, m2) {
|
|
464
|
+
const w2 = (function getWebSocketHost(e2) {
|
|
462
465
|
const a2 = document.createElement("a");
|
|
463
466
|
return a2.href = e2, `${a2.hostname}${a2.port ? `:${a2.port}` : ""}`;
|
|
464
|
-
})(e)
|
|
465
|
-
|
|
466
|
-
|
|
467
|
+
})(e);
|
|
468
|
+
let b2 = `${"https:" === new URL(e).protocol ? "wss" : "ws"}://${w2}/ws/notify/?apiKey=${a}&sessionId=${u}&sender=JS%2FTS&version=1.8.12-alpha-2`;
|
|
469
|
+
m2 && (b2 += `&envValue=${encodeURIComponent(m2)}`);
|
|
470
|
+
return oe = new $(b2, [], { connectionTimeout: 3e4 }), oe.addEventListener("open", () => {
|
|
471
|
+
ne && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (ce ? "ENABLED" : "DISABLED"))), (async () => {
|
|
467
472
|
try {
|
|
468
|
-
|
|
473
|
+
se = true, await flushNotifyQueue(), await flushBufferedEvents();
|
|
469
474
|
} finally {
|
|
470
|
-
|
|
475
|
+
se = false;
|
|
471
476
|
}
|
|
472
|
-
null !=
|
|
477
|
+
null != le && clearInterval(le), le = window.setInterval(() => {
|
|
473
478
|
flushBufferedEvents();
|
|
474
479
|
}, 2e3);
|
|
475
480
|
})();
|
|
476
|
-
}),
|
|
481
|
+
}), oe.addEventListener("close", () => {
|
|
477
482
|
ne && console.log("[Sailfish] WebSocket closed");
|
|
478
|
-
}),
|
|
483
|
+
}), oe.addEventListener("message", (e2) => {
|
|
479
484
|
try {
|
|
480
485
|
const a2 = JSON.parse(e2.data);
|
|
481
|
-
if ("funcSpanTrackingControl" === a2.type) if (ne && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !==
|
|
486
|
+
if ("funcSpanTrackingControl" === a2.type) if (ne && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: a2.enabled, timeoutSeconds: a2.timeoutSeconds, expirationTimestampMs: a2.expirationTimestampMs }), null !== pe && (window.clearTimeout(pe), pe = null), ce = a2.enabled, he = false, ne && console.log("[Sailfish] Function span tracking " + (a2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), a2.enabled) {
|
|
482
487
|
if (a2.expirationTimestampMs) {
|
|
483
|
-
|
|
484
|
-
const e3 = Date.now(), u2 =
|
|
485
|
-
ne && console.log(`[Sailfish] Server expiration timestamp: ${
|
|
486
|
-
|
|
487
|
-
|
|
488
|
+
de = a2.expirationTimestampMs;
|
|
489
|
+
const e3 = Date.now(), u2 = de - e3;
|
|
490
|
+
ne && console.log(`[Sailfish] Server expiration timestamp: ${de}, ms until expiration: ${u2}`), u2 > 0 ? (saveGlobalFuncSpanState(true, de), pe = window.setTimeout(() => {
|
|
491
|
+
if (!he) {
|
|
492
|
+
ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time");
|
|
493
|
+
try {
|
|
494
|
+
isWebSocketOpen(oe) && (oe.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), ne && console.log("[Sailfish] Notified backend that function span tracking expired"));
|
|
495
|
+
} catch (e4) {
|
|
496
|
+
ne && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}, u2)) : (ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Tracking already expired, not enabling"));
|
|
488
500
|
} else {
|
|
489
501
|
const e3 = a2.timeoutSeconds || 3600;
|
|
490
|
-
e3 > 0 && (
|
|
491
|
-
|
|
502
|
+
e3 > 0 && (de = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, de), pe = window.setTimeout(() => {
|
|
503
|
+
if (!he) {
|
|
504
|
+
ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`);
|
|
505
|
+
try {
|
|
506
|
+
isWebSocketOpen(oe) && (oe.send(JSON.stringify({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() })), ne && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
|
|
507
|
+
} catch (e4) {
|
|
508
|
+
ne && console.warn("[Sailfish] Failed to notify backend of tracking expiry:", e4);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
492
511
|
}, 1e3 * e3));
|
|
493
512
|
}
|
|
494
513
|
try {
|
|
495
514
|
const e3 = getOrSetSessionId();
|
|
496
|
-
|
|
515
|
+
oe.send(JSON.stringify({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" })), ne && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
|
|
497
516
|
} catch (e3) {
|
|
498
517
|
ne && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
|
|
499
518
|
}
|
|
500
|
-
} else
|
|
519
|
+
} else de = null, clearGlobalFuncSpanState();
|
|
501
520
|
} catch (e3) {
|
|
502
521
|
}
|
|
503
|
-
}),
|
|
522
|
+
}), oe;
|
|
504
523
|
}
|
|
505
524
|
function sendMessage(e) {
|
|
506
525
|
var _a2;
|
|
507
526
|
"sessionId" in e || (e.sessionId = getOrSetSessionId());
|
|
508
527
|
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) });
|
|
509
|
-
if (
|
|
528
|
+
if (se || !isWebSocketOpen(oe)) saveNotifyMessageToIDB(a);
|
|
510
529
|
else try {
|
|
511
|
-
|
|
530
|
+
oe.send(a);
|
|
512
531
|
} catch (e2) {
|
|
513
532
|
saveNotifyMessageToIDB(a);
|
|
514
533
|
}
|
|
515
534
|
}
|
|
516
535
|
function enableFunctionSpanTracking() {
|
|
517
|
-
if (ne && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"),
|
|
536
|
+
if (ne && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), ce = true, he = true, de = null, null !== pe && (window.clearTimeout(pe), pe = null), isWebSocketOpen(oe)) try {
|
|
518
537
|
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: re };
|
|
519
|
-
|
|
538
|
+
oe.send(JSON.stringify(e));
|
|
520
539
|
} catch (e) {
|
|
521
540
|
console.error("[FUNCSPAN START] ✗ Failed to send tracking session report:", e);
|
|
522
541
|
}
|
|
523
542
|
else ne && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
|
|
524
543
|
}
|
|
525
544
|
function disableFunctionSpanTracking() {
|
|
526
|
-
if (ne && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(
|
|
545
|
+
if (ne && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(oe)) try {
|
|
527
546
|
const e = { type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: re };
|
|
528
|
-
|
|
547
|
+
oe.send(JSON.stringify(e));
|
|
529
548
|
} catch (e) {
|
|
530
549
|
console.error("[FUNCSPAN STOP] ✗ Failed to send tracking stop report:", e);
|
|
531
550
|
}
|
|
532
551
|
else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
|
|
533
|
-
|
|
552
|
+
he && (ce = false, he = false, de = null, ne && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== pe && (window.clearTimeout(pe), pe = null);
|
|
534
553
|
}
|
|
535
554
|
function isFunctionSpanTrackingEnabled() {
|
|
536
|
-
return
|
|
555
|
+
return ce;
|
|
556
|
+
}
|
|
557
|
+
function initializeFunctionSpanTrackingFromApi(e) {
|
|
558
|
+
e && !ce ? (ce = true, he = false, de = null, ne && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e && ce && (ce = false, he = false, de = null, ne && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
|
|
537
559
|
}
|
|
538
560
|
function getFuncSpanHeader() {
|
|
539
|
-
if (!
|
|
540
|
-
if (null !==
|
|
541
|
-
if (Date.now() >=
|
|
561
|
+
if (!ce) return null;
|
|
562
|
+
if (null !== de) {
|
|
563
|
+
if (Date.now() >= de) return ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
|
|
542
564
|
}
|
|
543
565
|
return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-0-5-5-0-1.0" };
|
|
544
566
|
}
|
|
@@ -546,34 +568,36 @@ function getFuncSpanHeader() {
|
|
|
546
568
|
const e = (function loadGlobalFuncSpanState() {
|
|
547
569
|
try {
|
|
548
570
|
if ("undefined" == typeof localStorage) return null;
|
|
549
|
-
const e2 = localStorage.getItem(
|
|
571
|
+
const e2 = localStorage.getItem(me);
|
|
550
572
|
if (!e2) return null;
|
|
551
573
|
const a = JSON.parse(e2);
|
|
552
|
-
return
|
|
574
|
+
return ne && console.log("[Sailfish] Loaded funcSpan state from localStorage:", a), a;
|
|
553
575
|
} catch (e2) {
|
|
554
|
-
return ne && console.warn("[Sailfish] Failed to load
|
|
576
|
+
return ne && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e2), null;
|
|
555
577
|
}
|
|
556
578
|
})();
|
|
557
|
-
e && e.enabled
|
|
579
|
+
if (e && e.enabled) if (ce = true, de = e.expirationTimestampMs, he = false, ne && console.log("[Sailfish] Module init: Restored global function span tracking from localStorage:", { enabled: true, expirationTime: de }), null !== de) {
|
|
580
|
+
Date.now() >= de ? (ce = false, de = null, clearGlobalFuncSpanState(), ne && console.log("[Sailfish] Module init: Persisted tracking already expired, cleared state")) : ne && console.log("[Sailfish] Module init: Function span tracking is active and valid (temporary until WebSocket confirms)");
|
|
581
|
+
} else ne && console.log("[Sailfish] Module init: Function span tracking is active (no expiration, temporary until WebSocket confirms)");
|
|
558
582
|
})();
|
|
559
|
-
const
|
|
560
|
-
var
|
|
583
|
+
const ge = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, flushBufferedEvents, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
|
|
584
|
+
var ye, we, be = {}, ve = {}, Ce = {}, ke = {};
|
|
561
585
|
function requireBase64() {
|
|
562
|
-
if (
|
|
563
|
-
|
|
586
|
+
if (ye) return ke;
|
|
587
|
+
ye = 1;
|
|
564
588
|
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");
|
|
565
|
-
return
|
|
589
|
+
return ke.encode = function(a) {
|
|
566
590
|
if (0 <= a && a < e.length) return e[a];
|
|
567
591
|
throw new TypeError("Must be between 0 and 63: " + a);
|
|
568
|
-
},
|
|
592
|
+
}, ke.decode = function(e2) {
|
|
569
593
|
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;
|
|
570
|
-
},
|
|
594
|
+
}, ke;
|
|
571
595
|
}
|
|
572
596
|
function requireBase64Vlq() {
|
|
573
|
-
if (
|
|
574
|
-
|
|
597
|
+
if (we) return Ce;
|
|
598
|
+
we = 1;
|
|
575
599
|
var e = requireBase64();
|
|
576
|
-
return
|
|
600
|
+
return Ce.encode = function base64VLQ_encode(a) {
|
|
577
601
|
var u, m2 = "", w2 = (function toVLQSigned(e2) {
|
|
578
602
|
return e2 < 0 ? 1 + (-e2 << 1) : 0 + (e2 << 1);
|
|
579
603
|
})(a);
|
|
@@ -581,7 +605,7 @@ function requireBase64Vlq() {
|
|
|
581
605
|
u = 31 & w2, (w2 >>>= 5) > 0 && (u |= 32), m2 += e.encode(u);
|
|
582
606
|
} while (w2 > 0);
|
|
583
607
|
return m2;
|
|
584
|
-
},
|
|
608
|
+
}, Ce.decode = function base64VLQ_decode(a, u, m2) {
|
|
585
609
|
var w2, b2, C2 = a.length, x2 = 0, I2 = 0;
|
|
586
610
|
do {
|
|
587
611
|
if (u >= C2) throw new Error("Expected more digits in base 64 VLQ value.");
|
|
@@ -592,11 +616,11 @@ function requireBase64Vlq() {
|
|
|
592
616
|
var a2 = e2 >> 1;
|
|
593
617
|
return 1 & ~e2 ? a2 : -a2;
|
|
594
618
|
})(x2), m2.rest = u;
|
|
595
|
-
},
|
|
619
|
+
}, Ce;
|
|
596
620
|
}
|
|
597
|
-
var
|
|
621
|
+
var xe, Me = {};
|
|
598
622
|
function requireUtil() {
|
|
599
|
-
return
|
|
623
|
+
return xe || (xe = 1, (function(e) {
|
|
600
624
|
e.getArg = function getArg(e2, a2, u2) {
|
|
601
625
|
if (a2 in e2) return e2[a2];
|
|
602
626
|
if (3 === arguments.length) return u2;
|
|
@@ -708,12 +732,12 @@ function requireUtil() {
|
|
|
708
732
|
}
|
|
709
733
|
return m2(a2);
|
|
710
734
|
};
|
|
711
|
-
})(
|
|
735
|
+
})(Me)), Me;
|
|
712
736
|
}
|
|
713
|
-
var
|
|
737
|
+
var Ie, Oe = {};
|
|
714
738
|
function requireArraySet() {
|
|
715
|
-
if (
|
|
716
|
-
|
|
739
|
+
if (Ie) return Oe;
|
|
740
|
+
Ie = 1;
|
|
717
741
|
var e = requireUtil(), a = Object.prototype.hasOwnProperty, u = "undefined" != typeof Map;
|
|
718
742
|
function ArraySet() {
|
|
719
743
|
this._array = [], this._set = u ? /* @__PURE__ */ new Map() : /* @__PURE__ */ Object.create(null);
|
|
@@ -744,12 +768,12 @@ function requireArraySet() {
|
|
|
744
768
|
throw new Error("No element indexed by " + e2);
|
|
745
769
|
}, ArraySet.prototype.toArray = function ArraySet_toArray() {
|
|
746
770
|
return this._array.slice();
|
|
747
|
-
},
|
|
771
|
+
}, Oe.ArraySet = ArraySet, Oe;
|
|
748
772
|
}
|
|
749
|
-
var
|
|
773
|
+
var Ee, Le, Ae = {};
|
|
750
774
|
function requireMappingList() {
|
|
751
|
-
if (
|
|
752
|
-
|
|
775
|
+
if (Ee) return Ae;
|
|
776
|
+
Ee = 1;
|
|
753
777
|
var e = requireUtil();
|
|
754
778
|
function MappingList() {
|
|
755
779
|
this._array = [], this._sorted = true, this._last = { generatedLine: -1, generatedColumn: 0 };
|
|
@@ -763,11 +787,11 @@ function requireMappingList() {
|
|
|
763
787
|
})(this._last, a) ? (this._sorted = false, this._array.push(a)) : (this._last = a, this._array.push(a));
|
|
764
788
|
}, MappingList.prototype.toArray = function MappingList_toArray() {
|
|
765
789
|
return this._sorted || (this._array.sort(e.compareByGeneratedPositionsInflated), this._sorted = true), this._array;
|
|
766
|
-
},
|
|
790
|
+
}, Ae.MappingList = MappingList, Ae;
|
|
767
791
|
}
|
|
768
792
|
function requireSourceMapGenerator() {
|
|
769
|
-
if (
|
|
770
|
-
|
|
793
|
+
if (Le) return ve;
|
|
794
|
+
Le = 1;
|
|
771
795
|
var e = requireBase64Vlq(), a = requireUtil(), u = requireArraySet().ArraySet, m2 = requireMappingList().MappingList;
|
|
772
796
|
function SourceMapGenerator(e2) {
|
|
773
797
|
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;
|
|
@@ -844,11 +868,11 @@ function requireSourceMapGenerator() {
|
|
|
844
868
|
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;
|
|
845
869
|
}, SourceMapGenerator.prototype.toString = function SourceMapGenerator_toString() {
|
|
846
870
|
return JSON.stringify(this.toJSON());
|
|
847
|
-
},
|
|
871
|
+
}, ve.SourceMapGenerator = SourceMapGenerator, ve;
|
|
848
872
|
}
|
|
849
|
-
var
|
|
873
|
+
var Te, De = {}, Ue = {};
|
|
850
874
|
function requireBinarySearch() {
|
|
851
|
-
return
|
|
875
|
+
return Te || (Te = 1, (function(e) {
|
|
852
876
|
function recursiveSearch(a, u, m2, w2, b2, C2) {
|
|
853
877
|
var x2 = Math.floor((u - a) / 2) + a, I2 = b2(m2, w2[x2], true);
|
|
854
878
|
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;
|
|
@@ -860,11 +884,11 @@ function requireBinarySearch() {
|
|
|
860
884
|
for (; b2 - 1 >= 0 && 0 === m2(u[b2], u[b2 - 1], true); ) --b2;
|
|
861
885
|
return b2;
|
|
862
886
|
};
|
|
863
|
-
})(
|
|
887
|
+
})(Ue)), Ue;
|
|
864
888
|
}
|
|
865
|
-
var
|
|
889
|
+
var Be, je, Ge = {};
|
|
866
890
|
function requireQuickSort() {
|
|
867
|
-
if (
|
|
891
|
+
if (Be) return Ge;
|
|
868
892
|
function SortTemplate(e2) {
|
|
869
893
|
function swap(e3, a, u) {
|
|
870
894
|
var m2 = e3[a];
|
|
@@ -883,21 +907,21 @@ function requireQuickSort() {
|
|
|
883
907
|
}
|
|
884
908
|
};
|
|
885
909
|
}
|
|
886
|
-
|
|
910
|
+
Be = 1;
|
|
887
911
|
let e = /* @__PURE__ */ new WeakMap();
|
|
888
|
-
return
|
|
912
|
+
return Ge.quickSort = function(a, u, m2 = 0) {
|
|
889
913
|
let w2 = e.get(u);
|
|
890
914
|
void 0 === w2 && (w2 = (function cloneSort(e2) {
|
|
891
915
|
let a2 = SortTemplate.toString();
|
|
892
916
|
return new Function(`return ${a2}`)()(e2);
|
|
893
917
|
})(u), e.set(u, w2)), w2(a, u, m2, a.length - 1);
|
|
894
|
-
},
|
|
918
|
+
}, Ge;
|
|
895
919
|
}
|
|
896
|
-
var
|
|
897
|
-
var
|
|
898
|
-
return
|
|
899
|
-
if (
|
|
900
|
-
|
|
920
|
+
var Ve, qe, He = {};
|
|
921
|
+
var Je = (function requireSourceMap() {
|
|
922
|
+
return qe || (qe = 1, be.SourceMapGenerator = requireSourceMapGenerator().SourceMapGenerator, be.SourceMapConsumer = (function requireSourceMapConsumer() {
|
|
923
|
+
if (je) return De;
|
|
924
|
+
je = 1;
|
|
901
925
|
var e = requireUtil(), a = requireBinarySearch(), u = requireArraySet().ArraySet, m2 = requireBase64Vlq(), w2 = requireQuickSort().quickSort;
|
|
902
926
|
function SourceMapConsumer(a2, u2) {
|
|
903
927
|
var m3 = a2;
|
|
@@ -954,7 +978,7 @@ var Xe = (function requireSourceMap() {
|
|
|
954
978
|
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];
|
|
955
979
|
}
|
|
956
980
|
return b3;
|
|
957
|
-
},
|
|
981
|
+
}, De.SourceMapConsumer = SourceMapConsumer, BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer, BasicSourceMapConsumer.prototype._findSourceIndex = function(a2) {
|
|
958
982
|
var u2, m3 = a2;
|
|
959
983
|
if (null != this.sourceRoot && (m3 = e.relative(this.sourceRoot, m3)), this._sources.has(m3)) return this._sources.indexOf(m3);
|
|
960
984
|
for (u2 = 0; u2 < this._absoluteSources.length; ++u2) if (this._absoluteSources[u2] == a2) return u2;
|
|
@@ -1071,7 +1095,7 @@ var Xe = (function requireSourceMap() {
|
|
|
1071
1095
|
if (b3.source === m3.source) return { line: e.getArg(b3, "generatedLine", null), column: e.getArg(b3, "generatedColumn", null), lastColumn: e.getArg(b3, "lastGeneratedColumn", null) };
|
|
1072
1096
|
}
|
|
1073
1097
|
return { line: null, column: null, lastColumn: null };
|
|
1074
|
-
},
|
|
1098
|
+
}, De.BasicSourceMapConsumer = BasicSourceMapConsumer, IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype), IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer, IndexedSourceMapConsumer.prototype._version = 3, Object.defineProperty(IndexedSourceMapConsumer.prototype, "sources", { get: function() {
|
|
1075
1099
|
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]);
|
|
1076
1100
|
return e2;
|
|
1077
1101
|
} }), IndexedSourceMapConsumer.prototype.originalPositionFor = function IndexedSourceMapConsumer_originalPositionFor(u2) {
|
|
@@ -1110,10 +1134,10 @@ var Xe = (function requireSourceMap() {
|
|
|
1110
1134
|
this.__generatedMappings.push(E2), "number" == typeof E2.originalLine && this.__originalMappings.push(E2);
|
|
1111
1135
|
}
|
|
1112
1136
|
w2(this.__generatedMappings, e.compareByGeneratedPositionsDeflated), w2(this.__originalMappings, e.compareByOriginalPositions);
|
|
1113
|
-
},
|
|
1114
|
-
})().SourceMapConsumer,
|
|
1115
|
-
if (
|
|
1116
|
-
|
|
1137
|
+
}, De.IndexedSourceMapConsumer = IndexedSourceMapConsumer, De;
|
|
1138
|
+
})().SourceMapConsumer, be.SourceNode = (function requireSourceNode() {
|
|
1139
|
+
if (Ve) return He;
|
|
1140
|
+
Ve = 1;
|
|
1117
1141
|
var e = requireSourceMapGenerator().SourceMapGenerator, a = requireUtil(), u = /(\r?\n)/, m2 = "$$$isSourceNode$$$";
|
|
1118
1142
|
function SourceNode(e2, a2, u2, w2, b2) {
|
|
1119
1143
|
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);
|
|
@@ -1197,20 +1221,20 @@ var Xe = (function requireSourceMap() {
|
|
|
1197
1221
|
}), this.walkSourceContents(function(e2, a3) {
|
|
1198
1222
|
m3.setSourceContent(e2, a3);
|
|
1199
1223
|
}), { code: u2.code, map: m3 };
|
|
1200
|
-
},
|
|
1201
|
-
})().SourceNode),
|
|
1224
|
+
}, He.SourceNode = SourceNode, He;
|
|
1225
|
+
})().SourceNode), be;
|
|
1202
1226
|
})();
|
|
1203
|
-
const
|
|
1227
|
+
const Ye = /* @__PURE__ */ new Map(), Xe = /(?:\(|\s|^)(https?:\/\/[^)\s]+|\/[^)\s]+|[^)\s]+)?\/?([^/]+\.js)(?:\?[^:)]*)?:(\d+):(\d+)/;
|
|
1204
1228
|
async function getConsumerFor(e, a) {
|
|
1205
1229
|
const u = (e || `/assets/${a}`).split("?")[0], m2 = [`${u}.map`, u.replace(/\.js$/, ".js.map"), `/assets/${a}.map`];
|
|
1206
1230
|
for (const e2 of m2) try {
|
|
1207
|
-
if (
|
|
1231
|
+
if (Ye.has(e2)) return Ye.get(e2);
|
|
1208
1232
|
const a2 = await fetch(e2);
|
|
1209
1233
|
if (!a2.ok) continue;
|
|
1210
1234
|
const u2 = await a2.json();
|
|
1211
1235
|
if (!u2 || !u2.mappings || !u2.sources) continue;
|
|
1212
|
-
const m3 = await new
|
|
1213
|
-
return
|
|
1236
|
+
const m3 = await new Je.SourceMapConsumer(u2);
|
|
1237
|
+
return Ye.set(e2, m3), m3;
|
|
1214
1238
|
} catch {
|
|
1215
1239
|
}
|
|
1216
1240
|
return null;
|
|
@@ -1222,7 +1246,7 @@ async function captureError(e, a = false) {
|
|
|
1222
1246
|
if (!e2) return ["No stack trace available"];
|
|
1223
1247
|
const a2 = Array.isArray(e2) ? e2 : e2.split("\n"), u2 = [];
|
|
1224
1248
|
for (const e3 of a2) {
|
|
1225
|
-
const a3 = e3.match(
|
|
1249
|
+
const a3 = e3.match(Xe);
|
|
1226
1250
|
if (!a3) {
|
|
1227
1251
|
u2.push(e3);
|
|
1228
1252
|
continue;
|
|
@@ -1237,8 +1261,8 @@ async function captureError(e, a = false) {
|
|
|
1237
1261
|
u2.push(`${e3} [No source map found for ${w3}]`);
|
|
1238
1262
|
continue;
|
|
1239
1263
|
}
|
|
1240
|
-
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias:
|
|
1241
|
-
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias:
|
|
1264
|
+
let O2 = _2.originalPositionFor({ line: x3, column: I2, bias: Je.SourceMapConsumer.GREATEST_LOWER_BOUND });
|
|
1265
|
+
if (!O2.source || null == O2.line) for (let e4 = 1; e4 <= 20 && (O2 = _2.originalPositionFor({ line: x3, column: Math.max(0, I2 - e4), bias: Je.SourceMapConsumer.GREATEST_LOWER_BOUND }), !O2.source || null == O2.line); e4++) ;
|
|
1242
1266
|
if (O2.source && null != O2.line) {
|
|
1243
1267
|
const e4 = O2.name || "anonymous";
|
|
1244
1268
|
u2.push(`${O2.source}:${O2.line}:${O2.column ?? 0} (${e4})`);
|
|
@@ -1248,11 +1272,11 @@ async function captureError(e, a = false) {
|
|
|
1248
1272
|
})(m2), b2 = w2.filter((e2) => !e2.includes("chunk-") && !e2.includes("react-dom")), C2 = b2.length > 0 ? b2 : w2, x2 = Date.now();
|
|
1249
1273
|
sendMessage({ type: "event", event: { type: 6, timestamp: x2, data: { payload: { message: u, stack: m2, trace: C2, filteredStack: b2, userAgent: navigator.userAgent, url: window.location.href, timestamp: x2, level: "error" } } } });
|
|
1250
1274
|
}
|
|
1251
|
-
const
|
|
1252
|
-
const
|
|
1275
|
+
const Qe = readDebugFlag();
|
|
1276
|
+
const et = readDebugFlag();
|
|
1253
1277
|
function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
1254
1278
|
const C2 = `${u.backendApi}/graphql/?apiKey=${u.apiKey}`;
|
|
1255
|
-
return
|
|
1279
|
+
return et && console.log(`Initial GraphQL request for ${e} at ${C2}`), (function exponentialBackoff(e2, a2, u2 = 5, m3 = 2e3, w3 = 2) {
|
|
1256
1280
|
let b3 = 0;
|
|
1257
1281
|
const attemptRequest = async () => {
|
|
1258
1282
|
try {
|
|
@@ -1260,18 +1284,21 @@ function sendGraphQLRequest(e, a, u, m2 = 5, w2 = 2e3, b2 = 2) {
|
|
|
1260
1284
|
} catch (e3) {
|
|
1261
1285
|
if (b3++, b3 > u2) throw e3;
|
|
1262
1286
|
const C3 = m3 * Math.pow(w3, b3 - 1);
|
|
1263
|
-
return
|
|
1287
|
+
return Qe && console.log(`Attempt ${b3} failed: ${a2}; Retrying in ${C3}ms...`), await new Promise((e4) => setTimeout(e4, C3)), attemptRequest();
|
|
1264
1288
|
}
|
|
1265
1289
|
};
|
|
1266
1290
|
return attemptRequest();
|
|
1267
1291
|
})(() => fetch(C2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e, query: a, variables: u }) }).then((e2) => {
|
|
1268
|
-
if (
|
|
1292
|
+
if (et && console.log(`Received response with status: ${e2.status}`), !e2.ok) throw new Error(`GraphQL request failed with status ${e2.status}`);
|
|
1269
1293
|
return e2.json();
|
|
1270
1294
|
}), "Sending GraphQL request to Sailfish AI", m2, w2, b2);
|
|
1271
1295
|
}
|
|
1272
1296
|
function fetchCaptureSettings(e, a) {
|
|
1273
1297
|
return sendGraphQLRequest("GetCaptureSettingsFromApiKey", "\n query GetCaptureSettingsFromApiKey($apiKey: String!) {\n captureSettingsFromApiKey(apiKey: $apiKey) {\n recordCanvas\n recordCrossOriginIframes\n collectFonts\n inlineImages\n recordPassword\n recordRealName\n recordCreditCardInfo\n recordSsn\n recordDob\n sampling\n }\n }\n ", { apiKey: e, backendApi: a });
|
|
1274
1298
|
}
|
|
1299
|
+
function fetchFunctionSpanTrackingEnabled(e, a) {
|
|
1300
|
+
return sendGraphQLRequest("GetFunctionSpanTrackingEnabledFromApiKey", "\n query GetFunctionSpanTrackingEnabledFromApiKey($apiKey: String!) {\n isFunctionSpanTrackingEnabledFromApiKey(apiKey: $apiKey)\n }\n ", { apiKey: e, backendApi: a });
|
|
1301
|
+
}
|
|
1275
1302
|
function startRecordingSession(e, a, u, m2, w2, b2, C2, x2, I2) {
|
|
1276
1303
|
return sendGraphQLRequest("StartSession", "mutation StartSession(\n $apiKey: UUID!,\n $recordingSessionId: UUID!,\n $serviceIdentifier: String!,\n $serviceVersion: String,\n $mapUuid: String,\n $gitSha: String,\n $library: String,\n $serviceAdditionalMetadata: JSON,\n $startRecordingFilePath: String,\n $startRecordingLineNumber: Int\n ) {\n startRecordingSession(\n companyApiKey: $apiKey,\n sessionId: $recordingSessionId,\n serviceIdentifier: $serviceIdentifier,\n serviceVersion: $serviceVersion,\n mapUuid: $mapUuid,\n gitSha: $gitSha,\n library: $library,\n serviceAdditionalMetadata: $serviceAdditionalMetadata,\n startRecordingFilePath: $startRecordingFilePath,\n startRecordingLineNumber: $startRecordingLineNumber\n ) {\n id\n }\n }", { apiKey: e, recordingSessionId: a, backendApi: u, serviceIdentifier: m2, serviceVersion: w2, mapUuid: b2, gitSha: C2, library: x2, serviceAdditionalMetadata: I2, startRecordingFilePath: null, startRecordingLineNumber: null });
|
|
1277
1304
|
}
|
|
@@ -1281,9 +1308,9 @@ function sendDomainsToNotPropagateHeaderTo(e, a, u) {
|
|
|
1281
1308
|
function createTriageFromRecorder(e, a, u, m2, w2, b2) {
|
|
1282
1309
|
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 });
|
|
1283
1310
|
}
|
|
1284
|
-
const
|
|
1311
|
+
const nt = { 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 } }, ot = { shortcuts: { ...nt }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
|
|
1285
1312
|
} };
|
|
1286
|
-
let
|
|
1313
|
+
let st = null, it = { mode: "lookback", description: "" }, at = null, lt = null, ct = null, ut = false;
|
|
1287
1314
|
function getShortcutKeyCmdCtrlLabel() {
|
|
1288
1315
|
return (function isMacPlatform() {
|
|
1289
1316
|
const e = navigator.userAgentData;
|
|
@@ -1296,11 +1323,11 @@ function getShortcutLabelFromContext(e) {
|
|
|
1296
1323
|
return e2.requireCmdCtrl && a.push(getShortcutKeyCmdCtrlLabel()), a.push((function formatShortcutKeyLabel(e3) {
|
|
1297
1324
|
return ({ escape: "esc" }[e3.toLowerCase()] || e3).toUpperCase();
|
|
1298
1325
|
})(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 ? " + " : "");
|
|
1299
|
-
})(
|
|
1326
|
+
})(ot.shortcuts[e]);
|
|
1300
1327
|
}
|
|
1301
1328
|
function setupIssueReporting(e) {
|
|
1302
|
-
|
|
1303
|
-
const a2 = { ...
|
|
1329
|
+
ot.apiKey = e.apiKey, ot.backendApi = e.backendApi, ot.resolveSessionId = e.getSessionId, e.customBaseUrl && (ot.triageBaseUrl = e.customBaseUrl), ot.shortcuts = (function mergeShortcutsConfig(e2) {
|
|
1330
|
+
const a2 = { ...nt };
|
|
1304
1331
|
if (!e2) return a2;
|
|
1305
1332
|
"boolean" == typeof e2.enabled && (a2.enabled = e2.enabled);
|
|
1306
1333
|
const u = ["openModalExistingMode", "openModalCaptureNewMode", "closeModal", "submitReport", "startRecording", "stopRecording"];
|
|
@@ -1310,7 +1337,7 @@ function setupIssueReporting(e) {
|
|
|
1310
1337
|
}
|
|
1311
1338
|
return a2;
|
|
1312
1339
|
})(e.shortcuts);
|
|
1313
|
-
const { shortcuts: a } =
|
|
1340
|
+
const { shortcuts: a } = ot;
|
|
1314
1341
|
window.addEventListener("keydown", (e2) => {
|
|
1315
1342
|
const u = (function isTypingInInput() {
|
|
1316
1343
|
const e3 = document.activeElement;
|
|
@@ -1320,20 +1347,20 @@ function setupIssueReporting(e) {
|
|
|
1320
1347
|
} : injectModalHTML;
|
|
1321
1348
|
if (C2 && shortcutUsed("openModalExistingMode")) return e2.preventDefault(), void x2("lookback");
|
|
1322
1349
|
if (C2 && shortcutUsed("openModalCaptureNewMode")) return e2.preventDefault(), void x2("startnow");
|
|
1323
|
-
if (b2 && !
|
|
1350
|
+
if (b2 && !ut && shortcutUsed("closeModal")) return e2.preventDefault(), void closeModal();
|
|
1324
1351
|
if (b2 && shortcutUsed("submitReport")) {
|
|
1325
1352
|
const a2 = document.getElementById("sf-issue-submit-btn");
|
|
1326
1353
|
return void (a2 && !a2.disabled && (e2.preventDefault(), a2.click()));
|
|
1327
1354
|
}
|
|
1328
|
-
if (
|
|
1329
|
-
if (b2 && "startnow" ===
|
|
1355
|
+
if (ut && m2 === a.stopRecording.key && w2 === a.stopRecording.requireCmdCtrl) return e2.preventDefault(), void stopRecording();
|
|
1356
|
+
if (b2 && "startnow" === it.mode && m2 === a.startRecording.key && w2 === a.startRecording.requireCmdCtrl && !u) {
|
|
1330
1357
|
const a2 = document.getElementById("sf-start-recording-btn");
|
|
1331
1358
|
return void (a2 && (e2.preventDefault(), a2.click()));
|
|
1332
1359
|
}
|
|
1333
1360
|
});
|
|
1334
1361
|
}
|
|
1335
1362
|
function closeModal() {
|
|
1336
|
-
|
|
1363
|
+
ot.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (st == null ? void 0 : st.parentNode) && st.parentNode.removeChild(st), st = null, ut || (it = { mode: "lookback", description: "", occurredInThisTab: true }, at = null, lt = null), ct && clearInterval(ct);
|
|
1337
1364
|
}
|
|
1338
1365
|
function activateModalIsolation(e) {
|
|
1339
1366
|
e.setAttribute("role", "dialog"), e.setAttribute("aria-modal", "true"), e.hasAttribute("tabindex") || e.setAttribute("tabindex", "-1");
|
|
@@ -1392,9 +1419,9 @@ function activateModalIsolation(e) {
|
|
|
1392
1419
|
};
|
|
1393
1420
|
}
|
|
1394
1421
|
function injectModalHTML(e = "lookback") {
|
|
1395
|
-
|
|
1422
|
+
st && (st.remove(), st = null), st = document.createElement("div"), st.id = "sf-report-issue-modal";
|
|
1396
1423
|
const a = "startnow" === e;
|
|
1397
|
-
|
|
1424
|
+
st.innerHTML = `
|
|
1398
1425
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1399
1426
|
<div style="position:fixed; top:50%; left:50%; transform:translate(-50%, -50%);
|
|
1400
1427
|
background:#fff; padding:24px; border-radius:12px;
|
|
@@ -1442,7 +1469,7 @@ function injectModalHTML(e = "lookback") {
|
|
|
1442
1469
|
<textarea id="sf-issue-description" placeholder="Add description here"
|
|
1443
1470
|
style="width:100%; height:80px; padding:8px 12px; font-size:14px;
|
|
1444
1471
|
border:1px solid #cbd5e1; border-radius:6px; margin-bottom:20px;
|
|
1445
|
-
resize:none; outline:none;">${
|
|
1472
|
+
resize:none; outline:none;">${it.description}</textarea>
|
|
1446
1473
|
|
|
1447
1474
|
<div id="sf-lookback-container" style="display:${a ? "none" : "block"}; margin-bottom:20px;">
|
|
1448
1475
|
<label for="sf-lookback-minutes" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1530,8 +1557,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1530
1557
|
<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>
|
|
1531
1558
|
</div>
|
|
1532
1559
|
</div>
|
|
1533
|
-
`,
|
|
1534
|
-
const e2 =
|
|
1560
|
+
`, it.mode = e, document.body.appendChild(st), (function bindListeners() {
|
|
1561
|
+
const e2 = st == null ? void 0 : st.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");
|
|
1535
1562
|
e2 == null ? void 0 : e2.forEach((e3) => {
|
|
1536
1563
|
e3.addEventListener("click", (e4) => {
|
|
1537
1564
|
const a3 = e4.currentTarget.dataset.mode;
|
|
@@ -1539,11 +1566,11 @@ function injectModalHTML(e = "lookback") {
|
|
|
1539
1566
|
});
|
|
1540
1567
|
}), u && (u.onclick = closeModal);
|
|
1541
1568
|
w2 && w2.addEventListener("change", () => {
|
|
1542
|
-
"lookback" ===
|
|
1569
|
+
"lookback" === it.mode && (m2.disabled = false, m2.style.opacity = "1", m2.style.cursor = "pointer");
|
|
1543
1570
|
});
|
|
1544
1571
|
a2 && (a2.onclick = () => {
|
|
1545
1572
|
const e3 = document.getElementById("sf-issue-description");
|
|
1546
|
-
e3 && (
|
|
1573
|
+
e3 && (it.description = e3.value), (function startCountdownThenRecord() {
|
|
1547
1574
|
if (document.getElementById("sf-countdown-overlay")) return;
|
|
1548
1575
|
const e4 = document.createElement("div");
|
|
1549
1576
|
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 ";
|
|
@@ -1552,9 +1579,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1552
1579
|
const u2 = setInterval(async () => {
|
|
1553
1580
|
if (a3--, a3 > 0) e4.textContent = a3.toString();
|
|
1554
1581
|
else {
|
|
1555
|
-
clearInterval(u2), document.body.removeChild(e4),
|
|
1582
|
+
clearInterval(u2), document.body.removeChild(e4), at = Date.now(), ut = true;
|
|
1556
1583
|
try {
|
|
1557
|
-
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() =>
|
|
1584
|
+
const { enableFunctionSpanTracking: e5 } = await Promise.resolve().then(() => ge);
|
|
1558
1585
|
e5();
|
|
1559
1586
|
} catch (e5) {
|
|
1560
1587
|
console.error("[Report Issue] Failed to enable function span tracking:", e5);
|
|
@@ -1580,8 +1607,8 @@ function injectModalHTML(e = "lookback") {
|
|
|
1580
1607
|
`, e5.addEventListener("click", () => stopRecording()), document.body.appendChild(e5);
|
|
1581
1608
|
const a4 = e5.querySelector("#sf-recording-timer");
|
|
1582
1609
|
if (!a4) return;
|
|
1583
|
-
|
|
1584
|
-
const e6 = Date.now() - (
|
|
1610
|
+
ct = setInterval(() => {
|
|
1611
|
+
const e6 = Date.now() - (at ?? Date.now()), u3 = Math.floor(e6 / 6e4).toString().padStart(2, "0"), m3 = Math.floor(e6 % 6e4 / 1e3).toString().padStart(2, "0");
|
|
1585
1612
|
a4.textContent = `${u3}:${m3}`;
|
|
1586
1613
|
}, 1e3);
|
|
1587
1614
|
})();
|
|
@@ -1589,12 +1616,12 @@ function injectModalHTML(e = "lookback") {
|
|
|
1589
1616
|
}, 1e3);
|
|
1590
1617
|
})();
|
|
1591
1618
|
});
|
|
1592
|
-
|
|
1619
|
+
st == null ? void 0 : st.addEventListener("click", (e3) => {
|
|
1593
1620
|
var _a2;
|
|
1594
1621
|
if (e3.target.closest("#sf-issue-submit-btn")) {
|
|
1595
|
-
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 =
|
|
1622
|
+
const e4 = ((_a2 = document.getElementById("sf-issue-description")) == null ? void 0 : _a2.value) || "", a3 = it.mode;
|
|
1596
1623
|
let u2, m3;
|
|
1597
|
-
if (
|
|
1624
|
+
if (it.description = e4, "startnow" === a3) u2 = at ?? Date.now() - 3e5, m3 = lt ?? Date.now();
|
|
1598
1625
|
else {
|
|
1599
1626
|
const e5 = 60 * Number((w2 == null ? void 0 : w2.value) || "2") * 1e3;
|
|
1600
1627
|
m3 = Date.now(), u2 = m3 - e5;
|
|
@@ -1603,9 +1630,9 @@ function injectModalHTML(e = "lookback") {
|
|
|
1603
1630
|
var _a3, _b;
|
|
1604
1631
|
try {
|
|
1605
1632
|
showTriageStatusModal(true);
|
|
1606
|
-
const m4 = await createTriageFromRecorder(
|
|
1607
|
-
if (!
|
|
1608
|
-
return
|
|
1633
|
+
const m4 = await createTriageFromRecorder(ot.apiKey, ot.backendApi, (function getSessionIdSafely() {
|
|
1634
|
+
if (!ot.resolveSessionId) throw new Error("getSessionId not defined");
|
|
1635
|
+
return ot.resolveSessionId();
|
|
1609
1636
|
})(), e5, a4, u3), w3 = (_b = (_a3 = m4 == null ? void 0 : m4.data) == null ? void 0 : _a3.createTriageFromRecorder) == null ? void 0 : _b.id;
|
|
1610
1637
|
w3 ? showTriageStatusModal(false, w3) : (console.error("No Triage ID returned from backend."), showTriageStatusModal(false, null));
|
|
1611
1638
|
} catch (e6) {
|
|
@@ -1614,29 +1641,29 @@ function injectModalHTML(e = "lookback") {
|
|
|
1614
1641
|
})(`${u2}`, `${m3}`, e4);
|
|
1615
1642
|
}
|
|
1616
1643
|
});
|
|
1617
|
-
})(),
|
|
1644
|
+
})(), ot.deactivateIsolation = activateModalIsolation(st);
|
|
1618
1645
|
}
|
|
1619
1646
|
function setActiveTab(e) {
|
|
1620
|
-
|
|
1621
|
-
const a =
|
|
1647
|
+
it.mode = e;
|
|
1648
|
+
const a = st == null ? void 0 : st.querySelector("#sf-tab-lookback"), u = st == null ? void 0 : st.querySelector("#sf-tab-startnow");
|
|
1622
1649
|
"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");
|
|
1623
1650
|
}
|
|
1624
1651
|
function updateModeSpecificUI(e) {
|
|
1625
1652
|
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");
|
|
1626
1653
|
if (a && u && m2 && w2 && b2 && C2 && x2) if ("startnow" === e) {
|
|
1627
1654
|
m2.style.display = "block", x2.style.display = "none", C2.style.justifyContent = "space-between", a.textContent = "I want to reproduce the issue right now.";
|
|
1628
|
-
const e2 = null !==
|
|
1629
|
-
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed",
|
|
1630
|
-
const e3 = Math.floor((
|
|
1655
|
+
const e2 = null !== at && null !== lt;
|
|
1656
|
+
if (u.disabled = !e2, u.style.opacity = e2 ? "1" : "0.4", u.style.cursor = e2 ? "pointer" : "not-allowed", at && lt) {
|
|
1657
|
+
const e3 = Math.floor((lt - at) / 1e3), a2 = String(Math.floor(e3 / 60)).padStart(2, "0"), u2 = String(e3 % 60).padStart(2, "0");
|
|
1631
1658
|
w2.style.display = "block", b2.textContent = `${a2}:${u2}`;
|
|
1632
1659
|
} else w2.style.display = "none";
|
|
1633
1660
|
} 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";
|
|
1634
1661
|
}
|
|
1635
1662
|
async function stopRecording() {
|
|
1636
1663
|
var _a2;
|
|
1637
|
-
|
|
1664
|
+
lt = Date.now(), ut = false, ct && clearInterval(ct), (_a2 = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a2.remove();
|
|
1638
1665
|
try {
|
|
1639
|
-
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() =>
|
|
1666
|
+
const { disableFunctionSpanTracking: e } = await Promise.resolve().then(() => ge);
|
|
1640
1667
|
e();
|
|
1641
1668
|
} catch (e) {
|
|
1642
1669
|
console.error("[Report Issue] Failed to disable function span tracking:", e);
|
|
@@ -1649,17 +1676,17 @@ async function stopRecording() {
|
|
|
1649
1676
|
a2 && (a2.textContent = "Re-record");
|
|
1650
1677
|
}
|
|
1651
1678
|
const a = document.getElementById("sf-recording-timer-label"), u = document.getElementById("sf-recording-timer-display");
|
|
1652
|
-
if (a && u &&
|
|
1653
|
-
const e2 = Math.floor((
|
|
1679
|
+
if (a && u && at && lt) {
|
|
1680
|
+
const e2 = Math.floor((lt - at) / 1e3), m3 = Math.floor(e2 / 60).toString().padStart(2, "0"), w3 = (e2 % 60).toString().padStart(2, "0");
|
|
1654
1681
|
u.textContent = `${m3}:${w3}`, a.style.display = "block";
|
|
1655
1682
|
}
|
|
1656
1683
|
const m2 = document.getElementById("sf-issue-description");
|
|
1657
|
-
m2 && (m2.value =
|
|
1684
|
+
m2 && (m2.value = it.description);
|
|
1658
1685
|
const w2 = document.querySelector('input[value="startnow"]');
|
|
1659
1686
|
w2 && (w2.checked = true);
|
|
1660
1687
|
const b2 = document.getElementById("sf-inline-record-chip"), C2 = document.getElementById("sf-inline-record-timer");
|
|
1661
1688
|
if (b2 && C2) {
|
|
1662
|
-
const e2 = Math.floor(((
|
|
1689
|
+
const e2 = Math.floor(((lt ?? 0) - (at ?? 0)) / 1e3), a2 = Math.floor(e2 / 60).toString().padStart(2, "0"), u2 = Math.floor(e2 % 60).toString().padStart(2, "0");
|
|
1663
1690
|
C2.textContent = `${a2}:${u2}`, C2.style.color = "black", b2.style.display = "flex";
|
|
1664
1691
|
}
|
|
1665
1692
|
const x2 = document.getElementById("sf-issue-submit-btn");
|
|
@@ -1672,7 +1699,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1672
1699
|
var _a3, _b;
|
|
1673
1700
|
(_a3 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a3.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1674
1701
|
})();
|
|
1675
|
-
const u = a ? `${
|
|
1702
|
+
const u = a ? `${ot.triageBaseUrl}/triage/${a}?from=inAppReportIssue` : "", m2 = document.createElement("div");
|
|
1676
1703
|
m2.id = "sf-triage-status-modal", Object.assign(m2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1677
1704
|
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>';
|
|
1678
1705
|
m2.innerHTML = `
|
|
@@ -1734,7 +1761,7 @@ function showTriageStatusModal(e, a) {
|
|
|
1734
1761
|
function fadeCardAndRemove(e, a, u = 300) {
|
|
1735
1762
|
a.style.opacity = "0", a.addEventListener("transitionend", () => e.remove(), { once: true }), setTimeout(() => e.remove(), u + 100);
|
|
1736
1763
|
}
|
|
1737
|
-
var
|
|
1764
|
+
var pt = Object.defineProperty, b$1 = (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 = Object.defineProperty, xn = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? dt(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u), ht = ((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))(ht || {});
|
|
1738
1765
|
function vr(e) {
|
|
1739
1766
|
return e.nodeType === e.ELEMENT_NODE;
|
|
1740
1767
|
}
|
|
@@ -1776,7 +1803,7 @@ function kr(e) {
|
|
|
1776
1803
|
})(e.cssText);
|
|
1777
1804
|
return a || e.cssText;
|
|
1778
1805
|
}
|
|
1779
|
-
let
|
|
1806
|
+
let gt = class {
|
|
1780
1807
|
constructor() {
|
|
1781
1808
|
xn(this, "idNodeMap", /* @__PURE__ */ new Map()), xn(this, "nodeMetaMap", /* @__PURE__ */ new WeakMap());
|
|
1782
1809
|
}
|
|
@@ -1828,7 +1855,7 @@ function Zt({ element: e, maskInputOptions: a, tagName: u, type: m2, value: w2,
|
|
|
1828
1855
|
function fe(e) {
|
|
1829
1856
|
return e.toLowerCase();
|
|
1830
1857
|
}
|
|
1831
|
-
const
|
|
1858
|
+
const yt = "__rrweb_original__";
|
|
1832
1859
|
function Yt(e) {
|
|
1833
1860
|
const a = e.type;
|
|
1834
1861
|
return e.hasAttribute("data-rr-is-password") ? "password" : a ? fe(a) : null;
|
|
@@ -1843,19 +1870,19 @@ function xr(e, a) {
|
|
|
1843
1870
|
const m2 = u.pathname.match(/\.([0-9a-z]+)(?:$)/i);
|
|
1844
1871
|
return (null == m2 ? void 0 : m2[1]) ?? null;
|
|
1845
1872
|
}
|
|
1846
|
-
let
|
|
1847
|
-
const
|
|
1873
|
+
let wt = 1;
|
|
1874
|
+
const St = new RegExp("[^a-z0-9-_:]");
|
|
1848
1875
|
function Ir() {
|
|
1849
|
-
return
|
|
1876
|
+
return wt++;
|
|
1850
1877
|
}
|
|
1851
|
-
let
|
|
1852
|
-
const
|
|
1878
|
+
let bt, vt;
|
|
1879
|
+
const Ct = /url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm, kt = /^(?:[a-z+]+:)?\/\//i, xt = /^www\..*/i, Mt = /^(data:)([^,]*),(.*)/i;
|
|
1853
1880
|
function Pt(e, a) {
|
|
1854
|
-
return (e || "").replace(
|
|
1881
|
+
return (e || "").replace(Ct, (e2, u, m2, w2, b2, C2) => {
|
|
1855
1882
|
const x2 = m2 || b2 || C2, I2 = u || w2 || "";
|
|
1856
1883
|
if (!x2) return e2;
|
|
1857
|
-
if (
|
|
1858
|
-
if (
|
|
1884
|
+
if (kt.test(x2) || xt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1885
|
+
if (Mt.test(x2)) return `url(${I2}${x2}${I2})`;
|
|
1859
1886
|
if ("/" === x2[0]) return `url(${I2}${(function Ei(e3) {
|
|
1860
1887
|
let a2 = "";
|
|
1861
1888
|
return a2 = e3.indexOf("//") > -1 ? e3.split("/").slice(0, 3).join("/") : e3.split("/")[0], a2 = a2.split("?")[0], a2;
|
|
@@ -1866,8 +1893,8 @@ function Pt(e, a) {
|
|
|
1866
1893
|
return `url(${I2}${_2.join("/")}${I2})`;
|
|
1867
1894
|
});
|
|
1868
1895
|
}
|
|
1869
|
-
const
|
|
1870
|
-
const
|
|
1896
|
+
const It = /^[^ \t\n\r\u000c]+/, Et = /^[, \t\n\r\u000c]+/;
|
|
1897
|
+
const Lt = /* @__PURE__ */ new WeakMap();
|
|
1871
1898
|
function At(e, a) {
|
|
1872
1899
|
return a && "" !== a.trim() ? $t(e, a) : a;
|
|
1873
1900
|
}
|
|
@@ -1875,8 +1902,8 @@ function Fi(e) {
|
|
|
1875
1902
|
return !("svg" !== e.tagName && !e.ownerSVGElement);
|
|
1876
1903
|
}
|
|
1877
1904
|
function $t(e, a) {
|
|
1878
|
-
let u =
|
|
1879
|
-
if (u || (u = e.createElement("a"),
|
|
1905
|
+
let u = Lt.get(e);
|
|
1906
|
+
if (u || (u = e.createElement("a"), Lt.set(e, u)), a) {
|
|
1880
1907
|
if (a.startsWith("blob:") || a.startsWith("data:")) return a;
|
|
1881
1908
|
} else a = "";
|
|
1882
1909
|
return u.setAttribute("href", a), u.href;
|
|
@@ -1891,8 +1918,8 @@ function Mr(e, a, u, m2) {
|
|
|
1891
1918
|
return w2 ? (m4 = w2[0], u2 += m4.length, m4) : "";
|
|
1892
1919
|
}
|
|
1893
1920
|
const m3 = [];
|
|
1894
|
-
for (; n(
|
|
1895
|
-
let w2 = n(
|
|
1921
|
+
for (; n(Et), !(u2 >= a2.length); ) {
|
|
1922
|
+
let w2 = n(It);
|
|
1896
1923
|
if ("," === w2.slice(-1)) w2 = At(e2, w2.substring(0, w2.length - 1)), m3.push(w2);
|
|
1897
1924
|
else {
|
|
1898
1925
|
let b2 = "";
|
|
@@ -1962,9 +1989,9 @@ function zi(e, a) {
|
|
|
1962
1989
|
})(u, m2);
|
|
1963
1990
|
switch (e.nodeType) {
|
|
1964
1991
|
case e.DOCUMENT_NODE:
|
|
1965
|
-
return "CSS1Compat" !== e.compatMode ? { type:
|
|
1992
|
+
return "CSS1Compat" !== e.compatMode ? { type: ht.Document, childNodes: [], compatMode: e.compatMode } : { type: ht.Document, childNodes: [] };
|
|
1966
1993
|
case e.DOCUMENT_TYPE_NODE:
|
|
1967
|
-
return { type:
|
|
1994
|
+
return { type: ht.DocumentType, name: e.name, publicId: e.publicId, systemId: e.systemId, rootId: $2 };
|
|
1968
1995
|
case e.ELEMENT_NODE:
|
|
1969
1996
|
return (function Vi(e2, a2) {
|
|
1970
1997
|
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) {
|
|
@@ -1982,7 +2009,7 @@ function zi(e, a) {
|
|
|
1982
2009
|
})(e2, m3, w3), B3 = (function Oi(e3) {
|
|
1983
2010
|
if (e3 instanceof HTMLFormElement) return "form";
|
|
1984
2011
|
const a3 = fe(e3.tagName);
|
|
1985
|
-
return
|
|
2012
|
+
return St.test(a3) ? "div" : a3;
|
|
1986
2013
|
})(e2);
|
|
1987
2014
|
let $3 = {};
|
|
1988
2015
|
const z2 = e2.attributes.length;
|
|
@@ -2011,7 +2038,7 @@ function zi(e, a) {
|
|
|
2011
2038
|
const a3 = e3.getContext("2d");
|
|
2012
2039
|
if (!a3) return true;
|
|
2013
2040
|
for (let u3 = 0; u3 < e3.width; u3 += 50) for (let m4 = 0; m4 < e3.height; m4 += 50) {
|
|
2014
|
-
const w4 = a3.getImageData, b4 =
|
|
2041
|
+
const w4 = a3.getImageData, b4 = yt in w4 ? w4[yt] : w4;
|
|
2015
2042
|
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;
|
|
2016
2043
|
}
|
|
2017
2044
|
return true;
|
|
@@ -2023,11 +2050,11 @@ function zi(e, a) {
|
|
|
2023
2050
|
}
|
|
2024
2051
|
}
|
|
2025
2052
|
if ("img" === B3 && _3) {
|
|
2026
|
-
|
|
2053
|
+
bt || (bt = u2.createElement("canvas"), vt = bt.getContext("2d"));
|
|
2027
2054
|
const a3 = e2, m4 = a3.currentSrc || a3.getAttribute("src") || "<unknown-src>", w4 = a3.crossOrigin, A = () => {
|
|
2028
2055
|
a3.removeEventListener("load", A);
|
|
2029
2056
|
try {
|
|
2030
|
-
|
|
2057
|
+
bt.width = a3.naturalWidth, bt.height = a3.naturalHeight, vt.drawImage(a3, 0, 0), $3.rr_dataURL = bt.toDataURL(I3.type, I3.quality);
|
|
2031
2058
|
} catch (e3) {
|
|
2032
2059
|
if ("anonymous" !== a3.crossOrigin) return a3.crossOrigin = "anonymous", void (a3.complete && 0 !== a3.naturalWidth ? A() : a3.addEventListener("load", A));
|
|
2033
2060
|
console.warn(`Cannot inline img src=${m4}! Error: ${e3}`);
|
|
@@ -2050,7 +2077,7 @@ function zi(e, a) {
|
|
|
2050
2077
|
customElements.get(B3) && (j2 = true);
|
|
2051
2078
|
} catch {
|
|
2052
2079
|
}
|
|
2053
|
-
return { type:
|
|
2080
|
+
return { type: ht.Element, tagName: B3, attributes: $3, childNodes: [], isSVG: Fi(e2) || void 0, needBlock: U3, rootId: F3, isCustom: j2 };
|
|
2054
2081
|
})(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 });
|
|
2055
2082
|
case e.TEXT_NODE:
|
|
2056
2083
|
return (function ji(e2, a2) {
|
|
@@ -2066,12 +2093,12 @@ function zi(e, a) {
|
|
|
2066
2093
|
}
|
|
2067
2094
|
x3 = Pt(x3, $t(a2.doc));
|
|
2068
2095
|
}
|
|
2069
|
-
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type:
|
|
2096
|
+
return _3 && (x3 = "SCRIPT_PLACEHOLDER"), !I3 && !_3 && x3 && m3 && (x3 = w3 ? w3(x3, e2.parentElement) : x3.replace(/[\S]/g, "*")), { type: ht.Text, textContent: x3 || "", isStyle: I3, rootId: b3 };
|
|
2070
2097
|
})(e, { doc: u, needsMask: C2, maskTextFn: _2, rootId: $2 });
|
|
2071
2098
|
case e.CDATA_SECTION_NODE:
|
|
2072
|
-
return { type:
|
|
2099
|
+
return { type: ht.CDATA, textContent: "", rootId: $2 };
|
|
2073
2100
|
case e.COMMENT_NODE:
|
|
2074
|
-
return { type:
|
|
2101
|
+
return { type: ht.Comment, textContent: e.textContent || "", rootId: $2 };
|
|
2075
2102
|
default:
|
|
2076
2103
|
return false;
|
|
2077
2104
|
}
|
|
@@ -2087,21 +2114,21 @@ function Se(e, a) {
|
|
|
2087
2114
|
if (!ee2) return console.warn(e, "not serialized"), null;
|
|
2088
2115
|
let te2;
|
|
2089
2116
|
te2 = m2.hasNode(e) ? m2.getId(e) : (function Gi(e2, a2) {
|
|
2090
|
-
return !!(a2.comment && e2.type ===
|
|
2091
|
-
})(ee2, F2) || !Q2 && ee2.type ===
|
|
2117
|
+
return !!(a2.comment && e2.type === ht.Comment || e2.type === ht.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)))));
|
|
2118
|
+
})(ee2, F2) || !Q2 && ee2.type === ht.Text && !ee2.isStyle && !ee2.textContent.replace(/^\s+|\s+$/gm, "").length ? -2 : Ir();
|
|
2092
2119
|
const ne2 = Object.assign(ee2, { id: te2 });
|
|
2093
2120
|
if (m2.add(e, ne2), -2 === te2) return null;
|
|
2094
2121
|
z2 && z2(e);
|
|
2095
2122
|
let re2 = !I2;
|
|
2096
|
-
if (ne2.type ===
|
|
2123
|
+
if (ne2.type === ht.Element) {
|
|
2097
2124
|
re2 = re2 && !ne2.needBlock, delete ne2.needBlock;
|
|
2098
2125
|
const a2 = e.shadowRoot;
|
|
2099
2126
|
a2 && ze(a2) && (ne2.isShadowHost = true);
|
|
2100
2127
|
}
|
|
2101
|
-
if ((ne2.type ===
|
|
2102
|
-
F2.headWhitespace && ne2.type ===
|
|
2128
|
+
if ((ne2.type === ht.Document || ne2.type === ht.Element) && re2) {
|
|
2129
|
+
F2.headWhitespace && ne2.type === ht.Element && "head" === ne2.tagName && (Q2 = false);
|
|
2103
2130
|
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 };
|
|
2104
|
-
if (ne2.type !==
|
|
2131
|
+
if (ne2.type !== ht.Element || "textarea" !== ne2.tagName || void 0 === ne2.attributes.value) for (const u2 of Array.from(e.childNodes)) {
|
|
2105
2132
|
const e2 = Se(u2, a2);
|
|
2106
2133
|
e2 && ne2.childNodes.push(e2);
|
|
2107
2134
|
}
|
|
@@ -2110,7 +2137,7 @@ function Se(e, a) {
|
|
|
2110
2137
|
m3 && (ze(e.shadowRoot) && (m3.isShadow = true), ne2.childNodes.push(m3));
|
|
2111
2138
|
}
|
|
2112
2139
|
}
|
|
2113
|
-
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type ===
|
|
2140
|
+
return e.parentNode && We(e.parentNode) && ze(e.parentNode) && (ne2.isShadow = true), ne2.type === ht.Element && "iframe" === ne2.tagName && (function _i(e2, a2, u2) {
|
|
2114
2141
|
const m3 = e2.contentWindow;
|
|
2115
2142
|
if (!m3) return;
|
|
2116
2143
|
let w3, b3 = false;
|
|
@@ -2136,7 +2163,7 @@ function Se(e, a) {
|
|
|
2136
2163
|
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 });
|
|
2137
2164
|
u2 && j2(e, u2);
|
|
2138
2165
|
}
|
|
2139
|
-
}, V2), ne2.type ===
|
|
2166
|
+
}, V2), ne2.type === ht.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) {
|
|
2140
2167
|
let m3, w3 = false;
|
|
2141
2168
|
try {
|
|
2142
2169
|
m3 = e2.sheet;
|
|
@@ -2176,13 +2203,13 @@ function $i(e) {
|
|
|
2176
2203
|
} });
|
|
2177
2204
|
}), u;
|
|
2178
2205
|
}
|
|
2179
|
-
var
|
|
2180
|
-
return { isColorSupported: false, reset:
|
|
2206
|
+
var Rt = { exports: {} }, Dt = String, Rr = function() {
|
|
2207
|
+
return { isColorSupported: false, reset: Dt, bold: Dt, dim: Dt, italic: Dt, underline: Dt, inverse: Dt, hidden: Dt, strikethrough: Dt, black: Dt, red: Dt, green: Dt, yellow: Dt, blue: Dt, magenta: Dt, cyan: Dt, white: Dt, gray: Dt, bgBlack: Dt, bgRed: Dt, bgGreen: Dt, bgYellow: Dt, bgBlue: Dt, bgMagenta: Dt, bgCyan: Dt, bgWhite: Dt, blackBright: Dt, redBright: Dt, greenBright: Dt, yellowBright: Dt, blueBright: Dt, magentaBright: Dt, cyanBright: Dt, whiteBright: Dt, bgBlackBright: Dt, bgRedBright: Dt, bgGreenBright: Dt, bgYellowBright: Dt, bgBlueBright: Dt, bgMagentaBright: Dt, bgCyanBright: Dt, bgWhiteBright: Dt };
|
|
2181
2208
|
};
|
|
2182
|
-
|
|
2183
|
-
var
|
|
2184
|
-
const
|
|
2185
|
-
let
|
|
2209
|
+
Rt.exports = Rr(), Rt.exports.createColors = Rr;
|
|
2210
|
+
var Ft = Rt.exports;
|
|
2211
|
+
const Ut = $i(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
2212
|
+
let Bt = Ft, Wt = Ut, jt = class Lr extends Error {
|
|
2186
2213
|
constructor(e, a, u, m2, w2, b2) {
|
|
2187
2214
|
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);
|
|
2188
2215
|
}
|
|
@@ -2192,11 +2219,11 @@ let jt = Bt, Vt = Wt, Ht = class Lr extends Error {
|
|
|
2192
2219
|
showSourceCode(e) {
|
|
2193
2220
|
if (!this.source) return "";
|
|
2194
2221
|
let a = this.source;
|
|
2195
|
-
null == e && (e =
|
|
2222
|
+
null == e && (e = Bt.isColorSupported);
|
|
2196
2223
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
2197
2224
|
if (e) {
|
|
2198
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
2199
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
2225
|
+
let { bold: e2, gray: a2, red: u2 } = Bt.createColors(true);
|
|
2226
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), Wt && (i = (e3) => Wt(e3));
|
|
2200
2227
|
}
|
|
2201
2228
|
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;
|
|
2202
2229
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -2217,10 +2244,10 @@ let jt = Bt, Vt = Wt, Ht = class Lr extends Error {
|
|
|
2217
2244
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
2218
2245
|
}
|
|
2219
2246
|
};
|
|
2220
|
-
var
|
|
2221
|
-
|
|
2222
|
-
const
|
|
2223
|
-
let
|
|
2247
|
+
var Vt = jt;
|
|
2248
|
+
jt.default = jt;
|
|
2249
|
+
const Ht = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
2250
|
+
let Kt = class {
|
|
2224
2251
|
constructor(e) {
|
|
2225
2252
|
this.builder = e;
|
|
2226
2253
|
}
|
|
@@ -2272,7 +2299,7 @@ let Xt = class {
|
|
|
2272
2299
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
2273
2300
|
let w2 = e.parent;
|
|
2274
2301
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
2275
|
-
if (!w2) return
|
|
2302
|
+
if (!w2) return Ht[u];
|
|
2276
2303
|
let b2 = e.root();
|
|
2277
2304
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
2278
2305
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -2284,7 +2311,7 @@ let Xt = class {
|
|
|
2284
2311
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
2285
2312
|
});
|
|
2286
2313
|
}
|
|
2287
|
-
return typeof m2 > "u" && (m2 =
|
|
2314
|
+
return typeof m2 > "u" && (m2 = Ht[u]), b2.rawCache[u] = m2, m2;
|
|
2288
2315
|
}
|
|
2289
2316
|
rawBeforeClose(e) {
|
|
2290
2317
|
let a;
|
|
@@ -2360,17 +2387,17 @@ let Xt = class {
|
|
|
2360
2387
|
this[e.type](e, a);
|
|
2361
2388
|
}
|
|
2362
2389
|
};
|
|
2363
|
-
var
|
|
2364
|
-
|
|
2365
|
-
let
|
|
2390
|
+
var Jt = Kt;
|
|
2391
|
+
Kt.default = Kt;
|
|
2392
|
+
let Xt = Jt;
|
|
2366
2393
|
function ks(e, a) {
|
|
2367
|
-
new
|
|
2394
|
+
new Xt(a).stringify(e);
|
|
2368
2395
|
}
|
|
2369
|
-
var
|
|
2396
|
+
var Qt = ks;
|
|
2370
2397
|
ks.default = ks;
|
|
2371
|
-
var
|
|
2372
|
-
|
|
2373
|
-
let
|
|
2398
|
+
var en = {};
|
|
2399
|
+
en.isClean = Symbol("isClean"), en.my = Symbol("my");
|
|
2400
|
+
let tn = Vt, nn = Jt, rn = Qt, { isClean: on, my: sn } = en;
|
|
2374
2401
|
function Cs(e, a) {
|
|
2375
2402
|
let u = new e.constructor();
|
|
2376
2403
|
for (let m2 in e) {
|
|
@@ -2392,12 +2419,12 @@ function Pe(e, a) {
|
|
|
2392
2419
|
}
|
|
2393
2420
|
return w2;
|
|
2394
2421
|
}
|
|
2395
|
-
let
|
|
2422
|
+
let an = class {
|
|
2396
2423
|
get proxyOf() {
|
|
2397
2424
|
return this;
|
|
2398
2425
|
}
|
|
2399
2426
|
constructor(e = {}) {
|
|
2400
|
-
this.raws = {}, this[
|
|
2427
|
+
this.raws = {}, this[on] = false, this[sn] = true;
|
|
2401
2428
|
for (let a in e) if ("nodes" === a) {
|
|
2402
2429
|
this.nodes = [];
|
|
2403
2430
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -2441,19 +2468,19 @@ let cn = class {
|
|
|
2441
2468
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
2442
2469
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
2443
2470
|
}
|
|
2444
|
-
return new
|
|
2471
|
+
return new tn(e);
|
|
2445
2472
|
}
|
|
2446
2473
|
getProxyProcessor() {
|
|
2447
2474
|
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) };
|
|
2448
2475
|
}
|
|
2449
2476
|
markClean() {
|
|
2450
|
-
this[
|
|
2477
|
+
this[on] = true;
|
|
2451
2478
|
}
|
|
2452
2479
|
markDirty() {
|
|
2453
|
-
if (this[
|
|
2454
|
-
this[
|
|
2480
|
+
if (this[on]) {
|
|
2481
|
+
this[on] = false;
|
|
2455
2482
|
let e = this;
|
|
2456
|
-
for (; e = e.parent; ) e[
|
|
2483
|
+
for (; e = e.parent; ) e[on] = false;
|
|
2457
2484
|
}
|
|
2458
2485
|
}
|
|
2459
2486
|
next() {
|
|
@@ -2489,7 +2516,7 @@ let cn = class {
|
|
|
2489
2516
|
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 };
|
|
2490
2517
|
}
|
|
2491
2518
|
raw(e, a) {
|
|
2492
|
-
return new
|
|
2519
|
+
return new nn().raw(this, e, a);
|
|
2493
2520
|
}
|
|
2494
2521
|
remove() {
|
|
2495
2522
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -2526,7 +2553,7 @@ let cn = class {
|
|
|
2526
2553
|
toProxy() {
|
|
2527
2554
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
2528
2555
|
}
|
|
2529
|
-
toString(e =
|
|
2556
|
+
toString(e = rn) {
|
|
2530
2557
|
e.stringify && (e = e.stringify);
|
|
2531
2558
|
let a = "";
|
|
2532
2559
|
return e(this, (e2) => {
|
|
@@ -2539,16 +2566,16 @@ let cn = class {
|
|
|
2539
2566
|
return e.warn(a, m2);
|
|
2540
2567
|
}
|
|
2541
2568
|
};
|
|
2542
|
-
var
|
|
2543
|
-
|
|
2544
|
-
let
|
|
2569
|
+
var ln = an;
|
|
2570
|
+
an.default = an;
|
|
2571
|
+
let cn = ln, un = class extends cn {
|
|
2545
2572
|
constructor(e) {
|
|
2546
2573
|
super(e), this.type = "comment";
|
|
2547
2574
|
}
|
|
2548
2575
|
};
|
|
2549
|
-
var
|
|
2550
|
-
|
|
2551
|
-
let
|
|
2576
|
+
var pn = un;
|
|
2577
|
+
un.default = un;
|
|
2578
|
+
let dn = ln, hn = class extends dn {
|
|
2552
2579
|
get variable() {
|
|
2553
2580
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
2554
2581
|
}
|
|
@@ -2556,16 +2583,16 @@ let fn = un, mn = class extends fn {
|
|
|
2556
2583
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
2557
2584
|
}
|
|
2558
2585
|
};
|
|
2559
|
-
var
|
|
2560
|
-
|
|
2561
|
-
let
|
|
2586
|
+
var fn = hn;
|
|
2587
|
+
hn.default = hn;
|
|
2588
|
+
let mn, gn, yn, wn, Sn = pn, bn = fn, Mn = ln, { isClean: In, my: _n } = en;
|
|
2562
2589
|
function _r(e) {
|
|
2563
2590
|
return e.map((e2) => (e2.nodes && (e2.nodes = _r(e2.nodes)), delete e2.source, e2));
|
|
2564
2591
|
}
|
|
2565
2592
|
function Wr(e) {
|
|
2566
|
-
if (e[
|
|
2593
|
+
if (e[In] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) Wr(a);
|
|
2567
2594
|
}
|
|
2568
|
-
let
|
|
2595
|
+
let On = class zr extends Mn {
|
|
2569
2596
|
get first() {
|
|
2570
2597
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
2571
2598
|
}
|
|
@@ -2617,7 +2644,7 @@ let Ln = class zr extends _n {
|
|
|
2617
2644
|
return this.markDirty(), this;
|
|
2618
2645
|
}
|
|
2619
2646
|
normalize(e, a) {
|
|
2620
|
-
if ("string" == typeof e) e = _r(
|
|
2647
|
+
if ("string" == typeof e) e = _r(gn(e).nodes);
|
|
2621
2648
|
else if (typeof e > "u") e = [];
|
|
2622
2649
|
else if (Array.isArray(e)) {
|
|
2623
2650
|
e = e.slice(0);
|
|
@@ -2628,14 +2655,14 @@ let Ln = class zr extends _n {
|
|
|
2628
2655
|
} else if (e.type) e = [e];
|
|
2629
2656
|
else if (e.prop) {
|
|
2630
2657
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
2631
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
2632
|
-
} else if (e.selector || e.selectors) e = [new
|
|
2633
|
-
else if (e.name) e = [new
|
|
2658
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new bn(e)];
|
|
2659
|
+
} else if (e.selector || e.selectors) e = [new wn(e)];
|
|
2660
|
+
else if (e.name) e = [new mn(e)];
|
|
2634
2661
|
else {
|
|
2635
2662
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
2636
|
-
e = [new
|
|
2663
|
+
e = [new Sn(e)];
|
|
2637
2664
|
}
|
|
2638
|
-
return e.map((e2) => (e2[
|
|
2665
|
+
return e.map((e2) => (e2[_n] || zr.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[In] && 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));
|
|
2639
2666
|
}
|
|
2640
2667
|
prepend(...e) {
|
|
2641
2668
|
e = e.reverse();
|
|
@@ -2711,22 +2738,22 @@ let Ln = class zr extends _n {
|
|
|
2711
2738
|
}));
|
|
2712
2739
|
}
|
|
2713
2740
|
};
|
|
2714
|
-
|
|
2741
|
+
On.registerParse = (e) => {
|
|
2742
|
+
gn = e;
|
|
2743
|
+
}, On.registerRule = (e) => {
|
|
2715
2744
|
wn = e;
|
|
2716
|
-
},
|
|
2717
|
-
|
|
2718
|
-
},
|
|
2745
|
+
}, On.registerAtRule = (e) => {
|
|
2746
|
+
mn = e;
|
|
2747
|
+
}, On.registerRoot = (e) => {
|
|
2719
2748
|
yn = e;
|
|
2720
|
-
}, Ln.registerRoot = (e) => {
|
|
2721
|
-
Sn = e;
|
|
2722
2749
|
};
|
|
2723
|
-
var
|
|
2724
|
-
|
|
2725
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
2726
|
-
|
|
2750
|
+
var En = On;
|
|
2751
|
+
On.default = On, On.rebuild = (e) => {
|
|
2752
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, mn.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, wn.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, bn.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Sn.prototype) : "root" === e.type && Object.setPrototypeOf(e, yn.prototype), e[_n] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
2753
|
+
On.rebuild(e2);
|
|
2727
2754
|
});
|
|
2728
2755
|
};
|
|
2729
|
-
let
|
|
2756
|
+
let Ln = En, Rn = class extends Ln {
|
|
2730
2757
|
constructor(e) {
|
|
2731
2758
|
super(e), this.type = "atrule";
|
|
2732
2759
|
}
|
|
@@ -2737,38 +2764,38 @@ let An = Rn, Tn = class extends An {
|
|
|
2737
2764
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
2738
2765
|
}
|
|
2739
2766
|
};
|
|
2740
|
-
var
|
|
2741
|
-
|
|
2742
|
-
let
|
|
2767
|
+
var An = Rn;
|
|
2768
|
+
Rn.default = Rn, Ln.registerAtRule(Rn);
|
|
2769
|
+
let Tn, Nn, Pn = En, Dn = class extends Pn {
|
|
2743
2770
|
constructor(e) {
|
|
2744
2771
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
2745
2772
|
}
|
|
2746
2773
|
toResult(e = {}) {
|
|
2747
|
-
return new
|
|
2774
|
+
return new Tn(new Nn(), this, e).stringify();
|
|
2748
2775
|
}
|
|
2749
2776
|
};
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
},
|
|
2753
|
-
|
|
2777
|
+
Dn.registerLazyResult = (e) => {
|
|
2778
|
+
Tn = e;
|
|
2779
|
+
}, Dn.registerProcessor = (e) => {
|
|
2780
|
+
Nn = e;
|
|
2754
2781
|
};
|
|
2755
|
-
var
|
|
2756
|
-
|
|
2757
|
-
var
|
|
2782
|
+
var Fn = Dn;
|
|
2783
|
+
Dn.default = Dn;
|
|
2784
|
+
var Un = { nanoid: (e = 21) => {
|
|
2758
2785
|
let a = "", u = 0 | e;
|
|
2759
2786
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
2760
2787
|
return a;
|
|
2761
2788
|
} };
|
|
2762
|
-
let { existsSync:
|
|
2763
|
-
let
|
|
2789
|
+
let { existsSync: Bn, readFileSync: Wn } = Ut, { dirname: zn, join: jn } = Ut, { SourceMapConsumer: Vn, SourceMapGenerator: qn } = Ut;
|
|
2790
|
+
let Zn = class {
|
|
2764
2791
|
constructor(e, a) {
|
|
2765
2792
|
if (false === a.map) return;
|
|
2766
2793
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
2767
2794
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
2768
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
2795
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = zn(this.mapFile)), m2 && (this.text = m2);
|
|
2769
2796
|
}
|
|
2770
2797
|
consumer() {
|
|
2771
|
-
return this.consumerCache || (this.consumerCache = new
|
|
2798
|
+
return this.consumerCache || (this.consumerCache = new Vn(this.text)), this.consumerCache;
|
|
2772
2799
|
}
|
|
2773
2800
|
decodeInline(e) {
|
|
2774
2801
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -2793,15 +2820,15 @@ let Qn = class {
|
|
|
2793
2820
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
2794
2821
|
}
|
|
2795
2822
|
loadFile(e) {
|
|
2796
|
-
if (this.root =
|
|
2823
|
+
if (this.root = zn(e), Bn(e)) return this.mapFile = e, Wn(e, "utf-8").toString().trim();
|
|
2797
2824
|
}
|
|
2798
2825
|
loadMap(e, a) {
|
|
2799
2826
|
if (false === a) return false;
|
|
2800
2827
|
if (a) {
|
|
2801
2828
|
if ("string" == typeof a) return a;
|
|
2802
2829
|
if ("function" != typeof a) {
|
|
2803
|
-
if (a instanceof
|
|
2804
|
-
if (a instanceof
|
|
2830
|
+
if (a instanceof Vn) return qn.fromSourceMap(a).toString();
|
|
2831
|
+
if (a instanceof qn) return a.toString();
|
|
2805
2832
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
2806
2833
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
2807
2834
|
}
|
|
@@ -2817,7 +2844,7 @@ let Qn = class {
|
|
|
2817
2844
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
2818
2845
|
if (this.annotation) {
|
|
2819
2846
|
let a2 = this.annotation;
|
|
2820
|
-
return e && (a2 =
|
|
2847
|
+
return e && (a2 = jn(zn(e), a2)), this.loadFile(a2);
|
|
2821
2848
|
}
|
|
2822
2849
|
}
|
|
2823
2850
|
}
|
|
@@ -2828,23 +2855,23 @@ let Qn = class {
|
|
|
2828
2855
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
2829
2856
|
}
|
|
2830
2857
|
};
|
|
2831
|
-
var
|
|
2832
|
-
|
|
2833
|
-
let { nanoid:
|
|
2858
|
+
var Kn = Zn;
|
|
2859
|
+
Zn.default = Zn;
|
|
2860
|
+
let { nanoid: Qn } = Un, { isAbsolute: nr, resolve: rr } = Ut, { SourceMapConsumer: or, SourceMapGenerator: sr } = Ut, { fileURLToPath: ir, pathToFileURL: ar } = Ut, lr = Vt, cr = Kn, ur = Ut, pr = Symbol("fromOffsetCache"), dr = !(!or || !sr), hr = !(!rr || !nr), fr = class {
|
|
2834
2861
|
get from() {
|
|
2835
2862
|
return this.file || this.id;
|
|
2836
2863
|
}
|
|
2837
2864
|
constructor(e, a = {}) {
|
|
2838
2865
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
2839
|
-
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 && (!
|
|
2840
|
-
let e2 = new
|
|
2866
|
+
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 && (!hr || /^\w+:\/\//.test(a.from) || nr(a.from) ? this.file = a.from : this.file = rr(a.from)), hr && dr) {
|
|
2867
|
+
let e2 = new cr(this.css, a);
|
|
2841
2868
|
if (e2.text) {
|
|
2842
2869
|
this.map = e2;
|
|
2843
2870
|
let a2 = e2.consumer().file;
|
|
2844
2871
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
2845
2872
|
}
|
|
2846
2873
|
}
|
|
2847
|
-
this.file || (this.id = "<input css " +
|
|
2874
|
+
this.file || (this.id = "<input css " + Qn(6) + ">"), this.map && (this.map.file = this.from);
|
|
2848
2875
|
}
|
|
2849
2876
|
error(e, a, u, m2 = {}) {
|
|
2850
2877
|
let w2, b2, C2;
|
|
@@ -2863,17 +2890,17 @@ let { nanoid: rr } = Wn, { isAbsolute: or, resolve: sr } = Wt, { SourceMapConsum
|
|
|
2863
2890
|
a = e2.line, u = e2.col;
|
|
2864
2891
|
}
|
|
2865
2892
|
let x2 = this.origin(a, u, b2, w2);
|
|
2866
|
-
return C2 = x2 ? new
|
|
2893
|
+
return C2 = x2 ? new lr(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 lr(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 && (ar && (C2.input.url = ar(this.file).toString()), C2.input.file = this.file), C2;
|
|
2867
2894
|
}
|
|
2868
2895
|
fromOffset(e) {
|
|
2869
2896
|
let a, u;
|
|
2870
|
-
if (this[
|
|
2897
|
+
if (this[pr]) u = this[pr];
|
|
2871
2898
|
else {
|
|
2872
2899
|
let e2 = this.css.split("\n");
|
|
2873
2900
|
u = new Array(e2.length);
|
|
2874
2901
|
let a2 = 0;
|
|
2875
2902
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
2876
|
-
this[
|
|
2903
|
+
this[pr] = u;
|
|
2877
2904
|
}
|
|
2878
2905
|
a = u[u.length - 1];
|
|
2879
2906
|
let m2 = 0;
|
|
@@ -2892,17 +2919,17 @@ let { nanoid: rr } = Wn, { isAbsolute: or, resolve: sr } = Wt, { SourceMapConsum
|
|
|
2892
2919
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
2893
2920
|
}
|
|
2894
2921
|
mapResolve(e) {
|
|
2895
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
2922
|
+
return /^\w+:\/\//.test(e) ? e : rr(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
2896
2923
|
}
|
|
2897
2924
|
origin(e, a, u, m2) {
|
|
2898
2925
|
if (!this.map) return false;
|
|
2899
2926
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
2900
2927
|
if (!x2.source) return false;
|
|
2901
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
2928
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = nr(x2.source) ? ar(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ar(this.map.mapFile));
|
|
2902
2929
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
2903
2930
|
if ("file:" === b2.protocol) {
|
|
2904
|
-
if (!
|
|
2905
|
-
I2.file =
|
|
2931
|
+
if (!ir) throw new Error("file: protocol is not available in this PostCSS build");
|
|
2932
|
+
I2.file = ir(b2);
|
|
2906
2933
|
}
|
|
2907
2934
|
let _2 = C2.sourceContentFor(x2.source);
|
|
2908
2935
|
return _2 && (I2.source = _2), I2;
|
|
@@ -2913,9 +2940,9 @@ let { nanoid: rr } = Wn, { isAbsolute: or, resolve: sr } = Wt, { SourceMapConsum
|
|
|
2913
2940
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
2914
2941
|
}
|
|
2915
2942
|
};
|
|
2916
|
-
var
|
|
2917
|
-
|
|
2918
|
-
let
|
|
2943
|
+
var mr = fr;
|
|
2944
|
+
fr.default = fr, ur && ur.registerInput && ur.registerInput(fr);
|
|
2945
|
+
let gr, yr, wr = En, Sr = class extends wr {
|
|
2919
2946
|
constructor(e) {
|
|
2920
2947
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
2921
2948
|
}
|
|
@@ -2932,29 +2959,29 @@ let wr, Sr, Cr = Rn, Ar = class extends Cr {
|
|
|
2932
2959
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
2933
2960
|
}
|
|
2934
2961
|
toResult(e = {}) {
|
|
2935
|
-
return new
|
|
2962
|
+
return new gr(new yr(), this, e).stringify();
|
|
2936
2963
|
}
|
|
2937
2964
|
};
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
},
|
|
2941
|
-
|
|
2965
|
+
Sr.registerLazyResult = (e) => {
|
|
2966
|
+
gr = e;
|
|
2967
|
+
}, Sr.registerProcessor = (e) => {
|
|
2968
|
+
yr = e;
|
|
2942
2969
|
};
|
|
2943
|
-
var
|
|
2944
|
-
|
|
2945
|
-
let
|
|
2970
|
+
var Cr = Sr;
|
|
2971
|
+
Sr.default = Sr, wr.registerRoot(Sr);
|
|
2972
|
+
let Ar = { comma: (e) => Ar.split(e, [","], true), space(e) {
|
|
2946
2973
|
let a = [" ", "\n", " "];
|
|
2947
|
-
return
|
|
2974
|
+
return Ar.split(e, a);
|
|
2948
2975
|
}, split(e, a, u) {
|
|
2949
2976
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
2950
2977
|
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;
|
|
2951
2978
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
2952
2979
|
} };
|
|
2953
|
-
var
|
|
2954
|
-
|
|
2955
|
-
let
|
|
2980
|
+
var Tr = Ar;
|
|
2981
|
+
Ar.default = Ar;
|
|
2982
|
+
let Nr = En, Pr = Tr, Dr = class extends Nr {
|
|
2956
2983
|
get selectors() {
|
|
2957
|
-
return
|
|
2984
|
+
return Pr.comma(this.selector);
|
|
2958
2985
|
}
|
|
2959
2986
|
set selectors(e) {
|
|
2960
2987
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -2964,34 +2991,34 @@ let Dr = Rn, Fr = Pr, Ur = class extends Dr {
|
|
|
2964
2991
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
2965
2992
|
}
|
|
2966
2993
|
};
|
|
2967
|
-
var
|
|
2968
|
-
|
|
2969
|
-
let
|
|
2994
|
+
var Fr = Dr;
|
|
2995
|
+
Dr.default = Dr, Nr.registerRule(Dr);
|
|
2996
|
+
let Ur = An, Br = pn, $r = fn, jr = mr, Gr = Kn, Vr = Cr, qr = Fr;
|
|
2970
2997
|
function Ze(e, a) {
|
|
2971
2998
|
if (Array.isArray(e)) return e.map((e2) => Ze(e2));
|
|
2972
2999
|
let { inputs: u, ...m2 } = e;
|
|
2973
3000
|
if (u) {
|
|
2974
3001
|
a = [];
|
|
2975
3002
|
for (let e2 of u) {
|
|
2976
|
-
let u2 = { ...e2, __proto__:
|
|
2977
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
3003
|
+
let u2 = { ...e2, __proto__: jr.prototype };
|
|
3004
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Gr.prototype }), a.push(u2);
|
|
2978
3005
|
}
|
|
2979
3006
|
}
|
|
2980
3007
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ze(e2, a))), m2.source) {
|
|
2981
3008
|
let { inputId: e2, ...u2 } = m2.source;
|
|
2982
3009
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
2983
3010
|
}
|
|
2984
|
-
if ("root" === m2.type) return new
|
|
2985
|
-
if ("decl" === m2.type) return new
|
|
2986
|
-
if ("rule" === m2.type) return new
|
|
2987
|
-
if ("comment" === m2.type) return new
|
|
2988
|
-
if ("atrule" === m2.type) return new
|
|
3011
|
+
if ("root" === m2.type) return new Vr(m2);
|
|
3012
|
+
if ("decl" === m2.type) return new $r(m2);
|
|
3013
|
+
if ("rule" === m2.type) return new qr(m2);
|
|
3014
|
+
if ("comment" === m2.type) return new Br(m2);
|
|
3015
|
+
if ("atrule" === m2.type) return new Ur(m2);
|
|
2989
3016
|
throw new Error("Unknown node type: " + e.type);
|
|
2990
3017
|
}
|
|
2991
|
-
var
|
|
3018
|
+
var Hr = Ze;
|
|
2992
3019
|
Ze.default = Ze;
|
|
2993
|
-
let { dirname:
|
|
2994
|
-
var
|
|
3020
|
+
let { dirname: Zr, relative: Kr, resolve: Jr, sep: Yr } = Ut, { SourceMapConsumer: Xr, SourceMapGenerator: Qr } = Ut, { pathToFileURL: eo } = Ut, to = mr, oo = !(!Xr || !Qr), io = !!(Zr && Jr && Kr && Yr);
|
|
3021
|
+
var ao = class {
|
|
2995
3022
|
constructor(e, a, u, m2) {
|
|
2996
3023
|
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();
|
|
2997
3024
|
}
|
|
@@ -3003,8 +3030,8 @@ var co = class {
|
|
|
3003
3030
|
}
|
|
3004
3031
|
applyPrevMaps() {
|
|
3005
3032
|
for (let e of this.previous()) {
|
|
3006
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
3007
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
3033
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || Zr(e.file);
|
|
3034
|
+
false === this.mapOpts.sourcesContent ? (a = new Xr(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
3008
3035
|
}
|
|
3009
3036
|
}
|
|
3010
3037
|
clearAnnotation() {
|
|
@@ -3014,7 +3041,7 @@ var co = class {
|
|
|
3014
3041
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
3015
3042
|
}
|
|
3016
3043
|
generate() {
|
|
3017
|
-
if (this.clearAnnotation(),
|
|
3044
|
+
if (this.clearAnnotation(), io && oo && this.isMap()) return this.generateMap();
|
|
3018
3045
|
{
|
|
3019
3046
|
let e = "";
|
|
3020
3047
|
return this.stringify(this.root, (a) => {
|
|
@@ -3026,12 +3053,12 @@ var co = class {
|
|
|
3026
3053
|
if (this.root) this.generateString();
|
|
3027
3054
|
else if (1 === this.previous().length) {
|
|
3028
3055
|
let e = this.previous()[0].consumer();
|
|
3029
|
-
e.file = this.outputFile(), this.map =
|
|
3030
|
-
} else this.map = new
|
|
3056
|
+
e.file = this.outputFile(), this.map = Qr.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
3057
|
+
} else this.map = new Qr({ 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>" });
|
|
3031
3058
|
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];
|
|
3032
3059
|
}
|
|
3033
3060
|
generateString() {
|
|
3034
|
-
this.css = "", this.map = new
|
|
3061
|
+
this.css = "", this.map = new Qr({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
3035
3062
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
3036
3063
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
3037
3064
|
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) {
|
|
@@ -3061,9 +3088,9 @@ var co = class {
|
|
|
3061
3088
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
3062
3089
|
let a = this.memoizedPaths.get(e);
|
|
3063
3090
|
if (a) return a;
|
|
3064
|
-
let u = this.opts.to ?
|
|
3065
|
-
"string" == typeof this.mapOpts.annotation && (u = Jr(
|
|
3066
|
-
let m2 =
|
|
3091
|
+
let u = this.opts.to ? Zr(this.opts.to) : ".";
|
|
3092
|
+
"string" == typeof this.mapOpts.annotation && (u = Zr(Jr(u, this.mapOpts.annotation)));
|
|
3093
|
+
let m2 = Kr(u, e);
|
|
3067
3094
|
return this.memoizedPaths.set(e, m2), m2;
|
|
3068
3095
|
}
|
|
3069
3096
|
previous() {
|
|
@@ -3074,7 +3101,7 @@ var co = class {
|
|
|
3074
3101
|
}
|
|
3075
3102
|
});
|
|
3076
3103
|
else {
|
|
3077
|
-
let e = new
|
|
3104
|
+
let e = new to(this.originalCSS, this.opts);
|
|
3078
3105
|
e.map && this.previousMaps.push(e.map);
|
|
3079
3106
|
}
|
|
3080
3107
|
return this.previousMaps;
|
|
@@ -3105,8 +3132,8 @@ var co = class {
|
|
|
3105
3132
|
toFileUrl(e) {
|
|
3106
3133
|
let a = this.memoizedFileURLs.get(e);
|
|
3107
3134
|
if (a) return a;
|
|
3108
|
-
if (
|
|
3109
|
-
let a2 =
|
|
3135
|
+
if (eo) {
|
|
3136
|
+
let a2 = eo(e).toString();
|
|
3110
3137
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
3111
3138
|
}
|
|
3112
3139
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -3114,13 +3141,13 @@ var co = class {
|
|
|
3114
3141
|
toUrl(e) {
|
|
3115
3142
|
let a = this.memoizedURLs.get(e);
|
|
3116
3143
|
if (a) return a;
|
|
3117
|
-
"\\" ===
|
|
3144
|
+
"\\" === Yr && (e = e.replace(/\\/g, "/"));
|
|
3118
3145
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
3119
3146
|
return this.memoizedURLs.set(e, u), u;
|
|
3120
3147
|
}
|
|
3121
3148
|
};
|
|
3122
|
-
const
|
|
3123
|
-
let
|
|
3149
|
+
const lo = /[\t\n\f\r "#'()/;[\\\]{}]/g, co = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, uo = /.[\r\n"'(/\\]/, ho = /[\da-f]/i;
|
|
3150
|
+
let Mo = An, _o = pn, Ao = fn, No = Cr, Po = Fr, Xa = function(e, a = {}) {
|
|
3124
3151
|
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 = [];
|
|
3125
3152
|
function y2(a2) {
|
|
3126
3153
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -3170,7 +3197,7 @@ let Ao = Nn, No = hn, Po = gn, Do = Tr, Fo = Br, Xa = function(e, a = {}) {
|
|
|
3170
3197
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
3171
3198
|
} while (I2);
|
|
3172
3199
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3173
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
3200
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || uo.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
3174
3201
|
break;
|
|
3175
3202
|
case 39:
|
|
3176
3203
|
case 34:
|
|
@@ -3188,31 +3215,31 @@ let Ao = Nn, No = hn, Po = gn, Do = Tr, Fo = Br, Xa = function(e, a = {}) {
|
|
|
3188
3215
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3189
3216
|
break;
|
|
3190
3217
|
case 64:
|
|
3191
|
-
|
|
3218
|
+
lo.lastIndex = B2 + 1, lo.test(D2), b2 = 0 === lo.lastIndex ? D2.length - 1 : lo.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3192
3219
|
break;
|
|
3193
3220
|
case 92:
|
|
3194
3221
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
3195
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
3196
|
-
for (;
|
|
3222
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, ho.test(D2.charAt(b2)))) {
|
|
3223
|
+
for (; ho.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
3197
3224
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
3198
3225
|
}
|
|
3199
3226
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
3200
3227
|
break;
|
|
3201
3228
|
default:
|
|
3202
|
-
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) : (
|
|
3229
|
+
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) : (co.lastIndex = B2 + 1, co.test(D2), b2 = 0 === co.lastIndex ? D2.length - 1 : co.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
3203
3230
|
}
|
|
3204
3231
|
return B2++, x2;
|
|
3205
3232
|
}, position: function S() {
|
|
3206
3233
|
return B2;
|
|
3207
3234
|
} };
|
|
3208
3235
|
};
|
|
3209
|
-
const
|
|
3210
|
-
var
|
|
3236
|
+
const Do = { empty: true, space: true };
|
|
3237
|
+
var Fo = class {
|
|
3211
3238
|
constructor(e) {
|
|
3212
|
-
this.input = e, this.root = new
|
|
3239
|
+
this.input = e, this.root = new No(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
3213
3240
|
}
|
|
3214
3241
|
atrule(e) {
|
|
3215
|
-
let a = new
|
|
3242
|
+
let a = new Mo();
|
|
3216
3243
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
3217
3244
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
3218
3245
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -3264,7 +3291,7 @@ var $o = class {
|
|
|
3264
3291
|
return false;
|
|
3265
3292
|
}
|
|
3266
3293
|
comment(e) {
|
|
3267
|
-
let a = new
|
|
3294
|
+
let a = new _o();
|
|
3268
3295
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
3269
3296
|
let u = e[1].slice(2, -2);
|
|
3270
3297
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -3277,7 +3304,7 @@ var $o = class {
|
|
|
3277
3304
|
this.tokenizer = Xa(this.input);
|
|
3278
3305
|
}
|
|
3279
3306
|
decl(e, a) {
|
|
3280
|
-
let u = new
|
|
3307
|
+
let u = new Ao();
|
|
3281
3308
|
this.init(u, e[0][2]);
|
|
3282
3309
|
let m2, w2 = e[e.length - 1];
|
|
3283
3310
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Ha(e2) {
|
|
@@ -3326,7 +3353,7 @@ var $o = class {
|
|
|
3326
3353
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
3327
3354
|
}
|
|
3328
3355
|
emptyRule(e) {
|
|
3329
|
-
let a = new
|
|
3356
|
+
let a = new Po();
|
|
3330
3357
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
3331
3358
|
}
|
|
3332
3359
|
end(e) {
|
|
@@ -3402,7 +3429,7 @@ var $o = class {
|
|
|
3402
3429
|
}
|
|
3403
3430
|
raw(e, a, u, m2) {
|
|
3404
3431
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
3405
|
-
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",
|
|
3432
|
+
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", Do[x2] || Do[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
3406
3433
|
if (!O2) {
|
|
3407
3434
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
3408
3435
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -3411,7 +3438,7 @@ var $o = class {
|
|
|
3411
3438
|
}
|
|
3412
3439
|
rule(e) {
|
|
3413
3440
|
e.pop();
|
|
3414
|
-
let a = new
|
|
3441
|
+
let a = new Po();
|
|
3415
3442
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
3416
3443
|
}
|
|
3417
3444
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -3451,9 +3478,9 @@ var $o = class {
|
|
|
3451
3478
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
3452
3479
|
}
|
|
3453
3480
|
};
|
|
3454
|
-
let
|
|
3481
|
+
let Uo = En, $o = mr, jo = Fo;
|
|
3455
3482
|
function _t(e, a) {
|
|
3456
|
-
let u = new
|
|
3483
|
+
let u = new $o(e, a), m2 = new jo(u);
|
|
3457
3484
|
try {
|
|
3458
3485
|
m2.parse();
|
|
3459
3486
|
} catch (e2) {
|
|
@@ -3461,9 +3488,9 @@ function _t(e, a) {
|
|
|
3461
3488
|
}
|
|
3462
3489
|
return m2.root;
|
|
3463
3490
|
}
|
|
3464
|
-
var
|
|
3465
|
-
_t.default = _t,
|
|
3466
|
-
let
|
|
3491
|
+
var Go = _t;
|
|
3492
|
+
_t.default = _t, Uo.registerParse(_t);
|
|
3493
|
+
let Vo = class {
|
|
3467
3494
|
constructor(e, a = {}) {
|
|
3468
3495
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
3469
3496
|
let e2 = a.node.rangeBy(a);
|
|
@@ -3475,9 +3502,9 @@ let Ho = class {
|
|
|
3475
3502
|
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;
|
|
3476
3503
|
}
|
|
3477
3504
|
};
|
|
3478
|
-
var
|
|
3479
|
-
|
|
3480
|
-
let
|
|
3505
|
+
var qo = Vo;
|
|
3506
|
+
Vo.default = Vo;
|
|
3507
|
+
let Ho = qo, Zo = class {
|
|
3481
3508
|
get content() {
|
|
3482
3509
|
return this.css;
|
|
3483
3510
|
}
|
|
@@ -3489,26 +3516,26 @@ let Ko = Zo, Jo = class {
|
|
|
3489
3516
|
}
|
|
3490
3517
|
warn(e, a = {}) {
|
|
3491
3518
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
3492
|
-
let u = new
|
|
3519
|
+
let u = new Ho(e, a);
|
|
3493
3520
|
return this.messages.push(u), u;
|
|
3494
3521
|
}
|
|
3495
3522
|
warnings() {
|
|
3496
3523
|
return this.messages.filter((e) => "warning" === e.type);
|
|
3497
3524
|
}
|
|
3498
3525
|
};
|
|
3499
|
-
var
|
|
3500
|
-
|
|
3501
|
-
let
|
|
3526
|
+
var Ko = Zo;
|
|
3527
|
+
Zo.default = Zo;
|
|
3528
|
+
let Jo = {};
|
|
3502
3529
|
var so = function(e) {
|
|
3503
|
-
|
|
3530
|
+
Jo[e] || (Jo[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
3504
3531
|
};
|
|
3505
|
-
let
|
|
3506
|
-
const
|
|
3532
|
+
let Yo = En, Xo = Fn, Qo = ao, es = Go, ts = Ko, ns = Cr, rs = Qt, { isClean: os, my: ss } = en, is = so;
|
|
3533
|
+
const as = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, ls = { 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 }, cs = { Once: true, postcssPlugin: true, prepare: true };
|
|
3507
3534
|
function Ne(e) {
|
|
3508
3535
|
return "object" == typeof e && "function" == typeof e.then;
|
|
3509
3536
|
}
|
|
3510
3537
|
function no(e) {
|
|
3511
|
-
let a = false, u =
|
|
3538
|
+
let a = false, u = as[e.type];
|
|
3512
3539
|
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"];
|
|
3513
3540
|
}
|
|
3514
3541
|
function Gn(e) {
|
|
@@ -3516,9 +3543,9 @@ function Gn(e) {
|
|
|
3516
3543
|
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: [] };
|
|
3517
3544
|
}
|
|
3518
3545
|
function Ps(e) {
|
|
3519
|
-
return e[
|
|
3546
|
+
return e[os] = false, e.nodes && e.nodes.forEach((e2) => Ps(e2)), e;
|
|
3520
3547
|
}
|
|
3521
|
-
let
|
|
3548
|
+
let us = {}, ps = class ro {
|
|
3522
3549
|
get content() {
|
|
3523
3550
|
return this.stringify().content;
|
|
3524
3551
|
}
|
|
@@ -3545,19 +3572,19 @@ let ds = {}, hs = class ro {
|
|
|
3545
3572
|
}
|
|
3546
3573
|
constructor(e, a, u) {
|
|
3547
3574
|
let m2;
|
|
3548
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof
|
|
3575
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof ro || a instanceof ts) m2 = Ps(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
3549
3576
|
else {
|
|
3550
|
-
let e2 =
|
|
3577
|
+
let e2 = es;
|
|
3551
3578
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
3552
3579
|
try {
|
|
3553
3580
|
m2 = e2(a, u);
|
|
3554
3581
|
} catch (e3) {
|
|
3555
3582
|
this.processed = true, this.error = e3;
|
|
3556
3583
|
}
|
|
3557
|
-
m2 && !m2[
|
|
3584
|
+
m2 && !m2[ss] && Yo.rebuild(m2);
|
|
3558
3585
|
}
|
|
3559
3586
|
else m2 = Ps(a);
|
|
3560
|
-
this.result = new
|
|
3587
|
+
this.result = new ts(e, m2, u), this.helpers = { ...us, postcss: us, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
3561
3588
|
}
|
|
3562
3589
|
async() {
|
|
3563
3590
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -3591,8 +3618,8 @@ let ds = {}, hs = class ro {
|
|
|
3591
3618
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
3592
3619
|
};
|
|
3593
3620
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
3594
|
-
if (!
|
|
3595
|
-
if (!
|
|
3621
|
+
if (!ls[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
3622
|
+
if (!cs[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
3596
3623
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
3597
3624
|
}
|
|
3598
3625
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -3609,8 +3636,8 @@ let ds = {}, hs = class ro {
|
|
|
3609
3636
|
}
|
|
3610
3637
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3611
3638
|
let e = this.result.root;
|
|
3612
|
-
for (; !e[
|
|
3613
|
-
e[
|
|
3639
|
+
for (; !e[os]; ) {
|
|
3640
|
+
e[os] = true;
|
|
3614
3641
|
let a = [Gn(e)];
|
|
3615
3642
|
for (; a.length > 0; ) {
|
|
3616
3643
|
let e2 = this.visitTick(a);
|
|
@@ -3655,9 +3682,9 @@ let ds = {}, hs = class ro {
|
|
|
3655
3682
|
if (this.error) throw this.error;
|
|
3656
3683
|
if (this.stringified) return this.result;
|
|
3657
3684
|
this.stringified = true, this.sync();
|
|
3658
|
-
let e = this.result.opts, a =
|
|
3685
|
+
let e = this.result.opts, a = rs;
|
|
3659
3686
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
3660
|
-
let u = new
|
|
3687
|
+
let u = new Qo(a, this.result.root, this.result.opts).generate();
|
|
3661
3688
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
3662
3689
|
}
|
|
3663
3690
|
sync() {
|
|
@@ -3669,14 +3696,14 @@ let ds = {}, hs = class ro {
|
|
|
3669
3696
|
}
|
|
3670
3697
|
if (this.prepareVisitors(), this.hasListener) {
|
|
3671
3698
|
let e = this.result.root;
|
|
3672
|
-
for (; !e[
|
|
3699
|
+
for (; !e[os]; ) e[os] = true, this.walkSync(e);
|
|
3673
3700
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
3674
3701
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
3675
3702
|
}
|
|
3676
3703
|
return this.result;
|
|
3677
3704
|
}
|
|
3678
3705
|
then(e, a) {
|
|
3679
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
3706
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || is("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
3680
3707
|
}
|
|
3681
3708
|
toString() {
|
|
3682
3709
|
return this.css;
|
|
@@ -3708,22 +3735,22 @@ let ds = {}, hs = class ro {
|
|
|
3708
3735
|
}
|
|
3709
3736
|
if (0 !== a.iterator) {
|
|
3710
3737
|
let m3, w3 = a.iterator;
|
|
3711
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
3738
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[os]) return m3[os] = true, void e.push(Gn(m3));
|
|
3712
3739
|
a.iterator = 0, delete u.indexes[w3];
|
|
3713
3740
|
}
|
|
3714
3741
|
let w2 = a.events;
|
|
3715
3742
|
for (; a.eventIndex < w2.length; ) {
|
|
3716
3743
|
let e2 = w2[a.eventIndex];
|
|
3717
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
3744
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[os] = true, a.iterator = u.getIterator()));
|
|
3718
3745
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
3719
3746
|
}
|
|
3720
3747
|
e.pop();
|
|
3721
3748
|
}
|
|
3722
3749
|
walkSync(e) {
|
|
3723
|
-
e[
|
|
3750
|
+
e[os] = true;
|
|
3724
3751
|
let a = no(e);
|
|
3725
3752
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
3726
|
-
e2[
|
|
3753
|
+
e2[os] || this.walkSync(e2);
|
|
3727
3754
|
});
|
|
3728
3755
|
else {
|
|
3729
3756
|
let a2 = this.listeners[u];
|
|
@@ -3734,14 +3761,14 @@ let ds = {}, hs = class ro {
|
|
|
3734
3761
|
return this.sync().warnings();
|
|
3735
3762
|
}
|
|
3736
3763
|
};
|
|
3737
|
-
|
|
3738
|
-
|
|
3764
|
+
ps.registerPostcss = (e) => {
|
|
3765
|
+
us = e;
|
|
3739
3766
|
};
|
|
3740
|
-
var
|
|
3741
|
-
|
|
3742
|
-
let
|
|
3743
|
-
const
|
|
3744
|
-
let
|
|
3767
|
+
var ds = ps;
|
|
3768
|
+
ps.default = ps, ns.registerLazyResult(ps), Xo.registerLazyResult(ps);
|
|
3769
|
+
let hs = ao, ms = Go;
|
|
3770
|
+
const gs = Ko;
|
|
3771
|
+
let ys = Qt, ws = so, Ss = class {
|
|
3745
3772
|
get content() {
|
|
3746
3773
|
return this.result.css;
|
|
3747
3774
|
}
|
|
@@ -3762,7 +3789,7 @@ let Ss = tn, bs = so, vs = class {
|
|
|
3762
3789
|
}
|
|
3763
3790
|
get root() {
|
|
3764
3791
|
if (this._root) return this._root;
|
|
3765
|
-
let e, a =
|
|
3792
|
+
let e, a = ms;
|
|
3766
3793
|
try {
|
|
3767
3794
|
e = a(this._css, this._opts);
|
|
3768
3795
|
} catch (e2) {
|
|
@@ -3776,11 +3803,11 @@ let Ss = tn, bs = so, vs = class {
|
|
|
3776
3803
|
}
|
|
3777
3804
|
constructor(e, a, u) {
|
|
3778
3805
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
3779
|
-
let m2, w2 =
|
|
3780
|
-
this.result = new
|
|
3806
|
+
let m2, w2 = ys;
|
|
3807
|
+
this.result = new gs(this._processor, m2, this._opts), this.result.css = a;
|
|
3781
3808
|
let b2 = this;
|
|
3782
3809
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
3783
|
-
let C2 = new
|
|
3810
|
+
let C2 = new hs(w2, m2, this._opts, a);
|
|
3784
3811
|
if (C2.isMap()) {
|
|
3785
3812
|
let [e2, a2] = C2.generate();
|
|
3786
3813
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -3800,7 +3827,7 @@ let Ss = tn, bs = so, vs = class {
|
|
|
3800
3827
|
return this.result;
|
|
3801
3828
|
}
|
|
3802
3829
|
then(e, a) {
|
|
3803
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
3830
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || ws("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);
|
|
3804
3831
|
}
|
|
3805
3832
|
toString() {
|
|
3806
3833
|
return this._css;
|
|
@@ -3809,9 +3836,9 @@ let Ss = tn, bs = so, vs = class {
|
|
|
3809
3836
|
return [];
|
|
3810
3837
|
}
|
|
3811
3838
|
};
|
|
3812
|
-
var
|
|
3813
|
-
|
|
3814
|
-
let
|
|
3839
|
+
var bs = Ss;
|
|
3840
|
+
Ss.default = Ss;
|
|
3841
|
+
let vs = Fn, xs = ds, Ms = bs, Is = Cr, _s = class {
|
|
3815
3842
|
constructor(e = []) {
|
|
3816
3843
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
3817
3844
|
}
|
|
@@ -3827,43 +3854,43 @@ let Ms = Bn, Is = ms, _s = xs, Os = Tr, Es = class {
|
|
|
3827
3854
|
return a;
|
|
3828
3855
|
}
|
|
3829
3856
|
process(e, a = {}) {
|
|
3830
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
3857
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new xs(this, e, a) : new Ms(this, e, a);
|
|
3831
3858
|
}
|
|
3832
3859
|
use(e) {
|
|
3833
3860
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
3834
3861
|
}
|
|
3835
3862
|
};
|
|
3836
|
-
var
|
|
3837
|
-
|
|
3838
|
-
let Rs =
|
|
3863
|
+
var Os = _s;
|
|
3864
|
+
_s.default = _s, Is.registerProcessor(_s), vs.registerProcessor(_s);
|
|
3865
|
+
let Es = An, Ls = pn, Rs = En, As = Vt, Ts = fn, Ns = Fn, $s = Hr, Ws = mr, js = ds, Gs = Tr, Vs = ln, qs = Go, Hs = Os, Zs = Ko, Ks = Cr, Ys = Fr, Xs = Qt, Qs = qo;
|
|
3839
3866
|
function L$1(...e) {
|
|
3840
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
3867
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new Hs(e);
|
|
3841
3868
|
}
|
|
3842
3869
|
L$1.plugin = function(e, a) {
|
|
3843
3870
|
let u, m2 = false;
|
|
3844
3871
|
function n(...u2) {
|
|
3845
3872
|
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"));
|
|
3846
3873
|
let w2 = a(...u2);
|
|
3847
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
3874
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new Hs().version, w2;
|
|
3848
3875
|
}
|
|
3849
3876
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
3850
3877
|
return L$1([n(u2)]).process(e2, a2);
|
|
3851
3878
|
}, n;
|
|
3852
|
-
}, L$1.stringify =
|
|
3853
|
-
var
|
|
3879
|
+
}, L$1.stringify = Xs, L$1.parse = qs, L$1.fromJSON = $s, L$1.list = Gs, L$1.comment = (e) => new Ls(e), L$1.atRule = (e) => new Es(e), L$1.decl = (e) => new Ts(e), L$1.rule = (e) => new Ys(e), L$1.root = (e) => new Ks(e), L$1.document = (e) => new Ns(e), L$1.CssSyntaxError = As, L$1.Declaration = Ts, L$1.Container = Rs, L$1.Processor = Hs, L$1.Document = Ns, L$1.Comment = Ls, L$1.Warning = Qs, L$1.AtRule = Es, L$1.Result = Zs, L$1.Input = Ws, L$1.Rule = Ys, L$1.Root = Ks, L$1.Node = Vs, js.registerPostcss(L$1);
|
|
3880
|
+
var ei = L$1;
|
|
3854
3881
|
L$1.default = L$1;
|
|
3855
|
-
const
|
|
3856
|
-
|
|
3857
|
-
var
|
|
3882
|
+
const ti = Yi(ei);
|
|
3883
|
+
ti.stringify, ti.fromJSON, ti.plugin, ti.parse, ti.list, ti.document, ti.comment, ti.atRule, ti.rule, ti.decl, ti.root, ti.CssSyntaxError, ti.Declaration, ti.Container, ti.Processor, ti.Document, ti.Comment, ti.Warning, ti.AtRule, ti.Result, ti.Input, ti.Rule, ti.Root, ti.Node;
|
|
3884
|
+
var si = ((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))(si || {}), ii = ((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))(ii || {}), ai = ((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))(ai || {}), li = ((e) => (e[e.Mouse = 0] = "Mouse", e[e.Pen = 1] = "Pen", e[e.Touch = 2] = "Touch", e))(li || {}), ci = ((e) => (e[e["2D"] = 0] = "2D", e[e.WebGL = 1] = "WebGL", e[e.WebGL2 = 2] = "WebGL2", e))(ci || {}), ui = ((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))(ui || {});
|
|
3858
3885
|
function G(e, a, u = document) {
|
|
3859
3886
|
const m2 = { capture: true, passive: true };
|
|
3860
3887
|
return u.addEventListener(e, a, m2), () => u.removeEventListener(e, a, m2);
|
|
3861
3888
|
}
|
|
3862
|
-
const
|
|
3863
|
-
let
|
|
3864
|
-
console.error(
|
|
3865
|
-
}, has: () => (console.error(
|
|
3866
|
-
console.error(
|
|
3889
|
+
const pi = "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.";
|
|
3890
|
+
let di = { map: {}, getId: () => (console.error(pi), -1), getNode: () => (console.error(pi), null), removeNodeFromMap() {
|
|
3891
|
+
console.error(pi);
|
|
3892
|
+
}, has: () => (console.error(pi), false), reset() {
|
|
3893
|
+
console.error(pi);
|
|
3867
3894
|
} };
|
|
3868
3895
|
function $e(e, a, u = {}) {
|
|
3869
3896
|
let m2 = null, w2 = 0;
|
|
@@ -3897,8 +3924,8 @@ function Re(e, a, u) {
|
|
|
3897
3924
|
};
|
|
3898
3925
|
}
|
|
3899
3926
|
}
|
|
3900
|
-
typeof window < "u" && window.Proxy && window.Reflect && (
|
|
3901
|
-
let
|
|
3927
|
+
typeof window < "u" && window.Proxy && window.Reflect && (di = new Proxy(di, { get: (e, a, u) => ("map" === a && console.error(pi), Reflect.get(e, a, u)) }));
|
|
3928
|
+
let hi, fi = Date.now;
|
|
3902
3929
|
function po(e) {
|
|
3903
3930
|
var a, u, m2, w2, b2, C2;
|
|
3904
3931
|
const x2 = e.document;
|
|
@@ -3945,7 +3972,7 @@ function bo(e, a) {
|
|
|
3945
3972
|
function Fs(e) {
|
|
3946
3973
|
return !(null == e || !e.shadowRoot);
|
|
3947
3974
|
}
|
|
3948
|
-
/[1-9][0-9]{12}/.test(Date.now().toString()) || (
|
|
3975
|
+
/[1-9][0-9]{12}/.test(Date.now().toString()) || (fi = () => (/* @__PURE__ */ new Date()).getTime());
|
|
3949
3976
|
class _l {
|
|
3950
3977
|
constructor() {
|
|
3951
3978
|
b$1(this, "id", 1), b$1(this, "styleIDMap", /* @__PURE__ */ new WeakMap()), b$1(this, "idStyleMap", /* @__PURE__ */ new Map());
|
|
@@ -3990,11 +4017,11 @@ function vo(e) {
|
|
|
3990
4017
|
const a = e.ownerDocument;
|
|
3991
4018
|
return !!a && (a.contains(e) || zl(e));
|
|
3992
4019
|
}
|
|
3993
|
-
const M = (e) =>
|
|
4020
|
+
const M = (e) => hi ? (...a) => {
|
|
3994
4021
|
try {
|
|
3995
4022
|
return e(...a);
|
|
3996
4023
|
} catch (e2) {
|
|
3997
|
-
if (
|
|
4024
|
+
if (hi && true === hi(e2)) return;
|
|
3998
4025
|
throw e2;
|
|
3999
4026
|
}
|
|
4000
4027
|
} : e;
|
|
@@ -4053,22 +4080,22 @@ class Vl {
|
|
|
4053
4080
|
transformCrossOriginEvent(e, a) {
|
|
4054
4081
|
var u;
|
|
4055
4082
|
switch (a.type) {
|
|
4056
|
-
case
|
|
4083
|
+
case si.FullSnapshot: {
|
|
4057
4084
|
this.crossOriginIframeMirror.reset(e), this.crossOriginIframeStyleMirror.reset(e), this.replaceIdOnNode(a.data.node, e);
|
|
4058
4085
|
const u2 = a.data.node.id;
|
|
4059
|
-
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type:
|
|
4086
|
+
return this.crossOriginIframeRootIdMap.set(e, u2), this.patchRootIdOnNode(a.data.node, u2), { timestamp: a.timestamp, type: si.IncrementalSnapshot, data: { source: ii.Mutation, adds: [{ parentId: this.mirror.getId(e), nextId: null, node: a.data.node }], removes: [], texts: [], attributes: [], isAttachIframe: true } };
|
|
4060
4087
|
}
|
|
4061
|
-
case
|
|
4062
|
-
case
|
|
4063
|
-
case
|
|
4088
|
+
case si.Meta:
|
|
4089
|
+
case si.Load:
|
|
4090
|
+
case si.DomContentLoaded:
|
|
4064
4091
|
return false;
|
|
4065
|
-
case
|
|
4092
|
+
case si.Plugin:
|
|
4066
4093
|
return a;
|
|
4067
|
-
case
|
|
4094
|
+
case si.Custom:
|
|
4068
4095
|
return this.replaceIds(a.data.payload, e, ["id", "parentId", "previousId", "nextId"]), a;
|
|
4069
|
-
case
|
|
4096
|
+
case si.IncrementalSnapshot:
|
|
4070
4097
|
switch (a.data.source) {
|
|
4071
|
-
case
|
|
4098
|
+
case ii.Mutation:
|
|
4072
4099
|
return a.data.adds.forEach((a2) => {
|
|
4073
4100
|
this.replaceIds(a2, e, ["parentId", "nextId", "previousId"]), this.replaceIdOnNode(a2.node, e);
|
|
4074
4101
|
const u2 = this.crossOriginIframeRootIdMap.get(e);
|
|
@@ -4080,30 +4107,30 @@ class Vl {
|
|
|
4080
4107
|
}), a.data.texts.forEach((a2) => {
|
|
4081
4108
|
this.replaceIds(a2, e, ["id"]);
|
|
4082
4109
|
}), a;
|
|
4083
|
-
case
|
|
4084
|
-
case
|
|
4085
|
-
case
|
|
4110
|
+
case ii.Drag:
|
|
4111
|
+
case ii.TouchMove:
|
|
4112
|
+
case ii.MouseMove:
|
|
4086
4113
|
return a.data.positions.forEach((a2) => {
|
|
4087
4114
|
this.replaceIds(a2, e, ["id"]);
|
|
4088
4115
|
}), a;
|
|
4089
|
-
case
|
|
4116
|
+
case ii.ViewportResize:
|
|
4090
4117
|
return false;
|
|
4091
|
-
case
|
|
4092
|
-
case
|
|
4093
|
-
case
|
|
4094
|
-
case
|
|
4095
|
-
case
|
|
4118
|
+
case ii.MediaInteraction:
|
|
4119
|
+
case ii.MouseInteraction:
|
|
4120
|
+
case ii.Scroll:
|
|
4121
|
+
case ii.CanvasMutation:
|
|
4122
|
+
case ii.Input:
|
|
4096
4123
|
return this.replaceIds(a.data, e, ["id"]), a;
|
|
4097
|
-
case
|
|
4098
|
-
case
|
|
4124
|
+
case ii.StyleSheetRule:
|
|
4125
|
+
case ii.StyleDeclaration:
|
|
4099
4126
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleId"]), a;
|
|
4100
|
-
case
|
|
4127
|
+
case ii.Font:
|
|
4101
4128
|
return a;
|
|
4102
|
-
case
|
|
4129
|
+
case ii.Selection:
|
|
4103
4130
|
return a.data.ranges.forEach((a2) => {
|
|
4104
4131
|
this.replaceIds(a2, e, ["start", "end"]);
|
|
4105
4132
|
}), a;
|
|
4106
|
-
case
|
|
4133
|
+
case ii.AdoptedStyleSheet:
|
|
4107
4134
|
return this.replaceIds(a.data, e, ["id"]), this.replaceStyleIds(a.data, e, ["styleIds"]), null == (u = a.data.styles) || u.forEach((a2) => {
|
|
4108
4135
|
this.replaceStyleIds(a2, e, ["styleId"]);
|
|
4109
4136
|
}), a;
|
|
@@ -4127,7 +4154,7 @@ class Vl {
|
|
|
4127
4154
|
});
|
|
4128
4155
|
}
|
|
4129
4156
|
patchRootIdOnNode(e, a) {
|
|
4130
|
-
e.type !==
|
|
4157
|
+
e.type !== ht.Document && !e.rootId && (e.rootId = a), "childNodes" in e && e.childNodes.forEach((e2) => {
|
|
4131
4158
|
this.patchRootIdOnNode(e2, a);
|
|
4132
4159
|
});
|
|
4133
4160
|
}
|
|
@@ -4345,7 +4372,7 @@ function ko(e, a) {
|
|
|
4345
4372
|
const { parentNode: u } = a;
|
|
4346
4373
|
return !!u && (!!e.has(u) || ko(e, u));
|
|
4347
4374
|
}
|
|
4348
|
-
const
|
|
4375
|
+
const mi = [];
|
|
4349
4376
|
function tt(e) {
|
|
4350
4377
|
try {
|
|
4351
4378
|
if ("composedPath" in e) {
|
|
@@ -4359,7 +4386,7 @@ function tt(e) {
|
|
|
4359
4386
|
function Co(e, a) {
|
|
4360
4387
|
var u, m2;
|
|
4361
4388
|
const w2 = new Zl();
|
|
4362
|
-
|
|
4389
|
+
mi.push(w2), w2.init(e);
|
|
4363
4390
|
let b2 = window.MutationObserver || window.__rrMutationObserver;
|
|
4364
4391
|
const C2 = null == (m2 = null == (u = null == window ? void 0 : window.Zone) ? void 0 : u.__symbol__) ? void 0 : m2.call(u, "MutationObserver");
|
|
4365
4392
|
C2 && window[C2] && (b2 = window[C2]);
|
|
@@ -4371,7 +4398,7 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4371
4398
|
};
|
|
4372
4399
|
const C2 = true === b2.mouseInteraction || void 0 === b2.mouseInteraction ? {} : b2.mouseInteraction, x2 = [];
|
|
4373
4400
|
let I2 = null;
|
|
4374
|
-
return Object.keys(
|
|
4401
|
+
return Object.keys(ai).filter((e2) => Number.isNaN(Number(e2)) && !e2.endsWith("_Departed") && false !== C2[e2]).forEach((b3) => {
|
|
4375
4402
|
let C3 = fe(b3);
|
|
4376
4403
|
const _2 = /* @__PURE__ */ ((a2) => (b4) => {
|
|
4377
4404
|
const C4 = tt(b4);
|
|
@@ -4380,29 +4407,29 @@ function Xl({ mouseInteractionCb: e, doc: a, mirror: u, blockClass: m2, blockSel
|
|
|
4380
4407
|
if ("pointerType" in b4) {
|
|
4381
4408
|
switch (b4.pointerType) {
|
|
4382
4409
|
case "mouse":
|
|
4383
|
-
x3 =
|
|
4410
|
+
x3 = li.Mouse;
|
|
4384
4411
|
break;
|
|
4385
4412
|
case "touch":
|
|
4386
|
-
x3 =
|
|
4413
|
+
x3 = li.Touch;
|
|
4387
4414
|
break;
|
|
4388
4415
|
case "pen":
|
|
4389
|
-
x3 =
|
|
4416
|
+
x3 = li.Pen;
|
|
4390
4417
|
}
|
|
4391
|
-
x3 ===
|
|
4392
|
-
} else Ds(b4) && (x3 =
|
|
4393
|
-
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 ===
|
|
4418
|
+
x3 === li.Touch ? ai[a2] === ai.MouseDown ? _3 = "TouchStart" : ai[a2] === ai.MouseUp && (_3 = "TouchEnd") : li.Pen;
|
|
4419
|
+
} else Ds(b4) && (x3 = li.Touch);
|
|
4420
|
+
null !== x3 ? (I2 = x3, (_3.startsWith("Touch") && x3 === li.Touch || _3.startsWith("Mouse") && x3 === li.Mouse) && (x3 = null)) : ai[a2] === ai.Click && (x3 = I2, I2 = null);
|
|
4394
4421
|
const O2 = Ds(b4) ? b4.changedTouches[0] : b4;
|
|
4395
4422
|
if (!O2) return;
|
|
4396
4423
|
const E2 = u.getId(C4), { clientX: D2, clientY: F2 } = O2;
|
|
4397
|
-
M(e)({ type:
|
|
4424
|
+
M(e)({ type: ai[_3], id: E2, x: D2, y: F2, ...null !== x3 && { pointerType: x3 } });
|
|
4398
4425
|
})(b3);
|
|
4399
|
-
if (window.PointerEvent) switch (
|
|
4400
|
-
case
|
|
4401
|
-
case
|
|
4426
|
+
if (window.PointerEvent) switch (ai[b3]) {
|
|
4427
|
+
case ai.MouseDown:
|
|
4428
|
+
case ai.MouseUp:
|
|
4402
4429
|
C3 = C3.replace("mouse", "pointer");
|
|
4403
4430
|
break;
|
|
4404
|
-
case
|
|
4405
|
-
case
|
|
4431
|
+
case ai.TouchStart:
|
|
4432
|
+
case ai.TouchEnd:
|
|
4406
4433
|
return;
|
|
4407
4434
|
}
|
|
4408
4435
|
x2.push(G(C3, _2, a));
|
|
@@ -4421,7 +4448,7 @@ function xo({ scrollCb: e, doc: a, mirror: u, blockClass: m2, blockSelector: w2,
|
|
|
4421
4448
|
} else e({ id: x2, x: C2.scrollLeft, y: C2.scrollTop });
|
|
4422
4449
|
}), b2.scroll || 100)), a);
|
|
4423
4450
|
}
|
|
4424
|
-
const
|
|
4451
|
+
const gi = ["INPUT", "TEXTAREA", "SELECT"], yi = /* @__PURE__ */ new WeakMap();
|
|
4425
4452
|
function ql({ deviceChangeCb: e }) {
|
|
4426
4453
|
const t = (a2, u2) => {
|
|
4427
4454
|
const m2 = a2.device.productName ? [a2.device.productName] : ["Unknown USB Device"];
|
|
@@ -4541,7 +4568,7 @@ function au(e, a = {}) {
|
|
|
4541
4568
|
e2(x3.map((e3) => (e3.timeOffset -= u3, e3)), a3), x3 = [], C3 = null;
|
|
4542
4569
|
}), b3), _3 = M($e(M((e3) => {
|
|
4543
4570
|
const a3 = tt(e3), { clientX: u3, clientY: w4 } = Ds(e3) ? e3.changedTouches[0] : e3;
|
|
4544
|
-
C3 || (C3 =
|
|
4571
|
+
C3 || (C3 = fi()), x3.push({ x: u3, y: w4, id: m3.getId(a3), timeOffset: fi() - C3 }), I3(typeof DragEvent < "u" && e3 instanceof DragEvent ? ii.Drag : e3 instanceof MouseEvent ? ii.MouseMove : ii.TouchMove);
|
|
4545
4572
|
}), w3, { trailing: false })), O3 = [G("mousemove", _3, u2), G("touchmove", _3, u2), G("drag", _3, u2)];
|
|
4546
4573
|
return M(() => {
|
|
4547
4574
|
O3.forEach((e3) => e3());
|
|
@@ -4557,7 +4584,7 @@ function au(e, a = {}) {
|
|
|
4557
4584
|
function p(e3) {
|
|
4558
4585
|
let u3 = tt(e3);
|
|
4559
4586
|
const _4 = e3.isTrusted, E4 = u3 && u3.tagName;
|
|
4560
|
-
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 ||
|
|
4587
|
+
if (u3 && "OPTION" === E4 && (u3 = u3.parentElement), !u3 || !E4 || gi.indexOf(E4) < 0 || Z(u3, m3, w3, true) || u3.classList.contains(b3) || C3 && u3.matches(C3)) return;
|
|
4561
4588
|
let D4 = u3.value, F4 = false;
|
|
4562
4589
|
const U4 = Yt(u3) || "", { value: B2, masked: $2 } = Zt({ element: u3, maskInputOptions: x3, tagName: E4, type: U4, value: D4, maskInputFn: I3 });
|
|
4563
4590
|
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 });
|
|
@@ -4570,9 +4597,9 @@ function au(e, a = {}) {
|
|
|
4570
4597
|
});
|
|
4571
4598
|
}
|
|
4572
4599
|
function f2(a3, m4) {
|
|
4573
|
-
const w4 =
|
|
4600
|
+
const w4 = yi.get(a3);
|
|
4574
4601
|
if (!w4 || w4.text !== m4.text || w4.isChecked !== m4.isChecked || w4.masked !== m4.masked) {
|
|
4575
|
-
|
|
4602
|
+
yi.set(a3, m4);
|
|
4576
4603
|
const w5 = u2.getId(a3);
|
|
4577
4604
|
M(e2)({ ...m4, id: w5 });
|
|
4578
4605
|
}
|
|
@@ -4597,7 +4624,7 @@ function au(e, a = {}) {
|
|
|
4597
4624
|
const { value: e3, masked: a4 } = Zt({ element: w4, maskInputOptions: u2, tagName: x3, type: I3, value: _3, maskInputFn: m3 });
|
|
4598
4625
|
_3 = e3, b3 = a4;
|
|
4599
4626
|
}
|
|
4600
|
-
e2({ source:
|
|
4627
|
+
e2({ source: ii.Typing, id: null == w4 ? void 0 : w4.id, text: _3, isMasked: b3, target: ((e3) => {
|
|
4601
4628
|
var a4;
|
|
4602
4629
|
const u3 = [];
|
|
4603
4630
|
for (; e3; ) {
|
|
@@ -4625,7 +4652,7 @@ function au(e, a = {}) {
|
|
|
4625
4652
|
if (!C4 || Z(C4, a2, u2, true)) return;
|
|
4626
4653
|
const { currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 } = C4;
|
|
4627
4654
|
e2({ type: b4, id: m3.getId(C4), currentTime: x4, volume: I3, muted: _3, playbackRate: O3, loop: E3 });
|
|
4628
|
-
}), w3.media || 500)), x3 = [G("play", C3(
|
|
4655
|
+
}), w3.media || 500)), x3 = [G("play", C3(ui.Play), b3), G("pause", C3(ui.Pause), b3), G("seeked", C3(ui.Seeked), b3), G("volumechange", C3(ui.VolumeChange), b3), G("ratechange", C3(ui.RateChange), b3)];
|
|
4629
4656
|
return M(() => {
|
|
4630
4657
|
x3.forEach((e3) => e3());
|
|
4631
4658
|
});
|
|
@@ -4746,7 +4773,7 @@ function au(e, a = {}) {
|
|
|
4746
4773
|
})(e), U2 = [];
|
|
4747
4774
|
for (const a2 of e.plugins) U2.push(a2.observer(a2.callback, u, a2.options));
|
|
4748
4775
|
return M(() => {
|
|
4749
|
-
|
|
4776
|
+
mi.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());
|
|
4750
4777
|
});
|
|
4751
4778
|
}
|
|
4752
4779
|
function ft(e) {
|
|
@@ -4755,29 +4782,29 @@ function ft(e) {
|
|
|
4755
4782
|
function mt(e) {
|
|
4756
4783
|
return !!(typeof window[e] < "u" && window[e].prototype && "insertRule" in window[e].prototype && "deleteRule" in window[e].prototype);
|
|
4757
4784
|
}
|
|
4758
|
-
const
|
|
4759
|
-
var
|
|
4785
|
+
const Mi = "KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Zvcih2YXIgcj0iQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyIsdz10eXBlb2YgVWludDhBcnJheT4idSI/W106bmV3IFVpbnQ4QXJyYXkoMjU2KSxpPTA7aTxyLmxlbmd0aDtpKyspd1tyLmNoYXJDb2RlQXQoaSldPWk7dmFyIHA9ZnVuY3Rpb24ocyl7dmFyIGU9bmV3IFVpbnQ4QXJyYXkocyksbixhPWUubGVuZ3RoLHQ9IiI7Zm9yKG49MDtuPGE7bis9Myl0Kz1yW2Vbbl0+PjJdLHQrPXJbKGVbbl0mMyk8PDR8ZVtuKzFdPj40XSx0Kz1yWyhlW24rMV0mMTUpPDwyfGVbbisyXT4+Nl0sdCs9cltlW24rMl0mNjNdO3JldHVybiBhJTM9PT0yP3Q9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0xKSsiPSI6YSUzPT09MSYmKHQ9dC5zdWJzdHJpbmcoMCx0Lmxlbmd0aC0yKSsiPT0iKSx0fTtjb25zdCBsPW5ldyBNYXAsYj1uZXcgTWFwO2FzeW5jIGZ1bmN0aW9uIHkocyxlLG4pe2NvbnN0IGE9YCR7c30tJHtlfWA7aWYoIk9mZnNjcmVlbkNhbnZhcyJpbiBnbG9iYWxUaGlzKXtpZihiLmhhcyhhKSlyZXR1cm4gYi5nZXQoYSk7Y29uc3QgdD1uZXcgT2Zmc2NyZWVuQ2FudmFzKHMsZSk7dC5nZXRDb250ZXh0KCIyZCIpO2NvbnN0IGc9YXdhaXQoYXdhaXQgdC5jb252ZXJ0VG9CbG9iKG4pKS5hcnJheUJ1ZmZlcigpLGM9cChnKTtyZXR1cm4gYi5zZXQoYSxjKSxjfWVsc2UgcmV0dXJuIiJ9Y29uc3Qgbz1zZWxmO28ub25tZXNzYWdlPWFzeW5jIGZ1bmN0aW9uKHMpe2lmKCJPZmZzY3JlZW5DYW52YXMiaW4gZ2xvYmFsVGhpcyl7Y29uc3R7aWQ6ZSxiaXRtYXA6bix3aWR0aDphLGhlaWdodDp0LGRhdGFVUkxPcHRpb25zOnV9PXMuZGF0YSxnPXkoYSx0LHUpLGM9bmV3IE9mZnNjcmVlbkNhbnZhcyhhLHQpO2MuZ2V0Q29udGV4dCgiMmQiKS5kcmF3SW1hZ2UobiwwLDApLG4uY2xvc2UoKTtjb25zdCBkPWF3YWl0IGMuY29udmVydFRvQmxvYih1KSx2PWQudHlwZSxoPWF3YWl0IGQuYXJyYXlCdWZmZXIoKSxmPXAoaCk7aWYoIWwuaGFzKGUpJiZhd2FpdCBnPT09ZilyZXR1cm4gbC5zZXQoZSxmKSxvLnBvc3RNZXNzYWdlKHtpZDplfSk7aWYobC5nZXQoZSk9PT1mKXJldHVybiBvLnBvc3RNZXNzYWdlKHtpZDplfSk7by5wb3N0TWVzc2FnZSh7aWQ6ZSx0eXBlOnYsYmFzZTY0OmYsd2lkdGg6YSxoZWlnaHQ6dH0pLGwuc2V0KGUsZil9ZWxzZSByZXR1cm4gby5wb3N0TWVzc2FnZSh7aWQ6cy5kYXRhLmlkfSl9fSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9aW1hZ2UtYml0bWFwLWRhdGEtdXJsLXdvcmtlci1Cb1hHVm1Zby5qcy5tYXAK", Ii = typeof self < "u" && self.Blob && new Blob([(Li = Mi, Uint8Array.from(atob(Li), (e) => e.charCodeAt(0)))], { type: "text/javascript;charset=utf-8" });
|
|
4786
|
+
var Li;
|
|
4760
4787
|
function uu(e) {
|
|
4761
4788
|
let a;
|
|
4762
4789
|
try {
|
|
4763
|
-
if (a =
|
|
4790
|
+
if (a = Ii && (self.URL || self.webkitURL).createObjectURL(Ii), !a) throw "";
|
|
4764
4791
|
const u = new Worker(a, { name: null == e ? void 0 : e.name });
|
|
4765
4792
|
return u.addEventListener("error", () => {
|
|
4766
4793
|
(self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4767
4794
|
}), u;
|
|
4768
4795
|
} catch {
|
|
4769
|
-
return new Worker("data:text/javascript;base64," +
|
|
4796
|
+
return new Worker("data:text/javascript;base64," + Mi, { name: null == e ? void 0 : e.name });
|
|
4770
4797
|
} finally {
|
|
4771
4798
|
a && (self.URL || self.webkitURL).revokeObjectURL(a);
|
|
4772
4799
|
}
|
|
4773
4800
|
}
|
|
4774
|
-
for (var
|
|
4775
|
-
const
|
|
4801
|
+
for (var Ri = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ai = typeof Uint8Array > "u" ? [] : new Uint8Array(256), Ti = 0; Ti < 64; Ti++) Ai[Ri.charCodeAt(Ti)] = Ti;
|
|
4802
|
+
const Ni = /* @__PURE__ */ new Map();
|
|
4776
4803
|
const Oo = (e, a, u) => {
|
|
4777
4804
|
if (!e || !Ro(e, a) && "object" != typeof e) return;
|
|
4778
4805
|
const m2 = (function pu(e2, a2) {
|
|
4779
|
-
let u2 =
|
|
4780
|
-
return u2 || (u2 = /* @__PURE__ */ new Map(),
|
|
4806
|
+
let u2 = Ni.get(e2);
|
|
4807
|
+
return u2 || (u2 = /* @__PURE__ */ new Map(), Ni.set(e2, u2)), u2.has(a2) || u2.set(a2, []), u2.get(a2);
|
|
4781
4808
|
})(u, e.constructor.name);
|
|
4782
4809
|
let w2 = m2.indexOf(e);
|
|
4783
4810
|
return -1 === w2 && (w2 = m2.length, m2.push(e)), w2;
|
|
@@ -4789,7 +4816,7 @@ function Ot(e, a, u) {
|
|
|
4789
4816
|
if (e instanceof ArrayBuffer) {
|
|
4790
4817
|
const a2 = e.constructor.name, u2 = (function(e2) {
|
|
4791
4818
|
var a3, u3 = new Uint8Array(e2), m2 = u3.length, w2 = "";
|
|
4792
|
-
for (a3 = 0; a3 < m2; a3 += 3) w2 +=
|
|
4819
|
+
for (a3 = 0; a3 < m2; a3 += 3) w2 += Ri[u3[a3] >> 2], w2 += Ri[(3 & u3[a3]) << 4 | u3[a3 + 1] >> 4], w2 += Ri[(15 & u3[a3 + 1]) << 2 | u3[a3 + 2] >> 6], w2 += Ri[63 & u3[a3 + 2]];
|
|
4793
4820
|
return m2 % 3 == 2 ? w2 = w2.substring(0, w2.length - 1) + "=" : m2 % 3 == 1 && (w2 = w2.substring(0, w2.length - 2) + "=="), w2;
|
|
4794
4821
|
})(e);
|
|
4795
4822
|
return { rr_type: a2, base64: u2 };
|
|
@@ -4886,7 +4913,7 @@ class gu {
|
|
|
4886
4913
|
const { id: a2 } = e2.data;
|
|
4887
4914
|
if (C2.set(a2, false), !("base64" in e2.data)) return;
|
|
4888
4915
|
const { base64: u2, type: m3, width: w3, height: b3 } = e2.data;
|
|
4889
|
-
this.mutationCb({ id: a2, type:
|
|
4916
|
+
this.mutationCb({ id: a2, type: ci["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] }] });
|
|
4890
4917
|
};
|
|
4891
4918
|
const I2 = 1e3 / e;
|
|
4892
4919
|
let _2, O2 = 0;
|
|
@@ -4922,14 +4949,14 @@ class gu {
|
|
|
4922
4949
|
return function(...b5) {
|
|
4923
4950
|
return Z(this.canvas, u2, m3, true) || setTimeout(() => {
|
|
4924
4951
|
const u3 = Eo(b5, a2, this);
|
|
4925
|
-
e2(this.canvas, { type:
|
|
4952
|
+
e2(this.canvas, { type: ci["2D"], property: C2, args: u3 });
|
|
4926
4953
|
}, 0), w4.apply(this, b5);
|
|
4927
4954
|
};
|
|
4928
4955
|
});
|
|
4929
4956
|
w3.push(b4);
|
|
4930
4957
|
} catch {
|
|
4931
4958
|
const u3 = qt(a2.CanvasRenderingContext2D.prototype, C2, { set(a3) {
|
|
4932
|
-
e2(this.canvas, { type:
|
|
4959
|
+
e2(this.canvas, { type: ci["2D"], property: C2, args: [a3], setter: true });
|
|
4933
4960
|
} });
|
|
4934
4961
|
w3.push(u3);
|
|
4935
4962
|
}
|
|
@@ -4938,7 +4965,7 @@ class gu {
|
|
|
4938
4965
|
};
|
|
4939
4966
|
})(this.processMutation.bind(this), e, a, u), b2 = (function mu(e2, a2, u2, m3) {
|
|
4940
4967
|
const w3 = [];
|
|
4941
|
-
return w3.push(...tr(a2.WebGLRenderingContext.prototype,
|
|
4968
|
+
return w3.push(...tr(a2.WebGLRenderingContext.prototype, ci.WebGL, e2, u2, m3, a2)), typeof a2.WebGL2RenderingContext < "u" && w3.push(...tr(a2.WebGL2RenderingContext.prototype, ci.WebGL2, e2, u2, m3, a2)), () => {
|
|
4942
4969
|
w3.forEach((e3) => e3());
|
|
4943
4970
|
};
|
|
4944
4971
|
})(this.processMutation.bind(this), e, a, u);
|
|
@@ -5049,23 +5076,23 @@ class bu {
|
|
|
5049
5076
|
trackStylesheetInLinkElement(e) {
|
|
5050
5077
|
}
|
|
5051
5078
|
}
|
|
5052
|
-
let
|
|
5053
|
-
var
|
|
5079
|
+
let Pi, qi, Hi, Ji = false;
|
|
5080
|
+
var Xi;
|
|
5054
5081
|
try {
|
|
5055
5082
|
if (2 !== Array.from([1], (e) => 2 * e)[0]) {
|
|
5056
5083
|
const e = document.createElement("iframe");
|
|
5057
|
-
document.body.appendChild(e), Array.from = (null == (
|
|
5084
|
+
document.body.appendChild(e), Array.from = (null == (Xi = e.contentWindow) ? void 0 : Xi.Array.from) || Array.from, document.body.removeChild(e);
|
|
5058
5085
|
}
|
|
5059
|
-
} catch (
|
|
5060
|
-
console.debug("Unable to override Array.from",
|
|
5086
|
+
} catch (Li2) {
|
|
5087
|
+
console.debug("Unable to override Array.from", Li2);
|
|
5061
5088
|
}
|
|
5062
|
-
const
|
|
5063
|
-
return new
|
|
5089
|
+
const Qi = (function Ci() {
|
|
5090
|
+
return new gt();
|
|
5064
5091
|
})();
|
|
5065
5092
|
function ae(e = {}) {
|
|
5066
5093
|
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;
|
|
5067
5094
|
!(function Bl(e2) {
|
|
5068
|
-
|
|
5095
|
+
hi = e2;
|
|
5069
5096
|
})(se2);
|
|
5070
5097
|
const ie2 = !Y2 || window.parent === window;
|
|
5071
5098
|
let le2 = false;
|
|
@@ -5077,7 +5104,7 @@ function ae(e = {}) {
|
|
|
5077
5104
|
if (ie2 && !a) throw new Error("emit function is required");
|
|
5078
5105
|
if (!ie2 && !le2) return () => {
|
|
5079
5106
|
};
|
|
5080
|
-
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2),
|
|
5107
|
+
void 0 !== q2 && void 0 === j2.mousemove && (j2.mousemove = q2), Qi.reset();
|
|
5081
5108
|
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 || {};
|
|
5082
5109
|
!(function Ul(e2 = window) {
|
|
5083
5110
|
"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) => {
|
|
@@ -5094,57 +5121,57 @@ function ae(e = {}) {
|
|
|
5094
5121
|
for (const a2 of ne2 || []) a2.eventProcessor && (e2 = a2.eventProcessor(e2));
|
|
5095
5122
|
return z2 && !le2 && (e2 = z2(e2)), e2;
|
|
5096
5123
|
};
|
|
5097
|
-
|
|
5124
|
+
Pi = (e2, w3) => {
|
|
5098
5125
|
var b3;
|
|
5099
5126
|
const C3 = e2;
|
|
5100
|
-
if (C3.timestamp =
|
|
5127
|
+
if (C3.timestamp = fi(), null != (b3 = mi[0]) && b3.isFrozen() && C3.type !== si.FullSnapshot && !(C3.type === si.IncrementalSnapshot && C3.data.source === ii.Mutation) && mi.forEach((e3) => e3.unfreeze()), ie2) null == a || a(vn(C3), w3);
|
|
5101
5128
|
else if (le2) {
|
|
5102
5129
|
const e3 = { type: "@sailfish-rrweb/rrweb", event: vn(C3), origin: window.location.origin, isCheckout: w3 };
|
|
5103
5130
|
window.parent.postMessage(e3, "*");
|
|
5104
5131
|
}
|
|
5105
|
-
if (C3.type ===
|
|
5106
|
-
else if (C3.type ===
|
|
5107
|
-
if (C3.data.source ===
|
|
5132
|
+
if (C3.type === si.FullSnapshot) de2 = C3, he2 = 0;
|
|
5133
|
+
else if (C3.type === si.IncrementalSnapshot) {
|
|
5134
|
+
if (C3.data.source === ii.Mutation && C3.data.isAttachIframe) return;
|
|
5108
5135
|
he2++;
|
|
5109
5136
|
const e3 = m2 && he2 >= m2, a2 = u && C3.timestamp - de2.timestamp > u;
|
|
5110
|
-
(e3 || a2) &&
|
|
5137
|
+
(e3 || a2) && qi(true);
|
|
5111
5138
|
}
|
|
5112
5139
|
};
|
|
5113
5140
|
const rt = (e2) => {
|
|
5114
|
-
|
|
5115
|
-
}, kn = (e2) =>
|
|
5116
|
-
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror:
|
|
5141
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.Mutation, ...e2 } });
|
|
5142
|
+
}, kn = (e2) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Scroll, ...e2 } }), Cn = (e2) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.CanvasMutation, ...e2 } }), me2 = new bu({ mutationCb: rt, adoptedStyleSheetCb: (e2) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.AdoptedStyleSheet, ...e2 } }) }), ge2 = new Vl({ mirror: Qi, mutationCb: rt, stylesheetManager: me2, recordCrossOriginIframes: Y2, wrappedEmit: Pi });
|
|
5143
|
+
for (const e2 of ne2 || []) e2.getMirror && e2.getMirror({ nodeMirror: Qi, crossOriginIframeMirror: ge2.crossOriginIframeMirror, crossOriginIframeStyleMirror: ge2.crossOriginIframeStyleMirror });
|
|
5117
5144
|
const ye2 = new yu();
|
|
5118
|
-
|
|
5119
|
-
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:
|
|
5120
|
-
|
|
5145
|
+
Hi = new gu({ recordCanvas: J2, mutationCb: Cn, win: window, blockClass: w2, blockSelector: b2, mirror: Qi, sampling: j2.canvas, dataURLOptions: V2 });
|
|
5146
|
+
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: Hi, keepIframeSrcFn: re2, processedNodeManager: ye2 }, mirror: Qi });
|
|
5147
|
+
qi = (e2 = false) => {
|
|
5121
5148
|
if (!H2) return;
|
|
5122
|
-
|
|
5149
|
+
Pi({ type: si.Meta, data: { href: window.location.href, width: mo(), height: fo() } }, e2), me2.reset(), we2.init(), mi.forEach((e3) => e3.lock());
|
|
5123
5150
|
const a2 = (function Zi(e3, a3) {
|
|
5124
|
-
const { mirror: u2 = new
|
|
5151
|
+
const { mirror: u2 = new gt(), 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 || {};
|
|
5125
5152
|
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 });
|
|
5126
|
-
})(document, { mirror:
|
|
5127
|
-
wo(e3,
|
|
5153
|
+
})(document, { mirror: Qi, 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) => {
|
|
5154
|
+
wo(e3, Qi) && ge2.addIframe(e3), bo(e3, Qi) && me2.trackLinkElement(e3), Fs(e3) && we2.addShadowRoot(e3.shadowRoot, document);
|
|
5128
5155
|
}, onIframeLoad: (e3, a3) => {
|
|
5129
5156
|
ge2.attachIframe(e3, a3), we2.observeAttachShadow(e3);
|
|
5130
5157
|
}, onStylesheetLoad: (e3, a3) => {
|
|
5131
5158
|
me2.attachLinkElement(e3, a3);
|
|
5132
5159
|
}, keepIframeSrcFn: re2 });
|
|
5133
5160
|
if (!a2) return console.warn("Failed to snapshot the document");
|
|
5134
|
-
|
|
5161
|
+
Pi({ type: si.FullSnapshot, data: { node: a2, initialOffset: po(window) } }, e2), mi.forEach((e3) => e3.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && me2.adoptStyleSheets(document.adoptedStyleSheets, Qi.getId(document));
|
|
5135
5162
|
};
|
|
5136
5163
|
try {
|
|
5137
5164
|
const e2 = [], K = (e3) => {
|
|
5138
5165
|
var a2;
|
|
5139
|
-
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) =>
|
|
5140
|
-
|
|
5166
|
+
return M(au)({ mutationCb: rt, mousemoveCb: (e4, a3) => Pi({ type: si.IncrementalSnapshot, data: { source: a3, positions: e4 } }), mouseInteractionCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.MouseInteraction, ...e4 } }), scrollCb: kn, viewportResizeCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.ViewportResize, ...e4 } }), inputCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Input, ...e4 } }), mediaInteractionCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.MediaInteraction, ...e4 } }), styleSheetRuleCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.StyleSheetRule, ...e4 } }), styleDeclarationCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.StyleDeclaration, ...e4 } }), canvasMutationCb: Cn, fontCb: (e4) => Pi({ type: si.IncrementalSnapshot, data: { source: ii.Font, ...e4 } }), selectionCb: (e4) => {
|
|
5167
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.Selection, ...e4 } });
|
|
5141
5168
|
}, customElementCb: (e4) => {
|
|
5142
|
-
|
|
5169
|
+
Pi({ type: si.IncrementalSnapshot, data: { source: ii.CustomElement, ...e4 } });
|
|
5143
5170
|
}, typingCb: (e4) => {
|
|
5144
|
-
|
|
5171
|
+
Pi({ type: si.IncrementalSnapshot, data: { ...e4 } });
|
|
5145
5172
|
}, deviceChangeCb: (e4) => {
|
|
5146
|
-
|
|
5147
|
-
}, 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:
|
|
5173
|
+
Pi({ type: si.Device, data: { ...e4 } });
|
|
5174
|
+
}, 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: Qi, iframeManager: ge2, stylesheetManager: me2, shadowDomManager: we2, processedNodeManager: ye2, canvasManager: Hi, 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) => Pi({ type: si.Plugin, data: { plugin: e4.name, payload: a3 } }) }))) || [] }, $2);
|
|
5148
5175
|
};
|
|
5149
5176
|
ge2.addLoadListener((a2) => {
|
|
5150
5177
|
try {
|
|
@@ -5154,15 +5181,15 @@ function ae(e = {}) {
|
|
|
5154
5181
|
}
|
|
5155
5182
|
});
|
|
5156
5183
|
const W = () => {
|
|
5157
|
-
|
|
5184
|
+
qi(), e2.push(K(document)), Ji = true;
|
|
5158
5185
|
};
|
|
5159
5186
|
return "interactive" === document.readyState || "complete" === document.readyState ? W() : (e2.push(G("DOMContentLoaded", () => {
|
|
5160
|
-
|
|
5187
|
+
Pi({ type: si.DomContentLoaded, data: {} }), "DOMContentLoaded" === X2 && W();
|
|
5161
5188
|
})), e2.push(G("load", () => {
|
|
5162
|
-
|
|
5189
|
+
Pi({ type: si.Load, data: {} }), "load" === X2 && W();
|
|
5163
5190
|
}, window))), () => {
|
|
5164
|
-
e2.forEach((e3) => e3()), ye2.destroy(),
|
|
5165
|
-
|
|
5191
|
+
e2.forEach((e3) => e3()), ye2.destroy(), Ji = false, (function jl() {
|
|
5192
|
+
hi = void 0;
|
|
5166
5193
|
})();
|
|
5167
5194
|
};
|
|
5168
5195
|
} catch (e2) {
|
|
@@ -5189,24 +5216,24 @@ function vu(e) {
|
|
|
5189
5216
|
}), u;
|
|
5190
5217
|
}
|
|
5191
5218
|
ae.addCustomEvent = (e, a) => {
|
|
5192
|
-
if (!
|
|
5193
|
-
|
|
5219
|
+
if (!Ji) throw new Error("please add custom event after start recording");
|
|
5220
|
+
Pi({ type: si.Custom, data: { tag: e, payload: a } });
|
|
5194
5221
|
}, ae.addSailfishEvent = (e, a) => {
|
|
5195
|
-
if (!
|
|
5196
|
-
|
|
5222
|
+
if (!Ji) throw new Error("please add Sailfish event after start recording");
|
|
5223
|
+
Pi({ type: e, data: { tag: "sailfish-zendesk-test-tag", payload: a } });
|
|
5197
5224
|
}, ae.freezePage = () => {
|
|
5198
|
-
|
|
5225
|
+
mi.forEach((e) => e.freeze());
|
|
5199
5226
|
}, ae.takeFullSnapshot = (e) => {
|
|
5200
|
-
if (!
|
|
5201
|
-
|
|
5202
|
-
}, ae.mirror =
|
|
5203
|
-
var
|
|
5204
|
-
return { isColorSupported: false, reset:
|
|
5227
|
+
if (!Ji) throw new Error("please take full snapshot after start recording");
|
|
5228
|
+
qi(e);
|
|
5229
|
+
}, ae.mirror = Qi;
|
|
5230
|
+
var ea = { exports: {} }, ta = String, Lo = function() {
|
|
5231
|
+
return { isColorSupported: false, reset: ta, bold: ta, dim: ta, italic: ta, underline: ta, inverse: ta, hidden: ta, strikethrough: ta, black: ta, red: ta, green: ta, yellow: ta, blue: ta, magenta: ta, cyan: ta, white: ta, gray: ta, bgBlack: ta, bgRed: ta, bgGreen: ta, bgYellow: ta, bgBlue: ta, bgMagenta: ta, bgCyan: ta, bgWhite: ta, blackBright: ta, redBright: ta, greenBright: ta, yellowBright: ta, blueBright: ta, magentaBright: ta, cyanBright: ta, whiteBright: ta, bgBlackBright: ta, bgRedBright: ta, bgGreenBright: ta, bgYellowBright: ta, bgBlueBright: ta, bgMagentaBright: ta, bgCyanBright: ta, bgWhiteBright: ta };
|
|
5205
5232
|
};
|
|
5206
|
-
|
|
5207
|
-
var
|
|
5208
|
-
const
|
|
5209
|
-
let
|
|
5233
|
+
ea.exports = Lo(), ea.exports.createColors = Lo;
|
|
5234
|
+
var na = ea.exports;
|
|
5235
|
+
const ra = vu(Object.freeze(Object.defineProperty({ __proto__: null, default: {} }, Symbol.toStringTag, { value: "Module" })));
|
|
5236
|
+
let oa = na, sa = ra, ia = class To extends Error {
|
|
5210
5237
|
constructor(e, a, u, m2, w2, b2) {
|
|
5211
5238
|
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);
|
|
5212
5239
|
}
|
|
@@ -5216,11 +5243,11 @@ let ia = oa, aa = sa, la = class To extends Error {
|
|
|
5216
5243
|
showSourceCode(e) {
|
|
5217
5244
|
if (!this.source) return "";
|
|
5218
5245
|
let a = this.source;
|
|
5219
|
-
null == e && (e =
|
|
5246
|
+
null == e && (e = oa.isColorSupported);
|
|
5220
5247
|
let n = (e2) => e2, r = (e2) => e2, i = (e2) => e2;
|
|
5221
5248
|
if (e) {
|
|
5222
|
-
let { bold: e2, gray: a2, red: u2 } =
|
|
5223
|
-
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3),
|
|
5249
|
+
let { bold: e2, gray: a2, red: u2 } = oa.createColors(true);
|
|
5250
|
+
r = (a3) => e2(u2(a3)), n = (e3) => a2(e3), sa && (i = (e3) => sa(e3));
|
|
5224
5251
|
}
|
|
5225
5252
|
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;
|
|
5226
5253
|
return u.slice(m2, w2).map((e2, a2) => {
|
|
@@ -5241,10 +5268,10 @@ let ia = oa, aa = sa, la = class To extends Error {
|
|
|
5241
5268
|
return e && (e = "\n\n" + e + "\n"), this.name + ": " + this.message + e;
|
|
5242
5269
|
}
|
|
5243
5270
|
};
|
|
5244
|
-
var
|
|
5245
|
-
|
|
5246
|
-
const
|
|
5247
|
-
let
|
|
5271
|
+
var aa = ia;
|
|
5272
|
+
ia.default = ia;
|
|
5273
|
+
const la = { after: "\n", beforeClose: "\n", beforeComment: "\n", beforeDecl: "\n", beforeOpen: " ", beforeRule: "\n", colon: ": ", commentLeft: " ", commentRight: " ", emptyBody: "", indent: " ", semicolon: false };
|
|
5274
|
+
let ca = class {
|
|
5248
5275
|
constructor(e) {
|
|
5249
5276
|
this.builder = e;
|
|
5250
5277
|
}
|
|
@@ -5296,7 +5323,7 @@ let pa = class {
|
|
|
5296
5323
|
if (u || (u = a), a && (m2 = e.raws[a], typeof m2 < "u")) return m2;
|
|
5297
5324
|
let w2 = e.parent;
|
|
5298
5325
|
if ("before" === u && (!w2 || "root" === w2.type && w2.first === e || w2 && "document" === w2.type)) return "";
|
|
5299
|
-
if (!w2) return
|
|
5326
|
+
if (!w2) return la[u];
|
|
5300
5327
|
let b2 = e.root();
|
|
5301
5328
|
if (b2.rawCache || (b2.rawCache = {}), typeof b2.rawCache[u] < "u") return b2.rawCache[u];
|
|
5302
5329
|
if ("before" === u || "after" === u) return this.beforeAfter(e, u);
|
|
@@ -5308,7 +5335,7 @@ let pa = class {
|
|
|
5308
5335
|
if (m2 = e2.raws[a], typeof m2 < "u") return false;
|
|
5309
5336
|
});
|
|
5310
5337
|
}
|
|
5311
|
-
return typeof m2 > "u" && (m2 =
|
|
5338
|
+
return typeof m2 > "u" && (m2 = la[u]), b2.rawCache[u] = m2, m2;
|
|
5312
5339
|
}
|
|
5313
5340
|
rawBeforeClose(e) {
|
|
5314
5341
|
let a;
|
|
@@ -5384,17 +5411,17 @@ let pa = class {
|
|
|
5384
5411
|
this[e.type](e, a);
|
|
5385
5412
|
}
|
|
5386
5413
|
};
|
|
5387
|
-
var
|
|
5388
|
-
|
|
5389
|
-
let
|
|
5414
|
+
var ua = ca;
|
|
5415
|
+
ca.default = ca;
|
|
5416
|
+
let pa = ua;
|
|
5390
5417
|
function zs(e, a) {
|
|
5391
|
-
new
|
|
5418
|
+
new pa(a).stringify(e);
|
|
5392
5419
|
}
|
|
5393
|
-
var
|
|
5420
|
+
var ha = zs;
|
|
5394
5421
|
zs.default = zs;
|
|
5395
|
-
var
|
|
5396
|
-
|
|
5397
|
-
let
|
|
5422
|
+
var fa = {};
|
|
5423
|
+
fa.isClean = Symbol("isClean"), fa.my = Symbol("my");
|
|
5424
|
+
let ma = aa, ga = ua, ya = ha, { isClean: wa, my: Sa } = fa;
|
|
5398
5425
|
function Bs(e, a) {
|
|
5399
5426
|
let u = new e.constructor();
|
|
5400
5427
|
for (let m2 in e) {
|
|
@@ -5416,12 +5443,12 @@ function Fe(e, a) {
|
|
|
5416
5443
|
}
|
|
5417
5444
|
return w2;
|
|
5418
5445
|
}
|
|
5419
|
-
let
|
|
5446
|
+
let ba = class {
|
|
5420
5447
|
get proxyOf() {
|
|
5421
5448
|
return this;
|
|
5422
5449
|
}
|
|
5423
5450
|
constructor(e = {}) {
|
|
5424
|
-
this.raws = {}, this[
|
|
5451
|
+
this.raws = {}, this[wa] = false, this[Sa] = true;
|
|
5425
5452
|
for (let a in e) if ("nodes" === a) {
|
|
5426
5453
|
this.nodes = [];
|
|
5427
5454
|
for (let u of e[a]) "function" == typeof u.clone ? this.append(u.clone()) : this.append(u);
|
|
@@ -5465,19 +5492,19 @@ let Ca = class {
|
|
|
5465
5492
|
let { end: u, start: m2 } = this.rangeBy(a);
|
|
5466
5493
|
return this.source.input.error(e, { column: m2.column, line: m2.line }, { column: u.column, line: u.line }, a);
|
|
5467
5494
|
}
|
|
5468
|
-
return new
|
|
5495
|
+
return new ma(e);
|
|
5469
5496
|
}
|
|
5470
5497
|
getProxyProcessor() {
|
|
5471
5498
|
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) };
|
|
5472
5499
|
}
|
|
5473
5500
|
markClean() {
|
|
5474
|
-
this[
|
|
5501
|
+
this[wa] = true;
|
|
5475
5502
|
}
|
|
5476
5503
|
markDirty() {
|
|
5477
|
-
if (this[
|
|
5478
|
-
this[
|
|
5504
|
+
if (this[wa]) {
|
|
5505
|
+
this[wa] = false;
|
|
5479
5506
|
let e = this;
|
|
5480
|
-
for (; e = e.parent; ) e[
|
|
5507
|
+
for (; e = e.parent; ) e[wa] = false;
|
|
5481
5508
|
}
|
|
5482
5509
|
}
|
|
5483
5510
|
next() {
|
|
@@ -5513,7 +5540,7 @@ let Ca = class {
|
|
|
5513
5540
|
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 };
|
|
5514
5541
|
}
|
|
5515
5542
|
raw(e, a) {
|
|
5516
|
-
return new
|
|
5543
|
+
return new ga().raw(this, e, a);
|
|
5517
5544
|
}
|
|
5518
5545
|
remove() {
|
|
5519
5546
|
return this.parent && this.parent.removeChild(this), this.parent = void 0, this;
|
|
@@ -5550,7 +5577,7 @@ let Ca = class {
|
|
|
5550
5577
|
toProxy() {
|
|
5551
5578
|
return this.proxyCache || (this.proxyCache = new Proxy(this, this.getProxyProcessor())), this.proxyCache;
|
|
5552
5579
|
}
|
|
5553
|
-
toString(e =
|
|
5580
|
+
toString(e = ya) {
|
|
5554
5581
|
e.stringify && (e = e.stringify);
|
|
5555
5582
|
let a = "";
|
|
5556
5583
|
return e(this, (e2) => {
|
|
@@ -5563,16 +5590,16 @@ let Ca = class {
|
|
|
5563
5590
|
return e.warn(a, m2);
|
|
5564
5591
|
}
|
|
5565
5592
|
};
|
|
5566
|
-
var
|
|
5567
|
-
|
|
5568
|
-
let
|
|
5593
|
+
var va = ba;
|
|
5594
|
+
ba.default = ba;
|
|
5595
|
+
let Ca = va, ka = class extends Ca {
|
|
5569
5596
|
constructor(e) {
|
|
5570
5597
|
super(e), this.type = "comment";
|
|
5571
5598
|
}
|
|
5572
5599
|
};
|
|
5573
|
-
var
|
|
5574
|
-
|
|
5575
|
-
let
|
|
5600
|
+
var xa = ka;
|
|
5601
|
+
ka.default = ka;
|
|
5602
|
+
let Ma = va, Ia = class extends Ma {
|
|
5576
5603
|
get variable() {
|
|
5577
5604
|
return this.prop.startsWith("--") || "$" === this.prop[0];
|
|
5578
5605
|
}
|
|
@@ -5580,16 +5607,16 @@ let _a = ka, Oa = class extends _a {
|
|
|
5580
5607
|
e && typeof e.value < "u" && "string" != typeof e.value && (e = { ...e, value: String(e.value) }), super(e), this.type = "decl";
|
|
5581
5608
|
}
|
|
5582
5609
|
};
|
|
5583
|
-
var
|
|
5584
|
-
|
|
5585
|
-
let
|
|
5610
|
+
var _a = Ia;
|
|
5611
|
+
Ia.default = Ia;
|
|
5612
|
+
let Oa, Ea, La, Ra, Aa = xa, Ta = _a, Na = va, { isClean: Pa, my: Da } = fa;
|
|
5586
5613
|
function Wo(e) {
|
|
5587
5614
|
return e.map((e2) => (e2.nodes && (e2.nodes = Wo(e2.nodes)), delete e2.source, e2));
|
|
5588
5615
|
}
|
|
5589
5616
|
function zo(e) {
|
|
5590
|
-
if (e[
|
|
5617
|
+
if (e[Pa] = false, e.proxyOf.nodes) for (let a of e.proxyOf.nodes) zo(a);
|
|
5591
5618
|
}
|
|
5592
|
-
let
|
|
5619
|
+
let Fa = class Bo extends Na {
|
|
5593
5620
|
get first() {
|
|
5594
5621
|
if (this.proxyOf.nodes) return this.proxyOf.nodes[0];
|
|
5595
5622
|
}
|
|
@@ -5641,7 +5668,7 @@ let Ba = class Bo extends Da {
|
|
|
5641
5668
|
return this.markDirty(), this;
|
|
5642
5669
|
}
|
|
5643
5670
|
normalize(e, a) {
|
|
5644
|
-
if ("string" == typeof e) e = Wo(
|
|
5671
|
+
if ("string" == typeof e) e = Wo(Ea(e).nodes);
|
|
5645
5672
|
else if (typeof e > "u") e = [];
|
|
5646
5673
|
else if (Array.isArray(e)) {
|
|
5647
5674
|
e = e.slice(0);
|
|
@@ -5652,14 +5679,14 @@ let Ba = class Bo extends Da {
|
|
|
5652
5679
|
} else if (e.type) e = [e];
|
|
5653
5680
|
else if (e.prop) {
|
|
5654
5681
|
if (typeof e.value > "u") throw new Error("Value field is missed in node creation");
|
|
5655
|
-
"string" != typeof e.value && (e.value = String(e.value)), e = [new
|
|
5656
|
-
} else if (e.selector || e.selectors) e = [new
|
|
5657
|
-
else if (e.name) e = [new
|
|
5682
|
+
"string" != typeof e.value && (e.value = String(e.value)), e = [new Ta(e)];
|
|
5683
|
+
} else if (e.selector || e.selectors) e = [new Ra(e)];
|
|
5684
|
+
else if (e.name) e = [new Oa(e)];
|
|
5658
5685
|
else {
|
|
5659
5686
|
if (!e.text) throw new Error("Unknown node type in node creation");
|
|
5660
|
-
e = [new
|
|
5687
|
+
e = [new Aa(e)];
|
|
5661
5688
|
}
|
|
5662
|
-
return e.map((e2) => (e2[
|
|
5689
|
+
return e.map((e2) => (e2[Da] || Bo.rebuild(e2), (e2 = e2.proxyOf).parent && e2.parent.removeChild(e2), e2[Pa] && 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));
|
|
5663
5690
|
}
|
|
5664
5691
|
prepend(...e) {
|
|
5665
5692
|
e = e.reverse();
|
|
@@ -5735,22 +5762,22 @@ let Ba = class Bo extends Da {
|
|
|
5735
5762
|
}));
|
|
5736
5763
|
}
|
|
5737
5764
|
};
|
|
5738
|
-
|
|
5765
|
+
Fa.registerParse = (e) => {
|
|
5766
|
+
Ea = e;
|
|
5767
|
+
}, Fa.registerRule = (e) => {
|
|
5739
5768
|
Ra = e;
|
|
5740
|
-
},
|
|
5741
|
-
|
|
5742
|
-
},
|
|
5769
|
+
}, Fa.registerAtRule = (e) => {
|
|
5770
|
+
Oa = e;
|
|
5771
|
+
}, Fa.registerRoot = (e) => {
|
|
5743
5772
|
La = e;
|
|
5744
|
-
}, Ba.registerRoot = (e) => {
|
|
5745
|
-
Aa = e;
|
|
5746
5773
|
};
|
|
5747
|
-
var
|
|
5748
|
-
|
|
5749
|
-
"atrule" === e.type ? Object.setPrototypeOf(e,
|
|
5750
|
-
|
|
5774
|
+
var Ua = Fa;
|
|
5775
|
+
Fa.default = Fa, Fa.rebuild = (e) => {
|
|
5776
|
+
"atrule" === e.type ? Object.setPrototypeOf(e, Oa.prototype) : "rule" === e.type ? Object.setPrototypeOf(e, Ra.prototype) : "decl" === e.type ? Object.setPrototypeOf(e, Ta.prototype) : "comment" === e.type ? Object.setPrototypeOf(e, Aa.prototype) : "root" === e.type && Object.setPrototypeOf(e, La.prototype), e[Da] = true, e.nodes && e.nodes.forEach((e2) => {
|
|
5777
|
+
Fa.rebuild(e2);
|
|
5751
5778
|
});
|
|
5752
5779
|
};
|
|
5753
|
-
let
|
|
5780
|
+
let Ba = Ua, $a = class extends Ba {
|
|
5754
5781
|
constructor(e) {
|
|
5755
5782
|
super(e), this.type = "atrule";
|
|
5756
5783
|
}
|
|
@@ -5761,38 +5788,38 @@ let Wa = $a, za = class extends Wa {
|
|
|
5761
5788
|
return this.proxyOf.nodes || (this.nodes = []), super.prepend(...e);
|
|
5762
5789
|
}
|
|
5763
5790
|
};
|
|
5764
|
-
var
|
|
5765
|
-
|
|
5766
|
-
let
|
|
5791
|
+
var Wa = $a;
|
|
5792
|
+
$a.default = $a, Ba.registerAtRule($a);
|
|
5793
|
+
let za, ja, Ga = Ua, Va = class extends Ga {
|
|
5767
5794
|
constructor(e) {
|
|
5768
5795
|
super({ type: "document", ...e }), this.nodes || (this.nodes = []);
|
|
5769
5796
|
}
|
|
5770
5797
|
toResult(e = {}) {
|
|
5771
|
-
return new
|
|
5798
|
+
return new za(new ja(), this, e).stringify();
|
|
5772
5799
|
}
|
|
5773
5800
|
};
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
},
|
|
5777
|
-
|
|
5801
|
+
Va.registerLazyResult = (e) => {
|
|
5802
|
+
za = e;
|
|
5803
|
+
}, Va.registerProcessor = (e) => {
|
|
5804
|
+
ja = e;
|
|
5778
5805
|
};
|
|
5779
|
-
var
|
|
5780
|
-
|
|
5781
|
-
var
|
|
5806
|
+
var qa = Va;
|
|
5807
|
+
Va.default = Va;
|
|
5808
|
+
var Za = { nanoid: (e = 21) => {
|
|
5782
5809
|
let a = "", u = 0 | e;
|
|
5783
5810
|
for (; u--; ) a += "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64 * Math.random() | 0];
|
|
5784
5811
|
return a;
|
|
5785
5812
|
} };
|
|
5786
|
-
let { existsSync:
|
|
5787
|
-
let
|
|
5813
|
+
let { existsSync: Ka, readFileSync: Ja } = ra, { dirname: Ya, join: Qa } = ra, { SourceMapConsumer: el, SourceMapGenerator: tl } = ra;
|
|
5814
|
+
let nl = class {
|
|
5788
5815
|
constructor(e, a) {
|
|
5789
5816
|
if (false === a.map) return;
|
|
5790
5817
|
this.loadAnnotation(e), this.inline = this.startWith(this.annotation, "data:");
|
|
5791
5818
|
let u = a.map ? a.map.prev : void 0, m2 = this.loadMap(a.from, u);
|
|
5792
|
-
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root =
|
|
5819
|
+
!this.mapFile && a.from && (this.mapFile = a.from), this.mapFile && (this.root = Ya(this.mapFile)), m2 && (this.text = m2);
|
|
5793
5820
|
}
|
|
5794
5821
|
consumer() {
|
|
5795
|
-
return this.consumerCache || (this.consumerCache = new
|
|
5822
|
+
return this.consumerCache || (this.consumerCache = new el(this.text)), this.consumerCache;
|
|
5796
5823
|
}
|
|
5797
5824
|
decodeInline(e) {
|
|
5798
5825
|
let a = e.match(/^data:application\/json;charset=utf-?8,/) || e.match(/^data:application\/json,/);
|
|
@@ -5817,15 +5844,15 @@ let ol = class {
|
|
|
5817
5844
|
u > -1 && m2 > -1 && (this.annotation = this.getAnnotationURL(e.substring(u, m2)));
|
|
5818
5845
|
}
|
|
5819
5846
|
loadFile(e) {
|
|
5820
|
-
if (this.root =
|
|
5847
|
+
if (this.root = Ya(e), Ka(e)) return this.mapFile = e, Ja(e, "utf-8").toString().trim();
|
|
5821
5848
|
}
|
|
5822
5849
|
loadMap(e, a) {
|
|
5823
5850
|
if (false === a) return false;
|
|
5824
5851
|
if (a) {
|
|
5825
5852
|
if ("string" == typeof a) return a;
|
|
5826
5853
|
if ("function" != typeof a) {
|
|
5827
|
-
if (a instanceof
|
|
5828
|
-
if (a instanceof
|
|
5854
|
+
if (a instanceof el) return tl.fromSourceMap(a).toString();
|
|
5855
|
+
if (a instanceof tl) return a.toString();
|
|
5829
5856
|
if (this.isMap(a)) return JSON.stringify(a);
|
|
5830
5857
|
throw new Error("Unsupported previous source map format: " + a.toString());
|
|
5831
5858
|
}
|
|
@@ -5841,7 +5868,7 @@ let ol = class {
|
|
|
5841
5868
|
if (this.inline) return this.decodeInline(this.annotation);
|
|
5842
5869
|
if (this.annotation) {
|
|
5843
5870
|
let a2 = this.annotation;
|
|
5844
|
-
return e && (a2 =
|
|
5871
|
+
return e && (a2 = Qa(Ya(e), a2)), this.loadFile(a2);
|
|
5845
5872
|
}
|
|
5846
5873
|
}
|
|
5847
5874
|
}
|
|
@@ -5852,23 +5879,23 @@ let ol = class {
|
|
|
5852
5879
|
return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);
|
|
5853
5880
|
}
|
|
5854
5881
|
};
|
|
5855
|
-
var
|
|
5856
|
-
|
|
5857
|
-
let { nanoid:
|
|
5882
|
+
var rl = nl;
|
|
5883
|
+
nl.default = nl;
|
|
5884
|
+
let { nanoid: ol } = Za, { isAbsolute: sl, resolve: il } = ra, { SourceMapConsumer: al, SourceMapGenerator: ll } = ra, { fileURLToPath: cl, pathToFileURL: ul } = ra, pl = aa, dl = rl, hl = ra, fl = Symbol("fromOffsetCache"), ml = !(!al || !ll), gl = !(!il || !sl), yl = class {
|
|
5858
5885
|
get from() {
|
|
5859
5886
|
return this.file || this.id;
|
|
5860
5887
|
}
|
|
5861
5888
|
constructor(e, a = {}) {
|
|
5862
5889
|
if (null === e || typeof e > "u" || "object" == typeof e && !e.toString) throw new Error(`PostCSS received ${e} instead of CSS string`);
|
|
5863
|
-
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 && (!
|
|
5864
|
-
let e2 = new
|
|
5890
|
+
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 && (!gl || /^\w+:\/\//.test(a.from) || sl(a.from) ? this.file = a.from : this.file = il(a.from)), gl && ml) {
|
|
5891
|
+
let e2 = new dl(this.css, a);
|
|
5865
5892
|
if (e2.text) {
|
|
5866
5893
|
this.map = e2;
|
|
5867
5894
|
let a2 = e2.consumer().file;
|
|
5868
5895
|
!this.file && a2 && (this.file = this.mapResolve(a2));
|
|
5869
5896
|
}
|
|
5870
5897
|
}
|
|
5871
|
-
this.file || (this.id = "<input css " +
|
|
5898
|
+
this.file || (this.id = "<input css " + ol(6) + ">"), this.map && (this.map.file = this.from);
|
|
5872
5899
|
}
|
|
5873
5900
|
error(e, a, u, m2 = {}) {
|
|
5874
5901
|
let w2, b2, C2;
|
|
@@ -5887,17 +5914,17 @@ let { nanoid: il } = Ja, { isAbsolute: al, resolve: ll } = sa, { SourceMapConsum
|
|
|
5887
5914
|
a = e2.line, u = e2.col;
|
|
5888
5915
|
}
|
|
5889
5916
|
let x2 = this.origin(a, u, b2, w2);
|
|
5890
|
-
return C2 = x2 ? new
|
|
5917
|
+
return C2 = x2 ? new pl(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 pl(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 && (ul && (C2.input.url = ul(this.file).toString()), C2.input.file = this.file), C2;
|
|
5891
5918
|
}
|
|
5892
5919
|
fromOffset(e) {
|
|
5893
5920
|
let a, u;
|
|
5894
|
-
if (this[
|
|
5921
|
+
if (this[fl]) u = this[fl];
|
|
5895
5922
|
else {
|
|
5896
5923
|
let e2 = this.css.split("\n");
|
|
5897
5924
|
u = new Array(e2.length);
|
|
5898
5925
|
let a2 = 0;
|
|
5899
5926
|
for (let m3 = 0, w2 = e2.length; m3 < w2; m3++) u[m3] = a2, a2 += e2[m3].length + 1;
|
|
5900
|
-
this[
|
|
5927
|
+
this[fl] = u;
|
|
5901
5928
|
}
|
|
5902
5929
|
a = u[u.length - 1];
|
|
5903
5930
|
let m2 = 0;
|
|
@@ -5916,17 +5943,17 @@ let { nanoid: il } = Ja, { isAbsolute: al, resolve: ll } = sa, { SourceMapConsum
|
|
|
5916
5943
|
return { col: e - u[m2] + 1, line: m2 + 1 };
|
|
5917
5944
|
}
|
|
5918
5945
|
mapResolve(e) {
|
|
5919
|
-
return /^\w+:\/\//.test(e) ? e :
|
|
5946
|
+
return /^\w+:\/\//.test(e) ? e : il(this.map.consumer().sourceRoot || this.map.root || ".", e);
|
|
5920
5947
|
}
|
|
5921
5948
|
origin(e, a, u, m2) {
|
|
5922
5949
|
if (!this.map) return false;
|
|
5923
5950
|
let w2, b2, C2 = this.map.consumer(), x2 = C2.originalPositionFor({ column: a, line: e });
|
|
5924
5951
|
if (!x2.source) return false;
|
|
5925
|
-
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 =
|
|
5952
|
+
"number" == typeof u && (w2 = C2.originalPositionFor({ column: m2, line: u })), b2 = sl(x2.source) ? ul(x2.source) : new URL(x2.source, this.map.consumer().sourceRoot || ul(this.map.mapFile));
|
|
5926
5953
|
let I2 = { column: x2.column, endColumn: w2 && w2.column, endLine: w2 && w2.line, line: x2.line, url: b2.toString() };
|
|
5927
5954
|
if ("file:" === b2.protocol) {
|
|
5928
|
-
if (!
|
|
5929
|
-
I2.file =
|
|
5955
|
+
if (!cl) throw new Error("file: protocol is not available in this PostCSS build");
|
|
5956
|
+
I2.file = cl(b2);
|
|
5930
5957
|
}
|
|
5931
5958
|
let _2 = C2.sourceContentFor(x2.source);
|
|
5932
5959
|
return _2 && (I2.source = _2), I2;
|
|
@@ -5937,9 +5964,9 @@ let { nanoid: il } = Ja, { isAbsolute: al, resolve: ll } = sa, { SourceMapConsum
|
|
|
5937
5964
|
return this.map && (e.map = { ...this.map }, e.map.consumerCache && (e.map.consumerCache = void 0)), e;
|
|
5938
5965
|
}
|
|
5939
5966
|
};
|
|
5940
|
-
var
|
|
5941
|
-
|
|
5942
|
-
let
|
|
5967
|
+
var wl = yl;
|
|
5968
|
+
yl.default = yl, hl && hl.registerInput && hl.registerInput(yl);
|
|
5969
|
+
let Sl, bl, vl = Ua, Cl = class extends vl {
|
|
5943
5970
|
constructor(e) {
|
|
5944
5971
|
super(e), this.type = "root", this.nodes || (this.nodes = []);
|
|
5945
5972
|
}
|
|
@@ -5956,29 +5983,29 @@ let vl, Cl, kl = $a, xl = class extends kl {
|
|
|
5956
5983
|
return !a && 0 === u && this.nodes.length > 1 && (this.nodes[1].raws.before = this.nodes[u].raws.before), super.removeChild(e);
|
|
5957
5984
|
}
|
|
5958
5985
|
toResult(e = {}) {
|
|
5959
|
-
return new
|
|
5986
|
+
return new Sl(new bl(), this, e).stringify();
|
|
5960
5987
|
}
|
|
5961
5988
|
};
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
},
|
|
5965
|
-
|
|
5989
|
+
Cl.registerLazyResult = (e) => {
|
|
5990
|
+
Sl = e;
|
|
5991
|
+
}, Cl.registerProcessor = (e) => {
|
|
5992
|
+
bl = e;
|
|
5966
5993
|
};
|
|
5967
|
-
var
|
|
5968
|
-
|
|
5969
|
-
let
|
|
5994
|
+
var kl = Cl;
|
|
5995
|
+
Cl.default = Cl, vl.registerRoot(Cl);
|
|
5996
|
+
let xl = { comma: (e) => xl.split(e, [","], true), space(e) {
|
|
5970
5997
|
let a = [" ", "\n", " "];
|
|
5971
|
-
return
|
|
5998
|
+
return xl.split(e, a);
|
|
5972
5999
|
}, split(e, a, u) {
|
|
5973
6000
|
let m2 = [], w2 = "", b2 = false, C2 = 0, x2 = false, I2 = "", _2 = false;
|
|
5974
6001
|
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;
|
|
5975
6002
|
return (u || "" !== w2) && m2.push(w2.trim()), m2;
|
|
5976
6003
|
} };
|
|
5977
|
-
var
|
|
5978
|
-
|
|
5979
|
-
let
|
|
6004
|
+
var Ml = xl;
|
|
6005
|
+
xl.default = xl;
|
|
6006
|
+
let Il = Ua, Ol = Ml, El = class extends Il {
|
|
5980
6007
|
get selectors() {
|
|
5981
|
-
return
|
|
6008
|
+
return Ol.comma(this.selector);
|
|
5982
6009
|
}
|
|
5983
6010
|
set selectors(e) {
|
|
5984
6011
|
let a = this.selector ? this.selector.match(/,\s*/) : null, u = a ? a[0] : "," + this.raw("between", "beforeOpen");
|
|
@@ -5988,34 +6015,34 @@ let El = $a, Ll = Ol, Rl = class extends El {
|
|
|
5988
6015
|
super(e), this.type = "rule", this.nodes || (this.nodes = []);
|
|
5989
6016
|
}
|
|
5990
6017
|
};
|
|
5991
|
-
var
|
|
5992
|
-
|
|
5993
|
-
let
|
|
6018
|
+
var Ll = El;
|
|
6019
|
+
El.default = El, Il.registerRule(El);
|
|
6020
|
+
let Rl = Wa, Al = xa, Tl = _a, Nl = wl, Pl = rl, Dl = kl, Jl = Ll;
|
|
5994
6021
|
function Ke(e, a) {
|
|
5995
6022
|
if (Array.isArray(e)) return e.map((e2) => Ke(e2));
|
|
5996
6023
|
let { inputs: u, ...m2 } = e;
|
|
5997
6024
|
if (u) {
|
|
5998
6025
|
a = [];
|
|
5999
6026
|
for (let e2 of u) {
|
|
6000
|
-
let u2 = { ...e2, __proto__:
|
|
6001
|
-
u2.map && (u2.map = { ...u2.map, __proto__:
|
|
6027
|
+
let u2 = { ...e2, __proto__: Nl.prototype };
|
|
6028
|
+
u2.map && (u2.map = { ...u2.map, __proto__: Pl.prototype }), a.push(u2);
|
|
6002
6029
|
}
|
|
6003
6030
|
}
|
|
6004
6031
|
if (m2.nodes && (m2.nodes = e.nodes.map((e2) => Ke(e2, a))), m2.source) {
|
|
6005
6032
|
let { inputId: e2, ...u2 } = m2.source;
|
|
6006
6033
|
m2.source = u2, null != e2 && (m2.source.input = a[e2]);
|
|
6007
6034
|
}
|
|
6008
|
-
if ("root" === m2.type) return new
|
|
6009
|
-
if ("decl" === m2.type) return new
|
|
6010
|
-
if ("rule" === m2.type) return new
|
|
6011
|
-
if ("comment" === m2.type) return new
|
|
6012
|
-
if ("atrule" === m2.type) return new
|
|
6035
|
+
if ("root" === m2.type) return new Dl(m2);
|
|
6036
|
+
if ("decl" === m2.type) return new Tl(m2);
|
|
6037
|
+
if ("rule" === m2.type) return new Jl(m2);
|
|
6038
|
+
if ("comment" === m2.type) return new Al(m2);
|
|
6039
|
+
if ("atrule" === m2.type) return new Rl(m2);
|
|
6013
6040
|
throw new Error("Unknown node type: " + e.type);
|
|
6014
6041
|
}
|
|
6015
|
-
var
|
|
6042
|
+
var ec = Ke;
|
|
6016
6043
|
Ke.default = Ke;
|
|
6017
|
-
let { dirname:
|
|
6018
|
-
var
|
|
6044
|
+
let { dirname: tc, relative: nc, resolve: rc, sep: oc } = ra, { SourceMapConsumer: sc, SourceMapGenerator: ic } = ra, { pathToFileURL: ac } = ra, lc = wl, cc = !(!sc || !ic), uc = !!(tc && rc && nc && oc);
|
|
6045
|
+
var pc = class {
|
|
6019
6046
|
constructor(e, a, u, m2) {
|
|
6020
6047
|
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();
|
|
6021
6048
|
}
|
|
@@ -6027,8 +6054,8 @@ var hc = class {
|
|
|
6027
6054
|
}
|
|
6028
6055
|
applyPrevMaps() {
|
|
6029
6056
|
for (let e of this.previous()) {
|
|
6030
|
-
let a, u = this.toUrl(this.path(e.file)), m2 = e.root ||
|
|
6031
|
-
false === this.mapOpts.sourcesContent ? (a = new
|
|
6057
|
+
let a, u = this.toUrl(this.path(e.file)), m2 = e.root || tc(e.file);
|
|
6058
|
+
false === this.mapOpts.sourcesContent ? (a = new sc(e.text), a.sourcesContent && (a.sourcesContent = null)) : a = e.consumer(), this.map.applySourceMap(a, u, this.toUrl(this.path(m2)));
|
|
6032
6059
|
}
|
|
6033
6060
|
}
|
|
6034
6061
|
clearAnnotation() {
|
|
@@ -6038,7 +6065,7 @@ var hc = class {
|
|
|
6038
6065
|
} else this.css && (this.css = this.css.replace(/\n*\/\*#[\S\s]*?\*\/$/gm, ""));
|
|
6039
6066
|
}
|
|
6040
6067
|
generate() {
|
|
6041
|
-
if (this.clearAnnotation(),
|
|
6068
|
+
if (this.clearAnnotation(), uc && cc && this.isMap()) return this.generateMap();
|
|
6042
6069
|
{
|
|
6043
6070
|
let e = "";
|
|
6044
6071
|
return this.stringify(this.root, (a) => {
|
|
@@ -6050,12 +6077,12 @@ var hc = class {
|
|
|
6050
6077
|
if (this.root) this.generateString();
|
|
6051
6078
|
else if (1 === this.previous().length) {
|
|
6052
6079
|
let e = this.previous()[0].consumer();
|
|
6053
|
-
e.file = this.outputFile(), this.map =
|
|
6054
|
-
} else this.map = new
|
|
6080
|
+
e.file = this.outputFile(), this.map = ic.fromSourceMap(e, { ignoreInvalidMapping: true });
|
|
6081
|
+
} else this.map = new ic({ 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>" });
|
|
6055
6082
|
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];
|
|
6056
6083
|
}
|
|
6057
6084
|
generateString() {
|
|
6058
|
-
this.css = "", this.map = new
|
|
6085
|
+
this.css = "", this.map = new ic({ file: this.outputFile(), ignoreInvalidMapping: true });
|
|
6059
6086
|
let e, a, u = 1, m2 = 1, w2 = "<no source>", b2 = { generated: { column: 0, line: 0 }, original: { column: 0, line: 0 }, source: "" };
|
|
6060
6087
|
this.stringify(this.root, (C2, x2, I2) => {
|
|
6061
6088
|
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) {
|
|
@@ -6085,9 +6112,9 @@ var hc = class {
|
|
|
6085
6112
|
if (this.mapOpts.absolute || 60 === e.charCodeAt(0) || /^\w+:\/\//.test(e)) return e;
|
|
6086
6113
|
let a = this.memoizedPaths.get(e);
|
|
6087
6114
|
if (a) return a;
|
|
6088
|
-
let u = this.opts.to ?
|
|
6089
|
-
"string" == typeof this.mapOpts.annotation && (u = rc(
|
|
6090
|
-
let m2 =
|
|
6115
|
+
let u = this.opts.to ? tc(this.opts.to) : ".";
|
|
6116
|
+
"string" == typeof this.mapOpts.annotation && (u = tc(rc(u, this.mapOpts.annotation)));
|
|
6117
|
+
let m2 = nc(u, e);
|
|
6091
6118
|
return this.memoizedPaths.set(e, m2), m2;
|
|
6092
6119
|
}
|
|
6093
6120
|
previous() {
|
|
@@ -6098,7 +6125,7 @@ var hc = class {
|
|
|
6098
6125
|
}
|
|
6099
6126
|
});
|
|
6100
6127
|
else {
|
|
6101
|
-
let e = new
|
|
6128
|
+
let e = new lc(this.originalCSS, this.opts);
|
|
6102
6129
|
e.map && this.previousMaps.push(e.map);
|
|
6103
6130
|
}
|
|
6104
6131
|
return this.previousMaps;
|
|
@@ -6129,8 +6156,8 @@ var hc = class {
|
|
|
6129
6156
|
toFileUrl(e) {
|
|
6130
6157
|
let a = this.memoizedFileURLs.get(e);
|
|
6131
6158
|
if (a) return a;
|
|
6132
|
-
if (
|
|
6133
|
-
let a2 =
|
|
6159
|
+
if (ac) {
|
|
6160
|
+
let a2 = ac(e).toString();
|
|
6134
6161
|
return this.memoizedFileURLs.set(e, a2), a2;
|
|
6135
6162
|
}
|
|
6136
6163
|
throw new Error("`map.absolute` option is not available in this PostCSS build");
|
|
@@ -6138,13 +6165,13 @@ var hc = class {
|
|
|
6138
6165
|
toUrl(e) {
|
|
6139
6166
|
let a = this.memoizedURLs.get(e);
|
|
6140
6167
|
if (a) return a;
|
|
6141
|
-
"\\" ===
|
|
6168
|
+
"\\" === oc && (e = e.replace(/\\/g, "/"));
|
|
6142
6169
|
let u = encodeURI(e).replace(/[#?]/g, encodeURIComponent);
|
|
6143
6170
|
return this.memoizedURLs.set(e, u), u;
|
|
6144
6171
|
}
|
|
6145
6172
|
};
|
|
6146
|
-
const
|
|
6147
|
-
let
|
|
6173
|
+
const dc = /[\t\n\f\r "#'()/;[\\\]{}]/g, hc = /[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g, fc = /.[\r\n"'(/\\]/, mc = /[\da-f]/i;
|
|
6174
|
+
let gc = Wa, yc = xa, wc = _a, Sc = kl, bc = Ll, kc = function(e, a = {}) {
|
|
6148
6175
|
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 = [];
|
|
6149
6176
|
function y2(a2) {
|
|
6150
6177
|
throw e.error("Unclosed " + a2, B2);
|
|
@@ -6194,7 +6221,7 @@ let wc = ja, Sc = Ia, bc = Ea, vc = Ml, xc = Al, kc = function(e, a = {}) {
|
|
|
6194
6221
|
for (_2 = b2; 92 === D2.charCodeAt(_2 - 1); ) _2 -= 1, I2 = !I2;
|
|
6195
6222
|
} while (I2);
|
|
6196
6223
|
x2 = ["brackets", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6197
|
-
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 ||
|
|
6224
|
+
} else b2 = D2.indexOf(")", B2 + 1), m2 = D2.slice(B2, b2 + 1), -1 === b2 || fc.test(m2) ? x2 = ["(", "(", B2] : (x2 = ["brackets", m2, B2, b2], B2 = b2);
|
|
6198
6225
|
break;
|
|
6199
6226
|
case 39:
|
|
6200
6227
|
case 34:
|
|
@@ -6212,31 +6239,31 @@ let wc = ja, Sc = Ia, bc = Ea, vc = Ml, xc = Al, kc = function(e, a = {}) {
|
|
|
6212
6239
|
x2 = ["string", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6213
6240
|
break;
|
|
6214
6241
|
case 64:
|
|
6215
|
-
|
|
6242
|
+
dc.lastIndex = B2 + 1, dc.test(D2), b2 = 0 === dc.lastIndex ? D2.length - 1 : dc.lastIndex - 2, x2 = ["at-word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6216
6243
|
break;
|
|
6217
6244
|
case 92:
|
|
6218
6245
|
for (b2 = B2, w2 = true; 92 === D2.charCodeAt(b2 + 1); ) b2 += 1, w2 = !w2;
|
|
6219
|
-
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1,
|
|
6220
|
-
for (;
|
|
6246
|
+
if (u = D2.charCodeAt(b2 + 1), w2 && 47 !== u && 32 !== u && 10 !== u && 9 !== u && 13 !== u && 12 !== u && (b2 += 1, mc.test(D2.charAt(b2)))) {
|
|
6247
|
+
for (; mc.test(D2.charAt(b2 + 1)); ) b2 += 1;
|
|
6221
6248
|
32 === D2.charCodeAt(b2 + 1) && (b2 += 1);
|
|
6222
6249
|
}
|
|
6223
6250
|
x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], B2 = b2;
|
|
6224
6251
|
break;
|
|
6225
6252
|
default:
|
|
6226
|
-
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) : (
|
|
6253
|
+
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) : (hc.lastIndex = B2 + 1, hc.test(D2), b2 = 0 === hc.lastIndex ? D2.length - 1 : hc.lastIndex - 2, x2 = ["word", D2.slice(B2, b2 + 1), B2, b2], $2.push(x2), B2 = b2);
|
|
6227
6254
|
}
|
|
6228
6255
|
return B2++, x2;
|
|
6229
6256
|
}, position: function S() {
|
|
6230
6257
|
return B2;
|
|
6231
6258
|
} };
|
|
6232
6259
|
};
|
|
6233
|
-
const
|
|
6234
|
-
var
|
|
6260
|
+
const vc = { empty: true, space: true };
|
|
6261
|
+
var xc = class {
|
|
6235
6262
|
constructor(e) {
|
|
6236
|
-
this.input = e, this.root = new
|
|
6263
|
+
this.input = e, this.root = new Sc(), this.current = this.root, this.spaces = "", this.semicolon = false, this.createTokenizer(), this.root.source = { input: e, start: { column: 1, line: 1, offset: 0 } };
|
|
6237
6264
|
}
|
|
6238
6265
|
atrule(e) {
|
|
6239
|
-
let a = new
|
|
6266
|
+
let a = new gc();
|
|
6240
6267
|
a.name = e[1].slice(1), "" === a.name && this.unnamedAtrule(a, e), this.init(a, e[2]);
|
|
6241
6268
|
let u, m2, w2, b2 = false, C2 = false, x2 = [], I2 = [];
|
|
6242
6269
|
for (; !this.tokenizer.endOfFile(); ) {
|
|
@@ -6288,7 +6315,7 @@ var Ic = class {
|
|
|
6288
6315
|
return false;
|
|
6289
6316
|
}
|
|
6290
6317
|
comment(e) {
|
|
6291
|
-
let a = new
|
|
6318
|
+
let a = new yc();
|
|
6292
6319
|
this.init(a, e[2]), a.source.end = this.getPosition(e[3] || e[2]), a.source.end.offset++;
|
|
6293
6320
|
let u = e[1].slice(2, -2);
|
|
6294
6321
|
if (/^\s*$/.test(u)) a.text = "", a.raws.left = u, a.raws.right = "";
|
|
@@ -6301,7 +6328,7 @@ var Ic = class {
|
|
|
6301
6328
|
this.tokenizer = kc(this.input);
|
|
6302
6329
|
}
|
|
6303
6330
|
decl(e, a) {
|
|
6304
|
-
let u = new
|
|
6331
|
+
let u = new wc();
|
|
6305
6332
|
this.init(u, e[0][2]);
|
|
6306
6333
|
let m2, w2 = e[e.length - 1];
|
|
6307
6334
|
for (";" === w2[0] && (this.semicolon = true, e.pop()), u.source.end = this.getPosition(w2[3] || w2[2] || (function Cc(e2) {
|
|
@@ -6350,7 +6377,7 @@ var Ic = class {
|
|
|
6350
6377
|
throw this.input.error("Double colon", { offset: e[2] }, { offset: e[2] + e[1].length });
|
|
6351
6378
|
}
|
|
6352
6379
|
emptyRule(e) {
|
|
6353
|
-
let a = new
|
|
6380
|
+
let a = new bc();
|
|
6354
6381
|
this.init(a, e[2]), a.selector = "", a.raws.between = "", this.current = a;
|
|
6355
6382
|
}
|
|
6356
6383
|
end(e) {
|
|
@@ -6426,7 +6453,7 @@ var Ic = class {
|
|
|
6426
6453
|
}
|
|
6427
6454
|
raw(e, a, u, m2) {
|
|
6428
6455
|
let w2, b2, C2, x2, I2 = u.length, _2 = "", O2 = true;
|
|
6429
|
-
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",
|
|
6456
|
+
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", vc[x2] || vc[C2] || "," === _2.slice(-1) ? O2 = false : _2 += w2[1]) : _2 += w2[1] : O2 = false;
|
|
6430
6457
|
if (!O2) {
|
|
6431
6458
|
let m3 = u.reduce((e2, a2) => e2 + a2[1], "");
|
|
6432
6459
|
e.raws[a] = { raw: m3, value: _2 };
|
|
@@ -6435,7 +6462,7 @@ var Ic = class {
|
|
|
6435
6462
|
}
|
|
6436
6463
|
rule(e) {
|
|
6437
6464
|
e.pop();
|
|
6438
|
-
let a = new
|
|
6465
|
+
let a = new bc();
|
|
6439
6466
|
this.init(a, e[0][2]), a.raws.between = this.spacesAndCommentsFromEnd(e), this.raw(a, "selector", e), this.current = a;
|
|
6440
6467
|
}
|
|
6441
6468
|
spacesAndCommentsFromEnd(e) {
|
|
@@ -6475,9 +6502,9 @@ var Ic = class {
|
|
|
6475
6502
|
throw this.input.error("At-rule without name", { offset: a[2] }, { offset: a[2] + a[1].length });
|
|
6476
6503
|
}
|
|
6477
6504
|
};
|
|
6478
|
-
let
|
|
6505
|
+
let Mc = Ua, Ic = wl, _c = xc;
|
|
6479
6506
|
function Gt(e, a) {
|
|
6480
|
-
let u = new
|
|
6507
|
+
let u = new Ic(e, a), m2 = new _c(u);
|
|
6481
6508
|
try {
|
|
6482
6509
|
m2.parse();
|
|
6483
6510
|
} catch (e2) {
|
|
@@ -6485,9 +6512,9 @@ function Gt(e, a) {
|
|
|
6485
6512
|
}
|
|
6486
6513
|
return m2.root;
|
|
6487
6514
|
}
|
|
6488
|
-
var
|
|
6489
|
-
Gt.default = Gt,
|
|
6490
|
-
let
|
|
6515
|
+
var Oc = Gt;
|
|
6516
|
+
Gt.default = Gt, Mc.registerParse(Gt);
|
|
6517
|
+
let Ec = class {
|
|
6491
6518
|
constructor(e, a = {}) {
|
|
6492
6519
|
if (this.type = "warning", this.text = e, a.node && a.node.source) {
|
|
6493
6520
|
let e2 = a.node.rangeBy(a);
|
|
@@ -6499,9 +6526,9 @@ let Rc = class {
|
|
|
6499
6526
|
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;
|
|
6500
6527
|
}
|
|
6501
6528
|
};
|
|
6502
|
-
var
|
|
6503
|
-
|
|
6504
|
-
let
|
|
6529
|
+
var Lc = Ec;
|
|
6530
|
+
Ec.default = Ec;
|
|
6531
|
+
let Rc = Lc, Ac = class {
|
|
6505
6532
|
get content() {
|
|
6506
6533
|
return this.css;
|
|
6507
6534
|
}
|
|
@@ -6513,26 +6540,26 @@ let Tc = Ac, Nc = class {
|
|
|
6513
6540
|
}
|
|
6514
6541
|
warn(e, a = {}) {
|
|
6515
6542
|
a.plugin || this.lastPlugin && this.lastPlugin.postcssPlugin && (a.plugin = this.lastPlugin.postcssPlugin);
|
|
6516
|
-
let u = new
|
|
6543
|
+
let u = new Rc(e, a);
|
|
6517
6544
|
return this.messages.push(u), u;
|
|
6518
6545
|
}
|
|
6519
6546
|
warnings() {
|
|
6520
6547
|
return this.messages.filter((e) => "warning" === e.type);
|
|
6521
6548
|
}
|
|
6522
6549
|
};
|
|
6523
|
-
var
|
|
6524
|
-
|
|
6525
|
-
let
|
|
6550
|
+
var Tc = Ac;
|
|
6551
|
+
Ac.default = Ac;
|
|
6552
|
+
let Nc = {};
|
|
6526
6553
|
var ni = function(e) {
|
|
6527
|
-
|
|
6554
|
+
Nc[e] || (Nc[e] = true, typeof console < "u" && console.warn && console.warn(e));
|
|
6528
6555
|
};
|
|
6529
|
-
let
|
|
6530
|
-
const
|
|
6556
|
+
let Pc = Ua, Dc = qa, Fc = pc, Uc = Oc, Bc = Tc, $c = kl, Wc = ha, { isClean: zc, my: jc } = fa, Gc = ni;
|
|
6557
|
+
const Vc = { atrule: "AtRule", comment: "Comment", decl: "Declaration", document: "Document", root: "Root", rule: "Rule" }, qc = { 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 }, Hc = { Once: true, postcssPlugin: true, prepare: true };
|
|
6531
6558
|
function _e(e) {
|
|
6532
6559
|
return "object" == typeof e && "function" == typeof e.then;
|
|
6533
6560
|
}
|
|
6534
6561
|
function ri(e) {
|
|
6535
|
-
let a = false, u =
|
|
6562
|
+
let a = false, u = Vc[e.type];
|
|
6536
6563
|
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"];
|
|
6537
6564
|
}
|
|
6538
6565
|
function br(e) {
|
|
@@ -6540,9 +6567,9 @@ function br(e) {
|
|
|
6540
6567
|
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: [] };
|
|
6541
6568
|
}
|
|
6542
6569
|
function Js(e) {
|
|
6543
|
-
return e[
|
|
6570
|
+
return e[zc] = false, e.nodes && e.nodes.forEach((e2) => Js(e2)), e;
|
|
6544
6571
|
}
|
|
6545
|
-
let
|
|
6572
|
+
let Zc = {}, Kc = class oi {
|
|
6546
6573
|
get content() {
|
|
6547
6574
|
return this.stringify().content;
|
|
6548
6575
|
}
|
|
@@ -6569,19 +6596,19 @@ let Jc = {}, Yc = class oi {
|
|
|
6569
6596
|
}
|
|
6570
6597
|
constructor(e, a, u) {
|
|
6571
6598
|
let m2;
|
|
6572
|
-
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof
|
|
6599
|
+
if (this.stringified = false, this.processed = false, "object" != typeof a || null === a || "root" !== a.type && "document" !== a.type) if (a instanceof oi || a instanceof Bc) m2 = Js(a.root), a.map && (typeof u.map > "u" && (u.map = {}), u.map.inline || (u.map.inline = false), u.map.prev = a.map);
|
|
6573
6600
|
else {
|
|
6574
|
-
let e2 =
|
|
6601
|
+
let e2 = Uc;
|
|
6575
6602
|
u.syntax && (e2 = u.syntax.parse), u.parser && (e2 = u.parser), e2.parse && (e2 = e2.parse);
|
|
6576
6603
|
try {
|
|
6577
6604
|
m2 = e2(a, u);
|
|
6578
6605
|
} catch (e3) {
|
|
6579
6606
|
this.processed = true, this.error = e3;
|
|
6580
6607
|
}
|
|
6581
|
-
m2 && !m2[
|
|
6608
|
+
m2 && !m2[jc] && Pc.rebuild(m2);
|
|
6582
6609
|
}
|
|
6583
6610
|
else m2 = Js(a);
|
|
6584
|
-
this.result = new
|
|
6611
|
+
this.result = new Bc(e, m2, u), this.helpers = { ...Zc, postcss: Zc, result: this.result }, this.plugins = this.processor.plugins.map((e2) => "object" == typeof e2 && e2.prepare ? { ...e2, ...e2.prepare(this.result) } : e2);
|
|
6585
6612
|
}
|
|
6586
6613
|
async() {
|
|
6587
6614
|
return this.error ? Promise.reject(this.error) : this.processed ? Promise.resolve(this.result) : (this.processing || (this.processing = this.runAsync()), this.processing);
|
|
@@ -6615,8 +6642,8 @@ let Jc = {}, Yc = class oi {
|
|
|
6615
6642
|
this.listeners[a] || (this.listeners[a] = []), this.listeners[a].push([e, u]);
|
|
6616
6643
|
};
|
|
6617
6644
|
for (let e of this.plugins) if ("object" == typeof e) for (let a in e) {
|
|
6618
|
-
if (!
|
|
6619
|
-
if (!
|
|
6645
|
+
if (!qc[a] && /^[A-Z]/.test(a)) throw new Error(`Unknown event ${a} in ${e.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);
|
|
6646
|
+
if (!Hc[a]) if ("object" == typeof e[a]) for (let u in e[a]) t(e, "*" === u ? a : a + "-" + u.toLowerCase(), e[a][u]);
|
|
6620
6647
|
else "function" == typeof e[a] && t(e, a, e[a]);
|
|
6621
6648
|
}
|
|
6622
6649
|
this.hasListener = Object.keys(this.listeners).length > 0;
|
|
@@ -6633,8 +6660,8 @@ let Jc = {}, Yc = class oi {
|
|
|
6633
6660
|
}
|
|
6634
6661
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6635
6662
|
let e = this.result.root;
|
|
6636
|
-
for (; !e[
|
|
6637
|
-
e[
|
|
6663
|
+
for (; !e[zc]; ) {
|
|
6664
|
+
e[zc] = true;
|
|
6638
6665
|
let a = [br(e)];
|
|
6639
6666
|
for (; a.length > 0; ) {
|
|
6640
6667
|
let e2 = this.visitTick(a);
|
|
@@ -6679,9 +6706,9 @@ let Jc = {}, Yc = class oi {
|
|
|
6679
6706
|
if (this.error) throw this.error;
|
|
6680
6707
|
if (this.stringified) return this.result;
|
|
6681
6708
|
this.stringified = true, this.sync();
|
|
6682
|
-
let e = this.result.opts, a =
|
|
6709
|
+
let e = this.result.opts, a = Wc;
|
|
6683
6710
|
e.syntax && (a = e.syntax.stringify), e.stringifier && (a = e.stringifier), a.stringify && (a = a.stringify);
|
|
6684
|
-
let u = new
|
|
6711
|
+
let u = new Fc(a, this.result.root, this.result.opts).generate();
|
|
6685
6712
|
return this.result.css = u[0], this.result.map = u[1], this.result;
|
|
6686
6713
|
}
|
|
6687
6714
|
sync() {
|
|
@@ -6693,14 +6720,14 @@ let Jc = {}, Yc = class oi {
|
|
|
6693
6720
|
}
|
|
6694
6721
|
if (this.prepareVisitors(), this.hasListener) {
|
|
6695
6722
|
let e = this.result.root;
|
|
6696
|
-
for (; !e[
|
|
6723
|
+
for (; !e[zc]; ) e[zc] = true, this.walkSync(e);
|
|
6697
6724
|
if (this.listeners.OnceExit) if ("document" === e.type) for (let a of e.nodes) this.visitSync(this.listeners.OnceExit, a);
|
|
6698
6725
|
else this.visitSync(this.listeners.OnceExit, e);
|
|
6699
6726
|
}
|
|
6700
6727
|
return this.result;
|
|
6701
6728
|
}
|
|
6702
6729
|
then(e, a) {
|
|
6703
|
-
return "production" !== process.env.NODE_ENV && ("from" in this.opts ||
|
|
6730
|
+
return "production" !== process.env.NODE_ENV && ("from" in this.opts || Gc("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")), this.async().then(e, a);
|
|
6704
6731
|
}
|
|
6705
6732
|
toString() {
|
|
6706
6733
|
return this.css;
|
|
@@ -6732,22 +6759,22 @@ let Jc = {}, Yc = class oi {
|
|
|
6732
6759
|
}
|
|
6733
6760
|
if (0 !== a.iterator) {
|
|
6734
6761
|
let m3, w3 = a.iterator;
|
|
6735
|
-
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[
|
|
6762
|
+
for (; m3 = u.nodes[u.indexes[w3]]; ) if (u.indexes[w3] += 1, !m3[zc]) return m3[zc] = true, void e.push(br(m3));
|
|
6736
6763
|
a.iterator = 0, delete u.indexes[w3];
|
|
6737
6764
|
}
|
|
6738
6765
|
let w2 = a.events;
|
|
6739
6766
|
for (; a.eventIndex < w2.length; ) {
|
|
6740
6767
|
let e2 = w2[a.eventIndex];
|
|
6741
|
-
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[
|
|
6768
|
+
if (a.eventIndex += 1, 0 === e2) return void (u.nodes && u.nodes.length && (u[zc] = true, a.iterator = u.getIterator()));
|
|
6742
6769
|
if (this.listeners[e2]) return void (a.visitors = this.listeners[e2]);
|
|
6743
6770
|
}
|
|
6744
6771
|
e.pop();
|
|
6745
6772
|
}
|
|
6746
6773
|
walkSync(e) {
|
|
6747
|
-
e[
|
|
6774
|
+
e[zc] = true;
|
|
6748
6775
|
let a = ri(e);
|
|
6749
6776
|
for (let u of a) if (0 === u) e.nodes && e.each((e2) => {
|
|
6750
|
-
e2[
|
|
6777
|
+
e2[zc] || this.walkSync(e2);
|
|
6751
6778
|
});
|
|
6752
6779
|
else {
|
|
6753
6780
|
let a2 = this.listeners[u];
|
|
@@ -6758,14 +6785,14 @@ let Jc = {}, Yc = class oi {
|
|
|
6758
6785
|
return this.sync().warnings();
|
|
6759
6786
|
}
|
|
6760
6787
|
};
|
|
6761
|
-
|
|
6762
|
-
|
|
6788
|
+
Kc.registerPostcss = (e) => {
|
|
6789
|
+
Zc = e;
|
|
6763
6790
|
};
|
|
6764
|
-
var
|
|
6765
|
-
|
|
6766
|
-
let
|
|
6767
|
-
const
|
|
6768
|
-
let
|
|
6791
|
+
var Jc = Kc;
|
|
6792
|
+
Kc.default = Kc, $c.registerLazyResult(Kc), Dc.registerLazyResult(Kc);
|
|
6793
|
+
let Yc = pc, Xc = Oc;
|
|
6794
|
+
const Qc = Tc;
|
|
6795
|
+
let lu = ha, cu = ni, hu = class {
|
|
6769
6796
|
get content() {
|
|
6770
6797
|
return this.result.css;
|
|
6771
6798
|
}
|
|
@@ -6786,7 +6813,7 @@ let hu = ma, Cu = ni, ku = class {
|
|
|
6786
6813
|
}
|
|
6787
6814
|
get root() {
|
|
6788
6815
|
if (this._root) return this._root;
|
|
6789
|
-
let e, a =
|
|
6816
|
+
let e, a = Xc;
|
|
6790
6817
|
try {
|
|
6791
6818
|
e = a(this._css, this._opts);
|
|
6792
6819
|
} catch (e2) {
|
|
@@ -6800,11 +6827,11 @@ let hu = ma, Cu = ni, ku = class {
|
|
|
6800
6827
|
}
|
|
6801
6828
|
constructor(e, a, u) {
|
|
6802
6829
|
a = a.toString(), this.stringified = false, this._processor = e, this._css = a, this._opts = u, this._map = void 0;
|
|
6803
|
-
let m2, w2 =
|
|
6804
|
-
this.result = new
|
|
6830
|
+
let m2, w2 = lu;
|
|
6831
|
+
this.result = new Qc(this._processor, m2, this._opts), this.result.css = a;
|
|
6805
6832
|
let b2 = this;
|
|
6806
6833
|
Object.defineProperty(this.result, "root", { get: () => b2.root });
|
|
6807
|
-
let C2 = new
|
|
6834
|
+
let C2 = new Yc(w2, m2, this._opts, a);
|
|
6808
6835
|
if (C2.isMap()) {
|
|
6809
6836
|
let [e2, a2] = C2.generate();
|
|
6810
6837
|
e2 && (this.result.css = e2), a2 && (this.result.map = a2);
|
|
@@ -6824,7 +6851,7 @@ let hu = ma, Cu = ni, ku = class {
|
|
|
6824
6851
|
return this.result;
|
|
6825
6852
|
}
|
|
6826
6853
|
then(e, a) {
|
|
6827
|
-
return "production" !== process.env.NODE_ENV && ("from" in this._opts ||
|
|
6854
|
+
return "production" !== process.env.NODE_ENV && ("from" in this._opts || cu("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);
|
|
6828
6855
|
}
|
|
6829
6856
|
toString() {
|
|
6830
6857
|
return this._css;
|
|
@@ -6833,9 +6860,9 @@ let hu = ma, Cu = ni, ku = class {
|
|
|
6833
6860
|
return [];
|
|
6834
6861
|
}
|
|
6835
6862
|
};
|
|
6836
|
-
var
|
|
6837
|
-
|
|
6838
|
-
let
|
|
6863
|
+
var Cu = hu;
|
|
6864
|
+
hu.default = hu;
|
|
6865
|
+
let ku = qa, xu = Jc, Mu = Cu, _u = kl, Ou = class {
|
|
6839
6866
|
constructor(e = []) {
|
|
6840
6867
|
this.version = "8.5.3", this.plugins = this.normalize(e);
|
|
6841
6868
|
}
|
|
@@ -6851,39 +6878,39 @@ let Mu = Ka, _u = Xc, Ou = xu, Eu = Ml, Lu = class {
|
|
|
6851
6878
|
return a;
|
|
6852
6879
|
}
|
|
6853
6880
|
process(e, a = {}) {
|
|
6854
|
-
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new
|
|
6881
|
+
return this.plugins.length || a.parser || a.stringifier || a.syntax ? new xu(this, e, a) : new Mu(this, e, a);
|
|
6855
6882
|
}
|
|
6856
6883
|
use(e) {
|
|
6857
6884
|
return this.plugins = this.plugins.concat(this.normalize([e])), this;
|
|
6858
6885
|
}
|
|
6859
6886
|
};
|
|
6860
|
-
var
|
|
6861
|
-
|
|
6862
|
-
let Au =
|
|
6887
|
+
var Eu = Ou;
|
|
6888
|
+
Ou.default = Ou, _u.registerProcessor(Ou), ku.registerProcessor(Ou);
|
|
6889
|
+
let Lu = Wa, Ru = xa, Au = Ua, Tu = aa, Nu = _a, Pu = qa, Du = ec, Fu = wl, Uu = Jc, $u = Ml, Wu = va, zu = Oc, ju = Eu, Gu = Tc, Vu = kl, qu = Ll, Hu = ha, Zu = Lc;
|
|
6863
6890
|
function T$1(...e) {
|
|
6864
|
-
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new
|
|
6891
|
+
return 1 === e.length && Array.isArray(e[0]) && (e = e[0]), new ju(e);
|
|
6865
6892
|
}
|
|
6866
6893
|
T$1.plugin = function(e, a) {
|
|
6867
6894
|
let u, m2 = false;
|
|
6868
6895
|
function n(...u2) {
|
|
6869
6896
|
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"));
|
|
6870
6897
|
let w2 = a(...u2);
|
|
6871
|
-
return w2.postcssPlugin = e, w2.postcssVersion = new
|
|
6898
|
+
return w2.postcssPlugin = e, w2.postcssVersion = new ju().version, w2;
|
|
6872
6899
|
}
|
|
6873
6900
|
return Object.defineProperty(n, "postcss", { get: () => (u || (u = n()), u) }), n.process = function(e2, a2, u2) {
|
|
6874
6901
|
return T$1([n(u2)]).process(e2, a2);
|
|
6875
6902
|
}, n;
|
|
6876
|
-
}, T$1.stringify =
|
|
6877
|
-
var
|
|
6903
|
+
}, T$1.stringify = Hu, T$1.parse = zu, T$1.fromJSON = Du, T$1.list = $u, T$1.comment = (e) => new Ru(e), T$1.atRule = (e) => new Lu(e), T$1.decl = (e) => new Nu(e), T$1.rule = (e) => new qu(e), T$1.root = (e) => new Vu(e), T$1.document = (e) => new Pu(e), T$1.CssSyntaxError = Tu, T$1.Declaration = Nu, T$1.Container = Au, T$1.Processor = ju, T$1.Document = Pu, T$1.Comment = Ru, T$1.Warning = Zu, T$1.AtRule = Lu, T$1.Result = Gu, T$1.Input = Fu, T$1.Rule = qu, T$1.Root = Vu, T$1.Node = Wu, Uu.registerPostcss(T$1);
|
|
6904
|
+
var Ku = T$1;
|
|
6878
6905
|
T$1.default = T$1;
|
|
6879
|
-
const
|
|
6880
|
-
var
|
|
6881
|
-
|
|
6906
|
+
const Ju = Su(Ku);
|
|
6907
|
+
var Yu;
|
|
6908
|
+
Ju.stringify, Ju.fromJSON, Ju.plugin, Ju.parse, Ju.list, Ju.document, Ju.comment, Ju.atRule, Ju.rule, Ju.decl, Ju.root, Ju.CssSyntaxError, Ju.Declaration, Ju.Container, Ju.Processor, Ju.Document, Ju.Comment, Ju.Warning, Ju.AtRule, Ju.Result, Ju.Input, Ju.Rule, Ju.Root, Ju.Node, (function(e) {
|
|
6882
6909
|
e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped";
|
|
6883
|
-
})(
|
|
6884
|
-
const { addCustomEvent:
|
|
6885
|
-
var
|
|
6886
|
-
let
|
|
6910
|
+
})(Yu || (Yu = {}));
|
|
6911
|
+
const { addCustomEvent: Xu } = ae, { addSailfishEvent: Qu } = ae, { freezePage: ep } = ae, { takeFullSnapshot: tp } = ae;
|
|
6912
|
+
var np = Object.defineProperty, y = (e, a, u) => ((e2, a2, u2) => a2 in e2 ? np(e2, a2, { enumerable: true, configurable: true, writable: true, value: u2 }) : e2[a2] = u2)(e, "symbol" != typeof a ? a + "" : a, u);
|
|
6913
|
+
let rp = class d {
|
|
6887
6914
|
constructor(e) {
|
|
6888
6915
|
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;
|
|
6889
6916
|
}
|
|
@@ -6892,8 +6919,8 @@ let sp = class d {
|
|
|
6892
6919
|
return this.functionName ? `${this.functionName} (${this.fileName}:${e}:${a})` : `${this.fileName}:${e}:${a}`;
|
|
6893
6920
|
}
|
|
6894
6921
|
};
|
|
6895
|
-
const
|
|
6896
|
-
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(
|
|
6922
|
+
const op = /(^|@)\S+:\d+/, sp = /^\s*at .*(\S+:\d+|\(native\))/m, ip = /^(eval@)?(\[native code])?$/, ap = { parse: function(e) {
|
|
6923
|
+
return e ? typeof e.stacktrace < "u" || typeof e["opera#sourceloc"] < "u" ? this.parseOpera(e) : e.stack && e.stack.match(sp) ? this.parseV8OrIE(e) : e.stack ? this.parseFFOrSafari(e) : (console.warn("[console-record-plugin]: Failed to parse error object:", e), []) : [];
|
|
6897
6924
|
}, extractLocation: function(e) {
|
|
6898
6925
|
if (-1 === e.indexOf(":")) return [e];
|
|
6899
6926
|
const a = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
|
|
@@ -6901,23 +6928,23 @@ const ip = /(^|@)\S+:\d+/, ap = /^\s*at .*(\S+:\d+|\(native\))/m, lp = /^(eval@)
|
|
|
6901
6928
|
return [a[1], a[2] || void 0, a[3] || void 0];
|
|
6902
6929
|
}, parseV8OrIE: function(e) {
|
|
6903
6930
|
return e.stack.split("\n").filter(function(e2) {
|
|
6904
|
-
return !!e2.match(
|
|
6931
|
+
return !!e2.match(sp);
|
|
6905
6932
|
}, this).map(function(e2) {
|
|
6906
6933
|
e2.indexOf("(eval ") > -1 && (e2 = e2.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(\),.*$)/g, ""));
|
|
6907
6934
|
let a = e2.replace(/^\s+/, "").replace(/\(eval code/g, "(");
|
|
6908
6935
|
const u = a.match(/ (\((.+):(\d+):(\d+)\)$)/);
|
|
6909
6936
|
a = u ? a.replace(u[0], "") : a;
|
|
6910
6937
|
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];
|
|
6911
|
-
return new
|
|
6938
|
+
return new rp({ functionName: b2, fileName: C2, lineNumber: w2[1], columnNumber: w2[2] });
|
|
6912
6939
|
}, this);
|
|
6913
6940
|
}, parseFFOrSafari: function(e) {
|
|
6914
6941
|
return e.stack.split("\n").filter(function(e2) {
|
|
6915
|
-
return !e2.match(
|
|
6942
|
+
return !e2.match(ip);
|
|
6916
6943
|
}, this).map(function(e2) {
|
|
6917
|
-
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
|
|
6944
|
+
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 rp({ functionName: e2 });
|
|
6918
6945
|
{
|
|
6919
6946
|
const a = /((.*".+"[^@]*)?[^@]*)(?:@)/, u = e2.match(a), m2 = u && u[1] ? u[1] : void 0, w2 = this.extractLocation(e2.replace(a, ""));
|
|
6920
|
-
return new
|
|
6947
|
+
return new rp({ functionName: m2, fileName: w2[0], lineNumber: w2[1], columnNumber: w2[2] });
|
|
6921
6948
|
}
|
|
6922
6949
|
}, this);
|
|
6923
6950
|
}, parseOpera: function(e) {
|
|
@@ -6926,22 +6953,22 @@ const ip = /(^|@)\S+:\d+/, ap = /^\s*at .*(\S+:\d+|\(native\))/m, lp = /^(eval@)
|
|
|
6926
6953
|
const a = /Line (\d+).*script (?:in )?(\S+)/i, u = e.message.split("\n"), m2 = [];
|
|
6927
6954
|
for (let e2 = 2, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6928
6955
|
const w3 = a.exec(u[e2]);
|
|
6929
|
-
w3 && m2.push(new
|
|
6956
|
+
w3 && m2.push(new rp({ fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6930
6957
|
}
|
|
6931
6958
|
return m2;
|
|
6932
6959
|
}, parseOpera10: function(e) {
|
|
6933
6960
|
const a = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, u = e.stacktrace.split("\n"), m2 = [];
|
|
6934
6961
|
for (let e2 = 0, w2 = u.length; e2 < w2; e2 += 2) {
|
|
6935
6962
|
const w3 = a.exec(u[e2]);
|
|
6936
|
-
w3 && m2.push(new
|
|
6963
|
+
w3 && m2.push(new rp({ functionName: w3[3] || void 0, fileName: w3[2], lineNumber: parseFloat(w3[1]) }));
|
|
6937
6964
|
}
|
|
6938
6965
|
return m2;
|
|
6939
6966
|
}, parseOpera11: function(e) {
|
|
6940
6967
|
return e.stack.split("\n").filter(function(e2) {
|
|
6941
|
-
return !!e2.match(
|
|
6968
|
+
return !!e2.match(op) && !e2.match(/^Error created at/);
|
|
6942
6969
|
}, this).map(function(e2) {
|
|
6943
6970
|
const a = e2.split("@"), u = this.extractLocation(a.pop()), m2 = (a.shift() || "").replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0;
|
|
6944
|
-
return new
|
|
6971
|
+
return new rp({ functionName: m2, fileName: u[0], lineNumber: u[1], columnNumber: u[2] });
|
|
6945
6972
|
}, this);
|
|
6946
6973
|
} };
|
|
6947
6974
|
function T(e) {
|
|
@@ -6998,9 +7025,9 @@ function g(e, a) {
|
|
|
6998
7025
|
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;
|
|
6999
7026
|
});
|
|
7000
7027
|
}
|
|
7001
|
-
const
|
|
7028
|
+
const lp = { level: ["assert", "clear", "count", "countReset", "debug", "dir", "dirxml", "error", "group", "groupCollapsed", "groupEnd", "info", "log", "table", "time", "timeEnd", "timeLog", "trace", "warn"], lengthThreshold: 1e3, logger: "console" };
|
|
7002
7029
|
function R(e, a, u) {
|
|
7003
|
-
const m2 = u ? Object.assign({},
|
|
7030
|
+
const m2 = u ? Object.assign({}, lp, u) : lp, w2 = m2.logger;
|
|
7004
7031
|
if (!w2) return () => {
|
|
7005
7032
|
};
|
|
7006
7033
|
let b2;
|
|
@@ -7009,7 +7036,7 @@ function R(e, a, u) {
|
|
|
7009
7036
|
const I2 = [];
|
|
7010
7037
|
if (m2.level.includes("error")) {
|
|
7011
7038
|
const l = (a2) => {
|
|
7012
|
-
const u2 = a2.message, w3 = a2.error, b3 =
|
|
7039
|
+
const u2 = a2.message, w3 = a2.error, b3 = ap.parse(w3).map((e2) => e2.toString()), C3 = [g(u2, m2.stringifyOptions)];
|
|
7013
7040
|
e({ level: "error", trace: b3, payload: C3 });
|
|
7014
7041
|
};
|
|
7015
7042
|
a.addEventListener("error", l), I2.push(() => {
|
|
@@ -7018,7 +7045,7 @@ function R(e, a, u) {
|
|
|
7018
7045
|
const f = (a2) => {
|
|
7019
7046
|
let u2, w3;
|
|
7020
7047
|
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)]);
|
|
7021
|
-
const b3 =
|
|
7048
|
+
const b3 = ap.parse(u2).map((e2) => e2.toString());
|
|
7022
7049
|
e({ level: "error", trace: b3, payload: w3 });
|
|
7023
7050
|
};
|
|
7024
7051
|
a.addEventListener("unhandledrejection", f), I2.push(() => {
|
|
@@ -7046,7 +7073,7 @@ function R(e, a, u) {
|
|
|
7046
7073
|
if (a3.apply(this, w3), !("assert" === u2 && w3[0] || x2)) {
|
|
7047
7074
|
x2 = true;
|
|
7048
7075
|
try {
|
|
7049
|
-
const a4 =
|
|
7076
|
+
const a4 = ap.parse(new Error()).map((e2) => e2.toString()).splice(1), b3 = ("assert" === u2 ? w3.slice(1) : w3).map((e2) => g(e2, m2.stringifyOptions));
|
|
7050
7077
|
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.")] });
|
|
7051
7078
|
} catch (e2) {
|
|
7052
7079
|
a3("@sailfish-rrweb/rrweb logger error:", e2, ...w3);
|
|
@@ -7058,7 +7085,7 @@ function R(e, a, u) {
|
|
|
7058
7085
|
};
|
|
7059
7086
|
}
|
|
7060
7087
|
}
|
|
7061
|
-
var
|
|
7088
|
+
var cp = ((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))(cp || {});
|
|
7062
7089
|
function suppressConsoleLogsDuringCall(e) {
|
|
7063
7090
|
const a = console.log, u = console.warn, m2 = console.error;
|
|
7064
7091
|
console.log = () => {
|
|
@@ -7071,7 +7098,7 @@ function suppressConsoleLogsDuringCall(e) {
|
|
|
7071
7098
|
console.log = a, console.warn = u, console.error = m2;
|
|
7072
7099
|
}
|
|
7073
7100
|
}
|
|
7074
|
-
const
|
|
7101
|
+
const up = "zendesk_chat", pp = "Zendesk";
|
|
7075
7102
|
function zE_safe(...e) {
|
|
7076
7103
|
try {
|
|
7077
7104
|
if ((function hasZendesk() {
|
|
@@ -7110,11 +7137,11 @@ function initializeDomContentEvents(e) {
|
|
|
7110
7137
|
function initializeConsolePlugin(e, a) {
|
|
7111
7138
|
const { name: u, observer: m2 } = /* @__PURE__ */ ((e2) => ({ name: "@sailfish-rrweb/rrweb/console@1", observer: R, options: e2 }))(e);
|
|
7112
7139
|
m2((e2) => {
|
|
7113
|
-
sendEvent({ type:
|
|
7140
|
+
sendEvent({ type: cp.Plugin, timestamp: Date.now(), data: { plugin: u, payload: e2 }, sessionId: a, ...getUrlAndStoredUuids() });
|
|
7114
7141
|
}, window, e);
|
|
7115
7142
|
}
|
|
7116
|
-
async function initializeRecording(e, a, u, m2) {
|
|
7117
|
-
const
|
|
7143
|
+
async function initializeRecording(e, a, u, m2, w2) {
|
|
7144
|
+
const b2 = initializeWebSocket(a, u, m2, w2);
|
|
7118
7145
|
try {
|
|
7119
7146
|
ae({ emit(e2) {
|
|
7120
7147
|
Object.assign(e2, getUrlAndStoredUuids()), e2.sessionId = m2, sendEvent(e2);
|
|
@@ -7130,11 +7157,11 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7130
7157
|
zE_safe("messenger:set", "conversationTags", [`sailfish-session-${m2}`]);
|
|
7131
7158
|
});
|
|
7132
7159
|
const handleWidgetOpen = () => {
|
|
7133
|
-
ae.addSailfishEvent(
|
|
7160
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "customer support chat opened", element_id: up, provider: pp });
|
|
7134
7161
|
}, handleWidgetClose = () => {
|
|
7135
|
-
ae.addSailfishEvent(
|
|
7162
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "customer support chat closed", element_id: up, provider: pp });
|
|
7136
7163
|
}, handleUnreadMessages = (e2) => {
|
|
7137
|
-
ae.addSailfishEvent(
|
|
7164
|
+
ae.addSailfishEvent(cp.SailfishCustom, { action: "zendesk unreadmessages", element_id: up, provider: pp });
|
|
7138
7165
|
};
|
|
7139
7166
|
suppressConsoleLogsDuringCall(() => {
|
|
7140
7167
|
zE_safe("messenger:on", "open", handleWidgetOpen), zE_safe("messenger:on", "close", handleWidgetClose), zE_safe("messenger:on", "unreadMessages", handleUnreadMessages);
|
|
@@ -7143,10 +7170,10 @@ async function initializeRecording(e, a, u, m2) {
|
|
|
7143
7170
|
} catch (e2) {
|
|
7144
7171
|
console.error("Error importing plugins!", e2);
|
|
7145
7172
|
}
|
|
7146
|
-
return
|
|
7173
|
+
return b2;
|
|
7147
7174
|
}
|
|
7148
|
-
let
|
|
7149
|
-
const
|
|
7175
|
+
let dp = null, hp = null;
|
|
7176
|
+
const fp = readDebugFlag(), mp = ["t.co", "*.twitter.com", "*.gravatar.com", "*.googleapis.com", "*.amazonaws.com", "*.smooch.io", "*.zendesk.com", "*.zdassets.com"], gp = [400, 403], yp = "CORS", wp = { recordCanvas: false, recordCrossOriginIframes: false, collectFonts: false, inlineImages: false, recordPassword: false, recordRealName: true, recordCreditCardInfo: false, recordSsn: false, recordDob: false, sampling: {} }, Sp = { level: ["info", "log", "warn", "error"], lengthThreshold: 1e4, stringifyOptions: { stringLengthLimit: 1e3, numOfKeysLimit: 20, depthOfLimit: 4 }, logger: "console" };
|
|
7150
7177
|
function trackDomainChangesOnce() {
|
|
7151
7178
|
const e = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7152
7179
|
if (e.routeWatcherIntervalId) return;
|
|
@@ -7213,7 +7240,7 @@ function shouldSkipHeadersPropagation(e, a = []) {
|
|
|
7213
7240
|
return true;
|
|
7214
7241
|
}
|
|
7215
7242
|
for (const e2 of E) if (u.pathname.toLowerCase().endsWith(e2)) return true;
|
|
7216
|
-
return !!matchUrlWithWildcard(e, [...
|
|
7243
|
+
return !!matchUrlWithWildcard(e, [...mp, ...a]);
|
|
7217
7244
|
}
|
|
7218
7245
|
function setupFetchInterceptor(e = []) {
|
|
7219
7246
|
const a = window.fetch, u = getOrSetSessionId();
|
|
@@ -7248,7 +7275,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7248
7275
|
F2[e3] = a4;
|
|
7249
7276
|
}) : F2 = { ...w3.headers }), D2 = w3.body;
|
|
7250
7277
|
} catch (e3) {
|
|
7251
|
-
|
|
7278
|
+
fp && console.warn("[Sailfish] Failed to capture request data:", e3);
|
|
7252
7279
|
}
|
|
7253
7280
|
delete F2[b];
|
|
7254
7281
|
const U2 = (_a2 = getFuncSpanHeader()) == null ? void 0 : _a2.name;
|
|
@@ -7258,16 +7285,16 @@ function setupFetchInterceptor(e = []) {
|
|
|
7258
7285
|
const I4 = getFuncSpanHeader();
|
|
7259
7286
|
if (u3 instanceof Request) {
|
|
7260
7287
|
const _3 = u3.clone(), O3 = new Headers(_3.headers);
|
|
7261
|
-
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7288
|
+
O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), fp && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: u3.url, header: I4.name }));
|
|
7262
7289
|
const E3 = new Request(_3, { headers: O3 });
|
|
7263
7290
|
return await e3.call(a4, E3, m4);
|
|
7264
7291
|
}
|
|
7265
7292
|
{
|
|
7266
7293
|
const _3 = { ...m4 }, O3 = new Headers(m4.headers || {});
|
|
7267
|
-
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value),
|
|
7294
|
+
return O3.set(b, `${w4}/${C4}/${x4}`), I4 && (O3.set(I4.name, I4.value), fp && 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);
|
|
7268
7295
|
}
|
|
7269
7296
|
})(e2, a3, m3, w3, C3, _2.page_visit_uuid, I3), B2 = false;
|
|
7270
|
-
|
|
7297
|
+
gp.includes(U3.status) && (fp && console.log("Perform retry as status was fail:", U3), I3 = v4(), U3 = await (async function retryWithoutPropagateHeaders(e3, a4, u3, m4) {
|
|
7271
7298
|
try {
|
|
7272
7299
|
let m5 = u3[0], w4 = u3[1] || {};
|
|
7273
7300
|
if ("string" == typeof m5 || m5 instanceof URL) {
|
|
@@ -7283,7 +7310,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7283
7310
|
}
|
|
7284
7311
|
return e3.apply(a4, u3);
|
|
7285
7312
|
} catch (e4) {
|
|
7286
|
-
throw
|
|
7313
|
+
throw fp && console.log(`Retry without ${b} for ${m4} also failed:`, e4), e4;
|
|
7287
7314
|
}
|
|
7288
7315
|
})(e2, a3, u2, x3), B2 = true);
|
|
7289
7316
|
const $2 = Date.now(), z2 = U3.status, j2 = U3.ok, V2 = j2 ? "" : `Request Error: ${U3.statusText}`;
|
|
@@ -7292,7 +7319,7 @@ function setupFetchInterceptor(e = []) {
|
|
|
7292
7319
|
const e3 = U3.clone();
|
|
7293
7320
|
q2 = await e3.text();
|
|
7294
7321
|
} catch (e3) {
|
|
7295
|
-
|
|
7322
|
+
fp && console.warn("[Sailfish] Failed to capture response data:", e3), q2 = null;
|
|
7296
7323
|
}
|
|
7297
7324
|
let H2 = null;
|
|
7298
7325
|
try {
|
|
@@ -7300,12 +7327,12 @@ function setupFetchInterceptor(e = []) {
|
|
|
7300
7327
|
H2[a4] = e3;
|
|
7301
7328
|
});
|
|
7302
7329
|
} catch (e3) {
|
|
7303
|
-
|
|
7330
|
+
fp && console.warn("[Sailfish] Failed to capture response headers:", e3), H2 = null;
|
|
7304
7331
|
}
|
|
7305
7332
|
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;
|
|
7306
7333
|
} catch (m4) {
|
|
7307
7334
|
const w4 = Date.now(), b2 = false, U3 = ((_b = m4.response) == null ? void 0 : _b.status) || 500, B2 = m4.message || "Fetch request failed";
|
|
7308
|
-
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(
|
|
7335
|
+
if (m4 instanceof TypeError && ((_c2 = m4 == null ? void 0 : m4.message) == null ? void 0 : _c2.toLowerCase().includes(yp.toLowerCase()))) return e2.apply(a3, u2);
|
|
7309
7336
|
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;
|
|
7310
7337
|
}
|
|
7311
7338
|
})(a2, m2, w2, x2, I2, u, C2);
|
|
@@ -7337,9 +7364,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7337
7364
|
} catch {
|
|
7338
7365
|
}
|
|
7339
7366
|
})(), F2 = getOrSetSessionId(), U2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
|
|
7340
|
-
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7367
|
+
if (U2.sessionId = F2, U2.apiKey = e, U2.backendApi = a, U2.serviceAdditionalMetadata = I2, U2.initialized && U2.sessionId === F2 && U2.ws && 1 === U2.ws.readyState) trackDomainChangesOnce();
|
|
7341
7368
|
else {
|
|
7342
|
-
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(
|
|
7369
|
+
U2.domEventsInit || (initializeDomContentEvents(F2), U2.domEventsInit = true), U2.consoleInit || (initializeConsolePlugin(Sp, F2), U2.consoleInit = true), U2.errorInit || (!(function initializeErrorInterceptor() {
|
|
7343
7370
|
window.addEventListener("error", (e2) => {
|
|
7344
7371
|
captureError(e2.error || e2.message);
|
|
7345
7372
|
}), window.addEventListener("unhandledrejection", (e2) => {
|
|
@@ -7347,7 +7374,12 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7347
7374
|
});
|
|
7348
7375
|
})(), U2.errorInit = true), (function storeCredentialsAndConnection({ apiKey: e2, backendApi: a2 }) {
|
|
7349
7376
|
X && (sessionStorage.setItem("sailfishApiKey", e2), sessionStorage.setItem("sailfishBackendApi", a2));
|
|
7350
|
-
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a),
|
|
7377
|
+
})({ apiKey: e, backendApi: a }), trackDomainChangesOnce(), sessionStorage.setItem("sailfishApiKey", e), sessionStorage.setItem("sailfishBackendApi", a), !isFunctionSpanTrackingEnabled() || U2.ws && 1 === U2.ws.readyState || fetchFunctionSpanTrackingEnabled(e, a).then((e2) => {
|
|
7378
|
+
var _a3;
|
|
7379
|
+
((_a3 = e2.data) == null ? void 0 : _a3.isFunctionSpanTrackingEnabledFromApiKey) ?? false ? fp && console.log("[Sailfish] Function span tracking state validated with backend: ACTIVE") : (clearStaleFuncSpanState(), fp && console.log("[Sailfish] Cleared stale function span tracking state - backend validation shows tracking is not active"));
|
|
7380
|
+
}).catch((e2) => {
|
|
7381
|
+
fp && console.warn("[Sailfish] Failed to validate function span tracking status with backend:", e2);
|
|
7382
|
+
}), U2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e, [...m2, ...mp], a).catch((e2) => console.error("Failed to send domains to not propagate header to:", e2)), U2.sentDoNotPropagateOnce = true), U2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e2 = []) {
|
|
7351
7383
|
const a2 = XMLHttpRequest.prototype.open, u2 = XMLHttpRequest.prototype.send, m3 = XMLHttpRequest.prototype.setRequestHeader, w3 = getOrSetSessionId();
|
|
7352
7384
|
XMLHttpRequest.prototype.setRequestHeader = function(e3, a3) {
|
|
7353
7385
|
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e3] = a3, m3.call(this, e3, a3);
|
|
@@ -7365,9 +7397,9 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7365
7397
|
}
|
|
7366
7398
|
const _3 = getFuncSpanHeader();
|
|
7367
7399
|
if (_3) try {
|
|
7368
|
-
this.setRequestHeader(_3.name, _3.value),
|
|
7400
|
+
this.setRequestHeader(_3.name, _3.value), fp && console.log("[Sailfish] Added funcspan header to XMLHttpRequest:", { url: m4, header: _3.name });
|
|
7369
7401
|
} catch (e3) {
|
|
7370
|
-
|
|
7402
|
+
fp && console.warn(`[Sailfish] Could not set funcspan header for ${m4}`, e3);
|
|
7371
7403
|
}
|
|
7372
7404
|
const O3 = Date.now();
|
|
7373
7405
|
let E3 = false;
|
|
@@ -7395,7 +7427,7 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7395
7427
|
2 === a5.length && (u3[a5[0]] = a5[1]);
|
|
7396
7428
|
});
|
|
7397
7429
|
} catch (e4) {
|
|
7398
|
-
|
|
7430
|
+
fp && console.warn("[Sailfish] Failed to capture XHR response headers:", e4), u3 = null;
|
|
7399
7431
|
}
|
|
7400
7432
|
if (e3 >= 200 && e3 < 300) emitFinished(true, e3, "", a4, u3);
|
|
7401
7433
|
else {
|
|
@@ -7411,12 +7443,12 @@ async function startRecording({ apiKey: e, backendApi: a = "https://api-service.
|
|
|
7411
7443
|
sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
|
|
7412
7444
|
})();
|
|
7413
7445
|
try {
|
|
7414
|
-
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) ||
|
|
7446
|
+
const u2 = await fetchCaptureSettings(e, a), m3 = ((_a2 = u2.data) == null ? void 0 : _a2.captureSettingsFromApiKey) || wp;
|
|
7415
7447
|
if (U2.ws && 1 === U2.ws.readyState) return;
|
|
7416
7448
|
const b2 = withAppUrlMetadata(I2), x3 = await startRecordingSession(e, F2, a, O2, E2, D2, _2, "JS/TS", b2);
|
|
7417
7449
|
if ((_b = x3.data) == null ? void 0 : _b.startRecordingSession) {
|
|
7418
|
-
const u3 = await initializeRecording(m3, a, e, F2);
|
|
7419
|
-
U2.ws =
|
|
7450
|
+
const u3 = (I2 == null ? void 0 : I2.env) || (I2 == null ? void 0 : I2.environment), b3 = await initializeRecording(m3, a, e, F2, u3);
|
|
7451
|
+
U2.ws = b3, U2.initialized = true, U2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e2 = "", a2 = "") {
|
|
7420
7452
|
window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e2, serviceVersion: a2 } });
|
|
7421
7453
|
})(C2, w2), U2.sentMapUuidOnce = true);
|
|
7422
7454
|
} else console.error("Failed to start recording session:", x3.errors || x3);
|
|
@@ -7447,7 +7479,7 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7447
7479
|
const e = document.visibilityState, a = Date.now();
|
|
7448
7480
|
"visible" === e && getOrSetSessionId();
|
|
7449
7481
|
try {
|
|
7450
|
-
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }),
|
|
7482
|
+
sendMessage({ type: "visibilityChange", data: { state: e, url: window.location.href.split("?")[0], timestamp: a, ...getUrlAndStoredUuids() } }), fp && console.log(`[Sailfish] Tab became ${e}, sent visibility change event`);
|
|
7451
7483
|
} catch (e2) {
|
|
7452
7484
|
console.warn("[Sailfish] Failed to send visibility change event:", e2);
|
|
7453
7485
|
}
|
|
@@ -7455,12 +7487,12 @@ H && (!(function sendUserDeviceUuid() {
|
|
|
7455
7487
|
}), H && window.addEventListener("beforeunload", () => {
|
|
7456
7488
|
clearPageVisitDataFromSessionStorage();
|
|
7457
7489
|
});
|
|
7458
|
-
exports.DEFAULT_CAPTURE_SETTINGS =
|
|
7490
|
+
exports.DEFAULT_CAPTURE_SETTINGS = wp, exports.DEFAULT_CONSOLE_RECORDING_SETTINGS = Sp, exports.STORAGE_VERSION = 1, exports.addOrUpdateMetadata = function addOrUpdateMetadata(e) {
|
|
7459
7491
|
const a = { type: "addOrUpdateMetadata", metadata: e };
|
|
7460
|
-
|
|
7461
|
-
}, 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.getOrSetSessionId = getOrSetSessionId, exports.getUrlAndStoredUuids = getUrlAndStoredUuids, exports.identify = function identify(e, a = {}, u = false) {
|
|
7492
|
+
hp && JSON.stringify(hp) === JSON.stringify(e) || (hp = e, sendMessage(a));
|
|
7493
|
+
}, exports.buildBatches = buildBatches, exports.clearStaleFuncSpanState = clearStaleFuncSpanState, exports.createTriageFromRecorder = createTriageFromRecorder, exports.disableFunctionSpanTracking = disableFunctionSpanTracking, exports.enableFunctionSpanTracking = enableFunctionSpanTracking, exports.eventSize = eventSize, exports.fetchCaptureSettings = fetchCaptureSettings, exports.fetchFunctionSpanTrackingEnabled = fetchFunctionSpanTrackingEnabled, exports.flushBufferedEvents = flushBufferedEvents, exports.getFuncSpanHeader = getFuncSpanHeader, exports.getOrSetSessionId = getOrSetSessionId, exports.getUrlAndStoredUuids = getUrlAndStoredUuids, exports.identify = function identify(e, a = {}, u = false) {
|
|
7462
7494
|
const m2 = { type: "identify", userId: e, traits: a };
|
|
7463
|
-
|
|
7495
|
+
dp && dp.userId === e && JSON.stringify(dp.traits) === JSON.stringify(a) || (dp = { userId: e, traits: a, overwrite: u }, sendMessage(m2));
|
|
7464
7496
|
}, exports.initRecorder = async (e) => {
|
|
7465
7497
|
if ("undefined" == typeof window) return;
|
|
7466
7498
|
const a = window.__sailfish_recorder || (window.__sailfish_recorder = {}), u = getOrSetSessionId();
|
|
@@ -7469,8 +7501,8 @@ exports.DEFAULT_CAPTURE_SETTINGS = bp, exports.DEFAULT_CONSOLE_RECORDING_SETTING
|
|
|
7469
7501
|
})().finally(() => {
|
|
7470
7502
|
delete a.initPromise;
|
|
7471
7503
|
})), a.initPromise);
|
|
7472
|
-
}, exports.initializeConsolePlugin = initializeConsolePlugin, exports.initializeDomContentEvents = initializeDomContentEvents, exports.initializeRecording = initializeRecording, exports.initializeWebSocket = initializeWebSocket, exports.isFunctionSpanTrackingEnabled = isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = matchUrlWithWildcard, exports.openReportIssueModal = function openReportIssueModal() {
|
|
7473
|
-
|
|
7504
|
+
}, exports.initializeConsolePlugin = initializeConsolePlugin, exports.initializeDomContentEvents = initializeDomContentEvents, exports.initializeFunctionSpanTrackingFromApi = initializeFunctionSpanTrackingFromApi, exports.initializeRecording = initializeRecording, exports.initializeWebSocket = initializeWebSocket, exports.isFunctionSpanTrackingEnabled = isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = matchUrlWithWildcard, exports.openReportIssueModal = function openReportIssueModal() {
|
|
7505
|
+
ut ? stopRecording() : (injectModalHTML(), st && document.body.appendChild(st));
|
|
7474
7506
|
}, exports.sendDomainsToNotPropagateHeaderTo = sendDomainsToNotPropagateHeaderTo, exports.sendEvent = sendEvent, exports.sendGraphQLRequest = sendGraphQLRequest, exports.sendMessage = sendMessage, exports.startRecording = startRecording, exports.startRecordingSession = startRecordingSession, exports.trackingEvent = function trackingEvent(e) {
|
|
7475
7507
|
sendMessage({ type: "trackingEvent", trackingData: e, timestamp: exports.nowTimestamp() });
|
|
7476
7508
|
}, exports.withAppUrlMetadata = withAppUrlMetadata;
|