@safaricom-mxl/web-sdk 0.1.4 → 0.1.5
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/instrumentations/replay/events/capture/network.cjs +31 -22
- package/dist/instrumentations/replay/events/capture/network.cjs.map +1 -1
- package/dist/instrumentations/replay/events/capture/network.js +31 -22
- package/dist/instrumentations/replay/events/capture/network.js.map +1 -1
- package/dist/mxl-web-sdk.js +7 -7
- package/dist/mxl-web-sdk.js.map +1 -1
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.cjs +30 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.cjs.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.cts +22 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.cts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.ts +22 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.d.ts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.js +29 -0
- package/dist/processors/UserSessionSpanProcessor/UserSessionSpanProcessor.js.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/types.cjs +0 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.cts +9 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.cts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.ts +9 -0
- package/dist/processors/UserSessionSpanProcessor/types.d.ts.map +1 -0
- package/dist/processors/UserSessionSpanProcessor/types.js +0 -0
- package/dist/resources/sdkConstants.cjs +1 -1
- package/dist/resources/sdkConstants.cjs.map +1 -1
- package/dist/resources/sdkConstants.d.cts +1 -1
- package/dist/resources/sdkConstants.d.ts +1 -1
- package/dist/resources/sdkConstants.js +1 -1
- package/dist/resources/sdkConstants.js.map +1 -1
- package/dist/sdk/initSDK.cjs +5 -2
- package/dist/sdk/initSDK.cjs.map +1 -1
- package/dist/sdk/initSDK.d.cts.map +1 -1
- package/dist/sdk/initSDK.d.ts.map +1 -1
- package/dist/sdk/initSDK.js +5 -2
- package/dist/sdk/initSDK.js.map +1 -1
- package/dist/sdk/types.d.cts +1 -0
- package/dist/sdk/types.d.cts.map +1 -1
- package/dist/sdk/types.d.ts +1 -0
- package/dist/sdk/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,8 +3,10 @@ const require_instrumentations_replay_events_capture_shared = require("./shared.
|
|
|
3
3
|
const require_instrumentations_replay_events_types = require("../types.cjs");
|
|
4
4
|
//#region src/instrumentations/replay/events/capture/network.ts
|
|
5
5
|
function installNetworkCapture(emit, ignoreUrl) {
|
|
6
|
+
let active = true;
|
|
6
7
|
const origFetch = typeof window !== "undefined" ? window.fetch.bind(window) : void 0;
|
|
7
|
-
|
|
8
|
+
const wrappedFetch = origFetch ? async (input, init) => {
|
|
9
|
+
if (!active) return origFetch(input, init);
|
|
8
10
|
const url = requestUrl(input);
|
|
9
11
|
const method = requestMethod(input, init);
|
|
10
12
|
const traceId = require_instrumentations_replay_events_types.activeTraceId();
|
|
@@ -17,7 +19,8 @@ function installNetworkCapture(emit, ignoreUrl) {
|
|
|
17
19
|
record(url, method, 0, start, traceId, String(error));
|
|
18
20
|
throw error;
|
|
19
21
|
}
|
|
20
|
-
};
|
|
22
|
+
} : void 0;
|
|
23
|
+
if (wrappedFetch) window.fetch = wrappedFetch;
|
|
21
24
|
const record = (url, method, status, start, traceId, error) => {
|
|
22
25
|
if (ignoreUrl(url)) return;
|
|
23
26
|
require_instrumentations_replay_events_capture_shared.safeEmit(emit, {
|
|
@@ -35,30 +38,36 @@ function installNetworkCapture(emit, ignoreUrl) {
|
|
|
35
38
|
const XHR = typeof window !== "undefined" ? window.XMLHttpRequest : void 0;
|
|
36
39
|
const origOpen = XHR?.prototype.open;
|
|
37
40
|
const origSend = XHR?.prototype.send;
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
const wrappedOpen = XHR && origOpen ? function(method, url, ...rest) {
|
|
42
|
+
if (active) {
|
|
40
43
|
this.__mxlMethod = String(method).toUpperCase();
|
|
41
44
|
this.__mxlUrl = typeof url === "string" ? url : url.href;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
45
|
+
}
|
|
46
|
+
return origOpen.apply(this, [
|
|
47
|
+
method,
|
|
48
|
+
url,
|
|
49
|
+
...rest
|
|
50
|
+
]);
|
|
51
|
+
} : void 0;
|
|
52
|
+
const wrappedSend = XHR && origSend ? function(...args) {
|
|
53
|
+
if (!active) return origSend.apply(this, args);
|
|
54
|
+
const meta = this;
|
|
55
|
+
const start = performance.now();
|
|
56
|
+
const traceId = require_instrumentations_replay_events_types.activeTraceId();
|
|
57
|
+
this.addEventListener("loadend", () => {
|
|
58
|
+
record(meta.__mxlUrl ?? "", meta.__mxlMethod ?? "GET", this.status, start, traceId);
|
|
59
|
+
});
|
|
60
|
+
return origSend.apply(this, args);
|
|
61
|
+
} : void 0;
|
|
62
|
+
if (XHR && wrappedOpen && wrappedSend) {
|
|
63
|
+
XHR.prototype.open = wrappedOpen;
|
|
64
|
+
XHR.prototype.send = wrappedSend;
|
|
57
65
|
}
|
|
58
66
|
return () => {
|
|
59
|
-
|
|
60
|
-
if (
|
|
61
|
-
if (XHR &&
|
|
67
|
+
active = false;
|
|
68
|
+
if (wrappedFetch && window.fetch === wrappedFetch) window.fetch = origFetch;
|
|
69
|
+
if (XHR && origOpen && wrappedOpen && XHR.prototype.open === wrappedOpen) XHR.prototype.open = origOpen;
|
|
70
|
+
if (XHR && origSend && wrappedSend && XHR.prototype.send === wrappedSend) XHR.prototype.send = origSend;
|
|
62
71
|
};
|
|
63
72
|
}
|
|
64
73
|
function requestUrl(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.cjs","names":["activeTraceId"],"sources":["../../../../../src/instrumentations/replay/events/capture/network.ts"],"sourcesContent":["import { activeTraceId } from '../types';\nimport { type Emit, safeEmit } from './shared';\n\nexport function installNetworkCapture(\n emit: Emit,\n ignoreUrl: (url: string) => boolean,\n): () => void {\n const origFetch =\n typeof window !== 'undefined' ? window.fetch.bind(window) : undefined;\n\n
|
|
1
|
+
{"version":3,"file":"network.cjs","names":["activeTraceId"],"sources":["../../../../../src/instrumentations/replay/events/capture/network.ts"],"sourcesContent":["import { activeTraceId } from '../types';\nimport { type Emit, safeEmit } from './shared';\n\nexport function installNetworkCapture(\n emit: Emit,\n ignoreUrl: (url: string) => boolean,\n): () => void {\n let active = true;\n const origFetch =\n typeof window !== 'undefined' ? window.fetch.bind(window) : undefined;\n\n const wrappedFetch = origFetch\n ? async (\n input: RequestInfo | URL,\n init?: RequestInit,\n ): Promise<Response> => {\n if (!active) {\n return origFetch(input, init);\n }\n const url = requestUrl(input);\n const method = requestMethod(input, init);\n const traceId = activeTraceId();\n const start = performance.now();\n try {\n const res = await origFetch(input, init);\n record(url, method, res.status, start, traceId);\n return res;\n } catch (error) {\n record(url, method, 0, start, traceId, String(error));\n throw error;\n }\n }\n : undefined;\n\n if (wrappedFetch) {\n window.fetch = wrappedFetch;\n }\n\n const record = (\n url: string,\n method: string,\n status: number,\n start: number,\n traceId: string | undefined,\n error?: string,\n ): void => {\n if (ignoreUrl(url)) {\n return;\n }\n safeEmit(emit, {\n net: {\n durationMs: Math.round(performance.now() - start),\n method,\n status,\n url,\n },\n traceId,\n type: 'network',\n ...(error ? { attrs: { error } } : {}),\n });\n };\n\n const XHR = typeof window !== 'undefined' ? window.XMLHttpRequest : undefined;\n const origOpen = XHR?.prototype.open;\n const origSend = XHR?.prototype.send;\n const wrappedOpen =\n XHR && origOpen\n ? function (\n this: XMLHttpRequest,\n method: string,\n url: string | URL,\n ...rest: unknown[]\n ) {\n if (active) {\n (this as XhrMeta).__mxlMethod = String(method).toUpperCase();\n (this as XhrMeta).__mxlUrl =\n typeof url === 'string' ? url : url.href;\n }\n return origOpen.apply(this, [method, url, ...rest] as never);\n }\n : undefined;\n const wrappedSend =\n XHR && origSend\n ? function (this: XMLHttpRequest, ...args: unknown[]) {\n if (!active) {\n return origSend.apply(this, args as never);\n }\n const meta = this as XhrMeta;\n const start = performance.now();\n const traceId = activeTraceId();\n this.addEventListener('loadend', () => {\n record(\n meta.__mxlUrl ?? '',\n meta.__mxlMethod ?? 'GET',\n this.status,\n start,\n traceId,\n );\n });\n return origSend.apply(this, args as never);\n }\n : undefined;\n\n if (XHR && wrappedOpen && wrappedSend) {\n XHR.prototype.open = wrappedOpen;\n XHR.prototype.send = wrappedSend;\n }\n\n return () => {\n active = false;\n if (wrappedFetch && window.fetch === wrappedFetch) {\n window.fetch = origFetch as typeof window.fetch;\n }\n if (XHR && origOpen && wrappedOpen && XHR.prototype.open === wrappedOpen) {\n XHR.prototype.open = origOpen;\n }\n if (XHR && origSend && wrappedSend && XHR.prototype.send === wrappedSend) {\n XHR.prototype.send = origSend;\n }\n };\n}\n\ninterface XhrMeta extends XMLHttpRequest {\n __mxlMethod?: string;\n __mxlUrl?: string;\n}\n\nfunction requestUrl(input: RequestInfo | URL): string {\n if (typeof input === 'string') {\n return input;\n }\n if (input instanceof URL) {\n return input.href;\n }\n return input.url;\n}\n\nfunction requestMethod(input: RequestInfo | URL, init?: RequestInit): string {\n const m =\n init?.method ??\n (typeof input === 'object' && 'method' in input ? input.method : undefined);\n return (m ?? 'GET').toUpperCase();\n}\n"],"mappings":";;;;AAGA,SAAgB,sBACd,MACA,WACY;CACZ,IAAI,SAAS;CACb,MAAM,YACJ,OAAO,WAAW,cAAc,OAAO,MAAM,KAAK,OAAO,GAAG,KAAA;CAE9D,MAAM,eAAe,YACjB,OACE,OACA,SACsB;AACtB,MAAI,CAAC,OACH,QAAO,UAAU,OAAO,KAAK;EAE/B,MAA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,KAAK,YAAY,IACjB,KAAK,eAAe,OACpB,KAAK,QACL,OACA,QACD;IACD;AACF,SAAO,SAAS,MAAM,MAAM,KAAc;KAE5C,KAAA;AAEN,KAAI,OAAO,eAAe,aAAa;AACrC,MAAI,UAAU,OAAO;AACrB,MAAI,UAAU,OAAO;;AAGvB,cAAa;AACX,WAAS;AACT,MAAI,gBAAgB,OAAO,UAAU,aACnC,QAAO,QAAQ;AAEjB,MAAI,OAAO,YAAY,eAAe,IAAI,UAAU,SAAS,YAC3D,KAAI,UAAU,OAAO;AAEvB,MAAI,OAAO,YAAY,eAAe,IAAI,UAAU,SAAS,YAC3D,KAAI,UAAU,OAAO;;;AAU3B,SAAS,WAAW,OAAkC;AACpD,KAAI,OAAO,UAAU,SACnB,QAAO;AAET,KAAI,iBAAiB,IACnB,QAAO,MAAM;AAEf,QAAO,MAAM;;AAGf,SAAS,cAAc,OAA0B,MAA4B;AAI3E,SAFE,MAAM,WACL,OAAO,UAAU,YAAY,YAAY,QAAQ,MAAM,SAAS,KAAA,MACtD,OAAO,aAAa"}
|
|
@@ -2,8 +2,10 @@ import { safeEmit } from "./shared.js";
|
|
|
2
2
|
import { activeTraceId } from "../types.js";
|
|
3
3
|
//#region src/instrumentations/replay/events/capture/network.ts
|
|
4
4
|
function installNetworkCapture(emit, ignoreUrl) {
|
|
5
|
+
let active = true;
|
|
5
6
|
const origFetch = typeof window !== "undefined" ? window.fetch.bind(window) : void 0;
|
|
6
|
-
|
|
7
|
+
const wrappedFetch = origFetch ? async (input, init) => {
|
|
8
|
+
if (!active) return origFetch(input, init);
|
|
7
9
|
const url = requestUrl(input);
|
|
8
10
|
const method = requestMethod(input, init);
|
|
9
11
|
const traceId = activeTraceId();
|
|
@@ -16,7 +18,8 @@ function installNetworkCapture(emit, ignoreUrl) {
|
|
|
16
18
|
record(url, method, 0, start, traceId, String(error));
|
|
17
19
|
throw error;
|
|
18
20
|
}
|
|
19
|
-
};
|
|
21
|
+
} : void 0;
|
|
22
|
+
if (wrappedFetch) window.fetch = wrappedFetch;
|
|
20
23
|
const record = (url, method, status, start, traceId, error) => {
|
|
21
24
|
if (ignoreUrl(url)) return;
|
|
22
25
|
safeEmit(emit, {
|
|
@@ -34,30 +37,36 @@ function installNetworkCapture(emit, ignoreUrl) {
|
|
|
34
37
|
const XHR = typeof window !== "undefined" ? window.XMLHttpRequest : void 0;
|
|
35
38
|
const origOpen = XHR?.prototype.open;
|
|
36
39
|
const origSend = XHR?.prototype.send;
|
|
37
|
-
|
|
38
|
-
|
|
40
|
+
const wrappedOpen = XHR && origOpen ? function(method, url, ...rest) {
|
|
41
|
+
if (active) {
|
|
39
42
|
this.__mxlMethod = String(method).toUpperCase();
|
|
40
43
|
this.__mxlUrl = typeof url === "string" ? url : url.href;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
};
|
|
44
|
+
}
|
|
45
|
+
return origOpen.apply(this, [
|
|
46
|
+
method,
|
|
47
|
+
url,
|
|
48
|
+
...rest
|
|
49
|
+
]);
|
|
50
|
+
} : void 0;
|
|
51
|
+
const wrappedSend = XHR && origSend ? function(...args) {
|
|
52
|
+
if (!active) return origSend.apply(this, args);
|
|
53
|
+
const meta = this;
|
|
54
|
+
const start = performance.now();
|
|
55
|
+
const traceId = activeTraceId();
|
|
56
|
+
this.addEventListener("loadend", () => {
|
|
57
|
+
record(meta.__mxlUrl ?? "", meta.__mxlMethod ?? "GET", this.status, start, traceId);
|
|
58
|
+
});
|
|
59
|
+
return origSend.apply(this, args);
|
|
60
|
+
} : void 0;
|
|
61
|
+
if (XHR && wrappedOpen && wrappedSend) {
|
|
62
|
+
XHR.prototype.open = wrappedOpen;
|
|
63
|
+
XHR.prototype.send = wrappedSend;
|
|
56
64
|
}
|
|
57
65
|
return () => {
|
|
58
|
-
|
|
59
|
-
if (
|
|
60
|
-
if (XHR &&
|
|
66
|
+
active = false;
|
|
67
|
+
if (wrappedFetch && window.fetch === wrappedFetch) window.fetch = origFetch;
|
|
68
|
+
if (XHR && origOpen && wrappedOpen && XHR.prototype.open === wrappedOpen) XHR.prototype.open = origOpen;
|
|
69
|
+
if (XHR && origSend && wrappedSend && XHR.prototype.send === wrappedSend) XHR.prototype.send = origSend;
|
|
61
70
|
};
|
|
62
71
|
}
|
|
63
72
|
function requestUrl(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"network.js","names":[],"sources":["../../../../../src/instrumentations/replay/events/capture/network.ts"],"sourcesContent":["import { activeTraceId } from '../types';\nimport { type Emit, safeEmit } from './shared';\n\nexport function installNetworkCapture(\n emit: Emit,\n ignoreUrl: (url: string) => boolean,\n): () => void {\n const origFetch =\n typeof window !== 'undefined' ? window.fetch.bind(window) : undefined;\n\n
|
|
1
|
+
{"version":3,"file":"network.js","names":[],"sources":["../../../../../src/instrumentations/replay/events/capture/network.ts"],"sourcesContent":["import { activeTraceId } from '../types';\nimport { type Emit, safeEmit } from './shared';\n\nexport function installNetworkCapture(\n emit: Emit,\n ignoreUrl: (url: string) => boolean,\n): () => void {\n let active = true;\n const origFetch =\n typeof window !== 'undefined' ? window.fetch.bind(window) : undefined;\n\n const wrappedFetch = origFetch\n ? async (\n input: RequestInfo | URL,\n init?: RequestInit,\n ): Promise<Response> => {\n if (!active) {\n return origFetch(input, init);\n }\n const url = requestUrl(input);\n const method = requestMethod(input, init);\n const traceId = activeTraceId();\n const start = performance.now();\n try {\n const res = await origFetch(input, init);\n record(url, method, res.status, start, traceId);\n return res;\n } catch (error) {\n record(url, method, 0, start, traceId, String(error));\n throw error;\n }\n }\n : undefined;\n\n if (wrappedFetch) {\n window.fetch = wrappedFetch;\n }\n\n const record = (\n url: string,\n method: string,\n status: number,\n start: number,\n traceId: string | undefined,\n error?: string,\n ): void => {\n if (ignoreUrl(url)) {\n return;\n }\n safeEmit(emit, {\n net: {\n durationMs: Math.round(performance.now() - start),\n method,\n status,\n url,\n },\n traceId,\n type: 'network',\n ...(error ? { attrs: { error } } : {}),\n });\n };\n\n const XHR = typeof window !== 'undefined' ? window.XMLHttpRequest : undefined;\n const origOpen = XHR?.prototype.open;\n const origSend = XHR?.prototype.send;\n const wrappedOpen =\n XHR && origOpen\n ? function (\n this: XMLHttpRequest,\n method: string,\n url: string | URL,\n ...rest: unknown[]\n ) {\n if (active) {\n (this as XhrMeta).__mxlMethod = String(method).toUpperCase();\n (this as XhrMeta).__mxlUrl =\n typeof url === 'string' ? url : url.href;\n }\n return origOpen.apply(this, [method, url, ...rest] as never);\n }\n : undefined;\n const wrappedSend =\n XHR && origSend\n ? function (this: XMLHttpRequest, ...args: unknown[]) {\n if (!active) {\n return origSend.apply(this, args as never);\n }\n const meta = this as XhrMeta;\n const start = performance.now();\n const traceId = activeTraceId();\n this.addEventListener('loadend', () => {\n record(\n meta.__mxlUrl ?? '',\n meta.__mxlMethod ?? 'GET',\n this.status,\n start,\n traceId,\n );\n });\n return origSend.apply(this, args as never);\n }\n : undefined;\n\n if (XHR && wrappedOpen && wrappedSend) {\n XHR.prototype.open = wrappedOpen;\n XHR.prototype.send = wrappedSend;\n }\n\n return () => {\n active = false;\n if (wrappedFetch && window.fetch === wrappedFetch) {\n window.fetch = origFetch as typeof window.fetch;\n }\n if (XHR && origOpen && wrappedOpen && XHR.prototype.open === wrappedOpen) {\n XHR.prototype.open = origOpen;\n }\n if (XHR && origSend && wrappedSend && XHR.prototype.send === wrappedSend) {\n XHR.prototype.send = origSend;\n }\n };\n}\n\ninterface XhrMeta extends XMLHttpRequest {\n __mxlMethod?: string;\n __mxlUrl?: string;\n}\n\nfunction requestUrl(input: RequestInfo | URL): string {\n if (typeof input === 'string') {\n return input;\n }\n if (input instanceof URL) {\n return input.href;\n }\n return input.url;\n}\n\nfunction requestMethod(input: RequestInfo | URL, init?: RequestInit): string {\n const m =\n init?.method ??\n (typeof input === 'object' && 'method' in input ? input.method : undefined);\n return (m ?? 'GET').toUpperCase();\n}\n"],"mappings":";;;AAGA,SAAgB,sBACd,MACA,WACY;CACZ,IAAI,SAAS;CACb,MAAM,YACJ,OAAO,WAAW,cAAc,OAAO,MAAM,KAAK,OAAO,GAAG,KAAA;CAE9D,MAAM,eAAe,YACjB,OACE,OACA,SACsB;AACtB,MAAI,CAAC,OACH,QAAO,UAAU,OAAO,KAAK;EAE/B,MAAM,MAAM,WAAW,MAAM;EAC7B,MAAM,SAAS,cAAc,OAAO,KAAK;EACzC,MAAM,UAAU,eAAe;EAC/B,MAAM,QAAQ,YAAY,KAAK;AAC/B,MAAI;GACF,MAAM,MAAM,MAAM,UAAU,OAAO,KAAK;AACxC,UAAO,KAAK,QAAQ,IAAI,QAAQ,OAAO,QAAQ;AAC/C,UAAO;WACA,OAAO;AACd,UAAO,KAAK,QAAQ,GAAG,OAAO,SAAS,OAAO,MAAM,CAAC;AACrD,SAAM;;KAGV,KAAA;AAEJ,KAAI,aACF,QAAO,QAAQ;CAGjB,MAAM,UACJ,KACA,QACA,QACA,OACA,SACA,UACS;AACT,MAAI,UAAU,IAAI,CAChB;AAEF,WAAS,MAAM;GACb,KAAK;IACH,YAAY,KAAK,MAAM,YAAY,KAAK,GAAG,MAAM;IACjD;IACA;IACA;IACD;GACD;GACA,MAAM;GACN,GAAI,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE;GACtC,CAAC;;CAGJ,MAAM,MAAM,OAAO,WAAW,cAAc,OAAO,iBAAiB,KAAA;CACpE,MAAM,WAAW,KAAK,UAAU;CAChC,MAAM,WAAW,KAAK,UAAU;CAChC,MAAM,cACJ,OAAO,WACH,SAEE,QACA,KACA,GAAG,MACH;AACA,MAAI,QAAQ;AACT,QAAiB,cAAc,OAAO,OAAO,CAAC,aAAa;AAC3D,QAAiB,WAChB,OAAO,QAAQ,WAAW,MAAM,IAAI;;AAExC,SAAO,SAAS,MAAM,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