@odus/checkout 1.18.0 → 1.19.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/checkout.es.js +241 -231
- package/dist/components/checkout/form/AddressSection.d.ts.map +1 -1
- package/dist/components/checkout/form/CardSection.d.ts.map +1 -1
- package/dist/components/checkout/form/CardUnavailableNotice.d.ts.map +1 -1
- package/dist/components/checkout/form/CardholderSection.d.ts.map +1 -1
- package/dist/components/checkout/form/Form.d.ts.map +1 -1
- package/dist/components/checkout/form/FormComponentManager.d.ts.map +1 -1
- package/dist/components/checkout/form/PhoneCountrySelector.d.ts.map +1 -1
- package/dist/components/checkout/form/PhoneNumberField.d.ts.map +1 -1
- package/dist/components/common/CountryDialCodeDropdown.d.ts.map +1 -1
- package/dist/components/common/Input.d.ts.map +1 -1
- package/dist/components/common/Select.d.ts.map +1 -1
- package/dist/core/constants/fontSize.constants.d.ts +7 -0
- package/dist/core/constants/fontSize.constants.d.ts.map +1 -0
- package/dist/core/vgs/VGSCollectService.d.ts +0 -7
- package/dist/core/vgs/VGSCollectService.d.ts.map +1 -1
- package/dist/elements/ApplePayElement.d.ts.map +1 -1
- package/dist/elements/EmailElement.d.ts.map +1 -1
- package/dist/elements/PayPalElement.d.ts.map +1 -1
- package/dist/elements/PhoneElement.d.ts.map +1 -1
- package/dist/elements/card/VgsCardAdapter.d.ts.map +1 -1
- package/dist/elements/cardElement.constants.d.ts.map +1 -1
- package/dist/elements/theme/index.d.ts.map +1 -1
- package/dist/elements.es.js +267 -267
- package/dist/factories/createCheckoutProfile.d.ts.map +1 -1
- package/dist/loader.es.js +1 -1
- package/dist/phone.js +477 -474
- package/dist/shared.js +79 -110
- package/dist/types/common/FormData.type.d.ts +0 -2
- package/dist/types/common/FormData.type.d.ts.map +1 -1
- package/dist/types/telemetry/TelemetryEvents.type.d.ts +2 -2
- package/dist/types/telemetry/TelemetryEvents.type.d.ts.map +1 -1
- package/dist/utils/dom/fontFamily.util.d.ts +23 -0
- package/dist/utils/dom/fontFamily.util.d.ts.map +1 -0
- package/dist/utils/dom/googleFontUrl.d.ts +5 -5
- package/dist/utils/dom/googleFontUrl.d.ts.map +1 -1
- package/dist/utils/dom/index.d.ts +1 -0
- package/dist/utils/dom/index.d.ts.map +1 -1
- package/dist/utils/phone/countryDialCodes.d.ts +6 -0
- package/dist/utils/phone/countryDialCodes.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/shared.js
CHANGED
|
@@ -48,7 +48,7 @@ var e = (e, t) => () => (t || (e((t = { exports: {} }).exports, t, t.exports), e
|
|
|
48
48
|
REQUEST_FAILED: "request_failed",
|
|
49
49
|
REJECTED: "rejected",
|
|
50
50
|
NO_CARD_ID: "no_card_id",
|
|
51
|
-
|
|
51
|
+
DUPLICATE_CARD: "duplicate_card",
|
|
52
52
|
NOT_INITIALIZED: "not_initialized",
|
|
53
53
|
CAPTURE_UNAVAILABLE: "capture_unavailable",
|
|
54
54
|
SDK_ERROR: "sdk_error"
|
|
@@ -2038,7 +2038,7 @@ var ar = function(e) {
|
|
|
2038
2038
|
url: t,
|
|
2039
2039
|
app: {
|
|
2040
2040
|
name: "odus-checkout",
|
|
2041
|
-
version: "1.
|
|
2041
|
+
version: "1.19.0",
|
|
2042
2042
|
environment: e.environment === "test" ? "sandbox" : "production"
|
|
2043
2043
|
},
|
|
2044
2044
|
isolate: !0,
|
|
@@ -2380,13 +2380,8 @@ var ar = function(e) {
|
|
|
2380
2380
|
throw c(/* @__PURE__ */ Error(e), s.NO_CARD_ID, e, p, d);
|
|
2381
2381
|
}
|
|
2382
2382
|
if (d === 303) {
|
|
2383
|
-
let e;
|
|
2384
|
-
|
|
2385
|
-
e = await this.patchCard(l, m.id);
|
|
2386
|
-
} catch (e) {
|
|
2387
|
-
throw c(e, s.CARD_UPDATE_FAILED, e instanceof Error ? e.message : "Patch failed", p);
|
|
2388
|
-
}
|
|
2389
|
-
return o(p), e;
|
|
2383
|
+
let e = "Card creation failed: VGS returned an existing card";
|
|
2384
|
+
throw c(/* @__PURE__ */ Error(e), s.DUPLICATE_CARD, e, p, d);
|
|
2390
2385
|
}
|
|
2391
2386
|
return o(p), e.extractCardResult(m);
|
|
2392
2387
|
}
|
|
@@ -2403,38 +2398,6 @@ var ar = function(e) {
|
|
|
2403
2398
|
let t = Object.values(e);
|
|
2404
2399
|
return t.length > 0 && t.every((e) => Array.isArray(e) || typeof e == "object" && !!e && ("errorMessages" in e || "isValid" in e));
|
|
2405
2400
|
}
|
|
2406
|
-
patchCard(t, n) {
|
|
2407
|
-
if (!this.vgsForm || !this.environment) return Promise.reject(/* @__PURE__ */ Error("VGS not initialized"));
|
|
2408
|
-
let r = this.vgsForm;
|
|
2409
|
-
return new Promise((i, a) => {
|
|
2410
|
-
r.submit(`/cards/${n}`, {
|
|
2411
|
-
method: "PATCH",
|
|
2412
|
-
headers: {
|
|
2413
|
-
Authorization: `Bearer ${t}`,
|
|
2414
|
-
"Content-Type": "application/vnd.api+json"
|
|
2415
|
-
},
|
|
2416
|
-
data: (e) => ({ data: { attributes: {
|
|
2417
|
-
cvc: e.cvc,
|
|
2418
|
-
exp_month: e["exp-date"].month,
|
|
2419
|
-
exp_year: e["exp-date"].year
|
|
2420
|
-
} } })
|
|
2421
|
-
}, (t, n) => {
|
|
2422
|
-
if (t >= 400 || n?.errors) {
|
|
2423
|
-
a(n?.errors ?? /* @__PURE__ */ Error("Card update failed"));
|
|
2424
|
-
return;
|
|
2425
|
-
}
|
|
2426
|
-
let r = n?.data;
|
|
2427
|
-
if (!r?.id) {
|
|
2428
|
-
a(/* @__PURE__ */ Error("Card update failed: no card ID returned"));
|
|
2429
|
-
return;
|
|
2430
|
-
}
|
|
2431
|
-
let o = e.extractCardResult(r), s = n.included?.find((e) => e.type === "card_updates");
|
|
2432
|
-
s?.attributes?.updated_values?.length && (o.updatedValues = s.attributes.updated_values), i(o);
|
|
2433
|
-
}, (e) => {
|
|
2434
|
-
a(e);
|
|
2435
|
-
});
|
|
2436
|
-
});
|
|
2437
|
-
}
|
|
2438
2401
|
static extractCardResult(e) {
|
|
2439
2402
|
let t = e.attributes;
|
|
2440
2403
|
return {
|
|
@@ -2711,7 +2674,7 @@ function fa(e) {
|
|
|
2711
2674
|
name: "Custom Appearance",
|
|
2712
2675
|
additionalPaymentMethods: e.additionalPaymentMethods || {},
|
|
2713
2676
|
styles: e.styles || {
|
|
2714
|
-
fontSize:
|
|
2677
|
+
fontSize: 16,
|
|
2715
2678
|
textColor: "#000000",
|
|
2716
2679
|
buttonColor: "#0070f3",
|
|
2717
2680
|
borderRadius: 4,
|
|
@@ -2834,7 +2797,7 @@ function pa({ appearance: e }) {
|
|
|
2834
2797
|
name: "Default Profile",
|
|
2835
2798
|
additionalPaymentMethods: {},
|
|
2836
2799
|
styles: {
|
|
2837
|
-
fontSize:
|
|
2800
|
+
fontSize: 16,
|
|
2838
2801
|
textColor: "#000000",
|
|
2839
2802
|
buttonColor: "#0070f3",
|
|
2840
2803
|
borderRadius: 4,
|
|
@@ -4429,13 +4392,19 @@ var $a = Qa(), eo = () => {
|
|
|
4429
4392
|
body: f
|
|
4430
4393
|
});
|
|
4431
4394
|
}
|
|
4432
|
-
}, ro =
|
|
4433
|
-
let t = e
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
let
|
|
4395
|
+
}, ro = /* @__PURE__ */ new Set(/* @__PURE__ */ "cursive.emoji.fangsong.fantasy.math.monospace.sans-serif.serif.system-ui.ui-monospace.ui-rounded.ui-sans-serif.ui-serif.inherit.initial.revert.revert-layer.unset.caption.icon.menu.message-box.small-caption.status-bar.-apple-system.blinkmacsystemfont".split(".")), io = (e) => ro.has(e.toLowerCase()), ao = /^(["'])(.*)\1$/, oo = (e) => (e ?? "").split(",").map((e) => e.trim().replace(ao, "$2").trim().replace(/\s+/g, " ")).filter(Boolean), so = (e) => `"${e.replace(/["\\]/g, "")}"`, co = (e) => {
|
|
4396
|
+
let t = oo(e);
|
|
4397
|
+
if (t.length === 0) return `"${e}", sans-serif`;
|
|
4398
|
+
if (t.length === 1) return `${so(t[0])}, sans-serif`;
|
|
4399
|
+
let n = t.map((e) => io(e) ? e : so(e));
|
|
4400
|
+
return t.some((e) => e.toLowerCase() === "sans-serif") || n.push("sans-serif"), n.join(", ");
|
|
4401
|
+
}, lo = "https://fonts.googleapis.com/", uo = (e) => {
|
|
4402
|
+
let [t] = oo(e);
|
|
4403
|
+
return !t || io(t) ? null : t.replace(/\s+/g, "+");
|
|
4404
|
+
}, fo = (e) => `${lo}css2?family=${e}:wght@400;700&display=swap`, po = (e) => e.rel === "stylesheet" && e.href.startsWith("https://fonts.googleapis.com/"), mo = ({ fontFamily: e }) => {
|
|
4405
|
+
let t = uo(e);
|
|
4437
4406
|
if (!t) return { cleanup: () => {} };
|
|
4438
|
-
let n =
|
|
4407
|
+
let n = fo(t), r = [...document.head.querySelectorAll("link")].filter(po), i = document.createElement("link");
|
|
4439
4408
|
i.rel = "stylesheet", i.href = n;
|
|
4440
4409
|
let a = r.find((e) => e.href.includes(`family=${t}`));
|
|
4441
4410
|
if (a) a.href = n;
|
|
@@ -4446,17 +4415,17 @@ var $a = Qa(), eo = () => {
|
|
|
4446
4415
|
return { cleanup: () => {
|
|
4447
4416
|
document.head.contains(i) && document.head.removeChild(i);
|
|
4448
4417
|
} };
|
|
4449
|
-
},
|
|
4450
|
-
async function
|
|
4451
|
-
let t =
|
|
4418
|
+
}, ho = /src:\s*url\(([^)]+\.woff2[^)]*)\)/, go = /\/\*\s*latin\s*\*\/\s*@font-face\s*\{[^}]*src:\s*url\(([^)]+\.woff2[^)]*)\)[^}]*\}/;
|
|
4419
|
+
async function _o(e) {
|
|
4420
|
+
let t = uo(e);
|
|
4452
4421
|
if (!t) return null;
|
|
4453
|
-
let n =
|
|
4422
|
+
let n = fo(t);
|
|
4454
4423
|
try {
|
|
4455
4424
|
let e = await fetch(n);
|
|
4456
4425
|
if (!e.ok) return null;
|
|
4457
|
-
let t = await e.text(), r =
|
|
4426
|
+
let t = await e.text(), r = go.exec(t);
|
|
4458
4427
|
if (r?.[1]) return r[1];
|
|
4459
|
-
let i =
|
|
4428
|
+
let i = ho.exec(t);
|
|
4460
4429
|
return i?.[1] ? i[1] : null;
|
|
4461
4430
|
} catch {
|
|
4462
4431
|
return null;
|
|
@@ -4517,28 +4486,28 @@ var Q = class e {
|
|
|
4517
4486
|
this.element.removeEventListener(e, t);
|
|
4518
4487
|
}), this.eventListeners = [], this.children.forEach((e) => e.destroy()), this.children = [], this.element.parentNode && this.element.parentNode.removeChild(this.element);
|
|
4519
4488
|
}
|
|
4520
|
-
},
|
|
4521
|
-
function
|
|
4489
|
+
}, vo = "8px 12px", yo = 1.5, bo = 8;
|
|
4490
|
+
function xo(e) {
|
|
4522
4491
|
let t = parseFloat(e ?? "");
|
|
4523
|
-
return Number.isFinite(t) ? t :
|
|
4492
|
+
return Number.isFinite(t) ? t : bo;
|
|
4524
4493
|
}
|
|
4525
|
-
function
|
|
4526
|
-
let n = e.trim().split(/\s+/), r =
|
|
4527
|
-
return `${r + (n.length >= 3 ?
|
|
4494
|
+
function So(e, t) {
|
|
4495
|
+
let n = e.trim().split(/\s+/), r = xo(n[0]);
|
|
4496
|
+
return `${r + (n.length >= 3 ? xo(n[2]) : r) + t * yo}px`;
|
|
4528
4497
|
}
|
|
4529
4498
|
//#endregion
|
|
4530
4499
|
//#region libs/checkout/src/utils/country/countryNames.ts
|
|
4531
|
-
var
|
|
4500
|
+
var Co = (e) => e.replace(/([A-Z])/g, " $1").trim(), wo = Object.fromEntries(Object.entries(ga).map(([e, t]) => [t, Co(e)])), To = new Set(Object.values(ga)), Eo = /* @__PURE__ */ new Map(), Do = (e) => (Eo.has(e) || Eo.set(e, new Intl.DisplayNames([e], { type: "region" })), Eo.get(e)), Oo = () => Object.values(ga), ko = (e, t) => {
|
|
4532
4501
|
let n = e.toUpperCase();
|
|
4533
4502
|
if (t) try {
|
|
4534
|
-
let e =
|
|
4503
|
+
let e = Do(t).of(n);
|
|
4535
4504
|
if (e) return e;
|
|
4536
4505
|
} catch {}
|
|
4537
|
-
return
|
|
4538
|
-
},
|
|
4506
|
+
return wo[n] || n;
|
|
4507
|
+
}, Ao = (e, t) => (e && e.length > 0 ? e.map((e) => e.toUpperCase()).filter((e) => To.has(e)) : Oo()).map((e) => ({
|
|
4539
4508
|
value: e,
|
|
4540
|
-
text:
|
|
4541
|
-
})).sort((e, n) => e.text.localeCompare(n.text, t)),
|
|
4509
|
+
text: ko(e, t)
|
|
4510
|
+
})).sort((e, n) => e.text.localeCompare(n.text, t)), jo = class extends Q {
|
|
4542
4511
|
span;
|
|
4543
4512
|
constructor(e) {
|
|
4544
4513
|
super("div", ["form-helper-text-anchor"]), this.span = document.createElement("span"), this.span.className = "form-helper-text", this.setVariant(e.variant ?? "error"), e.visible === !1 && this.span.classList.add("form-helper-text-hidden"), this.span.textContent = e.text || "", this.getElement().appendChild(this.span);
|
|
@@ -4558,7 +4527,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4558
4527
|
hideMessage() {
|
|
4559
4528
|
return this.span && this.span.classList.add("form-helper-text-hidden"), this;
|
|
4560
4529
|
}
|
|
4561
|
-
},
|
|
4530
|
+
}, Mo = class {
|
|
4562
4531
|
static createDiv(e = [], t = {}) {
|
|
4563
4532
|
return new Q("div", e, t);
|
|
4564
4533
|
}
|
|
@@ -4606,13 +4575,13 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4606
4575
|
...r
|
|
4607
4576
|
});
|
|
4608
4577
|
}
|
|
4609
|
-
},
|
|
4578
|
+
}, No = class extends Q {
|
|
4610
4579
|
constructor(e) {
|
|
4611
4580
|
if (super("label", ["input-label"], { for: e.id }), this.setText(e.label), !e.styles) return;
|
|
4612
4581
|
let t = this.getElement();
|
|
4613
4582
|
e.styles.color && (t.style.color = e.styles.color), e.styles.fontSize && (t.style.fontSize = `${e.styles.fontSize}px`);
|
|
4614
4583
|
}
|
|
4615
|
-
},
|
|
4584
|
+
}, Po = class extends Q {
|
|
4616
4585
|
inputElement;
|
|
4617
4586
|
helperText = null;
|
|
4618
4587
|
hasError = !1;
|
|
@@ -4621,7 +4590,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4621
4590
|
rendersMessage;
|
|
4622
4591
|
constructor(e) {
|
|
4623
4592
|
if (super("div", ["input-wrapper"]), this.rendersMessage = e.renderMessage ?? !0, e.label) {
|
|
4624
|
-
let t = new
|
|
4593
|
+
let t = new No({
|
|
4625
4594
|
styles: e.styles ? {
|
|
4626
4595
|
color: e.styles.color,
|
|
4627
4596
|
fontSize: e.styles.fontSize
|
|
@@ -4636,11 +4605,11 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4636
4605
|
name: e.name,
|
|
4637
4606
|
class: `form-input ${e.error ? "form-input-error" : ""}`
|
|
4638
4607
|
};
|
|
4639
|
-
if (e.placeholder && (t.placeholder = e.placeholder), e.value && (t.value = e.value), e.required && (t.required = String(e.required)), e.disabled && (t.disabled = String(e.disabled)), e.autocomplete && (t.autocomplete = e.autocomplete), e.maxLength && (t.maxlength = String(e.maxLength)), this.inputElement =
|
|
4608
|
+
if (e.placeholder && (t.placeholder = e.placeholder), e.value && (t.value = e.value), e.required && (t.required = String(e.required)), e.disabled && (t.disabled = String(e.disabled)), e.autocomplete && (t.autocomplete = e.autocomplete), e.maxLength && (t.maxlength = String(e.maxLength)), this.inputElement = Mo.createInput(e.type || "text", [], t), e.styles) {
|
|
4640
4609
|
let t = this.inputElement.getElement();
|
|
4641
|
-
t.style.fontFamily =
|
|
4610
|
+
t.style.fontFamily = co(e.styles.fontFamily), t.style.color = e.styles.color, t.style.fontSize = `${e.styles.fontSize}px`, t.style.borderRadius = e.styles.borderRadius;
|
|
4642
4611
|
}
|
|
4643
|
-
e.onChange && this.inputElement.getElement().addEventListener("input", e.onChange), this.getElement().appendChild(this.inputElement.getElement()), this.hasError = e.error, this.errorMsg = e.errorMsg ?? null, this.rendersMessage && (this.helperText = new
|
|
4612
|
+
e.onChange && this.inputElement.getElement().addEventListener("input", e.onChange), this.getElement().appendChild(this.inputElement.getElement()), this.hasError = e.error, this.errorMsg = e.errorMsg ?? null, this.rendersMessage && (this.helperText = new jo({
|
|
4644
4613
|
text: e.error ? e.errorMsg : "",
|
|
4645
4614
|
visible: e.error
|
|
4646
4615
|
}), this.appendChild(this.helperText));
|
|
@@ -4669,7 +4638,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4669
4638
|
focus() {
|
|
4670
4639
|
this.inputElement.getElement().focus();
|
|
4671
4640
|
}
|
|
4672
|
-
},
|
|
4641
|
+
}, Fo = class e extends Q {
|
|
4673
4642
|
static PLACEHOLDER_COLOR = "#D4D4D5";
|
|
4674
4643
|
selectElement;
|
|
4675
4644
|
helperText = null;
|
|
@@ -4697,13 +4666,13 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4697
4666
|
n.value = e.value, n.textContent = e.text, t.value && e.value === t.value && (n.selected = !0), this.selectElement.getElement().appendChild(n);
|
|
4698
4667
|
}), t.styles) {
|
|
4699
4668
|
let e = this.selectElement.getElement();
|
|
4700
|
-
e.style.fontFamily =
|
|
4669
|
+
e.style.fontFamily = co(t.styles.fontFamily), e.style.fontSize = `${t.styles.fontSize}px`, e.style.borderRadius = t.styles.borderRadius, this.configuredColor = t.styles.color;
|
|
4701
4670
|
}
|
|
4702
4671
|
if (t.placeholder && !t.value ? (this.selectElement.getElement().classList.add("form-select-placeholder"), this.selectElement.getElement().style.color = e.PLACEHOLDER_COLOR) : this.configuredColor && (this.selectElement.getElement().style.color = this.configuredColor), this.selectElement.getElement().addEventListener("change", (n) => {
|
|
4703
4672
|
let r = this.selectElement.getElement();
|
|
4704
4673
|
r.value === "" ? (r.classList.add("form-select-placeholder"), r.style.color = e.PLACEHOLDER_COLOR) : (r.classList.remove("form-select-placeholder"), this.configuredColor ? r.style.color = this.configuredColor : r.style.color = ""), t.onChange?.(n);
|
|
4705
4674
|
}), t.label) {
|
|
4706
|
-
let e = new
|
|
4675
|
+
let e = new No({
|
|
4707
4676
|
styles: t.styles ? {
|
|
4708
4677
|
color: t.styles.color,
|
|
4709
4678
|
fontSize: t.styles.fontSize
|
|
@@ -4713,7 +4682,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4713
4682
|
});
|
|
4714
4683
|
this.appendChild(e);
|
|
4715
4684
|
}
|
|
4716
|
-
this.getElement().appendChild(this.selectElement.getElement()), this.rendersMessage && (this.helperText = new
|
|
4685
|
+
this.getElement().appendChild(this.selectElement.getElement()), this.rendersMessage && (this.helperText = new jo({
|
|
4717
4686
|
text: t.error ? t.errorMsg : "",
|
|
4718
4687
|
visible: t.error
|
|
4719
4688
|
}), this.appendChild(this.helperText));
|
|
@@ -4750,7 +4719,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4750
4719
|
CARD_EXPIRY: "exp-date",
|
|
4751
4720
|
CARD_CVC: "cvc",
|
|
4752
4721
|
CARDHOLDER: "cardholder"
|
|
4753
|
-
},
|
|
4722
|
+
}, Io = {
|
|
4754
4723
|
[$.CARD_NUMBER]: {
|
|
4755
4724
|
1001: "validation.cardNumberInvalid",
|
|
4756
4725
|
1011: "validation.cardNumberLuhnInvalid"
|
|
@@ -4764,12 +4733,12 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4764
4733
|
1017: "validation.cardSecurityFormat"
|
|
4765
4734
|
},
|
|
4766
4735
|
[$.CARDHOLDER]: { 1001: "validation.nameRequired" }
|
|
4767
|
-
},
|
|
4736
|
+
}, Lo = (e, t) => Io[e]?.[t], Ro = {
|
|
4768
4737
|
visa: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20width='800px'%20height='800px'%20viewBox='0%20-140%20780%20780'%20enable-background='new%200%200%20780%20500'%20version='1.1'%20xml:space='preserve'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M40,0h700c22.092,0,40,17.909,40,40v420c0,22.092-17.908,40-40,40H40c-22.091,0-40-17.908-40-40V40%20C0,17.909,17.909,0,40,0z'%20fill='%230E4595'/%3e%3cpath%20d='m293.2%20348.73l33.361-195.76h53.36l-33.385%20195.76h-53.336zm246.11-191.54c-10.57-3.966-27.137-8.222-47.822-8.222-52.725%200-89.865%2026.55-90.18%2064.603-0.299%2028.13%2026.514%2043.822%2046.752%2053.186%2020.771%209.595%2027.752%2015.714%2027.654%2024.283-0.131%2013.121-16.586%2019.116-31.922%2019.116-21.357%200-32.703-2.967-50.227-10.276l-6.876-3.11-7.489%2043.823c12.463%205.464%2035.51%2010.198%2059.438%2010.443%2056.09%200%2092.5-26.246%2092.916-66.882%200.199-22.269-14.016-39.216-44.801-53.188-18.65-9.055-30.072-15.099-29.951-24.268%200-8.137%209.668-16.839%2030.557-16.839%2017.449-0.27%2030.09%203.535%2039.938%207.5l4.781%202.26%207.232-42.429m137.31-4.223h-41.232c-12.773%200-22.332%203.487-27.941%2016.234l-79.244%20179.4h56.031s9.16-24.123%2011.232-29.418c6.125%200%2060.555%200.084%2068.338%200.084%201.596%206.853%206.49%2029.334%206.49%2029.334h49.514l-43.188-195.64zm-65.418%20126.41c4.412-11.279%2021.26-54.723%2021.26-54.723-0.316%200.522%204.379-11.334%207.074-18.684l3.605%2016.879s10.219%2046.729%2012.354%2056.528h-44.293zm-363.3-126.41l-52.24%20133.5-5.567-27.13c-9.725-31.273-40.025-65.155-73.898-82.118l47.766%20171.2%2056.456-0.064%2084.004-195.39h-56.521'%20fill='%23ffffff'/%3e%3cpath%20d='m146.92%20152.96h-86.041l-0.681%204.073c66.938%2016.204%20111.23%2055.363%20129.62%20102.41l-18.71-89.96c-3.23-12.395-12.597-16.094-24.186-16.527'%20fill='%23F2AE14'/%3e%3c/svg%3e",
|
|
4769
4738
|
mastercard: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20height='800px'%20width='800px'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20291.791%20291.791'%20xml:space='preserve'%3e%3cg%3e%3cpath%20style='fill:%23E2574C;'%20d='M182.298,145.895c0,50.366-40.801,91.176-91.149,91.176S0,196.252,0,145.895%20s40.811-91.176,91.149-91.176S182.298,95.538,182.298,145.895z'/%3e%3cpath%20style='fill:%23F4B459;'%20d='M200.616,54.719c-20.442,0-39.261,6.811-54.469,18.181l0.073,0.009%20c2.991,2.89,6.291,4.924,8.835,8.251l-18.965,0.301c-2.972,3-5.68,6.264-8.233,9.656H161.3c2.544,3.054,4.896,5.708,7.03,9.081%20h-46.536c-1.705,2.936-3.282,5.954-4.659,9.09h56.493c1.477,3.127,2.799,5.489,3.921,8.799h-63.76%20c-1.012,3.146-1.878,6.364-2.535,9.646h68.966c0.675,3.155,1.194,6.072,1.55,9.045h-71.884c-0.301,3-0.456,6.045-0.456,9.118%20h72.859c0,3.228-0.228,6.218-0.556,9.118h-71.847c0.31,3.091,0.766,6.127,1.368,9.118h68.856c-0.711,2.954-1.532,5.926-2.562,9.008%20h-63.969c0.966,3.118,2.143,6.145,3.428,9.099h56.621c-1.568,3.319-3.346,5.972-5.306,9.081h-46.691%20c1.842,3.191,3.875,6.236,6.081,9.154l33.589,0.501c-2.863,3.437-6.537,5.507-9.884,8.516c0.182,0.146-5.352-0.018-16.248-0.191%20c16.576,17.105,39.744,27.772,65.446,27.772c50.357,0,91.176-40.82,91.176-91.176S250.981,54.719,200.616,54.719z'/%3e%3c/g%3e%3c/svg%3e",
|
|
4770
4739
|
amex: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20height='30px'%20width='30px'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%3e%3cpath%20style='fill:%23306FC5;'%20d='M512,402.281c0,16.716-13.55,30.267-30.265,30.267H30.265C13.55,432.549,0,418.997,0,402.281V109.717%20c0-16.715,13.55-30.266,30.265-30.266h451.47c16.716,0,30.265,13.551,30.265,30.266V402.281L512,402.281z'/%3e%3cpath%20style='opacity:0.15;fill:%23202121;enable-background:new%20;'%20d='M21.517,402.281V109.717%20c0-16.715,13.552-30.266,30.267-30.266h-21.52C13.55,79.451,0,93.001,0,109.717v292.565c0,16.716,13.55,30.267,30.265,30.267h21.52%20C35.07,432.549,21.517,418.997,21.517,402.281z'/%3e%3cg%3e%3cpolygon%20style='fill:%23FFFFFF;'%20points='74.59,220.748%2089.888,220.748%2082.241,201.278%20'/%3e%3cpolygon%20style='fill:%23FFFFFF;'%20points='155.946,286.107%20155.946,295.148%20181.675,295.148%20181.675,304.885%20155.946,304.885%20155.946,315.318%20184.455,315.318%20197.666,300.712%20185.151,286.107%20'/%3e%3cpolygon%20style='fill:%23FFFFFF;'%20points='356.898,201.278%20348.553,220.748%20364.548,220.748%20'/%3e%3cpolygon%20style='fill:%23FFFFFF;'%20points='230.348,320.875%20230.348,281.241%20212.268,300.712%20'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M264.42,292.368c-0.696-4.172-3.48-6.261-7.654-6.261h-14.599v12.516h15.299%20C261.637,298.624,264.42,296.539,264.42,292.368z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M313.09,297.236c1.391-0.697,2.089-2.785,2.089-4.867c0.696-2.779-0.698-4.172-2.089-4.868%20c-1.387-0.696-3.476-0.696-5.559-0.696h-13.91v11.127h13.909C309.613,297.932,311.702,297.932,313.09,297.236z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M413.217,183.198v8.344l-4.169-8.344H376.37v8.344l-4.174-8.344h-44.502%20c-7.648,0-13.909,1.392-19.469,4.173v-4.173h-31.289v0.696v3.477c-3.476-2.78-7.648-4.173-13.211-4.173h-111.95l-7.652,17.384%20l-7.647-17.384h-25.031h-10.431v8.344l-3.477-8.344h-0.696H66.942l-13.909,32.68L37.042,251.34l-0.294,0.697h0.294h35.463h0.444%20l0.252-0.697l4.174-10.428h9.039l4.172,11.125h40.326v-0.697v-7.647l3.479,8.343h20.163l3.475-8.343v7.647v0.697h15.993h79.965%20h0.696v-18.08h1.394c1.389,0,1.389,0,1.389,2.087v15.297h50.065v-4.172c4.172,2.089,10.426,4.172,18.771,4.172h20.863l4.172-11.123%20h9.732l4.172,11.123h40.328v-6.952v-3.476l6.261,10.428h1.387h0.698h30.595v-68.143h-31.291l0,0H413.217z%20M177.501,241.609h-6.955%20h-4.171v-4.169v-34.076l-0.696,1.595v-0.019l-16.176,36.669h-0.512h-3.719h-6.017l-16.687-38.245v38.245h-23.64l-4.867-10.43%20H70.417l-4.868,10.43H53.326l20.57-48.675h17.382l19.469,46.587v-46.587h4.171h14.251l0.328,0.697h0.024l8.773,19.094l6.3,14.306%20l0.223-0.721l13.906-33.375H177.5v48.674H177.501L177.501,241.609z%20M225.481,203.364h-27.119v9.039h26.423v9.734h-26.423v9.738%20h27.119v10.427h-38.939v-49.367h38.939V203.364L225.481,203.364z%20M275.076,221.294c0.018,0.016,0.041,0.027,0.063,0.042%20c0.263,0.278,0.488,0.557,0.68,0.824c1.332,1.746,2.409,4.343,2.463,8.151c0.004,0.066,0.007,0.131,0.011,0.197%20c0,0.038,0.007,0.071,0.007,0.11c0,0.022-0.002,0.039-0.002,0.06c0.016,0.383,0.026,0.774,0.026,1.197v9.735h-10.428v-5.565%20c0-2.781,0-6.954-2.089-9.735c-0.657-0.657-1.322-1.09-2.046-1.398c-1.042-0.675-3.017-0.686-6.295-0.686h-12.52v17.384h-11.818%20v-48.675h26.425c6.254,0,10.428,0,13.906,2.086c3.407,2.046,5.465,5.439,5.543,10.812c-0.161,7.4-4.911,11.46-8.326,12.829%20C270.676,218.662,272.996,219.129,275.076,221.294z%20M298.491,241.609h-11.822v-48.675h11.822V241.609z%20M434.083,241.609h-15.3%20l-22.25-36.855v30.595l-0.073-0.072v6.362h-11.747v-0.029h-11.822l-4.172-10.43H344.38l-4.172,11.123h-13.211%20c-5.559,0-12.517-1.389-16.687-5.561c-4.172-4.172-6.256-9.735-6.256-18.773c0-6.953,1.389-13.911,6.256-19.472%20c3.474-4.175,9.735-5.562,17.382-5.562h11.128v10.429h-11.128c-4.172,0-6.254,0.693-9.041,2.783%20c-2.082,2.085-3.474,6.256-3.474,11.123c0,5.564,0.696,9.04,3.474,11.821c2.091,2.089,4.87,2.785,8.346,2.785h4.867l15.991-38.243%20h6.957h10.428l19.472,46.587v-2.376v-15.705v-1.389v-27.116h17.382l20.161,34.07v-34.07h11.826v47.977h0.002L434.083,241.609%20L434.083,241.609z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M265.161,213.207c0.203-0.217,0.387-0.463,0.543-0.745c0.63-0.997,1.352-2.793,0.963-5.244%20c-0.016-0.225-0.057-0.433-0.105-0.634c-0.013-0.056-0.011-0.105-0.026-0.161l-0.007,0.001c-0.346-1.191-1.229-1.923-2.11-2.367%20c-1.394-0.693-3.48-0.693-5.565-0.693h-13.909v11.127h13.909c2.085,0,4.172,0,5.565-0.697c0.209-0.106,0.395-0.25,0.574-0.413%20l0.002,0.009C264.996,213.389,265.067,213.315,265.161,213.207z'/%3e%3cpath%20style='fill:%23FFFFFF;'%20d='M475.105,311.144c0-4.867-1.389-9.736-3.474-13.212v-31.289h-0.032v-2.089c0,0-29.145,0-33.483,0%20c-4.336,0-9.598,4.171-9.598,4.171v-4.171h-31.984c-4.87,0-11.124,1.392-13.909,4.171v-4.171h-57.016v2.089v2.081%20c-4.169-3.474-11.824-4.171-15.298-4.171h-37.549v2.089v2.081c-3.476-3.474-11.824-4.171-15.998-4.171H215.05l-9.737,10.431%20l-9.04-10.431h-2.911h-4.737h-54.93v2.089v5.493v62.651h61.19l10.054-10.057l8.715,10.057h0.698h35.258h1.598h0.696h0.692v-6.953%20v-9.039h3.479c4.863,0,11.124,0,15.991-2.089v17.382v1.394h31.291v-1.394V317.4h1.387c2.089,0,2.089,0,2.089,2.086v14.6v1.394%20h94.563c6.263,0,12.517-1.394,15.993-4.175v2.781v1.394h29.902c6.254,0,12.517-0.695,16.689-3.478%20c6.402-3.841,10.437-10.64,11.037-18.749c0.028-0.24,0.063-0.48,0.085-0.721l-0.041-0.039%20C475.087,312.043,475.105,311.598,475.105,311.144z%20M256.076,306.973h-13.91v2.081v4.174v4.173v7.649h-22.855l-13.302-15.299%20l-0.046,0.051l-0.65-0.748l-15.297,15.996h-44.501v-48.673h45.197l12.348,13.525l2.596,2.832l0.352-0.365l14.604-15.991h36.852%20c7.152,0,15.161,1.765,18.196,9.042c0.365,1.441,0.577,3.043,0.577,4.863C276.237,304.189,266.502,306.973,256.076,306.973z%20M325.609,306.276c1.389,2.081,2.085,4.867,2.085,9.041v9.732h-11.819v-6.256c0-2.786,0-7.65-2.089-9.739%20c-1.387-2.081-4.172-2.081-8.341-2.081H292.93v18.077h-11.82v-49.369h26.421c5.559,0,10.426,0,13.909,2.084%20c3.474,2.088,6.254,5.565,6.254,11.128c0,7.647-4.865,11.819-8.343,13.212C322.829,303.49,324.914,304.885,325.609,306.276z%20M373.589,286.107h-27.122v9.04h26.424v9.737h-26.424v9.736h27.122v10.429H334.65V275.68h38.939V286.107z%20M402.791,325.05h-22.252%20v-10.429h22.252c2.082,0,3.476,0,4.87-1.392c0.696-0.697,1.387-2.085,1.387-3.477c0-1.394-0.691-2.778-1.387-3.475%20c-0.698-0.695-2.091-1.391-4.176-1.391c-11.126-0.696-24.337,0-24.337-15.296c0-6.954,4.172-14.604,16.689-14.604h22.945v11.819%20h-21.554c-2.085,0-3.478,0-4.87,0.696c-1.387,0.697-1.387,2.089-1.387,3.478c0,2.087,1.387,2.783,2.778,3.473%20c1.394,0.697,2.783,0.697,4.172,0.697h6.259c6.259,0,10.43,1.391,13.211,4.173c2.087,2.087,3.478,5.564,3.478,10.43%20C420.869,320.179,414.611,325.05,402.791,325.05z%20M462.59,320.179c-2.778,2.785-7.648,4.871-14.604,4.871H425.74v-10.429h22.245%20c2.087,0,3.481,0,4.87-1.392c0.693-0.697,1.391-2.085,1.391-3.477c0-1.394-0.698-2.778-1.391-3.475%20c-0.696-0.695-2.085-1.391-4.172-1.391c-11.122-0.696-24.337,0-24.337-15.295c0-6.609,3.781-12.579,13.106-14.352%20c1.115-0.154,2.293-0.253,3.583-0.253h22.948v11.819h-15.3h-5.561h-0.696c-2.087,0-3.476,0-4.865,0.696%20c-0.7,0.697-1.396,2.089-1.396,3.478c0,2.087,0.696,2.783,2.785,3.473c1.389,0.697,2.78,0.697,4.172,0.697h0.691h5.565%20c3.039,0,5.337,0.375,7.44,1.114c1.926,0.697,8.302,3.549,9.728,10.994c0.124,0.78,0.215,1.594,0.215,2.495%20C466.761,313.925,465.37,317.401,462.59,320.179z'/%3e%3c/g%3e%3c/svg%3e",
|
|
4771
4740
|
discover: "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3c!--%20Uploaded%20to:%20SVG%20Repo,%20www.svgrepo.com,%20Generator:%20SVG%20Repo%20Mixer%20Tools%20--%3e%3csvg%20height='30px'%20width='30px'%20version='1.1'%20id='Capa_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%20512%20512'%20xml:space='preserve'%3e%3cpath%20style='fill:%2334495E;'%20d='M512,402.282c0,16.716-13.55,30.267-30.265,30.267H30.265C13.55,432.549,0,418.996,0,402.282V109.717%20c0-16.716,13.55-30.266,30.265-30.266h451.469c16.716,0,30.265,13.551,30.265,30.266L512,402.282L512,402.282z'/%3e%3cpath%20style='opacity:0.15;fill:%23202121;enable-background:new%20;'%20d='M21.517,402.282V109.717%20c0-16.716,13.552-30.266,30.267-30.266h-21.52C13.55,79.451,0,93.003,0,109.717v292.565c0,16.716,13.55,30.267,30.265,30.267h21.52%20C35.07,432.549,21.517,418.996,21.517,402.282z'/%3e%3cpath%20style='fill:%23F26E21;'%20d='M309.389,255.801c0.041-9.636-3.572-19.286-10.843-26.558c-7.287-7.287-16.961-10.897-26.617-10.839%20c-0.046,0-0.091-0.003-0.139-0.003c-20.968,0-37.6,16.628-37.6,37.602c0,20.767,16.837,37.599,37.6,37.599%20c20.974,0,37.604-16.631,37.604-37.599C309.394,255.934,309.389,255.869,309.389,255.801z'/%3e%3cg%3e%3cpath%20style='fill:%23E7E8E3;'%20d='M227.198,271.909c-5.62,5.626-10.807,7.824-16.394,7.943c-13.611-0.122-23.618-10.202-23.618-24.573%20c0-7.234,2.739-13.163,7.078-18.228l0,0c4.069-3.863,9.311-6.359,15.339-6.359c6.507,0,11.571,2.169,17.352,7.954v-16.631%20c-5.78-2.891-10.846-4.338-17.352-4.338c-9.192,0.657-17.859,4.371-24.507,10.203l0,0c-1.916,1.724-3.752,3.627-5.309,5.805%20c-4.856,6.294-7.791,14.001-7.791,22.32c0,20.967,16.637,36.875,37.606,36.875c0.102,0,0.203-0.009,0.302-0.01%20c0.141,0.002,0.28,0.01,0.42,0.01c5.784,0,10.85-1.443,17.357-4.336L227.198,271.909c-0.244,0.244,0.242,0.471,0,0.702V271.909z'/%3e%3cpolygon%20style='fill:%23E7E8E3;'%20points='356.863,228.033%20356.863,228.033%20340.487,268.295%20321.685,220.566%20306.502,220.566%20336.148,293.601%20344.102,293.601%20375.196,220.566%20360.013,220.566%20'/%3e%3cpolygon%20style='fill:%23E7E8E3;'%20points='380.983,252.384%20380.983,291.435%20420.033,291.435%20420.753,291.435%20420.753,279.861%20408.461,279.861%20395.445,279.861%20395.445,266.848%20395.445,260.342%20420.033,260.342%20420.033,248.045%20395.445,248.045%20395.445,232.861%20420.753,232.861%20420.753,220.566%20380.983,220.566%20'/%3e%3cpath%20style='fill:%23E7E8E3;'%20d='M54.135,220.566H33.884v70.869h20.25c10.845,0,18.798-2.895,25.306-7.957%20c7.953-6.508,13.017-16.629,13.017-27.474C92.458,235.028,77.27,220.566,54.135,220.566z%20M70.765,274.08%20c-4.339,3.614-10.124,5.781-18.802,5.781h-4.339V232.86h3.615c8.678,0,14.463,1.446,18.803,5.783%20c5.061,4.336,7.955,10.848,7.955,17.358C78.72,262.509,75.828,269.737,70.765,274.08z'/%3e%3crect%20x='98.97'%20y='220.56'%20style='fill:%23E7E8E3;'%20width='13.739'%20height='70.867'/%3e%3cpath%20style='fill:%23E7E8E3;'%20d='M147.415,248.045c-8.676-2.892-10.848-5.063-10.848-8.677c0-4.339,4.339-7.954,10.124-7.954%20c4.339,0,7.954,1.447,11.57,5.786l7.233-9.4c-5.787-5.064-13.015-7.953-20.97-7.953c-12.296,0-22.42,8.678-22.42,20.244%20c0,10.126,4.343,14.464,17.357,19.526c5.785,2.166,7.955,2.892,9.404,4.338c2.887,1.444,4.336,4.339,4.336,7.228%20c0,5.786-4.336,10.126-10.848,10.126c-6.514,0-12.294-3.615-15.187-9.401l-8.678,8.678c6.511,9.4,14.465,13.738,24.589,13.738%20c14.461,0,24.58-9.4,24.58-23.141C167.659,258.893,163.324,253.831,147.415,248.045z'/%3e%3cpath%20style='fill:%23E7E8E3;'%20d='M459.804,261.783c10.843-2.166,16.63-9.4,16.63-20.244c0-13.014-9.402-20.973-25.308-20.973h-20.972%20v70.869h13.739V263.23h2.172l19.519,28.205h16.634L459.804,261.783z%20M448.23,253.105h-4.336v-21.691h4.336%20c8.678,0,13.742,3.614,13.742,10.85C461.972,249.492,456.909,253.105,448.23,253.105z'/%3e%3c/g%3e%3c/svg%3e"
|
|
4772
|
-
},
|
|
4741
|
+
}, zo = class extends Q {
|
|
4773
4742
|
currentCardBrand = "unknown";
|
|
4774
4743
|
cardNumberHelperText;
|
|
4775
4744
|
cardExpiryHelperText;
|
|
@@ -4787,7 +4756,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4787
4756
|
borderRadius = 0;
|
|
4788
4757
|
_vgsFieldsReady = !1;
|
|
4789
4758
|
_borderColor = "#e0e0e0";
|
|
4790
|
-
_fieldHeight =
|
|
4759
|
+
_fieldHeight = So(vo, 14);
|
|
4791
4760
|
_previousVgsValidState = {};
|
|
4792
4761
|
_vgsAutoAdvanced = {};
|
|
4793
4762
|
_lastFocusedVgsField = null;
|
|
@@ -4796,17 +4765,17 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4796
4765
|
constructor(e) {
|
|
4797
4766
|
super("div", []);
|
|
4798
4767
|
let { checkoutProfile: t, translationFunc: n, vgsService: r } = e;
|
|
4799
|
-
this._vgsService = r, this.buildVgsLayout(t, n), this.errorMessagesContainer = document.createElement("div"), this.errorMessagesContainer.className = "error-messages-container", this.getElement().appendChild(this.errorMessagesContainer), this.cardNumberHelperText = new
|
|
4768
|
+
this._vgsService = r, this.buildVgsLayout(t, n), this.errorMessagesContainer = document.createElement("div"), this.errorMessagesContainer.className = "error-messages-container", this.getElement().appendChild(this.errorMessagesContainer), this.cardNumberHelperText = new jo({ visible: !1 }), this.cardExpiryHelperText = new jo({ visible: !1 }), this.cardCvvHelperText = new jo({ visible: !1 });
|
|
4800
4769
|
}
|
|
4801
4770
|
buildVgsLayout(e, t) {
|
|
4802
4771
|
let n = e.styles.borderRadius;
|
|
4803
|
-
this.borderRadius = n, this._fieldHeight =
|
|
4772
|
+
this.borderRadius = n, this._fieldHeight = So(vo, e.styles.fontSize), this.vgsCardGroup = document.createElement("div"), this.vgsCardGroup.className = "vgs-card-group", this.vgsCardGroup.style.borderRadius = `${n}px`, this.vgsCardGroup.style.display = "flex", this.vgsCardGroup.style.flexDirection = "column", this.vgsCardGroup.style.position = "relative";
|
|
4804
4773
|
let r = document.createElement("div");
|
|
4805
4774
|
r.className = "card-number-row", r.style.position = "relative", r.style.overflow = "hidden", this.vgsCardNumberContainer = document.createElement("div"), this.vgsCardNumberContainer.id = `vgs-cc-number-${Date.now()}`, this.vgsCardNumberContainer.style.position = "relative", this.vgsCardNumberContainer.style.zIndex = "1", this.vgsCardNumberContainer.style.width = "100%", this.vgsCardNumberContainer.style.height = "100%", r.appendChild(this.vgsCardNumberContainer), this.vgsCardIconsContainer = document.createElement("div"), this.vgsCardIconsContainer.className = "cards-position", this.updateVgsCardIcons("unknown"), r.appendChild(this.vgsCardIconsContainer);
|
|
4806
4775
|
let i = document.createElement("div");
|
|
4807
4776
|
i.style.marginBottom = "4px";
|
|
4808
4777
|
let a = document.createElement("label");
|
|
4809
|
-
a.className = "input-label", a.textContent = t("cardInformation"), a.style.fontFamily =
|
|
4778
|
+
a.className = "input-label", a.textContent = t("cardInformation"), a.style.fontFamily = co(e.styles.fontFamily), a.style.fontSize = `${e.styles.fontSize}px`, i.appendChild(a), this.getElement().appendChild(i), this.vgsCardGroup.appendChild(r);
|
|
4810
4779
|
let o = document.createElement("div");
|
|
4811
4780
|
o.className = "card-details", o.style.display = "flex";
|
|
4812
4781
|
let s = document.createElement("div");
|
|
@@ -4821,7 +4790,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4821
4790
|
this.vgsCardGroup && (this.vgsCardGroup.style.gap = "0"), this.vgsCardNumberRow && (this.vgsCardNumberRow.style.height = t, this.vgsCardNumberRow.style.borderRadius = `${e}px ${e}px 0 0`), this.vgsCardBottomRow && (this.vgsCardBottomRow.style.gap = "0", this.vgsCardBottomRow.style.marginTop = "-1px"), this.vgsExpiryCell && (this.vgsExpiryCell.style.height = t, this.vgsExpiryCell.style.borderRadius = `0 0 0 ${e}px`), this.vgsCvvCell && (this.vgsCvvCell.style.height = t, this.vgsCvvCell.style.marginLeft = "-1px", this.vgsCvvCell.style.borderRadius = `0 0 ${e}px 0`);
|
|
4822
4791
|
}
|
|
4823
4792
|
setVgsFieldMetrics(e, t) {
|
|
4824
|
-
this._fieldHeight =
|
|
4793
|
+
this._fieldHeight = So(e, t), this._applyMergedGeometry();
|
|
4825
4794
|
}
|
|
4826
4795
|
buildVgsFieldCss(e, t, n) {
|
|
4827
4796
|
let r = e.styles.borderRadius, i = n?.padding ?? "8px 12px";
|
|
@@ -4833,7 +4802,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4833
4802
|
padding: i,
|
|
4834
4803
|
"font-size": `${e.styles.fontSize}px`,
|
|
4835
4804
|
"font-weight": "400",
|
|
4836
|
-
"font-family":
|
|
4805
|
+
"font-family": co(e.styles.fontFamily),
|
|
4837
4806
|
"letter-spacing": "0.02em",
|
|
4838
4807
|
"line-height": "1.5",
|
|
4839
4808
|
color: e.styles.textColor,
|
|
@@ -4859,7 +4828,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4859
4828
|
}
|
|
4860
4829
|
};
|
|
4861
4830
|
t && (a["@font-face"] = {
|
|
4862
|
-
"font-family": e.styles.fontFamily,
|
|
4831
|
+
"font-family": so(oo(e.styles.fontFamily)[0] ?? e.styles.fontFamily),
|
|
4863
4832
|
"font-style": "normal",
|
|
4864
4833
|
"font-weight": "400",
|
|
4865
4834
|
"font-display": "swap",
|
|
@@ -4895,9 +4864,9 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
4895
4864
|
}
|
|
4896
4865
|
updateVgsCardIcons(e) {
|
|
4897
4866
|
if (this.vgsCardIconsContainer) {
|
|
4898
|
-
if (this.vgsCardIconsContainer.innerHTML = "", e === "unknown") for (let [e, t] of Object.entries(
|
|
4867
|
+
if (this.vgsCardIconsContainer.innerHTML = "", e === "unknown") for (let [e, t] of Object.entries(Ro)) this.vgsCardIconsContainer.appendChild(this.createCardIcon(e, t));
|
|
4899
4868
|
else {
|
|
4900
|
-
let t =
|
|
4869
|
+
let t = Ro[e];
|
|
4901
4870
|
t && this.vgsCardIconsContainer.appendChild(this.createCardIcon(e, t));
|
|
4902
4871
|
}
|
|
4903
4872
|
}
|
|
@@ -5015,21 +4984,21 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5015
4984
|
focus() {
|
|
5016
4985
|
this.focusField("cardNumber");
|
|
5017
4986
|
}
|
|
5018
|
-
},
|
|
4987
|
+
}, Bo = class extends Q {
|
|
5019
4988
|
constructor(e) {
|
|
5020
4989
|
super("div", ["card-unavailable"]);
|
|
5021
4990
|
let { checkoutProfile: t, translationFunc: n } = e, { fontFamily: r, fontSize: i, borderRadius: a } = t.styles, o = document.createElement("div");
|
|
5022
4991
|
o.style.marginBottom = "4px";
|
|
5023
4992
|
let s = document.createElement("div");
|
|
5024
|
-
s.className = "input-label", s.textContent = n("cardInformation"), s.style.fontFamily = `var(--odus-font-family,
|
|
4993
|
+
s.className = "input-label", s.textContent = n("cardInformation"), s.style.fontFamily = `var(--odus-font-family, ${co(r)})`, s.style.fontSize = `var(--odus-font-size, ${i}px)`, o.appendChild(s);
|
|
5025
4994
|
let c = document.createElement("div");
|
|
5026
|
-
c.className = "card-unavailable-message", c.setAttribute("role", "alert"), c.textContent = n("cardUnavailable"), c.style.fontFamily = `var(--odus-font-family,
|
|
4995
|
+
c.className = "card-unavailable-message", c.setAttribute("role", "alert"), c.textContent = n("cardUnavailable"), c.style.fontFamily = `var(--odus-font-family, ${co(r)})`, c.style.fontSize = `var(--odus-font-size, ${i}px)`, c.style.borderRadius = `var(--odus-border-radius, ${a}px)`, this.getElement().appendChild(o), this.getElement().appendChild(c);
|
|
5027
4996
|
}
|
|
5028
|
-
},
|
|
4997
|
+
}, Vo = class {
|
|
5029
4998
|
input;
|
|
5030
4999
|
constructor(e) {
|
|
5031
5000
|
let { value: t, onChange: n, onBlur: r, onTab: i, errorMsg: a, checkoutProfile: o, translationFunc: s, autocomplete: c = "email", label: l, placeholder: u } = e;
|
|
5032
|
-
this.input = new
|
|
5001
|
+
this.input = new Po({
|
|
5033
5002
|
name: "email",
|
|
5034
5003
|
label: l ?? s("email"),
|
|
5035
5004
|
error: !1,
|
|
@@ -5081,12 +5050,12 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5081
5050
|
focus() {
|
|
5082
5051
|
this.input.focus();
|
|
5083
5052
|
}
|
|
5084
|
-
},
|
|
5053
|
+
}, Ho = (e, t) => {
|
|
5085
5054
|
if (!e?.length) return !0;
|
|
5086
5055
|
if (!t) return !1;
|
|
5087
5056
|
let n = t.toUpperCase();
|
|
5088
5057
|
return e.some((e) => e.toUpperCase() === n);
|
|
5089
|
-
},
|
|
5058
|
+
}, Uo = async ({ id: e, domainName: n, displayName: r, checkoutKey: i, environment: a }) => {
|
|
5090
5059
|
let o = E(a), s = await fetch(`${o}${t.applePaySessions(e)}`, {
|
|
5091
5060
|
method: "POST",
|
|
5092
5061
|
headers: {
|
|
@@ -5100,14 +5069,14 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5100
5069
|
});
|
|
5101
5070
|
if (!s.ok) throw Error(`HTTP error! Status: ${s.status}`);
|
|
5102
5071
|
return await s.json();
|
|
5103
|
-
},
|
|
5072
|
+
}, Wo = () => {
|
|
5104
5073
|
if (typeof window > "u" || window.ApplePaySession === void 0 || typeof window.ApplePaySession.canMakePayments != "function") return !1;
|
|
5105
5074
|
try {
|
|
5106
5075
|
return window.ApplePaySession.canMakePayments();
|
|
5107
5076
|
} catch {
|
|
5108
5077
|
return !1;
|
|
5109
5078
|
}
|
|
5110
|
-
},
|
|
5079
|
+
}, Go = "Apple Pay payment data could not be read", Ko = class extends Q {
|
|
5111
5080
|
formData;
|
|
5112
5081
|
onSubmit;
|
|
5113
5082
|
onStartFailed;
|
|
@@ -5125,7 +5094,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5125
5094
|
let { formData: t, onSubmit: n, onStartFailed: r, onPaymentDataFailed: i, paymentId: a, checkoutKey: o, checkoutDetails: s, environment: c, displayName: l, requiredBillingContactFields: u, requiredShippingContactFields: d } = e;
|
|
5126
5095
|
this.formData = t, this.onSubmit = n, this.onStartFailed = r, this.onPaymentDataFailed = i, this.paymentId = a, this.checkoutKey = o, this.checkoutDetails = s, this.environment = c, this.displayName = l || "Payment", this.requiredBillingContactFields = u, this.requiredShippingContactFields = d;
|
|
5127
5096
|
let f = this.getElement();
|
|
5128
|
-
f.setAttribute("buttonstyle", "black"), f.setAttribute("type", "plain"), f.setAttribute("locale", "en"), f.style.setProperty("--apple-pay-button-height", "40px"), f.style.setProperty("--apple-pay-button-border-radius", "4px"), f.style.setProperty("--apple-pay-button-padding", "0px 0px"), f.style.setProperty("--apple-pay-button-box-sizing", "border-box"), f.style.cursor = n ? "pointer" : "default", f.style.opacity = "1",
|
|
5097
|
+
f.setAttribute("buttonstyle", "black"), f.setAttribute("type", "plain"), f.setAttribute("locale", "en"), f.style.setProperty("--apple-pay-button-height", "40px"), f.style.setProperty("--apple-pay-button-border-radius", "4px"), f.style.setProperty("--apple-pay-button-padding", "0px 0px"), f.style.setProperty("--apple-pay-button-box-sizing", "border-box"), f.style.cursor = n ? "pointer" : "default", f.style.opacity = "1", Wo() || (f.style.display = "none"), n && this.getElement().addEventListener("click", () => this.handleApplePayClick());
|
|
5129
5098
|
}
|
|
5130
5099
|
async handleApplePayClick() {
|
|
5131
5100
|
if (this.onSubmit && !this.isSubmitting) {
|
|
@@ -5172,7 +5141,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5172
5141
|
let i = new window.ApplePaySession(3, r), a = !1;
|
|
5173
5142
|
i.onvalidatemerchant = async () => {
|
|
5174
5143
|
try {
|
|
5175
|
-
let e = await
|
|
5144
|
+
let e = await Uo({
|
|
5176
5145
|
id: this.paymentId,
|
|
5177
5146
|
domainName: window.location.hostname,
|
|
5178
5147
|
displayName: this.displayName,
|
|
@@ -5238,7 +5207,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5238
5207
|
Z(n.PAYMENT_SUBMIT_FAILED, {
|
|
5239
5208
|
payment_id: this.paymentId,
|
|
5240
5209
|
payment_method: t.paymentMethod,
|
|
5241
|
-
error_message:
|
|
5210
|
+
error_message: Go,
|
|
5242
5211
|
failure_class: i.SDK_ERROR,
|
|
5243
5212
|
http_status: a,
|
|
5244
5213
|
error_class: xi(e)
|
|
@@ -5250,7 +5219,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5250
5219
|
setSubmitting(e) {
|
|
5251
5220
|
return this.isSubmitting = e, this.getElement().style.opacity = e ? "0.7" : "1", this.getElement().style.pointerEvents = e ? "none" : "auto", this;
|
|
5252
5221
|
}
|
|
5253
|
-
},
|
|
5222
|
+
}, qo = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='101px'%20height='32'%20viewBox='0%200%20101%2032'%20preserveAspectRatio='xMinYMin%20meet'%3e%3cpath%20fill='%23003087'%20d='M%2012.237%202.8%20L%204.437%202.8%20C%203.937%202.8%203.437%203.2%203.337%203.7%20L%200.237%2023.7%20C%200.137%2024.1%200.437%2024.4%200.837%2024.4%20L%204.537%2024.4%20C%205.037%2024.4%205.537%2024%205.637%2023.5%20L%206.437%2018.1%20C%206.537%2017.6%206.937%2017.2%207.537%2017.2%20L%2010.037%2017.2%20C%2015.137%2017.2%2018.137%2014.7%2018.937%209.8%20C%2019.237%207.7%2018.937%206%2017.937%204.8%20C%2016.837%203.5%2014.837%202.8%2012.237%202.8%20Z%20M%2013.137%2010.1%20C%2012.737%2012.9%2010.537%2012.9%208.537%2012.9%20L%207.337%2012.9%20L%208.137%207.7%20C%208.137%207.4%208.437%207.2%208.737%207.2%20L%209.237%207.2%20C%2010.637%207.2%2011.937%207.2%2012.637%208%20C%2013.137%208.4%2013.337%209.1%2013.137%2010.1%20Z'/%3e%3cpath%20fill='%23003087'%20d='M%2035.437%2010%20L%2031.737%2010%20C%2031.437%2010%2031.137%2010.2%2031.137%2010.5%20L%2030.937%2011.5%20L%2030.637%2011.1%20C%2029.837%209.9%2028.037%209.5%2026.237%209.5%20C%2022.137%209.5%2018.637%2012.6%2017.937%2017%20C%2017.537%2019.2%2018.037%2021.3%2019.337%2022.7%20C%2020.437%2024%2022.137%2024.6%2024.037%2024.6%20C%2027.337%2024.6%2029.237%2022.5%2029.237%2022.5%20L%2029.037%2023.5%20C%2028.937%2023.9%2029.237%2024.3%2029.637%2024.3%20L%2033.037%2024.3%20C%2033.537%2024.3%2034.037%2023.9%2034.137%2023.4%20L%2036.137%2010.6%20C%2036.237%2010.4%2035.837%2010%2035.437%2010%20Z%20M%2030.337%2017.2%20C%2029.937%2019.3%2028.337%2020.8%2026.137%2020.8%20C%2025.037%2020.8%2024.237%2020.5%2023.637%2019.8%20C%2023.037%2019.1%2022.837%2018.2%2023.037%2017.2%20C%2023.337%2015.1%2025.137%2013.6%2027.237%2013.6%20C%2028.337%2013.6%2029.137%2014%2029.737%2014.6%20C%2030.237%2015.3%2030.437%2016.2%2030.337%2017.2%20Z'/%3e%3cpath%20fill='%23003087'%20d='M%2055.337%2010%20L%2051.637%2010%20C%2051.237%2010%2050.937%2010.2%2050.737%2010.5%20L%2045.537%2018.1%20L%2043.337%2010.8%20C%2043.237%2010.3%2042.737%2010%2042.337%2010%20L%2038.637%2010%20C%2038.237%2010%2037.837%2010.4%2038.037%2010.9%20L%2042.137%2023%20L%2038.237%2028.4%20C%2037.937%2028.8%2038.237%2029.4%2038.737%2029.4%20L%2042.437%2029.4%20C%2042.837%2029.4%2043.137%2029.2%2043.337%2028.9%20L%2055.837%2010.9%20C%2056.137%2010.6%2055.837%2010%2055.337%2010%20Z'/%3e%3cpath%20fill='%23009cde'%20d='M%2067.737%202.8%20L%2059.937%202.8%20C%2059.437%202.8%2058.937%203.2%2058.837%203.7%20L%2055.737%2023.6%20C%2055.637%2024%2055.937%2024.3%2056.337%2024.3%20L%2060.337%2024.3%20C%2060.737%2024.3%2061.037%2024%2061.037%2023.7%20L%2061.937%2018%20C%2062.037%2017.5%2062.437%2017.1%2063.037%2017.1%20L%2065.537%2017.1%20C%2070.637%2017.1%2073.637%2014.6%2074.437%209.7%20C%2074.737%207.6%2074.437%205.9%2073.437%204.7%20C%2072.237%203.5%2070.337%202.8%2067.737%202.8%20Z%20M%2068.637%2010.1%20C%2068.237%2012.9%2066.037%2012.9%2064.037%2012.9%20L%2062.837%2012.9%20L%2063.637%207.7%20C%2063.637%207.4%2063.937%207.2%2064.237%207.2%20L%2064.737%207.2%20C%2066.137%207.2%2067.437%207.2%2068.137%208%20C%2068.637%208.4%2068.737%209.1%2068.637%2010.1%20Z'/%3e%3cpath%20fill='%23009cde'%20d='M%2090.937%2010%20L%2087.237%2010%20C%2086.937%2010%2086.637%2010.2%2086.637%2010.5%20L%2086.437%2011.5%20L%2086.137%2011.1%20C%2085.337%209.9%2083.537%209.5%2081.737%209.5%20C%2077.637%209.5%2074.137%2012.6%2073.437%2017%20C%2073.037%2019.2%2073.537%2021.3%2074.837%2022.7%20C%2075.937%2024%2077.637%2024.6%2079.537%2024.6%20C%2082.837%2024.6%2084.737%2022.5%2084.737%2022.5%20L%2084.537%2023.5%20C%2084.437%2023.9%2084.737%2024.3%2085.137%2024.3%20L%2088.537%2024.3%20C%2089.037%2024.3%2089.537%2023.9%2089.637%2023.4%20L%2091.637%2010.6%20C%2091.637%2010.4%2091.337%2010%2090.937%2010%20Z%20M%2085.737%2017.2%20C%2085.337%2019.3%2083.737%2020.8%2081.537%2020.8%20C%2080.437%2020.8%2079.637%2020.5%2079.037%2019.8%20C%2078.437%2019.1%2078.237%2018.2%2078.437%2017.2%20C%2078.737%2015.1%2080.537%2013.6%2082.637%2013.6%20C%2083.737%2013.6%2084.537%2014%2085.137%2014.6%20C%2085.737%2015.3%2085.937%2016.2%2085.737%2017.2%20Z'/%3e%3cpath%20fill='%23009cde'%20d='M%2095.337%203.3%20L%2092.137%2023.6%20C%2092.037%2024%2092.337%2024.3%2092.737%2024.3%20L%2095.937%2024.3%20C%2096.437%2024.3%2096.937%2023.9%2097.037%2023.4%20L%20100.237%203.5%20C%20100.337%203.1%20100.037%202.8%2099.637%202.8%20L%2096.037%202.8%20C%2095.637%202.8%2095.437%203%2095.337%203.3%20Z'/%3e%3c/svg%3e", Jo = class extends Q {
|
|
5254
5223
|
formData;
|
|
5255
5224
|
onSubmit;
|
|
5256
5225
|
isSubmitting = !1;
|
|
@@ -5261,7 +5230,7 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5261
5230
|
let r = document.createElement("div");
|
|
5262
5231
|
r.className = "paypal-icon-container";
|
|
5263
5232
|
let i = document.createElement("img");
|
|
5264
|
-
i.src =
|
|
5233
|
+
i.src = qo, i.style.width = "69px", i.style.height = "22px", i.style.maxWidth = "100%", i.style.display = "block", i.style.height = "auto", r.appendChild(i), this.getElement().appendChild(r), n && this.getElement().addEventListener("click", () => this.handleSubmit());
|
|
5265
5234
|
}
|
|
5266
5235
|
async handleSubmit() {
|
|
5267
5236
|
if (this.onSubmit && !this.isSubmitting) {
|
|
@@ -5281,16 +5250,16 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5281
5250
|
setSubmitting(e) {
|
|
5282
5251
|
return this.isSubmitting = e, this.getElement().style.opacity = e ? "0.7" : "1", this;
|
|
5283
5252
|
}
|
|
5284
|
-
},
|
|
5253
|
+
}, Yo = class extends Q {
|
|
5285
5254
|
messageComponent;
|
|
5286
5255
|
constructor(e) {
|
|
5287
5256
|
super("div", []);
|
|
5288
|
-
let t =
|
|
5257
|
+
let t = Mo.createDiv(["error-alert"], {
|
|
5289
5258
|
role: "alert",
|
|
5290
5259
|
"aria-live": "polite"
|
|
5291
|
-
}), n =
|
|
5260
|
+
}), n = Mo.createDiv(["error-alert-content"]), r = Mo.createDiv(["error-alert-icon-container"]);
|
|
5292
5261
|
r.getElement().innerHTML = this.createAlertCircleSVG();
|
|
5293
|
-
let i =
|
|
5262
|
+
let i = Mo.createDiv(["error-alert-text-container"]), a = new Q("h4", ["error-alert-title"]);
|
|
5294
5263
|
a.setText("Checkout Error"), this.messageComponent = new Q("p", ["error-alert-message"]), this.messageComponent.setText(e.message || "Bad request"), i.appendChild(a), i.appendChild(this.messageComponent), n.appendChild(r), n.appendChild(i), t.appendChild(n), this.appendChild(t);
|
|
5295
5264
|
}
|
|
5296
5265
|
createAlertCircleSVG() {
|
|
@@ -5299,6 +5268,6 @@ var vo = (e) => e.replace(/([A-Z])/g, " $1").trim(), yo = Object.fromEntries(Obj
|
|
|
5299
5268
|
setMessage(e) {
|
|
5300
5269
|
return this.messageComponent.setText(e), this;
|
|
5301
5270
|
}
|
|
5302
|
-
},
|
|
5271
|
+
}, Xo = (e) => e.latestTransaction ? e.latestTransaction.status : e.status === "succeeded" ? "authorized" : void 0;
|
|
5303
5272
|
//#endregion
|
|
5304
|
-
export {
|
|
5273
|
+
export { Oi as $, Ga as A, Ca as B, mo as C, $a as D, eo as E, za as F, ia as G, ga as H, La as I, Ki as J, ra as K, Ia as L, Ha as M, Va as N, Ja as O, Ba as P, ji as Q, Aa as R, _o as S, s as St, no as T, pa as U, wa as V, sa as W, Wi as X, Gi as Y, Ui as Z, Ao as _, u as _t, Wo as a, mi as at, So as b, o as bt, Bo as c, _i as ct, Lo as d, w as dt, ki as et, Fo as f, C as ft, jo as g, n as gt, Mo as h, c as ht, Ko as i, xi as it, Ua as j, Ka as k, zo as l, gi as lt, No as m, x as mt, Yo as n, wi as nt, Ho as o, hi as ot, Po as p, T as pt, ea as q, Jo as r, Ti as rt, Vo as s, Z as st, Xo as t, Ai as tt, $ as u, D as ut, ko as v, r as vt, co as w, Q as x, p as xt, vo as y, i as yt, Ta as z };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { VGSCardUpdateValue } from '../../core/vgs/VGSCollectService';
|
|
2
1
|
export type AddressData = {
|
|
3
2
|
street: string;
|
|
4
3
|
firstName: string;
|
|
@@ -29,7 +28,6 @@ export type FormData = {
|
|
|
29
28
|
expMonth: string;
|
|
30
29
|
expYear: string;
|
|
31
30
|
name: string;
|
|
32
|
-
updatedValues?: VGSCardUpdateValue[];
|
|
33
31
|
};
|
|
34
32
|
};
|
|
35
33
|
export type FormErrors = Partial<Record<Exclude<keyof FormData, 'billingAddress' | 'shippingAddress'>, string>> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormData.type.d.ts","sourceRoot":"","sources":["../../../src/types/common/FormData.type.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"FormData.type.d.ts","sourceRoot":"","sources":["../../../src/types/common/FormData.type.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,cAAc,CAAC,EAAE,WAAW,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,WAAW,CAAC,EAAE;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,CAC9B,MAAM,CAAC,OAAO,CAAC,MAAM,QAAQ,EAAE,gBAAgB,GAAG,iBAAiB,CAAC,EAAE,MAAM,CAAC,CAC9E,GAAG;IACF,cAAc,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IAC5D,eAAe,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9D,CAAC"}
|
|
@@ -152,8 +152,8 @@ export declare const TokenizationFailureCauses: {
|
|
|
152
152
|
readonly REJECTED: "rejected";
|
|
153
153
|
/** The card API answered without a card id. */
|
|
154
154
|
readonly NO_CARD_ID: "no_card_id";
|
|
155
|
-
/**
|
|
156
|
-
readonly
|
|
155
|
+
/** VGS answered with an existing card, which the SDK never changes. */
|
|
156
|
+
readonly DUPLICATE_CARD: "duplicate_card";
|
|
157
157
|
/** The VGS form or its session was not there to tokenize with. */
|
|
158
158
|
readonly NOT_INITIALIZED: "not_initialized";
|
|
159
159
|
/** The card block failed closed, so there was nothing to tokenize. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TelemetryEvents.type.d.ts","sourceRoot":"","sources":["../../../src/types/telemetry/TelemetryEvents.type.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;CAwCjB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC;AAMvD,eAAO,MAAM,oBAAoB;;;;;;CAMvB,CAAC;AAEX,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAMnE,MAAM,MAAM,6BAA6B,GAAG;IAC1C,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc;IACzB,gCAAgC;;IAEhC,2EAA2E;;IAE3E,0EAA0E;;IAE1E,2DAA2D;;IAE3D,4EAA4E;;IAE5E,iCAAiC;;IAEjC,kDAAkD;;CAE1C,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,O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