@odus/checkout 0.27.0-beta.0 → 0.27.1
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/{Alert-BSp9Cg9-.js → Alert-xum-l8Uv.js} +1092 -1565
- package/dist/checkout.es.js +99 -84
- package/dist/elements.es.js +13 -12
- package/dist/index.css +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/checkout.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as en, a as Hn, f as Tt, d as qn, C as he, I as tn, g as Kn, S as Ft, b as gi, e as be, A as $n, P as Wn, E as Gn, h as Yn, i as Xn, j as Zn, k as Jn, l as Qn, F as es, m as ts, n as is } from "./Alert-
|
|
2
|
-
import { o as Co, p as Ao, q as Mo, r as _o, s as ko, t as
|
|
1
|
+
import { c as en, a as Hn, f as Tt, d as qn, C as he, I as tn, g as Kn, S as Ft, b as gi, e as be, A as $n, P as Wn, E as Gn, h as Yn, i as Xn, j as Zn, k as Jn, l as Qn, F as es, m as ts, n as is } from "./Alert-xum-l8Uv.js";
|
|
2
|
+
import { o as Co, p as Ao, q as Mo, r as _o, s as ko, t as No, u as Io, v as Oo } from "./Alert-xum-l8Uv.js";
|
|
3
3
|
const V = {
|
|
4
4
|
// Checkout lifecycle events
|
|
5
5
|
CHECKOUT_INITIALIZED: "checkout.initialized",
|
|
@@ -69,7 +69,7 @@ function os(i, e, t, n) {
|
|
|
69
69
|
let a = t.paused, l = [];
|
|
70
70
|
const c = (...w) => {
|
|
71
71
|
e.debug("Adding transports"), w.forEach((E) => {
|
|
72
|
-
if (e.debug(`Adding "${E.name}" transport`), r.some((
|
|
72
|
+
if (e.debug(`Adding "${E.name}" transport`), r.some((I) => I === E)) {
|
|
73
73
|
e.warn(`Transport ${E.name} is already added`);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
@@ -83,10 +83,10 @@ function os(i, e, t, n) {
|
|
|
83
83
|
}, p = (w) => {
|
|
84
84
|
let E = w;
|
|
85
85
|
for (const T of l) {
|
|
86
|
-
const
|
|
87
|
-
if (
|
|
86
|
+
const I = E.map(T).filter(Boolean);
|
|
87
|
+
if (I.length === 0)
|
|
88
88
|
return [];
|
|
89
|
-
E = ls(
|
|
89
|
+
E = ls(I, t);
|
|
90
90
|
}
|
|
91
91
|
return E;
|
|
92
92
|
}, g = (w) => {
|
|
@@ -99,11 +99,11 @@ function os(i, e, t, n) {
|
|
|
99
99
|
var E, T;
|
|
100
100
|
if (!((E = t.batching) === null || E === void 0) && E.enabled && r.every((R) => R.isBatched()))
|
|
101
101
|
return;
|
|
102
|
-
const [
|
|
103
|
-
if (
|
|
102
|
+
const [I] = p([w]);
|
|
103
|
+
if (I !== void 0)
|
|
104
104
|
for (const R of r)
|
|
105
105
|
e.debug(`Transporting item using ${R.name}
|
|
106
|
-
`,
|
|
106
|
+
`, I), R.isBatched() ? !((T = t.batching) === null || T === void 0) && T.enabled || R.send([I]) : R.send(I);
|
|
107
107
|
};
|
|
108
108
|
let u;
|
|
109
109
|
return !((s = t.batching) === null || s === void 0) && s.enabled && (u = new rs(g, {
|
|
@@ -273,7 +273,7 @@ function ws() {
|
|
|
273
273
|
function We(i = {}) {
|
|
274
274
|
return JSON.stringify(i ?? {}, ws());
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function Ie(i = {}) {
|
|
277
277
|
const e = {};
|
|
278
278
|
for (const [t, n] of Object.entries(i))
|
|
279
279
|
e[t] = X(n) && n !== null ? We(n) : String(n);
|
|
@@ -443,13 +443,13 @@ function ks(i) {
|
|
|
443
443
|
}
|
|
444
444
|
}), e;
|
|
445
445
|
}
|
|
446
|
-
const
|
|
446
|
+
const Ns = "faroApiCall", Is = "user_action_start", on = {
|
|
447
447
|
Normal: "normal"
|
|
448
448
|
}, Os = "faro.user.action";
|
|
449
|
-
var
|
|
449
|
+
var N;
|
|
450
450
|
(function(i) {
|
|
451
451
|
i[i.Started = 0] = "Started", i[i.Halted = 1] = "Halted", i[i.Cancelled = 2] = "Cancelled", i[i.Ended = 3] = "Ended";
|
|
452
|
-
})(
|
|
452
|
+
})(N || (N = {}));
|
|
453
453
|
class Ps {
|
|
454
454
|
constructor() {
|
|
455
455
|
this.buffer = [];
|
|
@@ -469,25 +469,25 @@ class Ps {
|
|
|
469
469
|
}
|
|
470
470
|
class xs extends U {
|
|
471
471
|
constructor({ name: e, parentId: t, trigger: n, transports: s, attributes: r, trackUserActionsExcludeItem: a, importance: l = on.Normal, pushEvent: c }) {
|
|
472
|
-
super(), this.name = e, this.attributes = r, this.id = ye(), this.trigger = n, this.parentId = t ?? this.id, this.trackUserActionsExcludeItem = a, this.importance = l, this._pushEvent = c, this._itemBuffer = new Ps(), this._transports = s, this._state =
|
|
472
|
+
super(), this.name = e, this.attributes = r, this.id = ye(), this.trigger = n, this.parentId = t ?? this.id, this.trackUserActionsExcludeItem = a, this.importance = l, this._pushEvent = c, this._itemBuffer = new Ps(), this._transports = s, this._state = N.Started, this._start();
|
|
473
473
|
}
|
|
474
474
|
addItem(e) {
|
|
475
|
-
return this._state ===
|
|
475
|
+
return this._state === N.Started ? (this._itemBuffer.addItem(e), !0) : !1;
|
|
476
476
|
}
|
|
477
477
|
_start() {
|
|
478
|
-
this._state =
|
|
478
|
+
this._state = N.Started, this._state === N.Started && (this.startTime = _e());
|
|
479
479
|
}
|
|
480
480
|
halt() {
|
|
481
|
-
this._state ===
|
|
481
|
+
this._state === N.Started && (this._state = N.Halted, this.notify(this._state));
|
|
482
482
|
}
|
|
483
483
|
cancel() {
|
|
484
|
-
this._state ===
|
|
484
|
+
this._state === N.Started && this._itemBuffer.flushBuffer(), this._state = N.Cancelled, this.notify(this._state);
|
|
485
485
|
}
|
|
486
486
|
end() {
|
|
487
|
-
if (this._state ===
|
|
487
|
+
if (this._state === N.Cancelled)
|
|
488
488
|
return;
|
|
489
489
|
const e = _e(), t = e - this.startTime;
|
|
490
|
-
this._state =
|
|
490
|
+
this._state = N.Ended, this._itemBuffer.flushBuffer((n) => {
|
|
491
491
|
if (Ds(n, this.trackUserActionsExcludeItem)) {
|
|
492
492
|
this._transports.execute(n);
|
|
493
493
|
return;
|
|
@@ -497,7 +497,7 @@ class xs extends U {
|
|
|
497
497
|
name: this.name
|
|
498
498
|
} }) });
|
|
499
499
|
this._transports.execute(s);
|
|
500
|
-
}), this._state =
|
|
500
|
+
}), this._state = N.Ended, this.notify(this._state), this._pushEvent(Os, Object.assign({ userActionName: this.name, userActionStartTime: this.startTime.toString(), userActionEndTime: e.toString(), userActionDuration: t.toString(), userActionTrigger: this.trigger, userActionImportance: this.importance }, Ie(this.attributes)), void 0, {
|
|
501
501
|
timestampOverwriteMs: this.startTime,
|
|
502
502
|
customPayloadTransformer: (n) => (n.action = {
|
|
503
503
|
id: this.id,
|
|
@@ -523,15 +523,15 @@ function Us({ transports: i, internalLogger: e, config: t, pushEvent: n }) {
|
|
|
523
523
|
name: p,
|
|
524
524
|
transports: i,
|
|
525
525
|
attributes: g,
|
|
526
|
-
trigger: o?.triggerName ||
|
|
526
|
+
trigger: o?.triggerName || Ns,
|
|
527
527
|
importance: o?.importance || on.Normal,
|
|
528
528
|
trackUserActionsExcludeItem: r,
|
|
529
529
|
pushEvent: n
|
|
530
530
|
});
|
|
531
|
-
return d.filter((h) => [
|
|
531
|
+
return d.filter((h) => [N.Ended, N.Cancelled].includes(h)).first().subscribe(() => {
|
|
532
532
|
a = void 0;
|
|
533
533
|
}), ln.notify({
|
|
534
|
-
type:
|
|
534
|
+
type: Is,
|
|
535
535
|
userAction: d
|
|
536
536
|
}), a = d, a;
|
|
537
537
|
} else {
|
|
@@ -545,14 +545,14 @@ function Us({ transports: i, internalLogger: e, config: t, pushEvent: n }) {
|
|
|
545
545
|
};
|
|
546
546
|
}
|
|
547
547
|
function ht(i, e) {
|
|
548
|
-
return !i || i?.getState() !==
|
|
548
|
+
return !i || i?.getState() !== N.Started ? !1 : (i.addItem(e), !0);
|
|
549
549
|
}
|
|
550
550
|
function Rs({ internalLogger: i, config: e, metas: t, transports: n, tracesApi: s, userActionsApi: r }) {
|
|
551
551
|
let a = null;
|
|
552
552
|
return {
|
|
553
553
|
pushEvent: (c, m, p, { skipDedupe: g, spanContext: o, timestampOverwriteMs: u, customPayloadTransformer: d = (h) => h } = {}) => {
|
|
554
554
|
try {
|
|
555
|
-
const h =
|
|
555
|
+
const h = Ie(m), f = {
|
|
556
556
|
meta: t.value,
|
|
557
557
|
payload: d({
|
|
558
558
|
name: c,
|
|
@@ -598,7 +598,7 @@ function Bs({ internalLogger: i, config: e, metas: t, transports: n, tracesApi:
|
|
|
598
598
|
}, m = () => de, { ignoreErrors: p = [], preserveOriginalError: g } = e, o = (u, { skipDedupe: d, stackFrames: h, type: f, context: b, spanContext: S, timestampOverwriteMs: v, originalError: y } = {}) => {
|
|
599
599
|
if (!zs(p, y ?? u))
|
|
600
600
|
try {
|
|
601
|
-
const w =
|
|
601
|
+
const w = Ie(Object.assign(Object.assign({}, js(y ?? u)), b ?? {})), E = {
|
|
602
602
|
meta: t.value,
|
|
603
603
|
payload: Object.assign(Object.assign({ type: f || u.name || dn, value: u.message, timestamp: v ? ct(v) : dt(), trace: S ? {
|
|
604
604
|
trace_id: S.traceId,
|
|
@@ -655,7 +655,7 @@ function Vs({ internalLogger: i, config: e, metas: t, transports: n, tracesApi:
|
|
|
655
655
|
return {
|
|
656
656
|
pushLog: (p, { context: g, level: o, skipDedupe: u, spanContext: d, timestampOverwriteMs: h } = {}) => {
|
|
657
657
|
try {
|
|
658
|
-
const f =
|
|
658
|
+
const f = Ie(g), b = {
|
|
659
659
|
type: x.LOG,
|
|
660
660
|
payload: {
|
|
661
661
|
message: c(p),
|
|
@@ -693,7 +693,7 @@ function Hs({ internalLogger: i, config: e, metas: t, transports: n, tracesApi:
|
|
|
693
693
|
return {
|
|
694
694
|
pushMeasurement: (c, { skipDedupe: m, context: p, spanContext: g, timestampOverwriteMs: o } = {}) => {
|
|
695
695
|
try {
|
|
696
|
-
const u =
|
|
696
|
+
const u = Ie(p), d = {
|
|
697
697
|
type: x.MEASUREMENT,
|
|
698
698
|
payload: Object.assign(Object.assign({}, c), { trace: g ? {
|
|
699
699
|
trace_id: g.traceId,
|
|
@@ -957,7 +957,7 @@ var Ve = { exports: {} }, or = Ve.exports, Si;
|
|
|
957
957
|
function lr() {
|
|
958
958
|
return Si || (Si = 1, function(i, e) {
|
|
959
959
|
(function(t, n) {
|
|
960
|
-
var s = "1.0.41", r = "", a = "?", l = "function", c = "undefined", m = "object", p = "string", g = "major", o = "model", u = "name", d = "type", h = "vendor", f = "version", b = "architecture", S = "console", v = "mobile", y = "tablet", w = "smarttv", E = "wearable", T = "embedded",
|
|
960
|
+
var s = "1.0.41", r = "", a = "?", l = "function", c = "undefined", m = "object", p = "string", g = "major", o = "model", u = "name", d = "type", h = "vendor", f = "version", b = "architecture", S = "console", v = "mobile", y = "tablet", w = "smarttv", E = "wearable", T = "embedded", I = 500, R = "Amazon", Q = "Apple", Ee = "ASUS", Se = "BlackBerry", re = "Browser", $ = "Chrome", xe = "Edge", ae = "Firefox", oe = "Google", De = "Honor", fe = "Huawei", j = "Lenovo", ge = "LG", le = "Microsoft", we = "Motorola", bt = "Nvidia", ai = "OnePlus", Ue = "Opera", vt = "OPPO", Re = "Samsung", oi = "Sharp", Le = "Sony", yt = "Xiaomi", Et = "Zebra", li = "Facebook", di = "Chromium OS", ci = "Mac OS", ui = " Browser", jn = function(A, M) {
|
|
961
961
|
var C = {};
|
|
962
962
|
for (var k in A)
|
|
963
963
|
M[k] && M[k].length % 2 === 0 ? C[k] = M[k].concat(A[k]) : C[k] = A[k];
|
|
@@ -974,7 +974,7 @@ function lr() {
|
|
|
974
974
|
return typeof A === p ? A.replace(/[^\d\.]/g, r).split(".")[0] : n;
|
|
975
975
|
}, St = function(A, M) {
|
|
976
976
|
if (typeof A === p)
|
|
977
|
-
return A = A.replace(/^\s\s*/, r), typeof M === c ? A : A.substring(0,
|
|
977
|
+
return A = A.replace(/^\s\s*/, r), typeof M === c ? A : A.substring(0, I);
|
|
978
978
|
}, je = function(A, M) {
|
|
979
979
|
for (var C = 0, k, ee, W, _, F, G; C < M.length && !F; ) {
|
|
980
980
|
var wt = M[C], fi = M[C + 1];
|
|
@@ -2260,7 +2260,7 @@ function lr() {
|
|
|
2260
2260
|
}, this.getUA = function() {
|
|
2261
2261
|
return k;
|
|
2262
2262
|
}, this.setUA = function(F) {
|
|
2263
|
-
return k = typeof F === p && F.length >
|
|
2263
|
+
return k = typeof F === p && F.length > I ? St(F, I) : F, this;
|
|
2264
2264
|
}, this.setUA(k), this;
|
|
2265
2265
|
};
|
|
2266
2266
|
z.VERSION = s, z.BROWSER = Ye([u, f, g]), z.CPU = Ye([b]), z.DEVICE = Ye([o, h, d, S, v, w, y, E, T]), z.ENGINE = z.OS = Ye([u, f]), i.exports && (e = i.exports = z), e.UAParser = z;
|
|
@@ -2584,7 +2584,7 @@ function Cr(i) {
|
|
|
2584
2584
|
return [(t = n?.[2]) !== null && t !== void 0 ? t : i, s];
|
|
2585
2585
|
}
|
|
2586
2586
|
const wi = `
|
|
2587
|
-
`, Ar = "eval", Mr = "?", Ti = "@", _r = /^\s*at (?:(?![a-z]+:\/\/)([^(]+?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, kr = /\((\S*)(?::(\d+))(?::(\d+))\)/,
|
|
2587
|
+
`, Ar = "eval", Mr = "?", Ti = "@", _r = /^\s*at (?:(?![a-z]+:\/\/)([^(]+?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, kr = /\((\S*)(?::(\d+))(?::(\d+))\)/, Nr = "eval", Tn = "address at ", Ir = Tn.length, Or = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, Pr = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, xr = " > eval", Fi = "safari-extension", Ci = "safari-web-extension", Dr = /Minified React error #\d+;/i;
|
|
2588
2588
|
function Fn(i, e, t, n) {
|
|
2589
2589
|
const s = {
|
|
2590
2590
|
filename: i || document.location.href,
|
|
@@ -2605,11 +2605,11 @@ function zt(i) {
|
|
|
2605
2605
|
const t = e.reduce((n, s, r) => {
|
|
2606
2606
|
let a, l, c, m, p;
|
|
2607
2607
|
if (a = _r.exec(s)) {
|
|
2608
|
-
if (l = a[1], c = a[2], m = a[3], p = a[4], c?.startsWith(
|
|
2608
|
+
if (l = a[1], c = a[2], m = a[3], p = a[4], c?.startsWith(Nr)) {
|
|
2609
2609
|
const g = kr.exec(c);
|
|
2610
2610
|
g && (c = g[1], m = g[2], p = g[3]);
|
|
2611
2611
|
}
|
|
2612
|
-
c = c?.startsWith(Tn) ? c.substring(
|
|
2612
|
+
c = c?.startsWith(Tn) ? c.substring(Ir) : c, [l, c] = Ai(l, c);
|
|
2613
2613
|
} else if (a = Or.exec(s)) {
|
|
2614
2614
|
if (l = a[1], c = a[3], m = a[4], p = a[5], c && c.includes(xr)) {
|
|
2615
2615
|
const g = Pr.exec(c);
|
|
@@ -2794,7 +2794,7 @@ const kn = () => _n, Pe = (i) => {
|
|
|
2794
2794
|
const t = Oe();
|
|
2795
2795
|
let n = "navigate";
|
|
2796
2796
|
return kn() >= 0 ? n = "back-forward-cache" : t && (document.prerendering || Ge() > 0 ? n = "prerender" : document.wasDiscarded ? n = "restore" : t.type && (n = t.type.replace(/_/g, "-"))), { name: i, value: e, rating: "good", delta: 0, entries: [], id: `v5-${Date.now()}-${Math.floor(8999999999999 * Math.random()) + 1e12}`, navigationType: n };
|
|
2797
|
-
},
|
|
2797
|
+
}, Ne = (i, e, t = {}) => {
|
|
2798
2798
|
try {
|
|
2799
2799
|
if (PerformanceObserver.supportedEntryTypes.includes(i)) {
|
|
2800
2800
|
const n = new PerformanceObserver((s) => {
|
|
@@ -2813,9 +2813,9 @@ const kn = () => _n, Pe = (i) => {
|
|
|
2813
2813
|
};
|
|
2814
2814
|
};
|
|
2815
2815
|
let Ae = -1;
|
|
2816
|
-
const
|
|
2816
|
+
const Nn = /* @__PURE__ */ new Set(), ki = () => document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0, Vt = (i) => {
|
|
2817
2817
|
if (document.visibilityState === "hidden") {
|
|
2818
|
-
if (i.type === "visibilitychange") for (const e of
|
|
2818
|
+
if (i.type === "visibilitychange") for (const e of Nn) e();
|
|
2819
2819
|
isFinite(Ae) || (Ae = i.type === "visibilitychange" ? i.timeStamp : 0, removeEventListener("prerenderingchange", Vt, !0));
|
|
2820
2820
|
}
|
|
2821
2821
|
}, ft = () => {
|
|
@@ -2830,24 +2830,24 @@ const In = /* @__PURE__ */ new Set(), ki = () => document.visibilityState !== "h
|
|
|
2830
2830
|
return { get firstHiddenTime() {
|
|
2831
2831
|
return Ae;
|
|
2832
2832
|
}, onHidden(i) {
|
|
2833
|
-
|
|
2833
|
+
Nn.add(i);
|
|
2834
2834
|
} };
|
|
2835
2835
|
}, gt = (i) => {
|
|
2836
2836
|
document.prerendering ? addEventListener("prerenderingchange", () => i(), !0) : i();
|
|
2837
|
-
},
|
|
2837
|
+
}, Ni = [1800, 3e3], In = (i, e = {}) => {
|
|
2838
2838
|
gt(() => {
|
|
2839
2839
|
const t = ft();
|
|
2840
2840
|
let n, s = J("FCP");
|
|
2841
|
-
const r =
|
|
2841
|
+
const r = Ne("paint", (a) => {
|
|
2842
2842
|
for (const l of a) l.name === "first-contentful-paint" && (r.disconnect(), l.startTime < t.firstHiddenTime && (s.value = Math.max(l.startTime - Ge(), 0), s.entries.push(l), n(!0)));
|
|
2843
2843
|
});
|
|
2844
|
-
r && (n = Z(i, s,
|
|
2845
|
-
s = J("FCP"), n = Z(i, s,
|
|
2844
|
+
r && (n = Z(i, s, Ni, e.reportAllChanges), Pe((a) => {
|
|
2845
|
+
s = J("FCP"), n = Z(i, s, Ni, e.reportAllChanges), ii(() => {
|
|
2846
2846
|
s.value = performance.now() - a.timeStamp, n(!0);
|
|
2847
2847
|
});
|
|
2848
2848
|
}));
|
|
2849
2849
|
});
|
|
2850
|
-
},
|
|
2850
|
+
}, Ii = [0.1, 0.25], Oi = (i) => i.find((e) => e.node?.nodeType === 1) || i[0], zr = (i, e = {}) => {
|
|
2851
2851
|
const t = ke(e = Object.assign({}, e), _i), n = /* @__PURE__ */ new WeakMap();
|
|
2852
2852
|
t.t = (s) => {
|
|
2853
2853
|
if (s?.sources?.length) {
|
|
@@ -2859,16 +2859,16 @@ const In = /* @__PURE__ */ new Set(), ki = () => document.visibilityState !== "h
|
|
|
2859
2859
|
}
|
|
2860
2860
|
}, ((s, r = {}) => {
|
|
2861
2861
|
const a = ft();
|
|
2862
|
-
|
|
2862
|
+
In(ni(() => {
|
|
2863
2863
|
let l, c = J("CLS", 0);
|
|
2864
2864
|
const m = ke(r, _i), p = (o) => {
|
|
2865
2865
|
for (const u of o) m.u(u);
|
|
2866
2866
|
m.o > c.value && (c.value = m.o, c.entries = m.i, l());
|
|
2867
|
-
}, g =
|
|
2868
|
-
g && (l = Z(s, c,
|
|
2867
|
+
}, g = Ne("layout-shift", p);
|
|
2868
|
+
g && (l = Z(s, c, Ii, r.reportAllChanges), a.onHidden(() => {
|
|
2869
2869
|
p(g.takeRecords()), l(!0);
|
|
2870
2870
|
}), Pe(() => {
|
|
2871
|
-
m.o = 0, c = J("CLS", 0), l = Z(s, c,
|
|
2871
|
+
m.o = 0, c = J("CLS", 0), l = Z(s, c, Ii, r.reportAllChanges), ii(() => l());
|
|
2872
2872
|
}), setTimeout(l));
|
|
2873
2873
|
}));
|
|
2874
2874
|
})((s) => {
|
|
@@ -2886,7 +2886,7 @@ const In = /* @__PURE__ */ new Set(), ki = () => document.visibilityState !== "h
|
|
|
2886
2886
|
i(r);
|
|
2887
2887
|
}, e);
|
|
2888
2888
|
}, Vr = (i, e = {}) => {
|
|
2889
|
-
|
|
2889
|
+
In((t) => {
|
|
2890
2890
|
const n = ((s) => {
|
|
2891
2891
|
let r = { timeToFirstByte: 0, firstByteToFCP: s.value, loadState: ot(kn()) };
|
|
2892
2892
|
if (s.entries.length) {
|
|
@@ -2907,7 +2907,7 @@ const Hr = (i) => {
|
|
|
2907
2907
|
};
|
|
2908
2908
|
let Ht;
|
|
2909
2909
|
const Pi = () => Ht ? On : performance.interactionCount ?? 0, qr = () => {
|
|
2910
|
-
"interactionCount" in performance || Ht || (Ht =
|
|
2910
|
+
"interactionCount" in performance || Ht || (Ht = Ne("event", Hr, { type: "event", buffered: !0, durationThreshold: 0 }));
|
|
2911
2911
|
};
|
|
2912
2912
|
let xi = 0;
|
|
2913
2913
|
class Di {
|
|
@@ -2987,25 +2987,25 @@ const qt = (i) => {
|
|
|
2987
2987
|
}
|
|
2988
2988
|
return h;
|
|
2989
2989
|
}, o = (u) => {
|
|
2990
|
-
const d = u.entries[0], h = a.get(d), f = d.processingStart, b = Math.max(d.startTime + d.duration, f), S = Math.min(h.processingEnd, b), v = h.entries.sort((T,
|
|
2990
|
+
const d = u.entries[0], h = a.get(d), f = d.processingStart, b = Math.max(d.startTime + d.duration, f), S = Math.min(h.processingEnd, b), v = h.entries.sort((T, I) => T.processingStart - I.processingStart), y = g(d.startTime, S), w = t.h.get(d.interactionId), E = { interactionTarget: l.get(w), interactionType: d.name.startsWith("key") ? "keyboard" : "pointer", interactionTime: d.startTime, nextPaintTime: b, processedEventEntries: v, longAnimationFrameEntries: y, inputDelay: f - d.startTime, processingDuration: S - f, presentationDelay: b - S, loadState: ot(d.startTime), longestScript: void 0, totalScriptDuration: void 0, totalStyleAndLayoutDuration: void 0, totalPaintDuration: void 0, totalUnattributedDuration: void 0 };
|
|
2991
2991
|
return ((T) => {
|
|
2992
2992
|
if (!T.longAnimationFrameEntries?.length) return;
|
|
2993
|
-
const
|
|
2993
|
+
const I = T.interactionTime, R = T.inputDelay, Q = T.processingDuration;
|
|
2994
2994
|
let Ee, Se, re = 0, $ = 0, xe = 0, ae = 0;
|
|
2995
2995
|
for (const fe of T.longAnimationFrameEntries) {
|
|
2996
2996
|
$ = $ + fe.startTime + fe.duration - fe.styleAndLayoutStart;
|
|
2997
2997
|
for (const j of fe.scripts) {
|
|
2998
2998
|
const ge = j.startTime + j.duration;
|
|
2999
|
-
if (ge <
|
|
3000
|
-
const le = ge - Math.max(
|
|
3001
|
-
re += le - we, $ += we, le > ae && (Se = j.startTime <
|
|
2999
|
+
if (ge < I) continue;
|
|
3000
|
+
const le = ge - Math.max(I, j.startTime), we = j.duration ? le / j.duration * j.forcedStyleAndLayoutDuration : 0;
|
|
3001
|
+
re += le - we, $ += we, le > ae && (Se = j.startTime < I + R ? "input-delay" : j.startTime >= I + R + Q ? "presentation-delay" : "processing-duration", Ee = j, ae = le);
|
|
3002
3002
|
}
|
|
3003
3003
|
}
|
|
3004
3004
|
const oe = T.longAnimationFrameEntries.at(-1), De = oe ? oe.startTime + oe.duration : 0;
|
|
3005
|
-
De >=
|
|
3005
|
+
De >= I + R + Q && (xe = T.nextPaintTime - De), Ee && Se && (T.longestScript = { entry: Ee, subpart: Se, intersectingDuration: ae }), T.totalScriptDuration = re, T.totalStyleAndLayoutDuration = $, T.totalPaintDuration = xe, T.totalUnattributedDuration = T.nextPaintTime - I - re - $ - xe;
|
|
3006
3006
|
})(E), Object.assign(u, { attribution: E });
|
|
3007
3007
|
};
|
|
3008
|
-
|
|
3008
|
+
Ne("long-animation-frame", (u) => {
|
|
3009
3009
|
n = n.concat(u), m();
|
|
3010
3010
|
}), ((u, d = {}) => {
|
|
3011
3011
|
if (!globalThis.PerformanceEventTiming || !("interactionId" in PerformanceEventTiming.prototype)) return;
|
|
@@ -3019,7 +3019,7 @@ const qt = (i) => {
|
|
|
3019
3019
|
const E = S.M();
|
|
3020
3020
|
E && E.T !== b.value && (b.value = E.T, b.entries = E.entries, f());
|
|
3021
3021
|
});
|
|
3022
|
-
}, y =
|
|
3022
|
+
}, y = Ne("event", v, { durationThreshold: d.durationThreshold ?? 40 });
|
|
3023
3023
|
f = Z(u, b, Ui, d.reportAllChanges), y && (y.observe({ type: "first-input", buffered: !0 }), h.onHidden(() => {
|
|
3024
3024
|
v(y.takeRecords()), f(!0);
|
|
3025
3025
|
}), Pe(() => {
|
|
@@ -3052,7 +3052,7 @@ const Li = [2500, 4e3], $r = (i, e = {}) => {
|
|
|
3052
3052
|
const m = ke(r, Ri), p = (o) => {
|
|
3053
3053
|
r.reportAllChanges || (o = o.slice(-1));
|
|
3054
3054
|
for (const u of o) m.u(u), u.startTime < a.firstHiddenTime && (c.value = Math.max(u.startTime - Ge(), 0), c.entries = [u], l());
|
|
3055
|
-
}, g =
|
|
3055
|
+
}, g = Ne("largest-contentful-paint", p);
|
|
3056
3056
|
if (g) {
|
|
3057
3057
|
l = Z(s, c, Li, r.reportAllChanges);
|
|
3058
3058
|
const o = ni(() => {
|
|
@@ -3388,18 +3388,18 @@ class aa extends se {
|
|
|
3388
3388
|
}
|
|
3389
3389
|
}
|
|
3390
3390
|
const oa = "resource-entry", si = "http-request-start", ri = "http-request-end", la = "dom-mutation", da = "faroUserActionName", ca = "data-faro-user-action-name";
|
|
3391
|
-
let Qe,
|
|
3391
|
+
let Qe, Nt;
|
|
3392
3392
|
function Rn() {
|
|
3393
|
-
return Qe || (Qe = new U()),
|
|
3393
|
+
return Qe || (Qe = new U()), Nt || (Nt = new MutationObserver((i, e) => {
|
|
3394
3394
|
Qe.notify({ type: la });
|
|
3395
|
-
}),
|
|
3395
|
+
}), Nt.observe(document, {
|
|
3396
3396
|
attributes: !0,
|
|
3397
3397
|
childList: !0,
|
|
3398
3398
|
subtree: !0,
|
|
3399
3399
|
characterData: !0
|
|
3400
3400
|
})), Qe;
|
|
3401
3401
|
}
|
|
3402
|
-
const
|
|
3402
|
+
const It = "fetch", et = "xhr";
|
|
3403
3403
|
let Fe, zi = !1, Ot, Pt;
|
|
3404
3404
|
function Ln() {
|
|
3405
3405
|
if (Fe)
|
|
@@ -3443,8 +3443,8 @@ function ha({ onRequestEnd: i, onRequestStart: e }) {
|
|
|
3443
3443
|
Pt || (Pt = window.fetch), window.fetch = function() {
|
|
3444
3444
|
var t, n;
|
|
3445
3445
|
const s = (t = mr(arguments[0])) !== null && t !== void 0 ? t : "", r = pt(s), a = ((n = arguments[1]) !== null && n !== void 0 ? n : {}).method, l = ye();
|
|
3446
|
-
return r || e({ url: s, method: a, requestId: l, apiType:
|
|
3447
|
-
throw r || i({ url: s, method: a, requestId: l, apiType:
|
|
3446
|
+
return r || e({ url: s, method: a, requestId: l, apiType: It }), Pt.apply(this, arguments).then((c) => (r || i({ url: s, method: a, requestId: l, apiType: It }), c)).catch((c) => {
|
|
3447
|
+
throw r || i({ url: s, method: a, requestId: l, apiType: It }), c;
|
|
3448
3448
|
});
|
|
3449
3449
|
};
|
|
3450
3450
|
}
|
|
@@ -3475,13 +3475,13 @@ class ya {
|
|
|
3475
3475
|
this.userAction = e, this.http = Ln(), this.dom = Rn(), this.perf = ma(), this.isValid = !1, this.runningRequests = /* @__PURE__ */ new Map();
|
|
3476
3476
|
}
|
|
3477
3477
|
attach() {
|
|
3478
|
-
this.allMonitorsSub = new U().merge(this.http, this.dom, this.perf).takeWhile(() => [
|
|
3479
|
-
ga(e) && this.runningRequests.set(e.request.requestId, e.request), xt(e) && this.runningRequests.delete(e.request.requestId), xt(e) ? this.userAction.getState() ===
|
|
3480
|
-
}), this.stateSub = this.userAction.filter((e) => [
|
|
3478
|
+
this.allMonitorsSub = new U().merge(this.http, this.dom, this.perf).takeWhile(() => [N.Started, N.Halted].includes(this.userAction.getState())).filter((e) => !(this.userAction.getState() === N.Halted && !(xt(e) && this.runningRequests.has(e.request.requestId)))).subscribe((e) => {
|
|
3479
|
+
ga(e) && this.runningRequests.set(e.request.requestId, e.request), xt(e) && this.runningRequests.delete(e.request.requestId), xt(e) ? this.userAction.getState() === N.Halted && this.runningRequests.size === 0 && this.endAction() : (this.isValid || (this.isValid = !0), this.scheduleFollowUp());
|
|
3480
|
+
}), this.stateSub = this.userAction.filter((e) => [N.Ended, N.Cancelled].includes(e)).first().subscribe(() => this.cleanup()), this.scheduleFollowUp();
|
|
3481
3481
|
}
|
|
3482
3482
|
scheduleFollowUp() {
|
|
3483
3483
|
this.clearTimer(this.followUpTid), this.followUpTid = setTimeout(() => {
|
|
3484
|
-
if (this.userAction.getState() ===
|
|
3484
|
+
if (this.userAction.getState() === N.Started && this.runningRequests.size > 0) {
|
|
3485
3485
|
this.haltAction();
|
|
3486
3486
|
return;
|
|
3487
3487
|
}
|
|
@@ -3493,11 +3493,11 @@ class ya {
|
|
|
3493
3493
|
}, ba);
|
|
3494
3494
|
}
|
|
3495
3495
|
haltAction() {
|
|
3496
|
-
this.userAction.getState() ===
|
|
3496
|
+
this.userAction.getState() === N.Started && (this.userAction.halt(), this.startHaltTimeout());
|
|
3497
3497
|
}
|
|
3498
3498
|
startHaltTimeout() {
|
|
3499
3499
|
this.clearTimer(this.haltTid), this.haltTid = fa(this.haltTid, () => {
|
|
3500
|
-
this.userAction.getState() ===
|
|
3500
|
+
this.userAction.getState() === N.Halted && this.endAction();
|
|
3501
3501
|
}, va);
|
|
3502
3502
|
}
|
|
3503
3503
|
endAction() {
|
|
@@ -3578,7 +3578,7 @@ class Ta extends se {
|
|
|
3578
3578
|
statusCode: e.statusCode,
|
|
3579
3579
|
violatedDirective: e.violatedDirective
|
|
3580
3580
|
};
|
|
3581
|
-
this.api.pushEvent("securitypolicyviolation",
|
|
3581
|
+
this.api.pushEvent("securitypolicyviolation", Ie(t));
|
|
3582
3582
|
}
|
|
3583
3583
|
}
|
|
3584
3584
|
function Fa(i) {
|
|
@@ -3658,13 +3658,13 @@ function ka(i) {
|
|
|
3658
3658
|
}
|
|
3659
3659
|
}), it;
|
|
3660
3660
|
}
|
|
3661
|
-
const
|
|
3661
|
+
const Na = "url-change";
|
|
3662
3662
|
let nt, Dt = !1, st, Ut, Rt, Ki, $i, Wi, Lt;
|
|
3663
|
-
function
|
|
3663
|
+
function Ia() {
|
|
3664
3664
|
nt || (nt = new U(), st = location.href);
|
|
3665
3665
|
function i(e, t) {
|
|
3666
3666
|
const n = t ?? location.href;
|
|
3667
|
-
n !== st && (nt.notify({ type:
|
|
3667
|
+
n !== st && (nt.notify({ type: Na, from: st, to: n, trigger: e }), st = n);
|
|
3668
3668
|
}
|
|
3669
3669
|
if (!Dt)
|
|
3670
3670
|
if ("navigation" in window && "NavigateEvent" in window) {
|
|
@@ -3699,7 +3699,7 @@ class Oa extends se {
|
|
|
3699
3699
|
super(...arguments), this.name = "@grafana/faro-web-sdk:instrumentation-navigation", this.version = K;
|
|
3700
3700
|
}
|
|
3701
3701
|
initialize() {
|
|
3702
|
-
const e = Ln(), t = Rn(), n =
|
|
3702
|
+
const e = Ln(), t = Rn(), n = Ia(), s = ka(["pointerdown", "keydown"]), r = new Aa(new U().merge(e, t, n), {
|
|
3703
3703
|
inactivityMs: 100,
|
|
3704
3704
|
drainTimeoutMs: 10 * 1e3,
|
|
3705
3705
|
isOperationStart: (a) => Fa(a) ? a.request.requestId : void 0,
|
|
@@ -4295,6 +4295,15 @@ const no = () => {
|
|
|
4295
4295
|
[o]: h
|
|
4296
4296
|
};
|
|
4297
4297
|
let S = { ...d.errors };
|
|
4298
|
+
if (o === "phoneCountryCode" && b.phoneNumber) {
|
|
4299
|
+
const v = t(
|
|
4300
|
+
"phoneNumber",
|
|
4301
|
+
b.phoneNumber,
|
|
4302
|
+
void 0,
|
|
4303
|
+
h
|
|
4304
|
+
);
|
|
4305
|
+
v ? S.phoneNumber = v : delete S.phoneNumber;
|
|
4306
|
+
}
|
|
4298
4307
|
if (d.touched[o])
|
|
4299
4308
|
if (f) {
|
|
4300
4309
|
const { parent: v, field: y } = f, w = i[y], E = w ? w(
|
|
@@ -4324,14 +4333,14 @@ const no = () => {
|
|
|
4324
4333
|
...d.formData[v] ?? {},
|
|
4325
4334
|
[y]: u
|
|
4326
4335
|
}
|
|
4327
|
-
}, E = i[y], T = E ? E(u) : void 0,
|
|
4336
|
+
}, E = i[y], T = E ? E(u) : void 0, I = c(d.errors, v, y, T);
|
|
4328
4337
|
e.setState({
|
|
4329
4338
|
formData: w,
|
|
4330
4339
|
touched: {
|
|
4331
4340
|
...d.touched,
|
|
4332
4341
|
[o]: !0
|
|
4333
4342
|
},
|
|
4334
|
-
errors:
|
|
4343
|
+
errors: I,
|
|
4335
4344
|
isValid: s(w)
|
|
4336
4345
|
});
|
|
4337
4346
|
return;
|
|
@@ -4383,10 +4392,11 @@ class Zi extends he {
|
|
|
4383
4392
|
onBlur;
|
|
4384
4393
|
fieldsContainer;
|
|
4385
4394
|
translationFunc;
|
|
4395
|
+
locale;
|
|
4386
4396
|
stateOptions;
|
|
4387
4397
|
grouped;
|
|
4388
4398
|
constructor(e) {
|
|
4389
|
-
super("div", ["address-section"]), this.type = e.type, this.onChange = e.onChange, this.onBlur = e.onBlur, this.translationFunc = e.translationFunc, this.grouped = e.grouped ?? !0;
|
|
4399
|
+
super("div", ["address-section"]), this.type = e.type, this.onChange = e.onChange, this.onBlur = e.onBlur, this.translationFunc = e.translationFunc, this.locale = e.locale, this.grouped = e.grouped ?? !0;
|
|
4390
4400
|
const { title: t, checkoutProfile: n, fieldsConfig: s, values: r, errors: a, touched: l } = e;
|
|
4391
4401
|
if (this.grouped) {
|
|
4392
4402
|
const c = document.createElement("h3");
|
|
@@ -4586,7 +4596,7 @@ class Zi extends he {
|
|
|
4586
4596
|
}), m;
|
|
4587
4597
|
}
|
|
4588
4598
|
createCountrySelect(e, t, n, s, r, a) {
|
|
4589
|
-
const l = `${this.type}Address.country`, c = Kn(r), m = new Ft({
|
|
4599
|
+
const l = `${this.type}Address.country`, c = Kn(r, this.locale), m = new Ft({
|
|
4590
4600
|
name: l,
|
|
4591
4601
|
error: !1,
|
|
4592
4602
|
errorMsg: void 0,
|
|
@@ -5026,6 +5036,7 @@ class uo {
|
|
|
5026
5036
|
formElement;
|
|
5027
5037
|
focusManager;
|
|
5028
5038
|
translationFunc;
|
|
5039
|
+
locale;
|
|
5029
5040
|
onFieldFocus;
|
|
5030
5041
|
onChange;
|
|
5031
5042
|
onBlur;
|
|
@@ -5053,7 +5064,7 @@ class uo {
|
|
|
5053
5064
|
cardCvvFocusHandler;
|
|
5054
5065
|
nameFocusHandler;
|
|
5055
5066
|
constructor(e) {
|
|
5056
|
-
this.formElement = e.formElement, this.focusManager = e.focusManager, this.translationFunc = e.translationFunc, this.onFieldFocus = e.onFieldFocus, this.onChange = e.onChange, this.onBlur = e.onBlur, this.onPaypalSubmit = e.onPaypalSubmit, this.onApplePaySubmit = e.onApplePaySubmit, this.supportedPaymentMethods = e.supportedPaymentMethods, this.paymentId = e.paymentId, this.checkoutKey = e.checkoutKey, this.checkoutDetails = e.checkoutDetails, this.environment = e.environment;
|
|
5067
|
+
this.formElement = e.formElement, this.focusManager = e.focusManager, this.translationFunc = e.translationFunc, this.locale = e.locale, this.onFieldFocus = e.onFieldFocus, this.onChange = e.onChange, this.onBlur = e.onBlur, this.onPaypalSubmit = e.onPaypalSubmit, this.onApplePaySubmit = e.onApplePaySubmit, this.supportedPaymentMethods = e.supportedPaymentMethods, this.paymentId = e.paymentId, this.checkoutKey = e.checkoutKey, this.checkoutDetails = e.checkoutDetails, this.environment = e.environment;
|
|
5057
5068
|
}
|
|
5058
5069
|
createPaymentMethods(e, t, n = !1) {
|
|
5059
5070
|
try {
|
|
@@ -5116,7 +5127,8 @@ class uo {
|
|
|
5116
5127
|
checkoutProfile: e,
|
|
5117
5128
|
translationFunc: this.translationFunc,
|
|
5118
5129
|
defaultCountry: e.layout.phoneNumber?.defaultCountry || "US",
|
|
5119
|
-
allowedCountries: e.layout.phoneNumber?.allowedCountries
|
|
5130
|
+
allowedCountries: e.layout.phoneNumber?.allowedCountries,
|
|
5131
|
+
locale: this.locale
|
|
5120
5132
|
}), this.phoneNumberFocusHandler = () => this.onFieldFocus("phoneNumber"), this.phoneNumberField.getElement().addEventListener("focus", this.phoneNumberFocusHandler, !0), this.focusManager.registerField("phoneNumber", this.phoneNumberField), this.formElement.appendChild(this.phoneNumberField.getElement());
|
|
5121
5133
|
} catch (r) {
|
|
5122
5134
|
throw console.error("Error creating phone number field:", r), r;
|
|
@@ -5207,6 +5219,7 @@ class uo {
|
|
|
5207
5219
|
onChange: this.onChange,
|
|
5208
5220
|
onBlur: this.onBlur,
|
|
5209
5221
|
translationFunc: this.translationFunc,
|
|
5222
|
+
locale: this.locale,
|
|
5210
5223
|
grouped: e.layout.grouped
|
|
5211
5224
|
}), this.formElement.appendChild(this.billingAddressSection.getElement());
|
|
5212
5225
|
} catch (r) {
|
|
@@ -5239,6 +5252,7 @@ class uo {
|
|
|
5239
5252
|
onChange: this.onChange,
|
|
5240
5253
|
onBlur: this.onBlur,
|
|
5241
5254
|
translationFunc: this.translationFunc,
|
|
5255
|
+
locale: this.locale,
|
|
5242
5256
|
grouped: e.layout.grouped
|
|
5243
5257
|
}), this.formElement.appendChild(this.shippingAddressSection.getElement());
|
|
5244
5258
|
} catch (r) {
|
|
@@ -5556,6 +5570,7 @@ class go extends he {
|
|
|
5556
5570
|
formElement: this.element,
|
|
5557
5571
|
focusManager: this.focusManager,
|
|
5558
5572
|
translationFunc: this.translation.t,
|
|
5573
|
+
locale: e.locale ?? void 0,
|
|
5559
5574
|
onFieldFocus: (t) => this.eventHandler.handleFieldFocus(t),
|
|
5560
5575
|
onChange: (t) => this.eventHandler.handleChange(t),
|
|
5561
5576
|
onBlur: (t) => this.eventHandler.handleBlur(t),
|
|
@@ -6162,8 +6177,8 @@ export {
|
|
|
6162
6177
|
Mo as esLocale,
|
|
6163
6178
|
_o as frLocale,
|
|
6164
6179
|
ko as itLocale,
|
|
6165
|
-
|
|
6166
|
-
|
|
6180
|
+
No as plLocale,
|
|
6181
|
+
Io as ptLocale,
|
|
6167
6182
|
to as pushError,
|
|
6168
6183
|
H as pushEvent,
|
|
6169
6184
|
wo as pushLog,
|