@sailfish-ai/recorder 1.10.9 → 1.10.10

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.
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const e = require("./index-B8gnDRst.js");
3
+ const e = require("./index-B8AEJs-g.js");
4
4
  exports.chunkedSnapshot = async function chunkedSnapshot(t, n, o = {}) {
5
5
  const s = o.chunkSize ?? 500, r = o.maxChunkMs ?? 16, { blockClass: c, blockSelector: a, maskTextClass: i, maskTextSelector: d } = o;
6
6
  let u = 100001, l = 0, N = performance.now();
@@ -1,4 +1,4 @@
1
- import { y as e } from "./index-w2Ted1rp.js";
1
+ import { y as e } from "./index-Dd5rk8Gj.js";
2
2
  async function chunkedSnapshot(t, n, o = {}) {
3
3
  const s = o.chunkSize ?? 500, r = o.maxChunkMs ?? 16, { blockClass: c, blockSelector: a, maskTextClass: i, maskTextSelector: d } = o;
4
4
  let u = 100001, l = 0, N = performance.now();
@@ -391,7 +391,7 @@ function initializeWebSocket(t2, n2, i2, o2, s2 = false) {
391
391
  const t3 = new URL(e2);
392
392
  return `${t3.hostname}${t3.port ? `:${t3.port}` : ""}`;
393
393
  })(t2);
394
- let r2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${a2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.10.9`;
394
+ let r2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${a2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.10.10`;
395
395
  if (o2 && (r2 += `&envValue=${encodeURIComponent(o2)}`), k = s2 ? (function tryCreateWsWorker() {
396
396
  if ("undefined" == typeof Worker) return null;
397
397
  try {
@@ -446,8 +446,8 @@ function getFuncSpanHeader() {
446
446
  }
447
447
  return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-1-10-10-1-1.0-1-0-0" };
448
448
  }
449
- const z = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, ensureHrefCache, flushBufferedEvents, getCachedHref, getCachedHrefNoQuery, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, onNavigationChange, restoreFuncSpanState, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
450
- let O = null, U = null;
449
+ const O = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, ensureHrefCache, flushBufferedEvents, getCachedHref, getCachedHrefNoQuery, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, onNavigationChange, restoreFuncSpanState, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
450
+ let z = null, U = null;
451
451
  let H = null;
452
452
  const N = ["https://api.ipify.org?format=json", "https://api.ip.sb/jsonip", "https://api4.my-ip.io/ip.json"];
453
453
  function fetchAndSendIp(e2) {
@@ -550,14 +550,14 @@ function startRecordingSession(e2, t2, n2, i2, o2, s2, a2, r2, l2) {
550
550
  function sendDomainsToNotPropagateHeaderTo(e2, t2, n2) {
551
551
  return sendGraphQLRequest("DomainsToNotPassHeaderTo", "mutation DomainsToNotPassHeaderTo($apiKey: String!, $domains: [String!]!) {\n domainsToNotPassHeaderTo(apiKey: $apiKey, domains: $domains)\n }", { apiKey: e2, domains: t2, backendApi: n2 });
552
552
  }
553
- function createTriageFromRecorder(e2, t2, n2, i2, o2, s2) {
554
- 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: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description: s2, backendApi: t2 });
553
+ function createTriageFromRecorder(e2, t2, n2, i2, o2, s2, a2) {
554
+ 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: s2, triageSource: a2, backendApi: t2 });
555
555
  }
556
556
  function fetchEngineeringTicketPlatformIntegrations(e2, t2) {
557
557
  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 });
558
558
  }
559
- function createTriageAndIssueFromRecorder(e2, t2, n2, i2, o2, s2, a2, r2, l2, c2, d2, u2, p2, f2, g2) {
560
- 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 ) {\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 ) {\n id\n title\n }\n }\n ", { apiKey: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description: s2, issueName: a2, issueDescription: r2, createEngineeringTicket: l2, teamId: c2, projectId: d2, priority: u2, labels: p2, issueType: f2, customFields: g2, backendApi: t2 });
559
+ function createTriageAndIssueFromRecorder(e2, t2, n2, i2, o2, s2, a2, r2, l2, c2, d2, u2, p2, f2, g2, m2) {
560
+ 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: s2, issueName: a2, issueDescription: r2, createEngineeringTicket: l2, teamId: c2, projectId: d2, priority: u2, labels: p2, issueType: f2, customFields: g2, triageSource: m2, backendApi: t2 });
561
561
  }
562
562
  const Q = ["/node_modules/", "/@sailfish-ai/", "/@sailfish-rrweb/", "/dist/", "/webpack/", "/vite/", "/__vite", "/react-dom/", "/react/", "/scheduler/", "/<", "/chrome-extension://", "/extensions/"];
563
563
  function shouldSkipFrame(e2) {
@@ -713,7 +713,7 @@ async function initializeRecording(e2, n2, i2, o2, s2, a2 = true, r2 = false, l2
713
713
  }
714
714
  const { record: n4 } = await import("@sailfish-rrweb/rrweb-record-only");
715
715
  if (J = n4, await yieldToMain(), l2) {
716
- const { chunkedSnapshot: i3 } = await Promise.resolve().then(() => require("./chunkSerializer-DdlgLmEH.js")), o3 = n4.mirror;
716
+ const { chunkedSnapshot: i3 } = await Promise.resolve().then(() => require("./chunkSerializer-B1506M_Q.js")), o3 = n4.mirror;
717
717
  let s3 = true;
718
718
  const a3 = [];
719
719
  n4({ emit(e3) {
@@ -1535,7 +1535,7 @@ function injectModalHTML(e2 = "lookback") {
1535
1535
  pe = e6;
1536
1536
  })(Date.now()), setIsRecording(true);
1537
1537
  try {
1538
- const { enableFunctionSpanTracking: e6 } = await Promise.resolve().then(() => z);
1538
+ const { enableFunctionSpanTracking: e6 } = await Promise.resolve().then(() => O);
1539
1539
  e6();
1540
1540
  } catch (e6) {
1541
1541
  console.error("[Report Issue] Failed to enable function span tracking:", e6);
@@ -1583,46 +1583,46 @@ function injectModalHTML(e2 = "lookback") {
1583
1583
  i3 = Date.now(), n3 = i3 - e6;
1584
1584
  }
1585
1585
  if (ue.createIssue) {
1586
- const t5 = document.getElementById("sf-issue-name"), o3 = document.getElementById("sf-eng-ticket-team"), s3 = document.getElementById("sf-eng-ticket-project"), a3 = document.getElementById("sf-eng-ticket-priority"), r3 = document.getElementById("sf-eng-ticket-type"), l3 = (t5 == null ? void 0 : t5.value) || "", c3 = e5, d3 = (o3 == null ? void 0 : o3.value) || "", u2 = (s3 == null ? void 0 : s3.value) || "", p2 = a3 ? Number(a3.value) : 0, f2 = ue.engTicketLabels, g2 = (r3 == null ? void 0 : r3.value) || "", m2 = { ...ue.engTicketCustomFields };
1586
+ const o3 = document.getElementById("sf-issue-name"), s3 = document.getElementById("sf-eng-ticket-team"), a3 = 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 = (s3 == null ? void 0 : s3.value) || "", p2 = (a3 == null ? void 0 : a3.value) || "", f2 = r3 ? Number(r3.value) : 0, g2 = ue.engTicketLabels, m2 = (l3 == null ? void 0 : l3.value) || "", h2 = { ...ue.engTicketCustomFields };
1587
1587
  document.querySelectorAll(".sf-dynamic-field").forEach((e6) => {
1588
- const t6 = e6, n4 = t6.dataset.fieldId;
1589
- n4 && ("checkbox" === t6.type ? m2[n4] = t6.checked : "number" === t6.type ? m2[n4] = parseFloat(t6.value) || null : t6.classList.contains("sf-custom-multiselect") || (m2[n4] = t6.value));
1588
+ const t5 = e6, n4 = t5.dataset.fieldId;
1589
+ 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));
1590
1590
  });
1591
- const h2 = document.getElementById("sf-eng-ticket-sprint"), y2 = (h2 == null ? void 0 : h2.value) || ue.engTicketSprint;
1592
- if (y2) {
1591
+ const y2 = document.getElementById("sf-eng-ticket-sprint"), b2 = (y2 == null ? void 0 : y2.value) || ue.engTicketSprint;
1592
+ if (b2) {
1593
1593
  const e6 = getSprintFieldId();
1594
- m2[e6] = parseInt(y2, 10);
1594
+ h2[e6] = parseInt(b2, 10);
1595
1595
  }
1596
- closeModal(), (async function createTriageAndIssue(e6, t6, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3) {
1596
+ closeModal(), (async function createTriageAndIssue(e6, t5, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3, p3) {
1597
1597
  var _a2, _b, _c;
1598
1598
  try {
1599
1599
  showStatusModal(true);
1600
- const p3 = await createTriageAndIssueFromRecorder(ye.apiKey, ye.backendApi, getSessionIdSafely(), e6, t6, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3);
1601
- if ((_a2 = p3 == null ? void 0 : p3.errors) == null ? void 0 : _a2.length) {
1602
- const e7 = p3.errors.map((e8) => e8.message).join("; ");
1600
+ const f3 = await createTriageAndIssueFromRecorder(ye.apiKey, ye.backendApi, getSessionIdSafely(), e6, t5, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3, p3);
1601
+ if ((_a2 = f3 == null ? void 0 : f3.errors) == null ? void 0 : _a2.length) {
1602
+ const e7 = f3.errors.map((e8) => e8.message).join("; ");
1603
1603
  return console.error("GraphQL error creating triage and issue:", e7), void showStatusModal(false, null, e7);
1604
1604
  }
1605
- const f3 = (_c = (_b = p3 == null ? void 0 : p3.data) == null ? void 0 : _b.createTriageAndIssueFromRecorder) == null ? void 0 : _c.id;
1606
- f3 ? showStatusModal(false, { type: "issue", id: f3 }) : (console.error("No Issue ID returned from backend."), showStatusModal(false, null, "No issue was created. Please try again."));
1605
+ const g3 = (_c = (_b = f3 == null ? void 0 : f3.data) == null ? void 0 : _b.createTriageAndIssueFromRecorder) == null ? void 0 : _c.id;
1606
+ g3 ? showStatusModal(false, { type: "issue", id: g3 }) : (console.error("No Issue ID returned from backend."), showStatusModal(false, null, "No issue was created. Please try again."));
1607
1607
  } catch (e7) {
1608
1608
  console.error("Error creating triage and issue:", e7), showStatusModal(false, null, "Something went wrong. Please try again.");
1609
1609
  }
1610
- })(`${n3}`, `${i3}`, e5, l3, c3, ue.createEngTicket, d3, u2, p2, f2, g2, m2);
1611
- } else closeModal(), (async function createTriage(e6, t5, n4) {
1610
+ })(`${n3}`, `${i3}`, e5, c3, d3, ue.createEngTicket, u2, p2, f2, g2, m2, h2, "startnow" === t4 ? "RECORDED" : "LOOKBACK");
1611
+ } else closeModal(), (async function createTriage(e6, t5, n4, i4) {
1612
1612
  var _a2, _b, _c;
1613
1613
  try {
1614
1614
  showStatusModal(true);
1615
- const i4 = await createTriageFromRecorder(ye.apiKey, ye.backendApi, getSessionIdSafely(), e6, t5, n4);
1616
- if ((_a2 = i4 == null ? void 0 : i4.errors) == null ? void 0 : _a2.length) {
1617
- const e7 = i4.errors.map((e8) => e8.message).join("; ");
1615
+ const o3 = await createTriageFromRecorder(ye.apiKey, ye.backendApi, getSessionIdSafely(), e6, t5, n4, i4);
1616
+ if ((_a2 = o3 == null ? void 0 : o3.errors) == null ? void 0 : _a2.length) {
1617
+ const e7 = o3.errors.map((e8) => e8.message).join("; ");
1618
1618
  return console.error("GraphQL error creating triage:", e7), void showStatusModal(false, null, e7);
1619
1619
  }
1620
- const o3 = (_c = (_b = i4 == null ? void 0 : i4.data) == null ? void 0 : _b.createTriageFromRecorder) == null ? void 0 : _c.id;
1621
- o3 ? showStatusModal(false, { type: "triage", id: o3 }) : (console.error("No Triage ID returned from backend."), showStatusModal(false, null, "No triage was created. Please try again."));
1620
+ const s3 = (_c = (_b = o3 == null ? void 0 : o3.data) == null ? void 0 : _b.createTriageFromRecorder) == null ? void 0 : _c.id;
1621
+ s3 ? showStatusModal(false, { type: "triage", id: s3 }) : (console.error("No Triage ID returned from backend."), showStatusModal(false, null, "No triage was created. Please try again."));
1622
1622
  } catch (e7) {
1623
1623
  console.error("Error creating triage:", e7), showStatusModal(false, null, "Something went wrong. Please try again.");
1624
1624
  }
1625
- })(`${n3}`, `${i3}`, e5);
1625
+ })(`${n3}`, `${i3}`, e5, "startnow" === t4 ? "RECORDED" : "LOOKBACK");
1626
1626
  }
1627
1627
  });
1628
1628
  })(), ye.deactivateIsolation = activateModalIsolation(be), ye.integrationData && ue.createEngTicket ? initializeEngTicketForm() : ye.integrationData || (ue.createEngTicket = false), ye.apiKey && ye.backendApi && refreshIntegrationData(ye.apiKey, ye.backendApi).then((e3) => {
@@ -1724,7 +1724,7 @@ async function stopRecording() {
1724
1724
  fe = e2;
1725
1725
  })(Date.now()), setIsRecording(false), ge && (clearInterval(ge), setTimerInterval(null)), (_a = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a.remove();
1726
1726
  try {
1727
- const { disableFunctionSpanTracking: e2 } = await Promise.resolve().then(() => z);
1727
+ const { disableFunctionSpanTracking: e2 } = await Promise.resolve().then(() => O);
1728
1728
  e2();
1729
1729
  } catch (e2) {
1730
1730
  console.error("[Report Issue] Failed to disable function span tracking:", e2);
@@ -2282,7 +2282,7 @@ exports.DEFAULT_CAPTURE_SETTINGS = Fe, exports.DEFAULT_CONSOLE_RECORDING_SETTING
2282
2282
  U && JSON.stringify(U) === JSON.stringify(e2) || (U = e2, sendMessage(t2));
2283
2283
  }, exports.buildBatches = buildBatches, exports.clearStaleFuncSpanState = clearStaleFuncSpanState, exports.createTriageAndIssueFromRecorder = createTriageAndIssueFromRecorder, exports.createTriageFromRecorder = createTriageFromRecorder, exports.disableFunctionSpanTracking = disableFunctionSpanTracking, exports.enableFunctionSpanTracking = enableFunctionSpanTracking, exports.ensureHrefCache = ensureHrefCache, exports.eventSize = eventSize, exports.fetchAndSendIp = fetchAndSendIp, exports.fetchCaptureSettings = fetchCaptureSettings, exports.fetchEngineeringTicketPlatformIntegrations = fetchEngineeringTicketPlatformIntegrations, exports.fetchFunctionSpanTrackingEnabled = fetchFunctionSpanTrackingEnabled, exports.flushBufferedEvents = flushBufferedEvents, exports.getCachedHref = getCachedHref, exports.getCachedHrefNoQuery = getCachedHrefNoQuery, exports.getFuncSpanHeader = getFuncSpanHeader, exports.getOrSetSessionId = getOrSetSessionId, exports.getUrlAndStoredUuids = getUrlAndStoredUuids, exports.identify = function identify(e2, t2 = {}, n2 = false) {
2284
2284
  const i2 = { type: "identify", userId: e2, traits: t2 };
2285
- O && O.userId === e2 && JSON.stringify(O.traits) === JSON.stringify(t2) || (O = { userId: e2, traits: t2, overwrite: n2 }, sendMessage(i2));
2285
+ z && z.userId === e2 && JSON.stringify(z.traits) === JSON.stringify(t2) || (z = { userId: e2, traits: t2, overwrite: n2 }, sendMessage(i2));
2286
2286
  }, exports.initRecorder = async (e2) => {
2287
2287
  if ("undefined" == typeof window) return;
2288
2288
  const t2 = window.__sailfish_recorder || (window.__sailfish_recorder = {}), n2 = getOrSetSessionId();
Binary file
Binary file
@@ -151,13 +151,13 @@ function buildBatches(e2, t2, n2) {
151
151
  function eventSize(e2) {
152
152
  return JSON.stringify(e2).length;
153
153
  }
154
- let v = Date.now;
154
+ let S = Date.now;
155
155
  function withAppUrlMetadata(e2) {
156
156
  var _a;
157
157
  return { ...e2 ?? {}, appUrl: (e2 == null ? void 0 : e2.appUrl) ?? ((_a = window == null ? void 0 : window.location) == null ? void 0 : _a.href) };
158
158
  }
159
- /[1-9][0-9]{12}/.test(Date.now().toString()) || (v = () => (/* @__PURE__ */ new Date()).getTime());
160
- const S = readDebugFlag(), k = "per_session";
159
+ /[1-9][0-9]{12}/.test(Date.now().toString()) || (S = () => (/* @__PURE__ */ new Date()).getTime());
160
+ const v = readDebugFlag(), k = "per_session";
161
161
  let x = null, I = null, T = false, E = null, C = null, $ = "", F = "", M = false;
162
162
  const L = [];
163
163
  function onNavigationChange(e2) {
@@ -233,40 +233,40 @@ function saveGlobalFuncSpanState(e2, t2) {
233
233
  try {
234
234
  if ("undefined" == typeof localStorage) return;
235
235
  const n2 = { enabled: e2, expirationTimestampMs: t2, savedAt: Date.now() };
236
- localStorage.setItem(j, JSON.stringify(n2)), S && console.log("[Sailfish] Saved funcSpan state to localStorage:", n2);
236
+ localStorage.setItem(j, JSON.stringify(n2)), v && console.log("[Sailfish] Saved funcSpan state to localStorage:", n2);
237
237
  } catch (e3) {
238
- S && console.warn("[Sailfish] Failed to save funcSpan state to localStorage:", e3);
238
+ v && console.warn("[Sailfish] Failed to save funcSpan state to localStorage:", e3);
239
239
  }
240
240
  }
241
241
  function clearGlobalFuncSpanState() {
242
242
  try {
243
243
  if ("undefined" == typeof localStorage) return;
244
- localStorage.removeItem(j), S && console.log("[Sailfish] Cleared funcSpan state from localStorage");
244
+ localStorage.removeItem(j), v && console.log("[Sailfish] Cleared funcSpan state from localStorage");
245
245
  } catch (e2) {
246
- S && console.warn("[Sailfish] Failed to clear funcSpan state from localStorage:", e2);
246
+ v && console.warn("[Sailfish] Failed to clear funcSpan state from localStorage:", e2);
247
247
  }
248
248
  }
249
249
  function clearStaleFuncSpanState() {
250
- R = false, _ = null, B = false, clearGlobalFuncSpanState(), S && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
250
+ R = false, _ = null, B = false, clearGlobalFuncSpanState(), v && console.log("[Sailfish] Cleared stale function span tracking state (backend validation failed)");
251
251
  }
252
- let z = false;
252
+ let O = false;
253
253
  function restoreFuncSpanState() {
254
- if (z) return;
255
- z = true;
254
+ if (O) return;
255
+ O = true;
256
256
  const e2 = (function loadGlobalFuncSpanState() {
257
257
  try {
258
258
  if ("undefined" == typeof localStorage) return null;
259
259
  const e3 = localStorage.getItem(j);
260
260
  if (!e3) return null;
261
261
  const t2 = JSON.parse(e3);
262
- return S && console.log("[Sailfish] Loaded funcSpan state from localStorage:", t2), t2;
262
+ return v && console.log("[Sailfish] Loaded funcSpan state from localStorage:", t2), t2;
263
263
  } catch (e3) {
264
- return S && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e3), null;
264
+ return v && console.warn("[Sailfish] Failed to load funcSpan state from localStorage:", e3), null;
265
265
  }
266
266
  })();
267
- if (e2 && e2.enabled) if (R = true, _ = e2.expirationTimestampMs, B = false, S && console.log("[Sailfish] Restored global function span tracking from localStorage:", { enabled: true, expirationTime: _ }), null !== _) {
268
- Date.now() >= _ ? (R = false, _ = null, clearGlobalFuncSpanState(), S && console.log("[Sailfish] Persisted tracking already expired, cleared state")) : S && console.log("[Sailfish] Function span tracking is active and valid (temporary until WebSocket confirms)");
269
- } else S && console.log("[Sailfish] Function span tracking is active (no expiration, temporary until WebSocket confirms)");
267
+ if (e2 && e2.enabled) if (R = true, _ = e2.expirationTimestampMs, B = false, v && console.log("[Sailfish] Restored global function span tracking from localStorage:", { enabled: true, expirationTime: _ }), null !== _) {
268
+ Date.now() >= _ ? (R = false, _ = null, clearGlobalFuncSpanState(), v && console.log("[Sailfish] Persisted tracking already expired, cleared state")) : v && console.log("[Sailfish] Function span tracking is active and valid (temporary until WebSocket confirms)");
269
+ } else v && console.log("[Sailfish] Function span tracking is active (no expiration, temporary until WebSocket confirms)");
270
270
  }
271
271
  function isWebSocketOpen(e2) {
272
272
  return (e2 == null ? void 0 : e2.readyState) === WebSocket.OPEN;
@@ -324,7 +324,7 @@ function sendEvent(e2) {
324
324
  e2.app_url || (e2.app_url = getCachedHref()), !T && isWebSocketOpen(I) && wsSendPayload({ type: "event", event: e2, mapUuid: window.sfMapUuid }) || queueEventForIDB(e2);
325
325
  }
326
326
  function handleWsOpen() {
327
- S && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (R ? "ENABLED" : "DISABLED"))), (async () => {
327
+ v && (console.log("[Sailfish] WebSocket connection opened"), console.log("[Sailfish] Function span tracking state: " + (R ? "ENABLED" : "DISABLED"))), (async () => {
328
328
  try {
329
329
  T = true, await flushNotifyQueue(), await flushBufferedEvents();
330
330
  } finally {
@@ -336,29 +336,29 @@ function handleWsOpen() {
336
336
  })();
337
337
  }
338
338
  function handleWsClose() {
339
- null != C && (clearInterval(C), C = null), S && console.log("[Sailfish] WebSocket closed");
339
+ null != C && (clearInterval(C), C = null), v && console.log("[Sailfish] WebSocket closed");
340
340
  }
341
341
  function handleWsMessage(e2) {
342
342
  try {
343
343
  const t2 = JSON.parse(e2);
344
- if ("funcSpanTrackingControl" === t2.type) if (S && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: t2.enabled, timeoutSeconds: t2.timeoutSeconds, expirationTimestampMs: t2.expirationTimestampMs }), null !== P && (window.clearTimeout(P), P = null), R = t2.enabled, B = false, S && console.log("[Sailfish] Function span tracking " + (t2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), t2.enabled) {
344
+ if ("funcSpanTrackingControl" === t2.type) if (v && console.log("[Sailfish] Received funcSpanTrackingControl message:", { enabled: t2.enabled, timeoutSeconds: t2.timeoutSeconds, expirationTimestampMs: t2.expirationTimestampMs }), null !== P && (window.clearTimeout(P), P = null), R = t2.enabled, B = false, v && console.log("[Sailfish] Function span tracking " + (t2.enabled ? "ENABLED (GLOBAL)" : "DISABLED (GLOBAL)")), t2.enabled) {
345
345
  if (t2.expirationTimestampMs) {
346
346
  _ = t2.expirationTimestampMs;
347
347
  const e3 = Date.now(), n2 = _ - e3;
348
- S && console.log(`[Sailfish] Server expiration timestamp: ${_}, ms until expiration: ${n2}`), n2 > 0 ? (saveGlobalFuncSpanState(true, _), P = window.setTimeout(() => {
349
- B || (R = false, _ = null, clearGlobalFuncSpanState(), S && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"), wsSendPayload({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() }), S && console.log("[Sailfish] Notified backend that function span tracking expired"));
350
- }, n2)) : (R = false, _ = null, clearGlobalFuncSpanState(), S && console.log("[Sailfish] Tracking already expired, not enabling"));
348
+ v && console.log(`[Sailfish] Server expiration timestamp: ${_}, ms until expiration: ${n2}`), n2 > 0 ? (saveGlobalFuncSpanState(true, _), P = window.setTimeout(() => {
349
+ B || (R = false, _ = null, clearGlobalFuncSpanState(), v && console.log("[Sailfish] GLOBAL function span tracking auto-disabled at server expiration time"), wsSendPayload({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() }), v && console.log("[Sailfish] Notified backend that function span tracking expired"));
350
+ }, n2)) : (R = false, _ = null, clearGlobalFuncSpanState(), v && console.log("[Sailfish] Tracking already expired, not enabling"));
351
351
  } else {
352
352
  const e3 = t2.timeoutSeconds || 3600;
353
353
  e3 > 0 && (_ = Date.now() + 1e3 * e3, saveGlobalFuncSpanState(true, _), P = window.setTimeout(() => {
354
- B || (R = false, _ = null, clearGlobalFuncSpanState(), S && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`), wsSendPayload({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() }), S && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
354
+ B || (R = false, _ = null, clearGlobalFuncSpanState(), v && console.log(`[Sailfish] GLOBAL function span tracking auto-disabled after ${e3}s (legacy)`), wsSendPayload({ type: "funcSpanTrackingExpired", sessionId: getOrSetSessionId(), expiredAt: Date.now() }), v && console.log("[Sailfish] Notified backend that function span tracking expired (legacy timeout)"));
355
355
  }, 1e3 * e3));
356
356
  }
357
357
  try {
358
358
  const e3 = getOrSetSessionId();
359
- wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" }), S && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
359
+ wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: e3, enabled: true, configurationType: "global" }), v && console.log(`[Sailfish] GLOBAL tracking session report sent for session: ${e3}`);
360
360
  } catch (e3) {
361
- S && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
361
+ v && console.warn("[Sailfish] Failed to send GLOBAL tracking session report:", e3);
362
362
  }
363
363
  } else _ = null, clearGlobalFuncSpanState();
364
364
  } catch (e3) {
@@ -370,7 +370,7 @@ function initializeWebSocket(t2, n2, i2, o2, s2 = false) {
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"}://${a2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.10.9`;
373
+ let r2 = `${"https:" === new URL(t2).protocol ? "wss" : "ws"}://${a2}/ws/notify/?apiKey=${n2}&sessionId=${i2}&sender=JS%2FTS&version=1.10.10`;
374
374
  if (o2 && (r2 += `&envValue=${encodeURIComponent(o2)}`), x = s2 ? (function tryCreateWsWorker() {
375
375
  if ("undefined" == typeof Worker) return null;
376
376
  try {
@@ -387,10 +387,10 @@ function initializeWebSocket(t2, n2, i2, o2, s2 = false) {
387
387
  const n3 = e3.data;
388
388
  "open" === n3.type ? (t3.readyState = WebSocket.OPEN, handleWsOpen()) : "close" === n3.type ? (t3.readyState = WebSocket.CLOSED, handleWsClose()) : "message" === n3.type && handleWsMessage(n3.data);
389
389
  }, x.onerror = () => {
390
- S && console.warn("[Sailfish] WebSocket worker error");
391
- }, x.postMessage({ type: "init", wsUrl: r2 }), S && console.log("[Sailfish] WebSocket running in Web Worker (off main thread)"), t3;
390
+ v && console.warn("[Sailfish] WebSocket worker error");
391
+ }, x.postMessage({ type: "init", wsUrl: r2 }), v && console.log("[Sailfish] WebSocket running in Web Worker (off main thread)"), t3;
392
392
  }
393
- S && console.log("[Sailfish] WebSocket running on main thread (Worker unavailable)");
393
+ v && console.log("[Sailfish] WebSocket running on main thread (Worker unavailable)");
394
394
  const l2 = new e(r2, [], { connectionTimeout: 3e4 }), c2 = { get readyState() {
395
395
  return l2.readyState;
396
396
  }, close: () => {
@@ -402,30 +402,30 @@ function sendMessage(e2) {
402
402
  "sessionId" in e2 || (e2.sessionId = getOrSetSessionId()), e2.app_url || (e2.app_url = getCachedHref()), T || !isWebSocketOpen(I) ? saveNotifyMessageToIDB(JSON.stringify(e2)) : wsSendPayload(e2) || saveNotifyMessageToIDB(JSON.stringify(e2));
403
403
  }
404
404
  function enableFunctionSpanTracking() {
405
- if (S && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), R = true, B = true, _ = null, null !== P && (window.clearTimeout(P), P = null), isWebSocketOpen(I)) {
405
+ if (v && console.log("[Sailfish] enableFunctionSpanTracking() called - Report Issue recording started (LOCAL MODE)"), R = true, B = true, _ = null, null !== P && (window.clearTimeout(P), P = null), isWebSocketOpen(I)) {
406
406
  wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: true, configurationType: k });
407
- } else S && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
407
+ } else v && console.warn("[Sailfish] WebSocket not open, cannot report LOCAL tracking session");
408
408
  }
409
409
  function disableFunctionSpanTracking() {
410
- if (S && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(I)) {
410
+ if (v && console.log("[Sailfish] disableFunctionSpanTracking() called - Report Issue recording stopped"), isWebSocketOpen(I)) {
411
411
  wsSendPayload({ type: "funcSpanTrackingSessionReport", sessionId: getOrSetSessionId(), enabled: false, configurationType: k });
412
412
  } else console.warn("[FUNCSPAN STOP] ✗ WebSocket not open, cannot notify tracking end");
413
- B && (R = false, B = false, _ = null, S && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== P && (window.clearTimeout(P), P = null);
413
+ B && (R = false, B = false, _ = null, v && console.log("[Sailfish] LOCAL tracking mode disabled")), null !== P && (window.clearTimeout(P), P = null);
414
414
  }
415
415
  function isFunctionSpanTrackingEnabled() {
416
416
  return R;
417
417
  }
418
418
  function initializeFunctionSpanTrackingFromApi(e2) {
419
- e2 && !R ? (R = true, B = false, _ = null, S && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e2 && R && (R = false, B = false, _ = null, S && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
419
+ e2 && !R ? (R = true, B = false, _ = null, v && console.log("[Sailfish] Function span tracking initialized as ENABLED from API check")) : !e2 && R && (R = false, B = false, _ = null, v && console.log("[Sailfish] Function span tracking initialized as DISABLED from API check"));
420
420
  }
421
421
  function getFuncSpanHeader() {
422
422
  if (!R) return null;
423
423
  if (null !== _) {
424
- if (Date.now() >= _) return R = false, _ = null, clearGlobalFuncSpanState(), S && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
424
+ if (Date.now() >= _) return R = false, _ = null, clearGlobalFuncSpanState(), v && console.log("[Sailfish] Function span tracking expired on header check - disabling now"), null;
425
425
  }
426
426
  return { name: "X-Sf3-FunctionSpanCaptureOverride", value: "1-1-10-10-1-1.0-1-0-0" };
427
427
  }
428
- const O = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, ensureHrefCache, flushBufferedEvents, getCachedHref, getCachedHrefNoQuery, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, onNavigationChange, restoreFuncSpanState, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
428
+ const z = Object.freeze(Object.defineProperty({ __proto__: null, clearStaleFuncSpanState, disableFunctionSpanTracking, enableFunctionSpanTracking, ensureHrefCache, flushBufferedEvents, getCachedHref, getCachedHrefNoQuery, getFuncSpanHeader, initializeFunctionSpanTrackingFromApi, initializeWebSocket, isFunctionSpanTrackingEnabled, onNavigationChange, restoreFuncSpanState, sendEvent, sendMessage }, Symbol.toStringTag, { value: "Module" }));
429
429
  let U = null, H = null;
430
430
  function identify(e2, t2 = {}, n2 = false) {
431
431
  const i2 = { type: "identify", userId: e2, traits: t2 };
@@ -436,7 +436,7 @@ function addOrUpdateMetadata(e2) {
436
436
  H && JSON.stringify(H) === JSON.stringify(e2) || (H = e2, sendMessage(t2));
437
437
  }
438
438
  function trackingEvent(e2) {
439
- sendMessage({ type: "trackingEvent", trackingData: e2, timestamp: v() });
439
+ sendMessage({ type: "trackingEvent", trackingData: e2, timestamp: S() });
440
440
  }
441
441
  let N = null;
442
442
  const q = ["https://api.ipify.org?format=json", "https://api.ip.sb/jsonip", "https://api4.my-ip.io/ip.json"];
@@ -446,7 +446,7 @@ function fetchAndSendIp(e2) {
446
446
  const t2 = new AbortController(), n2 = setTimeout(() => t2.abort(), 5e3), i2 = await fetch(e3, { signal: t2.signal });
447
447
  if (clearTimeout(n2), !i2.ok) continue;
448
448
  const o2 = await i2.json(), s2 = o2.ip || o2.origin || null;
449
- if (s2 && "string" == typeof s2 && s2.length <= 45) return void sendMessage({ type: "visitorIp", ip: s2, timestamp: v() });
449
+ if (s2 && "string" == typeof s2 && s2.length <= 45) return void sendMessage({ type: "visitorIp", ip: s2, timestamp: S() });
450
450
  } catch {
451
451
  }
452
452
  N = null;
@@ -540,14 +540,14 @@ function startRecordingSession(e2, t2, n2, i2, o2, s2, a2, r2, l2) {
540
540
  function sendDomainsToNotPropagateHeaderTo(e2, t2, n2) {
541
541
  return sendGraphQLRequest("DomainsToNotPassHeaderTo", "mutation DomainsToNotPassHeaderTo($apiKey: String!, $domains: [String!]!) {\n domainsToNotPassHeaderTo(apiKey: $apiKey, domains: $domains)\n }", { apiKey: e2, domains: t2, backendApi: n2 });
542
542
  }
543
- function createTriageFromRecorder(e2, t2, n2, i2, o2, s2) {
544
- 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: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description: s2, backendApi: t2 });
543
+ function createTriageFromRecorder(e2, t2, n2, i2, o2, s2, a2) {
544
+ 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: s2, triageSource: a2, backendApi: t2 });
545
545
  }
546
546
  function fetchEngineeringTicketPlatformIntegrations(e2, t2) {
547
547
  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 });
548
548
  }
549
- function createTriageAndIssueFromRecorder(e2, t2, n2, i2, o2, s2, a2, r2, l2, c2, d2, u2, p2, f2, g2) {
550
- 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 ) {\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 ) {\n id\n title\n }\n }\n ", { apiKey: e2, recordingSessionId: n2, timestampStart: i2, timestampEnd: o2, description: s2, issueName: a2, issueDescription: r2, createEngineeringTicket: l2, teamId: c2, projectId: d2, priority: u2, labels: p2, issueType: f2, customFields: g2, backendApi: t2 });
549
+ function createTriageAndIssueFromRecorder(e2, t2, n2, i2, o2, s2, a2, r2, l2, c2, d2, u2, p2, f2, g2, m2) {
550
+ 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: s2, issueName: a2, issueDescription: r2, createEngineeringTicket: l2, teamId: c2, projectId: d2, priority: u2, labels: p2, issueType: f2, customFields: g2, triageSource: m2, backendApi: t2 });
551
551
  }
552
552
  const J = ["/node_modules/", "/@sailfish-ai/", "/@sailfish-rrweb/", "/dist/", "/webpack/", "/vite/", "/__vite", "/react-dom/", "/react/", "/scheduler/", "/<", "/chrome-extension://", "/extensions/"];
553
553
  function shouldSkipFrame(e2) {
@@ -703,7 +703,7 @@ async function initializeRecording(e2, n2, i2, o2, s2, a2 = true, r2 = false, l2
703
703
  }
704
704
  const { record: n4 } = await import("@sailfish-rrweb/rrweb-record-only");
705
705
  if (X = n4, await yieldToMain(), l2) {
706
- const { chunkedSnapshot: i3 } = await import("./chunkSerializer-B_szIq8O.js"), o3 = n4.mirror;
706
+ const { chunkedSnapshot: i3 } = await import("./chunkSerializer-ZzDUs2qs.js"), o3 = n4.mirror;
707
707
  let s3 = true;
708
708
  const a3 = [];
709
709
  n4({ emit(e3) {
@@ -957,7 +957,7 @@ function renderCustomMultiSelect(e2, t2, n2, i2, o2 = false) {
957
957
  }
958
958
  const ye = { 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 } }, be = { shortcuts: { ...ye }, resolveSessionId: null, apiKey: null, backendApi: null, triageBaseUrl: "https://app.sailfishqa.com", deactivateIsolation: () => {
959
959
  }, integrationData: null, showEngTicketFieldsDefault: false };
960
- let we = null, ve = false;
960
+ let we = null, Se = false;
961
961
  function setupCustomMultiSelectListeners(e2, t2) {
962
962
  const n2 = document.getElementById(`${e2}-container`), i2 = document.getElementById(`${e2}-dropdown`);
963
963
  if (!n2 || !i2) return;
@@ -1206,7 +1206,7 @@ function getSessionIdSafely() {
1206
1206
  return be.resolveSessionId();
1207
1207
  }
1208
1208
  function openReportIssueModal(e2) {
1209
- he ? stopRecording() : (ve = (e2 == null ? void 0 : e2.showEngTicketFields) ?? be.showEngTicketFieldsDefault, injectModalHTML(), we && document.body.appendChild(we));
1209
+ he ? stopRecording() : (Se = (e2 == null ? void 0 : e2.showEngTicketFields) ?? be.showEngTicketFieldsDefault, injectModalHTML(), we && document.body.appendChild(we));
1210
1210
  }
1211
1211
  function closeModal() {
1212
1212
  be.deactivateIsolation(), document.activeElement instanceof HTMLElement && document.activeElement.blur(), (we == null ? void 0 : we.parentNode) && we.parentNode.removeChild(we), we = null, he || (function resetState() {
@@ -1398,7 +1398,7 @@ function injectModalHTML(e2 = "lookback") {
1398
1398
  Create an Issue
1399
1399
  </label>
1400
1400
 
1401
- <label id="sf-create-eng-ticket-label" style="display:${be.integrationData && ve ? "flex" : "none"}; align-items:center; gap:8px; font-size:14px; font-weight:500; cursor:pointer;">
1401
+ <label id="sf-create-eng-ticket-label" style="display:${be.integrationData && Se ? "flex" : "none"}; align-items:center; gap:8px; font-size:14px; font-weight:500; cursor:pointer;">
1402
1402
  <input type="checkbox" id="sf-create-eng-ticket-checkbox" ${pe.createEngTicket ? "checked" : ""}
1403
1403
  style="width:16px; height:16px; accent-color:#295DBF; cursor:pointer;">
1404
1404
  Create an Eng Ticket
@@ -1525,7 +1525,7 @@ function injectModalHTML(e2 = "lookback") {
1525
1525
  fe = e6;
1526
1526
  })(Date.now()), setIsRecording(true);
1527
1527
  try {
1528
- const { enableFunctionSpanTracking: e6 } = await Promise.resolve().then(() => O);
1528
+ const { enableFunctionSpanTracking: e6 } = await Promise.resolve().then(() => z);
1529
1529
  e6();
1530
1530
  } catch (e6) {
1531
1531
  console.error("[Report Issue] Failed to enable function span tracking:", e6);
@@ -1573,46 +1573,46 @@ function injectModalHTML(e2 = "lookback") {
1573
1573
  i3 = Date.now(), n3 = i3 - e6;
1574
1574
  }
1575
1575
  if (pe.createIssue) {
1576
- const t5 = document.getElementById("sf-issue-name"), o3 = document.getElementById("sf-eng-ticket-team"), s3 = document.getElementById("sf-eng-ticket-project"), a3 = document.getElementById("sf-eng-ticket-priority"), r3 = document.getElementById("sf-eng-ticket-type"), l3 = (t5 == null ? void 0 : t5.value) || "", c3 = e5, d3 = (o3 == null ? void 0 : o3.value) || "", u2 = (s3 == null ? void 0 : s3.value) || "", p2 = a3 ? Number(a3.value) : 0, f2 = pe.engTicketLabels, g2 = (r3 == null ? void 0 : r3.value) || "", m2 = { ...pe.engTicketCustomFields };
1576
+ const o3 = document.getElementById("sf-issue-name"), s3 = document.getElementById("sf-eng-ticket-team"), a3 = 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 = (s3 == null ? void 0 : s3.value) || "", p2 = (a3 == null ? void 0 : a3.value) || "", f2 = r3 ? Number(r3.value) : 0, g2 = pe.engTicketLabels, m2 = (l3 == null ? void 0 : l3.value) || "", h2 = { ...pe.engTicketCustomFields };
1577
1577
  document.querySelectorAll(".sf-dynamic-field").forEach((e6) => {
1578
- const t6 = e6, n4 = t6.dataset.fieldId;
1579
- n4 && ("checkbox" === t6.type ? m2[n4] = t6.checked : "number" === t6.type ? m2[n4] = parseFloat(t6.value) || null : t6.classList.contains("sf-custom-multiselect") || (m2[n4] = t6.value));
1578
+ const t5 = e6, n4 = t5.dataset.fieldId;
1579
+ 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));
1580
1580
  });
1581
- const h2 = document.getElementById("sf-eng-ticket-sprint"), y2 = (h2 == null ? void 0 : h2.value) || pe.engTicketSprint;
1582
- if (y2) {
1581
+ const y2 = document.getElementById("sf-eng-ticket-sprint"), b2 = (y2 == null ? void 0 : y2.value) || pe.engTicketSprint;
1582
+ if (b2) {
1583
1583
  const e6 = getSprintFieldId();
1584
- m2[e6] = parseInt(y2, 10);
1584
+ h2[e6] = parseInt(b2, 10);
1585
1585
  }
1586
- closeModal(), (async function createTriageAndIssue(e6, t6, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3) {
1586
+ closeModal(), (async function createTriageAndIssue(e6, t5, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3, p3) {
1587
1587
  var _a2, _b, _c;
1588
1588
  try {
1589
1589
  showStatusModal(true);
1590
- const p3 = await createTriageAndIssueFromRecorder(be.apiKey, be.backendApi, getSessionIdSafely(), e6, t6, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3);
1591
- if ((_a2 = p3 == null ? void 0 : p3.errors) == null ? void 0 : _a2.length) {
1592
- const e7 = p3.errors.map((e8) => e8.message).join("; ");
1590
+ const f3 = await createTriageAndIssueFromRecorder(be.apiKey, be.backendApi, getSessionIdSafely(), e6, t5, n4, i4, o4, s4, a4, r4, l4, c4, d4, u3, p3);
1591
+ if ((_a2 = f3 == null ? void 0 : f3.errors) == null ? void 0 : _a2.length) {
1592
+ const e7 = f3.errors.map((e8) => e8.message).join("; ");
1593
1593
  return console.error("GraphQL error creating triage and issue:", e7), void showStatusModal(false, null, e7);
1594
1594
  }
1595
- const f3 = (_c = (_b = p3 == null ? void 0 : p3.data) == null ? void 0 : _b.createTriageAndIssueFromRecorder) == null ? void 0 : _c.id;
1596
- f3 ? showStatusModal(false, { type: "issue", id: f3 }) : (console.error("No Issue ID returned from backend."), showStatusModal(false, null, "No issue was created. Please try again."));
1595
+ const g3 = (_c = (_b = f3 == null ? void 0 : f3.data) == null ? void 0 : _b.createTriageAndIssueFromRecorder) == null ? void 0 : _c.id;
1596
+ g3 ? showStatusModal(false, { type: "issue", id: g3 }) : (console.error("No Issue ID returned from backend."), showStatusModal(false, null, "No issue was created. Please try again."));
1597
1597
  } catch (e7) {
1598
1598
  console.error("Error creating triage and issue:", e7), showStatusModal(false, null, "Something went wrong. Please try again.");
1599
1599
  }
1600
- })(`${n3}`, `${i3}`, e5, l3, c3, pe.createEngTicket, d3, u2, p2, f2, g2, m2);
1601
- } else closeModal(), (async function createTriage(e6, t5, n4) {
1600
+ })(`${n3}`, `${i3}`, e5, c3, d3, pe.createEngTicket, u2, p2, f2, g2, m2, h2, "startnow" === t4 ? "RECORDED" : "LOOKBACK");
1601
+ } else closeModal(), (async function createTriage(e6, t5, n4, i4) {
1602
1602
  var _a2, _b, _c;
1603
1603
  try {
1604
1604
  showStatusModal(true);
1605
- const i4 = await createTriageFromRecorder(be.apiKey, be.backendApi, getSessionIdSafely(), e6, t5, n4);
1606
- if ((_a2 = i4 == null ? void 0 : i4.errors) == null ? void 0 : _a2.length) {
1607
- const e7 = i4.errors.map((e8) => e8.message).join("; ");
1605
+ const o3 = await createTriageFromRecorder(be.apiKey, be.backendApi, getSessionIdSafely(), e6, t5, n4, i4);
1606
+ if ((_a2 = o3 == null ? void 0 : o3.errors) == null ? void 0 : _a2.length) {
1607
+ const e7 = o3.errors.map((e8) => e8.message).join("; ");
1608
1608
  return console.error("GraphQL error creating triage:", e7), void showStatusModal(false, null, e7);
1609
1609
  }
1610
- const o3 = (_c = (_b = i4 == null ? void 0 : i4.data) == null ? void 0 : _b.createTriageFromRecorder) == null ? void 0 : _c.id;
1611
- o3 ? showStatusModal(false, { type: "triage", id: o3 }) : (console.error("No Triage ID returned from backend."), showStatusModal(false, null, "No triage was created. Please try again."));
1610
+ const s3 = (_c = (_b = o3 == null ? void 0 : o3.data) == null ? void 0 : _b.createTriageFromRecorder) == null ? void 0 : _c.id;
1611
+ s3 ? showStatusModal(false, { type: "triage", id: s3 }) : (console.error("No Triage ID returned from backend."), showStatusModal(false, null, "No triage was created. Please try again."));
1612
1612
  } catch (e7) {
1613
1613
  console.error("Error creating triage:", e7), showStatusModal(false, null, "Something went wrong. Please try again.");
1614
1614
  }
1615
- })(`${n3}`, `${i3}`, e5);
1615
+ })(`${n3}`, `${i3}`, e5, "startnow" === t4 ? "RECORDED" : "LOOKBACK");
1616
1616
  }
1617
1617
  });
1618
1618
  })(), be.deactivateIsolation = activateModalIsolation(we), be.integrationData && pe.createEngTicket ? initializeEngTicketForm() : be.integrationData || (pe.createEngTicket = false), be.apiKey && be.backendApi && refreshIntegrationData(be.apiKey, be.backendApi).then((e3) => {
@@ -1623,7 +1623,7 @@ function injectModalHTML(e2 = "lookback") {
1623
1623
  const e4 = generateEngTicketFieldsHTML();
1624
1624
  e4 && (t3.innerHTML = e4, initializeEngTicketForm(), bindEngTicketListeners(), updateFormWithIntegrationData(pe), renderDynamicFields(pe.engTicketProject, pe.engTicketIssueType));
1625
1625
  }
1626
- if (ve) {
1626
+ if (Se) {
1627
1627
  const e4 = document.getElementById("sf-create-eng-ticket-label");
1628
1628
  e4 && (e4.style.display = "flex");
1629
1629
  }
@@ -1714,7 +1714,7 @@ async function stopRecording() {
1714
1714
  ge = e2;
1715
1715
  })(Date.now()), setIsRecording(false), me && (clearInterval(me), setTimerInterval(null)), (_a = document.getElementById("sf-recording-indicator")) == null ? void 0 : _a.remove();
1716
1716
  try {
1717
- const { disableFunctionSpanTracking: e2 } = await Promise.resolve().then(() => O);
1717
+ const { disableFunctionSpanTracking: e2 } = await Promise.resolve().then(() => z);
1718
1718
  e2();
1719
1719
  } catch (e2) {
1720
1720
  console.error("[Report Issue] Failed to disable function span tracking:", e2);
@@ -1814,7 +1814,7 @@ function showStatusModal(e2, t2, n2) {
1814
1814
  function fadeCardAndRemove(e2, t2, n2 = 300) {
1815
1815
  t2.style.opacity = "0", t2.addEventListener("transitionend", () => e2.remove(), { once: true }), setTimeout(() => e2.remove(), n2 + 100);
1816
1816
  }
1817
- const Se = Object.freeze(Object.defineProperty({ __proto__: null, ReportIssueContext: be, openReportIssueModal, setupIssueReporting: function setupIssueReporting(e2) {
1817
+ const ve = Object.freeze(Object.defineProperty({ __proto__: null, ReportIssueContext: be, openReportIssueModal, setupIssueReporting: function setupIssueReporting(e2) {
1818
1818
  be.apiKey = e2.apiKey, be.backendApi = e2.backendApi, be.resolveSessionId = e2.getSessionId, be.integrationData = e2.integrationData || null, be.showEngTicketFieldsDefault = e2.showEngTicketFieldsInReportIssueModalDefault ?? false, e2.customBaseUrl && (be.triageBaseUrl = e2.customBaseUrl), be.shortcuts = (function mergeShortcutsConfig(e3) {
1819
1819
  const t3 = { ...ye };
1820
1820
  if (!e3) return t3;
@@ -2044,7 +2044,7 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
2044
2044
  throw ke && console.log(`Retry without ${n} for ${o4} also failed:`, e6), e6;
2045
2045
  }
2046
2046
  })(e4, i4, o3, d3), w3 = true);
2047
- const v2 = Date.now(), S2 = b3.status, k2 = b3.ok, x2 = k2 ? "" : `Request Error: ${b3.statusText}`;
2047
+ const S2 = Date.now(), v2 = b3.status, k2 = b3.ok, x2 = k2 ? "" : `Request Error: ${b3.statusText}`;
2048
2048
  let I2 = null;
2049
2049
  try {
2050
2050
  I2 = {}, b3.headers.forEach((e5, t3) => {
@@ -2053,7 +2053,7 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
2053
2053
  } catch (e5) {
2054
2054
  ke && console.warn("[Sailfish] Failed to capture response headers:", e5), I2 = null;
2055
2055
  }
2056
- const T2 = { type: 27, timestamp: v2, sessionId: c3, data: { request_id: u3, session_id: c3, timestamp_start: g2, timestamp_end: v2, response_code: S2, success: k2, error: x2, method: f2, url: d3, retry_without_trace_id: w3, request_headers: h2, request_body: m2, response_headers: I2, response_body: null }, ...p2 }, sendEventWithBody = (e5) => {
2056
+ const T2 = { type: 27, timestamp: S2, sessionId: c3, data: { request_id: u3, session_id: c3, timestamp_start: g2, timestamp_end: S2, response_code: v2, success: k2, error: x2, method: f2, url: d3, retry_without_trace_id: w3, request_headers: h2, request_body: m2, response_headers: I2, response_body: null }, ...p2 }, sendEventWithBody = (e5) => {
2057
2057
  T2.data.response_body = e5, y2 ? y2.text().then((e6) => {
2058
2058
  T2.data.request_body = e6, sendEvent(T2);
2059
2059
  }, () => {
@@ -2143,8 +2143,8 @@ function setupFetchInterceptor(e2 = [], t2 = { captureStreamingResponseBody: tru
2143
2143
  }
2144
2144
  async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-service.sailfishqa.com", domainsToPropagateHeaderTo: i2 = [], domainsToNotPropagateHeaderTo: o2 = [], serviceVersion: s2, serviceIdentifier: a2, gitSha: r2, serviceAdditionalMetadata: l2, enableIpTracking: c2, captureStreamingResponseBody: d2 = true, captureResponseBodyMaxMb: u2 = 10, captureStreamPrefixKb: p2 = 64, captureStreamTimeoutMs: f2 = 1e4, enableFiberTracking: g2 = false, deferRecording: h2, deferRecordingStart: y2, chunkSnapshot: b2, useWsWorker: w2 = true }) {
2145
2145
  var _a, _b;
2146
- const v2 = h2 ?? y2 ?? true, S2 = getOrSetSessionId(), k2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
2147
- if (k2.sessionId = S2, k2.apiKey = e2, k2.backendApi = t2, k2.serviceAdditionalMetadata = l2, k2.initialized && k2.sessionId === S2 && k2.ws && 1 === k2.ws.readyState) return void trackDomainChangesOnce();
2146
+ const S2 = h2 ?? y2 ?? true, v2 = getOrSetSessionId(), k2 = window.__sailfish_recorder || (window.__sailfish_recorder = {});
2147
+ if (k2.sessionId = v2, k2.apiKey = e2, k2.backendApi = t2, k2.serviceAdditionalMetadata = l2, k2.initialized && k2.sessionId === v2 && k2.ws && 1 === k2.ws.readyState) return void trackDomainChangesOnce();
2148
2148
  const x2 = { captureStreamingResponseBody: d2, captureResponseBodyMaxMb: u2, captureStreamPrefixKb: p2, captureStreamTimeoutMs: f2 };
2149
2149
  sessionStorage.getItem("pageVisitUUID") || (sessionStorage.setItem("pageVisitUUID", uuidv4()), invalidateUrlCache()), k2.xhrPatched || (!(function setupXMLHttpRequestInterceptor(e3 = [], t3 = { captureStreamingResponseBody: true, captureResponseBodyMaxMb: 10, captureStreamPrefixKb: 64, captureStreamTimeoutMs: 1e4 }) {
2150
2150
  const i3 = XMLHttpRequest.prototype.open, o3 = XMLHttpRequest.prototype.send, s3 = XMLHttpRequest.prototype.setRequestHeader, a3 = getOrSetSessionId(), r3 = createSkipHeadersPropagationChecker(e3);
@@ -2211,7 +2211,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
2211
2211
  emitFinished(false, e5, t4);
2212
2212
  }, { once: true }), o3.apply(this, e4);
2213
2213
  };
2214
- })(o2, x2), k2.xhrPatched = true), k2.fetchPatched || (setupFetchInterceptor(o2, x2), k2.fetchPatched = true), await yieldToMain(), k2.domEventsInit || (initializeDomContentEvents(S2), k2.domEventsInit = true), await yieldToMain(), k2.consoleInit || (initializeConsolePlugin(Ae, S2), k2.consoleInit = true), await yieldToMain(), k2.errorInit || (!(function initializeErrorInterceptor() {
2214
+ })(o2, x2), k2.xhrPatched = true), k2.fetchPatched || (setupFetchInterceptor(o2, x2), k2.fetchPatched = true), await yieldToMain(), k2.domEventsInit || (initializeDomContentEvents(v2), k2.domEventsInit = true), await yieldToMain(), k2.consoleInit || (initializeConsolePlugin(Ae, v2), k2.consoleInit = true), await yieldToMain(), k2.errorInit || (!(function initializeErrorInterceptor() {
2215
2215
  window.addEventListener("error", (e3) => {
2216
2216
  captureError(e3.error || e3.message);
2217
2217
  }), window.addEventListener("unhandledrejection", (e3) => {
@@ -2226,7 +2226,7 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
2226
2226
  ke && console.warn("[Sailfish] Failed to validate function span tracking status with backend:", e3);
2227
2227
  }), k2.sentDoNotPropagateOnce || (sendDomainsToNotPropagateHeaderTo(e2, [...o2, ...Te], t2).catch((e3) => console.error("Failed to send domains to not propagate header to:", e3)), k2.sentDoNotPropagateOnce = true), (async function gatherAndCacheDeviceInfo() {
2228
2228
  sendMessage({ type: "deviceInfo", data: { deviceInfo: { language: navigator.language, userAgent: navigator.userAgent } } });
2229
- })(), c2 && fetchAndSendIp(S2);
2229
+ })(), c2 && fetchAndSendIp(v2);
2230
2230
  try {
2231
2231
  const n2 = r2 ?? (function readGitSha() {
2232
2232
  var _a2;
@@ -2253,12 +2253,12 @@ async function startRecording({ apiKey: e2, backendApi: t2 = "https://api-servic
2253
2253
  }
2254
2254
  })(), u3 = withAppUrlMetadata(l2);
2255
2255
  await yieldToMain();
2256
- const [p3, f3] = await Promise.all([fetchCaptureSettings(e2, t2), startRecordingSession(e2, S2, t2, i3, o3, d3, n2, c3, u3)]), m2 = { ...Le, ...(_a = p3.data) == null ? void 0 : _a.captureSettingsFromApiKey, enableFiberTracking: g2 };
2256
+ const [p3, f3] = await Promise.all([fetchCaptureSettings(e2, t2), startRecordingSession(e2, v2, t2, i3, o3, d3, n2, c3, u3)]), m2 = { ...Le, ...(_a = p3.data) == null ? void 0 : _a.captureSettingsFromApiKey, enableFiberTracking: g2 };
2257
2257
  if (k2.ws && 1 === k2.ws.readyState) return;
2258
2258
  if ((_b = f3.data) == null ? void 0 : _b.startRecordingSession) {
2259
2259
  const n3 = (l2 == null ? void 0 : l2.env) || (l2 == null ? void 0 : l2.environment);
2260
2260
  await yieldToMain();
2261
- const i4 = await initializeRecording(m2, t2, e2, S2, n3, v2, w2, b2 ?? false);
2261
+ const i4 = await initializeRecording(m2, t2, e2, v2, n3, S2, w2, b2 ?? false);
2262
2262
  k2.ws = i4, k2.initialized = true, trackDomainChangesOnce(), k2.sentMapUuidOnce || (!(function sendMapUuidIfAvailable(e3 = "", t3 = "") {
2263
2263
  window.sfMapUuid && sendMessage({ type: "mapUuid", data: { mapUuid: window.sfMapUuid, serviceIdentifier: e3, serviceVersion: t3 } });
2264
2264
  })(a2, s2), k2.sentMapUuidOnce = true);
@@ -2272,7 +2272,7 @@ const initRecorder = async (e2) => {
2272
2272
  const t2 = window.__sailfish_recorder || (window.__sailfish_recorder = {}), n2 = getOrSetSessionId();
2273
2273
  return clearPageVisitDataFromSessionStorage(), t2.initialized && t2.sessionId === n2 && t2.ws && 1 === t2.ws.readyState ? void 0 : (t2.initPromise || (t2.initPromise = (async () => {
2274
2274
  if (t2.hasLoggedInitOnce || (console.log("Initializing Sailfish Recorder (first run) …"), t2.hasLoggedInitOnce = true), await startRecording(e2), !t2.issueReportingInit) {
2275
- const n3 = e2.backendApi ?? "https://api-service.sailfishqa.com", [{ setupIssueReporting: i2 }, { fetchIntegrationData: o2, getIntegrationData: s2 }] = await Promise.all([Promise.resolve().then(() => Se), Promise.resolve().then(() => ce)]);
2275
+ const n3 = e2.backendApi ?? "https://api-service.sailfishqa.com", [{ setupIssueReporting: i2 }, { fetchIntegrationData: o2, getIntegrationData: s2 }] = await Promise.all([Promise.resolve().then(() => ve), Promise.resolve().then(() => ce)]);
2276
2276
  let a2 = null;
2277
2277
  try {
2278
2278
  await o2(e2.apiKey, n3), a2 = s2();
@@ -2292,7 +2292,7 @@ export {
2292
2292
  Le as D,
2293
2293
  isFunctionSpanTrackingEnabled as E,
2294
2294
  matchUrlWithWildcard as F,
2295
- v as G,
2295
+ S as G,
2296
2296
  onNavigationChange as H,
2297
2297
  openReportIssueModal as I,
2298
2298
  restoreFuncSpanState as J,
Binary file
Binary file
package/dist/graphql.js CHANGED
@@ -99,20 +99,22 @@ export function sendDomainsToNotPropagateHeaderTo(apiKey, domains, backendApi) {
99
99
  domainsToNotPassHeaderTo(apiKey: $apiKey, domains: $domains)
100
100
  }`, { apiKey, domains, backendApi });
101
101
  }
102
- export function createTriageFromRecorder(apiKey, backendApi, recordingSessionId, timestampStart, timestampEnd, description) {
102
+ export function createTriageFromRecorder(apiKey, backendApi, recordingSessionId, timestampStart, timestampEnd, description, triageSource) {
103
103
  return sendGraphQLRequest("CreateTriageFromRecorder", `mutation CreateTriageFromRecorder(
104
104
  $apiKey: String!,
105
105
  $recordingSessionId: String!,
106
106
  $timestampStart: String!,
107
107
  $timestampEnd: String!,
108
- $description: String
108
+ $description: String,
109
+ $triageSource: TriageSourceEnum
109
110
  ) {
110
111
  createTriageFromRecorder(
111
112
  apiKey: $apiKey,
112
113
  recordingSessionId: $recordingSessionId,
113
114
  timestampStart: $timestampStart,
114
115
  timestampEnd: $timestampEnd,
115
- description: $description
116
+ description: $description,
117
+ triageSource: $triageSource
116
118
  ) {
117
119
  id
118
120
  }
@@ -123,6 +125,7 @@ export function createTriageFromRecorder(apiKey, backendApi, recordingSessionId,
123
125
  timestampStart,
124
126
  timestampEnd,
125
127
  description,
128
+ triageSource,
126
129
  backendApi,
127
130
  });
128
131
  }
@@ -151,7 +154,7 @@ export function fetchEngineeringTicketPlatformIntegrations(apiKey, backendApi) {
151
154
  }
152
155
  }`, { apiKey, backendApi });
153
156
  }
154
- export function createTriageAndIssueFromRecorder(apiKey, backendApi, recordingSessionId, timestampStart, timestampEnd, description, issueName, issueDescription, createEngineeringTicket, teamId, projectId, priority, labels, issueType, customFields) {
157
+ export function createTriageAndIssueFromRecorder(apiKey, backendApi, recordingSessionId, timestampStart, timestampEnd, description, issueName, issueDescription, createEngineeringTicket, teamId, projectId, priority, labels, issueType, customFields, triageSource) {
155
158
  return sendGraphQLRequest("CreateTriageAndIssueFromRecorder", `mutation CreateTriageAndIssueFromRecorder(
156
159
  $apiKey: String!,
157
160
  $recordingSessionId: String!,
@@ -166,7 +169,8 @@ export function createTriageAndIssueFromRecorder(apiKey, backendApi, recordingSe
166
169
  $priority: Int,
167
170
  $labels: [String!],
168
171
  $issueType: String,
169
- $customFields: JSON
172
+ $customFields: JSON,
173
+ $triageSource: TriageSourceEnum
170
174
  ) {
171
175
  createTriageAndIssueFromRecorder(
172
176
  apiKey: $apiKey,
@@ -182,7 +186,8 @@ export function createTriageAndIssueFromRecorder(apiKey, backendApi, recordingSe
182
186
  priority: $priority,
183
187
  labels: $labels,
184
188
  issueType: $issueType,
185
- customFields: $customFields
189
+ customFields: $customFields,
190
+ triageSource: $triageSource
186
191
  ) {
187
192
  id
188
193
  title
@@ -203,6 +208,7 @@ export function createTriageAndIssueFromRecorder(apiKey, backendApi, recordingSe
203
208
  labels,
204
209
  issueType,
205
210
  customFields,
211
+ triageSource,
206
212
  backendApi,
207
213
  });
208
214
  }
@@ -1275,12 +1275,12 @@ function bindListeners() {
1275
1275
  }
1276
1276
  closeModal();
1277
1277
  // Create triage + issue (with optional engineering ticket)
1278
- createTriageAndIssue(`${startTimestamp}`, `${endTimestamp}`, desc, issueName, issueDescription, currentState.createEngTicket, engTicketTeam, engTicketProject, engTicketPriority, engTicketLabels, engTicketIssueType, engTicketCustomFields);
1278
+ createTriageAndIssue(`${startTimestamp}`, `${endTimestamp}`, desc, issueName, issueDescription, currentState.createEngTicket, engTicketTeam, engTicketProject, engTicketPriority, engTicketLabels, engTicketIssueType, engTicketCustomFields, mode === "startnow" ? "RECORDED" : "LOOKBACK");
1279
1279
  }
1280
1280
  else {
1281
1281
  closeModal();
1282
1282
  // Create triage only
1283
- createTriage(`${startTimestamp}`, `${endTimestamp}`, desc);
1283
+ createTriage(`${startTimestamp}`, `${endTimestamp}`, desc, mode === "startnow" ? "RECORDED" : "LOOKBACK");
1284
1284
  }
1285
1285
  }
1286
1286
  });
@@ -1446,10 +1446,10 @@ function reopenModalAfterStop() {
1446
1446
  submitBtn.style.opacity = "1";
1447
1447
  submitBtn.style.cursor = "pointer";
1448
1448
  }
1449
- async function createTriage(startTimestamp, endTimestamp, description) {
1449
+ async function createTriage(startTimestamp, endTimestamp, description, triageSource) {
1450
1450
  try {
1451
1451
  showStatusModal(true);
1452
- const response = await createTriageFromRecorder(ReportIssueContext.apiKey, ReportIssueContext.backendApi, getSessionIdSafely(), startTimestamp, endTimestamp, description);
1452
+ const response = await createTriageFromRecorder(ReportIssueContext.apiKey, ReportIssueContext.backendApi, getSessionIdSafely(), startTimestamp, endTimestamp, description, triageSource);
1453
1453
  if (response?.errors?.length) {
1454
1454
  const errorMsg = response.errors.map((e) => e.message).join("; ");
1455
1455
  console.error("GraphQL error creating triage:", errorMsg);
@@ -1470,10 +1470,10 @@ async function createTriage(startTimestamp, endTimestamp, description) {
1470
1470
  showStatusModal(false, null, "Something went wrong. Please try again.");
1471
1471
  }
1472
1472
  }
1473
- async function createTriageAndIssue(startTimestamp, endTimestamp, description, issueName, issueDescription, createEngTicket, engTicketTeam, engTicketProject, engTicketPriority, engTicketLabels, engTicketIssueType, engTicketCustomFields) {
1473
+ async function createTriageAndIssue(startTimestamp, endTimestamp, description, issueName, issueDescription, createEngTicket, engTicketTeam, engTicketProject, engTicketPriority, engTicketLabels, engTicketIssueType, engTicketCustomFields, triageSource) {
1474
1474
  try {
1475
1475
  showStatusModal(true);
1476
- const response = await createTriageAndIssueFromRecorder(ReportIssueContext.apiKey, ReportIssueContext.backendApi, getSessionIdSafely(), startTimestamp, endTimestamp, description, issueName, issueDescription, createEngTicket, engTicketTeam, engTicketProject, engTicketPriority, engTicketLabels, engTicketIssueType, engTicketCustomFields);
1476
+ const response = await createTriageAndIssueFromRecorder(ReportIssueContext.apiKey, ReportIssueContext.backendApi, getSessionIdSafely(), startTimestamp, endTimestamp, description, issueName, issueDescription, createEngTicket, engTicketTeam, engTicketProject, engTicketPriority, engTicketLabels, engTicketIssueType, engTicketCustomFields, triageSource);
1477
1477
  if (response?.errors?.length) {
1478
1478
  const errorMsg = response.errors.map((e) => e.message).join("; ");
1479
1479
  console.error("GraphQL error creating triage and issue:", errorMsg);
package/dist/recorder.cjs CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const e = require("./chunks/index-B8gnDRst.js");
3
+ const e = require("./chunks/index-B8AEJs-g.js");
4
4
  exports.DEFAULT_CAPTURE_SETTINGS = e.DEFAULT_CAPTURE_SETTINGS, exports.DEFAULT_CONSOLE_RECORDING_SETTINGS = e.DEFAULT_CONSOLE_RECORDING_SETTINGS, exports.STORAGE_VERSION = e.STORAGE_VERSION, exports.addOrUpdateMetadata = e.addOrUpdateMetadata, exports.buildBatches = e.buildBatches, exports.clearStaleFuncSpanState = e.clearStaleFuncSpanState, exports.createTriageAndIssueFromRecorder = e.createTriageAndIssueFromRecorder, exports.createTriageFromRecorder = e.createTriageFromRecorder, exports.disableFunctionSpanTracking = e.disableFunctionSpanTracking, exports.enableFunctionSpanTracking = e.enableFunctionSpanTracking, exports.ensureHrefCache = e.ensureHrefCache, exports.eventSize = e.eventSize, exports.fetchAndSendIp = e.fetchAndSendIp, exports.fetchCaptureSettings = e.fetchCaptureSettings, exports.fetchEngineeringTicketPlatformIntegrations = e.fetchEngineeringTicketPlatformIntegrations, exports.fetchFunctionSpanTrackingEnabled = e.fetchFunctionSpanTrackingEnabled, exports.flushBufferedEvents = e.flushBufferedEvents, exports.getCachedHref = e.getCachedHref, exports.getCachedHrefNoQuery = e.getCachedHrefNoQuery, exports.getFuncSpanHeader = e.getFuncSpanHeader, exports.getOrSetSessionId = e.getOrSetSessionId, exports.getUrlAndStoredUuids = e.getUrlAndStoredUuids, exports.identify = e.identify, exports.initRecorder = e.initRecorder, exports.initializeConsolePlugin = e.initializeConsolePlugin, exports.initializeDomContentEvents = e.initializeDomContentEvents, exports.initializeFunctionSpanTrackingFromApi = e.initializeFunctionSpanTrackingFromApi, exports.initializeRecording = e.initializeRecording, exports.initializeWebSocket = e.initializeWebSocket, exports.invalidateUrlCache = e.invalidateUrlCache, exports.isFunctionSpanTrackingEnabled = e.isFunctionSpanTrackingEnabled, exports.matchUrlWithWildcard = e.matchUrlWithWildcard, Object.defineProperty(exports, "nowTimestamp", { enumerable: true, get: () => e.nowTimestamp }), exports.onNavigationChange = e.onNavigationChange, exports.openReportIssueModal = e.openReportIssueModal, exports.restoreFuncSpanState = e.restoreFuncSpanState, exports.sendDomainsToNotPropagateHeaderTo = e.sendDomainsToNotPropagateHeaderTo, exports.sendEvent = e.sendEvent, exports.sendGraphQLRequest = e.sendGraphQLRequest, exports.sendMessage = e.sendMessage, exports.startRecording = e.startRecording, exports.startRecordingSession = e.startRecordingSession, exports.trackingEvent = e.trackingEvent, exports.withAppUrlMetadata = e.withAppUrlMetadata;
package/dist/recorder.js CHANGED
@@ -1,4 +1,4 @@
1
- import { D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, z, A, B, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R } from "./chunks/index-w2Ted1rp.js";
1
+ import { D, a, S, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, z, A, B, C, E, F, G, H, I, J, K, L, M, N, O, P, Q, R } from "./chunks/index-Dd5rk8Gj.js";
2
2
  export {
3
3
  D as DEFAULT_CAPTURE_SETTINGS,
4
4
  a as DEFAULT_CONSOLE_RECORDING_SETTINGS,
Binary file
Binary file
@@ -6,6 +6,6 @@ export declare function fetchCaptureSettings(apiKey: string, backendApi: string)
6
6
  export declare function fetchFunctionSpanTrackingEnabled(apiKey: string, backendApi: string): Promise<GraphQLResponse<FunctionSpanTrackingEnabledResponse>>;
7
7
  export declare function startRecordingSession(apiKey: string, recordingId: string, backendApi: string, serviceIdentifier: string, serviceVersion?: string, mapUuid?: string, gitSha?: string, library?: string, serviceAdditionalMetadata?: Record<string, any>): Promise<GraphQLResponse<StartSessionResponse>>;
8
8
  export declare function sendDomainsToNotPropagateHeaderTo(apiKey: string, domains: string[], backendApi: string): Promise<GraphQLResponse<void>>;
9
- export declare function createTriageFromRecorder(apiKey: string, backendApi: string, recordingSessionId: string, timestampStart: string, timestampEnd: string, description?: string): Promise<GraphQLResponse<CreateTriageResponse>>;
9
+ export declare function createTriageFromRecorder(apiKey: string, backendApi: string, recordingSessionId: string, timestampStart: string, timestampEnd: string, description?: string, triageSource?: string): Promise<GraphQLResponse<CreateTriageResponse>>;
10
10
  export declare function fetchEngineeringTicketPlatformIntegrations(apiKey: string, backendApi: string): Promise<GraphQLResponse<GetEngineeringTicketPlatformIntegrationsFromApiKeyResponse>>;
11
- export declare function createTriageAndIssueFromRecorder(apiKey: string, backendApi: string, recordingSessionId: string, timestampStart: string, timestampEnd: string, description: string, issueName: string, issueDescription: string, createEngineeringTicket: boolean, teamId?: string, projectId?: string, priority?: number, labels?: string[], issueType?: string, customFields?: any): Promise<GraphQLResponse<CreateTriageAndIssueFromRecorderResponse>>;
11
+ export declare function createTriageAndIssueFromRecorder(apiKey: string, backendApi: string, recordingSessionId: string, timestampStart: string, timestampEnd: string, description: string, issueName: string, issueDescription: string, createEngineeringTicket: boolean, teamId?: string, projectId?: string, priority?: number, labels?: string[], issueType?: string, customFields?: any, triageSource?: string): Promise<GraphQLResponse<CreateTriageAndIssueFromRecorderResponse>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailfish-ai/recorder",
3
- "version": "1.10.9",
3
+ "version": "1.10.10",
4
4
  "publishPublicly": true,
5
5
  "type": "module",
6
6
  "main": "dist/recorder.cjs",
Binary file
Binary file
Binary file
Binary file