@jumio/websdk 0.3.2 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dac.DVnCFTbP.js +5 -0
- package/dac_simd.B_kkhIDp.js +5 -0
- package/i18n/{ar.B5v-nzb0.js → ar.CVtc08CP.js} +267 -265
- package/i18n/{bg.f8dANnfL.js → bg.Ds2e2Kvl.js} +268 -265
- package/i18n/{cs.DKwBkw3X.js → cs.MA39qtrj.js} +267 -264
- package/i18n/{da.BQkZX9jF.js → da.UT4VIBo5.js} +255 -252
- package/i18n/{de.DYOLncd1.js → de.DrOgwXx1.js} +255 -252
- package/i18n/{el.raXOcOJw.js → el.B_0YUw_b.js} +267 -264
- package/i18n/{en.DhlJfylH.js → en.nvt_A7Ca.js} +255 -250
- package/i18n/{en_GB.BSP2p1O8.js → en_GB.mNh3SyT6.js} +231 -226
- package/i18n/{es.Ckls1eyO.js → es.B2IQp6um.js} +243 -240
- package/i18n/{es_MX.DIrzK_s-.js → es_MX.D8KUkwJE.js} +249 -261
- package/i18n/{et.D44UHjCs.js → et.BuUUrZsD.js} +255 -252
- package/i18n/{fi.oSGv1Rlj.js → fi.ClZfVmfJ.js} +267 -264
- package/i18n/{fr.vzh79Vv5.js → fr.uu5bQCKC.js} +247 -244
- package/i18n/{he.BrIB9Dml.js → he.C1PgRksV.js} +255 -264
- package/i18n/{hr.COvjFh-D.js → hr.DpC0FykX.js} +255 -252
- package/i18n/{hu.D4RuJNEh.js → hu.6ZVgsJu8.js} +259 -256
- package/i18n/{hy.Br_Tnv1F.js → hy.D45Shusk.js} +243 -250
- package/i18n/{id.EGjTml-d.js → id.CA-O_20D.js} +237 -236
- package/i18n/{it.B4MNwqAC.js → it.B1RNJxaF.js} +239 -236
- package/i18n/{ja.m07sF4Z5.js → ja.1ir7Tabb.js} +243 -242
- package/i18n/{ka_GE.CMTyCS05.js → ka_GE.KAIf1J95.js} +257 -264
- package/i18n/{km_KH.ClOtvwtJ.js → km_KH.V0gyuP4R.js} +267 -264
- package/i18n/{ko.UW8lo2rh.js → ko.DuA7mI08.js} +243 -242
- package/i18n/{lt.Cqx3mqip.js → lt.5VoyVP_J.js} +251 -248
- package/i18n/{ms.46dckKl9.js → ms.CDvob17O.js} +229 -234
- package/i18n/{nl.tkzp4rni.js → nl.CeKf6B0T.js} +247 -244
- package/i18n/{no.B_CoFr75.js → no.BXDMDcm7.js} +255 -252
- package/i18n/{pl.BdYvycQi.js → pl.GyOKjtfJ.js} +247 -244
- package/i18n/{pt.CpqxzJk6.js → pt.BJByQwSz.js} +231 -228
- package/i18n/{pt_BR.CPdKsknZ.js → pt_BR.Enps-Q3E.js} +62 -63
- package/i18n/{ro.CH1Zq2-8.js → ro.B7HQrbVr.js} +239 -237
- package/i18n/{ru.CZV0yFwC.js → ru.DZggUXG2.js} +267 -264
- package/i18n/{sk.BpkoICfL.js → sk.2TuzfWdS.js} +247 -244
- package/i18n/{sr_Cyrl.BmLmS38i.js → sr_Cyrl.iOK5BxTG.js} +263 -307
- package/i18n/{sr_Latn.B7L5t3Nr.js → sr_Latn.DhVvgzdO.js} +259 -303
- package/i18n/{sv.RoEeuy1i.js → sv.DFnnWQc4.js} +263 -260
- package/i18n/{sw.DjsmgoBA.js → sw.tFd-sAFG.js} +233 -242
- package/i18n/{th.DxR1Ndnr.js → th.DPFAV9DX.js} +271 -268
- package/i18n/{tr.CRhAJQTo.js → tr.nfFR4XRq.js} +237 -236
- package/i18n/{uk.C13KHs05.js → uk.Dzavklny.js} +277 -276
- package/i18n/{vi.CqmYDNk4.js → vi.DPPEUqvd.js} +134 -135
- package/i18n/{zh_CN.Dt6xc1C7.js → zh_CN.KG_H1Qj1.js} +267 -264
- package/i18n/{zh_HK.BOgKHxnF.js → zh_HK.D7hYXrXr.js} +199 -217
- package/{iProovMe.DzGWiLZD.js → iProovMe.B59XpcvO.js} +2 -2
- package/{index.Bua1o1Ys.js → index.C2zhSnEu.js} +21238 -20026
- package/index.d.ts +491 -271
- package/index.js +599 -590
- package/package.json +1 -1
- package/pdfjs/{pdf-DxeL3Pew.js → pdf-BappGl9h.js} +3102 -2929
- package/pdfjs/{pdf.worker.min-D0t7fbDu.js → pdf.worker.min-BJ9oGy-p.js} +2 -2
- package/profiler.9_ek2EsJ.js +227 -0
- package/{startRecording.Bxx3Dh3F.js → startRecording.DvD6dbJJ.js} +127 -127
- package/third-party-licenses.txt +138 -135
- package/dac.qT7PEl8J.js +0 -5
- package/dac_simd.C6bfdWfM.js +0 -5
- package/profiler.BYPEj3o_.js +0 -227
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { R as z, a as H, c as K, s as q, b as Q, d as m, e as I, f as W, m as v, h as X, i as Y, j as Z, k as $, l as x, r as ee } from "./index.C2zhSnEu.js";
|
|
2
|
+
function te(t) {
|
|
3
|
+
let n = 0;
|
|
4
|
+
for (const i of t)
|
|
5
|
+
i.stackId !== void 0 && n++;
|
|
6
|
+
return n;
|
|
7
|
+
}
|
|
8
|
+
const b = /* @__PURE__ */ new Map();
|
|
9
|
+
function ne(t, n) {
|
|
10
|
+
b.set(n, t);
|
|
11
|
+
}
|
|
12
|
+
function se(t) {
|
|
13
|
+
return b.get(t);
|
|
14
|
+
}
|
|
15
|
+
function O(t) {
|
|
16
|
+
for (const n of b.keys())
|
|
17
|
+
n < t && b.delete(n);
|
|
18
|
+
}
|
|
19
|
+
function re({ rawRumEvent: t, startTime: n }) {
|
|
20
|
+
if (t.type !== z.LONG_TASK)
|
|
21
|
+
return;
|
|
22
|
+
const i = t.long_task.id;
|
|
23
|
+
ne(i, n);
|
|
24
|
+
}
|
|
25
|
+
const oe = (t, n, i, r) => {
|
|
26
|
+
const l = ae(t, n, i, r), f = le(t, l), c = n.build("fetch", f);
|
|
27
|
+
return H("Sending profile to public profiling intake", { profilingIntakeURL: c, applicationId: i, sessionId: r }), fetch(c, {
|
|
28
|
+
body: f.data,
|
|
29
|
+
method: "POST"
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
function ae(t, n, i, r) {
|
|
33
|
+
const l = n.tags, f = ce(t, i, r), c = ie(l);
|
|
34
|
+
return {
|
|
35
|
+
...f,
|
|
36
|
+
attachments: ["wall-time.json"],
|
|
37
|
+
start: new Date(t.startClocks.timeStamp).toISOString(),
|
|
38
|
+
end: new Date(t.endClocks.timeStamp).toISOString(),
|
|
39
|
+
family: "chrome",
|
|
40
|
+
runtime: "chrome",
|
|
41
|
+
format: "json",
|
|
42
|
+
version: 4,
|
|
43
|
+
// Ingestion event version (not the version application tag)
|
|
44
|
+
tags_profiler: c.join(","),
|
|
45
|
+
_dd: {
|
|
46
|
+
clock_drift: K()
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function ie(t) {
|
|
51
|
+
return t.concat(["language:javascript", "runtime:chrome", "family:chrome", "host:browser"]);
|
|
52
|
+
}
|
|
53
|
+
function le(t, n) {
|
|
54
|
+
const i = new Blob([JSON.stringify(t)], {
|
|
55
|
+
type: "application/json"
|
|
56
|
+
}), r = new FormData();
|
|
57
|
+
return r.append("event", new Blob([JSON.stringify(n)], { type: "application/json" }), "event.json"), r.append("wall-time.json", i, "wall-time.json"), { data: r, bytesCount: 0 };
|
|
58
|
+
}
|
|
59
|
+
function ce(t, n, i) {
|
|
60
|
+
const r = {
|
|
61
|
+
application: {
|
|
62
|
+
id: n
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
i && (r.session = {
|
|
66
|
+
id: i
|
|
67
|
+
});
|
|
68
|
+
const l = Array.from(new Set(t.views.map((c) => c.viewId)));
|
|
69
|
+
l.length && (r.view = {
|
|
70
|
+
id: l
|
|
71
|
+
});
|
|
72
|
+
const f = t.longTasks.map((c) => c.id).filter((c) => c !== void 0);
|
|
73
|
+
return f.length && (r.long_task = { id: f }), r;
|
|
74
|
+
}
|
|
75
|
+
const ue = {
|
|
76
|
+
sendProfile: oe
|
|
77
|
+
}, de = {
|
|
78
|
+
sampleIntervalMs: 10,
|
|
79
|
+
// Sample stack trace every 10ms
|
|
80
|
+
collectIntervalMs: 6e4,
|
|
81
|
+
// Collect data every minute
|
|
82
|
+
minProfileDurationMs: 5e3,
|
|
83
|
+
// Require at least 5 seconds of profile data to reduce noise and cost
|
|
84
|
+
minNumberOfSamples: 50
|
|
85
|
+
// Require at least 50 samples (~500 ms) to report a profile to reduce noise and cost
|
|
86
|
+
};
|
|
87
|
+
function pe(t, n, i, r, l = de) {
|
|
88
|
+
const f = q(Q.LONG_ANIMATION_FRAME);
|
|
89
|
+
let c;
|
|
90
|
+
const g = [];
|
|
91
|
+
let o = { state: "stopped" };
|
|
92
|
+
function _(e) {
|
|
93
|
+
o.state !== "running" && (c = e ? { startClocks: e.startClocks, viewId: e.id, viewName: e.name } : void 0, g.push(I(t, window, "visibilitychange", R).stop, I(t, window, "beforeunload", j).stop), p());
|
|
94
|
+
}
|
|
95
|
+
async function L() {
|
|
96
|
+
await T("stopped"), g.forEach((e) => e()), O(m().relative), r.set({ status: "stopped", error_reason: void 0 });
|
|
97
|
+
}
|
|
98
|
+
function N(e) {
|
|
99
|
+
if (e.state === "running")
|
|
100
|
+
return {
|
|
101
|
+
cleanupTasks: e.cleanupTasks,
|
|
102
|
+
observer: e.observer
|
|
103
|
+
};
|
|
104
|
+
const s = [];
|
|
105
|
+
let a;
|
|
106
|
+
if (t.trackLongTasks) {
|
|
107
|
+
a = new PerformanceObserver(M), a.observe({
|
|
108
|
+
entryTypes: [A()]
|
|
109
|
+
});
|
|
110
|
+
const u = n.subscribe(12, (h) => {
|
|
111
|
+
re(h);
|
|
112
|
+
});
|
|
113
|
+
s.push(() => a == null ? void 0 : a.disconnect()), s.push(u.unsubscribe);
|
|
114
|
+
}
|
|
115
|
+
const d = n.subscribe(2, (u) => {
|
|
116
|
+
y({ viewId: u.id, viewName: u.name, startClocks: u.startClocks });
|
|
117
|
+
});
|
|
118
|
+
return s.push(d.unsubscribe), {
|
|
119
|
+
cleanupTasks: s,
|
|
120
|
+
observer: a
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function p() {
|
|
124
|
+
const e = W().Profiler;
|
|
125
|
+
if (!e)
|
|
126
|
+
throw r.set({ status: "error", error_reason: "not-supported-by-browser" }), new Error("RUM Profiler is not supported in this browser.");
|
|
127
|
+
k(o).catch(v);
|
|
128
|
+
const { cleanupTasks: s, observer: a } = N(o);
|
|
129
|
+
let d;
|
|
130
|
+
try {
|
|
131
|
+
d = new e({
|
|
132
|
+
sampleInterval: l.sampleIntervalMs,
|
|
133
|
+
// Keep buffer size at 1.5 times of minimum required to collect data for a profiling instance
|
|
134
|
+
maxBufferSize: Math.round(l.collectIntervalMs * 1.5 / l.sampleIntervalMs)
|
|
135
|
+
});
|
|
136
|
+
} catch (u) {
|
|
137
|
+
u instanceof Error && u.message.includes("disabled by Document Policy") ? (X.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.", u), r.set({ status: "error", error_reason: "missing-document-policy-header" })) : r.set({ status: "error", error_reason: "unexpected-exception" });
|
|
138
|
+
return;
|
|
139
|
+
}
|
|
140
|
+
r.set({ status: "running", error_reason: void 0 }), o = {
|
|
141
|
+
state: "running",
|
|
142
|
+
startClocks: m(),
|
|
143
|
+
profiler: d,
|
|
144
|
+
timeoutId: Y(p, l.collectIntervalMs),
|
|
145
|
+
longTasks: [],
|
|
146
|
+
views: [],
|
|
147
|
+
cleanupTasks: s,
|
|
148
|
+
observer: a
|
|
149
|
+
}, y(c), d.addEventListener("samplebufferfull", w);
|
|
150
|
+
}
|
|
151
|
+
async function k(e) {
|
|
152
|
+
var s, a;
|
|
153
|
+
if (e.state !== "running")
|
|
154
|
+
return;
|
|
155
|
+
S((a = (s = e.observer) === null || s === void 0 ? void 0 : s.takeRecords()) !== null && a !== void 0 ? a : []), Z(e.timeoutId), e.profiler.removeEventListener("samplebufferfull", w);
|
|
156
|
+
const { startClocks: d, longTasks: u, views: h } = e, C = m();
|
|
157
|
+
await e.profiler.stop().then((P) => {
|
|
158
|
+
const E = m(), G = u.length > 0, V = $(d.timeStamp, E.timeStamp) < l.minProfileDurationMs, J = te(P.samples) < l.minNumberOfSamples;
|
|
159
|
+
!G && (V || J) || (D(
|
|
160
|
+
// Enrich trace with time and instance data
|
|
161
|
+
Object.assign(P, {
|
|
162
|
+
startClocks: d,
|
|
163
|
+
endClocks: E,
|
|
164
|
+
clocksOrigin: x(),
|
|
165
|
+
longTasks: u,
|
|
166
|
+
views: h,
|
|
167
|
+
sampleInterval: l.sampleIntervalMs
|
|
168
|
+
})
|
|
169
|
+
), O(C.relative));
|
|
170
|
+
}).catch(v);
|
|
171
|
+
}
|
|
172
|
+
async function T(e) {
|
|
173
|
+
o.state === "running" && (o.cleanupTasks.forEach((s) => s()), await k(o), o = { state: e });
|
|
174
|
+
}
|
|
175
|
+
function y(e) {
|
|
176
|
+
o.state !== "running" || !e || o.views.push(e);
|
|
177
|
+
}
|
|
178
|
+
function D(e) {
|
|
179
|
+
var s;
|
|
180
|
+
const a = (s = i.findTrackedSession()) === null || s === void 0 ? void 0 : s.id;
|
|
181
|
+
ue.sendProfile(e, t.profilingEndpointBuilder, t.applicationId, a).catch(v);
|
|
182
|
+
}
|
|
183
|
+
function w() {
|
|
184
|
+
p();
|
|
185
|
+
}
|
|
186
|
+
function M(e) {
|
|
187
|
+
S(e.getEntries());
|
|
188
|
+
}
|
|
189
|
+
function S(e) {
|
|
190
|
+
if (o.state === "running")
|
|
191
|
+
for (const s of e) {
|
|
192
|
+
if (s.duration < l.sampleIntervalMs)
|
|
193
|
+
continue;
|
|
194
|
+
const a = ee(s.startTime), d = se(a.relative);
|
|
195
|
+
o.longTasks.push({
|
|
196
|
+
id: d,
|
|
197
|
+
duration: s.duration,
|
|
198
|
+
entryType: s.entryType,
|
|
199
|
+
startClocks: a
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
function R() {
|
|
204
|
+
document.visibilityState === "hidden" && o.state === "running" ? T("paused").catch(v) : document.visibilityState === "visible" && o.state === "paused" && p();
|
|
205
|
+
}
|
|
206
|
+
function j() {
|
|
207
|
+
p();
|
|
208
|
+
}
|
|
209
|
+
function A() {
|
|
210
|
+
return f ? "long-animation-frame" : "longtask";
|
|
211
|
+
}
|
|
212
|
+
function B() {
|
|
213
|
+
return o.state === "stopped";
|
|
214
|
+
}
|
|
215
|
+
function F() {
|
|
216
|
+
return o.state === "running";
|
|
217
|
+
}
|
|
218
|
+
function U() {
|
|
219
|
+
return o.state === "paused";
|
|
220
|
+
}
|
|
221
|
+
return { start: _, stop: L, isStopped: B, isRunning: F, isPaused: U };
|
|
222
|
+
}
|
|
223
|
+
export {
|
|
224
|
+
de as DEFAULT_RUM_PROFILER_CONFIGURATION,
|
|
225
|
+
pe as createRumProfiler
|
|
226
|
+
};
|
|
227
|
+
//# sourceMappingURL=profiler.9_ek2EsJ.js.map
|