@sailfish-ai/recorder 1.11.3 → 1.11.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{chunkSerializer-jzbHv2wf.js → chunkSerializer-CFHDS9Vi.js} +1 -1
- package/dist/chunks/chunkSerializer-CFHDS9Vi.js.br +0 -0
- package/dist/chunks/chunkSerializer-CFHDS9Vi.js.gz +0 -0
- package/dist/chunks/{chunkSerializer-CV4nkb5-.js → chunkSerializer-DOaGGlCg.js} +1 -1
- package/dist/chunks/chunkSerializer-DOaGGlCg.js.br +0 -0
- package/dist/chunks/chunkSerializer-DOaGGlCg.js.gz +0 -0
- package/dist/chunks/{index-BynFTRFv.js → index-B8IAZfT7.js} +220 -192
- package/dist/chunks/index-B8IAZfT7.js.br +0 -0
- package/dist/chunks/index-B8IAZfT7.js.gz +0 -0
- package/dist/chunks/{index-BP-kNUGS.js → index-DbcegHRc.js} +313 -285
- package/dist/chunks/index-DbcegHRc.js.br +0 -0
- package/dist/chunks/index-DbcegHRc.js.gz +0 -0
- package/dist/inAppReportIssueModal/index.js +10 -4
- package/dist/inAppReportIssueModal/index.js.br +0 -0
- package/dist/inAppReportIssueModal/index.js.gz +0 -0
- package/dist/inAppReportIssueModal/integrations.js +50 -0
- package/dist/inAppReportIssueModal/integrations.js.br +0 -0
- package/dist/inAppReportIssueModal/integrations.js.gz +0 -0
- package/dist/recorder.cjs +1 -1
- package/dist/recorder.cjs.br +0 -0
- package/dist/recorder.cjs.gz +0 -0
- package/dist/recorder.js +1 -1
- package/dist/recorder.js.br +0 -0
- package/dist/recorder.js.gz +0 -0
- package/dist/recorder.umd.cjs +34 -6
- package/dist/recorder.umd.cjs.br +0 -0
- package/dist/recorder.umd.cjs.gz +0 -0
- package/dist/types/inAppReportIssueModal/integrations.d.ts +3 -0
- package/package.json +1 -1
- package/dist/chunks/chunkSerializer-CV4nkb5-.js.br +0 -0
- package/dist/chunks/chunkSerializer-CV4nkb5-.js.gz +0 -0
- package/dist/chunks/chunkSerializer-jzbHv2wf.js.br +0 -0
- package/dist/chunks/chunkSerializer-jzbHv2wf.js.gz +0 -0
- package/dist/chunks/index-BP-kNUGS.js.br +0 -0
- package/dist/chunks/index-BP-kNUGS.js.gz +0 -0
- package/dist/chunks/index-BynFTRFv.js.br +0 -0
- package/dist/chunks/index-BynFTRFv.js.gz +0 -0
|
@@ -35,7 +35,7 @@ function uuidv4() {
|
|
|
35
35
|
return ("x" === e2 ? t2 : 3 & t2 | 8).toString(16);
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
-
const n = "X-Sf3-Rid", i = 0, o = 1,
|
|
38
|
+
const n = "X-Sf3-Rid", i = 0, o = 1, a = 2, s = 4, r = "recordingEvents";
|
|
39
39
|
let l = null;
|
|
40
40
|
function openDb$1() {
|
|
41
41
|
return (function hasIndexedDB$1() {
|
|
@@ -57,8 +57,8 @@ function openDb$1() {
|
|
|
57
57
|
function withStore$1(e2, t2) {
|
|
58
58
|
return openDb$1().then((n2) => n2 ? new Promise((i2) => {
|
|
59
59
|
try {
|
|
60
|
-
const o2 = n2.transaction(r, e2),
|
|
61
|
-
Promise.resolve(t2(
|
|
60
|
+
const o2 = n2.transaction(r, e2), a2 = o2.objectStore(r);
|
|
61
|
+
Promise.resolve(t2(a2)).then((e3) => {
|
|
62
62
|
o2.oncomplete = () => i2(e3), o2.onerror = () => i2(null);
|
|
63
63
|
}).catch(() => i2(null));
|
|
64
64
|
} catch {
|
|
@@ -92,8 +92,8 @@ async function withStore(e2, t2) {
|
|
|
92
92
|
const n2 = await openDb();
|
|
93
93
|
return n2 ? new Promise((i2) => {
|
|
94
94
|
try {
|
|
95
|
-
const o2 = n2.transaction(c, e2),
|
|
96
|
-
Promise.resolve(t2(
|
|
95
|
+
const o2 = n2.transaction(c, e2), a2 = o2.objectStore(c);
|
|
96
|
+
Promise.resolve(t2(a2)).then((e3) => {
|
|
97
97
|
o2.oncomplete = () => i2(e3), o2.onerror = () => i2(null);
|
|
98
98
|
}).catch(() => i2(null));
|
|
99
99
|
} catch {
|
|
@@ -138,13 +138,13 @@ function buildBatches(e2, t2, n2) {
|
|
|
138
138
|
}
|
|
139
139
|
const o2 = [];
|
|
140
140
|
for (const e3 in i2) {
|
|
141
|
-
const
|
|
142
|
-
let
|
|
143
|
-
for (const e4 of
|
|
141
|
+
const a2 = i2[e3];
|
|
142
|
+
let s2 = [], r2 = 0;
|
|
143
|
+
for (const e4 of a2) {
|
|
144
144
|
const i3 = t2(e4);
|
|
145
|
-
r2 + i3 > n2 && (
|
|
145
|
+
r2 + i3 > n2 && (s2.length > 0 && (o2.push(s2), s2 = [], r2 = 0), i3 > n2) || (s2.push(e4), r2 += i3);
|
|
146
146
|
}
|
|
147
|
-
|
|
147
|
+
s2.length > 0 && o2.push(s2);
|
|
148
148
|
}
|
|
149
149
|
return o2;
|
|
150
150
|
}
|
|
@@ -364,14 +364,14 @@ function handleWsMessage(e2) {
|
|
|
364
364
|
} catch (e3) {
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
function initializeWebSocket(t2, n2, i2, o2,
|
|
367
|
+
function initializeWebSocket(t2, n2, i2, o2, a2 = false) {
|
|
368
368
|
ensureHrefCache();
|
|
369
|
-
const
|
|
369
|
+
const s2 = (function getWebSocketHost(e2) {
|
|
370
370
|
const t3 = new URL(e2);
|
|
371
371
|
return `${t3.hostname}${t3.port ? `:${t3.port}` : ""}`;
|
|
372
372
|
})(t2);
|
|
373
|
-
let r2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${
|
|
374
|
-
if (o2 && (r2 += `&envValue=${encodeURIComponent(o2)}`), k =
|
|
373
|
+
let r2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${s2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.11.4`;
|
|
374
|
+
if (o2 && (r2 += `&envValue=${encodeURIComponent(o2)}`), k = a2 ? (function tryCreateWsWorker() {
|
|
375
375
|
if ("undefined" == typeof Worker) return null;
|
|
376
376
|
try {
|
|
377
377
|
const e2 = new Blob(['\nvar ws = null;\nvar wsUrl = "";\nvar reconnectTimer = null;\nvar reconnectDelay = 1000;\nvar MAX_RECONNECT_DELAY = 30000;\nvar CONNECTION_TIMEOUT = 30000;\nvar queue = [];\nvar MAX_QUEUE = 500;\n\nfunction enqueue(str) {\n if (queue.length >= MAX_QUEUE) queue.shift();\n queue.push(str);\n}\n\nfunction drain() {\n while (queue.length > 0) {\n if (!ws || ws.readyState !== 1) break;\n try { ws.send(queue.shift()); } catch (e) { break; }\n }\n}\n\nfunction connect() {\n if (ws && (ws.readyState === 0 || ws.readyState === 1)) return;\n try { ws = new WebSocket(wsUrl); } catch (e) { scheduleReconnect(); return; }\n var tid = setTimeout(function() { if (ws && ws.readyState === 0) ws.close(); }, CONNECTION_TIMEOUT);\n ws.onopen = function() {\n clearTimeout(tid);\n reconnectDelay = 1000;\n drain();\n postMessage({ type: "open" });\n };\n ws.onclose = function() {\n clearTimeout(tid);\n ws = null;\n postMessage({ type: "close" });\n scheduleReconnect();\n };\n ws.onerror = function() {};\n ws.onmessage = function(e) {\n postMessage({ type: "message", data: e.data });\n };\n}\n\nfunction scheduleReconnect() {\n if (reconnectTimer) return;\n reconnectTimer = setTimeout(function() {\n reconnectTimer = null;\n reconnectDelay = Math.min(reconnectDelay * 1.5, MAX_RECONNECT_DELAY);\n connect();\n }, reconnectDelay);\n}\n\nself.onmessage = function(e) {\n var msg = e.data;\n if (msg.type === "init") {\n wsUrl = msg.wsUrl;\n connect();\n } else if (msg.type === "send") {\n try {\n var s = JSON.stringify(msg.payload);\n if (ws && ws.readyState === 1) { ws.send(s); }\n else { enqueue(s); }\n } catch (e) {}\n } else if (msg.type === "sendRaw") {\n if (ws && ws.readyState === 1) {\n try { ws.send(msg.payload); } catch (e) { enqueue(msg.payload); }\n } else { enqueue(msg.payload); }\n } else if (msg.type === "close") {\n if (reconnectTimer) { clearTimeout(reconnectTimer); reconnectTimer = null; }\n if (ws) { ws.close(); ws = null; }\n }\n};\n'], { type: "application/javascript" }), t3 = URL.createObjectURL(e2), n3 = new Worker(t3);
|
|
@@ -448,8 +448,8 @@ function fetchAndSendIp(e2) {
|
|
|
448
448
|
for (const e3 of H) try {
|
|
449
449
|
const t2 = new AbortController(), n2 = setTimeout(() => t2.abort(), 5e3), i2 = await fetch(e3, { signal: t2.signal });
|
|
450
450
|
if (clearTimeout(n2), !i2.ok) continue;
|
|
451
|
-
const o2 = await i2.json(),
|
|
452
|
-
if (
|
|
451
|
+
const o2 = await i2.json(), a2 = o2.ip || o2.origin || null;
|
|
452
|
+
if (a2 && "string" == typeof a2 && a2.length <= 45) return void sendMessage({ type: "visitorIp", ip: a2, timestamp: w() });
|
|
453
453
|
} catch {
|
|
454
454
|
}
|
|
455
455
|
N = null;
|
|
@@ -488,7 +488,7 @@ async function captureError(e2, t2 = false) {
|
|
|
488
488
|
n3.push(e4);
|
|
489
489
|
continue;
|
|
490
490
|
}
|
|
491
|
-
const [, i3, o3,
|
|
491
|
+
const [, i3, o3, a3, s3] = t4, r3 = parseInt(a3, 10), l2 = Math.max(0, parseInt(s3, 10) - 1);
|
|
492
492
|
if (!Number.isFinite(r3) || !Number.isFinite(l2)) {
|
|
493
493
|
n3.push(e4 + " [Invalid line/column]");
|
|
494
494
|
continue;
|
|
@@ -507,29 +507,29 @@ async function captureError(e2, t2 = false) {
|
|
|
507
507
|
} else n3.push(`${e4} [No mapping found in ${o3}]`);
|
|
508
508
|
}
|
|
509
509
|
return n3;
|
|
510
|
-
})(i2),
|
|
511
|
-
sendMessage({ type: "event", event: { type: 6, timestamp: r2, data: { payload: { message: n2, stack: i2, trace:
|
|
510
|
+
})(i2), a2 = o2.filter((e3) => !e3.includes("chunk-") && !e3.includes("react-dom")), s2 = a2.length > 0 ? a2 : o2, r2 = Date.now();
|
|
511
|
+
sendMessage({ type: "event", event: { type: 6, timestamp: r2, data: { payload: { message: n2, stack: i2, trace: s2, filteredStack: a2, userAgent: navigator.userAgent, url: window.location.href, timestamp: r2, level: "error" } } } });
|
|
512
512
|
}
|
|
513
|
-
const G = readDebugFlag();
|
|
514
513
|
const V = readDebugFlag();
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
514
|
+
const G = readDebugFlag();
|
|
515
|
+
function sendGraphQLRequest(e2, t2, n2, i2 = 5, o2 = 2e3, a2 = 2) {
|
|
516
|
+
const s2 = `${n2.backendApi}/graphql/?apiKey=${n2.apiKey}`;
|
|
517
|
+
return G && console.log(`Initial GraphQL request for ${e2} at ${s2}`), (function exponentialBackoff(e3, t3, n3 = 5, i3 = 2e3, o3 = 2) {
|
|
518
|
+
let a3 = 0;
|
|
519
519
|
const attemptRequest = async () => {
|
|
520
520
|
try {
|
|
521
521
|
return await e3();
|
|
522
522
|
} catch (e4) {
|
|
523
|
-
if (
|
|
524
|
-
const
|
|
525
|
-
return
|
|
523
|
+
if (a3++, a3 > n3) throw e4;
|
|
524
|
+
const s3 = i3 * Math.pow(o3, a3 - 1);
|
|
525
|
+
return V && console.log(`Attempt ${a3} failed: ${t3}; Retrying in ${s3}ms...`), await new Promise((e5) => setTimeout(e5, s3)), attemptRequest();
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
528
|
return attemptRequest();
|
|
529
|
-
})(() => fetch(
|
|
530
|
-
if (
|
|
529
|
+
})(() => fetch(s2, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ operationName: e2, query: t2, variables: n2 }) }).then((e3) => {
|
|
530
|
+
if (G && console.log(`Received response with status: ${e3.status}`), !e3.ok) throw new Error(`GraphQL request failed with status ${e3.status}`);
|
|
531
531
|
return e3.json();
|
|
532
|
-
}), "Sending GraphQL request to Sailfish AI", i2, o2,
|
|
532
|
+
}), "Sending GraphQL request to Sailfish AI", i2, o2, a2);
|
|
533
533
|
}
|
|
534
534
|
function fetchCaptureSettings(e2, t2) {
|
|
535
535
|
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 textEditThrottleEnabled\n }\n }\n ", { apiKey: e2, backendApi: t2 });
|
|
@@ -537,20 +537,20 @@ function fetchCaptureSettings(e2, t2) {
|
|
|
537
537
|
function fetchFunctionSpanTrackingEnabled(e2, t2) {
|
|
538
538
|
return sendGraphQLRequest("GetFunctionSpanTrackingEnabledFromApiKey", "\n query GetFunctionSpanTrackingEnabledFromApiKey($apiKey: String!) {\n isFunctionSpanTrackingEnabledFromApiKey(apiKey: $apiKey)\n }\n ", { apiKey: e2, backendApi: t2 });
|
|
539
539
|
}
|
|
540
|
-
function startRecordingSession(e2, t2, n2, i2, o2,
|
|
541
|
-
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: e2, recordingSessionId: t2, backendApi: n2, serviceIdentifier: i2, serviceVersion: o2, mapUuid:
|
|
540
|
+
function startRecordingSession(e2, t2, n2, i2, o2, a2, s2, r2, l2) {
|
|
541
|
+
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: e2, recordingSessionId: t2, backendApi: n2, serviceIdentifier: i2, serviceVersion: o2, mapUuid: a2, gitSha: s2, library: r2, serviceAdditionalMetadata: l2, startRecordingFilePath: null, startRecordingLineNumber: null });
|
|
542
542
|
}
|
|
543
543
|
function sendDomainsToNotPropagateHeaderTo(e2, t2, n2) {
|
|
544
544
|
return sendGraphQLRequest("DomainsToNotPassHeaderTo", "mutation DomainsToNotPassHeaderTo($apiKey: String!, $domains: [String!]!) {\n domainsToNotPassHeaderTo(apiKey: $apiKey, domains: $domains)\n }", { apiKey: e2, domains: t2, backendApi: n2 });
|
|
545
545
|
}
|
|
546
|
-
function createTriageFromRecorder(e2, t2, n2, i2, o2,
|
|
547
|
-
return sendGraphQLRequest("CreateTriageFromRecorder", "mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String,\n $triageSource: TriageSourceEnum\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description,\n triageSource: $triageSource\n ) {\n id\n }\n }\n ", { apiKey: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description:
|
|
546
|
+
function createTriageFromRecorder(e2, t2, n2, i2, o2, a2, s2) {
|
|
547
|
+
return sendGraphQLRequest("CreateTriageFromRecorder", "mutation CreateTriageFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String,\n $triageSource: TriageSourceEnum\n ) {\n createTriageFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description,\n triageSource: $triageSource\n ) {\n id\n }\n }\n ", { apiKey: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description: a2, triageSource: s2, backendApi: t2 });
|
|
548
548
|
}
|
|
549
549
|
function fetchEngineeringTicketPlatformIntegrations(e2, t2) {
|
|
550
550
|
return sendGraphQLRequest("GetEngineeringTicketPlatformIntegrationsFromApiKey", "query GetEngineeringTicketPlatformIntegrationsFromApiKey($apiKey: String!) {\n getEngineeringTicketPlatformIntegrationsFromApiKey(apiKey: $apiKey) {\n pushAutoIdentifiedIssues\n provider\n clientId\n defaultPriority\n defaultProject\n defaultTeam\n primaryCloudId\n installed\n projects\n teams\n workflowStates\n webhookState\n clouds\n labels\n sprints\n users\n fieldConfigurations\n invalidFields\n jiraReporterAccountId\n }\n }", { apiKey: e2, backendApi: t2 });
|
|
551
551
|
}
|
|
552
|
-
function createTriageAndIssueFromRecorder(e2, t2, n2, i2, o2,
|
|
553
|
-
return sendGraphQLRequest("CreateTriageAndIssueFromRecorder", "mutation CreateTriageAndIssueFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String,\n $issueName: String,\n $issueDescription: String,\n $createEngineeringTicket: Boolean,\n $teamId: String,\n $projectId: String,\n $priority: Int,\n $labels: [String!],\n $issueType: String,\n $customFields: JSON,\n $triageSource: TriageSourceEnum\n ) {\n createTriageAndIssueFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description,\n issueName: $issueName,\n issueDescription: $issueDescription,\n createEngineeringTicket: $createEngineeringTicket,\n teamId: $teamId,\n projectId: $projectId,\n priority: $priority,\n labels: $labels,\n issueType: $issueType,\n customFields: $customFields,\n triageSource: $triageSource\n ) {\n id\n title\n }\n }\n ", { apiKey: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description:
|
|
552
|
+
function createTriageAndIssueFromRecorder(e2, t2, n2, i2, o2, a2, s2, r2, l2, c2, d2, u2, p2, f2, g2, m2) {
|
|
553
|
+
return sendGraphQLRequest("CreateTriageAndIssueFromRecorder", "mutation CreateTriageAndIssueFromRecorder(\n $apiKey: String!,\n $recordingSessionId: String!,\n $timestampStart: String!,\n $timestampEnd: String!,\n $description: String,\n $issueName: String,\n $issueDescription: String,\n $createEngineeringTicket: Boolean,\n $teamId: String,\n $projectId: String,\n $priority: Int,\n $labels: [String!],\n $issueType: String,\n $customFields: JSON,\n $triageSource: TriageSourceEnum\n ) {\n createTriageAndIssueFromRecorder(\n apiKey: $apiKey,\n recordingSessionId: $recordingSessionId,\n timestampStart: $timestampStart,\n timestampEnd: $timestampEnd,\n description: $description,\n issueName: $issueName,\n issueDescription: $issueDescription,\n createEngineeringTicket: $createEngineeringTicket,\n teamId: $teamId,\n projectId: $projectId,\n priority: $priority,\n labels: $labels,\n issueType: $issueType,\n customFields: $customFields,\n triageSource: $triageSource\n ) {\n id\n title\n }\n }\n ", { apiKey: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description: a2, issueName: s2, issueDescription: r2, createEngineeringTicket: l2, teamId: c2, projectId: d2, priority: u2, labels: p2, issueType: f2, customFields: g2, triageSource: m2, backendApi: t2 });
|
|
554
554
|
}
|
|
555
555
|
const Q = ["/node_modules/", "/@sailfish-ai/", "/@sailfish-rrweb/", "/dist/", "/webpack/", "/vite/", "/__vite", "/react-dom/", "/react/", "/scheduler/", "/<", "/chrome-extension://", "/extensions/"];
|
|
556
556
|
function shouldSkipFrame(e2) {
|
|
@@ -652,13 +652,13 @@ function initializeDomContentEvents(e2) {
|
|
|
652
652
|
t2.data.source = i;
|
|
653
653
|
break;
|
|
654
654
|
case "complete":
|
|
655
|
-
t2.data.source =
|
|
655
|
+
t2.data.source = a;
|
|
656
656
|
}
|
|
657
657
|
t2.data.info && sendEvent(t2);
|
|
658
658
|
}), document.addEventListener("DOMContentLoaded", () => {
|
|
659
659
|
sendEvent({ type: 24, data: { source: o }, timestamp: Date.now(), sessionId: e2, ...getUrlAndStoredUuids() });
|
|
660
660
|
}), window.addEventListener("pagehide", () => {
|
|
661
|
-
sendEvent({ type: 24, data: { source:
|
|
661
|
+
sendEvent({ type: 24, data: { source: s }, timestamp: Date.now(), sessionId: e2, ...getUrlAndStoredUuids() });
|
|
662
662
|
});
|
|
663
663
|
}
|
|
664
664
|
async function initializePerformancePlugin(e2) {
|
|
@@ -678,14 +678,14 @@ async function initializePerformancePlugin(e2) {
|
|
|
678
678
|
async function initializeConsolePlugin(e2, n2) {
|
|
679
679
|
const { getRecordConsolePlugin: i2 } = await import("@sailfish-rrweb/rrweb-plugin-console-record");
|
|
680
680
|
await yieldToMain();
|
|
681
|
-
const { name: o2, observer:
|
|
682
|
-
|
|
683
|
-
const i3 = e3, [
|
|
681
|
+
const { name: o2, observer: a2 } = i2(e2);
|
|
682
|
+
a2((e3) => {
|
|
683
|
+
const i3 = e3, [a3, s2] = getCallerLocationFromTrace(i3 == null ? void 0 : i3.trace, 0), [r2, l2] = getCallerLocation(2), c2 = a3 ?? r2, d2 = s2 ?? l2, u2 = { ...i3, sourceFile: c2, sourceLine: d2 };
|
|
684
684
|
sendEvent({ type: t.Plugin, timestamp: Date.now(), data: { plugin: o2, payload: u2 }, sessionId: n2, ...getUrlAndStoredUuids() });
|
|
685
685
|
}, window, e2);
|
|
686
686
|
}
|
|
687
|
-
async function initializeRecording(e2, n2, i2, o2,
|
|
688
|
-
const c2 = initializeWebSocket(n2, i2, o2,
|
|
687
|
+
async function initializeRecording(e2, n2, i2, o2, a2, s2 = true, r2 = false, l2 = false) {
|
|
688
|
+
const c2 = initializeWebSocket(n2, i2, o2, a2, r2);
|
|
689
689
|
try {
|
|
690
690
|
const n3 = (function createThrottledEmit(e3, t2 = 1e3) {
|
|
691
691
|
if (!e3) return { emit: (e4) => sendEvent(e4), flush: () => {
|
|
@@ -700,8 +700,8 @@ async function initializeRecording(e2, n2, i2, o2, s2, a2 = true, r2 = false, l2
|
|
|
700
700
|
const t3 = e4.data, n5 = (t3 == null ? void 0 : t3.adds) && t3.adds.length > 0, i4 = (t3 == null ? void 0 : t3.removes) && t3.removes.length > 0;
|
|
701
701
|
if (n5 || i4) return void sendEvent(e4);
|
|
702
702
|
}
|
|
703
|
-
const
|
|
704
|
-
n4.set(
|
|
703
|
+
const a3 = `3:${o3}:${((_b = e4.data) == null ? void 0 : _b.id) || "unknown"}`;
|
|
704
|
+
n4.set(a3, e4), i3 || (i3 = setInterval(() => {
|
|
705
705
|
0 !== n4.size && (n4.forEach((e5) => sendEvent(e5)), n4.clear());
|
|
706
706
|
}, t2));
|
|
707
707
|
}, flush: () => {
|
|
@@ -718,23 +718,23 @@ async function initializeRecording(e2, n2, i2, o2, s2, a2 = true, r2 = false, l2
|
|
|
718
718
|
}
|
|
719
719
|
const { record: n4 } = await import("@sailfish-rrweb/rrweb-record-only");
|
|
720
720
|
if (J = n4, await yieldToMain(), l2) {
|
|
721
|
-
const { chunkedSnapshot: i3 } = await import("./chunkSerializer-
|
|
722
|
-
let
|
|
723
|
-
const
|
|
721
|
+
const { chunkedSnapshot: i3 } = await import("./chunkSerializer-DOaGGlCg.js"), o3 = n4.mirror;
|
|
722
|
+
let a3 = true;
|
|
723
|
+
const s3 = [];
|
|
724
724
|
n4({ emit(e3) {
|
|
725
|
-
|
|
725
|
+
a3 ? s3.push(e3) : emitWithContext(e3);
|
|
726
726
|
}, maskInputOptions: { text: true }, maskInputFn, ...e2, maskTextClass: e2.maskTextClass ?? X, recordDOM: false });
|
|
727
727
|
const r3 = Date.now(), l3 = await i3(document, o3, { chunkSize: 500, maxChunkMs: 16, blockClass: e2.blockClass, blockSelector: e2.blockSelector, maskTextClass: e2.maskTextClass ?? X, maskTextSelector: e2.maskTextSelector });
|
|
728
728
|
if (l3) {
|
|
729
729
|
emitWithContext({ type: t.Meta, data: { href: window.location.href, width: document.documentElement.clientWidth || document.body.clientWidth, height: document.documentElement.clientHeight || document.body.clientHeight }, timestamp: r3 }), emitWithContext({ type: t.FullSnapshot, data: { node: l3, initialOffset: { left: void 0 !== window.pageXOffset ? window.pageXOffset : document.documentElement.scrollLeft, top: void 0 !== window.pageYOffset ? window.pageYOffset : document.documentElement.scrollTop } }, timestamp: r3 });
|
|
730
|
-
for (const e3 of
|
|
731
|
-
|
|
732
|
-
} else console.warn("[Sailfish] chunkSnapshot serialization failed; session continues without initial DOM snapshot"),
|
|
730
|
+
for (const e3 of s3) emitWithContext(e3);
|
|
731
|
+
a3 = false;
|
|
732
|
+
} else console.warn("[Sailfish] chunkSnapshot serialization failed; session continues without initial DOM snapshot"), a3 = false;
|
|
733
733
|
} else n4({ emit(e3) {
|
|
734
734
|
emitWithContext(e3);
|
|
735
735
|
}, maskInputOptions: { text: true }, maskInputFn, ...e2, maskTextClass: e2.maskTextClass ?? X });
|
|
736
736
|
};
|
|
737
|
-
if (
|
|
737
|
+
if (s2) {
|
|
738
738
|
let e3 = false;
|
|
739
739
|
const startOnce = () => {
|
|
740
740
|
e3 || (e3 = true, startHeavyWork());
|
|
@@ -779,7 +779,7 @@ async function initializeRecording(e2, n2, i2, o2, s2, a2 = true, r2 = false, l2
|
|
|
779
779
|
}
|
|
780
780
|
return c2;
|
|
781
781
|
}
|
|
782
|
-
const
|
|
782
|
+
const ae = [(e2) => (function checkNextJs() {
|
|
783
783
|
try {
|
|
784
784
|
if (void 0 !== globalThis.__NEXT_DATA__) return "nextjs";
|
|
785
785
|
} catch {
|
|
@@ -841,7 +841,7 @@ const se = [(e2) => (function checkNextJs() {
|
|
|
841
841
|
}
|
|
842
842
|
return null;
|
|
843
843
|
}];
|
|
844
|
-
const
|
|
844
|
+
const se = ["jira", "linear", "zendesk"];
|
|
845
845
|
let re = null;
|
|
846
846
|
const le = /* @__PURE__ */ new Map();
|
|
847
847
|
function getIntegrationData() {
|
|
@@ -855,7 +855,7 @@ function resolveIntegration(e2) {
|
|
|
855
855
|
if ((e2 == null ? void 0 : e2.errors) && e2.errors.length > 0) return console.error("GraphQL errors fetching integrations:", e2.errors), null;
|
|
856
856
|
const t2 = (_a = e2 == null ? void 0 : e2.data) == null ? void 0 : _a.getEngineeringTicketPlatformIntegrationsFromApiKey, n2 = (t2 || []).filter((e3) => {
|
|
857
857
|
var _a2;
|
|
858
|
-
return
|
|
858
|
+
return se.includes(((_a2 = e3.provider) == null ? void 0 : _a2.toLowerCase()) || "") && true === e3.installed;
|
|
859
859
|
});
|
|
860
860
|
if (0 === n2.length) return console.warn("No valid installed integrations found"), null;
|
|
861
861
|
const i2 = n2.find((e3) => {
|
|
@@ -941,8 +941,8 @@ function updateIssueTypeOptions(e2, t2) {
|
|
|
941
941
|
}), n3 = i2.find((e3) => {
|
|
942
942
|
var _a2;
|
|
943
943
|
return "task" === ((_a2 = e3.name) == null ? void 0 : _a2.toLowerCase());
|
|
944
|
-
}),
|
|
945
|
-
|
|
944
|
+
}), a2 = (t3 == null ? void 0 : t3.id) || (n3 == null ? void 0 : n3.id) || ((_a = i2[0]) == null ? void 0 : _a.id);
|
|
945
|
+
a2 ? (e2.value = a2, e2.style.color = "#000") : (o2.selected = true, e2.style.color = "#9ca3af");
|
|
946
946
|
}
|
|
947
947
|
}
|
|
948
948
|
function getFieldsForProject(e2, t2) {
|
|
@@ -960,12 +960,40 @@ function getDefaultReporterAccountId() {
|
|
|
960
960
|
const n3 = e2.filter(t3);
|
|
961
961
|
return 1 === n3.length ? n3[0] : null;
|
|
962
962
|
};
|
|
963
|
-
let
|
|
964
|
-
if (!
|
|
963
|
+
let a2 = i2 ? findUnique((e3) => (e3.email || e3.emailAddress || "").toLowerCase().trim() === i2) : null;
|
|
964
|
+
if (!a2 && o2 && (a2 = findUnique((e3) => (e3.name || e3.displayName || "").toLowerCase().trim() === o2)), !a2 && i2) {
|
|
965
965
|
const e3 = i2.split("@")[0];
|
|
966
|
-
e3.length >= 3 && (
|
|
966
|
+
e3.length >= 3 && (a2 = findUnique((t3) => (t3.name || t3.displayName || "").toLowerCase().trim().includes(e3)));
|
|
967
967
|
}
|
|
968
|
-
return
|
|
968
|
+
return a2 && (a2.id || a2.accountId) || null;
|
|
969
|
+
}
|
|
970
|
+
function lastReporterStorageKey() {
|
|
971
|
+
if (!re) return null;
|
|
972
|
+
const e2 = re.primaryCloudId || re.provider || "";
|
|
973
|
+
return e2 ? `sf-veritas:lastReporter:${e2}` : null;
|
|
974
|
+
}
|
|
975
|
+
function getSavedLastReporterAccountId() {
|
|
976
|
+
if ("undefined" == typeof window || "undefined" == typeof localStorage) return null;
|
|
977
|
+
const e2 = lastReporterStorageKey();
|
|
978
|
+
if (!e2) return null;
|
|
979
|
+
try {
|
|
980
|
+
return localStorage.getItem(e2);
|
|
981
|
+
} catch {
|
|
982
|
+
return null;
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
function saveLastReporterAccountId(e2) {
|
|
986
|
+
if ("undefined" == typeof window || "undefined" == typeof localStorage) return;
|
|
987
|
+
const t2 = lastReporterStorageKey();
|
|
988
|
+
if (t2 && e2) try {
|
|
989
|
+
localStorage.setItem(t2, e2);
|
|
990
|
+
} catch {
|
|
991
|
+
}
|
|
992
|
+
}
|
|
993
|
+
function getValidSavedReporterAccountId() {
|
|
994
|
+
const e2 = getSavedLastReporterAccountId();
|
|
995
|
+
if (!e2) return null;
|
|
996
|
+
return getUsers().some((t2) => (t2.accountId || t2.id) === e2 && false !== t2.active) ? e2 : null;
|
|
969
997
|
}
|
|
970
998
|
function getProjectsForTeam(e2) {
|
|
971
999
|
if (!re) return [];
|
|
@@ -987,10 +1015,10 @@ function updateFormWithIntegrationData(e2) {
|
|
|
987
1015
|
}
|
|
988
1016
|
const o2 = document.getElementById("sf-eng-ticket-priority");
|
|
989
1017
|
o2 && (populatePriorityOptions(o2, re.provider || "", re.defaultPriority), e2.engTicketPriority ? o2.value = String(e2.engTicketPriority) : e2.engTicketPriority = Number(o2.value));
|
|
990
|
-
const
|
|
991
|
-
|
|
1018
|
+
const a2 = document.getElementById("sf-eng-ticket-sprint"), s2 = "jira" === ((_a = re.provider) == null ? void 0 : _a.toLowerCase());
|
|
1019
|
+
a2 && s2 && re.sprints && populateSprintOptions(a2, re.sprints, e2.engTicketSprint || void 0);
|
|
992
1020
|
const r2 = document.getElementById("sf-eng-ticket-type");
|
|
993
|
-
return r2 &&
|
|
1021
|
+
return r2 && s2 && e2.engTicketProject && (updateIssueTypeOptions(r2, e2.engTicketProject), e2.engTicketIssueType ? (r2.value = e2.engTicketIssueType, r2.style.color = "#000") : r2.value && (e2.engTicketIssueType = r2.value)), e2;
|
|
994
1022
|
}
|
|
995
1023
|
const ce = Object.freeze(Object.defineProperty({ __proto__: null, fetchIntegrationData: async function fetchIntegrationData(e2, t2) {
|
|
996
1024
|
if (!re) try {
|
|
@@ -999,7 +1027,7 @@ const ce = Object.freeze(Object.defineProperty({ __proto__: null, fetchIntegrati
|
|
|
999
1027
|
} catch (e3) {
|
|
1000
1028
|
console.error("Error fetching integration data:", e3), re = null;
|
|
1001
1029
|
}
|
|
1002
|
-
}, getDefaultReporterAccountId, getFieldsForProject, getIntegrationData, getProjectsForTeam, getSprintFieldId, getUsers, hasValidIntegration, populatePriorityOptions, populateSelectOptions, populateSprintOptions, refreshIntegrationData, updateFormWithIntegrationData, updateIssueTypeOptions }, Symbol.toStringTag, { value: "Module" })), de = "sf-create-issue-preference", ue = "sf-create-eng-ticket-preference";
|
|
1030
|
+
}, getDefaultReporterAccountId, getFieldsForProject, getIntegrationData, getProjectsForTeam, getSavedLastReporterAccountId, getSprintFieldId, getUsers, getValidSavedReporterAccountId, hasValidIntegration, populatePriorityOptions, populateSelectOptions, populateSprintOptions, refreshIntegrationData, saveLastReporterAccountId, updateFormWithIntegrationData, updateIssueTypeOptions }, Symbol.toStringTag, { value: "Module" })), de = "sf-create-issue-preference", ue = "sf-create-eng-ticket-preference";
|
|
1003
1031
|
function getInitialState() {
|
|
1004
1032
|
const e2 = (function loadUserPreferences() {
|
|
1005
1033
|
return { createIssue: f && "true" === localStorage.getItem(de), createEngTicket: f && "true" === localStorage.getItem(ue) };
|
|
@@ -1065,16 +1093,16 @@ function setupCustomMultiSelectListeners(e2, t2) {
|
|
|
1065
1093
|
</span>`);
|
|
1066
1094
|
}
|
|
1067
1095
|
});
|
|
1068
|
-
const
|
|
1069
|
-
return
|
|
1096
|
+
const a2 = n2.querySelector(".sf-multiselect-chips");
|
|
1097
|
+
return a2 && (a2.innerHTML = o2.join("") || '<span style="color:#9ca3af;">Select...</span>', a2.querySelectorAll(".sf-multiselect-chip-remove").forEach((e4) => {
|
|
1070
1098
|
e4.addEventListener("click", (n3) => {
|
|
1071
1099
|
n3.stopPropagation();
|
|
1072
|
-
const o3 = e4.dataset.value || "",
|
|
1073
|
-
|
|
1074
|
-
const
|
|
1100
|
+
const o3 = e4.dataset.value || "", a3 = i2.querySelector(`.sf-multiselect-option[data-value="${o3}"]`);
|
|
1101
|
+
a3 && (a3.dataset.selected = "false", a3.style.backgroundColor = ""), updateChipsDisplay();
|
|
1102
|
+
const s2 = [];
|
|
1075
1103
|
i2.querySelectorAll(".sf-multiselect-option").forEach((e5) => {
|
|
1076
|
-
"true" === e5.dataset.selected &&
|
|
1077
|
-
}), t2(
|
|
1104
|
+
"true" === e5.dataset.selected && s2.push(e5.dataset.value || "");
|
|
1105
|
+
}), t2(s2);
|
|
1078
1106
|
});
|
|
1079
1107
|
})), e3;
|
|
1080
1108
|
}
|
|
@@ -1083,8 +1111,8 @@ function setupCustomMultiSelectListeners(e2, t2) {
|
|
|
1083
1111
|
n3.stopPropagation();
|
|
1084
1112
|
const i3 = e3, o2 = "true" === i3.dataset.selected;
|
|
1085
1113
|
i3.dataset.selected = String(!o2), i3.style.backgroundColor = o2 ? "" : "#e0f2fe";
|
|
1086
|
-
const
|
|
1087
|
-
t2(
|
|
1114
|
+
const a2 = updateChipsDisplay();
|
|
1115
|
+
t2(a2);
|
|
1088
1116
|
});
|
|
1089
1117
|
}), updateChipsDisplay(), document.addEventListener("click", (e3) => {
|
|
1090
1118
|
const t3 = e3.target;
|
|
@@ -1097,12 +1125,12 @@ function renderDynamicFields(e2, t2) {
|
|
|
1097
1125
|
if (!e2) return void (n2.innerHTML = '<div style="font-size:14px; color:#64748B;">Select a project to see additional fields</div>');
|
|
1098
1126
|
const i2 = getFieldsForProject(e2, t2), o2 = getUsers();
|
|
1099
1127
|
if (!i2 || 0 === i2.length) return void (n2.innerHTML = "");
|
|
1100
|
-
const
|
|
1128
|
+
const a2 = i2.map((e3) => (function renderDynamicField(e4, t3, n3 = []) {
|
|
1101
1129
|
var _a, _b, _c, _d;
|
|
1102
|
-
const i3 = e4.fieldId || e4.key, o3 = e4.name,
|
|
1103
|
-
if (d2.includes(i3) || d2.includes(
|
|
1130
|
+
const i3 = e4.fieldId || e4.key, o3 = e4.name, a3 = (_a = e4.schema) == null ? void 0 : _a.type, s2 = (_b = e4.schema) == null ? void 0 : _b.system, r2 = (_c = e4.schema) == null ? void 0 : _c.custom, l2 = e4.required || false, c2 = e4.allowedValues, d2 = ["summary", "description", "project", "issuetype", "priority"];
|
|
1131
|
+
if (d2.includes(i3) || d2.includes(s2)) return null;
|
|
1104
1132
|
const u2 = l2 ? '<span style="color:#ef4444;">*</span>' : "", p2 = "width:100%; padding:8px 12px; font-size:14px; border:1px solid #cbd5e1; border-radius:6px; outline:none;";
|
|
1105
|
-
switch (
|
|
1133
|
+
switch (a3) {
|
|
1106
1134
|
case "string":
|
|
1107
1135
|
return r2 && r2.includes("textarea") ? `
|
|
1108
1136
|
<div>
|
|
@@ -1176,7 +1204,7 @@ function renderDynamicFields(e2, t2) {
|
|
|
1176
1204
|
const e5 = n3.map((e6) => {
|
|
1177
1205
|
const n4 = e6.email ? `${e6.name} (${e6.email})` : e6.name, i4 = t3 === e6.id ? "selected" : "";
|
|
1178
1206
|
return `<option value="${e6.id}" ${i4}>${n4}</option>`;
|
|
1179
|
-
}).join(""),
|
|
1207
|
+
}).join(""), a4 = t3 && n3.some((e6) => e6.id === t3);
|
|
1180
1208
|
return `
|
|
1181
1209
|
<div>
|
|
1182
1210
|
<label for="${i3}" style="display:block; font-size:14px; font-weight:500; margin-bottom:6px;">
|
|
@@ -1186,10 +1214,10 @@ function renderDynamicFields(e2, t2) {
|
|
|
1186
1214
|
id="${i3}"
|
|
1187
1215
|
class="sf-dynamic-field"
|
|
1188
1216
|
data-field-id="${i3}"
|
|
1189
|
-
style="${p2} appearance:none; cursor:pointer; background-color: white; ${
|
|
1217
|
+
style="${p2} appearance:none; cursor:pointer; background-color: white; ${a4 ? "" : "color: #9ca3af;"}"
|
|
1190
1218
|
${l2 ? "required" : ""}
|
|
1191
1219
|
>
|
|
1192
|
-
<option value="" ${
|
|
1220
|
+
<option value="" ${a4 ? "" : "selected"} style="color: #9ca3af;">Select ${o3.toLowerCase()}...</option>
|
|
1193
1221
|
${e5}
|
|
1194
1222
|
</select>
|
|
1195
1223
|
</div>
|
|
@@ -1222,7 +1250,7 @@ function renderDynamicFields(e2, t2) {
|
|
|
1222
1250
|
}
|
|
1223
1251
|
return null;
|
|
1224
1252
|
case "array":
|
|
1225
|
-
return "labels" ===
|
|
1253
|
+
return "labels" === s2 ? null : c2 && c2.length > 0 ? renderCustomMultiSelect(i3, o3, c2, Array.isArray(t3) ? t3 : [], l2) : null;
|
|
1226
1254
|
case "parent":
|
|
1227
1255
|
case "issuelink":
|
|
1228
1256
|
return `
|
|
@@ -1262,7 +1290,7 @@ function renderDynamicFields(e2, t2) {
|
|
|
1262
1290
|
` : null;
|
|
1263
1291
|
}
|
|
1264
1292
|
})(e3, pe.engTicketCustomFields[e3.fieldId || e3.key], o2)).filter(Boolean).join("");
|
|
1265
|
-
n2.innerHTML =
|
|
1293
|
+
n2.innerHTML = a2 || "", i2.forEach((e3) => {
|
|
1266
1294
|
var _a;
|
|
1267
1295
|
const t3 = e3.fieldId || e3.key, n3 = (_a = e3.schema) == null ? void 0 : _a.type, i3 = e3.allowedValues;
|
|
1268
1296
|
"array" === n3 && i3 && i3.length > 0 && setupCustomMultiSelectListeners(t3, (e4) => {
|
|
@@ -1319,10 +1347,10 @@ function activateModalIsolation(e2) {
|
|
|
1319
1347
|
n3 && (e2.contains(n3) || (t3.stopImmediatePropagation(), t3.preventDefault(), refocus()));
|
|
1320
1348
|
}, o2 = ["mousedown", "mouseup", "click", "pointerdown", "pointerup", "touchstart", "touchend", "wheel", "keydown", "keyup", "focus", "focusin", "focusout", "blur"];
|
|
1321
1349
|
o2.forEach((e3) => document.addEventListener(e3, quarantine, true));
|
|
1322
|
-
let
|
|
1350
|
+
let a2 = 0, s2 = null;
|
|
1323
1351
|
const r2 = t2 instanceof HTMLTextAreaElement ? t2 : null, refocus = () => {
|
|
1324
|
-
if ((e2.querySelector(":focus") || r2 || t2 || e2).focus({ preventScroll: true }), r2 && document.activeElement === r2 &&
|
|
1325
|
-
r2.setSelectionRange(
|
|
1352
|
+
if ((e2.querySelector(":focus") || r2 || t2 || e2).focus({ preventScroll: true }), r2 && document.activeElement === r2 && s2) try {
|
|
1353
|
+
r2.setSelectionRange(s2.start, s2.end, "none");
|
|
1326
1354
|
} catch {
|
|
1327
1355
|
}
|
|
1328
1356
|
}, selectionInsideModal = () => {
|
|
@@ -1340,12 +1368,12 @@ function activateModalIsolation(e2) {
|
|
|
1340
1368
|
const t3 = document.activeElement, n3 = t3 === document.body || null == t3 || !e2.contains(t3), i3 = selectionInsideModal();
|
|
1341
1369
|
n3 && !i3 ? (l2 += 1, l2 >= 2 && (refocus(), l2 = 0)) : (l2 = 0, (() => {
|
|
1342
1370
|
if (r2 && document.activeElement === r2) try {
|
|
1343
|
-
|
|
1371
|
+
s2 = { start: r2.selectionStart ?? r2.value.length, end: r2.selectionEnd ?? r2.value.length };
|
|
1344
1372
|
} catch {
|
|
1345
1373
|
}
|
|
1346
|
-
})()),
|
|
1374
|
+
})()), a2 = window.requestAnimationFrame(watchdog);
|
|
1347
1375
|
};
|
|
1348
|
-
|
|
1376
|
+
a2 = window.requestAnimationFrame(watchdog);
|
|
1349
1377
|
const onBlurLike = () => {
|
|
1350
1378
|
setTimeout(() => {
|
|
1351
1379
|
const t3 = document.activeElement;
|
|
@@ -1357,7 +1385,7 @@ function activateModalIsolation(e2) {
|
|
|
1357
1385
|
n2.remove(), i2.remove();
|
|
1358
1386
|
} catch {
|
|
1359
1387
|
}
|
|
1360
|
-
o2.forEach((e3) => document.removeEventListener(e3, quarantine, true)), window.removeEventListener("blur", onBlurLike, true), document.removeEventListener("focusout", onBlurLike, true),
|
|
1388
|
+
o2.forEach((e3) => document.removeEventListener(e3, quarantine, true)), window.removeEventListener("blur", onBlurLike, true), document.removeEventListener("focusout", onBlurLike, true), a2 && cancelAnimationFrame(a2);
|
|
1361
1389
|
};
|
|
1362
1390
|
}
|
|
1363
1391
|
function injectModalHTML(e2 = "lookback") {
|
|
@@ -1565,8 +1593,8 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1565
1593
|
o2 && o2.addEventListener("change", () => {
|
|
1566
1594
|
"lookback" === pe.mode && (i2.disabled = false, i2.style.opacity = "1", i2.style.cursor = "pointer");
|
|
1567
1595
|
});
|
|
1568
|
-
const
|
|
1569
|
-
|
|
1596
|
+
const a2 = we == null ? void 0 : we.querySelectorAll(".sf-collapsible-header");
|
|
1597
|
+
a2 == null ? void 0 : a2.forEach((e4) => {
|
|
1570
1598
|
e4.addEventListener("click", (e5) => {
|
|
1571
1599
|
const t4 = e5.currentTarget, n3 = t4.dataset.target, i3 = document.getElementById(n3), o3 = t4.querySelector(".sf-chevron");
|
|
1572
1600
|
if (i3 && o3) {
|
|
@@ -1577,21 +1605,21 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1577
1605
|
}
|
|
1578
1606
|
});
|
|
1579
1607
|
});
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1582
|
-
const e4 =
|
|
1608
|
+
const s2 = document.getElementById("sf-create-issue-checkbox"), r2 = document.getElementById("sf-issue-fields-container"), l2 = document.getElementById("sf-create-eng-ticket-checkbox"), c2 = document.getElementById("sf-eng-ticket-fields-container");
|
|
1609
|
+
s2 && s2.addEventListener("change", () => {
|
|
1610
|
+
const e4 = s2.checked;
|
|
1583
1611
|
pe.createIssue = e4, localStorage.setItem(de, String(e4)), r2 && (r2.style.display = e4 ? "block" : "none"), !e4 && l2 && (l2.checked = false, pe.createEngTicket = false, localStorage.setItem(ue, "false"), c2 && (c2.style.display = "none"));
|
|
1584
1612
|
});
|
|
1585
1613
|
l2 && l2.addEventListener("change", async () => {
|
|
1586
1614
|
var _a;
|
|
1587
1615
|
const e4 = l2.checked;
|
|
1588
|
-
if (pe.createEngTicket = e4, localStorage.setItem(ue, String(e4)), e4 && !pe.createIssue && (pe.createIssue = true, localStorage.setItem(de, "true"),
|
|
1616
|
+
if (pe.createEngTicket = e4, localStorage.setItem(ue, String(e4)), e4 && !pe.createIssue && (pe.createIssue = true, localStorage.setItem(de, "true"), s2 && (s2.checked = true), r2 && (r2.style.display = "block")), c2 && (c2.style.display = e4 ? "block" : "none"), e4) {
|
|
1589
1617
|
if (!hasValidIntegration()) return l2.checked = false, pe.createEngTicket = false, localStorage.setItem(ue, "false"), c2 && (c2.style.display = "none"), void alert("No engineering ticket integration found. Please install and configure an integration (Jira, Linear, or Zendesk) first.");
|
|
1590
1618
|
const e5 = getIntegrationData();
|
|
1591
1619
|
if (e5) {
|
|
1592
1620
|
if (!pe.engTicketTeam && e5.defaultTeam && (pe.engTicketTeam = e5.defaultTeam), !pe.engTicketProject && e5.defaultProject && (pe.engTicketProject = e5.defaultProject), !pe.engTicketPriority && e5.defaultPriority && (pe.engTicketPriority = e5.defaultPriority), updateFormWithIntegrationData(pe), "jira" === ((_a = e5.provider) == null ? void 0 : _a.toLowerCase()) && pe.engTicketProject && !pe.engTicketCustomFields.reporter) {
|
|
1593
1621
|
if (getFieldsForProject(pe.engTicketProject, pe.engTicketIssueType).find((e6) => "reporter" === e6.fieldId)) {
|
|
1594
|
-
const t5 = getDefaultReporterAccountId();
|
|
1622
|
+
const t5 = getValidSavedReporterAccountId() || getDefaultReporterAccountId();
|
|
1595
1623
|
pe.engTicketCustomFields.reporter = t5 || e5.jiraReporterAccountId || "";
|
|
1596
1624
|
}
|
|
1597
1625
|
}
|
|
@@ -1667,7 +1695,7 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1667
1695
|
i3 = Date.now(), n3 = i3 - e6;
|
|
1668
1696
|
}
|
|
1669
1697
|
if (pe.createIssue) {
|
|
1670
|
-
const o3 = document.getElementById("sf-issue-name"),
|
|
1698
|
+
const o3 = document.getElementById("sf-issue-name"), a3 = document.getElementById("sf-eng-ticket-team"), s3 = document.getElementById("sf-eng-ticket-project"), r3 = document.getElementById("sf-eng-ticket-priority"), l3 = document.getElementById("sf-eng-ticket-type"), c3 = (o3 == null ? void 0 : o3.value) || "", d3 = e5, u2 = (a3 == null ? void 0 : a3.value) || "", p2 = (s3 == null ? void 0 : s3.value) || "", f2 = r3 ? Number(r3.value) : 0, g2 = pe.engTicketLabels, m2 = (l3 == null ? void 0 : l3.value) || "", h2 = { ...pe.engTicketCustomFields };
|
|
1671
1699
|
document.querySelectorAll(".sf-dynamic-field").forEach((e6) => {
|
|
1672
1700
|
const t5 = e6, n4 = t5.dataset.fieldId;
|
|
1673
1701
|
n4 && ("checkbox" === t5.type ? h2[n4] = t5.checked : "number" === t5.type ? h2[n4] = parseFloat(t5.value) || null : t5.classList.contains("sf-custom-multiselect") || (h2[n4] = t5.value));
|
|
@@ -1677,11 +1705,11 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1677
1705
|
const e6 = getSprintFieldId();
|
|
1678
1706
|
h2[e6] = parseInt(b2, 10);
|
|
1679
1707
|
}
|
|
1680
|
-
closeModal(), (async function createTriageAndIssue(e6, t5, n4, i4, o4,
|
|
1708
|
+
closeModal(), (async function createTriageAndIssue(e6, t5, n4, i4, o4, a4, s4, r4, l4, c4, d4, u3, p3) {
|
|
1681
1709
|
var _a2, _b, _c;
|
|
1682
1710
|
try {
|
|
1683
1711
|
showStatusModal(true);
|
|
1684
|
-
const f3 = await createTriageAndIssueFromRecorder(be.apiKey, be.backendApi, getSessionIdSafely(), e6, t5, n4, i4, o4,
|
|
1712
|
+
const f3 = await createTriageAndIssueFromRecorder(be.apiKey, be.backendApi, getSessionIdSafely(), e6, t5, n4, i4, o4, a4, s4, r4, l4, c4, d4, u3, p3);
|
|
1685
1713
|
if ((_a2 = f3 == null ? void 0 : f3.errors) == null ? void 0 : _a2.length) {
|
|
1686
1714
|
const e7 = f3.errors.map((e8) => e8.message).join("; ");
|
|
1687
1715
|
return console.error("GraphQL error creating triage and issue:", e7), void showStatusModal(false, null, e7);
|
|
@@ -1701,8 +1729,8 @@ function injectModalHTML(e2 = "lookback") {
|
|
|
1701
1729
|
const e7 = o3.errors.map((e8) => e8.message).join("; ");
|
|
1702
1730
|
return console.error("GraphQL error creating triage:", e7), void showStatusModal(false, null, e7);
|
|
1703
1731
|
}
|
|
1704
|
-
const
|
|
1705
|
-
|
|
1732
|
+
const a3 = (_c = (_b = o3 == null ? void 0 : o3.data) == null ? void 0 : _b.createTriageFromRecorder) == null ? void 0 : _c.id;
|
|
1733
|
+
a3 ? showStatusModal(false, { type: "triage", id: a3 }) : (console.error("No Triage ID returned from backend."), showStatusModal(false, null, "No triage was created. Please try again."));
|
|
1706
1734
|
} catch (e7) {
|
|
1707
1735
|
console.error("Error creating triage:", e7), showStatusModal(false, null, "Something went wrong. Please try again.");
|
|
1708
1736
|
}
|
|
@@ -1729,7 +1757,7 @@ function initializeEngTicketForm() {
|
|
|
1729
1757
|
if (e2) {
|
|
1730
1758
|
if (!pe.engTicketTeam && e2.defaultTeam && (pe.engTicketTeam = e2.defaultTeam), !pe.engTicketProject && e2.defaultProject && (pe.engTicketProject = e2.defaultProject), !pe.engTicketPriority && e2.defaultPriority && (pe.engTicketPriority = e2.defaultPriority), updateFormWithIntegrationData(pe), "jira" === ((_a = e2.provider) == null ? void 0 : _a.toLowerCase()) && pe.engTicketProject && !pe.engTicketCustomFields.reporter) {
|
|
1731
1759
|
if (getFieldsForProject(pe.engTicketProject, pe.engTicketIssueType).find((e3) => "reporter" === e3.fieldId)) {
|
|
1732
|
-
const t2 = getDefaultReporterAccountId();
|
|
1760
|
+
const t2 = getValidSavedReporterAccountId() || getDefaultReporterAccountId();
|
|
1733
1761
|
pe.engTicketCustomFields.reporter = t2 || e2.jiraReporterAccountId || "";
|
|
1734
1762
|
}
|
|
1735
1763
|
}
|
|
@@ -1742,18 +1770,18 @@ function setActiveTab(e2) {
|
|
|
1742
1770
|
"lookback" === e2 ? (t2.style.background = "white", t2.style.color = "#0F172A", n2.style.background = "transparent", n2.style.color = "#64748B") : (n2.style.background = "white", n2.style.color = "#0F172A", t2.style.background = "transparent", t2.style.color = "#64748B");
|
|
1743
1771
|
}
|
|
1744
1772
|
function updateModeSpecificUI(e2) {
|
|
1745
|
-
const t2 = document.querySelector("#sf-issue-mode-info div"), n2 = document.getElementById("sf-issue-submit-btn"), i2 = document.getElementById("sf-record-button-container"), o2 = document.getElementById("sf-recording-timer-label"),
|
|
1746
|
-
if (t2 && n2 && i2 && o2 &&
|
|
1747
|
-
i2.style.display = "block", r2.style.display = "none",
|
|
1773
|
+
const t2 = document.querySelector("#sf-issue-mode-info div"), n2 = document.getElementById("sf-issue-submit-btn"), i2 = document.getElementById("sf-record-button-container"), o2 = document.getElementById("sf-recording-timer-label"), a2 = document.getElementById("sf-recording-timer-display"), s2 = document.getElementById("sf-modal-footer"), r2 = document.getElementById("sf-lookback-container");
|
|
1774
|
+
if (t2 && n2 && i2 && o2 && a2 && s2 && r2) if ("startnow" === e2) {
|
|
1775
|
+
i2.style.display = "block", r2.style.display = "none", s2.style.justifyContent = "space-between", t2.textContent = "I want to reproduce the issue right now.";
|
|
1748
1776
|
const e3 = null !== fe && null !== ge;
|
|
1749
1777
|
if (n2.disabled = !e3, n2.style.opacity = e3 ? "1" : "0.4", n2.style.cursor = e3 ? "pointer" : "not-allowed", fe && ge) {
|
|
1750
1778
|
const e4 = Math.floor((ge - fe) / 1e3), t3 = String(Math.floor(e4 / 60)).padStart(2, "0"), n3 = String(e4 % 60).padStart(2, "0");
|
|
1751
|
-
o2.style.display = "block",
|
|
1779
|
+
o2.style.display = "block", a2.textContent = `${t3}:${n3}`;
|
|
1752
1780
|
} else o2.style.display = "none";
|
|
1753
|
-
} else i2.style.display = "none", o2.style.display = "none", r2.style.display = "block",
|
|
1781
|
+
} else i2.style.display = "none", o2.style.display = "none", r2.style.display = "block", s2.style.justifyContent = "flex-end", t2.textContent = "Something already happened. Capture the past few minutes.", n2.disabled = false, n2.style.opacity = "1", n2.style.cursor = "pointer";
|
|
1754
1782
|
}
|
|
1755
1783
|
function bindEngTicketListeners() {
|
|
1756
|
-
const e2 = document.getElementById("sf-eng-ticket-team"), t2 = document.getElementById("sf-eng-ticket-project"), n2 = document.getElementById("sf-eng-ticket-priority"), i2 = document.getElementById("sf-eng-ticket-labels-container"), o2 = document.getElementById("sf-eng-ticket-type"),
|
|
1784
|
+
const e2 = document.getElementById("sf-eng-ticket-team"), t2 = document.getElementById("sf-eng-ticket-project"), n2 = document.getElementById("sf-eng-ticket-priority"), i2 = document.getElementById("sf-eng-ticket-labels-container"), o2 = document.getElementById("sf-eng-ticket-type"), a2 = document.getElementById("sf-eng-ticket-sprint");
|
|
1757
1785
|
e2 && e2.addEventListener("change", () => {
|
|
1758
1786
|
pe.engTicketTeam = e2.value, e2.style.color = e2.value ? "" : "#9ca3af";
|
|
1759
1787
|
const t3 = document.getElementById("sf-eng-ticket-project");
|
|
@@ -1771,13 +1799,13 @@ function bindEngTicketListeners() {
|
|
|
1771
1799
|
const e3 = getIntegrationData();
|
|
1772
1800
|
if (e3 && o2 && (updateIssueTypeOptions(o2, t2.value), pe.engTicketIssueType = o2.value), e3 && "jira" === ((_a = e3.provider) == null ? void 0 : _a.toLowerCase()) && t2.value) {
|
|
1773
1801
|
if (getFieldsForProject(t2.value, pe.engTicketIssueType).find((e4) => "reporter" === e4.fieldId)) {
|
|
1774
|
-
const t3 = getDefaultReporterAccountId();
|
|
1802
|
+
const t3 = getValidSavedReporterAccountId() || getDefaultReporterAccountId();
|
|
1775
1803
|
pe.engTicketCustomFields.reporter = t3 || e3.jiraReporterAccountId || "";
|
|
1776
1804
|
}
|
|
1777
1805
|
}
|
|
1778
1806
|
renderDynamicFields(t2.value, pe.engTicketIssueType);
|
|
1779
|
-
}),
|
|
1780
|
-
pe.engTicketSprint =
|
|
1807
|
+
}), a2 && a2.addEventListener("change", () => {
|
|
1808
|
+
pe.engTicketSprint = a2.value, a2.style.color = a2.value ? "" : "#9ca3af";
|
|
1781
1809
|
}), n2 && n2.addEventListener("change", () => {
|
|
1782
1810
|
pe.engTicketPriority = Number(n2.value);
|
|
1783
1811
|
}), i2 && setupCustomMultiSelectListeners("sf-eng-ticket-labels", (e3) => {
|
|
@@ -1790,18 +1818,18 @@ function bindEngTicketListeners() {
|
|
|
1790
1818
|
pe.engTicketCustomFields = {}, t3 && (pe.engTicketCustomFields.reporter = t3), renderDynamicFields(e3.value, o2.value);
|
|
1791
1819
|
}
|
|
1792
1820
|
});
|
|
1793
|
-
const
|
|
1794
|
-
|
|
1821
|
+
const s2 = document.getElementById("sf-dynamic-fields-container");
|
|
1822
|
+
s2 && (s2.addEventListener("input", (e3) => {
|
|
1795
1823
|
const t3 = e3.target;
|
|
1796
1824
|
if (t3.classList.contains("sf-dynamic-field")) {
|
|
1797
1825
|
const e4 = t3.dataset.fieldId;
|
|
1798
1826
|
e4 && ("checkbox" === t3.type ? pe.engTicketCustomFields[e4] = t3.checked : "number" === t3.type ? pe.engTicketCustomFields[e4] = parseFloat(t3.value) || null : pe.engTicketCustomFields[e4] = t3.value);
|
|
1799
1827
|
}
|
|
1800
|
-
}),
|
|
1828
|
+
}), s2.addEventListener("change", (e3) => {
|
|
1801
1829
|
const t3 = e3.target;
|
|
1802
1830
|
if (t3.classList.contains("sf-dynamic-field")) {
|
|
1803
1831
|
const e4 = t3.dataset.fieldId;
|
|
1804
|
-
if (e4 && (pe.engTicketCustomFields[e4] = t3.value), "SELECT" === t3.tagName) {
|
|
1832
|
+
if (e4 && (pe.engTicketCustomFields[e4] = t3.value, "reporter" === e4 && t3.value && saveLastReporterAccountId(t3.value)), "SELECT" === t3.tagName) {
|
|
1805
1833
|
const e5 = t3;
|
|
1806
1834
|
e5.style.color = e5.value ? "" : "#9ca3af";
|
|
1807
1835
|
}
|
|
@@ -1835,10 +1863,10 @@ async function stopRecording() {
|
|
|
1835
1863
|
i2 && (i2.value = pe.description);
|
|
1836
1864
|
const o2 = document.querySelector('input[value="startnow"]');
|
|
1837
1865
|
o2 && (o2.checked = true);
|
|
1838
|
-
const
|
|
1839
|
-
if (
|
|
1866
|
+
const a2 = document.getElementById("sf-inline-record-chip"), s2 = document.getElementById("sf-inline-record-timer");
|
|
1867
|
+
if (a2 && s2) {
|
|
1840
1868
|
const e3 = Math.floor(((ge ?? 0) - (fe ?? 0)) / 1e3), t3 = Math.floor(e3 / 60).toString().padStart(2, "0"), n3 = Math.floor(e3 % 60).toString().padStart(2, "0");
|
|
1841
|
-
|
|
1869
|
+
s2.textContent = `${t3}:${n3}`, s2.style.color = "black", a2.style.display = "flex";
|
|
1842
1870
|
}
|
|
1843
1871
|
const r2 = document.getElementById("sf-issue-submit-btn");
|
|
1844
1872
|
r2.disabled = false, r2.style.opacity = "1", r2.style.cursor = "pointer";
|
|
@@ -1851,10 +1879,10 @@ function showStatusModal(e2, t2, n2) {
|
|
|
1851
1879
|
var _a2, _b;
|
|
1852
1880
|
(_a2 = document.getElementById("sf-report-issue-modal")) == null ? void 0 : _a2.remove(), (_b = document.getElementById("sf-triage-status-modal")) == null ? void 0 : _b.remove();
|
|
1853
1881
|
})();
|
|
1854
|
-
const o2 = !e3 && i2,
|
|
1855
|
-
|
|
1882
|
+
const o2 = !e3 && i2, a2 = n3 ? `${be.triageBaseUrl}/issues/${n3}?from=inAppReportIssue` : t3 ? `${be.triageBaseUrl}/triage/${t3}?from=inAppReportIssue` : "", s2 = document.createElement("div");
|
|
1883
|
+
s2.id = "sf-triage-status-modal", Object.assign(s2.style, { position: "fixed", inset: "0", zIndex: "9998", display: "flex", alignItems: "center", justifyContent: "center" });
|
|
1856
1884
|
const r2 = e3 ? "Reporting Issue..." : o2 ? "Failed to report issue" : "Issue reported!", l2 = e3 ? '<p style="font-size:14px; color:#64748b; line-height:20px;">This may take ~10 seconds</p>' : o2 ? `<p style="font-size:14px; color:#ef4444; line-height:20px;">${i2}</p>` : "", c2 = e3 ? '<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>' : "", d2 = e3 ? "" : '<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>';
|
|
1857
|
-
|
|
1885
|
+
s2.innerHTML = `
|
|
1858
1886
|
<div style="position:fixed; inset:0; background:rgba(0,0,0,0.4); z-index:9998;"></div>
|
|
1859
1887
|
<div id="sf-triage-card"
|
|
1860
1888
|
style="position:relative; background:#fff; padding:24px; border-radius:12px; width:300px; max-width:90%;
|
|
@@ -1895,20 +1923,20 @@ function showStatusModal(e2, t2, n2) {
|
|
|
1895
1923
|
<style>
|
|
1896
1924
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
1897
1925
|
</style>
|
|
1898
|
-
`, document.body.appendChild(
|
|
1899
|
-
const u2 =
|
|
1926
|
+
`, document.body.appendChild(s2);
|
|
1927
|
+
const u2 = s2.querySelector("#sf-triage-card");
|
|
1900
1928
|
(_a = document.getElementById("sf-triage-modal-close")) == null ? void 0 : _a.addEventListener("click", () => {
|
|
1901
|
-
fadeCardAndRemove(
|
|
1929
|
+
fadeCardAndRemove(s2, u2, 300);
|
|
1902
1930
|
});
|
|
1903
1931
|
const p2 = document.getElementById("sf-copy-triage-link"), f2 = document.getElementById("sf-view-triage-btn");
|
|
1904
1932
|
e3 ? (p2.disabled = true, p2.style.opacity = "0.4", p2.style.cursor = "not-allowed", f2.disabled = true, f2.style.opacity = "0.4", f2.style.cursor = "not-allowed") : (p2.disabled = false, p2.addEventListener("click", () => {
|
|
1905
|
-
navigator.clipboard.writeText(
|
|
1933
|
+
navigator.clipboard.writeText(a2).then(() => {
|
|
1906
1934
|
const e4 = document.getElementById("sf-copied-status");
|
|
1907
1935
|
e4 && (e4.style.display = "flex");
|
|
1908
1936
|
});
|
|
1909
1937
|
}), f2.disabled = false, f2.addEventListener("click", () => {
|
|
1910
|
-
(t3 || n3) && window.open(
|
|
1911
|
-
}), o2 || setTimeout(() => fadeCardAndRemove(
|
|
1938
|
+
(t3 || n3) && window.open(a2, "_blank");
|
|
1939
|
+
}), o2 || setTimeout(() => fadeCardAndRemove(s2, u2, 300), 1e4));
|
|
1912
1940
|
})(e2, "triage" === (t2 == null ? void 0 : t2.type) ? t2.id : void 0, "issue" === (t2 == null ? void 0 : t2.type) ? t2.id : void 0, n2);
|
|
1913
1941
|
}
|
|
1914
1942
|
function fadeCardAndRemove(e2, t2, n2 = 300) {
|
|
@@ -1931,18 +1959,18 @@ const Se = Object.freeze(Object.defineProperty({ __proto__: null, ReportIssueCon
|
|
|
1931
1959
|
const n2 = (function isTypingInInput() {
|
|
1932
1960
|
const e4 = document.activeElement;
|
|
1933
1961
|
return e4 instanceof HTMLInputElement || e4 instanceof HTMLTextAreaElement || e4 instanceof HTMLElement && e4.isContentEditable;
|
|
1934
|
-
})(), i2 = e3.key.toLowerCase(), o2 = e3.metaKey || e3.ctrlKey,
|
|
1962
|
+
})(), i2 = e3.key.toLowerCase(), o2 = e3.metaKey || e3.ctrlKey, a2 = !!document.getElementById("sf-report-issue-modal"), s2 = !n2 && (t2.enabled || a2), shortcutUsed = (e4) => i2 === t2[e4].key && o2 === t2[e4].requireCmdCtrl, r2 = a2 ? (e4) => {
|
|
1935
1963
|
setActiveTab(e4), updateModeSpecificUI(e4);
|
|
1936
1964
|
} : injectModalHTML;
|
|
1937
|
-
if (
|
|
1938
|
-
if (
|
|
1939
|
-
if (
|
|
1940
|
-
if (
|
|
1965
|
+
if (s2 && shortcutUsed("openModalExistingMode")) return e3.preventDefault(), void r2("lookback");
|
|
1966
|
+
if (s2 && shortcutUsed("openModalCaptureNewMode")) return e3.preventDefault(), void r2("startnow");
|
|
1967
|
+
if (a2 && !he && shortcutUsed("closeModal")) return e3.preventDefault(), void closeModal();
|
|
1968
|
+
if (a2 && shortcutUsed("submitReport")) {
|
|
1941
1969
|
const t3 = document.getElementById("sf-issue-submit-btn");
|
|
1942
1970
|
return void (t3 && !t3.disabled && (e3.preventDefault(), t3.click()));
|
|
1943
1971
|
}
|
|
1944
1972
|
if (he && i2 === t2.stopRecording.key && o2 === t2.stopRecording.requireCmdCtrl) return e3.preventDefault(), void stopRecording();
|
|
1945
|
-
if (
|
|
1973
|
+
if (a2 && "startnow" === pe.mode && i2 === t2.startRecording.key && o2 === t2.startRecording.requireCmdCtrl && !n2) {
|
|
1946
1974
|
const t3 = document.getElementById("sf-start-recording-btn");
|
|
1947
1975
|
return void (t3 && (e3.preventDefault(), t3.click()));
|
|
1948
1976
|
}
|
|
@@ -1959,8 +1987,8 @@ function maskAuthorizationHeader(e2) {
|
|
|
1959
1987
|
if (!t2) return;
|
|
1960
1988
|
const n2 = e2[t2], i2 = n2.indexOf(" ");
|
|
1961
1989
|
if (-1 !== i2) {
|
|
1962
|
-
const o2 = n2.slice(0, i2 + 1),
|
|
1963
|
-
|
|
1990
|
+
const o2 = n2.slice(0, i2 + 1), a2 = n2.slice(i2 + 1);
|
|
1991
|
+
a2.length > 8 ? e2[t2] = o2 + a2.slice(0, 4) + "*".repeat(a2.length - 8) + a2.slice(-4) : e2[t2] = o2 + "*".repeat(a2.length);
|
|
1964
1992
|
} else n2.length > 8 ? e2[t2] = n2.slice(0, 4) + "*".repeat(n2.length - 8) + n2.slice(-4) : e2[t2] = "*".repeat(n2.length);
|
|
1965
1993
|
}
|
|
1966
1994
|
function trackDomainChangesOnce() {
|
|
@@ -2026,24 +2054,24 @@ function _ensureModuleSideEffects() {
|
|
|
2026
2054
|
}));
|
|
2027
2055
|
}
|
|
2028
2056
|
function matchParsedUrlAgainstPatterns(e2, t2) {
|
|
2029
|
-
const { hostname: n2, pathname: i2, port: o2 } = e2,
|
|
2057
|
+
const { hostname: n2, pathname: i2, port: o2 } = e2, a2 = n2.startsWith("www.") ? n2.slice(4).toLowerCase() : n2.toLowerCase();
|
|
2030
2058
|
return t2.some((e3) => {
|
|
2031
2059
|
const t3 = String(e3 || "").replace(/^[a-zA-Z]+:\/\//, "");
|
|
2032
|
-
let [n3,
|
|
2060
|
+
let [n3, s2] = t3.split("/", 2), r2 = "";
|
|
2033
2061
|
n3.includes(":") && ([n3, r2] = n3.split(":"));
|
|
2034
|
-
const l2 = getCachedRegex(`^${n3.replace(/\./g, "\\.").replace(/\*/g, ".*")}$`, "i"), c2 =
|
|
2062
|
+
const l2 = getCachedRegex(`^${n3.replace(/\./g, "\\.").replace(/\*/g, ".*")}$`, "i"), c2 = a2.startsWith("www.") ? a2.slice(4) : a2;
|
|
2035
2063
|
if (r2 && "*" !== r2 && o2 !== r2) return false;
|
|
2036
2064
|
if (n3.startsWith("*.")) {
|
|
2037
2065
|
const e4 = n3.slice(2).toLowerCase();
|
|
2038
|
-
if (!(
|
|
2039
|
-
if (
|
|
2040
|
-
return getCachedRegex(`^/${
|
|
2066
|
+
if (!(a2 === e4 || c2 === e4 || a2.endsWith("." + e4))) return false;
|
|
2067
|
+
if (s2) {
|
|
2068
|
+
return getCachedRegex(`^/${s2.replace(/\*/g, ".*").replace(/\/$/, "")}`, "i").test(i2);
|
|
2041
2069
|
}
|
|
2042
2070
|
return true;
|
|
2043
2071
|
}
|
|
2044
|
-
if (!l2.test(c2) && !l2.test(
|
|
2045
|
-
if (
|
|
2046
|
-
return getCachedRegex(`^/${
|
|
2072
|
+
if (!l2.test(c2) && !l2.test(a2)) return false;
|
|
2073
|
+
if (s2) {
|
|
2074
|
+
return getCachedRegex(`^/${s2.replace(/\*/g, ".*").replace(/\/$/, "")}`, "i").test(i2);
|
|
2047
2075
|
}
|
|
2048
2076
|
return true;
|
|
2049
2077
|
});
|
|
@@ -2068,12 +2096,12 @@ function createSkipHeadersPropagationChecker(e2 = [], t2 = []) {
|
|
|
2068
2096
|
} catch {
|
|
2069
2097
|
return true;
|
|
2070
2098
|
}
|
|
2071
|
-
const
|
|
2072
|
-
return !(-1 ===
|
|
2099
|
+
const a2 = o2.pathname.toLowerCase(), s2 = a2.lastIndexOf(".");
|
|
2100
|
+
return !(-1 === s2 || !Ie.has(a2.slice(s2))) || (!(!i2 || matchParsedUrlAgainstPatterns(o2, t2)) || !!matchParsedUrlAgainstPatterns(o2, n2));
|
|
2073
2101
|
};
|
|
2074
2102
|
}
|
|
2075
2103
|
function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 1e4 }, i2 = []) {
|
|
2076
|
-
const o2 = window.fetch,
|
|
2104
|
+
const o2 = window.fetch, a2 = getOrSetSessionId(), s2 = createSkipHeadersPropagationChecker(e2, i2), r2 = ["text/event-stream", "application/x-ndjson", "application/stream+json", "application/grpc", "application/grpc-web"], l2 = ["application/octet-stream"];
|
|
2077
2105
|
window.fetch = new Proxy(o2, { apply: async (e3, i3, o3) => {
|
|
2078
2106
|
let c2, d2 = o3[0], u2 = o3[1] || {};
|
|
2079
2107
|
if ("string" == typeof d2) c2 = d2;
|
|
@@ -2082,27 +2110,27 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2082
2110
|
if (!(d2 instanceof URL)) return e3.apply(i3, o3);
|
|
2083
2111
|
c2 = d2.href;
|
|
2084
2112
|
}
|
|
2085
|
-
return
|
|
2113
|
+
return s2(c2) ? e3.apply(i3, o3) : (async function injectHeaderWrapper(e4, i4, o4, a3, s3, c3, d3) {
|
|
2086
2114
|
var _a, _b;
|
|
2087
2115
|
if (!c3) return e4.apply(i4, o4);
|
|
2088
2116
|
let u3 = uuidv4();
|
|
2089
|
-
const p2 = getUrlAndStoredUuids(), f2 =
|
|
2117
|
+
const p2 = getUrlAndStoredUuids(), f2 = s3.method || "GET", g2 = Date.now();
|
|
2090
2118
|
let m2, h2 = {}, y2 = null;
|
|
2091
2119
|
try {
|
|
2092
|
-
if (
|
|
2093
|
-
|
|
2120
|
+
if (a3 instanceof Request) {
|
|
2121
|
+
a3.headers.forEach((e5, t3) => {
|
|
2094
2122
|
h2[t3] = e5;
|
|
2095
2123
|
});
|
|
2096
2124
|
try {
|
|
2097
|
-
y2 =
|
|
2125
|
+
y2 = a3.clone();
|
|
2098
2126
|
} catch (e5) {
|
|
2099
2127
|
y2 = null;
|
|
2100
2128
|
}
|
|
2101
|
-
} else
|
|
2129
|
+
} else s3.headers && (s3.headers instanceof Headers ? s3.headers.forEach((e5, t3) => {
|
|
2102
2130
|
h2[t3] = e5;
|
|
2103
|
-
}) : Array.isArray(
|
|
2131
|
+
}) : Array.isArray(s3.headers) ? s3.headers.forEach(([e5, t3]) => {
|
|
2104
2132
|
h2[e5] = t3;
|
|
2105
|
-
}) : h2 = { ...
|
|
2133
|
+
}) : h2 = { ...s3.headers }), m2 = s3.body;
|
|
2106
2134
|
} catch (e5) {
|
|
2107
2135
|
ke && console.warn("[Sailfish] Failed to capture request data:", e5);
|
|
2108
2136
|
}
|
|
@@ -2113,32 +2141,32 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2113
2141
|
h2[n] = w2, b2 && (h2[b2.name] = b2.value);
|
|
2114
2142
|
maskAuthorizationHeader(h2);
|
|
2115
2143
|
try {
|
|
2116
|
-
let b3 = await (async function injectHeader(e5, t3, i5, o5,
|
|
2144
|
+
let b3 = await (async function injectHeader(e5, t3, i5, o5, a4, s4, r3) {
|
|
2117
2145
|
const l3 = getFuncSpanHeader();
|
|
2118
2146
|
if (i5 instanceof Request) {
|
|
2119
2147
|
const c4 = i5.clone(), d4 = new Headers(c4.headers);
|
|
2120
|
-
d4.set(n, `${
|
|
2148
|
+
d4.set(n, `${a4}/${s4}/${r3}`), l3 && (d4.set(l3.name, l3.value), ke && console.log("[Sailfish] Added funcspan header to HTTP Request:", { url: i5.url, header: l3.name }));
|
|
2121
2149
|
const u4 = new Request(c4, { headers: d4 });
|
|
2122
2150
|
return await e5.call(t3, u4, o5);
|
|
2123
2151
|
}
|
|
2124
2152
|
{
|
|
2125
2153
|
const c4 = { ...o5 }, d4 = new Headers(o5.headers || {});
|
|
2126
|
-
return d4.set(n, `${
|
|
2154
|
+
return d4.set(n, `${a4}/${s4}/${r3}`), l3 && (d4.set(l3.name, l3.value), ke && console.log("[Sailfish] Added funcspan header to HTTP fetch:", { url: "string" == typeof i5 ? i5 : i5.href, header: l3.name })), c4.headers = d4, await e5.call(t3, i5, c4);
|
|
2127
2155
|
}
|
|
2128
|
-
})(e4, i4,
|
|
2156
|
+
})(e4, i4, a3, s3, c3, p2.page_visit_uuid, u3), w3 = false;
|
|
2129
2157
|
Ee.includes(b3.status) && (ke && console.log("Perform retry as status was fail:", b3), delete h2[n], b3 = await (async function retryWithoutPropagateHeaders(e5, t3, i5, o5) {
|
|
2130
2158
|
try {
|
|
2131
|
-
let o6 = i5[0],
|
|
2159
|
+
let o6 = i5[0], a4 = i5[1] || {};
|
|
2132
2160
|
if ("string" == typeof o6 || o6 instanceof URL) {
|
|
2133
|
-
const i6 = { ...
|
|
2134
|
-
|
|
2161
|
+
const i6 = { ...a4 }, s4 = new Headers(a4.headers || {});
|
|
2162
|
+
s4.delete(n), i6.headers = s4;
|
|
2135
2163
|
return await e5.call(t3, o6, i6);
|
|
2136
2164
|
}
|
|
2137
2165
|
if (o6 instanceof Request) {
|
|
2138
|
-
const i6 = o6.clone(),
|
|
2139
|
-
|
|
2140
|
-
const r3 = new Request(i6, { headers:
|
|
2141
|
-
return await e5.call(t3, r3,
|
|
2166
|
+
const i6 = o6.clone(), s4 = new Headers(i6.headers);
|
|
2167
|
+
s4.delete(n);
|
|
2168
|
+
const r3 = new Request(i6, { headers: s4 });
|
|
2169
|
+
return await e5.call(t3, r3, a4);
|
|
2142
2170
|
}
|
|
2143
2171
|
return e5.apply(t3, i5);
|
|
2144
2172
|
} catch (e6) {
|
|
@@ -2177,18 +2205,18 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2177
2205
|
(async function readStreamPrefix(e5, t3, n2) {
|
|
2178
2206
|
const i5 = e5.body;
|
|
2179
2207
|
if (!i5) return null;
|
|
2180
|
-
const o5 = i5.getReader(),
|
|
2208
|
+
const o5 = i5.getReader(), a4 = new TextDecoder(), s4 = [];
|
|
2181
2209
|
let r3 = 0;
|
|
2182
2210
|
const readWithLimit = async () => {
|
|
2183
2211
|
try {
|
|
2184
2212
|
for (; r3 < t3; ) {
|
|
2185
2213
|
const { done: e6, value: t4 } = await o5.read();
|
|
2186
2214
|
if (e6) break;
|
|
2187
|
-
r3 += t4.byteLength,
|
|
2215
|
+
r3 += t4.byteLength, s4.push(a4.decode(t4, { stream: true }));
|
|
2188
2216
|
}
|
|
2189
|
-
return
|
|
2217
|
+
return s4.push(a4.decode()), s4.join("");
|
|
2190
2218
|
} catch {
|
|
2191
|
-
return
|
|
2219
|
+
return s4.length > 0 ? s4.join("") : null;
|
|
2192
2220
|
} finally {
|
|
2193
2221
|
try {
|
|
2194
2222
|
o5.cancel();
|
|
@@ -2202,7 +2230,7 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2202
2230
|
o5.cancel();
|
|
2203
2231
|
} catch {
|
|
2204
2232
|
}
|
|
2205
|
-
e6(
|
|
2233
|
+
e6(s4.length > 0 ? s4.join("") : null);
|
|
2206
2234
|
}, n2))]);
|
|
2207
2235
|
} catch {
|
|
2208
2236
|
try {
|
|
@@ -2229,7 +2257,7 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2229
2257
|
}
|
|
2230
2258
|
return b3;
|
|
2231
2259
|
} catch (t3) {
|
|
2232
|
-
const n2 = Date.now(),
|
|
2260
|
+
const n2 = Date.now(), a4 = false, s4 = ((_a = t3.response) == null ? void 0 : _a.status) || 500, r3 = t3.message || "Fetch request failed";
|
|
2233
2261
|
if (t3 instanceof TypeError && ((_b = t3 == null ? void 0 : t3.message) == null ? void 0 : _b.toLowerCase().includes(Ce.toLowerCase()))) return e4.apply(i4, o4);
|
|
2234
2262
|
let l3 = m2;
|
|
2235
2263
|
if (y2) try {
|
|
@@ -2237,12 +2265,12 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
|
|
|
2237
2265
|
} catch {
|
|
2238
2266
|
l3 = null;
|
|
2239
2267
|
}
|
|
2240
|
-
throw sendEvent({ type: 27, timestamp: n2, sessionId: c3, data: { request_id: u3, session_id: c3, timestamp_start: g2, timestamp_end: n2, response_code:
|
|
2268
|
+
throw sendEvent({ type: 27, timestamp: n2, sessionId: c3, data: { request_id: u3, session_id: c3, timestamp_start: g2, timestamp_end: n2, response_code: s4, success: a4, error: r3, method: f2, url: d3, request_headers: h2, request_body: l3, response_body: null }, ...p2 }), t3;
|
|
2241
2269
|
}
|
|
2242
|
-
})(e3, i3, o3, d2, u2,
|
|
2270
|
+
})(e3, i3, o3, d2, u2, a2, c2);
|
|
2243
2271
|
} });
|
|
2244
2272
|
}
|
|
2245
|
-
async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo: i2 = ["*"], domainsToNotPropagateHeaderTo: o2 = [], serviceVersion:
|
|
2273
|
+
async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo: i2 = ["*"], domainsToNotPropagateHeaderTo: o2 = [], serviceVersion: a2, serviceIdentifier: s2, gitSha: r2, serviceAdditionalMetadata: l2, enableIpTracking: c2, captureStreamingResponseBody: d2 = true, captureResponseBodyMaxMb: u2 = 10, captureStreamPrefixKb: p2 = 64, captureStreamTimeoutMs: f2 = 1e4, enableFiberTracking: m2 = false, deferRecording: h2, deferRecordingStart: y2, chunkSnapshot: b2, useWsWorker: w2 = true, capturePerformanceMetrics: v2 = true, maskTextClass: S2, library: k2, headlessRecording: x2 = false }) {
|
|
2246
2274
|
var _a, _b;
|
|
2247
2275
|
if (!x2 && (function isHeadlessOrLighthouse() {
|
|
2248
2276
|
try {
|
|
@@ -2259,16 +2287,16 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2259
2287
|
if (E2.sessionId = T2, E2.apiKey = e2, E2.backendApi = t2, E2.serviceAdditionalMetadata = l2, E2.initialized && E2.sessionId === T2 && E2.ws && 1 === E2.ws.readyState) return void trackDomainChangesOnce();
|
|
2260
2288
|
const C2 = { captureStreamingResponseBody: d2, captureResponseBodyMaxMb: u2, captureStreamPrefixKb: p2, captureStreamTimeoutMs: f2 };
|
|
2261
2289
|
sessionStorage.getItem("pageVisitUUID") || (sessionStorage.setItem("pageVisitUUID", uuidv4()), invalidateUrlCache()), E2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e3 = [], t3 = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 1e4 }, i3 = []) {
|
|
2262
|
-
const o3 = XMLHttpRequest.prototype.open,
|
|
2290
|
+
const o3 = XMLHttpRequest.prototype.open, a3 = XMLHttpRequest.prototype.send, s3 = XMLHttpRequest.prototype.setRequestHeader, r3 = getOrSetSessionId(), l3 = createSkipHeadersPropagationChecker(e3, i3);
|
|
2263
2291
|
XMLHttpRequest.prototype.setRequestHeader = function(e4, t4) {
|
|
2264
|
-
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e4] = t4,
|
|
2292
|
+
return this._capturedRequestHeaders || (this._capturedRequestHeaders = {}), this._capturedRequestHeaders[e4] = t4, s3.call(this, e4, t4);
|
|
2265
2293
|
}, XMLHttpRequest.prototype.open = function(e4, t4, ...n2) {
|
|
2266
2294
|
return this._requestUrl = "string" == typeof t4 && t4.length > 0 ? t4 : null, this._requestMethod = e4, this._capturedRequestHeaders = {}, o3.apply(this, [e4, t4, ...n2]);
|
|
2267
2295
|
}, XMLHttpRequest.prototype.send = function(...e4) {
|
|
2268
2296
|
const i4 = this._requestUrl;
|
|
2269
|
-
if (!i4) return
|
|
2270
|
-
if (l3(i4)) return
|
|
2271
|
-
const o4 = sessionStorage.getItem("pageVisitUUID"),
|
|
2297
|
+
if (!i4) return a3.apply(this, e4);
|
|
2298
|
+
if (l3(i4)) return a3.apply(this, e4);
|
|
2299
|
+
const o4 = sessionStorage.getItem("pageVisitUUID"), s4 = uuidv4(), c3 = `${r3}/${o4}/${s4}`;
|
|
2272
2300
|
try {
|
|
2273
2301
|
this.setRequestHeader(n, c3);
|
|
2274
2302
|
} catch (e5) {
|
|
@@ -2284,11 +2312,11 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2284
2312
|
let p3 = false;
|
|
2285
2313
|
const f3 = e4[0], g2 = { ...this._capturedRequestHeaders };
|
|
2286
2314
|
maskAuthorizationHeader(g2);
|
|
2287
|
-
const emitFinished = (e5, t4, n2, o5,
|
|
2315
|
+
const emitFinished = (e5, t4, n2, o5, a4) => {
|
|
2288
2316
|
if (p3) return;
|
|
2289
2317
|
p3 = true;
|
|
2290
2318
|
const l4 = Date.now();
|
|
2291
|
-
sendEvent({ type: 27, timestamp: l4, sessionId: r3, data: { request_id:
|
|
2319
|
+
sendEvent({ type: 27, timestamp: l4, sessionId: r3, data: { request_id: s4, session_id: r3, timestamp_start: u3, timestamp_end: l4, response_code: t4, success: e5, error: n2, method: this._requestMethod, url: i4, request_headers: g2, request_body: f3, response_headers: a4, response_body: o5 }, ...getUrlAndStoredUuids() });
|
|
2292
2320
|
};
|
|
2293
2321
|
return this.addEventListener("load", () => {
|
|
2294
2322
|
const e5 = this.status || 0;
|
|
@@ -2321,7 +2349,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2321
2349
|
}, { once: true }), this.addEventListener("error", () => {
|
|
2322
2350
|
const e5 = this.status || 0, t4 = 0 === e5 ? "Network or CORS failure" : this.statusText || `Error ${e5}`;
|
|
2323
2351
|
emitFinished(false, e5, t4);
|
|
2324
|
-
}, { once: true }),
|
|
2352
|
+
}, { once: true }), a3.apply(this, e4);
|
|
2325
2353
|
};
|
|
2326
2354
|
})(o2, C2, i2), E2.xhrPatched = true), E2.fetchPatched || (setupFetchInterceptor(o2, C2, i2), E2.fetchPatched = true), await yieldToMain(), E2.domEventsInit || (initializeDomContentEvents(T2), E2.domEventsInit = true), await yieldToMain(), E2.consoleInit || (initializeConsolePlugin(Ae, T2), E2.consoleInit = true), await yieldToMain(), E2.errorInit || (!(function initializeErrorInterceptor() {
|
|
2327
2355
|
window.addEventListener("error", (e3) => {
|
|
@@ -2357,7 +2385,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2357
2385
|
if ("string" == typeof e3 && e3) return e3;
|
|
2358
2386
|
} catch {
|
|
2359
2387
|
}
|
|
2360
|
-
})(), i3 =
|
|
2388
|
+
})(), i3 = s2 ?? "", o3 = a2 ?? "", c3 = k2 ?? "JS/TS", d3 = (function getMapUuidFromWindow() {
|
|
2361
2389
|
try {
|
|
2362
2390
|
const e3 = window;
|
|
2363
2391
|
if (e3 && "string" == typeof e3.sfMapUuid && e3.sfMapUuid) return e3.sfMapUuid;
|
|
@@ -2370,7 +2398,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2370
2398
|
} catch {
|
|
2371
2399
|
}
|
|
2372
2400
|
const n3 = t3, i4 = [];
|
|
2373
|
-
for (const e4 of
|
|
2401
|
+
for (const e4 of ae) {
|
|
2374
2402
|
const t4 = e4(n3);
|
|
2375
2403
|
t4 && !i4.includes(t4) && i4.push(t4);
|
|
2376
2404
|
}
|
|
@@ -2385,7 +2413,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
|
|
|
2385
2413
|
const i4 = await initializeRecording(y3, t2, e2, T2, n3, I2, w2, b2 ?? false);
|
|
2386
2414
|
E2.ws = i4, E2.initialized = true, trackDomainChangesOnce(), E2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e3 = "", t3 = "") {
|
|
2387
2415
|
window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e3, serviceVersion: t3 } });
|
|
2388
|
-
})(
|
|
2416
|
+
})(s2, a2), E2.sentMapUuidOnce = true);
|
|
2389
2417
|
} else console.error("Failed to start recording session:", h3.errors || h3);
|
|
2390
2418
|
} catch (e3) {
|
|
2391
2419
|
console.error("Error starting recording:", e3);
|
|
@@ -2397,14 +2425,14 @@ const initRecorder = async (e2) => {
|
|
|
2397
2425
|
return clearPageVisitDataFromSessionStorage(), t2.initialized && t2.sessionId === n2 && t2.ws && 1 === t2.ws.readyState ? void 0 : (t2.initPromise || (t2.initPromise = (async () => {
|
|
2398
2426
|
try {
|
|
2399
2427
|
if (t2.hasLoggedInitOnce || (console.log("Initializing Sailfish Recorder (first run) …"), t2.hasLoggedInitOnce = true), await startRecording(e2), !t2.issueReportingInit) {
|
|
2400
|
-
const n3 = e2.backendApi ?? "https://api-service.sailfishqa.com", [{ setupIssueReporting: i2 }, { fetchIntegrationData: o2, getIntegrationData:
|
|
2401
|
-
let
|
|
2428
|
+
const n3 = e2.backendApi ?? "https://api-service.sailfishqa.com", [{ setupIssueReporting: i2 }, { fetchIntegrationData: o2, getIntegrationData: a2 }] = await Promise.all([Promise.resolve().then(() => Se), Promise.resolve().then(() => ce)]);
|
|
2429
|
+
let s2 = null;
|
|
2402
2430
|
try {
|
|
2403
|
-
await o2(e2.apiKey, n3),
|
|
2431
|
+
await o2(e2.apiKey, n3), s2 = a2();
|
|
2404
2432
|
} catch (e3) {
|
|
2405
2433
|
console.warn("[Sailfish] Failed to fetch integration data for issue reporting:", e3);
|
|
2406
2434
|
}
|
|
2407
|
-
i2({ apiKey: e2.apiKey, backendApi: n3, getSessionId: () => getOrSetSessionId(), shortcuts: e2.reportIssueShortcuts, customBaseUrl: e2.customBaseUrl, integrationData:
|
|
2435
|
+
i2({ apiKey: e2.apiKey, backendApi: n3, getSessionId: () => getOrSetSessionId(), shortcuts: e2.reportIssueShortcuts, customBaseUrl: e2.customBaseUrl, integrationData: s2, showEngTicketFieldsInReportIssueModalDefault: e2.showEngTicketFieldsInReportIssueModalDefault }), t2.issueReportingInit = true;
|
|
2408
2436
|
}
|
|
2409
2437
|
} catch (e3) {
|
|
2410
2438
|
console.warn("[Sailfish] Recorder initialization failed:", e3);
|