@konnectio/core 4.7.18 → 4.8.0
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/{ActionField-L0Lr7Cq5.js → ActionField-CiBTmhVP.js} +5 -5
- package/dist/ActionField-CiBTmhVP.js.br +0 -0
- package/dist/ActionField-CiBTmhVP.js.gz +0 -0
- package/dist/{AvailabilitySkeleton-CSQUAVcs.js → AvailabilitySkeleton-Tv_yaXPa.js} +1458 -1300
- package/dist/AvailabilitySkeleton-Tv_yaXPa.js.br +0 -0
- package/dist/AvailabilitySkeleton-Tv_yaXPa.js.gz +0 -0
- package/dist/{CheckoutWindow-CjVK26L8.js → CheckoutWindow-3gTfVepQ.js} +17 -13
- package/dist/CheckoutWindow-3gTfVepQ.js.br +0 -0
- package/dist/CheckoutWindow-3gTfVepQ.js.gz +0 -0
- package/dist/{ErrorMessage-BZqsLh26.js → ErrorMessage-ClFJa4be.js} +2 -2
- package/dist/ErrorMessage-ClFJa4be.js.br +0 -0
- package/dist/{ErrorMessage-BZqsLh26.js.gz → ErrorMessage-ClFJa4be.js.gz} +0 -0
- package/dist/{EventAvailabilityForm-Cuxc0RuT.js → EventAvailabilityForm-D_UqbRBj.js} +12 -11
- package/dist/EventAvailabilityForm-D_UqbRBj.js.br +0 -0
- package/dist/EventAvailabilityForm-D_UqbRBj.js.gz +0 -0
- package/dist/{Field-AlAFHkiH.js → Field-CzT0QKcQ.js} +2 -2
- package/dist/Field-CzT0QKcQ.js.br +0 -0
- package/dist/Field-CzT0QKcQ.js.gz +0 -0
- package/dist/{HotelAvailabilityForm-C3iHHzNH.js → HotelAvailabilityForm-oY9nC2co.js} +14 -13
- package/dist/HotelAvailabilityForm-oY9nC2co.js.br +0 -0
- package/dist/HotelAvailabilityForm-oY9nC2co.js.gz +0 -0
- package/dist/{SelectField-hZSfVqht.js → SelectField-DMU4o8wT.js} +2945 -2832
- package/dist/SelectField-DMU4o8wT.js.br +0 -0
- package/dist/SelectField-DMU4o8wT.js.gz +0 -0
- package/dist/{TermsOfService-CSImjp8p.js → TermsOfService-Bh49zB1Y.js} +3 -3
- package/dist/TermsOfService-Bh49zB1Y.js.br +0 -0
- package/dist/TermsOfService-Bh49zB1Y.js.gz +0 -0
- package/dist/{_-ceQWaE_o.js → _-CYKi9htj.js} +3 -3
- package/dist/_-CYKi9htj.js.br +0 -0
- package/dist/_-CYKi9htj.js.gz +7 -0
- package/dist/availability.js +8 -8
- package/dist/availability.js.br +0 -0
- package/dist/availability.js.gz +0 -0
- package/dist/cancel-reservation.js +12 -12
- package/dist/cancel-reservation.js.br +0 -0
- package/dist/cancel-reservation.js.gz +0 -0
- package/dist/core.css +1 -1
- package/dist/core.css.br +0 -0
- package/dist/core.css.gz +0 -0
- package/dist/deep-link.js +1 -1
- package/dist/deep-link.js.br +0 -0
- package/dist/deep-link.js.gz +0 -0
- package/dist/dist-Dhf-kBcE.js +3631 -0
- package/dist/dist-Dhf-kBcE.js.br +0 -0
- package/dist/dist-Dhf-kBcE.js.gz +0 -0
- package/dist/{dist-DEZcjiNm.js → dist-IXFfy6j_.js} +79 -66
- package/dist/dist-IXFfy6j_.js.br +0 -0
- package/dist/dist-IXFfy6j_.js.gz +0 -0
- package/dist/event.js +104 -97
- package/dist/event.js.br +0 -0
- package/dist/event.js.gz +0 -0
- package/dist/gift-card-validation.js +10 -10
- package/dist/gift-card-validation.js.br +0 -0
- package/dist/gift-card-validation.js.gz +0 -0
- package/dist/gift-card.js +10 -10
- package/dist/gift-card.js.br +0 -0
- package/dist/gift-card.js.gz +0 -0
- package/dist/{giftCard-CoefzLvK.js → giftCard-BP6ydQ7Q.js} +3 -3
- package/dist/giftCard-BP6ydQ7Q.js.br +0 -0
- package/dist/giftCard-BP6ydQ7Q.js.gz +0 -0
- package/dist/hotel.js +2832 -1709
- package/dist/hotel.js.br +0 -0
- package/dist/hotel.js.gz +0 -0
- package/dist/{i18n-DwFTw_rF.js → i18n-BF6zkld-.js} +3397 -3461
- package/dist/i18n-BF6zkld-.js.br +0 -0
- package/dist/i18n-BF6zkld-.js.gz +0 -0
- package/dist/polyfill.js +1906 -1641
- package/dist/polyfill.js.br +0 -0
- package/dist/polyfill.js.gz +0 -0
- package/dist/{rolldown-runtime-Dqa2HsxW.js → rolldown-runtime-B0aSnxlc.js} +2 -2
- package/dist/rolldown-runtime-B0aSnxlc.js.br +0 -0
- package/dist/rolldown-runtime-B0aSnxlc.js.gz +5 -0
- package/dist/{style-DRBxevpd.js → style-CXIHVW9k.js} +8 -6
- package/dist/style-CXIHVW9k.js.br +0 -0
- package/dist/style-CXIHVW9k.js.gz +0 -0
- package/dist-wix/availability.js +42 -36
- package/dist-wix/event.js +32 -25
- package/dist-wix/gift-card-validation.js +33 -33
- package/dist-wix/gift-card.js +42 -35
- package/dist-wix/hotel.js +34 -27
- package/package.json +26 -24
- package/dist/ActionField-L0Lr7Cq5.js.br +0 -0
- package/dist/ActionField-L0Lr7Cq5.js.gz +0 -0
- package/dist/AvailabilitySkeleton-CSQUAVcs.js.br +0 -0
- package/dist/AvailabilitySkeleton-CSQUAVcs.js.gz +0 -0
- package/dist/CheckoutWindow-CjVK26L8.js.br +0 -0
- package/dist/CheckoutWindow-CjVK26L8.js.gz +0 -0
- package/dist/ErrorMessage-BZqsLh26.js.br +0 -0
- package/dist/EventAvailabilityForm-Cuxc0RuT.js.br +0 -0
- package/dist/EventAvailabilityForm-Cuxc0RuT.js.gz +0 -0
- package/dist/Field-AlAFHkiH.js.br +0 -0
- package/dist/Field-AlAFHkiH.js.gz +0 -0
- package/dist/HotelAvailabilityForm-C3iHHzNH.js.br +0 -0
- package/dist/HotelAvailabilityForm-C3iHHzNH.js.gz +0 -0
- package/dist/SelectField-hZSfVqht.js.br +0 -0
- package/dist/SelectField-hZSfVqht.js.gz +0 -0
- package/dist/TermsOfService-CSImjp8p.js.br +0 -0
- package/dist/TermsOfService-CSImjp8p.js.gz +0 -3
- package/dist/_-ceQWaE_o.js.br +0 -0
- package/dist/_-ceQWaE_o.js.gz +0 -5
- package/dist/dist-DEZcjiNm.js.br +0 -0
- package/dist/dist-DEZcjiNm.js.gz +0 -0
- package/dist/dist-DtPUJ4bx.js +0 -1338
- package/dist/dist-DtPUJ4bx.js.br +0 -0
- package/dist/dist-DtPUJ4bx.js.gz +0 -0
- package/dist/giftCard-CoefzLvK.js.br +0 -0
- package/dist/giftCard-CoefzLvK.js.gz +0 -0
- package/dist/i18n-DwFTw_rF.js.br +0 -0
- package/dist/i18n-DwFTw_rF.js.gz +0 -0
- package/dist/rolldown-runtime-Dqa2HsxW.js.br +0 -0
- package/dist/rolldown-runtime-Dqa2HsxW.js.gz +0 -2
- package/dist/style-DRBxevpd.js.br +0 -0
- package/dist/style-DRBxevpd.js.gz +0 -0
|
@@ -0,0 +1,3631 @@
|
|
|
1
|
+
import { r as e, t } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import { G as n, N as r, P as i, ct as a, yt as o } from "./i18n-BF6zkld-.js";
|
|
3
|
+
//#region node_modules/@flareapp/core/dist/urlAttributes-DmpMd_4O.mjs
|
|
4
|
+
var s = typeof process < "u" ? "2.11.0" : "?", c = "5pqzBljrmDvquWZYSrSUKldIUREtPyB3", l = "\"4.8.0\"";
|
|
5
|
+
function u(e, t, n) {
|
|
6
|
+
return n && !e && console.error(`Flare JavaScript client v${s}: ${t}`), !!e;
|
|
7
|
+
}
|
|
8
|
+
function d(e, t) {
|
|
9
|
+
return u(e, "The client was not yet initialised with an API key. Run client.light('<flare-project-key>') when you initialise your app. If you are running in dev mode and didn't run the light command on purpose, you can ignore this error.", t);
|
|
10
|
+
}
|
|
11
|
+
function f(e) {
|
|
12
|
+
if (e) return e.global || e.sticky ? new RegExp(e.source, e.flags.replace(/[gy]/g, "")) : e;
|
|
13
|
+
}
|
|
14
|
+
function ee(e) {
|
|
15
|
+
if (e === !0) return () => !0;
|
|
16
|
+
if (!e || e.length === 0) return () => !1;
|
|
17
|
+
let t = new Set(e.filter((e) => typeof e == "string")), n = e.filter((e) => e instanceof RegExp).map((e) => f(e));
|
|
18
|
+
return (e) => t.has(e) || n.some((t) => t.test(e));
|
|
19
|
+
}
|
|
20
|
+
function te(e) {
|
|
21
|
+
if (e instanceof Error) return e;
|
|
22
|
+
if (typeof e == "string") return Error(e);
|
|
23
|
+
if (typeof e == "object" && e) {
|
|
24
|
+
let t = e, n = typeof t.message == "string" ? t.message : String(e), r = Error(n);
|
|
25
|
+
return typeof t.stack == "string" && (r.stack = t.stack), typeof t.name == "string" && (r.name = t.name), r;
|
|
26
|
+
}
|
|
27
|
+
return Error(String(e));
|
|
28
|
+
}
|
|
29
|
+
function ne(e) {
|
|
30
|
+
let t = /* @__PURE__ */ new WeakSet(), n = /* @__PURE__ */ new WeakSet();
|
|
31
|
+
return {
|
|
32
|
+
registerSdkIdentity(n) {
|
|
33
|
+
t.has(n) || (t.add(n), n.setSdkInfo({
|
|
34
|
+
name: e.sdkName,
|
|
35
|
+
version: e.sdkVersion
|
|
36
|
+
}));
|
|
37
|
+
},
|
|
38
|
+
tagFramework(t, r) {
|
|
39
|
+
n.has(t) || (n.add(t), t.setFramework(r === void 0 ? { name: e.frameworkName } : {
|
|
40
|
+
name: e.frameworkName,
|
|
41
|
+
version: r
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
var re = 64;
|
|
47
|
+
function ie(e) {
|
|
48
|
+
let t = e.code;
|
|
49
|
+
if (typeof t == "string" && t.length !== 0) return t.slice(0, re);
|
|
50
|
+
}
|
|
51
|
+
var p = 5e4;
|
|
52
|
+
function m(e = p) {
|
|
53
|
+
return { remaining: e };
|
|
54
|
+
}
|
|
55
|
+
function h(e) {
|
|
56
|
+
return e.remaining <= 0 ? !1 : (e.remaining--, !0);
|
|
57
|
+
}
|
|
58
|
+
var ae = "[truncated: too large]";
|
|
59
|
+
function oe(e, t) {
|
|
60
|
+
let n = /* @__PURE__ */ new WeakSet(), r = m(), i = t.mode === "display" ? t.maxDepth : 24;
|
|
61
|
+
function a(e, o) {
|
|
62
|
+
if (!h(r)) return ae;
|
|
63
|
+
if (e === null) return null;
|
|
64
|
+
let s = typeof e;
|
|
65
|
+
if (s === "bigint") return e.toString();
|
|
66
|
+
if (s === "function") return t.mode === "display" ? "[Function]" : e;
|
|
67
|
+
if (s === "symbol") return t.mode === "display" ? "[Symbol]" : e;
|
|
68
|
+
if (s === "string") return t.mode === "display" ? se(e, t.stringCap) : e;
|
|
69
|
+
if (s !== "object") return e;
|
|
70
|
+
if (n.has(e)) return "[Circular]";
|
|
71
|
+
if (Array.isArray(e)) {
|
|
72
|
+
if (o > i) return t.mode === "display" ? "[Array]" : ae;
|
|
73
|
+
n.add(e);
|
|
74
|
+
let r = t.mode === "display" ? t.arrayCap : Infinity, s = (e.length > r ? e.slice(0, r) : e).map((e) => a(e, o + 1));
|
|
75
|
+
return e.length > r && s.push(`[… ${e.length - r} more items]`), n.delete(e), s;
|
|
76
|
+
}
|
|
77
|
+
if (!ce(e)) return t.mode === "display" ? "[Object]" : e;
|
|
78
|
+
if (o > i) return t.mode === "display" ? "[Object]" : ae;
|
|
79
|
+
n.add(e);
|
|
80
|
+
let c = {}, l = Object.keys(e), u = t.mode === "display" ? t.objectKeyCap : Infinity, d = l.length > u ? l.slice(0, u) : l;
|
|
81
|
+
for (let n of d) {
|
|
82
|
+
if (t.mode === "display" && t.denylist.test(n)) {
|
|
83
|
+
c[n] = "[redacted]";
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
try {
|
|
87
|
+
c[n] = a(e[n], o + 1);
|
|
88
|
+
} catch {
|
|
89
|
+
c[n] = "[Getter threw]";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return l.length > u && (c["…"] = `[${l.length - u} more keys]`), n.delete(e), c;
|
|
93
|
+
}
|
|
94
|
+
return a(e, 0);
|
|
95
|
+
}
|
|
96
|
+
function se(e, t) {
|
|
97
|
+
return e.length <= t ? e : `${e.slice(0, t)}…[truncated ${e.length - t} chars]`;
|
|
98
|
+
}
|
|
99
|
+
function ce(e) {
|
|
100
|
+
if (typeof e != "object" || !e) return !1;
|
|
101
|
+
let t = Object.getPrototypeOf(e);
|
|
102
|
+
return t === Object.prototype || t === null;
|
|
103
|
+
}
|
|
104
|
+
function g(e) {
|
|
105
|
+
return JSON.stringify(oe(e, { mode: "json" }));
|
|
106
|
+
}
|
|
107
|
+
function le(e) {
|
|
108
|
+
return e.map((e) => ({
|
|
109
|
+
type: "php_glow",
|
|
110
|
+
startTimeUnixNano: Math.round(e.microtime * 1e9),
|
|
111
|
+
endTimeUnixNano: null,
|
|
112
|
+
attributes: {
|
|
113
|
+
"glow.name": String(e.name),
|
|
114
|
+
"glow.level": e.messageLevel,
|
|
115
|
+
"glow.context": e.metaData ?? {}
|
|
116
|
+
}
|
|
117
|
+
}));
|
|
118
|
+
}
|
|
119
|
+
function ue(e, t) {
|
|
120
|
+
return e.startTimeUnixNano - t.startTimeUnixNano;
|
|
121
|
+
}
|
|
122
|
+
function de(e, t) {
|
|
123
|
+
return [...le(e), ...t].sort(ue);
|
|
124
|
+
}
|
|
125
|
+
function fe() {
|
|
126
|
+
return Math.round(Date.now() / 1e3);
|
|
127
|
+
}
|
|
128
|
+
var _ = /password|passwd|pwd|token|secret|authorization|\bauth\b|bearer|oauth|credentials?|cookie|api[-_]?key|private[-_]?key|session|csrf|xsrf|\bpin\b|\bssn\b|card[-_]?number|\bcvv\b/i;
|
|
129
|
+
function pe(e, t = !1, n = _) {
|
|
130
|
+
if (!e) return n;
|
|
131
|
+
if (t) {
|
|
132
|
+
let t = e.flags.replace(/[gy]/g, "");
|
|
133
|
+
return new RegExp(e.source, t);
|
|
134
|
+
}
|
|
135
|
+
let r = me(n.flags, e.flags);
|
|
136
|
+
return RegExp(`(?:${n.source})|(?:${e.source})`, r);
|
|
137
|
+
}
|
|
138
|
+
function me(e, t) {
|
|
139
|
+
let n = /* @__PURE__ */ new Set();
|
|
140
|
+
for (let r of e + t) r !== "g" && r !== "y" && n.add(r);
|
|
141
|
+
return [...n].join("");
|
|
142
|
+
}
|
|
143
|
+
function v(e, t = _) {
|
|
144
|
+
let n = ge(e), r = n.indexOf("?");
|
|
145
|
+
if (r === -1) return n;
|
|
146
|
+
let i = n.indexOf("#", r), a = i === -1 ? n.length : i, o = n.slice(0, r + 1), s = n.slice(r + 1, a), c = n.slice(a);
|
|
147
|
+
return `${o}${s.split("&").map((e) => {
|
|
148
|
+
if (e === "") return e;
|
|
149
|
+
let n = e.indexOf("="), r = n === -1 ? e : e.slice(0, n), i = _e(r);
|
|
150
|
+
return t.test(i) ? n === -1 ? r : `${r}=[redacted]` : e;
|
|
151
|
+
}).join("&")}${c}`;
|
|
152
|
+
}
|
|
153
|
+
function he(e, t = _) {
|
|
154
|
+
let n = Object.create(null);
|
|
155
|
+
for (let r of Object.keys(e)) n[r] = t.test(r) ? "[redacted]" : e[r];
|
|
156
|
+
return n;
|
|
157
|
+
}
|
|
158
|
+
function ge(e) {
|
|
159
|
+
let t = /^[a-z][a-z0-9+.-]*:\/\//i.exec(e);
|
|
160
|
+
if (!t) return e;
|
|
161
|
+
let n = t[0].length, r = e.slice(n), i = /[/?#]/.exec(r), a = i ? n + i.index : e.length, o = e.slice(n, a), s = o.lastIndexOf("@");
|
|
162
|
+
return s === -1 ? e : e.slice(0, n) + o.slice(s + 1) + e.slice(a);
|
|
163
|
+
}
|
|
164
|
+
function _e(e) {
|
|
165
|
+
try {
|
|
166
|
+
return decodeURIComponent(e);
|
|
167
|
+
} catch {
|
|
168
|
+
return e;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
function ve(e) {
|
|
172
|
+
if (typeof e == "string") return e;
|
|
173
|
+
if (e && typeof e == "object") {
|
|
174
|
+
let t = e.message;
|
|
175
|
+
if (typeof t == "string" && t) return t;
|
|
176
|
+
try {
|
|
177
|
+
return JSON.stringify(e);
|
|
178
|
+
} catch {
|
|
179
|
+
return "Unhandled promise rejection (non-serializable reason)";
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return String(e);
|
|
183
|
+
}
|
|
184
|
+
function ye(e) {
|
|
185
|
+
return !!e && typeof e == "object" && typeof e.stack == "string";
|
|
186
|
+
}
|
|
187
|
+
function be(e, t) {
|
|
188
|
+
if (t instanceof Error) {
|
|
189
|
+
e.reportSilently(t);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
if (ye(t)) {
|
|
193
|
+
let n = Error(ve(t));
|
|
194
|
+
n.stack = t.stack, e.reportSilently(n);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
Promise.resolve(e.reportUnhandledRejection(ve(t))).catch(() => {});
|
|
198
|
+
}
|
|
199
|
+
function y(e, t, n) {
|
|
200
|
+
n != null && (e[t] = n);
|
|
201
|
+
}
|
|
202
|
+
function xe(e, t) {
|
|
203
|
+
return { "context.custom": { [e]: t } };
|
|
204
|
+
}
|
|
205
|
+
var Se = 2048;
|
|
206
|
+
function Ce(e) {
|
|
207
|
+
return e.length <= 2048 ? e : `${e.slice(0, Se)}…[truncated]`;
|
|
208
|
+
}
|
|
209
|
+
function we(e, t = _) {
|
|
210
|
+
let n = Ce(v(e, t)), r = { "url.full": n }, i;
|
|
211
|
+
try {
|
|
212
|
+
i = new URL(n);
|
|
213
|
+
} catch {
|
|
214
|
+
return r;
|
|
215
|
+
}
|
|
216
|
+
return r["url.scheme"] = i.protocol.slice(0, -1), r["url.path"] = i.pathname, i.search && (r["url.query"] = i.search.slice(1)), r;
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region node_modules/stackframe/stackframe.js
|
|
220
|
+
var Te = /* @__PURE__ */ t(((e, t) => {
|
|
221
|
+
(function(n, r) {
|
|
222
|
+
/* istanbul ignore next */
|
|
223
|
+
typeof define == "function" && define.amd ? define("stackframe", [], r) : typeof e == "object" ? t.exports = r() : n.StackFrame = r();
|
|
224
|
+
})(e, function() {
|
|
225
|
+
function e(e) {
|
|
226
|
+
return !isNaN(parseFloat(e)) && isFinite(e);
|
|
227
|
+
}
|
|
228
|
+
function t(e) {
|
|
229
|
+
return e.charAt(0).toUpperCase() + e.substring(1);
|
|
230
|
+
}
|
|
231
|
+
function n(e) {
|
|
232
|
+
return function() {
|
|
233
|
+
return this[e];
|
|
234
|
+
};
|
|
235
|
+
}
|
|
236
|
+
var r = [
|
|
237
|
+
"isConstructor",
|
|
238
|
+
"isEval",
|
|
239
|
+
"isNative",
|
|
240
|
+
"isToplevel"
|
|
241
|
+
], i = ["columnNumber", "lineNumber"], a = [
|
|
242
|
+
"fileName",
|
|
243
|
+
"functionName",
|
|
244
|
+
"source"
|
|
245
|
+
], o = r.concat(i, a, ["args"], ["evalOrigin"]);
|
|
246
|
+
function s(e) {
|
|
247
|
+
if (e) for (var n = 0; n < o.length; n++) e[o[n]] !== void 0 && this["set" + t(o[n])](e[o[n]]);
|
|
248
|
+
}
|
|
249
|
+
s.prototype = {
|
|
250
|
+
getArgs: function() {
|
|
251
|
+
return this.args;
|
|
252
|
+
},
|
|
253
|
+
setArgs: function(e) {
|
|
254
|
+
if (Object.prototype.toString.call(e) !== "[object Array]") throw TypeError("Args must be an Array");
|
|
255
|
+
this.args = e;
|
|
256
|
+
},
|
|
257
|
+
getEvalOrigin: function() {
|
|
258
|
+
return this.evalOrigin;
|
|
259
|
+
},
|
|
260
|
+
setEvalOrigin: function(e) {
|
|
261
|
+
if (e instanceof s) this.evalOrigin = e;
|
|
262
|
+
else if (e instanceof Object) this.evalOrigin = new s(e);
|
|
263
|
+
else throw TypeError("Eval Origin must be an Object or StackFrame");
|
|
264
|
+
},
|
|
265
|
+
toString: function() {
|
|
266
|
+
var e = this.getFileName() || "", t = this.getLineNumber() || "", n = this.getColumnNumber() || "", r = this.getFunctionName() || "";
|
|
267
|
+
return this.getIsEval() ? e ? "[eval] (" + e + ":" + t + ":" + n + ")" : "[eval]:" + t + ":" + n : r ? r + " (" + e + ":" + t + ":" + n + ")" : e + ":" + t + ":" + n;
|
|
268
|
+
}
|
|
269
|
+
}, s.fromString = function(e) {
|
|
270
|
+
var t = e.indexOf("("), n = e.lastIndexOf(")"), r = e.substring(0, t), i = e.substring(t + 1, n).split(","), a = e.substring(n + 1);
|
|
271
|
+
if (a.indexOf("@") === 0) var o = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a, ""), c = o[1], l = o[2], u = o[3];
|
|
272
|
+
return new s({
|
|
273
|
+
functionName: r,
|
|
274
|
+
args: i || void 0,
|
|
275
|
+
fileName: c,
|
|
276
|
+
lineNumber: l || void 0,
|
|
277
|
+
columnNumber: u || void 0
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
for (var c = 0; c < r.length; c++) s.prototype["get" + t(r[c])] = n(r[c]), s.prototype["set" + t(r[c])] = (function(e) {
|
|
281
|
+
return function(t) {
|
|
282
|
+
this[e] = !!t;
|
|
283
|
+
};
|
|
284
|
+
})(r[c]);
|
|
285
|
+
for (var l = 0; l < i.length; l++) s.prototype["get" + t(i[l])] = n(i[l]), s.prototype["set" + t(i[l])] = (function(t) {
|
|
286
|
+
return function(n) {
|
|
287
|
+
if (!e(n)) throw TypeError(t + " must be a Number");
|
|
288
|
+
this[t] = Number(n);
|
|
289
|
+
};
|
|
290
|
+
})(i[l]);
|
|
291
|
+
for (var u = 0; u < a.length; u++) s.prototype["get" + t(a[u])] = n(a[u]), s.prototype["set" + t(a[u])] = (function(e) {
|
|
292
|
+
return function(t) {
|
|
293
|
+
this[e] = String(t);
|
|
294
|
+
};
|
|
295
|
+
})(a[u]);
|
|
296
|
+
return s;
|
|
297
|
+
});
|
|
298
|
+
})), Ee = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
|
|
299
|
+
(function(n, r) {
|
|
300
|
+
/* istanbul ignore next */
|
|
301
|
+
typeof define == "function" && define.amd ? define("error-stack-parser", ["stackframe"], r) : typeof e == "object" ? t.exports = r(Te()) : n.ErrorStackParser = r(n.StackFrame);
|
|
302
|
+
})(e, function(e) {
|
|
303
|
+
var t = /(^|@)\S+:\d+/, n = /^\s*at .*(\S+:\d+|\(native\))/m, r = /^(eval@)?(\[native code])?$/;
|
|
304
|
+
return {
|
|
305
|
+
parse: function(e) {
|
|
306
|
+
if (e.stacktrace !== void 0 || e["opera#sourceloc"] !== void 0) return this.parseOpera(e);
|
|
307
|
+
if (e.stack && e.stack.match(n)) return this.parseV8OrIE(e);
|
|
308
|
+
if (e.stack) return this.parseFFOrSafari(e);
|
|
309
|
+
throw Error("Cannot parse given Error object");
|
|
310
|
+
},
|
|
311
|
+
extractLocation: function(e) {
|
|
312
|
+
if (e.indexOf(":") === -1) return [e];
|
|
313
|
+
var t = /(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g, ""));
|
|
314
|
+
return [
|
|
315
|
+
t[1],
|
|
316
|
+
t[2] || void 0,
|
|
317
|
+
t[3] || void 0
|
|
318
|
+
];
|
|
319
|
+
},
|
|
320
|
+
parseV8OrIE: function(t) {
|
|
321
|
+
return t.stack.split("\n").filter(function(e) {
|
|
322
|
+
return !!e.match(n);
|
|
323
|
+
}, this).map(function(t) {
|
|
324
|
+
t.indexOf("(eval ") > -1 && (t = t.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
|
|
325
|
+
var n = t.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), r = n.match(/ (\(.+\)$)/);
|
|
326
|
+
n = r ? n.replace(r[0], "") : n;
|
|
327
|
+
var i = this.extractLocation(r ? r[1] : n);
|
|
328
|
+
return new e({
|
|
329
|
+
functionName: r && n || void 0,
|
|
330
|
+
fileName: ["eval", "<anonymous>"].indexOf(i[0]) > -1 ? void 0 : i[0],
|
|
331
|
+
lineNumber: i[1],
|
|
332
|
+
columnNumber: i[2],
|
|
333
|
+
source: t
|
|
334
|
+
});
|
|
335
|
+
}, this);
|
|
336
|
+
},
|
|
337
|
+
parseFFOrSafari: function(t) {
|
|
338
|
+
return t.stack.split("\n").filter(function(e) {
|
|
339
|
+
return !e.match(r);
|
|
340
|
+
}, this).map(function(t) {
|
|
341
|
+
if (t.indexOf(" > eval") > -1 && (t = t.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), t.indexOf("@") === -1 && t.indexOf(":") === -1) return new e({ functionName: t });
|
|
342
|
+
var n = /((.*".+"[^@]*)?[^@]*)(?:@)/, r = t.match(n), i = r && r[1] ? r[1] : void 0, a = this.extractLocation(t.replace(n, ""));
|
|
343
|
+
return new e({
|
|
344
|
+
functionName: i,
|
|
345
|
+
fileName: a[0],
|
|
346
|
+
lineNumber: a[1],
|
|
347
|
+
columnNumber: a[2],
|
|
348
|
+
source: t
|
|
349
|
+
});
|
|
350
|
+
}, this);
|
|
351
|
+
},
|
|
352
|
+
parseOpera: function(e) {
|
|
353
|
+
return !e.stacktrace || e.message.indexOf("\n") > -1 && e.message.split("\n").length > e.stacktrace.split("\n").length ? this.parseOpera9(e) : e.stack ? this.parseOpera11(e) : this.parseOpera10(e);
|
|
354
|
+
},
|
|
355
|
+
parseOpera9: function(t) {
|
|
356
|
+
for (var n = /Line (\d+).*script (?:in )?(\S+)/i, r = t.message.split("\n"), i = [], a = 2, o = r.length; a < o; a += 2) {
|
|
357
|
+
var s = n.exec(r[a]);
|
|
358
|
+
s && i.push(new e({
|
|
359
|
+
fileName: s[2],
|
|
360
|
+
lineNumber: s[1],
|
|
361
|
+
source: r[a]
|
|
362
|
+
}));
|
|
363
|
+
}
|
|
364
|
+
return i;
|
|
365
|
+
},
|
|
366
|
+
parseOpera10: function(t) {
|
|
367
|
+
for (var n = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, r = t.stacktrace.split("\n"), i = [], a = 0, o = r.length; a < o; a += 2) {
|
|
368
|
+
var s = n.exec(r[a]);
|
|
369
|
+
s && i.push(new e({
|
|
370
|
+
functionName: s[3] || void 0,
|
|
371
|
+
fileName: s[2],
|
|
372
|
+
lineNumber: s[1],
|
|
373
|
+
source: r[a]
|
|
374
|
+
}));
|
|
375
|
+
}
|
|
376
|
+
return i;
|
|
377
|
+
},
|
|
378
|
+
parseOpera11: function(n) {
|
|
379
|
+
return n.stack.split("\n").filter(function(e) {
|
|
380
|
+
return !!e.match(t) && !e.match(/^Error created at/);
|
|
381
|
+
}, this).map(function(t) {
|
|
382
|
+
var n = t.split("@"), r = this.extractLocation(n.pop()), i = n.shift() || "", a = i.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, o;
|
|
383
|
+
return i.match(/\(([^)]*)\)/) && (o = i.replace(/^[^(]+\(([^)]*)\)$/, "$1")), new e({
|
|
384
|
+
functionName: a,
|
|
385
|
+
args: o === void 0 || o === "[arguments not available]" ? void 0 : o.split(","),
|
|
386
|
+
fileName: r[0],
|
|
387
|
+
lineNumber: r[1],
|
|
388
|
+
columnNumber: r[2],
|
|
389
|
+
source: t
|
|
390
|
+
});
|
|
391
|
+
}, this);
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
});
|
|
395
|
+
})))(), 1), De = {
|
|
396
|
+
Js: "js",
|
|
397
|
+
Node: "node",
|
|
398
|
+
NodeElectron: "node-electron",
|
|
399
|
+
React: "react",
|
|
400
|
+
Vue: "vue",
|
|
401
|
+
Svelte: "svelte",
|
|
402
|
+
SvelteKit: "sveltekit",
|
|
403
|
+
ReactNative: "react-native"
|
|
404
|
+
}, b = {
|
|
405
|
+
Pageload: "browser_pageload",
|
|
406
|
+
Navigation: "browser_navigation",
|
|
407
|
+
Fetch: "browser_fetch",
|
|
408
|
+
Xhr: "browser_xhr",
|
|
409
|
+
Component: "browser_component",
|
|
410
|
+
WebVital: "browser_web_vital"
|
|
411
|
+
}, Oe = {
|
|
412
|
+
Click: "browser_click",
|
|
413
|
+
Input: "browser_input",
|
|
414
|
+
RouteChange: "browser_route_change"
|
|
415
|
+
}, x = {
|
|
416
|
+
Unset: 0,
|
|
417
|
+
Ok: 1,
|
|
418
|
+
Error: 2
|
|
419
|
+
}, ke = new TextEncoder();
|
|
420
|
+
function S(e) {
|
|
421
|
+
return ke.encode(e).length;
|
|
422
|
+
}
|
|
423
|
+
var Ae = 6e4, je = 15, Me = class {
|
|
424
|
+
pendingKeepaliveBytes = 0;
|
|
425
|
+
pendingKeepaliveRequests = 0;
|
|
426
|
+
keepaliveBudgetRemaining() {
|
|
427
|
+
return this.pendingKeepaliveRequests >= je ? 0 : Math.max(0, Ae - this.pendingKeepaliveBytes);
|
|
428
|
+
}
|
|
429
|
+
report(e, t, n, r, i = !1) {
|
|
430
|
+
return this.send({
|
|
431
|
+
url: t,
|
|
432
|
+
headers: {
|
|
433
|
+
Accept: "application/json",
|
|
434
|
+
"Content-Type": "application/json",
|
|
435
|
+
"X-Api-Token": n ?? "",
|
|
436
|
+
"X-Report-Browser-Extension-Errors": JSON.stringify(r),
|
|
437
|
+
"X-Flare-Client-Version": "2"
|
|
438
|
+
},
|
|
439
|
+
body: g(e),
|
|
440
|
+
label: "Flare",
|
|
441
|
+
debug: i,
|
|
442
|
+
keepalive: !1
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
logs(e, t, n, r = !1, i = !1) {
|
|
446
|
+
return this.send({
|
|
447
|
+
url: t,
|
|
448
|
+
headers: this.ingestHeaders(n),
|
|
449
|
+
body: g(e),
|
|
450
|
+
label: "Flare logs",
|
|
451
|
+
debug: r,
|
|
452
|
+
keepalive: i
|
|
453
|
+
});
|
|
454
|
+
}
|
|
455
|
+
traces(e, t, n, r = !1, i = !1) {
|
|
456
|
+
let a;
|
|
457
|
+
try {
|
|
458
|
+
a = JSON.stringify(e);
|
|
459
|
+
} catch {
|
|
460
|
+
a = g(e);
|
|
461
|
+
}
|
|
462
|
+
return this.send({
|
|
463
|
+
url: t,
|
|
464
|
+
headers: this.ingestHeaders(n),
|
|
465
|
+
body: a,
|
|
466
|
+
label: "Flare traces",
|
|
467
|
+
debug: r,
|
|
468
|
+
keepalive: i
|
|
469
|
+
});
|
|
470
|
+
}
|
|
471
|
+
ingestHeaders(e) {
|
|
472
|
+
return {
|
|
473
|
+
Accept: "application/json",
|
|
474
|
+
"Content-Type": "application/json",
|
|
475
|
+
"x-api-token": e ?? ""
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
send(e) {
|
|
479
|
+
let { url: t, headers: n, body: r, label: i, debug: a, keepalive: o } = e, s = o ? S(r) : 0, c = o && this.pendingKeepaliveRequests < je && this.pendingKeepaliveBytes + s <= Ae;
|
|
480
|
+
return c && (this.pendingKeepaliveBytes += s, this.pendingKeepaliveRequests += 1), fetch(t, {
|
|
481
|
+
method: "POST",
|
|
482
|
+
keepalive: c,
|
|
483
|
+
headers: n,
|
|
484
|
+
body: r
|
|
485
|
+
}).then((e) => {
|
|
486
|
+
a && e.status !== 201 && console.error(`Received response with status ${e.status} from ${i}`);
|
|
487
|
+
}, (e) => {
|
|
488
|
+
a && console.error(e);
|
|
489
|
+
}).finally(() => {
|
|
490
|
+
c && (this.pendingKeepaliveBytes -= s, --this.pendingKeepaliveRequests);
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
};
|
|
494
|
+
function Ne(e, t) {
|
|
495
|
+
let n = v(e, t);
|
|
496
|
+
return n.length > 256 ? n.slice(0, 256) : n;
|
|
497
|
+
}
|
|
498
|
+
function Pe(e, t, n, r, i) {
|
|
499
|
+
t.enableBreadcrumbs && e.active().addBreadcrumb({
|
|
500
|
+
type: n,
|
|
501
|
+
startTimeUnixNano: i,
|
|
502
|
+
endTimeUnixNano: null,
|
|
503
|
+
attributes: r
|
|
504
|
+
}, t.maxBreadcrumbs);
|
|
505
|
+
}
|
|
506
|
+
var Fe = class {
|
|
507
|
+
entries = [];
|
|
508
|
+
bufferedBytes = 0;
|
|
509
|
+
timer;
|
|
510
|
+
timerActive = !1;
|
|
511
|
+
constructor(e, t) {
|
|
512
|
+
this.deps = e, this.policy = t, this.deps.scheduler.register((e) => this.flush(e));
|
|
513
|
+
}
|
|
514
|
+
length() {
|
|
515
|
+
return this.entries.length;
|
|
516
|
+
}
|
|
517
|
+
add(e) {
|
|
518
|
+
let t = this.deps.getConfig();
|
|
519
|
+
if (t.hasConsent === !1) return;
|
|
520
|
+
let n = this.policy.limits(t), r = this.policy.estimateBytes(e);
|
|
521
|
+
if (r > n.maxBytes) {
|
|
522
|
+
t.debug && console.error(this.policy.oversizedMessage);
|
|
523
|
+
return;
|
|
524
|
+
}
|
|
525
|
+
this.entries.push({
|
|
526
|
+
record: e,
|
|
527
|
+
bytes: r
|
|
528
|
+
}), this.bufferedBytes += r, this.policy.onRecordBuffered?.(e), this.evaluateTriggers(t, n), this.trim(n);
|
|
529
|
+
}
|
|
530
|
+
flush(e) {
|
|
531
|
+
let t = this.deps.getConfig();
|
|
532
|
+
if (!this.policy.enabled(t) || this.entries.length === 0) return;
|
|
533
|
+
if (t.hasConsent === !1) {
|
|
534
|
+
this.clearTimer();
|
|
535
|
+
return;
|
|
536
|
+
}
|
|
537
|
+
if (!d(t.key, t.debug)) {
|
|
538
|
+
this.clearTimer();
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
this.clearTimer();
|
|
542
|
+
let n = this.policy.resourceForFlush(), r, i = !!e?.keepalive;
|
|
543
|
+
if (e?.keepalive ? (r = this.packForKeepalive(t, n), r.length === 0 ? (r = this.entries, this.entries = [], this.bufferedBytes = 0, i = !1) : (this.entries = this.entries.filter((e) => !r.includes(e)), this.bufferedBytes = this.entries.reduce((e, t) => e + t.bytes, 0), this.entries.length > 0 && this.armTimer(this.policy.limits(t)))) : (r = this.entries, this.entries = [], this.bufferedBytes = 0), r.length !== 0) try {
|
|
544
|
+
this.policy.send(this.policy.buildEnvelope(r.map((e) => e.record), n), t, i);
|
|
545
|
+
} catch (e) {
|
|
546
|
+
t.debug && console.error(this.policy.sendFailureMessage, e);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
clear() {
|
|
550
|
+
this.entries = [], this.bufferedBytes = 0, this.clearTimer();
|
|
551
|
+
}
|
|
552
|
+
evaluateTriggers(e, t) {
|
|
553
|
+
if (this.entries.length >= t.maxSize) {
|
|
554
|
+
this.flush();
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
if (this.bufferedBytes >= t.maxBytes) {
|
|
558
|
+
this.flush();
|
|
559
|
+
return;
|
|
560
|
+
}
|
|
561
|
+
this.armTimer(t);
|
|
562
|
+
}
|
|
563
|
+
armTimer(e) {
|
|
564
|
+
this.timerActive || (this.timerActive = !0, this.timer = setTimeout(() => {
|
|
565
|
+
this.timerActive = !1, this.timer = void 0, this.flush();
|
|
566
|
+
}, e.flushIntervalMs), this.timer.unref?.());
|
|
567
|
+
}
|
|
568
|
+
trim(e) {
|
|
569
|
+
if (this.entries.length > e.maxSize) {
|
|
570
|
+
let t = this.entries.length - e.maxSize;
|
|
571
|
+
for (let e = 0; e < t; e++) this.bufferedBytes -= this.entries[e].bytes;
|
|
572
|
+
this.entries = this.entries.slice(t);
|
|
573
|
+
}
|
|
574
|
+
for (; this.entries.length > 1 && this.bufferedBytes > e.maxBytes;) {
|
|
575
|
+
let e = this.entries.shift();
|
|
576
|
+
e && (this.bufferedBytes -= e.bytes);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
packForKeepalive(e, t) {
|
|
580
|
+
let n = this.policy.emptyEnvelopeBytes(t), r = Math.min(e.keepaliveMaxBytes, this.policy.keepaliveBudget?.(e) ?? e.keepaliveMaxBytes), i = [], a = 0, o = 0;
|
|
581
|
+
for (let t = this.entries.length - 1; t >= 0; t--) {
|
|
582
|
+
let s = this.entries[t], c = this.policy.recordBytes(s.record);
|
|
583
|
+
n + a + c + i.length <= r ? (i.unshift(s), a += c) : e.debug && o++;
|
|
584
|
+
}
|
|
585
|
+
return e.debug && o > 0 && console.error(this.policy.keepaliveDropMessage(o)), i;
|
|
586
|
+
}
|
|
587
|
+
clearTimer() {
|
|
588
|
+
this.timer &&= (clearTimeout(this.timer), void 0), this.timerActive = !1;
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
function Ie(e, t, n, r) {
|
|
592
|
+
let i = {
|
|
593
|
+
"telemetry.sdk.language": "javascript",
|
|
594
|
+
"telemetry.sdk.name": n.name,
|
|
595
|
+
"telemetry.sdk.version": n.version,
|
|
596
|
+
"flare.language.name": "javascript"
|
|
597
|
+
};
|
|
598
|
+
return t.serviceName && (i["service.name"] = t.serviceName), t.version && (i["service.version"] = t.version), t.stage && (i["service.stage"] = t.stage), r?.name && (i["flare.framework.name"] = r.name), r?.version && (i["flare.framework.version"] = r.version), {
|
|
599
|
+
...e,
|
|
600
|
+
...i
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
function Le(e, t = /* @__PURE__ */ new WeakSet(), n = m()) {
|
|
604
|
+
return Re(e, t, 0, n);
|
|
605
|
+
}
|
|
606
|
+
function Re(e, t, n, r) {
|
|
607
|
+
if (!h(r)) return { stringValue: ae };
|
|
608
|
+
if (typeof e == "string") return { stringValue: e };
|
|
609
|
+
if (typeof e == "boolean") return { boolValue: e };
|
|
610
|
+
if (typeof e == "number") return Number.isFinite(e) ? Number.isInteger(e) ? { intValue: e } : { doubleValue: e } : null;
|
|
611
|
+
if (e == null) return null;
|
|
612
|
+
if (n >= 24) return { stringValue: ae };
|
|
613
|
+
if (Array.isArray(e)) {
|
|
614
|
+
if (t.has(e)) return { stringValue: "[Circular]" };
|
|
615
|
+
t.add(e);
|
|
616
|
+
let i = [];
|
|
617
|
+
for (let a of e) {
|
|
618
|
+
let e = Re(a, t, n + 1, r);
|
|
619
|
+
e !== null && i.push(e);
|
|
620
|
+
}
|
|
621
|
+
return t.delete(e), { arrayValue: { values: i } };
|
|
622
|
+
}
|
|
623
|
+
if (typeof e == "object") {
|
|
624
|
+
if (t.has(e)) return { stringValue: "[Circular]" };
|
|
625
|
+
t.add(e);
|
|
626
|
+
let i = [];
|
|
627
|
+
for (let [a, o] of Object.entries(e)) {
|
|
628
|
+
let e = Re(o, t, n + 1, r);
|
|
629
|
+
e !== null && i.push({
|
|
630
|
+
key: a,
|
|
631
|
+
value: e
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
return t.delete(e), { kvlistValue: { values: i } };
|
|
635
|
+
}
|
|
636
|
+
return null;
|
|
637
|
+
}
|
|
638
|
+
function ze(e) {
|
|
639
|
+
let t = m(), n = [];
|
|
640
|
+
for (let [r, i] of Object.entries(e)) {
|
|
641
|
+
let e = Le(i, /* @__PURE__ */ new WeakSet(), t);
|
|
642
|
+
e !== null && n.push({
|
|
643
|
+
key: r,
|
|
644
|
+
value: e
|
|
645
|
+
});
|
|
646
|
+
}
|
|
647
|
+
return n;
|
|
648
|
+
}
|
|
649
|
+
function Be(e) {
|
|
650
|
+
return {
|
|
651
|
+
timeUnixNano: e.timeUnixNano,
|
|
652
|
+
observedTimeUnixNano: e.timeUnixNano,
|
|
653
|
+
severityNumber: e.severityNumber,
|
|
654
|
+
severityText: e.severityText,
|
|
655
|
+
body: { stringValue: e.message },
|
|
656
|
+
attributes: e.recordAttributes,
|
|
657
|
+
flags: 0,
|
|
658
|
+
droppedAttributesCount: 0
|
|
659
|
+
};
|
|
660
|
+
}
|
|
661
|
+
function Ve(e, t, n, r) {
|
|
662
|
+
return { resourceLogs: [{
|
|
663
|
+
resource: {
|
|
664
|
+
attributes: ze(t),
|
|
665
|
+
droppedAttributesCount: 0
|
|
666
|
+
},
|
|
667
|
+
scopeLogs: [{
|
|
668
|
+
scope: {
|
|
669
|
+
name: n,
|
|
670
|
+
version: r,
|
|
671
|
+
attributes: [],
|
|
672
|
+
droppedAttributesCount: 0
|
|
673
|
+
},
|
|
674
|
+
logRecords: e.map(Be)
|
|
675
|
+
}]
|
|
676
|
+
}] };
|
|
677
|
+
}
|
|
678
|
+
function He(e) {
|
|
679
|
+
return S(g(Be(e)));
|
|
680
|
+
}
|
|
681
|
+
function Ue(e, t, n) {
|
|
682
|
+
return S(g(Ve([], e, t, n)));
|
|
683
|
+
}
|
|
684
|
+
var We = {
|
|
685
|
+
debug: 5,
|
|
686
|
+
info: 9,
|
|
687
|
+
notice: 10,
|
|
688
|
+
warning: 13,
|
|
689
|
+
error: 17,
|
|
690
|
+
critical: 18,
|
|
691
|
+
alert: 19,
|
|
692
|
+
emergency: 21
|
|
693
|
+
};
|
|
694
|
+
function Ge(e) {
|
|
695
|
+
return We[e];
|
|
696
|
+
}
|
|
697
|
+
function Ke(e) {
|
|
698
|
+
return e.toUpperCase();
|
|
699
|
+
}
|
|
700
|
+
function qe(e, t) {
|
|
701
|
+
return Ge(e) >= Ge(t);
|
|
702
|
+
}
|
|
703
|
+
var Je = class {
|
|
704
|
+
inner;
|
|
705
|
+
resourceAttributes = {};
|
|
706
|
+
constructor(e) {
|
|
707
|
+
this.deps = e, this.inner = new Fe({
|
|
708
|
+
getConfig: e.getConfig,
|
|
709
|
+
scheduler: e.scheduler
|
|
710
|
+
}, {
|
|
711
|
+
limits: (e) => ({
|
|
712
|
+
maxSize: e.maxLogBufferSize,
|
|
713
|
+
maxBytes: e.logFlushMaxBytes,
|
|
714
|
+
flushIntervalMs: e.logFlushIntervalMs
|
|
715
|
+
}),
|
|
716
|
+
enabled: (e) => e.enableLogs,
|
|
717
|
+
keepaliveBudget: () => e.api.keepaliveBudgetRemaining(),
|
|
718
|
+
estimateBytes: (e) => this.estimateBytes(e),
|
|
719
|
+
emptyEnvelopeBytes: (t) => {
|
|
720
|
+
let n = e.getSdkInfo();
|
|
721
|
+
return Ue(t, n.name, n.version);
|
|
722
|
+
},
|
|
723
|
+
recordBytes: (e) => He(e),
|
|
724
|
+
oversizedMessage: "Flare: dropping oversized log record",
|
|
725
|
+
keepaliveDropMessage: (e) => `Flare: dropped ${e} log record(s) from keepalive envelope (over budget)`,
|
|
726
|
+
sendFailureMessage: "Flare: failed to send buffered log records",
|
|
727
|
+
resourceForFlush: () => this.resourceForFlush(),
|
|
728
|
+
buildEnvelope: (t, n) => {
|
|
729
|
+
let r = e.getSdkInfo();
|
|
730
|
+
return Ve(t, n, r.name, r.version);
|
|
731
|
+
},
|
|
732
|
+
send: (t, n, r) => {
|
|
733
|
+
e.track(e.api.logs(t, n.logsIngestUrl, n.key, n.debug, r));
|
|
734
|
+
},
|
|
735
|
+
onRecordBuffered: (e) => {
|
|
736
|
+
this.resourceAttributes = e.resourceAttributes;
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
}
|
|
740
|
+
debug(e, t = {}, n = {}) {
|
|
741
|
+
this.record("debug", e, t, n);
|
|
742
|
+
}
|
|
743
|
+
info(e, t = {}, n = {}) {
|
|
744
|
+
this.record("info", e, t, n);
|
|
745
|
+
}
|
|
746
|
+
notice(e, t = {}, n = {}) {
|
|
747
|
+
this.record("notice", e, t, n);
|
|
748
|
+
}
|
|
749
|
+
warning(e, t = {}, n = {}) {
|
|
750
|
+
this.record("warning", e, t, n);
|
|
751
|
+
}
|
|
752
|
+
error(e, t = {}, n = {}) {
|
|
753
|
+
this.record("error", e, t, n);
|
|
754
|
+
}
|
|
755
|
+
critical(e, t = {}, n = {}) {
|
|
756
|
+
this.record("critical", e, t, n);
|
|
757
|
+
}
|
|
758
|
+
alert(e, t = {}, n = {}) {
|
|
759
|
+
this.record("alert", e, t, n);
|
|
760
|
+
}
|
|
761
|
+
emergency(e, t = {}, n = {}) {
|
|
762
|
+
this.record("emergency", e, t, n);
|
|
763
|
+
}
|
|
764
|
+
bufferLength() {
|
|
765
|
+
return this.inner.length();
|
|
766
|
+
}
|
|
767
|
+
flush(e) {
|
|
768
|
+
this.inner.flush(e);
|
|
769
|
+
}
|
|
770
|
+
clear() {
|
|
771
|
+
this.inner.clear();
|
|
772
|
+
}
|
|
773
|
+
record(e, t, n, r) {
|
|
774
|
+
let i = this.deps.getConfig();
|
|
775
|
+
if (i.hasConsent === !1 || !i.enableLogs || i.minimumLogLevel && !qe(e, i.minimumLogLevel)) return;
|
|
776
|
+
let a = {
|
|
777
|
+
"log.context": n,
|
|
778
|
+
...r
|
|
779
|
+
}, { record: o, resource: s } = this.deps.buildLogAttributes(a);
|
|
780
|
+
this.inner.add({
|
|
781
|
+
timeUnixNano: String(Date.now()) + "000000",
|
|
782
|
+
severityNumber: Ge(e),
|
|
783
|
+
severityText: Ke(e),
|
|
784
|
+
message: t,
|
|
785
|
+
recordAttributes: ze(o),
|
|
786
|
+
resourceAttributes: s
|
|
787
|
+
});
|
|
788
|
+
}
|
|
789
|
+
resourceForFlush() {
|
|
790
|
+
return Ie(this.resourceAttributes, this.deps.getConfig(), this.deps.getSdkInfo(), this.deps.getFramework());
|
|
791
|
+
}
|
|
792
|
+
estimateBytes(e) {
|
|
793
|
+
return g(e).length;
|
|
794
|
+
}
|
|
795
|
+
}, Ye = class {
|
|
796
|
+
register() {}
|
|
797
|
+
}, Xe = [
|
|
798
|
+
"service.",
|
|
799
|
+
"telemetry.",
|
|
800
|
+
"host.",
|
|
801
|
+
"os.",
|
|
802
|
+
"process.",
|
|
803
|
+
"device.",
|
|
804
|
+
"network.",
|
|
805
|
+
"flare.framework.",
|
|
806
|
+
"flare.language."
|
|
807
|
+
], Ze = /* @__PURE__ */ new Set(["process.uptime"]);
|
|
808
|
+
function Qe(e) {
|
|
809
|
+
let t = {}, n = {};
|
|
810
|
+
for (let [r, i] of Object.entries(e)) !Ze.has(r) && Xe.some((e) => r.startsWith(e)) ? t[r] = i : n[r] = i;
|
|
811
|
+
return {
|
|
812
|
+
resource: t,
|
|
813
|
+
record: n
|
|
814
|
+
};
|
|
815
|
+
}
|
|
816
|
+
var C = {
|
|
817
|
+
id: "user.id",
|
|
818
|
+
email: "user.email",
|
|
819
|
+
fullName: "user.full_name",
|
|
820
|
+
ipAddress: "client.address"
|
|
821
|
+
}, $e = [...Object.values(C), "user.attributes"], et = class {
|
|
822
|
+
glows = [];
|
|
823
|
+
breadcrumbs = [];
|
|
824
|
+
pendingAttributes = {};
|
|
825
|
+
entryPoint = null;
|
|
826
|
+
addGlow(e, t) {
|
|
827
|
+
this.glows.push(e), this.glows.length > t && (this.glows = this.glows.slice(this.glows.length - t));
|
|
828
|
+
}
|
|
829
|
+
clearGlows() {
|
|
830
|
+
this.glows = [];
|
|
831
|
+
}
|
|
832
|
+
addBreadcrumb(e, t) {
|
|
833
|
+
t <= 0 || (this.breadcrumbs.push(e), this.breadcrumbs.length > t && (this.breadcrumbs = this.breadcrumbs.slice(this.breadcrumbs.length - t)));
|
|
834
|
+
}
|
|
835
|
+
clearBreadcrumbs() {
|
|
836
|
+
this.breadcrumbs = [];
|
|
837
|
+
}
|
|
838
|
+
setAttribute(e, t) {
|
|
839
|
+
this.pendingAttributes[e] = t;
|
|
840
|
+
}
|
|
841
|
+
mergeAttributes(e) {
|
|
842
|
+
Object.assign(this.pendingAttributes, e);
|
|
843
|
+
}
|
|
844
|
+
}, tt = class {
|
|
845
|
+
scope = new et();
|
|
846
|
+
active() {
|
|
847
|
+
return this.scope;
|
|
848
|
+
}
|
|
849
|
+
}, nt = {};
|
|
850
|
+
function rt(e, t, n, r) {
|
|
851
|
+
return new Promise((i) => {
|
|
852
|
+
if (!t || !n) return i({
|
|
853
|
+
codeSnippet: { 0: `Could not read from file: missing file URL or line number. URL: ${t} lineNumber: ${n}` },
|
|
854
|
+
trimmedColumnNumber: null
|
|
855
|
+
});
|
|
856
|
+
it(e, t).then((e) => i(e ? at(e, n, r) : {
|
|
857
|
+
codeSnippet: { 0: `Could not read from file: Error while opening file at URL ${t}` },
|
|
858
|
+
trimmedColumnNumber: null
|
|
859
|
+
}));
|
|
860
|
+
});
|
|
861
|
+
}
|
|
862
|
+
function it(e, t) {
|
|
863
|
+
let n = nt[t];
|
|
864
|
+
if (n !== void 0) return n;
|
|
865
|
+
let r = e.read(t).then((e) => (e === null && delete nt[t], e));
|
|
866
|
+
return nt[t] = r, r;
|
|
867
|
+
}
|
|
868
|
+
function at(e, t, n, r = 1e3, i = 40) {
|
|
869
|
+
let a = {}, o = null, s = e.split("\n"), c = t - 1, l = Math.floor(i / 2);
|
|
870
|
+
for (let e = -l; e <= l; e++) {
|
|
871
|
+
let i = c + e;
|
|
872
|
+
if (i < 0 || !s[i]) continue;
|
|
873
|
+
let l = i + 1, u = s[i];
|
|
874
|
+
if (u.length > r) {
|
|
875
|
+
if (n && n > r / 2) {
|
|
876
|
+
let e = n - Math.round(r / 2);
|
|
877
|
+
a[l] = u.slice(e, e + r), l === t && (o = Math.round(r / 2));
|
|
878
|
+
continue;
|
|
879
|
+
}
|
|
880
|
+
a[l] = u.slice(0, r) + "…";
|
|
881
|
+
continue;
|
|
882
|
+
}
|
|
883
|
+
a[l] = u;
|
|
884
|
+
}
|
|
885
|
+
return {
|
|
886
|
+
codeSnippet: a,
|
|
887
|
+
trimmedColumnNumber: o
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
function ot(e, t, n) {
|
|
891
|
+
return new Promise((r) => {
|
|
892
|
+
if (!ut(e)) return r([lt("stacktrace missing")]);
|
|
893
|
+
let i;
|
|
894
|
+
try {
|
|
895
|
+
i = Ee.default.parse(e);
|
|
896
|
+
} catch (n) {
|
|
897
|
+
return u(!1, "Couldn't parse stacktrace of below error:", t), t && (console.error(n), console.error(e)), r([lt("stacktrace could not be parsed")]);
|
|
898
|
+
}
|
|
899
|
+
Promise.all(i.map((e) => {
|
|
900
|
+
let t = ct(e.fileName);
|
|
901
|
+
return rt(n, t, e.lineNumber, e.columnNumber).then((n) => ({
|
|
902
|
+
lineNumber: e.lineNumber || 1,
|
|
903
|
+
columnNumber: e.columnNumber || 1,
|
|
904
|
+
method: e.functionName || "Anonymous or unknown function",
|
|
905
|
+
file: t || "Unknown file",
|
|
906
|
+
codeSnippet: n.codeSnippet,
|
|
907
|
+
class: "",
|
|
908
|
+
isApplicationFrame: dt(t)
|
|
909
|
+
}));
|
|
910
|
+
})).then(r);
|
|
911
|
+
});
|
|
912
|
+
}
|
|
913
|
+
var st = "address at ";
|
|
914
|
+
function ct(e) {
|
|
915
|
+
return e?.startsWith(st) ? e.slice(11) : e;
|
|
916
|
+
}
|
|
917
|
+
function lt(e) {
|
|
918
|
+
return {
|
|
919
|
+
lineNumber: 0,
|
|
920
|
+
columnNumber: 0,
|
|
921
|
+
method: "unknown",
|
|
922
|
+
file: "unknown",
|
|
923
|
+
codeSnippet: { 0: `Could not read from file: ${e}` },
|
|
924
|
+
class: "unknown"
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
function ut(e) {
|
|
928
|
+
if (!e || typeof e != "object") return !1;
|
|
929
|
+
let t = e, n = t.stack ?? t.stacktrace ?? t["opera#sourceloc"];
|
|
930
|
+
return typeof n == "string" && n !== `${t.name}: ${t.message}`;
|
|
931
|
+
}
|
|
932
|
+
function dt(e) {
|
|
933
|
+
return !e || !(/[/\\]node_modules[/\\]/.test(e) || /(^|[/\\])(vendor|vendors)[.~-][^/\\]*\.js/i.test(e));
|
|
934
|
+
}
|
|
935
|
+
var ft = class {
|
|
936
|
+
read(e) {
|
|
937
|
+
return Promise.resolve(null);
|
|
938
|
+
}
|
|
939
|
+
}, pt = class {
|
|
940
|
+
active;
|
|
941
|
+
root;
|
|
942
|
+
getActive() {
|
|
943
|
+
return this.active ?? this.root;
|
|
944
|
+
}
|
|
945
|
+
withActive(e, t) {
|
|
946
|
+
let n = this.active;
|
|
947
|
+
this.active = e;
|
|
948
|
+
try {
|
|
949
|
+
return t();
|
|
950
|
+
} finally {
|
|
951
|
+
this.active = n;
|
|
952
|
+
}
|
|
953
|
+
}
|
|
954
|
+
setActiveRoot(e) {
|
|
955
|
+
this.root = e;
|
|
956
|
+
}
|
|
957
|
+
};
|
|
958
|
+
function mt(e) {
|
|
959
|
+
let t = new Uint8Array(e), n = globalThis.crypto;
|
|
960
|
+
if (n && typeof n.getRandomValues == "function") n.getRandomValues(t);
|
|
961
|
+
else for (let n = 0; n < e; n++) t[n] = Math.floor(Math.random() * 256);
|
|
962
|
+
t.every((e) => e === 0) && (t[e - 1] = 1);
|
|
963
|
+
let r = "";
|
|
964
|
+
for (let n = 0; n < e; n++) r += t[n].toString(16).padStart(2, "0");
|
|
965
|
+
return r;
|
|
966
|
+
}
|
|
967
|
+
function ht() {
|
|
968
|
+
return mt(16);
|
|
969
|
+
}
|
|
970
|
+
function gt() {
|
|
971
|
+
return mt(8);
|
|
972
|
+
}
|
|
973
|
+
function _t(e, t, n = Math.random) {
|
|
974
|
+
if (e.parentSampled !== void 0) return e.parentSampled;
|
|
975
|
+
let r;
|
|
976
|
+
if (t.tracesSampler) {
|
|
977
|
+
let n;
|
|
978
|
+
try {
|
|
979
|
+
n = t.tracesSampler(e);
|
|
980
|
+
} catch (e) {
|
|
981
|
+
return t.debug && console.error("Flare: tracesSampler threw, treating span as not sampled", e), !1;
|
|
982
|
+
}
|
|
983
|
+
if (typeof n == "boolean") return n;
|
|
984
|
+
r = n;
|
|
985
|
+
} else r = t.tracesSampleRate;
|
|
986
|
+
return r = Math.max(0, Math.min(1, r)), r <= 0 ? !1 : r >= 1 || n() < r;
|
|
987
|
+
}
|
|
988
|
+
var vt = class {
|
|
989
|
+
traceId;
|
|
990
|
+
spanId;
|
|
991
|
+
parentSpanId;
|
|
992
|
+
name;
|
|
993
|
+
isRecording;
|
|
994
|
+
epoch;
|
|
995
|
+
stateGeneration;
|
|
996
|
+
startTimeUnixNano;
|
|
997
|
+
scopeAttributes;
|
|
998
|
+
endTimeUnixNano = 0;
|
|
999
|
+
status = { code: x.Unset };
|
|
1000
|
+
attributes = {};
|
|
1001
|
+
droppedAttributesCount = 0;
|
|
1002
|
+
events = [];
|
|
1003
|
+
droppedEventsCount = 0;
|
|
1004
|
+
ended = !1;
|
|
1005
|
+
constructor(e, t) {
|
|
1006
|
+
this.deps = t, this.traceId = e.traceId, this.spanId = e.spanId, this.parentSpanId = e.parentSpanId, this.name = e.name, this.isRecording = e.recording, this.epoch = e.epoch, this.stateGeneration = e.stateGeneration, this.startTimeUnixNano = e.startTimeUnixNano, this.scopeAttributes = e.scopeAttributes;
|
|
1007
|
+
}
|
|
1008
|
+
setAttribute(e, t) {
|
|
1009
|
+
return this.ended ? this : !(e in this.attributes) && Object.keys(this.attributes).length >= this.deps.maxAttributesPerSpan ? (this.droppedAttributesCount++, this) : (this.attributes[e] = t, this);
|
|
1010
|
+
}
|
|
1011
|
+
setStatus(e) {
|
|
1012
|
+
return this.ended || (this.status = e), this;
|
|
1013
|
+
}
|
|
1014
|
+
addEvent(e, t = {}) {
|
|
1015
|
+
if (this.ended) return this;
|
|
1016
|
+
if (this.events.length >= this.deps.maxEventsPerSpan) return this.droppedEventsCount++, this;
|
|
1017
|
+
let n = {}, r = 0;
|
|
1018
|
+
for (let [e, i] of Object.entries(t)) {
|
|
1019
|
+
if (Object.keys(n).length >= this.deps.maxAttributesPerSpanEvent) {
|
|
1020
|
+
r++;
|
|
1021
|
+
continue;
|
|
1022
|
+
}
|
|
1023
|
+
n[e] = i;
|
|
1024
|
+
}
|
|
1025
|
+
return this.events.push({
|
|
1026
|
+
name: e,
|
|
1027
|
+
timeUnixNano: this.deps.now(),
|
|
1028
|
+
attributes: n,
|
|
1029
|
+
droppedAttributesCount: r
|
|
1030
|
+
}), this;
|
|
1031
|
+
}
|
|
1032
|
+
end(e) {
|
|
1033
|
+
this.ended || (this.ended = !0, this.endTimeUnixNano = e ?? this.deps.now(), this.deps.onEnd(this));
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
function yt(e) {
|
|
1037
|
+
let t = e.status.message === void 0 ? { code: e.status.code } : {
|
|
1038
|
+
code: e.status.code,
|
|
1039
|
+
message: e.status.message
|
|
1040
|
+
};
|
|
1041
|
+
return {
|
|
1042
|
+
traceId: e.traceId,
|
|
1043
|
+
spanId: e.spanId,
|
|
1044
|
+
parentSpanId: e.parentSpanId,
|
|
1045
|
+
name: e.name,
|
|
1046
|
+
startTimeUnixNano: e.startTimeUnixNano,
|
|
1047
|
+
endTimeUnixNano: e.endTimeUnixNano,
|
|
1048
|
+
status: t,
|
|
1049
|
+
attributes: e.recordAttributes,
|
|
1050
|
+
events: e.events,
|
|
1051
|
+
droppedAttributesCount: e.droppedAttributesCount,
|
|
1052
|
+
droppedEventsCount: e.droppedEventsCount,
|
|
1053
|
+
links: [],
|
|
1054
|
+
droppedLinksCount: 0
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
function bt(e, t, n, r) {
|
|
1058
|
+
return { resourceSpans: [{
|
|
1059
|
+
resource: {
|
|
1060
|
+
attributes: ze(t),
|
|
1061
|
+
droppedAttributesCount: 0
|
|
1062
|
+
},
|
|
1063
|
+
scopeSpans: [{
|
|
1064
|
+
scope: {
|
|
1065
|
+
name: n,
|
|
1066
|
+
version: r,
|
|
1067
|
+
attributes: [],
|
|
1068
|
+
droppedAttributesCount: 0
|
|
1069
|
+
},
|
|
1070
|
+
spans: e.map(yt)
|
|
1071
|
+
}]
|
|
1072
|
+
}] };
|
|
1073
|
+
}
|
|
1074
|
+
function xt(e) {
|
|
1075
|
+
return S(g(yt(e)));
|
|
1076
|
+
}
|
|
1077
|
+
function St(e, t, n) {
|
|
1078
|
+
return S(JSON.stringify(bt([], e, t, n)));
|
|
1079
|
+
}
|
|
1080
|
+
var Ct = class {
|
|
1081
|
+
inner;
|
|
1082
|
+
constructor(e) {
|
|
1083
|
+
this.deps = e, this.inner = new Fe({
|
|
1084
|
+
getConfig: e.getConfig,
|
|
1085
|
+
scheduler: e.scheduler
|
|
1086
|
+
}, {
|
|
1087
|
+
limits: (e) => ({
|
|
1088
|
+
maxSize: e.maxSpanBufferSize,
|
|
1089
|
+
maxBytes: e.spanFlushMaxBytes,
|
|
1090
|
+
flushIntervalMs: e.spanFlushIntervalMs
|
|
1091
|
+
}),
|
|
1092
|
+
enabled: (e) => e.enableTracing,
|
|
1093
|
+
keepaliveBudget: () => e.api.keepaliveBudgetRemaining(),
|
|
1094
|
+
estimateBytes: (e) => this.estimateBytes(e),
|
|
1095
|
+
emptyEnvelopeBytes: (t) => {
|
|
1096
|
+
let n = e.getSdkInfo();
|
|
1097
|
+
return St(t, n.name, n.version);
|
|
1098
|
+
},
|
|
1099
|
+
recordBytes: (e) => xt(e),
|
|
1100
|
+
oversizedMessage: "Flare: dropping oversized span",
|
|
1101
|
+
keepaliveDropMessage: (e) => `Flare: dropped ${e} span(s) from keepalive envelope (over budget)`,
|
|
1102
|
+
sendFailureMessage: "Flare: failed to send buffered spans",
|
|
1103
|
+
resourceForFlush: () => this.resourceForFlush(),
|
|
1104
|
+
buildEnvelope: (t, n) => {
|
|
1105
|
+
let r = e.getSdkInfo();
|
|
1106
|
+
return bt(t, n, r.name, r.version);
|
|
1107
|
+
},
|
|
1108
|
+
send: (t, n, r) => {
|
|
1109
|
+
e.track(e.api.traces(t, n.tracesIngestUrl, n.key, n.debug, r));
|
|
1110
|
+
}
|
|
1111
|
+
});
|
|
1112
|
+
}
|
|
1113
|
+
length() {
|
|
1114
|
+
return this.inner.length();
|
|
1115
|
+
}
|
|
1116
|
+
add(e) {
|
|
1117
|
+
this.inner.add(e);
|
|
1118
|
+
}
|
|
1119
|
+
flush(e) {
|
|
1120
|
+
this.inner.flush(e);
|
|
1121
|
+
}
|
|
1122
|
+
clear() {
|
|
1123
|
+
this.inner.clear();
|
|
1124
|
+
}
|
|
1125
|
+
resourceForFlush() {
|
|
1126
|
+
return Ie(this.deps.getResourceAttributes(), this.deps.getConfig(), this.deps.getSdkInfo(), this.deps.getFramework());
|
|
1127
|
+
}
|
|
1128
|
+
estimateBytes(e) {
|
|
1129
|
+
return JSON.stringify(e).length;
|
|
1130
|
+
}
|
|
1131
|
+
}, wt = /^[0-9a-f]{32}$/, Tt = /^[0-9a-f]{16}$/, Et = /^[0-9a-f]{2}$/, Dt = "0".repeat(32), Ot = "0".repeat(16);
|
|
1132
|
+
function kt(e, t, n) {
|
|
1133
|
+
return `00-${e}-${t}-${n ? "01" : "00"}`;
|
|
1134
|
+
}
|
|
1135
|
+
function At(e) {
|
|
1136
|
+
let t = e.trim().split("-");
|
|
1137
|
+
if (t.length !== 4) return null;
|
|
1138
|
+
let [n, r, i, a] = t;
|
|
1139
|
+
return n !== "00" || !wt.test(r) || r === Dt || !Tt.test(i) || i === Ot || !Et.test(a) ? null : {
|
|
1140
|
+
traceId: r,
|
|
1141
|
+
parentSpanId: i,
|
|
1142
|
+
sampled: (parseInt(a, 16) & 1) == 1
|
|
1143
|
+
};
|
|
1144
|
+
}
|
|
1145
|
+
function jt(e) {
|
|
1146
|
+
return (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function";
|
|
1147
|
+
}
|
|
1148
|
+
function Mt(e) {
|
|
1149
|
+
return "isRecording" in e;
|
|
1150
|
+
}
|
|
1151
|
+
function Nt(e) {
|
|
1152
|
+
return "epoch" in e && typeof e.epoch == "number";
|
|
1153
|
+
}
|
|
1154
|
+
function w() {
|
|
1155
|
+
let e = globalThis.performance, t = e && typeof e.now == "function" && typeof e.timeOrigin == "number" ? e.timeOrigin + e.now() : Date.now();
|
|
1156
|
+
return Math.round(t * 1e6);
|
|
1157
|
+
}
|
|
1158
|
+
function Pt(e, t, n) {
|
|
1159
|
+
if (e.has(t) || e.size < n) return;
|
|
1160
|
+
let r = e.keys().next().value;
|
|
1161
|
+
r !== void 0 && e.delete(r);
|
|
1162
|
+
}
|
|
1163
|
+
var Ft = 100, It = class {
|
|
1164
|
+
buffer;
|
|
1165
|
+
holder;
|
|
1166
|
+
traceStates = /* @__PURE__ */ new Map();
|
|
1167
|
+
closedTraces = /* @__PURE__ */ new Map();
|
|
1168
|
+
stateGeneration = 0;
|
|
1169
|
+
now;
|
|
1170
|
+
rng;
|
|
1171
|
+
maxLiveTraces;
|
|
1172
|
+
epoch = 0;
|
|
1173
|
+
pendingContinuation = null;
|
|
1174
|
+
spanListeners = /* @__PURE__ */ new Set();
|
|
1175
|
+
constructor(e) {
|
|
1176
|
+
this.deps = e, this.buffer = new Ct({
|
|
1177
|
+
api: e.api,
|
|
1178
|
+
getConfig: e.getConfig,
|
|
1179
|
+
getSdkInfo: e.getSdkInfo,
|
|
1180
|
+
getFramework: e.getFramework,
|
|
1181
|
+
getResourceAttributes: e.getResourceAttributes,
|
|
1182
|
+
track: e.track,
|
|
1183
|
+
scheduler: e.scheduler
|
|
1184
|
+
}), this.holder = e.activeSpanHolder ?? new pt(), this.now = e.now ?? w, this.rng = e.rng ?? Math.random, this.maxLiveTraces = e.maxLiveTraces ?? 1e3;
|
|
1185
|
+
}
|
|
1186
|
+
getActiveSpan() {
|
|
1187
|
+
return this.holder.getActive();
|
|
1188
|
+
}
|
|
1189
|
+
setActiveRoot(e) {
|
|
1190
|
+
this.holder.setActiveRoot?.(e);
|
|
1191
|
+
}
|
|
1192
|
+
claimSpanSlot(e) {
|
|
1193
|
+
let t = this.deps.getConfig();
|
|
1194
|
+
if (!t.enableTracing) return !1;
|
|
1195
|
+
let n = this.traceStates.get(e);
|
|
1196
|
+
return !n || !n.recording || n.startedSpanCount >= t.maxSpansPerTrace ? !1 : (n.startedSpanCount++, !0);
|
|
1197
|
+
}
|
|
1198
|
+
addSpanListener(e) {
|
|
1199
|
+
return this.spanListeners.add(e), () => {
|
|
1200
|
+
this.spanListeners.delete(e);
|
|
1201
|
+
};
|
|
1202
|
+
}
|
|
1203
|
+
emitSpanEvent(e, t) {
|
|
1204
|
+
for (let n of this.spanListeners) try {
|
|
1205
|
+
n({
|
|
1206
|
+
phase: e,
|
|
1207
|
+
span: t
|
|
1208
|
+
});
|
|
1209
|
+
} catch {}
|
|
1210
|
+
}
|
|
1211
|
+
flush(e) {
|
|
1212
|
+
this.buffer.flush(e);
|
|
1213
|
+
}
|
|
1214
|
+
clear() {
|
|
1215
|
+
this.buffer.clear(), this.traceStates.clear(), this.closedTraces.clear(), this.setActiveRoot(void 0), this.pendingContinuation = null, this.epoch++;
|
|
1216
|
+
}
|
|
1217
|
+
continueFromTraceparent(e) {
|
|
1218
|
+
this.pendingContinuation = At(e);
|
|
1219
|
+
}
|
|
1220
|
+
withSpan(e, t, n = {}) {
|
|
1221
|
+
let r = this.startSpan(e, n), i = (e) => {
|
|
1222
|
+
r.setStatus({
|
|
1223
|
+
code: x.Error,
|
|
1224
|
+
message: e instanceof Error ? e.message : String(e)
|
|
1225
|
+
}), r.end();
|
|
1226
|
+
};
|
|
1227
|
+
return this.holder.withActive(r, () => {
|
|
1228
|
+
try {
|
|
1229
|
+
let e = t(r);
|
|
1230
|
+
return jt(e) ? e.then((e) => (r.end(), e), (e) => {
|
|
1231
|
+
throw i(e), e;
|
|
1232
|
+
}) : (r.end(), e);
|
|
1233
|
+
} catch (e) {
|
|
1234
|
+
throw i(e), e;
|
|
1235
|
+
}
|
|
1236
|
+
});
|
|
1237
|
+
}
|
|
1238
|
+
startSpan(e, t = {}) {
|
|
1239
|
+
let n = this.deps.getConfig(), r = t.spanId ?? gt(), i = this.pendingContinuation;
|
|
1240
|
+
if (this.pendingContinuation = null, !n.enableTracing) return this.startInertSpan(e, r, t, n);
|
|
1241
|
+
let { traceId: a, parentSpanId: o, state: s } = this.resolveTrace(r, e, t, n, i), c = s.recording;
|
|
1242
|
+
t.claimed || (s.startedSpanCount >= n.maxSpansPerTrace ? (c = !1, n.debug && !s.loggedCap && (s.loggedCap = !0, console.error("Flare: maxSpansPerTrace reached, dropping span"))) : s.startedSpanCount++), s.openSpanCount++;
|
|
1243
|
+
let l = s.localRootSpanId === r, u = this.makeSpan({
|
|
1244
|
+
traceId: a,
|
|
1245
|
+
spanId: r,
|
|
1246
|
+
parentSpanId: o,
|
|
1247
|
+
name: e,
|
|
1248
|
+
recording: c,
|
|
1249
|
+
isLocalRoot: l,
|
|
1250
|
+
stateGeneration: s.generation
|
|
1251
|
+
}, t, n);
|
|
1252
|
+
return this.emitSpanEvent("start", u), u;
|
|
1253
|
+
}
|
|
1254
|
+
startInertSpan(e, t, n, r) {
|
|
1255
|
+
let i = this.makeSpan({
|
|
1256
|
+
traceId: ht(),
|
|
1257
|
+
spanId: t,
|
|
1258
|
+
parentSpanId: null,
|
|
1259
|
+
name: e,
|
|
1260
|
+
recording: !1,
|
|
1261
|
+
isLocalRoot: !0,
|
|
1262
|
+
stateGeneration: 0
|
|
1263
|
+
}, n, r);
|
|
1264
|
+
return this.emitSpanEvent("start", i), i;
|
|
1265
|
+
}
|
|
1266
|
+
resolveTrace(e, t, n, r, i) {
|
|
1267
|
+
let a = n.forceRoot ? n.parent : n.parent ?? this.holder.getActive();
|
|
1268
|
+
if (a && Nt(a) && a.epoch !== this.epoch && (a = void 0), a && "spanId" in a && "traceId" in a) {
|
|
1269
|
+
let i = a.traceId, o = this.getOrSeedState(i, e, () => Mt(a) ? a.isRecording : _t({
|
|
1270
|
+
name: t,
|
|
1271
|
+
attributes: n.attributes ?? {},
|
|
1272
|
+
spanType: n.spanType
|
|
1273
|
+
}, r, this.rng));
|
|
1274
|
+
return {
|
|
1275
|
+
traceId: i,
|
|
1276
|
+
parentSpanId: a.spanId,
|
|
1277
|
+
state: o
|
|
1278
|
+
};
|
|
1279
|
+
}
|
|
1280
|
+
if (i) {
|
|
1281
|
+
let a = _t({
|
|
1282
|
+
name: t,
|
|
1283
|
+
parentSampled: i.sampled,
|
|
1284
|
+
attributes: n.attributes ?? {},
|
|
1285
|
+
spanType: n.spanType
|
|
1286
|
+
}, r, this.rng), o = this.createState(i.traceId, e, a);
|
|
1287
|
+
return {
|
|
1288
|
+
traceId: i.traceId,
|
|
1289
|
+
parentSpanId: i.parentSpanId,
|
|
1290
|
+
state: o
|
|
1291
|
+
};
|
|
1292
|
+
}
|
|
1293
|
+
let o = ht(), s = _t({
|
|
1294
|
+
name: t,
|
|
1295
|
+
attributes: n.attributes ?? {},
|
|
1296
|
+
spanType: n.spanType
|
|
1297
|
+
}, r, this.rng);
|
|
1298
|
+
return {
|
|
1299
|
+
traceId: o,
|
|
1300
|
+
parentSpanId: null,
|
|
1301
|
+
state: this.createState(o, e, s)
|
|
1302
|
+
};
|
|
1303
|
+
}
|
|
1304
|
+
getOrSeedState(e, t, n) {
|
|
1305
|
+
let r = this.traceStates.get(e);
|
|
1306
|
+
if (r) return this.traceStates.delete(e), this.traceStates.set(e, r), r;
|
|
1307
|
+
let i = this.closedTraces.get(e);
|
|
1308
|
+
if (i) {
|
|
1309
|
+
this.closedTraces.delete(e);
|
|
1310
|
+
let t = this.createState(e, i.localRootSpanId, i.recording);
|
|
1311
|
+
return t.startedSpanCount = i.startedSpanCount, t.rootEnded = !0, t;
|
|
1312
|
+
}
|
|
1313
|
+
return this.createState(e, t, n());
|
|
1314
|
+
}
|
|
1315
|
+
createState(e, t, n) {
|
|
1316
|
+
Pt(this.traceStates, e, this.maxLiveTraces);
|
|
1317
|
+
let r = {
|
|
1318
|
+
traceId: e,
|
|
1319
|
+
recording: n,
|
|
1320
|
+
localRootSpanId: t,
|
|
1321
|
+
rootEnded: !1,
|
|
1322
|
+
startedSpanCount: 0,
|
|
1323
|
+
openSpanCount: 0,
|
|
1324
|
+
generation: ++this.stateGeneration,
|
|
1325
|
+
loggedCap: !1
|
|
1326
|
+
};
|
|
1327
|
+
return this.traceStates.set(e, r), r;
|
|
1328
|
+
}
|
|
1329
|
+
makeSpan(e, t, n) {
|
|
1330
|
+
let r = e.recording && e.isLocalRoot ? this.deps.getScopeAttributes() : {}, i = new vt({
|
|
1331
|
+
...e,
|
|
1332
|
+
startTimeUnixNano: t.startTimeUnixNano ?? this.now(),
|
|
1333
|
+
epoch: this.epoch,
|
|
1334
|
+
scopeAttributes: r
|
|
1335
|
+
}, {
|
|
1336
|
+
maxAttributesPerSpan: n.maxAttributesPerSpan,
|
|
1337
|
+
maxEventsPerSpan: n.maxEventsPerSpan,
|
|
1338
|
+
maxAttributesPerSpanEvent: n.maxAttributesPerSpanEvent,
|
|
1339
|
+
now: this.now,
|
|
1340
|
+
onEnd: (e) => this.onSpanEnd(e)
|
|
1341
|
+
});
|
|
1342
|
+
if (t.spanType && i.setAttribute("flare.span_type", t.spanType), t.attributes) for (let [e, n] of Object.entries(t.attributes)) i.setAttribute(e, n);
|
|
1343
|
+
return i;
|
|
1344
|
+
}
|
|
1345
|
+
rememberClosed(e) {
|
|
1346
|
+
Pt(this.closedTraces, e.traceId, Ft), this.closedTraces.set(e.traceId, {
|
|
1347
|
+
localRootSpanId: e.localRootSpanId,
|
|
1348
|
+
recording: e.recording,
|
|
1349
|
+
startedSpanCount: e.startedSpanCount
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
onSpanEnd(e) {
|
|
1353
|
+
if (this.emitSpanEvent("end", e), e.epoch !== this.epoch) return;
|
|
1354
|
+
let t = this.traceStates.get(e.traceId);
|
|
1355
|
+
if (t && t.generation === e.stateGeneration && (t.openSpanCount--, e.spanId === t.localRootSpanId && (t.rootEnded = !0), t.rootEnded && t.openSpanCount <= 0 && (this.traceStates.delete(e.traceId), this.rememberClosed(t))), e.isRecording && this.deps.getConfig().enableTracing) try {
|
|
1356
|
+
let t = {
|
|
1357
|
+
...e.scopeAttributes,
|
|
1358
|
+
...e.attributes
|
|
1359
|
+
}, n = {
|
|
1360
|
+
traceId: e.traceId,
|
|
1361
|
+
spanId: e.spanId,
|
|
1362
|
+
parentSpanId: e.parentSpanId,
|
|
1363
|
+
name: e.name,
|
|
1364
|
+
startTimeUnixNano: e.startTimeUnixNano,
|
|
1365
|
+
endTimeUnixNano: e.endTimeUnixNano,
|
|
1366
|
+
status: e.status,
|
|
1367
|
+
recordAttributes: ze(t),
|
|
1368
|
+
droppedAttributesCount: e.droppedAttributesCount,
|
|
1369
|
+
droppedEventsCount: e.droppedEventsCount,
|
|
1370
|
+
events: e.events.map((e) => ({
|
|
1371
|
+
name: e.name,
|
|
1372
|
+
timeUnixNano: e.timeUnixNano,
|
|
1373
|
+
attributes: ze(e.attributes),
|
|
1374
|
+
droppedAttributesCount: e.droppedAttributesCount
|
|
1375
|
+
}))
|
|
1376
|
+
};
|
|
1377
|
+
this.buffer.add(n);
|
|
1378
|
+
} catch (e) {
|
|
1379
|
+
this.deps.getConfig().debug && console.error("Flare: failed to buffer span", e);
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
}, Lt = $e.filter((e) => e !== C.id), Rt = "@flareapp/core", zt = class {
|
|
1383
|
+
inflight = /* @__PURE__ */ new Set();
|
|
1384
|
+
_logger;
|
|
1385
|
+
_tracer;
|
|
1386
|
+
_config = {
|
|
1387
|
+
key: null,
|
|
1388
|
+
hasConsent: !0,
|
|
1389
|
+
version: "",
|
|
1390
|
+
sourcemapVersionId: l,
|
|
1391
|
+
stage: "",
|
|
1392
|
+
maxGlowsPerReport: 30,
|
|
1393
|
+
enableBreadcrumbs: !1,
|
|
1394
|
+
maxBreadcrumbs: 100,
|
|
1395
|
+
ingestUrl: "https://ingress.flareapp.io/v1/errors",
|
|
1396
|
+
reportBrowserExtensionErrors: !1,
|
|
1397
|
+
debug: !1,
|
|
1398
|
+
urlDenylist: _,
|
|
1399
|
+
replaceDefaultUrlDenylist: !1,
|
|
1400
|
+
sampleRate: 1,
|
|
1401
|
+
beforeEvaluate: (e) => e,
|
|
1402
|
+
beforeSubmit: (e) => e,
|
|
1403
|
+
enableLogs: !1,
|
|
1404
|
+
logsIngestUrl: "https://ingress.flareapp.io/v1/logs",
|
|
1405
|
+
maxLogBufferSize: 100,
|
|
1406
|
+
logFlushIntervalMs: 5e3,
|
|
1407
|
+
logFlushMaxBytes: 8e5,
|
|
1408
|
+
keepaliveMaxBytes: 6e4,
|
|
1409
|
+
enableTracing: !1,
|
|
1410
|
+
tracesIngestUrl: "https://ingress.flareapp.io/v1/traces",
|
|
1411
|
+
tracesSampleRate: 1,
|
|
1412
|
+
maxSpanBufferSize: 100,
|
|
1413
|
+
spanFlushIntervalMs: 5e3,
|
|
1414
|
+
spanFlushMaxBytes: 8e5,
|
|
1415
|
+
maxSpansPerTrace: 1024,
|
|
1416
|
+
maxAttributesPerSpan: 128,
|
|
1417
|
+
maxEventsPerSpan: 128,
|
|
1418
|
+
maxAttributesPerSpanEvent: 128
|
|
1419
|
+
};
|
|
1420
|
+
sdkInfo = {
|
|
1421
|
+
name: Rt,
|
|
1422
|
+
version: s
|
|
1423
|
+
};
|
|
1424
|
+
framework = null;
|
|
1425
|
+
constructor(e = new Me(), t = () => ({}), n = new ft(), r = new tt(), i = new Ye(), a = new pt()) {
|
|
1426
|
+
this.api = e, this.contextCollector = t, this.fileReader = n, this.scopeProvider = r, this._logger = new Je({
|
|
1427
|
+
api: this.api,
|
|
1428
|
+
getConfig: () => this._config,
|
|
1429
|
+
getSdkInfo: () => this.sdkInfo,
|
|
1430
|
+
getFramework: () => this.framework,
|
|
1431
|
+
buildLogAttributes: (e) => this.buildLogAttributes(e),
|
|
1432
|
+
track: (e) => this.track(e),
|
|
1433
|
+
scheduler: i
|
|
1434
|
+
}), this._tracer = new It({
|
|
1435
|
+
api: this.api,
|
|
1436
|
+
getConfig: () => this._config,
|
|
1437
|
+
getSdkInfo: () => this.sdkInfo,
|
|
1438
|
+
getFramework: () => this.framework,
|
|
1439
|
+
getScopeAttributes: () => this.getScopeAttributes(),
|
|
1440
|
+
getResourceAttributes: () => this.spanResourceAttributes(),
|
|
1441
|
+
track: (e) => this.track(e),
|
|
1442
|
+
scheduler: i,
|
|
1443
|
+
activeSpanHolder: a
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
track(e) {
|
|
1447
|
+
let t = e.then(() => void 0, () => void 0);
|
|
1448
|
+
return this.inflight.add(t), t.finally(() => this.inflight.delete(t)), e;
|
|
1449
|
+
}
|
|
1450
|
+
flush(e = 2e3) {
|
|
1451
|
+
this._logger.flush(), this._tracer.flush();
|
|
1452
|
+
let t = [...this.inflight];
|
|
1453
|
+
return t.length === 0 ? Promise.resolve() : new Promise((n) => {
|
|
1454
|
+
let r = setTimeout(n, e);
|
|
1455
|
+
Promise.allSettled(t).then(() => {
|
|
1456
|
+
clearTimeout(r), n();
|
|
1457
|
+
});
|
|
1458
|
+
});
|
|
1459
|
+
}
|
|
1460
|
+
get config() {
|
|
1461
|
+
return this._config;
|
|
1462
|
+
}
|
|
1463
|
+
get glows() {
|
|
1464
|
+
return this.scopeProvider.active().glows;
|
|
1465
|
+
}
|
|
1466
|
+
get logger() {
|
|
1467
|
+
return this._logger;
|
|
1468
|
+
}
|
|
1469
|
+
get tracer() {
|
|
1470
|
+
return this._tracer;
|
|
1471
|
+
}
|
|
1472
|
+
startSpan(e, t) {
|
|
1473
|
+
return this._tracer.startSpan(e, t);
|
|
1474
|
+
}
|
|
1475
|
+
withSpan(e, t, n) {
|
|
1476
|
+
return this._tracer.withSpan(e, t, n);
|
|
1477
|
+
}
|
|
1478
|
+
light(e = c, t) {
|
|
1479
|
+
return this._config.key = e, t !== void 0 && (this._config.debug = t), this._logger.flush(), this._tracer.flush(), this;
|
|
1480
|
+
}
|
|
1481
|
+
setConsent(e) {
|
|
1482
|
+
return this._config.hasConsent = e, e ? (this._logger.flush(), this._tracer.flush()) : (this._logger.clear(), this._tracer.clear()), this;
|
|
1483
|
+
}
|
|
1484
|
+
configure(e) {
|
|
1485
|
+
let t = this._config.enableLogs, n = this._config.enableTracing, r = this._config.enableBreadcrumbs;
|
|
1486
|
+
return this._config = {
|
|
1487
|
+
...this._config,
|
|
1488
|
+
...e
|
|
1489
|
+
}, e.sampleRate !== void 0 && (this._config.sampleRate = Math.max(0, Math.min(1, e.sampleRate))), e.tracesSampleRate !== void 0 && (this._config.tracesSampleRate = Math.max(0, Math.min(1, e.tracesSampleRate))), (e.urlDenylist !== void 0 || e.replaceDefaultUrlDenylist !== void 0) && (this._config.urlDenylist = pe(e.urlDenylist, e.replaceDefaultUrlDenylist ?? this._config.replaceDefaultUrlDenylist)), t && this._config.enableLogs === !1 && this._logger.clear(), e.key !== void 0 && this._logger.flush(), r && this._config.enableBreadcrumbs === !1 && this.scopeProvider.active().clearBreadcrumbs(), n && this._config.enableTracing === !1 && this._tracer.clear(), e.key !== void 0 && this._tracer.flush(), this;
|
|
1490
|
+
}
|
|
1491
|
+
test() {
|
|
1492
|
+
return this.track(this.testInternal());
|
|
1493
|
+
}
|
|
1494
|
+
async testInternal() {
|
|
1495
|
+
let e = await this.createReportFromError(/* @__PURE__ */ Error("The Flare client is set up correctly!"));
|
|
1496
|
+
if (e) return this.sendReport(e);
|
|
1497
|
+
}
|
|
1498
|
+
glow(e, t = "info", n = []) {
|
|
1499
|
+
let r = fe();
|
|
1500
|
+
return this.scopeProvider.active().addGlow({
|
|
1501
|
+
name: e,
|
|
1502
|
+
messageLevel: t,
|
|
1503
|
+
metaData: n,
|
|
1504
|
+
time: r,
|
|
1505
|
+
microtime: r
|
|
1506
|
+
}, this._config.maxGlowsPerReport), this;
|
|
1507
|
+
}
|
|
1508
|
+
addBreadcrumb(e, t, n) {
|
|
1509
|
+
Pe(this.scopeProvider, this._config, e, t, n);
|
|
1510
|
+
}
|
|
1511
|
+
clearGlows() {
|
|
1512
|
+
return this.scopeProvider.active().clearGlows(), this;
|
|
1513
|
+
}
|
|
1514
|
+
addContext(e, t) {
|
|
1515
|
+
let n = this.scopeProvider.active(), r = n.pendingAttributes["context.custom"] ?? {};
|
|
1516
|
+
return n.setAttribute("context.custom", {
|
|
1517
|
+
...r,
|
|
1518
|
+
[e]: t
|
|
1519
|
+
}), this;
|
|
1520
|
+
}
|
|
1521
|
+
addContextGroup(e, t) {
|
|
1522
|
+
return this.scopeProvider.active().setAttribute(`context.${e}`, t), this;
|
|
1523
|
+
}
|
|
1524
|
+
setUser(e) {
|
|
1525
|
+
let t = this.scopeProvider.active();
|
|
1526
|
+
for (let e of $e) delete t.pendingAttributes[e];
|
|
1527
|
+
if (!e) return this;
|
|
1528
|
+
let { id: n, email: r, fullName: i, ipAddress: a, ...o } = e;
|
|
1529
|
+
n != null && t.setAttribute(C.id, String(n)), r !== void 0 && t.setAttribute(C.email, r), i !== void 0 && t.setAttribute(C.fullName, i), a !== void 0 && t.setAttribute(C.ipAddress, a);
|
|
1530
|
+
let s = Object.fromEntries(Object.entries(o).filter(([, e]) => e !== void 0));
|
|
1531
|
+
return Object.keys(s).length > 0 && t.setAttribute("user.attributes", s), this;
|
|
1532
|
+
}
|
|
1533
|
+
setEntryPoint(e) {
|
|
1534
|
+
return this.scopeProvider.active().entryPoint = e, this;
|
|
1535
|
+
}
|
|
1536
|
+
setSdkInfo(e) {
|
|
1537
|
+
return this.sdkInfo = e, this;
|
|
1538
|
+
}
|
|
1539
|
+
setFramework(e) {
|
|
1540
|
+
return this.framework = e, this;
|
|
1541
|
+
}
|
|
1542
|
+
shouldSkipCapture() {
|
|
1543
|
+
return this._config.hasConsent === !1 || this._config.sampleRate < 1 && Math.random() >= this._config.sampleRate;
|
|
1544
|
+
}
|
|
1545
|
+
report(e, t = {}) {
|
|
1546
|
+
return this.track(this.reportInternal(e, t));
|
|
1547
|
+
}
|
|
1548
|
+
async reportInternal(e, t = {}) {
|
|
1549
|
+
if (this.shouldSkipCapture()) return;
|
|
1550
|
+
let n = Date.now() * 1e6, r = e instanceof Error ? e : Error(String(e)), i = await this._config.beforeEvaluate(r);
|
|
1551
|
+
if (!i) return;
|
|
1552
|
+
let a = await this.createReportFromError(i, t, n);
|
|
1553
|
+
if (a) return this.sendReport(a);
|
|
1554
|
+
}
|
|
1555
|
+
reportSilently(e, t = {}) {
|
|
1556
|
+
this.track(this.reportInternal(e, t).catch(() => {}));
|
|
1557
|
+
}
|
|
1558
|
+
reportUnhandledRejection(e, t = {}) {
|
|
1559
|
+
return this.track(this.reportUnhandledRejectionInternal(e, t));
|
|
1560
|
+
}
|
|
1561
|
+
async reportUnhandledRejectionInternal(e, t = {}) {
|
|
1562
|
+
if (this.shouldSkipCapture()) return;
|
|
1563
|
+
let n = Date.now() * 1e6, r = this.buildReport({
|
|
1564
|
+
exceptionClass: "UnhandledRejection",
|
|
1565
|
+
message: e,
|
|
1566
|
+
stacktrace: [],
|
|
1567
|
+
isLog: !1,
|
|
1568
|
+
level: void 0,
|
|
1569
|
+
extraAttributes: t,
|
|
1570
|
+
code: void 0,
|
|
1571
|
+
seenAtUnixNano: n
|
|
1572
|
+
});
|
|
1573
|
+
return this.sendReport(r);
|
|
1574
|
+
}
|
|
1575
|
+
reportMessage(e, t, n = {}) {
|
|
1576
|
+
return this.track(this.reportMessageInternal(e, t, n));
|
|
1577
|
+
}
|
|
1578
|
+
async reportMessageInternal(e, t, n = {}) {
|
|
1579
|
+
if (this.shouldSkipCapture()) return;
|
|
1580
|
+
let r = Date.now() * 1e6, i = await ot(/* @__PURE__ */ Error(), this._config.debug, this.fileReader);
|
|
1581
|
+
i.shift();
|
|
1582
|
+
let a = this.buildReport({
|
|
1583
|
+
exceptionClass: "Log",
|
|
1584
|
+
message: e,
|
|
1585
|
+
stacktrace: i,
|
|
1586
|
+
isLog: !0,
|
|
1587
|
+
level: t,
|
|
1588
|
+
extraAttributes: n,
|
|
1589
|
+
code: void 0,
|
|
1590
|
+
seenAtUnixNano: r
|
|
1591
|
+
});
|
|
1592
|
+
return this.sendReport(a);
|
|
1593
|
+
}
|
|
1594
|
+
async createReportFromError(e, t = {}, n = Date.now() * 1e6) {
|
|
1595
|
+
if (!u(e, "No error provided.", this._config.debug)) return !1;
|
|
1596
|
+
let r = await ot(e, this._config.debug, this.fileReader);
|
|
1597
|
+
u(r.length, "Couldn't generate stacktrace of this error: " + e, this._config.debug);
|
|
1598
|
+
let i = e.constructor && e.constructor.name ? e.constructor.name : "undefined";
|
|
1599
|
+
return this.buildReport({
|
|
1600
|
+
exceptionClass: i,
|
|
1601
|
+
message: e.message,
|
|
1602
|
+
stacktrace: r,
|
|
1603
|
+
isLog: !1,
|
|
1604
|
+
level: void 0,
|
|
1605
|
+
extraAttributes: t,
|
|
1606
|
+
code: ie(e),
|
|
1607
|
+
seenAtUnixNano: n
|
|
1608
|
+
});
|
|
1609
|
+
}
|
|
1610
|
+
buildBaseAttributes() {
|
|
1611
|
+
let e = {
|
|
1612
|
+
"telemetry.sdk.language": "javascript",
|
|
1613
|
+
"telemetry.sdk.name": this.sdkInfo.name,
|
|
1614
|
+
"telemetry.sdk.version": this.sdkInfo.version,
|
|
1615
|
+
"flare.language.name": "javascript"
|
|
1616
|
+
};
|
|
1617
|
+
return this._config.stage && (e["service.stage"] = this._config.stage), this._config.version && (e["service.version"] = this._config.version), this.framework?.name && (e["flare.framework.name"] = this.framework.name), this.framework?.version && (e["flare.framework.version"] = this.framework.version), e;
|
|
1618
|
+
}
|
|
1619
|
+
assembleAttributes(e, t, n) {
|
|
1620
|
+
let r = this.scopeProvider.active(), i = n ? this.buildBaseAttributes() : {}, a = r.entryPoint, o = {};
|
|
1621
|
+
a?.identifier !== void 0 && (o["flare.entry_point.handler.identifier"] = a.identifier, o["http.route"] = a.identifier), a?.type !== void 0 && (o["flare.entry_point.handler.type"] = a.type), a?.name !== void 0 && (o["flare.entry_point.handler.name"] = a.name);
|
|
1622
|
+
let s = {
|
|
1623
|
+
...i,
|
|
1624
|
+
...e,
|
|
1625
|
+
...o,
|
|
1626
|
+
...r.pendingAttributes,
|
|
1627
|
+
...t
|
|
1628
|
+
}, c = r.pendingAttributes["context.custom"], l = t["context.custom"];
|
|
1629
|
+
return c && l && typeof c == "object" && typeof l == "object" && !Array.isArray(c) && !Array.isArray(l) && (s["context.custom"] = {
|
|
1630
|
+
...c,
|
|
1631
|
+
...l
|
|
1632
|
+
}), this.framework?.name && (s["context.custom"] = {
|
|
1633
|
+
...s["context.custom"] ?? {},
|
|
1634
|
+
framework: this.framework.name.toLowerCase()
|
|
1635
|
+
}), s;
|
|
1636
|
+
}
|
|
1637
|
+
buildLogAttributes(e) {
|
|
1638
|
+
let { resource: t, record: n } = Qe(this.contextCollector(this._config));
|
|
1639
|
+
return {
|
|
1640
|
+
resource: t,
|
|
1641
|
+
record: this.assembleAttributes(n, e, !1)
|
|
1642
|
+
};
|
|
1643
|
+
}
|
|
1644
|
+
getScopeAttributes() {
|
|
1645
|
+
let e = { ...this.assembleAttributes({}, {}, !1) };
|
|
1646
|
+
for (let t of Lt) delete e[t];
|
|
1647
|
+
return e;
|
|
1648
|
+
}
|
|
1649
|
+
spanResourceAttributes() {
|
|
1650
|
+
return Qe(this.contextCollector(this._config)).resource;
|
|
1651
|
+
}
|
|
1652
|
+
buildReport(e) {
|
|
1653
|
+
let t = this.scopeProvider.active(), n = this.assembleAttributes(this.contextCollector(this._config), e.extraAttributes, !0), r = {
|
|
1654
|
+
exceptionClass: e.exceptionClass,
|
|
1655
|
+
message: e.message,
|
|
1656
|
+
seenAtUnixNano: e.seenAtUnixNano,
|
|
1657
|
+
stacktrace: e.stacktrace,
|
|
1658
|
+
events: de(t.glows, t.breadcrumbs),
|
|
1659
|
+
attributes: n
|
|
1660
|
+
};
|
|
1661
|
+
return e.isLog && (r.isLog = !0), e.level !== void 0 && (r.level = e.level), this._config.sourcemapVersionId && (r.sourcemapVersionId = this._config.sourcemapVersionId), e.code !== void 0 && (r.code = e.code), r;
|
|
1662
|
+
}
|
|
1663
|
+
async sendReport(e) {
|
|
1664
|
+
if (this._config.hasConsent === !1 || !d(this._config.key, this._config.debug)) return;
|
|
1665
|
+
let t = await this._config.beforeSubmit(e);
|
|
1666
|
+
if (t) return this.api.report(t, this._config.ingestUrl, this._config.key, this._config.reportBrowserExtensionErrors, this._config.debug);
|
|
1667
|
+
}
|
|
1668
|
+
};
|
|
1669
|
+
function Bt(e) {
|
|
1670
|
+
let t = {};
|
|
1671
|
+
y(t, "os.name", e.os?.name), y(t, "os.version", e.os?.version), y(t, "process.runtime.name", e.runtime?.name), y(t, "process.runtime.version", e.runtime?.version), y(t, "device.type", e.device?.type), y(t, "device.model.name", e.device?.model), y(t, "device.memory_gb", e.device?.memoryGb), y(t, "device.cpu_cores", e.device?.cpuCores), y(t, "device.screen.width", e.device?.screen?.width), y(t, "device.screen.height", e.device?.screen?.height), y(t, "device.screen.scale", e.device?.screen?.scale), y(t, "network.effective_type", e.network?.effectiveType), y(t, "network.downlink_mbps", e.network?.downlinkMbps), y(t, "network.rtt_ms", e.network?.rttMs), y(t, "network.online", e.network?.online), y(t, "app.version", e.app?.version), y(t, "app.id", e.app?.id);
|
|
1672
|
+
let n = Vt(e);
|
|
1673
|
+
return Object.keys(n).length > 0 && (t["context.device"] = n), t;
|
|
1674
|
+
}
|
|
1675
|
+
function Vt(e) {
|
|
1676
|
+
if (!Ht(e.device) && !Ut(e.network)) return {};
|
|
1677
|
+
let t = {}, n = [e.os?.name, e.os?.version].filter((e) => e != null).join(" ");
|
|
1678
|
+
n && (t.OS = n), y(t, "Model", e.device?.model), y(t, "Type", e.device?.type);
|
|
1679
|
+
let r = e.device?.screen;
|
|
1680
|
+
return r?.width != null && r?.height != null && (t.Screen = r.scale == null ? `${r.width} × ${r.height}` : `${r.width} × ${r.height} @ ${r.scale}x`), e.device?.memoryGb != null && (t.Memory = `${e.device.memoryGb} GB`), y(t, "CPU cores", e.device?.cpuCores), y(t, "Connection", e.network?.effectiveType), e.network?.downlinkMbps != null && (t.Downlink = `${e.network.downlinkMbps} Mbps`), e.network?.rttMs != null && (t.RTT = `${e.network.rttMs} ms`), y(t, "Online", e.network?.online), y(t, "App version", e.app?.version), y(t, "App ID", e.app?.id), y(t, "Language", e.locale?.language), y(t, "Timezone", e.locale?.timezone), t;
|
|
1681
|
+
}
|
|
1682
|
+
function Ht(e) {
|
|
1683
|
+
return e != null && (e.type != null || e.model != null || e.memoryGb != null || e.cpuCores != null || e.screen?.width != null || e.screen?.height != null);
|
|
1684
|
+
}
|
|
1685
|
+
function Ut(e) {
|
|
1686
|
+
return e != null && (e.effectiveType != null || e.downlinkMbps != null || e.rttMs != null || e.online != null);
|
|
1687
|
+
}
|
|
1688
|
+
//#endregion
|
|
1689
|
+
//#region node_modules/@flareapp/js/dist/catchWindowErrors-I_8ksYoj.mjs
|
|
1690
|
+
function Wt(e, t) {
|
|
1691
|
+
return document.addEventListener(e, t, !0), () => document.removeEventListener(e, t, !0);
|
|
1692
|
+
}
|
|
1693
|
+
var Gt = "button, a, input, select, textarea, label, [role], [tabindex], [onclick]", Kt = 5;
|
|
1694
|
+
function qt(e) {
|
|
1695
|
+
let t = e;
|
|
1696
|
+
for (let e = 0; t && e < Kt; e++) {
|
|
1697
|
+
if (t.matches?.(Gt)) return t;
|
|
1698
|
+
t = t.parentElement;
|
|
1699
|
+
}
|
|
1700
|
+
return e;
|
|
1701
|
+
}
|
|
1702
|
+
function Jt(e) {
|
|
1703
|
+
let t = e.tagName.toLowerCase();
|
|
1704
|
+
e.id && (t += `#${e.id}`);
|
|
1705
|
+
for (let n of e.classList) t += `.${n}`;
|
|
1706
|
+
return t;
|
|
1707
|
+
}
|
|
1708
|
+
function Yt(e) {
|
|
1709
|
+
return e.getAttribute?.("data-testid") ?? void 0;
|
|
1710
|
+
}
|
|
1711
|
+
function Xt(e) {
|
|
1712
|
+
let t = { "browser.element.selector": Jt(e) }, n = Yt(e);
|
|
1713
|
+
return n && (t["browser.element.test_id"] = n), t;
|
|
1714
|
+
}
|
|
1715
|
+
var Zt = class {
|
|
1716
|
+
type = Oe.Click;
|
|
1717
|
+
constructor(e) {
|
|
1718
|
+
this.host = e, this.onClick = this.onClick.bind(this);
|
|
1719
|
+
}
|
|
1720
|
+
install() {
|
|
1721
|
+
return Wt("click", this.onClick);
|
|
1722
|
+
}
|
|
1723
|
+
onClick(e) {
|
|
1724
|
+
let t = e.target;
|
|
1725
|
+
t instanceof Element && this.host.record(this.type, Xt(qt(t)), w());
|
|
1726
|
+
}
|
|
1727
|
+
}, Qt = class {
|
|
1728
|
+
type = Oe.Input;
|
|
1729
|
+
constructor(e) {
|
|
1730
|
+
this.host = e, this.onChange = this.onChange.bind(this);
|
|
1731
|
+
}
|
|
1732
|
+
install() {
|
|
1733
|
+
return Wt("change", this.onChange);
|
|
1734
|
+
}
|
|
1735
|
+
onChange(e) {
|
|
1736
|
+
let t = e.target;
|
|
1737
|
+
t instanceof Element && this.host.record(this.type, Xt(t), w());
|
|
1738
|
+
}
|
|
1739
|
+
};
|
|
1740
|
+
function $t(e) {
|
|
1741
|
+
if (!(e == null || typeof window > "u")) try {
|
|
1742
|
+
return new URL(e, window.location.href);
|
|
1743
|
+
} catch {
|
|
1744
|
+
return;
|
|
1745
|
+
}
|
|
1746
|
+
}
|
|
1747
|
+
function en(e) {
|
|
1748
|
+
return $t(e)?.href;
|
|
1749
|
+
}
|
|
1750
|
+
function tn() {
|
|
1751
|
+
return typeof location < "u" ? location.pathname : "";
|
|
1752
|
+
}
|
|
1753
|
+
function nn() {
|
|
1754
|
+
return typeof location < "u" ? location.href : "";
|
|
1755
|
+
}
|
|
1756
|
+
function rn(e, t, n) {
|
|
1757
|
+
try {
|
|
1758
|
+
let t = e();
|
|
1759
|
+
if (t) return {
|
|
1760
|
+
name: t,
|
|
1761
|
+
source: "route",
|
|
1762
|
+
url: n
|
|
1763
|
+
};
|
|
1764
|
+
} catch {}
|
|
1765
|
+
return {
|
|
1766
|
+
name: t,
|
|
1767
|
+
source: "url",
|
|
1768
|
+
url: n
|
|
1769
|
+
};
|
|
1770
|
+
}
|
|
1771
|
+
function an(e, t) {
|
|
1772
|
+
let n = t;
|
|
1773
|
+
try {
|
|
1774
|
+
n = e() ?? t;
|
|
1775
|
+
} catch {}
|
|
1776
|
+
return en(n);
|
|
1777
|
+
}
|
|
1778
|
+
function on(e, t, n) {
|
|
1779
|
+
let r = e[t];
|
|
1780
|
+
if (typeof r != "function" || r.__flare_original__) return;
|
|
1781
|
+
let i = n(r);
|
|
1782
|
+
Object.defineProperty(i, "__flare_original__", {
|
|
1783
|
+
value: r,
|
|
1784
|
+
enumerable: !1,
|
|
1785
|
+
configurable: !0,
|
|
1786
|
+
writable: !0
|
|
1787
|
+
}), e[t] = i;
|
|
1788
|
+
}
|
|
1789
|
+
function sn(e, t) {
|
|
1790
|
+
let n = e[t];
|
|
1791
|
+
n && n.__flare_original__ && (e[t] = n.__flare_original__);
|
|
1792
|
+
}
|
|
1793
|
+
var T = /* @__PURE__ */ new Set(), E = null, D = null, O = "", k = null;
|
|
1794
|
+
function A(e) {
|
|
1795
|
+
for (let t of T) try {
|
|
1796
|
+
e(t);
|
|
1797
|
+
} catch {}
|
|
1798
|
+
}
|
|
1799
|
+
function cn() {
|
|
1800
|
+
if (!k) return;
|
|
1801
|
+
let e = tn();
|
|
1802
|
+
e !== O && (O = e, !E && A((t) => t.onUrlChanged?.(e)));
|
|
1803
|
+
}
|
|
1804
|
+
function ln() {
|
|
1805
|
+
if (k || typeof window > "u" || typeof history > "u" || typeof location > "u") return;
|
|
1806
|
+
O = tn();
|
|
1807
|
+
function e(e) {
|
|
1808
|
+
return function(...t) {
|
|
1809
|
+
let n = e.apply(this, t);
|
|
1810
|
+
return cn(), n;
|
|
1811
|
+
};
|
|
1812
|
+
}
|
|
1813
|
+
on(history, "pushState", e), on(history, "replaceState", e), window.addEventListener("popstate", cn), k = () => {
|
|
1814
|
+
sn(history, "pushState"), sn(history, "replaceState"), window.removeEventListener("popstate", cn);
|
|
1815
|
+
};
|
|
1816
|
+
}
|
|
1817
|
+
function un(e) {
|
|
1818
|
+
if (T.size === 0 && ln(), T.add(e), D) try {
|
|
1819
|
+
e.onRouteName?.(D.route, D.owner);
|
|
1820
|
+
} catch {}
|
|
1821
|
+
let t = !1;
|
|
1822
|
+
return () => {
|
|
1823
|
+
t || (t = !0, T.delete(e), T.size === 0 && (k?.(), k = null, O = ""));
|
|
1824
|
+
};
|
|
1825
|
+
}
|
|
1826
|
+
function dn() {
|
|
1827
|
+
let e = {};
|
|
1828
|
+
E && console.debug("Flare: navigation source replaced"), E = e;
|
|
1829
|
+
let t = () => E === e;
|
|
1830
|
+
return {
|
|
1831
|
+
startNavigation(e) {
|
|
1832
|
+
if (!t()) return;
|
|
1833
|
+
let n = e?.path ?? tn();
|
|
1834
|
+
O = n, A((t) => t.onNavigationStart?.({
|
|
1835
|
+
path: n,
|
|
1836
|
+
url: e?.url,
|
|
1837
|
+
hold: e?.hold
|
|
1838
|
+
}));
|
|
1839
|
+
},
|
|
1840
|
+
setActiveRouteName(n) {
|
|
1841
|
+
t() && (D = {
|
|
1842
|
+
route: n,
|
|
1843
|
+
owner: e
|
|
1844
|
+
}, A((t) => t.onRouteName?.(n, e)));
|
|
1845
|
+
},
|
|
1846
|
+
settleNavigation(n) {
|
|
1847
|
+
t() && (D = {
|
|
1848
|
+
route: n,
|
|
1849
|
+
owner: e
|
|
1850
|
+
}, A((t) => t.onNavigationSettle?.(n, e)));
|
|
1851
|
+
},
|
|
1852
|
+
unregister() {
|
|
1853
|
+
t() && (A((e) => e.onSourceUnregistered?.()), E = null, D = null, O = tn());
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
}
|
|
1857
|
+
function fn(e) {
|
|
1858
|
+
return e !== null && E === e;
|
|
1859
|
+
}
|
|
1860
|
+
var pn = class {
|
|
1861
|
+
type = Oe.RouteChange;
|
|
1862
|
+
previousHref = "";
|
|
1863
|
+
constructor(e) {
|
|
1864
|
+
this.host = e, this.onUrlChanged = this.onUrlChanged.bind(this), this.onNavigationSettle = this.onNavigationSettle.bind(this);
|
|
1865
|
+
}
|
|
1866
|
+
install() {
|
|
1867
|
+
return this.record(nn()), un({
|
|
1868
|
+
onUrlChanged: this.onUrlChanged,
|
|
1869
|
+
onNavigationSettle: this.onNavigationSettle
|
|
1870
|
+
});
|
|
1871
|
+
}
|
|
1872
|
+
onUrlChanged() {
|
|
1873
|
+
this.record(nn());
|
|
1874
|
+
}
|
|
1875
|
+
onNavigationSettle(e) {
|
|
1876
|
+
this.record(e.url ?? nn(), e);
|
|
1877
|
+
}
|
|
1878
|
+
record(e, t) {
|
|
1879
|
+
let n = { "browser.route.to": this.clean(e) };
|
|
1880
|
+
this.previousHref && (n["browser.route.from"] = this.clean(this.previousHref)), t?.source === "route" && (n["flare.entry_point.handler.identifier"] = t.name, n["flare.route.source"] = t.source), this.previousHref = e, this.host.record(this.type, n, w());
|
|
1881
|
+
}
|
|
1882
|
+
clean(e) {
|
|
1883
|
+
return Ne(e, this.host.config().urlDenylist);
|
|
1884
|
+
}
|
|
1885
|
+
}, mn = /* @__PURE__ */ new Set(), j = null;
|
|
1886
|
+
function hn(e) {
|
|
1887
|
+
return mn.add(e), () => {
|
|
1888
|
+
mn.delete(e);
|
|
1889
|
+
};
|
|
1890
|
+
}
|
|
1891
|
+
function gn(e) {
|
|
1892
|
+
return j !== null && console.warn("%c FLARE %c\n\nWhat: two things tried to add headers to outgoing requests. Only one can.\n\nWhy it matters: the first one stopped. Requests can now go out without a traceparent header, so Flare cannot link a browser request to its server trace.\n\nHow to fix: use one Flare instance, and check your bundle for two copies of @flareapp/js.", "background:#e11d48;color:#fff;font-weight:bold;font-size:14px;padding:2px 6px", "color:#e11d48;font-size:13px"), j = e, () => {
|
|
1893
|
+
j === e && (j = null);
|
|
1894
|
+
};
|
|
1895
|
+
}
|
|
1896
|
+
function _n() {
|
|
1897
|
+
return mn.size > 0 || j !== null;
|
|
1898
|
+
}
|
|
1899
|
+
function vn(e) {
|
|
1900
|
+
let t = [];
|
|
1901
|
+
for (let n of mn) try {
|
|
1902
|
+
let r = n(e);
|
|
1903
|
+
r && t.push(r);
|
|
1904
|
+
} catch {}
|
|
1905
|
+
let n = e.init, r;
|
|
1906
|
+
if (j) try {
|
|
1907
|
+
let i = j(e);
|
|
1908
|
+
i && (t.push(i), i.init !== void 0 && (n = i.init), r = i.headers);
|
|
1909
|
+
} catch {}
|
|
1910
|
+
return t.length === 0 && n === e.init && r === void 0 ? null : {
|
|
1911
|
+
init: n,
|
|
1912
|
+
headers: r,
|
|
1913
|
+
settle(e) {
|
|
1914
|
+
for (let n of t) try {
|
|
1915
|
+
n.onSettle?.(e);
|
|
1916
|
+
} catch {}
|
|
1917
|
+
}
|
|
1918
|
+
};
|
|
1919
|
+
}
|
|
1920
|
+
var yn = "__flare_internal_request__";
|
|
1921
|
+
function bn(e) {
|
|
1922
|
+
return {
|
|
1923
|
+
...e,
|
|
1924
|
+
[yn]: !0
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1927
|
+
function xn(e) {
|
|
1928
|
+
return e?.[yn] === !0;
|
|
1929
|
+
}
|
|
1930
|
+
function Sn(e) {
|
|
1931
|
+
return typeof e == "function" && /native code/.test(Function.prototype.toString.call(e));
|
|
1932
|
+
}
|
|
1933
|
+
function Cn() {
|
|
1934
|
+
let e = globalThis;
|
|
1935
|
+
if (typeof e.fetch != "function") return !1;
|
|
1936
|
+
if (Sn(e.fetch)) return !0;
|
|
1937
|
+
let t = !1, n = e.document;
|
|
1938
|
+
if (n && typeof n.createElement == "function") {
|
|
1939
|
+
let e = null;
|
|
1940
|
+
try {
|
|
1941
|
+
e = n.createElement("iframe"), e.hidden = !0, n.head.appendChild(e);
|
|
1942
|
+
let r = e.contentWindow;
|
|
1943
|
+
r && typeof r.fetch == "function" && (t = Sn(r.fetch));
|
|
1944
|
+
} catch {
|
|
1945
|
+
t = !1;
|
|
1946
|
+
} finally {
|
|
1947
|
+
try {
|
|
1948
|
+
e?.remove();
|
|
1949
|
+
} catch {}
|
|
1950
|
+
}
|
|
1951
|
+
}
|
|
1952
|
+
return t;
|
|
1953
|
+
}
|
|
1954
|
+
function wn() {
|
|
1955
|
+
let e = !1, t = [];
|
|
1956
|
+
return {
|
|
1957
|
+
get installed() {
|
|
1958
|
+
return e;
|
|
1959
|
+
},
|
|
1960
|
+
install(n, r) {
|
|
1961
|
+
if (e) return;
|
|
1962
|
+
function i(e) {
|
|
1963
|
+
let t = r[e];
|
|
1964
|
+
t && on(n, e, t);
|
|
1965
|
+
}
|
|
1966
|
+
t = Object.keys(r);
|
|
1967
|
+
for (let e of t) i(e);
|
|
1968
|
+
e = !0;
|
|
1969
|
+
},
|
|
1970
|
+
uninstall(n) {
|
|
1971
|
+
if (e && t.every((e) => {
|
|
1972
|
+
let t = n[e];
|
|
1973
|
+
return typeof t != "function" || !!t.__flare_original__;
|
|
1974
|
+
})) {
|
|
1975
|
+
for (let e of t) sn(n, e);
|
|
1976
|
+
e = !1;
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
};
|
|
1980
|
+
}
|
|
1981
|
+
function Tn(e, t) {
|
|
1982
|
+
let n, r = t?.method;
|
|
1983
|
+
return typeof Request < "u" && e instanceof Request ? (n = e.url, r ??= e.method) : n = typeof e == "string" ? e : String(e), {
|
|
1984
|
+
method: (r ?? "GET").toUpperCase(),
|
|
1985
|
+
url: n
|
|
1986
|
+
};
|
|
1987
|
+
}
|
|
1988
|
+
function En(e) {
|
|
1989
|
+
return function(t, n) {
|
|
1990
|
+
let r = (n) => e.call(this, t, n), i = null;
|
|
1991
|
+
try {
|
|
1992
|
+
if (_n() && !xn(n)) {
|
|
1993
|
+
let e = Tn(t, n);
|
|
1994
|
+
i = vn({
|
|
1995
|
+
kind: "fetch",
|
|
1996
|
+
method: e.method,
|
|
1997
|
+
url: e.url,
|
|
1998
|
+
input: t,
|
|
1999
|
+
init: n
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
} catch {
|
|
2003
|
+
i = null;
|
|
2004
|
+
}
|
|
2005
|
+
if (!i) return r(n);
|
|
2006
|
+
let a = i.settle, o = (e) => (a({ error: e }), Promise.reject(e)), s;
|
|
2007
|
+
try {
|
|
2008
|
+
s = r(i.init);
|
|
2009
|
+
} catch (e) {
|
|
2010
|
+
return o(e);
|
|
2011
|
+
}
|
|
2012
|
+
return s.then((e) => (a({ status: e.status }), e), o);
|
|
2013
|
+
};
|
|
2014
|
+
}
|
|
2015
|
+
var Dn = wn();
|
|
2016
|
+
function On() {
|
|
2017
|
+
if (Dn.installed) return;
|
|
2018
|
+
let e = globalThis;
|
|
2019
|
+
typeof e.fetch == "function" && Cn() && Dn.install(e, { fetch: (e) => En(e) });
|
|
2020
|
+
}
|
|
2021
|
+
function kn() {
|
|
2022
|
+
Dn.uninstall(globalThis);
|
|
2023
|
+
}
|
|
2024
|
+
var An = 4, M = /* @__PURE__ */ new WeakMap();
|
|
2025
|
+
function jn(e) {
|
|
2026
|
+
e.watched = void 0, e.onDone = void 0;
|
|
2027
|
+
}
|
|
2028
|
+
function Mn(e, t) {
|
|
2029
|
+
e.ended = !0, e.watched?.settle(t), jn(e);
|
|
2030
|
+
}
|
|
2031
|
+
function Nn(e) {
|
|
2032
|
+
return function(t, n, ...r) {
|
|
2033
|
+
let i = M.get(this);
|
|
2034
|
+
i && i.watched && !i.ended && (i.onDone && this.removeEventListener("readystatechange", i.onDone), Mn(i, { aborted: !0 }));
|
|
2035
|
+
try {
|
|
2036
|
+
t && n != null ? M.set(this, {
|
|
2037
|
+
method: String(t).toUpperCase(),
|
|
2038
|
+
url: String(n),
|
|
2039
|
+
appHeaders: /* @__PURE__ */ new Set(),
|
|
2040
|
+
ended: !1
|
|
2041
|
+
}) : M.delete(this);
|
|
2042
|
+
} catch {
|
|
2043
|
+
M.delete(this);
|
|
2044
|
+
}
|
|
2045
|
+
return e.apply(this, [
|
|
2046
|
+
t,
|
|
2047
|
+
n,
|
|
2048
|
+
...r
|
|
2049
|
+
]);
|
|
2050
|
+
};
|
|
2051
|
+
}
|
|
2052
|
+
function Pn(e) {
|
|
2053
|
+
return function(t, n) {
|
|
2054
|
+
e.call(this, t, n), typeof t == "string" && M.get(this)?.appHeaders.add(t.toLowerCase());
|
|
2055
|
+
};
|
|
2056
|
+
}
|
|
2057
|
+
function Fn(e, t) {
|
|
2058
|
+
let n = t.watched?.headers;
|
|
2059
|
+
if (n) {
|
|
2060
|
+
for (let [r, i] of Object.entries(n)) if (!t.appHeaders.has(r.toLowerCase())) try {
|
|
2061
|
+
e.setRequestHeader(r, i);
|
|
2062
|
+
} catch {}
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
function In(e) {
|
|
2066
|
+
return function(t) {
|
|
2067
|
+
let n = () => e.call(this, t), r = M.get(this);
|
|
2068
|
+
if (!r || !_n() || r.ended) return n();
|
|
2069
|
+
let i = null;
|
|
2070
|
+
try {
|
|
2071
|
+
i = vn({
|
|
2072
|
+
kind: "xhr",
|
|
2073
|
+
method: r.method,
|
|
2074
|
+
url: r.url
|
|
2075
|
+
});
|
|
2076
|
+
} catch {
|
|
2077
|
+
i = null;
|
|
2078
|
+
}
|
|
2079
|
+
if (!i) return n();
|
|
2080
|
+
r.watched = i, Fn(this, r);
|
|
2081
|
+
let a = () => {
|
|
2082
|
+
if (this.readyState !== An || (this.removeEventListener("readystatechange", a), r.ended)) return;
|
|
2083
|
+
let e = 0;
|
|
2084
|
+
try {
|
|
2085
|
+
e = this.status;
|
|
2086
|
+
} catch {}
|
|
2087
|
+
Mn(r, { status: e });
|
|
2088
|
+
};
|
|
2089
|
+
this.addEventListener("readystatechange", a), r.onDone = a;
|
|
2090
|
+
try {
|
|
2091
|
+
return n();
|
|
2092
|
+
} catch (e) {
|
|
2093
|
+
throw this.removeEventListener("readystatechange", a), Mn(r, { error: e }), e;
|
|
2094
|
+
}
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
var Ln = wn(), Rn = null;
|
|
2098
|
+
function zn() {
|
|
2099
|
+
if (Ln.installed) return;
|
|
2100
|
+
let e = globalThis.XMLHttpRequest;
|
|
2101
|
+
typeof e != "function" || !e.prototype || (Ln.install(e.prototype, {
|
|
2102
|
+
open: (e) => Nn(e),
|
|
2103
|
+
setRequestHeader: (e) => Pn(e),
|
|
2104
|
+
send: (e) => In(e)
|
|
2105
|
+
}), Rn = e.prototype);
|
|
2106
|
+
}
|
|
2107
|
+
function Bn() {
|
|
2108
|
+
Rn && (Ln.uninstall(Rn), Ln.installed || (Rn = null));
|
|
2109
|
+
}
|
|
2110
|
+
var Vn = 0;
|
|
2111
|
+
function Hn(e) {
|
|
2112
|
+
Vn === 0 && (On(), zn()), Vn++;
|
|
2113
|
+
let t = e(), n = !1;
|
|
2114
|
+
return () => {
|
|
2115
|
+
n || (n = !0, t(), Vn--, Vn === 0 && (kn(), Bn()));
|
|
2116
|
+
};
|
|
2117
|
+
}
|
|
2118
|
+
function Un(e, t, n, r) {
|
|
2119
|
+
return r ? r.length !== 0 && r.some((t) => typeof t == "string" ? e.includes(t) : t.test(e)) : t !== null && t.origin === n;
|
|
2120
|
+
}
|
|
2121
|
+
function Wn(e) {
|
|
2122
|
+
try {
|
|
2123
|
+
let t = [];
|
|
2124
|
+
for (let n of e) {
|
|
2125
|
+
if (typeof n != "object" || !n) return null;
|
|
2126
|
+
let e = Array.from(n);
|
|
2127
|
+
if (e.length !== 2) return null;
|
|
2128
|
+
t.push([String(e[0]), String(e[1])]);
|
|
2129
|
+
}
|
|
2130
|
+
return t;
|
|
2131
|
+
} catch {
|
|
2132
|
+
return null;
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
function Gn(e) {
|
|
2136
|
+
return e !== null && (typeof e == "object" || typeof e == "function") && typeof e[Symbol.iterator] == "function";
|
|
2137
|
+
}
|
|
2138
|
+
function Kn(e, t, n) {
|
|
2139
|
+
let r = t?.headers ?? (typeof Request < "u" && e instanceof Request ? e.headers : void 0), i;
|
|
2140
|
+
if (r instanceof Headers) {
|
|
2141
|
+
if (r.has("traceparent")) return t;
|
|
2142
|
+
i = new Headers(r), i.set("traceparent", n);
|
|
2143
|
+
} else if (Array.isArray(r)) {
|
|
2144
|
+
if (r.some(([e]) => String(e).toLowerCase() === "traceparent")) return t;
|
|
2145
|
+
i = [...r, ["traceparent", n]];
|
|
2146
|
+
} else if (Gn(r)) {
|
|
2147
|
+
let e = Wn(r);
|
|
2148
|
+
if (e === null) i = r;
|
|
2149
|
+
else if (e.some(([e]) => e.toLowerCase() === "traceparent")) return t;
|
|
2150
|
+
else i = [...e, ["traceparent", n]];
|
|
2151
|
+
} else if (r) {
|
|
2152
|
+
if (Object.keys(r).some((e) => e.toLowerCase() === "traceparent")) return t;
|
|
2153
|
+
i = {
|
|
2154
|
+
...r,
|
|
2155
|
+
traceparent: n
|
|
2156
|
+
};
|
|
2157
|
+
} else i = { traceparent: n };
|
|
2158
|
+
let a = { headers: i };
|
|
2159
|
+
if (t) {
|
|
2160
|
+
let e = Object.getOwnPropertyDescriptors(t);
|
|
2161
|
+
delete e.headers, Object.defineProperties(a, e);
|
|
2162
|
+
}
|
|
2163
|
+
return a.duplex === void 0 && typeof Request < "u" && e instanceof Request && e.body != null && (a.duplex = "half"), a;
|
|
2164
|
+
}
|
|
2165
|
+
var qn = {
|
|
2166
|
+
fetch: b.Fetch,
|
|
2167
|
+
xhr: b.Xhr
|
|
2168
|
+
}, Jn = /* @__PURE__ */ new Set(["data:", "blob:"]);
|
|
2169
|
+
function Yn() {
|
|
2170
|
+
let e = globalThis.location?.origin ?? "";
|
|
2171
|
+
return {
|
|
2172
|
+
origin: e,
|
|
2173
|
+
base: () => globalThis.document?.baseURI || e
|
|
2174
|
+
};
|
|
2175
|
+
}
|
|
2176
|
+
function Xn(e, t) {
|
|
2177
|
+
try {
|
|
2178
|
+
return new URL(e, t || void 0);
|
|
2179
|
+
} catch {
|
|
2180
|
+
return null;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
var Zn = null, Qn = [];
|
|
2184
|
+
function $n(e, t) {
|
|
2185
|
+
let n = [
|
|
2186
|
+
e.ingestUrl,
|
|
2187
|
+
e.logsIngestUrl,
|
|
2188
|
+
e.tracesIngestUrl
|
|
2189
|
+
], r = `${t} ${n.join(" ")}`;
|
|
2190
|
+
return r !== Zn && (Zn = r, Qn = n.filter((e) => typeof e == "string" && e.length > 0).map((e) => Xn(e, t)).filter((e) => e !== null).map((e) => e.href)), Qn;
|
|
2191
|
+
}
|
|
2192
|
+
function er(e, t) {
|
|
2193
|
+
if (!e.startsWith(t)) return !1;
|
|
2194
|
+
let n = e.charAt(t.length);
|
|
2195
|
+
return n === "" || n === "/" || n === "?" || n === "#";
|
|
2196
|
+
}
|
|
2197
|
+
function tr(e, t, n) {
|
|
2198
|
+
return e ? $n(t, n).some((t) => er(e.href, t)) : !1;
|
|
2199
|
+
}
|
|
2200
|
+
function nr(e, t, n, r) {
|
|
2201
|
+
return {
|
|
2202
|
+
"http.request.method": e,
|
|
2203
|
+
...we(t ? t.href : n, r.urlDenylist),
|
|
2204
|
+
...t ? { "server.address": t.hostname } : {},
|
|
2205
|
+
...t && t.port ? { "server.port": Number(t.port) } : {}
|
|
2206
|
+
};
|
|
2207
|
+
}
|
|
2208
|
+
function rr(e, t, n) {
|
|
2209
|
+
e.setAttribute("http.response.status_code", t), (t >= 500 || n?.zeroIsError && t === 0) && e.setStatus({ code: x.Error }), e.end();
|
|
2210
|
+
}
|
|
2211
|
+
function ir(e, t) {
|
|
2212
|
+
e.setStatus({
|
|
2213
|
+
code: x.Error,
|
|
2214
|
+
message: t instanceof Error ? t.message : String(t)
|
|
2215
|
+
}), e.end();
|
|
2216
|
+
}
|
|
2217
|
+
function ar(e, t, n, r, i) {
|
|
2218
|
+
return Un(t ? t.href : n, t, r, i.tracePropagationTargets) ? kt(e.traceId, e.spanId, e.isRecording) : null;
|
|
2219
|
+
}
|
|
2220
|
+
function or(e, t) {
|
|
2221
|
+
let { method: n, url: r, urls: i, spanType: a } = t, o = e.config, s = i.base(), c = Xn(r, s);
|
|
2222
|
+
if (tr(c, o, s) || c && Jn.has(c.protocol)) return null;
|
|
2223
|
+
let l = c ? c.pathname : r;
|
|
2224
|
+
return {
|
|
2225
|
+
span: e.startSpan(`${n} ${l}`, {
|
|
2226
|
+
spanType: a,
|
|
2227
|
+
attributes: nr(n, c, r, o)
|
|
2228
|
+
}),
|
|
2229
|
+
absoluteUrl: c
|
|
2230
|
+
};
|
|
2231
|
+
}
|
|
2232
|
+
function sr(e) {
|
|
2233
|
+
return e !== null && (e.protocol === "http:" || e.protocol === "https:");
|
|
2234
|
+
}
|
|
2235
|
+
function cr(e, t, n, r, i) {
|
|
2236
|
+
let a = ar(e, t, n.url, r.origin, i.config);
|
|
2237
|
+
return a ? n.kind === "xhr" ? { headers: { traceparent: a } } : n.input === void 0 ? {} : { init: Kn(n.input, n.init, a) } : {};
|
|
2238
|
+
}
|
|
2239
|
+
function lr(e, t) {
|
|
2240
|
+
return gn((n) => {
|
|
2241
|
+
if (!e.config.enableTracing) return;
|
|
2242
|
+
let r = or(e, {
|
|
2243
|
+
method: n.method,
|
|
2244
|
+
url: n.url,
|
|
2245
|
+
urls: t,
|
|
2246
|
+
spanType: qn[n.kind]
|
|
2247
|
+
});
|
|
2248
|
+
if (!r) return;
|
|
2249
|
+
let { span: i, absoluteUrl: a } = r, o = {};
|
|
2250
|
+
try {
|
|
2251
|
+
o = cr(i, a, n, t, e);
|
|
2252
|
+
} catch {
|
|
2253
|
+
o = {};
|
|
2254
|
+
}
|
|
2255
|
+
return {
|
|
2256
|
+
...o,
|
|
2257
|
+
onSettle({ status: e, error: t, aborted: r }) {
|
|
2258
|
+
if (r) {
|
|
2259
|
+
i.setStatus({ code: x.Error }), i.end();
|
|
2260
|
+
return;
|
|
2261
|
+
}
|
|
2262
|
+
if (t !== void 0) {
|
|
2263
|
+
ir(i, t);
|
|
2264
|
+
return;
|
|
2265
|
+
}
|
|
2266
|
+
if (n.kind === "xhr") {
|
|
2267
|
+
rr(i, e ?? 0, { zeroIsError: sr(a) });
|
|
2268
|
+
return;
|
|
2269
|
+
}
|
|
2270
|
+
rr(i, e ?? 0);
|
|
2271
|
+
}
|
|
2272
|
+
};
|
|
2273
|
+
});
|
|
2274
|
+
}
|
|
2275
|
+
var ur = class {
|
|
2276
|
+
type = "browser_request";
|
|
2277
|
+
constructor(e) {
|
|
2278
|
+
this.host = e, this.subscribe = this.subscribe.bind(this), this.onStart = this.onStart.bind(this), this.onSettle = this.onSettle.bind(this);
|
|
2279
|
+
}
|
|
2280
|
+
install() {
|
|
2281
|
+
return Hn(this.subscribe);
|
|
2282
|
+
}
|
|
2283
|
+
subscribe() {
|
|
2284
|
+
return hn(this.onStart);
|
|
2285
|
+
}
|
|
2286
|
+
onStart(e) {
|
|
2287
|
+
let t = Yn().base(), n = Xn(e.url, t);
|
|
2288
|
+
if (!tr(n, this.host.config(), t)) return { onSettle: this.onSettle.bind(this, e, n) };
|
|
2289
|
+
}
|
|
2290
|
+
onSettle(e, t, n) {
|
|
2291
|
+
let r = t ? t.href : e.url, i = {
|
|
2292
|
+
"http.request.method": e.method,
|
|
2293
|
+
"url.full": Ne(r, this.host.config().urlDenylist)
|
|
2294
|
+
};
|
|
2295
|
+
t?.hostname && (i["server.address"] = t.hostname), n.status !== void 0 && (i["http.response.status_code"] = n.status), this.host.record(qn[e.kind], i, w());
|
|
2296
|
+
}
|
|
2297
|
+
};
|
|
2298
|
+
function dr(e) {
|
|
2299
|
+
if (typeof document > "u") return () => {};
|
|
2300
|
+
let t = [
|
|
2301
|
+
new Zt(e),
|
|
2302
|
+
new Qt(e),
|
|
2303
|
+
new ur(e),
|
|
2304
|
+
new pn(e)
|
|
2305
|
+
], n = [];
|
|
2306
|
+
for (let e of t) try {
|
|
2307
|
+
n.push(e.install());
|
|
2308
|
+
} catch {}
|
|
2309
|
+
return () => {
|
|
2310
|
+
for (let e of n) try {
|
|
2311
|
+
e();
|
|
2312
|
+
} catch {}
|
|
2313
|
+
};
|
|
2314
|
+
}
|
|
2315
|
+
var fr = class {
|
|
2316
|
+
register(e) {
|
|
2317
|
+
typeof document > "u" || !document || (document.addEventListener("visibilitychange", () => {
|
|
2318
|
+
document.visibilityState === "hidden" && e({ keepalive: !0 });
|
|
2319
|
+
}), typeof window < "u" && window && window.addEventListener("pagehide", () => e({ keepalive: !0 })));
|
|
2320
|
+
}
|
|
2321
|
+
};
|
|
2322
|
+
function pr(e) {
|
|
2323
|
+
if (!window.document.cookie) return {};
|
|
2324
|
+
let t = Object.create(null);
|
|
2325
|
+
return window.document.cookie.split("; ").forEach((n) => {
|
|
2326
|
+
let r = n.indexOf("=");
|
|
2327
|
+
if (r === -1) {
|
|
2328
|
+
t[n] = e.test(n) ? "[redacted]" : "";
|
|
2329
|
+
return;
|
|
2330
|
+
}
|
|
2331
|
+
let i = n.slice(0, r), a = n.slice(r + 1);
|
|
2332
|
+
t[i] = e.test(i) ? "[redacted]" : a;
|
|
2333
|
+
}), { "http.request.cookies": t };
|
|
2334
|
+
}
|
|
2335
|
+
var mr = [
|
|
2336
|
+
"slow-2g",
|
|
2337
|
+
"2g",
|
|
2338
|
+
"3g",
|
|
2339
|
+
"4g"
|
|
2340
|
+
];
|
|
2341
|
+
function hr() {
|
|
2342
|
+
if (typeof screen > "u" || typeof screen.width != "number" || typeof screen.height != "number") return null;
|
|
2343
|
+
let e = typeof devicePixelRatio == "number" ? devicePixelRatio : void 0;
|
|
2344
|
+
return e == null ? {
|
|
2345
|
+
width: screen.width,
|
|
2346
|
+
height: screen.height
|
|
2347
|
+
} : {
|
|
2348
|
+
width: screen.width,
|
|
2349
|
+
height: screen.height,
|
|
2350
|
+
scale: e
|
|
2351
|
+
};
|
|
2352
|
+
}
|
|
2353
|
+
function gr(e) {
|
|
2354
|
+
let t = {};
|
|
2355
|
+
typeof e.onLine == "boolean" && (t.online = e.onLine);
|
|
2356
|
+
let n = e.connection;
|
|
2357
|
+
if (n) {
|
|
2358
|
+
let { effectiveType: e, downlink: r, rtt: i } = n;
|
|
2359
|
+
e && mr.includes(e) && (t.effectiveType = e), typeof r == "number" && (t.downlinkMbps = r), typeof i == "number" && (t.rttMs = i);
|
|
2360
|
+
}
|
|
2361
|
+
return Object.keys(t).length > 0 ? t : null;
|
|
2362
|
+
}
|
|
2363
|
+
function _r() {
|
|
2364
|
+
try {
|
|
2365
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone || void 0;
|
|
2366
|
+
} catch {
|
|
2367
|
+
return;
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
var vr = new class {
|
|
2371
|
+
staticInfo = null;
|
|
2372
|
+
collect() {
|
|
2373
|
+
if (typeof window > "u" || typeof navigator > "u") return {};
|
|
2374
|
+
let e = navigator, t = {}, n = this.readStatic(e), r = hr(), i = {
|
|
2375
|
+
...n.device,
|
|
2376
|
+
...r ? { screen: r } : {}
|
|
2377
|
+
};
|
|
2378
|
+
Object.keys(i).length > 0 && (t.device = i), n.locale && (t.locale = n.locale);
|
|
2379
|
+
let a = gr(e);
|
|
2380
|
+
return a && (t.network = a), t;
|
|
2381
|
+
}
|
|
2382
|
+
readStatic(e) {
|
|
2383
|
+
if (this.staticInfo) return this.staticInfo;
|
|
2384
|
+
let t = {};
|
|
2385
|
+
typeof e.deviceMemory == "number" && (t.memoryGb = e.deviceMemory), typeof e.hardwareConcurrency == "number" && (t.cpuCores = e.hardwareConcurrency);
|
|
2386
|
+
let n = {};
|
|
2387
|
+
e.language && (n.language = e.language);
|
|
2388
|
+
let r = _r();
|
|
2389
|
+
return r && (n.timezone = r), this.staticInfo = {
|
|
2390
|
+
device: Object.keys(t).length > 0 ? t : void 0,
|
|
2391
|
+
locale: Object.keys(n).length > 0 ? n : void 0
|
|
2392
|
+
}, this.staticInfo;
|
|
2393
|
+
}
|
|
2394
|
+
}();
|
|
2395
|
+
function yr(e, t) {
|
|
2396
|
+
return {
|
|
2397
|
+
...we(t ?? window.location.href, e),
|
|
2398
|
+
"user_agent.original": window.navigator.userAgent,
|
|
2399
|
+
"http.request.referrer": v(window.document.referrer, e),
|
|
2400
|
+
"document.ready_state": window.document.readyState
|
|
2401
|
+
};
|
|
2402
|
+
}
|
|
2403
|
+
function br(e, t) {
|
|
2404
|
+
if (typeof window > "u") return { "flare.entry_point.type": "web" };
|
|
2405
|
+
let n = { "flare.entry_point.type": "web" }, r = t ? t.href : window?.location?.href;
|
|
2406
|
+
if (r) {
|
|
2407
|
+
n["flare.entry_point.value"] = v(r, e.urlDenylist);
|
|
2408
|
+
let i = t ? t.pathname : window?.location?.pathname;
|
|
2409
|
+
i && (n["flare.entry_point.handler.identifier"] = i, n["http.route"] = i, n["flare.entry_point.handler.type"] = "browser");
|
|
2410
|
+
}
|
|
2411
|
+
return n;
|
|
2412
|
+
}
|
|
2413
|
+
var xr = (e) => {
|
|
2414
|
+
let t = { ...br(e) };
|
|
2415
|
+
return Object.assign(t, Bt(vr.collect())), typeof window > "u" ? t : (window?.location?.hostname && (t["host.name"] = window.location.hostname), Object.assign(t, yr(e.urlDenylist)), Object.assign(t, pr(e.urlDenylist)), t);
|
|
2416
|
+
}, Sr = class {
|
|
2417
|
+
read(e) {
|
|
2418
|
+
return /^https?:\/\//i.test(e) ? fetch(e, bn()).then((e) => e.status === 200 ? e.text() : null).catch(() => null) : Promise.resolve(null);
|
|
2419
|
+
}
|
|
2420
|
+
}, Cr = typeof process < "u" ? "2.11.0" : "?";
|
|
2421
|
+
function wr(e) {
|
|
2422
|
+
return (...t) => {
|
|
2423
|
+
try {
|
|
2424
|
+
e(...t);
|
|
2425
|
+
} catch {}
|
|
2426
|
+
};
|
|
2427
|
+
}
|
|
2428
|
+
function Tr(e) {
|
|
2429
|
+
try {
|
|
2430
|
+
e?.();
|
|
2431
|
+
} catch {}
|
|
2432
|
+
}
|
|
2433
|
+
var Er = /* @__PURE__ */ new WeakMap();
|
|
2434
|
+
function Dr(e, t) {
|
|
2435
|
+
Er.get(e)?.();
|
|
2436
|
+
let n = [];
|
|
2437
|
+
function r() {
|
|
2438
|
+
for (let e = n.length - 1; e >= 0; e--) Tr(n[e]);
|
|
2439
|
+
}
|
|
2440
|
+
try {
|
|
2441
|
+
t((e) => {
|
|
2442
|
+
n.push(e);
|
|
2443
|
+
});
|
|
2444
|
+
} catch {
|
|
2445
|
+
return r(), () => {};
|
|
2446
|
+
}
|
|
2447
|
+
function i() {
|
|
2448
|
+
r(), Er.get(e) === i && Er.delete(e);
|
|
2449
|
+
}
|
|
2450
|
+
return Er.set(e, i), i;
|
|
2451
|
+
}
|
|
2452
|
+
function Or(e, t) {
|
|
2453
|
+
if (typeof window > "u") return {};
|
|
2454
|
+
let n = $t(t);
|
|
2455
|
+
return {
|
|
2456
|
+
...br(e, n),
|
|
2457
|
+
...yr(e.urlDenylist, n?.href)
|
|
2458
|
+
};
|
|
2459
|
+
}
|
|
2460
|
+
function kr(e, t) {
|
|
2461
|
+
if (typeof window > "u") return {};
|
|
2462
|
+
let n = $t(t);
|
|
2463
|
+
if (!n) return {};
|
|
2464
|
+
let r = we(n.href, e.urlDenylist);
|
|
2465
|
+
return {
|
|
2466
|
+
"url.query": "",
|
|
2467
|
+
...r,
|
|
2468
|
+
"flare.entry_point.value": r["url.full"]
|
|
2469
|
+
};
|
|
2470
|
+
}
|
|
2471
|
+
var Ar = -1, N = () => Ar, P = (e) => {
|
|
2472
|
+
addEventListener("pageshow", (t) => {
|
|
2473
|
+
t.persisted && (Ar = t.timeStamp, e(t));
|
|
2474
|
+
}, !0);
|
|
2475
|
+
}, jr = (e, t) => e > t[1] ? "poor" : e > t[0] ? "needs-improvement" : "good", F = (e, t, n, r) => {
|
|
2476
|
+
let i, a;
|
|
2477
|
+
return (o) => {
|
|
2478
|
+
t.value >= 0 && (o || r) && (a = t.value - (i ?? 0), (a || i === void 0) && (i = t.value, t.delta = a, t.rating = jr(t.value, n), e(t)));
|
|
2479
|
+
};
|
|
2480
|
+
}, Mr = (e) => {
|
|
2481
|
+
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
2482
|
+
}, Nr = () => {
|
|
2483
|
+
let e = performance.getEntriesByType("navigation")[0];
|
|
2484
|
+
if (e && e.responseStart > 0 && e.responseStart < performance.now()) return e;
|
|
2485
|
+
}, I = () => Nr()?.activationStart ?? 0, L = -1, Pr = /* @__PURE__ */ new Set(), Fr = () => document.visibilityState === "hidden" && !document.prerendering ? 0 : Infinity, Ir = (e) => {
|
|
2486
|
+
if (document.visibilityState === "hidden") {
|
|
2487
|
+
if (e.type === "visibilitychange") for (let e of Pr) e();
|
|
2488
|
+
isFinite(L) || (L = e.type === "visibilitychange" ? e.timeStamp : 0, removeEventListener("prerenderingchange", Ir, !0));
|
|
2489
|
+
}
|
|
2490
|
+
}, R = (e = !1) => {
|
|
2491
|
+
if (e && (L = Infinity), L < 0) {
|
|
2492
|
+
let e = I();
|
|
2493
|
+
L = (document.prerendering ? void 0 : globalThis.performance.getEntriesByType("visibility-state").find((t) => t.name === "hidden" && t.startTime >= e)?.startTime) ?? Fr(), addEventListener("visibilitychange", Ir, !0), addEventListener("prerenderingchange", Ir, !0), P(() => {
|
|
2494
|
+
setTimeout(() => {
|
|
2495
|
+
L = Fr();
|
|
2496
|
+
});
|
|
2497
|
+
});
|
|
2498
|
+
}
|
|
2499
|
+
return {
|
|
2500
|
+
get firstHiddenTime() {
|
|
2501
|
+
return L;
|
|
2502
|
+
},
|
|
2503
|
+
onHidden(e) {
|
|
2504
|
+
Pr.add(e);
|
|
2505
|
+
}
|
|
2506
|
+
};
|
|
2507
|
+
}, Lr = () => `v6-${Date.now()}-${Math.floor(Math.random() * 8999999999999) + 0xe8d4a51000}`, z = (e, t = -1, n, r = 0, i, a, o) => {
|
|
2508
|
+
let s = Nr(), c = s?.navigationId || 0, l = "navigate";
|
|
2509
|
+
return n ? l = n : N() >= 0 ? l = "back-forward-cache" : s && (document.prerendering || I() > 0 ? l = "prerender" : document.wasDiscarded ? l = "restore" : s.type && (l = s.type.replace(/_/g, "-"))), {
|
|
2510
|
+
name: e,
|
|
2511
|
+
value: t,
|
|
2512
|
+
rating: "good",
|
|
2513
|
+
delta: 0,
|
|
2514
|
+
entries: [],
|
|
2515
|
+
id: Lr(),
|
|
2516
|
+
navigationType: l,
|
|
2517
|
+
navigationId: r || c,
|
|
2518
|
+
navigationInteractionId: i,
|
|
2519
|
+
navigationURL: a || s?.name,
|
|
2520
|
+
navigationStartTime: o || 0
|
|
2521
|
+
};
|
|
2522
|
+
}, Rr = /* @__PURE__ */ new WeakMap();
|
|
2523
|
+
function zr(e, t) {
|
|
2524
|
+
let n = Rr.get(t);
|
|
2525
|
+
return n || (n = /* @__PURE__ */ new WeakMap(), Rr.set(t, n)), n.get(e) || n.set(e, new t()), n.get(e);
|
|
2526
|
+
}
|
|
2527
|
+
var Br = class {
|
|
2528
|
+
_onAfterProcessingUnexpectedShift;
|
|
2529
|
+
_sessionValue = 0;
|
|
2530
|
+
_sessionEntries = [];
|
|
2531
|
+
_processEntry(e) {
|
|
2532
|
+
if (e.hadRecentInput) return;
|
|
2533
|
+
let t = this._sessionEntries[0], n = this._sessionEntries.at(-1);
|
|
2534
|
+
this._sessionValue && t && n && e.startTime - n.startTime < 1e3 && e.startTime - t.startTime < 5e3 ? (this._sessionValue += e.value, this._sessionEntries.push(e)) : (this._sessionValue = e.value, this._sessionEntries = [e]), this._onAfterProcessingUnexpectedShift?.(e);
|
|
2535
|
+
}
|
|
2536
|
+
}, B = (e, t, n = {}) => {
|
|
2537
|
+
try {
|
|
2538
|
+
let r = e.filter((e) => PerformanceObserver.supportedEntryTypes.includes(e));
|
|
2539
|
+
if (r.length > 0) {
|
|
2540
|
+
let e = new PerformanceObserver((e) => {
|
|
2541
|
+
queueMicrotask(() => {
|
|
2542
|
+
let n = e.getEntries();
|
|
2543
|
+
r.length > 1 && n.sort((e, t) => e.startTime + e.duration - (t.startTime + t.duration)), t(n);
|
|
2544
|
+
});
|
|
2545
|
+
});
|
|
2546
|
+
for (let t of r) e.observe({
|
|
2547
|
+
type: t,
|
|
2548
|
+
buffered: !0,
|
|
2549
|
+
...n
|
|
2550
|
+
});
|
|
2551
|
+
return e;
|
|
2552
|
+
}
|
|
2553
|
+
} catch {}
|
|
2554
|
+
}, V = (e) => globalThis.PerformanceObserver?.supportedEntryTypes.includes("soft-navigation") && typeof globalThis.PerformanceSoftNavigation?.prototype?.getLargestInteractionContentfulPaint == "function" && e && e.reportSoftNavs, Vr = (e, t) => {
|
|
2555
|
+
if (e.set(t.navigationId, t), e.size > 2) {
|
|
2556
|
+
let t = e.keys().next().value;
|
|
2557
|
+
t !== void 0 && e.delete(t);
|
|
2558
|
+
}
|
|
2559
|
+
}, Hr = (e) => {
|
|
2560
|
+
let t = !1;
|
|
2561
|
+
return () => {
|
|
2562
|
+
t ||= (e(), !0);
|
|
2563
|
+
};
|
|
2564
|
+
}, Ur = class {
|
|
2565
|
+
_softNavigationEntryMap;
|
|
2566
|
+
}, Wr = (e) => {
|
|
2567
|
+
document.prerendering ? addEventListener("prerenderingchange", e, !0) : e();
|
|
2568
|
+
}, Gr = [1800, 3e3], Kr = (e, t = {}) => {
|
|
2569
|
+
let n = V(t);
|
|
2570
|
+
Wr(() => {
|
|
2571
|
+
let r = zr(t, Ur), i = R(), a = z("FCP"), o, s = B(["paint"], (e) => {
|
|
2572
|
+
for (let t of e) t.name === "first-contentful-paint" && (s.disconnect(), t.startTime < i.firstHiddenTime && (a.value = Math.max(t.startTime - I(), 0), a.entries.push(t), a.navigationId = t.navigationId || a.navigationId, o(!0)));
|
|
2573
|
+
});
|
|
2574
|
+
s && (o = F(e, a, Gr, t.reportAllChanges), P((n) => {
|
|
2575
|
+
a = z("FCP", -1, "back-forward-cache", a.navigationId, a.navigationInteractionId, a.navigationURL, N()), o = F(e, a, Gr, t.reportAllChanges), Mr(() => {
|
|
2576
|
+
a.value = performance.now() - n.timeStamp, o(!0);
|
|
2577
|
+
});
|
|
2578
|
+
})), n && B(["soft-navigation"], (n) => {
|
|
2579
|
+
n.forEach((n) => {
|
|
2580
|
+
r._softNavigationEntryMap && n.navigationId && Vr(r._softNavigationEntryMap, n), a = z("FCP", Math.max((n.presentationTime || n.paintTime || 0) - n.startTime, 0), "soft-navigation", n.navigationId, n.interactionId, n.name, n.startTime), o = F(e, a, Gr, t.reportAllChanges), o(!0);
|
|
2581
|
+
});
|
|
2582
|
+
}, t);
|
|
2583
|
+
});
|
|
2584
|
+
}, qr = [.1, .25], Jr = (e, t = {}) => {
|
|
2585
|
+
let n = R();
|
|
2586
|
+
Kr(Hr(() => {
|
|
2587
|
+
let r = z("CLS", 0), i, a = zr(t, Br), o = (n, o, s, c, l) => {
|
|
2588
|
+
r = z("CLS", 0, n, o, s, c, l), a._sessionValue = 0, i = F(e, r, qr, t.reportAllChanges);
|
|
2589
|
+
}, s = (e = !1) => {
|
|
2590
|
+
a._sessionValue > r.value && (r.value = a._sessionValue, r.entries = a._sessionEntries), i(e);
|
|
2591
|
+
}, c = (e) => {
|
|
2592
|
+
s(!0), o("soft-navigation", e.navigationId, e.interactionId, e.name, e.startTime);
|
|
2593
|
+
}, l = (e) => {
|
|
2594
|
+
for (let t of e) {
|
|
2595
|
+
if (t.entryType === "soft-navigation") {
|
|
2596
|
+
c(t);
|
|
2597
|
+
continue;
|
|
2598
|
+
}
|
|
2599
|
+
a._processEntry(t);
|
|
2600
|
+
}
|
|
2601
|
+
s();
|
|
2602
|
+
}, u = ["layout-shift"];
|
|
2603
|
+
V(t) && u.push("soft-navigation");
|
|
2604
|
+
let d = B(u, l);
|
|
2605
|
+
d && (i = F(e, r, qr, t.reportAllChanges), n.onHidden(() => {
|
|
2606
|
+
l(d.takeRecords()), i(!0);
|
|
2607
|
+
}), P(() => {
|
|
2608
|
+
o("back-forward-cache", r.navigationId, r.navigationInteractionId, r.navigationURL, N()), Mr(i);
|
|
2609
|
+
}), setTimeout(i));
|
|
2610
|
+
}));
|
|
2611
|
+
}, Yr = 0, Xr = Infinity, Zr = 0, Qr = (e) => {
|
|
2612
|
+
for (let t of e) t.interactionId && (Xr = Math.min(Xr, t.interactionId), Zr = Math.max(Zr, t.interactionId), Yr = Zr ? (Zr - Xr) / 7 + 1 : 0);
|
|
2613
|
+
}, $r, ei = () => $r ? Yr : performance.interactionCount ?? 0, ti = () => {
|
|
2614
|
+
"interactionCount" in performance || $r || ($r = B(["event"], Qr, { durationThreshold: 0 }));
|
|
2615
|
+
}, ni = 10, ri = 0, ii = () => ei() - ri, ai = class {
|
|
2616
|
+
_longestInteractionList = [];
|
|
2617
|
+
_longestInteractionMap = /* @__PURE__ */ new Map();
|
|
2618
|
+
_onBeforeProcessingEntry;
|
|
2619
|
+
_onAfterProcessingINPCandidate;
|
|
2620
|
+
_resetInteractions() {
|
|
2621
|
+
ri = ei(), this._longestInteractionList.length = 0, this._longestInteractionMap.clear();
|
|
2622
|
+
}
|
|
2623
|
+
_estimateP98LongestInteraction(e) {
|
|
2624
|
+
let t = ii(), n = Math.min(this._longestInteractionList.length - 1, Math.floor(t / 50));
|
|
2625
|
+
return t && n === -1 && (e === "soft-navigation" || e === "back-forward-cache") ? {
|
|
2626
|
+
_latency: 8,
|
|
2627
|
+
id: -1,
|
|
2628
|
+
entries: []
|
|
2629
|
+
} : this._longestInteractionList[n];
|
|
2630
|
+
}
|
|
2631
|
+
_processEntry(e) {
|
|
2632
|
+
if (this._onBeforeProcessingEntry?.(e), !(e.interactionId || e.entryType === "first-input")) return;
|
|
2633
|
+
let t = this._longestInteractionList.at(-1), n = this._longestInteractionMap.get(e.interactionId);
|
|
2634
|
+
if (n || this._longestInteractionList.length < ni || e.duration > t._latency) {
|
|
2635
|
+
if (n ? e.duration > n._latency ? (n.entries = [e], n._latency = e.duration) : e.duration === n._latency && e.startTime === n.entries[0].startTime && n.entries.push(e) : (n = {
|
|
2636
|
+
id: e.interactionId,
|
|
2637
|
+
entries: [e],
|
|
2638
|
+
_latency: e.duration
|
|
2639
|
+
}, this._longestInteractionMap.set(n.id, n), this._longestInteractionList.push(n)), this._longestInteractionList.sort((e, t) => t._latency - e._latency), this._longestInteractionList.length > ni) {
|
|
2640
|
+
let e = this._longestInteractionList.splice(ni);
|
|
2641
|
+
for (let t of e) this._longestInteractionMap.delete(t.id);
|
|
2642
|
+
}
|
|
2643
|
+
this._onAfterProcessingINPCandidate?.(n);
|
|
2644
|
+
}
|
|
2645
|
+
}
|
|
2646
|
+
}, oi = (e) => {
|
|
2647
|
+
let t = "requestIdleCallback" in globalThis ? 1e3 : 0, n = globalThis.requestIdleCallback || setTimeout, r = globalThis.cancelIdleCallback || clearTimeout;
|
|
2648
|
+
if (document.visibilityState === "hidden") e();
|
|
2649
|
+
else {
|
|
2650
|
+
let i = Hr(e), a = -1, o = () => {
|
|
2651
|
+
r(a), i();
|
|
2652
|
+
};
|
|
2653
|
+
addEventListener("visibilitychange", o, {
|
|
2654
|
+
once: !0,
|
|
2655
|
+
capture: !0
|
|
2656
|
+
}), a = n(() => {
|
|
2657
|
+
removeEventListener("visibilitychange", o, { capture: !0 }), i();
|
|
2658
|
+
}, { timeout: t });
|
|
2659
|
+
}
|
|
2660
|
+
}, si = [200, 500], ci = 40, li = (e, t = {}) => {
|
|
2661
|
+
if (!(globalThis.PerformanceEventTiming && "interactionId" in PerformanceEventTiming.prototype)) return;
|
|
2662
|
+
let n = R();
|
|
2663
|
+
Wr(() => {
|
|
2664
|
+
ti();
|
|
2665
|
+
let r = z("INP"), i, a = zr(t, ai), o = (n, o, s, c, l) => {
|
|
2666
|
+
a._resetInteractions(), r = z("INP", -1, n, o, s, c, l), i = F(e, r, si, t.reportAllChanges);
|
|
2667
|
+
}, s = () => {
|
|
2668
|
+
let e = a._estimateP98LongestInteraction(r.navigationType);
|
|
2669
|
+
e && e._latency !== r.value && (r.value = e._latency, r.entries = e.entries, i());
|
|
2670
|
+
}, c = (e) => {
|
|
2671
|
+
s(), i(!0), o("soft-navigation", e.navigationId, e.interactionId, e.name, e.startTime);
|
|
2672
|
+
}, l = (e, t = !1) => {
|
|
2673
|
+
oi(() => {
|
|
2674
|
+
for (let t of e) {
|
|
2675
|
+
if (t.entryType === "soft-navigation") {
|
|
2676
|
+
c(t);
|
|
2677
|
+
continue;
|
|
2678
|
+
}
|
|
2679
|
+
a._processEntry(t);
|
|
2680
|
+
}
|
|
2681
|
+
s(), t && i(!0);
|
|
2682
|
+
});
|
|
2683
|
+
}, u = ["event", "first-input"];
|
|
2684
|
+
V(t) && u.push("soft-navigation");
|
|
2685
|
+
let d = B(u, l, {
|
|
2686
|
+
...t,
|
|
2687
|
+
durationThreshold: t.durationThreshold ?? ci
|
|
2688
|
+
});
|
|
2689
|
+
i = F(e, r, si, t.reportAllChanges), d && (n.onHidden(() => {
|
|
2690
|
+
l(d.takeRecords(), !0);
|
|
2691
|
+
}), P(() => {
|
|
2692
|
+
o("back-forward-cache", r.navigationId, r.navigationInteractionId, r.navigationURL, N());
|
|
2693
|
+
}));
|
|
2694
|
+
});
|
|
2695
|
+
}, ui = class {
|
|
2696
|
+
_onBeforeProcessingEntry;
|
|
2697
|
+
_softNavigationEntryMap;
|
|
2698
|
+
_processEntry(e) {
|
|
2699
|
+
this._onBeforeProcessingEntry?.(e);
|
|
2700
|
+
}
|
|
2701
|
+
}, di = [2500, 4e3], fi = (e, t = {}) => {
|
|
2702
|
+
let n = !1, r = V(t);
|
|
2703
|
+
Wr(() => {
|
|
2704
|
+
let i = R(), a = z("LCP"), o, s = zr(t, ui), c = (r, s, c, l, u) => {
|
|
2705
|
+
a = z("LCP", -1, r, s, c, l, u), o = F(e, a, di, t.reportAllChanges), n = !1, r === "soft-navigation" && (i = R(!0));
|
|
2706
|
+
}, l = (e) => {
|
|
2707
|
+
s._softNavigationEntryMap && e.navigationId && Vr(s._softNavigationEntryMap, e), n || o(!0), c("soft-navigation", e.navigationId, e.interactionId, e.name, e.startTime);
|
|
2708
|
+
let t = e.getLargestInteractionContentfulPaint?.();
|
|
2709
|
+
t && u([t]);
|
|
2710
|
+
}, u = (e) => {
|
|
2711
|
+
!t.reportAllChanges && !r && (e = e.slice(-1));
|
|
2712
|
+
for (let t of e) {
|
|
2713
|
+
if (!t) continue;
|
|
2714
|
+
if (t.entryType === "soft-navigation") {
|
|
2715
|
+
l(t);
|
|
2716
|
+
continue;
|
|
2717
|
+
}
|
|
2718
|
+
let e = 0, n = [], r = t.startTime;
|
|
2719
|
+
if (t.entryType === "largest-contentful-paint") e = Math.max(t.startTime - I(), 0), s._processEntry(t), n = [t];
|
|
2720
|
+
else if (t.entryType === "interaction-contentful-paint") {
|
|
2721
|
+
let i = t;
|
|
2722
|
+
if (!a.navigationId || "interactionId" in i && i.interactionId != a.navigationInteractionId) continue;
|
|
2723
|
+
r = i.largestContentfulPaint?.renderTime || 0, e = Math.max(r - t.startTime, 0), i.largestContentfulPaint && (s._processEntry(i.largestContentfulPaint), n = [i.largestContentfulPaint]);
|
|
2724
|
+
}
|
|
2725
|
+
r < i.firstHiddenTime && (a.value = e, a.entries = n, o());
|
|
2726
|
+
}
|
|
2727
|
+
}, d = ["largest-contentful-paint"];
|
|
2728
|
+
r && d.push("interaction-contentful-paint", "soft-navigation");
|
|
2729
|
+
let f = B(d, u);
|
|
2730
|
+
if (f) {
|
|
2731
|
+
o = F(e, a, di, t.reportAllChanges);
|
|
2732
|
+
let i = [
|
|
2733
|
+
"keydown",
|
|
2734
|
+
"click",
|
|
2735
|
+
"visibilitychange"
|
|
2736
|
+
], s = (e) => {
|
|
2737
|
+
if (e.isTrusted && !n) {
|
|
2738
|
+
let e = a.id;
|
|
2739
|
+
oi(() => {
|
|
2740
|
+
if (!n) {
|
|
2741
|
+
if (!r) {
|
|
2742
|
+
f.disconnect();
|
|
2743
|
+
for (let e of i) removeEventListener(e, s, { capture: !0 });
|
|
2744
|
+
}
|
|
2745
|
+
e === a.id && (n = !0, o(!0));
|
|
2746
|
+
}
|
|
2747
|
+
});
|
|
2748
|
+
}
|
|
2749
|
+
};
|
|
2750
|
+
for (let e of i) addEventListener(e, s, { capture: !0 });
|
|
2751
|
+
P((r) => {
|
|
2752
|
+
c("back-forward-cache", a.navigationId, a.navigationInteractionId, a.navigationURL, N()), o = F(e, a, di, t.reportAllChanges), Mr(() => {
|
|
2753
|
+
a.value = performance.now() - r.timeStamp, n = !0, o(!0);
|
|
2754
|
+
});
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2757
|
+
});
|
|
2758
|
+
}, pi = [800, 1800], mi = (e) => {
|
|
2759
|
+
document.prerendering ? Wr(() => mi(e)) : document.readyState === "complete" ? setTimeout(e) : addEventListener("load", () => mi(e), !0);
|
|
2760
|
+
}, hi = (e, t = {}) => {
|
|
2761
|
+
let n = V(t), r = z("TTFB"), i = F(e, r, pi, t.reportAllChanges);
|
|
2762
|
+
mi(() => {
|
|
2763
|
+
let a = Nr();
|
|
2764
|
+
if (a) {
|
|
2765
|
+
let o = a.responseStart;
|
|
2766
|
+
r.value = Math.max(o - I(), 0), r.entries = [a], i(!0), P(() => {
|
|
2767
|
+
r = z("TTFB", 0, "back-forward-cache", r.navigationId, r.navigationInteractionId, r.navigationURL, N()), i = F(e, r, pi, t.reportAllChanges), i(!0);
|
|
2768
|
+
}), n && B(["soft-navigation"], (n) => {
|
|
2769
|
+
n.forEach((n) => {
|
|
2770
|
+
n.navigationId && (r = z("TTFB", 0, "soft-navigation", n.navigationId, n.interactionId, n.name, n.startTime), r.entries = [n], i = F(e, r, pi, t.reportAllChanges), i(!0));
|
|
2771
|
+
});
|
|
2772
|
+
}, t);
|
|
2773
|
+
}
|
|
2774
|
+
});
|
|
2775
|
+
}, gi = ["ttfb", "fcp"];
|
|
2776
|
+
function _i(e) {
|
|
2777
|
+
let t = {};
|
|
2778
|
+
for (let [n, r] of Object.entries(e)) typeof r == "number" && (t[`browser.web_vital.${n}`] = r);
|
|
2779
|
+
return t;
|
|
2780
|
+
}
|
|
2781
|
+
function vi(e) {
|
|
2782
|
+
let t = _i(e.vitals);
|
|
2783
|
+
return Object.keys(t).length === 0 ? null : {
|
|
2784
|
+
name: e.routeName,
|
|
2785
|
+
startTimeUnixNano: e.rootStartTimeUnixNano,
|
|
2786
|
+
endTimeUnixNano: e.rootStartTimeUnixNano,
|
|
2787
|
+
attributes: {
|
|
2788
|
+
...e.contextAttributes,
|
|
2789
|
+
"flare.entry_point.handler.identifier": e.routeName,
|
|
2790
|
+
"http.route": e.routeName,
|
|
2791
|
+
"flare.route.source": e.routeSource,
|
|
2792
|
+
...t
|
|
2793
|
+
}
|
|
2794
|
+
};
|
|
2795
|
+
}
|
|
2796
|
+
var H = {}, yi = !1, U = !1, bi = !1;
|
|
2797
|
+
function xi() {
|
|
2798
|
+
return {
|
|
2799
|
+
onTTFB: (e) => hi(e),
|
|
2800
|
+
onFCP: (e) => Kr(e),
|
|
2801
|
+
onLCP: (e) => fi(e, { reportAllChanges: !0 }),
|
|
2802
|
+
onCLS: (e) => Jr(e, { reportAllChanges: !0 }),
|
|
2803
|
+
onINP: (e) => li(e, { reportAllChanges: !0 })
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
function Si(e = xi()) {
|
|
2807
|
+
U = !0, !yi && (yi = !0, W(e.onTTFB, "ttfb"), W(e.onFCP, "fcp"), W(e.onLCP, "lcp"), W(e.onCLS, "cls"), W(e.onINP, "inp"));
|
|
2808
|
+
}
|
|
2809
|
+
function W(e, t) {
|
|
2810
|
+
try {
|
|
2811
|
+
e((e) => Ci(t, e));
|
|
2812
|
+
} catch {}
|
|
2813
|
+
}
|
|
2814
|
+
function Ci(e, t) {
|
|
2815
|
+
!U || typeof t?.value != "number" || (H[e] = t.value);
|
|
2816
|
+
}
|
|
2817
|
+
function wi() {
|
|
2818
|
+
U = !1, H = {};
|
|
2819
|
+
}
|
|
2820
|
+
function Ti() {
|
|
2821
|
+
if (!U) return null;
|
|
2822
|
+
let e = {};
|
|
2823
|
+
for (let t of gi) {
|
|
2824
|
+
let n = H[t];
|
|
2825
|
+
n !== void 0 && (e[t] = n, delete H[t]);
|
|
2826
|
+
}
|
|
2827
|
+
return Object.keys(e).length === 0 ? null : e;
|
|
2828
|
+
}
|
|
2829
|
+
function Ei() {
|
|
2830
|
+
if (bi || !U || Object.keys(H).length === 0) return null;
|
|
2831
|
+
bi = !0;
|
|
2832
|
+
let e = H;
|
|
2833
|
+
return H = {}, e;
|
|
2834
|
+
}
|
|
2835
|
+
function Di(e) {
|
|
2836
|
+
H = e, bi = !1;
|
|
2837
|
+
}
|
|
2838
|
+
var Oi = {
|
|
2839
|
+
idleTimeout: 1e3,
|
|
2840
|
+
finalTimeout: 3e4,
|
|
2841
|
+
childSpanTimeout: 15e3
|
|
2842
|
+
}, ki = class {
|
|
2843
|
+
openChildren = 0;
|
|
2844
|
+
lastChildEndTime = null;
|
|
2845
|
+
settleTime = null;
|
|
2846
|
+
idleTimer = null;
|
|
2847
|
+
finalTimer = null;
|
|
2848
|
+
childTimer = null;
|
|
2849
|
+
ended = !1;
|
|
2850
|
+
held = !1;
|
|
2851
|
+
unsubscribe;
|
|
2852
|
+
constructor(e, t) {
|
|
2853
|
+
this.deps = e, this.timeouts = t, e.setActiveRoot(e.root), this.unsubscribe = e.addSpanListener((e) => this.onSpanEvent(e.phase, e.span));
|
|
2854
|
+
let n = Math.max(0, (e.now() - e.rootStartTime) / 1e6), r = Math.max(0, t.finalTimeout - n);
|
|
2855
|
+
this.finalTimer = e.setTimeout(() => this.finish(e.now()), r), this.held = !!e.held, this.armIdle();
|
|
2856
|
+
}
|
|
2857
|
+
get isEnded() {
|
|
2858
|
+
return this.ended;
|
|
2859
|
+
}
|
|
2860
|
+
endNow() {
|
|
2861
|
+
this.finish(this.openChildren > 0 || this.held ? this.deps.now() : this.trimmedEnd());
|
|
2862
|
+
}
|
|
2863
|
+
releaseHold() {
|
|
2864
|
+
this.ended || !this.held || (this.held = !1, this.openChildren === 0 && (this.settleTime = this.deps.now()), this.armIdle());
|
|
2865
|
+
}
|
|
2866
|
+
onSpanEvent(e, t) {
|
|
2867
|
+
if (!this.ended && t !== this.deps.root && t.traceId === this.deps.root.traceId) {
|
|
2868
|
+
if (e === "start") {
|
|
2869
|
+
this.onChildStarted();
|
|
2870
|
+
return;
|
|
2871
|
+
}
|
|
2872
|
+
this.onChildEnded(t);
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
onChildStarted() {
|
|
2876
|
+
this.openChildren++, this.clearIdle(), this.openChildren === 1 && this.armChildTimeout();
|
|
2877
|
+
}
|
|
2878
|
+
onChildEnded(e) {
|
|
2879
|
+
this.openChildren = Math.max(0, this.openChildren - 1), this.lastChildEndTime = e.endTimeUnixNano || this.deps.now(), !(this.openChildren > 0) && (this.clearChildTimeout(), this.armIdle());
|
|
2880
|
+
}
|
|
2881
|
+
armIdle() {
|
|
2882
|
+
this.clearIdle(), !this.held && (this.idleTimer = this.deps.setTimeout(() => {
|
|
2883
|
+
this.openChildren > 0 || this.finish(this.trimmedEnd());
|
|
2884
|
+
}, this.timeouts.idleTimeout));
|
|
2885
|
+
}
|
|
2886
|
+
trimmedEnd() {
|
|
2887
|
+
return Math.max(this.deps.endFloor(), this.settleTime ?? 0, this.lastChildEndTime ?? 0);
|
|
2888
|
+
}
|
|
2889
|
+
clearIdle() {
|
|
2890
|
+
this.idleTimer !== null && (this.deps.clearTimeout(this.idleTimer), this.idleTimer = null);
|
|
2891
|
+
}
|
|
2892
|
+
armChildTimeout() {
|
|
2893
|
+
this.childTimer = this.deps.setTimeout(() => this.finish(this.deps.now()), this.timeouts.childSpanTimeout);
|
|
2894
|
+
}
|
|
2895
|
+
clearChildTimeout() {
|
|
2896
|
+
this.childTimer !== null && (this.deps.clearTimeout(this.childTimer), this.childTimer = null);
|
|
2897
|
+
}
|
|
2898
|
+
finish(e) {
|
|
2899
|
+
this.ended || (this.ended = !0, e = Math.max(e, this.deps.rootStartTime), this.clearIdle(), this.clearChildTimeout(), this.finalTimer !== null && (this.deps.clearTimeout(this.finalTimer), this.finalTimer = null), this.unsubscribe(), this.deps.beforeEnd?.(), this.deps.root.end(e), this.deps.setActiveRoot(void 0));
|
|
2900
|
+
}
|
|
2901
|
+
};
|
|
2902
|
+
function Ai(e, t) {
|
|
2903
|
+
return Math.round((e + (t ?? 0)) * 1e6);
|
|
2904
|
+
}
|
|
2905
|
+
function ji(e, t, n, r) {
|
|
2906
|
+
return r || t - e > n ? t : e;
|
|
2907
|
+
}
|
|
2908
|
+
function Mi() {
|
|
2909
|
+
let e = globalThis.performance;
|
|
2910
|
+
return !e || typeof e.getEntriesByType != "function" || typeof e.timeOrigin != "number" ? null : e;
|
|
2911
|
+
}
|
|
2912
|
+
function Ni(e) {
|
|
2913
|
+
return e.getEntriesByType("navigation")[0];
|
|
2914
|
+
}
|
|
2915
|
+
function Pi() {
|
|
2916
|
+
let e = Mi();
|
|
2917
|
+
return e ? Ai(e.timeOrigin, Ni(e)?.startTime) : w();
|
|
2918
|
+
}
|
|
2919
|
+
function Fi(e, t, n, r) {
|
|
2920
|
+
let i = t || n || 0;
|
|
2921
|
+
return i ? Math.round((e + i) * 1e6) : r;
|
|
2922
|
+
}
|
|
2923
|
+
function Ii() {
|
|
2924
|
+
let e = Mi();
|
|
2925
|
+
if (!e) return w();
|
|
2926
|
+
let t = Ni(e);
|
|
2927
|
+
return Fi(e.timeOrigin, t?.loadEventEnd, t?.domContentLoadedEventEnd, w());
|
|
2928
|
+
}
|
|
2929
|
+
var G = null, Li = null, Ri = null, zi = !1, K = null, Bi = null, q = null, J = null, Y = null, Vi = 0, X = null, Z = {};
|
|
2930
|
+
function Hi(e) {
|
|
2931
|
+
return {
|
|
2932
|
+
idleTimeout: e.idleTimeout ?? Oi.idleTimeout,
|
|
2933
|
+
finalTimeout: e.finalTimeout ?? Oi.finalTimeout,
|
|
2934
|
+
childSpanTimeout: e.childSpanTimeout ?? Oi.childSpanTimeout
|
|
2935
|
+
};
|
|
2936
|
+
}
|
|
2937
|
+
function Q(e) {
|
|
2938
|
+
if (!(!G || G.isEnded)) try {
|
|
2939
|
+
e(G);
|
|
2940
|
+
} catch (e) {
|
|
2941
|
+
K?.config.debug && console.error("Flare: browser tracing controller callback failed", e);
|
|
2942
|
+
}
|
|
2943
|
+
}
|
|
2944
|
+
function Ui(e) {
|
|
2945
|
+
Q(() => e());
|
|
2946
|
+
}
|
|
2947
|
+
function Wi(e, t) {
|
|
2948
|
+
let { spanType: n, startTimeUnixNano: r, name: i = location.pathname, urlOverride: a, hold: o, backdated: s } = t, c;
|
|
2949
|
+
try {
|
|
2950
|
+
let t = Or(e.config, a);
|
|
2951
|
+
c = e.startSpan(i, {
|
|
2952
|
+
spanType: n,
|
|
2953
|
+
startTimeUnixNano: r,
|
|
2954
|
+
forceRoot: !0,
|
|
2955
|
+
attributes: {
|
|
2956
|
+
...t,
|
|
2957
|
+
"flare.route.source": "url"
|
|
2958
|
+
}
|
|
2959
|
+
}), G = new ki({
|
|
2960
|
+
root: c,
|
|
2961
|
+
addSpanListener: (t) => e.tracer.addSpanListener(t),
|
|
2962
|
+
setActiveRoot: (t) => e.tracer.setActiveRoot(t),
|
|
2963
|
+
now: w,
|
|
2964
|
+
setTimeout: (e, t) => setTimeout(e, t),
|
|
2965
|
+
clearTimeout: (e) => clearTimeout(e),
|
|
2966
|
+
rootStartTime: r,
|
|
2967
|
+
endFloor: n === b.Pageload && s ? Ii : () => r,
|
|
2968
|
+
held: o,
|
|
2969
|
+
beforeEnd: n === b.Pageload ? () => Ki(c, e) : void 0
|
|
2970
|
+
}, Hi(e.config)), Bi = c, n === b.Pageload && (Y = c, Vi = r, X = {
|
|
2971
|
+
name: i,
|
|
2972
|
+
source: "url"
|
|
2973
|
+
}, Z = { ...t });
|
|
2974
|
+
} catch (t) {
|
|
2975
|
+
G = null, Bi = null, n === b.Pageload && (Y = null, Vi = 0, X = null, Z = {});
|
|
2976
|
+
try {
|
|
2977
|
+
c?.end();
|
|
2978
|
+
} catch {}
|
|
2979
|
+
try {
|
|
2980
|
+
e.tracer.setActiveRoot(void 0);
|
|
2981
|
+
} catch {}
|
|
2982
|
+
e.config.debug && console.error("Flare: failed to start browser tracing root", t);
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
function Gi(e, t) {
|
|
2986
|
+
Q((e) => e.endNow()), Wi(e, {
|
|
2987
|
+
spanType: b.Navigation,
|
|
2988
|
+
startTimeUnixNano: w(),
|
|
2989
|
+
name: t.path,
|
|
2990
|
+
urlOverride: t.url,
|
|
2991
|
+
hold: t.hold
|
|
2992
|
+
});
|
|
2993
|
+
}
|
|
2994
|
+
function Ki(e, t) {
|
|
2995
|
+
try {
|
|
2996
|
+
let t = Ti();
|
|
2997
|
+
if (!t) return;
|
|
2998
|
+
for (let [n, r] of Object.entries(_i(t))) e.setAttribute(n, r);
|
|
2999
|
+
} catch (e) {
|
|
3000
|
+
t.config.debug && console.error("Flare: failed to stamp web vitals on the pageload root", e);
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
function qi(e) {
|
|
3004
|
+
let t = Y, n = X;
|
|
3005
|
+
if (!t || !n) return;
|
|
3006
|
+
let r = Ei();
|
|
3007
|
+
if (r) try {
|
|
3008
|
+
let i = vi({
|
|
3009
|
+
vitals: r,
|
|
3010
|
+
rootStartTimeUnixNano: Vi,
|
|
3011
|
+
routeName: n.name,
|
|
3012
|
+
routeSource: n.source,
|
|
3013
|
+
contextAttributes: Z
|
|
3014
|
+
});
|
|
3015
|
+
if (!i) return;
|
|
3016
|
+
e.startSpan(i.name, {
|
|
3017
|
+
parent: t,
|
|
3018
|
+
forceRoot: !0,
|
|
3019
|
+
spanType: b.WebVital,
|
|
3020
|
+
startTimeUnixNano: i.startTimeUnixNano,
|
|
3021
|
+
attributes: i.attributes
|
|
3022
|
+
}).end(i.endTimeUnixNano);
|
|
3023
|
+
} catch (t) {
|
|
3024
|
+
Di(r), e.config.debug && console.error("Flare: failed to emit web vitals", t);
|
|
3025
|
+
}
|
|
3026
|
+
}
|
|
3027
|
+
function Ji(e) {
|
|
3028
|
+
if (typeof window > "u" || typeof history > "u" || typeof location > "u" || Li) return;
|
|
3029
|
+
K = e, Ri = un({
|
|
3030
|
+
onUrlChanged: (t) => Gi(e, { path: t }),
|
|
3031
|
+
onNavigationStart: (t) => Gi(e, t),
|
|
3032
|
+
onRouteName: (e, t) => Zi(e, t),
|
|
3033
|
+
onNavigationSettle: (e, t) => {
|
|
3034
|
+
Zi(e, t), Q((e) => e.releaseHold());
|
|
3035
|
+
},
|
|
3036
|
+
onSourceUnregistered: () => {
|
|
3037
|
+
Q((e) => e.releaseHold()), q = null, J = null;
|
|
3038
|
+
}
|
|
3039
|
+
});
|
|
3040
|
+
let t = Hi(e.config).finalTimeout * 1e6, n = Pi(), r = ji(n, w(), t, zi);
|
|
3041
|
+
if (zi = !0, Wi(e, {
|
|
3042
|
+
spanType: b.Pageload,
|
|
3043
|
+
startTimeUnixNano: r,
|
|
3044
|
+
backdated: r === n
|
|
3045
|
+
}), Si(), q) {
|
|
3046
|
+
let e = q, t = J;
|
|
3047
|
+
q = null, J = null, fn(t) && Zi(e);
|
|
3048
|
+
}
|
|
3049
|
+
function i() {
|
|
3050
|
+
if (G && !G.isEnded) try {
|
|
3051
|
+
G.endNow();
|
|
3052
|
+
} catch (t) {
|
|
3053
|
+
e.config.debug && console.error("Flare: failed to end tracing root on page hide", t);
|
|
3054
|
+
}
|
|
3055
|
+
qi(e);
|
|
3056
|
+
try {
|
|
3057
|
+
e.tracer.flush({ keepalive: !0 });
|
|
3058
|
+
} catch (t) {
|
|
3059
|
+
e.config.debug && console.error("Flare: failed to flush spans on page hide", t);
|
|
3060
|
+
}
|
|
3061
|
+
}
|
|
3062
|
+
let a = () => i(), o = () => {
|
|
3063
|
+
document.visibilityState === "hidden" && i();
|
|
3064
|
+
};
|
|
3065
|
+
window.addEventListener("pagehide", a), document.addEventListener("visibilitychange", o), Li = () => {
|
|
3066
|
+
window.removeEventListener("pagehide", a), document.removeEventListener("visibilitychange", o);
|
|
3067
|
+
};
|
|
3068
|
+
}
|
|
3069
|
+
function Yi() {
|
|
3070
|
+
Q((e) => e.endNow()), G = null, Li &&= (Li(), null), Ri?.(), Ri = null, K = null, Bi = null, q = null, J = null, wi(), Y = null, Vi = 0, X = null, Z = {};
|
|
3071
|
+
}
|
|
3072
|
+
function Xi(e) {
|
|
3073
|
+
if (e.url === void 0 || !K) return null;
|
|
3074
|
+
try {
|
|
3075
|
+
return kr(K.config, e.url);
|
|
3076
|
+
} catch {
|
|
3077
|
+
return null;
|
|
3078
|
+
}
|
|
3079
|
+
}
|
|
3080
|
+
function Zi(e, t) {
|
|
3081
|
+
let n = Bi;
|
|
3082
|
+
if (!n) {
|
|
3083
|
+
q = e, J = t ?? null;
|
|
3084
|
+
return;
|
|
3085
|
+
}
|
|
3086
|
+
let r = Xi(e);
|
|
3087
|
+
Ui(() => {
|
|
3088
|
+
if (n.name = e.name, n.setAttribute("flare.entry_point.handler.identifier", e.name), n.setAttribute("http.route", e.name), n.setAttribute("flare.route.source", e.source), r) for (let [e, t] of Object.entries(r)) n.setAttribute(e, t);
|
|
3089
|
+
}), n === Y && (X = {
|
|
3090
|
+
name: e.name,
|
|
3091
|
+
source: e.source
|
|
3092
|
+
}, r && (Z = {
|
|
3093
|
+
...Z,
|
|
3094
|
+
...r
|
|
3095
|
+
}));
|
|
3096
|
+
}
|
|
3097
|
+
function Qi() {
|
|
3098
|
+
return K;
|
|
3099
|
+
}
|
|
3100
|
+
var $i = w;
|
|
3101
|
+
function ea(e) {
|
|
3102
|
+
return e !== void 0 && !Qi()?.tracer.claimSpanSlot(e) ? null : gt();
|
|
3103
|
+
}
|
|
3104
|
+
function ta() {
|
|
3105
|
+
try {
|
|
3106
|
+
let e = Qi()?.tracer.getActiveSpan();
|
|
3107
|
+
return !e || !e.isRecording ? null : {
|
|
3108
|
+
traceId: e.traceId,
|
|
3109
|
+
parentSpanId: e.spanId
|
|
3110
|
+
};
|
|
3111
|
+
} catch {
|
|
3112
|
+
return null;
|
|
3113
|
+
}
|
|
3114
|
+
}
|
|
3115
|
+
function na(e, t) {
|
|
3116
|
+
return e && t && e.traceId === t.traceId ? e : t;
|
|
3117
|
+
}
|
|
3118
|
+
function ra(e) {
|
|
3119
|
+
try {
|
|
3120
|
+
let t = Qi();
|
|
3121
|
+
if (!t) return;
|
|
3122
|
+
let n = t.tracer.getActiveSpan();
|
|
3123
|
+
if (!n || n.traceId !== e.parent.traceId || !n.isRecording) return;
|
|
3124
|
+
t.startSpan(e.name, {
|
|
3125
|
+
spanId: e.spanId,
|
|
3126
|
+
parent: {
|
|
3127
|
+
traceId: e.parent.traceId,
|
|
3128
|
+
spanId: e.parent.parentSpanId
|
|
3129
|
+
},
|
|
3130
|
+
spanType: b.Component,
|
|
3131
|
+
startTimeUnixNano: e.startTimeUnixNano,
|
|
3132
|
+
attributes: {
|
|
3133
|
+
...e.attributes,
|
|
3134
|
+
"flare.component.name": e.name
|
|
3135
|
+
},
|
|
3136
|
+
claimed: !0
|
|
3137
|
+
}).end(e.endTimeUnixNano);
|
|
3138
|
+
} catch {}
|
|
3139
|
+
}
|
|
3140
|
+
function ia() {
|
|
3141
|
+
try {
|
|
3142
|
+
return !1;
|
|
3143
|
+
} catch {
|
|
3144
|
+
return !1;
|
|
3145
|
+
}
|
|
3146
|
+
}
|
|
3147
|
+
function aa(e) {
|
|
3148
|
+
let { packageName: t } = e, n = e.injectInstruction ?? `Import ${t}/inject and pass the @flareapp/electron/renderer instance instead.`, r = null;
|
|
3149
|
+
function i(e) {
|
|
3150
|
+
if (typeof window < "u" && window.__flare) {
|
|
3151
|
+
let e = `[flare] ${t} (web root) was imported in a renderer where the Electron bridge is present, pulling the keyed @flareapp/js singleton into the renderer. ` + n;
|
|
3152
|
+
if (ia()) throw Error(e);
|
|
3153
|
+
console.warn(e);
|
|
3154
|
+
}
|
|
3155
|
+
r = e;
|
|
3156
|
+
}
|
|
3157
|
+
function a(e) {
|
|
3158
|
+
if (e) return e;
|
|
3159
|
+
if (r) return r();
|
|
3160
|
+
throw Error(`[flare] No Flare instance available. Pass \`flare\` (e.g. from @flareapp/electron/renderer), or import ${t} (the package root) to use the @flareapp/js default singleton.`);
|
|
3161
|
+
}
|
|
3162
|
+
return {
|
|
3163
|
+
registerDefaultFlare: i,
|
|
3164
|
+
resolveFlare: a
|
|
3165
|
+
};
|
|
3166
|
+
}
|
|
3167
|
+
function oa() {
|
|
3168
|
+
typeof window > "u" || (window.addEventListener("error", (e) => {
|
|
3169
|
+
let t = window.flare;
|
|
3170
|
+
t && e.error instanceof Error && t.reportSilently(e.error);
|
|
3171
|
+
}), window.addEventListener("unhandledrejection", (e) => {
|
|
3172
|
+
let t = window.flare;
|
|
3173
|
+
t && be(t, e.reason);
|
|
3174
|
+
}));
|
|
3175
|
+
}
|
|
3176
|
+
//#endregion
|
|
3177
|
+
//#region node_modules/@flareapp/js/dist/index.mjs
|
|
3178
|
+
var sa = new class extends zt {
|
|
3179
|
+
constructor(e = new Me(), t = xr, n = new Sr(), r = new tt()) {
|
|
3180
|
+
super(e, t, n, r, new fr()), this.setSdkInfo({
|
|
3181
|
+
name: "@flareapp/js",
|
|
3182
|
+
version: Cr
|
|
3183
|
+
}), this.setFramework({ name: De.Js });
|
|
3184
|
+
}
|
|
3185
|
+
removeTracingSubscription = null;
|
|
3186
|
+
stopBreadcrumbs = null;
|
|
3187
|
+
configure(e) {
|
|
3188
|
+
let t = this.config.enableTracing, n = this.config.enableBreadcrumbs;
|
|
3189
|
+
super.configure(e);
|
|
3190
|
+
let r = this.config.enableTracing, i = this.config.enableBreadcrumbs;
|
|
3191
|
+
return !n && i ? this.stopBreadcrumbs = dr({
|
|
3192
|
+
config: () => this.config,
|
|
3193
|
+
record: (e, t, n) => this.addBreadcrumb(e, t, n)
|
|
3194
|
+
}) : n && !i && (this.stopBreadcrumbs?.(), this.stopBreadcrumbs = null), !t && r ? (this.removeTracingSubscription = Hn(() => lr(this, Yn())), Ji(this)) : t && !r && (Yi(), this.removeTracingSubscription?.(), this.removeTracingSubscription = null), this;
|
|
3195
|
+
}
|
|
3196
|
+
}();
|
|
3197
|
+
typeof window < "u" && window && (window.flare = sa, oa());
|
|
3198
|
+
//#endregion
|
|
3199
|
+
//#region src/plugins/flare.ts
|
|
3200
|
+
var ca = /* @__PURE__ */ "fancybox,jQuery,Modernizr,cssua,ScrollTrigger,calcSelectArrowDimensions,this.elements.$menu.smartmenus,woocommerce,elementor,avadaAddQuantityBoxes,fusion,FLBuilderAccordion,_initLayerSlider,Divi,gsap,Swiper,mailchimp,_AutofillCallbackHandler,$(...),imagesLoaded,masonry,accessing a cross-origin frame,scrollspy,No layout mode: packery,Vimeo,Network Error,Request aborted,timeout exceeded,Loading chunk,TrackerStorageType,Failed to load because no supported source was found.,The element has no supported sources.,grecaptcha,lightbox,priceCalcElement,AwesomeMenu,breakdance,Maximum call stack size exceeded.,Cookies is not defined,getUniqId,Cannot read properties of null (reading 'classList'),n.getModal,e.target.closest is not a function,Cannot read properties of undefined (reading 'Item'),Cannot read properties of undefined (reading 'clientHeight'),refreshFsLightbox,fbq,Cannot assign to read only property 'push' of object '[object Array]',naturalWidth,Request failed with status code,Can't find variable: _,astraNavMenuTogglePro,The operation was aborted.,Failed to fetch dynamically imported module:,Importing a module script failed.,The request is not allowed by the user agent,this.Vi.close,The operation is insecure.,gformValidateFileSize,BreakdanceEntrance,Cannot read properties of undefined (reading '__'),The play() request was interrupted because video-only,Animation is interrupted by user input.,Animation is already playing.,Position \"NaN\" is not reachable.,Cannot redefine property: onbeforeunload,e.remove is not a function,Can't find variable: Cookies,Load failed,wp is not defined,Backbone,Invalid attempt to destructure non-iterable instance,Can't find variable: EmptyRanges,Cannot read properties of undefined (reading 'setLocaleData'),Function snaptr not implemented.,window.sbi_init is not a function,thehotelsnetwork,Reepay,wpcf7,et_pb_,mediaelementplayer,pys_generate_token,webkit.messageHandlers,__firefox__,window.ethereum,Blocked a frame with origin,NetworkError when attempting to fetch resource,play() failed because the user didn,Error invoking postMessage: Java exception,Failed to load CSS,Failed to load script,removeAttribute is not a function,Invalid site key,Handling is disabled".split(",");
|
|
3201
|
+
/(meta-external|facebookexternalhit|googlebot|bingbot|slurp|duckduckbot|baiduspider|yandexbot|twitterbot|linkedinbot|semrushbot|ahrefsbot|applebot|bytespider|crawler|spider|HeadlessChrome)/i.test(navigator.userAgent) || (sa.light("5pqzBljrmDvquWZYSrSUKldIUREtPyB3"), sa.addContext("version", "4.8.0"), sa.configure({ beforeEvaluate: (e) => {
|
|
3202
|
+
for (let t = 0; t < ca.length; t++) if (e.message.toLowerCase().includes(ca[t].toLowerCase())) return !1;
|
|
3203
|
+
return e;
|
|
3204
|
+
} }));
|
|
3205
|
+
//#endregion
|
|
3206
|
+
//#region node_modules/@flareapp/vue/dist/FlareErrorBoundary-CO0ZV9lZ.mjs
|
|
3207
|
+
var { registerDefaultFlare: la, resolveFlare: ua } = aa({ packageName: "@flareapp/vue" }), da = typeof process < "u" && process.env?.PACKAGE_VERSION !== void 0 ? process.env.PACKAGE_VERSION : "?", fa = 50, pa = /password|passwd|pwd|token|secret|authorization|\bauth\b|bearer|oauth|credentials?|cookie|api[-_]?key|private[-_]?key|session|csrf|xsrf|\bpin\b|\bssn\b|card[-_]?number|\bcvv\b/i;
|
|
3208
|
+
function ma(e, t = !1) {
|
|
3209
|
+
return pe(e, t, pa);
|
|
3210
|
+
}
|
|
3211
|
+
var ha = 1e3, ga = 100, _a = 100, va = {
|
|
3212
|
+
"setup function": "setup",
|
|
3213
|
+
"render function": "render",
|
|
3214
|
+
"component update": "render",
|
|
3215
|
+
"watcher getter": "watcher",
|
|
3216
|
+
"watcher callback": "watcher",
|
|
3217
|
+
"watcher cleanup function": "watcher",
|
|
3218
|
+
"native event handler": "event",
|
|
3219
|
+
"component event handler": "event",
|
|
3220
|
+
"beforeCreate hook": "lifecycle",
|
|
3221
|
+
"created hook": "lifecycle",
|
|
3222
|
+
"beforeMount hook": "lifecycle",
|
|
3223
|
+
"mounted hook": "lifecycle",
|
|
3224
|
+
"beforeUpdate hook": "lifecycle",
|
|
3225
|
+
"updated hook": "lifecycle",
|
|
3226
|
+
"beforeUnmount hook": "lifecycle",
|
|
3227
|
+
"unmounted hook": "lifecycle",
|
|
3228
|
+
"activated hook": "lifecycle",
|
|
3229
|
+
"deactivated hook": "lifecycle",
|
|
3230
|
+
"errorCaptured hook": "lifecycle",
|
|
3231
|
+
"renderTracked hook": "lifecycle",
|
|
3232
|
+
"renderTriggered hook": "lifecycle",
|
|
3233
|
+
"serverPrefetch hook": "lifecycle",
|
|
3234
|
+
"vnode hook": "lifecycle",
|
|
3235
|
+
"directive hook": "lifecycle",
|
|
3236
|
+
"transition hook": "lifecycle",
|
|
3237
|
+
"ref function": "setup",
|
|
3238
|
+
"async component loader": "setup",
|
|
3239
|
+
"scheduler flush": "render",
|
|
3240
|
+
"app errorHandler": "lifecycle",
|
|
3241
|
+
"app warnHandler": "lifecycle",
|
|
3242
|
+
"app unmount cleanup function": "lifecycle",
|
|
3243
|
+
0: "setup",
|
|
3244
|
+
1: "render",
|
|
3245
|
+
2: "watcher",
|
|
3246
|
+
3: "watcher",
|
|
3247
|
+
4: "watcher",
|
|
3248
|
+
5: "event",
|
|
3249
|
+
6: "event",
|
|
3250
|
+
7: "lifecycle",
|
|
3251
|
+
8: "lifecycle",
|
|
3252
|
+
9: "lifecycle",
|
|
3253
|
+
10: "lifecycle",
|
|
3254
|
+
11: "lifecycle",
|
|
3255
|
+
12: "setup",
|
|
3256
|
+
13: "setup",
|
|
3257
|
+
14: "render",
|
|
3258
|
+
15: "render",
|
|
3259
|
+
16: "lifecycle",
|
|
3260
|
+
sp: "lifecycle",
|
|
3261
|
+
bc: "lifecycle",
|
|
3262
|
+
c: "lifecycle",
|
|
3263
|
+
bm: "lifecycle",
|
|
3264
|
+
m: "lifecycle",
|
|
3265
|
+
bu: "lifecycle",
|
|
3266
|
+
u: "lifecycle",
|
|
3267
|
+
bum: "lifecycle",
|
|
3268
|
+
um: "lifecycle",
|
|
3269
|
+
a: "lifecycle",
|
|
3270
|
+
da: "lifecycle",
|
|
3271
|
+
ec: "lifecycle",
|
|
3272
|
+
rtc: "lifecycle",
|
|
3273
|
+
rtg: "lifecycle"
|
|
3274
|
+
};
|
|
3275
|
+
function $(e) {
|
|
3276
|
+
if (!e) return "AnonymousComponent";
|
|
3277
|
+
let t = e.$options;
|
|
3278
|
+
return t.__name || t.name || "AnonymousComponent";
|
|
3279
|
+
}
|
|
3280
|
+
function ya(e) {
|
|
3281
|
+
let t = [], n = e;
|
|
3282
|
+
for (; n && t.length < fa;) t.push($(n)), n = n.$parent;
|
|
3283
|
+
return t;
|
|
3284
|
+
}
|
|
3285
|
+
function ba(e, t, n = pa) {
|
|
3286
|
+
return oe(e, {
|
|
3287
|
+
mode: "display",
|
|
3288
|
+
maxDepth: t,
|
|
3289
|
+
arrayCap: ga,
|
|
3290
|
+
objectKeyCap: _a,
|
|
3291
|
+
stringCap: ha,
|
|
3292
|
+
denylist: n
|
|
3293
|
+
});
|
|
3294
|
+
}
|
|
3295
|
+
function xa(e, t) {
|
|
3296
|
+
let n = [], r = e;
|
|
3297
|
+
for (; r && n.length < fa;) {
|
|
3298
|
+
let e = r.$options, i = {
|
|
3299
|
+
component: $(r),
|
|
3300
|
+
file: e.__file ?? null
|
|
3301
|
+
};
|
|
3302
|
+
t.attachProps && r.$props && (i.props = ba(r.$props, t.propsMaxDepth, t.propsDenylist)), n.push(i), r = r.$parent;
|
|
3303
|
+
}
|
|
3304
|
+
return n;
|
|
3305
|
+
}
|
|
3306
|
+
function Sa(e) {
|
|
3307
|
+
return va[e] ?? "unknown";
|
|
3308
|
+
}
|
|
3309
|
+
var Ca = 2;
|
|
3310
|
+
function wa(e) {
|
|
3311
|
+
return typeof e == "string" ? e : typeof e == "symbol" ? e.toString() : null;
|
|
3312
|
+
}
|
|
3313
|
+
function Ta(e) {
|
|
3314
|
+
return Array.isArray(e) ? e.map((e) => !e || typeof e != "object" ? "unknown" : wa(e.name) ?? "unknown") : [];
|
|
3315
|
+
}
|
|
3316
|
+
function Ea(e) {
|
|
3317
|
+
return !e || typeof e != "object" ? {} : e;
|
|
3318
|
+
}
|
|
3319
|
+
function Da(e, t = {}) {
|
|
3320
|
+
if (!e || typeof e != "object" || !("currentRoute" in e)) return null;
|
|
3321
|
+
let n = e.currentRoute;
|
|
3322
|
+
if (!n || typeof n != "object" || !("value" in n)) return null;
|
|
3323
|
+
let r = n.value;
|
|
3324
|
+
if (!r || typeof r != "object") return null;
|
|
3325
|
+
let i = r, a = t.denylist ?? pa, o = he(Ea(i.params), a), s = he(Ea(i.query), a);
|
|
3326
|
+
return {
|
|
3327
|
+
name: wa(i.name),
|
|
3328
|
+
path: typeof i.path == "string" ? i.path : "",
|
|
3329
|
+
fullPath: typeof i.fullPath == "string" ? v(i.fullPath, a) : "",
|
|
3330
|
+
params: ba(o, Ca, a),
|
|
3331
|
+
query: ba(s, Ca, a),
|
|
3332
|
+
hash: typeof i.hash == "string" ? i.hash : "",
|
|
3333
|
+
matched: Ta(i.matched)
|
|
3334
|
+
};
|
|
3335
|
+
}
|
|
3336
|
+
var Oa = ne({
|
|
3337
|
+
sdkName: "@flareapp/vue",
|
|
3338
|
+
sdkVersion: da,
|
|
3339
|
+
frameworkName: De.Vue
|
|
3340
|
+
});
|
|
3341
|
+
function ka(e) {
|
|
3342
|
+
Oa.registerSdkIdentity(e);
|
|
3343
|
+
}
|
|
3344
|
+
function Aa(e, t) {
|
|
3345
|
+
Oa.tagFramework(e, t);
|
|
3346
|
+
}
|
|
3347
|
+
var ja = Symbol("flareComponentProfile");
|
|
3348
|
+
function Ma(e) {
|
|
3349
|
+
for (let t = e.parent; t; t = t.parent) {
|
|
3350
|
+
let e = t[ja];
|
|
3351
|
+
if (e) return e.marker;
|
|
3352
|
+
}
|
|
3353
|
+
return null;
|
|
3354
|
+
}
|
|
3355
|
+
function Na(e) {
|
|
3356
|
+
return {
|
|
3357
|
+
beforeMount() {
|
|
3358
|
+
try {
|
|
3359
|
+
let t = ta();
|
|
3360
|
+
if (!t) return;
|
|
3361
|
+
let n = $(this);
|
|
3362
|
+
if (!e(n)) return;
|
|
3363
|
+
let r = this.$, i = na(Ma(r), t) ?? t, a = ea(i.traceId);
|
|
3364
|
+
if (!a) return;
|
|
3365
|
+
r[ja] = {
|
|
3366
|
+
marker: {
|
|
3367
|
+
traceId: i.traceId,
|
|
3368
|
+
parentSpanId: a
|
|
3369
|
+
},
|
|
3370
|
+
pending: {
|
|
3371
|
+
name: n,
|
|
3372
|
+
spanId: a,
|
|
3373
|
+
startNano: $i(),
|
|
3374
|
+
parent: i
|
|
3375
|
+
}
|
|
3376
|
+
};
|
|
3377
|
+
} catch {}
|
|
3378
|
+
},
|
|
3379
|
+
mounted() {
|
|
3380
|
+
try {
|
|
3381
|
+
let e = this.$[ja], t = e?.pending;
|
|
3382
|
+
if (!e || !t) return;
|
|
3383
|
+
e.pending = null, ra({
|
|
3384
|
+
name: t.name,
|
|
3385
|
+
spanId: t.spanId,
|
|
3386
|
+
parent: t.parent,
|
|
3387
|
+
startTimeUnixNano: t.startNano,
|
|
3388
|
+
endTimeUnixNano: $i()
|
|
3389
|
+
});
|
|
3390
|
+
} catch {}
|
|
3391
|
+
}
|
|
3392
|
+
};
|
|
3393
|
+
}
|
|
3394
|
+
var Pa = 8;
|
|
3395
|
+
function Fa(e) {
|
|
3396
|
+
return Ia(e) ? Dr(e, (t) => La(e, t)) : () => {};
|
|
3397
|
+
}
|
|
3398
|
+
function Ia(e) {
|
|
3399
|
+
return typeof e != "object" || !e ? !1 : "beforeEach" in e && typeof e.beforeEach == "function" && "afterEach" in e && typeof e.afterEach == "function";
|
|
3400
|
+
}
|
|
3401
|
+
function La(e, t) {
|
|
3402
|
+
let n = dn();
|
|
3403
|
+
t(() => n.unregister());
|
|
3404
|
+
function r(e) {
|
|
3405
|
+
return rn(() => e.matched?.[e.matched.length - 1]?.path, e.path, i(e));
|
|
3406
|
+
}
|
|
3407
|
+
function i(t) {
|
|
3408
|
+
let n = t.fullPath ?? t.path;
|
|
3409
|
+
if (n) return an(() => e.resolve?.(n)?.href, n);
|
|
3410
|
+
}
|
|
3411
|
+
function a(e) {
|
|
3412
|
+
return !e || !e.matched || e.matched.length === 0;
|
|
3413
|
+
}
|
|
3414
|
+
let o = !1, s = !1;
|
|
3415
|
+
try {
|
|
3416
|
+
let t = e.currentRoute?.value;
|
|
3417
|
+
t && t.matched && t.matched.length > 0 && (n.setActiveRouteName(r(t)), o = !0);
|
|
3418
|
+
} catch {}
|
|
3419
|
+
t(e.beforeEach(wr((e, t) => {
|
|
3420
|
+
if (!o && a(t)) {
|
|
3421
|
+
n.setActiveRouteName(r(e));
|
|
3422
|
+
return;
|
|
3423
|
+
}
|
|
3424
|
+
e.fullPath && t?.fullPath && e.fullPath === t.fullPath || (s || (s = !0, n.startNavigation({
|
|
3425
|
+
path: e.path,
|
|
3426
|
+
url: i(e),
|
|
3427
|
+
hold: !0
|
|
3428
|
+
})), n.setActiveRouteName(r(e)));
|
|
3429
|
+
}))), t(e.afterEach(wr((e, t, i) => {
|
|
3430
|
+
if (!o && a(t)) {
|
|
3431
|
+
i || (o = !0, n.setActiveRouteName(r(e)));
|
|
3432
|
+
return;
|
|
3433
|
+
}
|
|
3434
|
+
if (s) {
|
|
3435
|
+
if (!i) {
|
|
3436
|
+
s = !1, n.settleNavigation(r(e));
|
|
3437
|
+
return;
|
|
3438
|
+
}
|
|
3439
|
+
i.type !== Pa && (s = !1, n.settleNavigation(r(t)));
|
|
3440
|
+
}
|
|
3441
|
+
}))), typeof e.onError == "function" && t(e.onError(wr(() => {
|
|
3442
|
+
if (!s) return;
|
|
3443
|
+
s = !1;
|
|
3444
|
+
let t = e.currentRoute?.value;
|
|
3445
|
+
n.settleNavigation(t ? r(t) : {
|
|
3446
|
+
name: "",
|
|
3447
|
+
source: "url"
|
|
3448
|
+
});
|
|
3449
|
+
})));
|
|
3450
|
+
}
|
|
3451
|
+
function Ra(e) {
|
|
3452
|
+
let t = {
|
|
3453
|
+
info: e.vue.info,
|
|
3454
|
+
errorOrigin: e.vue.errorOrigin,
|
|
3455
|
+
componentName: e.vue.componentName,
|
|
3456
|
+
componentHierarchy: e.vue.componentHierarchy,
|
|
3457
|
+
componentHierarchyFrames: e.vue.componentHierarchyFrames
|
|
3458
|
+
};
|
|
3459
|
+
return e.vue.componentProps && (t.componentProps = e.vue.componentProps), e.vue.route && (t.route = e.vue.route), xe("vue", t);
|
|
3460
|
+
}
|
|
3461
|
+
function za(e) {
|
|
3462
|
+
let t = {
|
|
3463
|
+
type: e.vue.type,
|
|
3464
|
+
info: e.vue.info,
|
|
3465
|
+
componentName: e.vue.componentName,
|
|
3466
|
+
componentTrace: e.vue.componentTrace
|
|
3467
|
+
};
|
|
3468
|
+
return e.vue.route && (t.route = e.vue.route), xe("vue", t);
|
|
3469
|
+
}
|
|
3470
|
+
var Ba = /* @__PURE__ */ new WeakSet(), Va = (e, t) => {
|
|
3471
|
+
if (Ba.has(e)) return;
|
|
3472
|
+
let n = ua(t?.flare);
|
|
3473
|
+
Ba.add(e), t?.flare || ka(n), Aa(n, e.version);
|
|
3474
|
+
let r = t?.attachProps ?? !1, i = t?.propsMaxDepth ?? 2, a = ma(t?.propsDenylist, t?.replaceDefaultDenylist), o = e.config.errorHandler;
|
|
3475
|
+
if (e.config.errorHandler = (s, c, l) => {
|
|
3476
|
+
let u = te(s);
|
|
3477
|
+
t?.beforeEvaluate?.({
|
|
3478
|
+
error: u,
|
|
3479
|
+
instance: c,
|
|
3480
|
+
info: l
|
|
3481
|
+
});
|
|
3482
|
+
let d = Sa(l), f = $(c), ee = r && c?.$props ? ba(c.$props, i, a) : void 0, ne = ya(c), re = xa(c, {
|
|
3483
|
+
attachProps: r,
|
|
3484
|
+
propsMaxDepth: i,
|
|
3485
|
+
propsDenylist: a
|
|
3486
|
+
}), ie = Da(e.config.globalProperties.$router, { denylist: a }), p = { vue: {
|
|
3487
|
+
info: l,
|
|
3488
|
+
errorOrigin: d,
|
|
3489
|
+
componentName: f,
|
|
3490
|
+
...ee && { componentProps: ee },
|
|
3491
|
+
componentHierarchy: ne,
|
|
3492
|
+
componentHierarchyFrames: re,
|
|
3493
|
+
...ie && { route: ie }
|
|
3494
|
+
} }, m = t?.beforeSubmit?.({
|
|
3495
|
+
error: u,
|
|
3496
|
+
instance: c,
|
|
3497
|
+
info: l,
|
|
3498
|
+
context: p
|
|
3499
|
+
}) ?? p;
|
|
3500
|
+
if (n.reportSilently(u, Ra(m)), t?.afterSubmit?.({
|
|
3501
|
+
error: u,
|
|
3502
|
+
instance: c,
|
|
3503
|
+
info: l,
|
|
3504
|
+
context: m
|
|
3505
|
+
}), typeof o == "function") {
|
|
3506
|
+
o(s, c, l);
|
|
3507
|
+
return;
|
|
3508
|
+
}
|
|
3509
|
+
console.error(s);
|
|
3510
|
+
}, t?.captureWarnings) {
|
|
3511
|
+
let t = e.config.warnHandler;
|
|
3512
|
+
e.config.warnHandler = (r, i, o) => {
|
|
3513
|
+
let s = $(i), c = Da(e.config.globalProperties.$router, { denylist: a }), l = { vue: {
|
|
3514
|
+
type: "warning",
|
|
3515
|
+
info: r,
|
|
3516
|
+
componentName: s,
|
|
3517
|
+
componentTrace: o,
|
|
3518
|
+
...c && { route: c }
|
|
3519
|
+
} };
|
|
3520
|
+
Promise.resolve(n.reportMessage(r, "warning", za(l))).catch(() => {}), typeof t == "function" && t(r, i, o);
|
|
3521
|
+
};
|
|
3522
|
+
}
|
|
3523
|
+
if (t?.router) try {
|
|
3524
|
+
let n = Fa(t.router);
|
|
3525
|
+
typeof e.onUnmount == "function" && e.onUnmount(n);
|
|
3526
|
+
} catch {}
|
|
3527
|
+
let s = t?.profileComponents;
|
|
3528
|
+
if (s === !0 || Array.isArray(s) && s.length > 0) try {
|
|
3529
|
+
e.mixin(Na(ee(s)));
|
|
3530
|
+
} catch {}
|
|
3531
|
+
};
|
|
3532
|
+
//#endregion
|
|
3533
|
+
//#region node_modules/@flareapp/vue/dist/index.mjs
|
|
3534
|
+
r({
|
|
3535
|
+
name: "FlareErrorBoundary",
|
|
3536
|
+
props: {
|
|
3537
|
+
flare: {
|
|
3538
|
+
type: Object,
|
|
3539
|
+
default: void 0
|
|
3540
|
+
},
|
|
3541
|
+
beforeEvaluate: {
|
|
3542
|
+
type: Function,
|
|
3543
|
+
default: void 0
|
|
3544
|
+
},
|
|
3545
|
+
beforeSubmit: {
|
|
3546
|
+
type: Function,
|
|
3547
|
+
default: void 0
|
|
3548
|
+
},
|
|
3549
|
+
afterSubmit: {
|
|
3550
|
+
type: Function,
|
|
3551
|
+
default: void 0
|
|
3552
|
+
},
|
|
3553
|
+
onReset: {
|
|
3554
|
+
type: Function,
|
|
3555
|
+
default: void 0
|
|
3556
|
+
},
|
|
3557
|
+
resetKeys: {
|
|
3558
|
+
type: Array,
|
|
3559
|
+
default: void 0
|
|
3560
|
+
},
|
|
3561
|
+
attachProps: {
|
|
3562
|
+
type: Boolean,
|
|
3563
|
+
default: !1
|
|
3564
|
+
},
|
|
3565
|
+
propsMaxDepth: {
|
|
3566
|
+
type: Number,
|
|
3567
|
+
default: 2
|
|
3568
|
+
},
|
|
3569
|
+
propsDenylist: {
|
|
3570
|
+
type: RegExp,
|
|
3571
|
+
default: void 0
|
|
3572
|
+
},
|
|
3573
|
+
replaceDefaultDenylist: {
|
|
3574
|
+
type: Boolean,
|
|
3575
|
+
default: !1
|
|
3576
|
+
}
|
|
3577
|
+
},
|
|
3578
|
+
setup(e, { slots: t }) {
|
|
3579
|
+
let r = ua(e.flare);
|
|
3580
|
+
Aa(r, i()?.appContext.app.version);
|
|
3581
|
+
let s = i(), c = o(null), l = o(void 0), u = o([]), d = o([]), f = () => {
|
|
3582
|
+
e.onReset?.(c.value), c.value = null, l.value = void 0, u.value = [], d.value = [];
|
|
3583
|
+
};
|
|
3584
|
+
return a(() => e.resetKeys, (e, t) => {
|
|
3585
|
+
if (c.value === null || !e || !t) return;
|
|
3586
|
+
let n = t.length !== e.length, r = e.some((e, n) => !Object.is(e, t[n]));
|
|
3587
|
+
(n || r) && f();
|
|
3588
|
+
}), n((t, n, i) => {
|
|
3589
|
+
let a = te(t);
|
|
3590
|
+
e.beforeEvaluate?.({
|
|
3591
|
+
error: a,
|
|
3592
|
+
instance: n,
|
|
3593
|
+
info: i
|
|
3594
|
+
});
|
|
3595
|
+
let o = ma(e.propsDenylist, e.replaceDefaultDenylist), f = ya(n), ee = xa(n, {
|
|
3596
|
+
attachProps: e.attachProps,
|
|
3597
|
+
propsMaxDepth: e.propsMaxDepth,
|
|
3598
|
+
propsDenylist: o
|
|
3599
|
+
}), ne = $(n);
|
|
3600
|
+
c.value = a;
|
|
3601
|
+
let re = e.attachProps && n?.$props ? ba(n.$props, e.propsMaxDepth, o) : void 0, ie = Sa(i), p = Da(s?.appContext.config.globalProperties.$router, { denylist: o }), m = { vue: {
|
|
3602
|
+
info: i,
|
|
3603
|
+
errorOrigin: ie,
|
|
3604
|
+
...p && { route: p },
|
|
3605
|
+
componentName: ne,
|
|
3606
|
+
...re && { componentProps: re },
|
|
3607
|
+
componentHierarchy: f,
|
|
3608
|
+
componentHierarchyFrames: ee
|
|
3609
|
+
} }, h = e.beforeSubmit?.({
|
|
3610
|
+
error: a,
|
|
3611
|
+
instance: n,
|
|
3612
|
+
info: i,
|
|
3613
|
+
context: m
|
|
3614
|
+
}) ?? m;
|
|
3615
|
+
return l.value = h.vue.componentProps, u.value = h.vue.componentHierarchy, d.value = h.vue.componentHierarchyFrames, r.reportSilently(a, Ra(h)), e.afterSubmit?.({
|
|
3616
|
+
error: a,
|
|
3617
|
+
instance: n,
|
|
3618
|
+
info: i,
|
|
3619
|
+
context: h
|
|
3620
|
+
}), !1;
|
|
3621
|
+
}), () => c.value === null ? t.default?.() : t.fallback ? t.fallback({
|
|
3622
|
+
error: c.value,
|
|
3623
|
+
...l.value && { componentProps: l.value },
|
|
3624
|
+
componentHierarchy: u.value,
|
|
3625
|
+
componentHierarchyFrames: d.value,
|
|
3626
|
+
resetErrorBoundary: f
|
|
3627
|
+
}) : null;
|
|
3628
|
+
}
|
|
3629
|
+
}), la(() => sa);
|
|
3630
|
+
//#endregion
|
|
3631
|
+
export { Va as t };
|