@payfurl/client 4.9.4 → 4.9.6

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.
Files changed (24) hide show
  1. package/dist/sdk/{CloseIcon-DUKC8zu2.js → CloseIcon-BwxBac9r.js} +1040 -968
  2. package/dist/sdk/{DefaultThreeDsProvider-BQXZxRSe.js → DefaultThreeDsProvider-V6kOxHoH.js} +1 -1
  3. package/dist/sdk/{MetricsGlobalThreeDsProvider-CRGRhdai.js → MetricsGlobalThreeDsProvider-CgDVIbXk.js} +3 -3
  4. package/dist/sdk/{PayWayAppleButton-BoR7Jodl.js → PayWayAppleButton-NRBJ3jjI.js} +1 -1
  5. package/dist/sdk/{alerts-DMTJSYFZ.js → alerts-DE81O3wN.js} +1 -1
  6. package/dist/sdk/{cxpay-BpEM9LbT.js → cxpay-BEMrWL1q.js} +1 -1
  7. package/dist/sdk/{default-CE5nSCNU.js → default-BQDjOwfs.js} +1 -1
  8. package/dist/sdk/{ecentric-C-L8fXG9.js → ecentric-C5_oNEas.js} +2 -2
  9. package/dist/sdk/{epna-CJhaNici.js → epna-DX-S7yA6.js} +1 -1
  10. package/dist/sdk/{flashbanc-3uXb_QxD.js → flashbanc-xqp3XO6M.js} +1 -1
  11. package/dist/sdk/{forter-CMRlI8RN.js → forter-5rzXRwAX.js} +2 -2
  12. package/dist/sdk/{gpayments-D6zvi_nT.js → gpayments-DOv0-hRx.js} +2 -2
  13. package/dist/sdk/{metrics_global-Bkoz0wJ4.js → metrics_global-C--PnyF9.js} +1 -1
  14. package/dist/sdk/{nmi-D4gXIH6V.js → nmi-Y-RgOB0Y.js} +1 -1
  15. package/dist/sdk/{nuvei-ZtJQN-Yz.js → nuvei-BOMMfI_5.js} +2 -2
  16. package/dist/sdk/{payabli-DlSJfDyv.js → payabli-OU7W7cbE.js} +1 -1
  17. package/dist/sdk/payfurl.es.js +476 -516
  18. package/dist/sdk/payfurl.umd.js +8 -8
  19. package/dist/sdk/{payglocal-BC6XGiGa.js → payglocal-BxWTWcIu.js} +3 -3
  20. package/dist/sdk/{payway_rest-DJaZXkt6.js → payway_rest-BX6JbR1g.js} +1 -1
  21. package/dist/sdk/{skybank-D-w9VqY5.js → skybank-BxtSlq18.js} +1 -1
  22. package/dist/sdk/strings-DmWzID7u.js +174 -0
  23. package/package.json +1 -1
  24. package/dist/sdk/strings-5YUlt4uC.js +0 -113
@@ -1,9 +1,9 @@
1
- import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, Dt as s, Et as c, F as l, Ft as u, H as d, I as f, It as p, K as m, L as h, Lt as g, M as _, Mt as v, Nt as y, Ot as b, P as x, Pt as S, Q as ee, R as te, Rt as ne, S as re, St as ie, Tt as C, U as ae, W as oe, X as se, Y as ce, Z as w, _t as le, a as ue, at as de, b as fe, bt as T, c as pe, ct as me, d as he, dt as E, et as ge, f as _e, ft as ve, gt as ye, ht as be, it as xe, j as Se, jt as Ce, kt as we, lt as Te, m as Ee, mt as De, n as Oe, nt as ke, o as Ae, ot as je, pt as Me, r as Ne, rt as D, st as Pe, t as Fe, tt as Ie, ut as O, v as Le, vt as k, wt as Re, x as ze, xt as A, y as Be, yt as Ve, z as He, zt as Ue } from "./CloseIcon-DUKC8zu2.js";
2
- import { a as We, c as Ge, i as Ke, l as qe, n as Je, o as j, r as M, s as N, t as Ye, u as Xe } from "./strings-5YUlt4uC.js";
1
+ import { $ as e, A as t, At as n, B as r, Bt as i, C as a, Ct as o, Dt as s, Et as c, F as l, Ft as u, H as d, I as f, It as p, K as m, L as h, Lt as g, M as _, Mt as v, Nt as y, Ot as b, P as x, Pt as S, Q as ee, R as te, Rt as ne, S as re, St as ie, Tt as C, U as ae, W as oe, X as se, Y as ce, Z as w, _t as le, a as ue, at as de, b as fe, bt as T, c as pe, ct as me, d as he, dt as ge, et as _e, f as ve, ft as ye, gt as E, ht as be, it as xe, j as Se, jt as Ce, kt as we, lt as Te, m as Ee, mt as De, n as Oe, nt as ke, o as Ae, ot as je, pt as Me, r as Ne, rt as D, st as Pe, t as Fe, tt as Ie, ut as O, v as Le, vt as k, wt as Re, x as ze, xt as A, y as Be, yt as Ve, z as He, zt as Ue } from "./CloseIcon-BwxBac9r.js";
2
+ import { a as We, c as Ge, d as j, i as Ke, l as qe, n as Je, o as M, r as N, s as P, t as Ye, u as Xe } from "./strings-DmWzID7u.js";
3
3
  import { t as Ze } from "./screen-D7xBu0cj.js";
4
- import { n as Qe, t as P } from "./alerts-DMTJSYFZ.js";
4
+ import { n as Qe, t as F } from "./alerts-DE81O3wN.js";
5
5
  //#region node_modules/tslib/tslib.es6.mjs
6
- function F(e, t, n, r) {
6
+ function I(e, t, n, r) {
7
7
  var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
8
8
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
9
9
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
@@ -19,7 +19,7 @@ var $e = class e {
19
19
  httpInvoker = null;
20
20
  constructor() {
21
21
  if (e.instance) return e.instance;
22
- this.httpInvoker = new N(), e.instance = this;
22
+ this.httpInvoker = new P(), e.instance = this;
23
23
  }
24
24
  static init(t, n, r) {
25
25
  return e.environment = t, e.publicKey = n, e.version = r, new e();
@@ -53,7 +53,7 @@ var $e = class e {
53
53
  };
54
54
  //#endregion
55
55
  //#region src/utils/ErrorHandled.ts
56
- function I(e, t, n) {
56
+ function L(e, t, n) {
57
57
  let r = n.value;
58
58
  n.value = function() {
59
59
  try {
@@ -68,7 +68,7 @@ function I(e, t, n) {
68
68
  }
69
69
  };
70
70
  }
71
- function L(e, t, n) {
71
+ function R(e, t, n) {
72
72
  return function(...r) {
73
73
  try {
74
74
  return n.apply(e, r);
@@ -237,7 +237,7 @@ var ut = ["id"], dt = ["id", "onClick"], ft = ["value", "id"], pt = { class: "co
237
237
  }), (e, r) => (b(), A("div", {
238
238
  class: "payfurl-sdk-combined-container",
239
239
  id: g(ct)
240
- }, [(b(!0), A(ye, null, we(t.elements, (e, t) => (b(), A(ye, { key: `container-component${t}` }, [a.value[t] ? T("", !0) : (b(), A("div", {
240
+ }, [(b(!0), A(E, null, we(t.elements, (e, t) => (b(), A(E, { key: `container-component${t}` }, [a.value[t] ? T("", !0) : (b(), A("div", {
241
241
  key: 0,
242
242
  class: ne(["payfurl-sdk-combined-tab", t === n.value ? "active" : ""]),
243
243
  id: e.id || `combined-tab${t}`,
@@ -476,7 +476,7 @@ var ut = ["id"], dt = ["id", "onClick"], ft = ["value", "id"], pt = { class: "co
476
476
  XOF: 0,
477
477
  XPF: 0
478
478
  };
479
- function R(e) {
479
+ function z(e) {
480
480
  return !!yt[String(e).toUpperCase()];
481
481
  }
482
482
  function xt(e) {
@@ -487,7 +487,7 @@ function St(e) {
487
487
  }
488
488
  //#endregion
489
489
  //#region src/sdk/processors/threeDsProcessor.ts
490
- var { hideSpinner: Ct, showSpinner: wt } = Oe(), z = {
490
+ var { hideSpinner: Ct, showSpinner: wt } = Oe(), B = {
491
491
  PREAUTH: "PREAUTH",
492
492
  AUTH: "AUTH",
493
493
  POSTAUTH: "POSTAUTH",
@@ -495,36 +495,36 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), z = {
495
495
  GET_GATEWAY_DATA: "GET_GATEWAY_DATA",
496
496
  TOKENISE_CARD: "TOKENISE_CARD",
497
497
  PUT_TOKEN_EXTERNAL_3DS_DATA: "PUT_TOKEN_EXTERNAL_3DS_DATA"
498
- }, B = (e, t) => ({
499
- [z.PREAUTH]: {
498
+ }, V = (e, t) => ({
499
+ [B.PREAUTH]: {
500
500
  url: e + (t ? "/3ds/preauth/token/" + t : "/3ds/preauth"),
501
501
  method: "POST"
502
502
  },
503
- [z.AUTH]: {
503
+ [B.AUTH]: {
504
504
  url: e + (t ? "/3ds/auth/token/" + t : "/3ds/auth"),
505
505
  method: "POST"
506
506
  },
507
- [z.POSTAUTH]: {
507
+ [B.POSTAUTH]: {
508
508
  url: e + "/3ds/postauth",
509
509
  method: "POST"
510
510
  },
511
- [z.AUTH_COMPLETE]: {
511
+ [B.AUTH_COMPLETE]: {
512
512
  url: e + "/3ds/auth_complete",
513
513
  method: "POST"
514
514
  },
515
- [z.GET_GATEWAY_DATA]: {
515
+ [B.GET_GATEWAY_DATA]: {
516
516
  url: e + "/token/" + t + "/gateway_data",
517
517
  method: "GET"
518
518
  },
519
- [z.TOKENISE_CARD]: {
519
+ [B.TOKENISE_CARD]: {
520
520
  url: e + "/token/card",
521
521
  method: "POST"
522
522
  },
523
- [z.PUT_TOKEN_EXTERNAL_3DS_DATA]: {
523
+ [B.PUT_TOKEN_EXTERNAL_3DS_DATA]: {
524
524
  url: e + "/token/" + t + "/external3dsdata",
525
525
  method: "PUT"
526
526
  }
527
- }), V = class {
527
+ }), H = class {
528
528
  container = null;
529
529
  log;
530
530
  apiUrl = "";
@@ -546,8 +546,8 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), z = {
546
546
  httpInvoker = null;
547
547
  constructor(e, t) {
548
548
  this.log = e, this.apiUrl = t.apiUrl, this.providerId = t.providerId, this.cardProviderId = t.cardProviderId, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null, this.threeDsInvoker = t.threeDsInvoker || null;
549
- let n = new j(t.environment, M(t.publicKey));
550
- this.httpInvoker = new N(t.publicKey, t.version, n);
549
+ let n = new M(t.environment, N(t.publicKey));
550
+ this.httpInvoker = new P(t.publicKey, t.version, n);
551
551
  }
552
552
  setTokenId(e) {
553
553
  this.tokenId = e;
@@ -601,7 +601,7 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), z = {
601
601
  return { ...this.clientParameters };
602
602
  }
603
603
  onError(e) {
604
- this.log("[3ds error]", e), Ct(), P(this.container, e.error), this.threeDSFailureHandler ? this.threeDSFailureHandler(e) : this.failureCallback?.(e);
604
+ this.log("[3ds error]", e), Ct(), F(this.container, e.error), this.threeDSFailureHandler ? this.threeDSFailureHandler(e) : this.failureCallback?.(e);
605
605
  }
606
606
  onSuccess(e) {
607
607
  Ct(), this.log("[3ds success]", e), this.threeDSCompleteHandler ? this.threeDSCompleteHandler?.(e) : this.successCallback?.(e);
@@ -613,7 +613,7 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), z = {
613
613
  ccv: this.paymentInfo?.ccv,
614
614
  cardProviderId: this.cardProviderId
615
615
  };
616
- this.log("[onPreAuth]", n), this.httpInvoker?.invoke(B(this.apiUrl, this.tokenId)[z.PREAUTH].url, B(this.apiUrl, this.tokenId)[z.PREAUTH].method, JSON.stringify(n), e, t);
616
+ this.log("[onPreAuth]", n), this.httpInvoker?.invoke(V(this.apiUrl, this.tokenId)[B.PREAUTH].url, V(this.apiUrl, this.tokenId)[B.PREAUTH].method, JSON.stringify(n), e, t);
617
617
  }
618
618
  onAuth(e, t, n, r, i, a, o) {
619
619
  this.log("[onAuth]", {
@@ -656,26 +656,26 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), z = {
656
656
  ccv: this.paymentInfo?.ccv && String(this.paymentInfo?.ccv) || "",
657
657
  threeDSRequestorChallengeInd: this.requireChallenge ? "04" : "01"
658
658
  };
659
- this.httpInvoker?.invoke(B(this.apiUrl, this.tokenId)[z.AUTH].url, B(this.apiUrl, this.tokenId)[z.AUTH].method, JSON.stringify(u), (e, t) => {
659
+ this.httpInvoker?.invoke(V(this.apiUrl, this.tokenId)[B.AUTH].url, V(this.apiUrl, this.tokenId)[B.AUTH].method, JSON.stringify(u), (e, t) => {
660
660
  Ct(), a(e, t);
661
661
  }, o);
662
662
  }
663
663
  onPostAuth(e, t, n) {
664
- this.log("[onPostAuth]", e), wt(), this.httpInvoker?.invoke(B(this.apiUrl, this.tokenId)[z.POSTAUTH].url, B(this.apiUrl, this.tokenId)[z.POSTAUTH].method, JSON.stringify(e), t, n);
664
+ this.log("[onPostAuth]", e), wt(), this.httpInvoker?.invoke(V(this.apiUrl, this.tokenId)[B.POSTAUTH].url, V(this.apiUrl, this.tokenId)[B.POSTAUTH].method, JSON.stringify(e), t, n);
665
665
  }
666
666
  threeDSInvoke(e, t, n, r) {
667
667
  this.container = e, this.threeDSCompleteHandler = n || null, this.threeDSFailureHandler = r || null, this.requireChallenge = t, this.threeDsInvoker?.onPreAuth();
668
668
  }
669
669
  getGatewayData(e, t, n, r) {
670
- this.httpInvoker?.invoke(B(this.apiUrl, t)[z.GET_GATEWAY_DATA].url, B(this.apiUrl, t)[z.GET_GATEWAY_DATA].method, null, L(this, "[getGatewayDataSuccessCallback]", (e, t) => {
670
+ this.httpInvoker?.invoke(V(this.apiUrl, t)[B.GET_GATEWAY_DATA].url, V(this.apiUrl, t)[B.GET_GATEWAY_DATA].method, null, R(this, "[getGatewayDataSuccessCallback]", (e, t) => {
671
671
  this.log("getGatewayDataSuccessCallback", e), n(JSON.parse(t));
672
- }), L(this, "[getGatewayDataFailureCallback]", (e, t) => {
672
+ }), R(this, "[getGatewayDataFailureCallback]", (e, t) => {
673
673
  this.log("getGatewayDataFailureCallback", e, t), Ct(), r();
674
674
  }), { providerId: e });
675
675
  }
676
676
  tokeniseCard(e, t, n) {
677
677
  let r = this.getPaymentInfo();
678
- !r.cardNumber || !r.expiryDate || !r.cardholder ? n("Card information is missing") : (wt(), this.httpInvoker?.invoke(B(this.apiUrl)[z.TOKENISE_CARD].url, B(this.apiUrl)[z.TOKENISE_CARD].method, JSON.stringify({
678
+ !r.cardNumber || !r.expiryDate || !r.cardholder ? n("Card information is missing") : (wt(), this.httpInvoker?.invoke(V(this.apiUrl)[B.TOKENISE_CARD].url, V(this.apiUrl)[B.TOKENISE_CARD].method, JSON.stringify({
679
679
  paymentInformation: {
680
680
  cardNumber: r.cardNumber,
681
681
  expiryDate: `${r.expiryDate.slice(2)}/${r.expiryDate.slice(0, 2)}`,
@@ -684,25 +684,25 @@ var { hideSpinner: Ct, showSpinner: wt } = Oe(), z = {
684
684
  },
685
685
  currency: this.getCurrency(),
686
686
  amount: this.getAmount()
687
- }), L(this, "[tokeniseCardSuccessCallback]", (e, n) => {
687
+ }), R(this, "[tokeniseCardSuccessCallback]", (e, n) => {
688
688
  this.log("tokeniseCardSuccessCallback", e, n), Ct(), t(JSON.parse(n));
689
- }), L(this, "[tokeniseCardFailureCallback]", (e, t) => {
689
+ }), R(this, "[tokeniseCardFailureCallback]", (e, t) => {
690
690
  this.log("tokeniseCardFailureCallback", e, t), Ct(), n("Unable to tokenise payment information");
691
691
  }), { providerId: e }));
692
692
  }
693
693
  updateTokenExternal3dsData(e) {
694
- this.tokenId && e && Object.keys(e).length !== 0 && this.httpInvoker?.invoke(B(this.apiUrl, this.tokenId)[z.PUT_TOKEN_EXTERNAL_3DS_DATA].url, B(this.apiUrl, this.tokenId)[z.PUT_TOKEN_EXTERNAL_3DS_DATA].method, JSON.stringify(e), (e, t) => {
694
+ this.tokenId && e && Object.keys(e).length !== 0 && this.httpInvoker?.invoke(V(this.apiUrl, this.tokenId)[B.PUT_TOKEN_EXTERNAL_3DS_DATA].url, V(this.apiUrl, this.tokenId)[B.PUT_TOKEN_EXTERNAL_3DS_DATA].method, JSON.stringify(e), (e, t) => {
695
695
  this.log("updateTokenExternal3dsDataSuccessCallback", e, t);
696
696
  }, (e, t) => {
697
697
  this.log("updateTokenExternal3dsDataFailureCallback", e, t), Ct();
698
698
  }, {});
699
699
  }
700
700
  };
701
- F([I], V.prototype, "setPaymentInfo", null), F([I], V.prototype, "onError", null), F([I], V.prototype, "onSuccess", null), F([I], V.prototype, "onPreAuth", null), F([I], V.prototype, "onAuth", null), F([I], V.prototype, "onPostAuth", null), F([I], V.prototype, "threeDSInvoke", null), F([I], V.prototype, "getGatewayData", null), F([I], V.prototype, "tokeniseCard", null), F([I], V.prototype, "updateTokenExternal3dsData", null);
701
+ I([L], H.prototype, "setPaymentInfo", null), I([L], H.prototype, "onError", null), I([L], H.prototype, "onSuccess", null), I([L], H.prototype, "onPreAuth", null), I([L], H.prototype, "onAuth", null), I([L], H.prototype, "onPostAuth", null), I([L], H.prototype, "threeDSInvoke", null), I([L], H.prototype, "getGatewayData", null), I([L], H.prototype, "tokeniseCard", null), I([L], H.prototype, "updateTokenExternal3dsData", null);
702
702
  //#endregion
703
703
  //#region src/sdk/utils/loading.ts
704
704
  var Tt = p(!1);
705
- function H() {
705
+ function U() {
706
706
  return {
707
707
  isLoading: Tt,
708
708
  startLoading: () => {
@@ -735,7 +735,7 @@ var Et = { style: { position: "relative" } }, Dt = {
735
735
  "close"
736
736
  ],
737
737
  setup(e, { emit: t }) {
738
- let n = e, r = t, a = p(null), o = p(!0), l = p(""), d = p(null), f = !1, m = null, { isLoading: h } = H();
738
+ let n = e, r = t, a = p(null), o = p(!0), l = p(""), d = p(null), f = !1, m = null, { isLoading: h } = U();
739
739
  function _(e) {
740
740
  d.value = e, n.log && n.log("[Paypal]: checkout", d.value), !f && (f = !0, v());
741
741
  }
@@ -781,7 +781,7 @@ var Et = { style: { position: "relative" } }, Dt = {
781
781
  window.removeEventListener("message", x), m && clearInterval(m);
782
782
  }), c(() => {
783
783
  window.addEventListener("message", x), lt(a.value, "payfurl-combined-container") || (o.value = !0, r("activate"));
784
- }), (e, t) => (b(), A(ye, null, [k("div", Et, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
784
+ }), (e, t) => (b(), A(E, null, [k("div", Et, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
785
785
  style: { position: "relative" },
786
786
  ref_key: "root",
787
787
  ref: a
@@ -797,7 +797,7 @@ function jt(e) {
797
797
  }
798
798
  //#endregion
799
799
  //#region src/sdk/utils/optionCleaning.ts
800
- function U(e) {
800
+ function W(e) {
801
801
  if (e == null) return null;
802
802
  var t = {};
803
803
  for (var n in e) t[n] = e[n];
@@ -820,8 +820,8 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
820
820
  userSuccessMessage = re;
821
821
  constructor(e, t) {
822
822
  this.log = e, this.apiUrl = t.apiUrl, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
823
- let n = new j(t.environment, M(t.publicKey));
824
- this.httpInvoker = new N(t.publicKey, t.version, n);
823
+ let n = new M(t.environment, N(t.publicKey));
824
+ this.httpInvoker = new P(t.publicKey, t.version, n);
825
825
  }
826
826
  addFraudProcessor(e) {
827
827
  this.fraudProcessor = e;
@@ -850,7 +850,7 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
850
850
  }), this.validateOptions(e, n, r);
851
851
  let o = !1;
852
852
  this.container = e, this.fraudProcessor && (this.fraudProcessor.setAmount(n), this.fraudProcessor.setCurrency(r));
853
- let s = E({
853
+ let s = ge({
854
854
  el: e,
855
855
  component: kt,
856
856
  props: {
@@ -862,7 +862,7 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
862
862
  clickGate: this.getOnValidate.bind(this)
863
863
  },
864
864
  on: {
865
- activate: L(this, "[Paypal]: activate", () => {
865
+ activate: R(this, "[Paypal]: activate", () => {
866
866
  o || (o = !0, this.log("[Paypal]: activate paypal form"), this.checkout(this.amount || n, r, i, a || {}, () => {
867
867
  o = !1;
868
868
  }), this.setAmount = (e) => {
@@ -871,7 +871,7 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
871
871
  });
872
872
  });
873
873
  }),
874
- approve: L(this, "[Paypal]: approved", ({ data: t, actions: n }) => {
874
+ approve: R(this, "[Paypal]: approved", ({ data: t, actions: n }) => {
875
875
  this.log("[Paypal]: approved", {
876
876
  data: t,
877
877
  actions: n
@@ -887,9 +887,9 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
887
887
  payerAccountCountry: r.value.payer.address.country_code,
888
888
  paymentId: r.value.id
889
889
  }), Nt(), this.fraudProcessor.fraudCheck((t) => {
890
- Mt(), jt(t) ? (P(e, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.addCharge(e, t);
890
+ Mt(), jt(t) ? (F(e, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.addCharge(e, t);
891
891
  }, (t) => {
892
- Mt(), P(e, t.error), this.failureCallback?.(t);
892
+ Mt(), F(e, t.error), this.failureCallback?.(t);
893
893
  })) : this.addCharge(e, null));
894
894
  }, 200);
895
895
  })
@@ -913,17 +913,17 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
913
913
  amount: e,
914
914
  currency: t,
915
915
  options: { HideShipping: r.hideShipping ? "true" : "false" },
916
- metadata: U(r?.metadata)
916
+ metadata: W(r?.metadata)
917
917
  };
918
918
  r.transfer?.amount && (o.transfer = {
919
919
  account: r.transfer.account,
920
920
  amount: r.transfer.amount
921
- }), H().startLoading(), this.httpInvoker?.invoke(a, "POST", JSON.stringify(o), this.successCheckoutHandler.bind(this), (e, t) => {
921
+ }), U().startLoading(), this.httpInvoker?.invoke(a, "POST", JSON.stringify(o), this.successCheckoutHandler.bind(this), (e, t) => {
922
922
  i?.(e, t), this.failureCheckoutHandler.bind(this)(e, t);
923
923
  });
924
924
  }
925
925
  failureCheckoutHandler = (e, t) => {
926
- H().stopLoading(), this.failureCallback?.({
926
+ U().stopLoading(), this.failureCallback?.({
927
927
  error: "Failed to configure paypal",
928
928
  body: t
929
929
  }), window.postMessage({
@@ -932,8 +932,8 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
932
932
  error: "Failed to configure paypal"
933
933
  }, "*");
934
934
  };
935
- successCheckoutHandler = L(this, "[PayPal][successCheckoutHandler]", (e, t) => {
936
- H().stopLoading();
935
+ successCheckoutHandler = R(this, "[PayPal][successCheckoutHandler]", (e, t) => {
936
+ U().stopLoading();
937
937
  let n = JSON.parse(t);
938
938
  this.log("paypal success", n);
939
939
  let r = JSON.parse(t), i = JSON.parse(window.atob(r.checkoutData));
@@ -944,15 +944,15 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
944
944
  }, "*");
945
945
  });
946
946
  getFailureAddChargeHandler(e) {
947
- return L(this, "[PayPalProcessor][getFailureAddChargeHandler]", (t, n) => {
948
- P(e, "Unable to tokenise payment information"), this.failureCallback?.({
947
+ return R(this, "[PayPalProcessor][getFailureAddChargeHandler]", (t, n) => {
948
+ F(e, "Unable to tokenise payment information"), this.failureCallback?.({
949
949
  error: "Unable to finish AddCharge",
950
950
  body: n
951
951
  }), this.log("Unable to finish AddCharge, error: " + n);
952
952
  });
953
953
  }
954
954
  getSuccessAddChargeHandler(e) {
955
- return L(this, "[PayPalProcessor][getSuccessAddChargeHandler]", (t, n) => {
955
+ return R(this, "[PayPalProcessor][getSuccessAddChargeHandler]", (t, n) => {
956
956
  let r = JSON.parse(n);
957
957
  this.log("[getSuccessAddChargeHandler]", r), Qe(e, this.getSuccessMessage()), this.successCallback?.({ transactionId: r.chargeId });
958
958
  });
@@ -965,11 +965,11 @@ var { hideSpinner: Mt, showSpinner: Nt } = Oe(), Pt = class {
965
965
  }), this.getSuccessAddChargeHandler(e).bind(this), this.getFailureAddChargeHandler(e).bind(this));
966
966
  }
967
967
  validateOptions(t, n, r) {
968
- if (!R(r)) throw P(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
969
- if (!e(n)) throw P(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
968
+ if (!z(r)) throw F(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
969
+ if (!e(n)) throw F(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
970
970
  }
971
971
  };
972
- F([I], Pt.prototype, "cleanUp", null), F([I], Pt.prototype, "addPaypal", null), F([I], Pt.prototype, "setAmount", null), F([I], Pt.prototype, "checkout", null), F([I], Pt.prototype, "getFailureAddChargeHandler", null), F([I], Pt.prototype, "getSuccessAddChargeHandler", null), F([I], Pt.prototype, "addCharge", null), F([I], Pt.prototype, "validateOptions", null);
972
+ I([L], Pt.prototype, "cleanUp", null), I([L], Pt.prototype, "addPaypal", null), I([L], Pt.prototype, "setAmount", null), I([L], Pt.prototype, "checkout", null), I([L], Pt.prototype, "getFailureAddChargeHandler", null), I([L], Pt.prototype, "getSuccessAddChargeHandler", null), I([L], Pt.prototype, "addCharge", null), I([L], Pt.prototype, "validateOptions", null);
973
973
  //#endregion
974
974
  //#region src/sdk/components/CardForm.vue?vue&type=script&setup=true&lang.ts
975
975
  var Ft = ["src"], It = {
@@ -1027,7 +1027,7 @@ var Ft = ["src"], It = {
1027
1027
  let t = a.value;
1028
1028
  t && (e ? (m = t.style.height || "200px", f.value = !0, t.setAttribute("style", `height: ${Lt}px`)) : (f.value = !1, t.setAttribute("style", `height: ${m}`)));
1029
1029
  }
1030
- return (e, t) => (b(), A(ye, null, [k("iframe", {
1030
+ return (e, t) => (b(), A(E, null, [k("iframe", {
1031
1031
  src: o.value,
1032
1032
  onLoad: _,
1033
1033
  ref_key: "iframe",
@@ -1036,7 +1036,7 @@ var Ft = ["src"], It = {
1036
1036
  id: "payfurl-card-iframe"
1037
1037
  }, null, 44, Ft), l.value ? (b(), A("div", It)) : T("", !0)], 64));
1038
1038
  }
1039
- }), W = class {
1039
+ }), G = class {
1040
1040
  log;
1041
1041
  startLoadingCardFormHandler = null;
1042
1042
  constructor(e) {
@@ -1113,7 +1113,7 @@ var Ft = ["src"], It = {
1113
1113
  }
1114
1114
  }
1115
1115
  };
1116
- F([I], W.prototype, "startLoadingCardForm", null), F([I], W.prototype, "stopLoadingCardForm", null), F([I], W.prototype, "pauseLoadingCardForm", null), F([I], W.prototype, "unpauseLoadingCardForm", null), F([I], W.prototype, "showMessage", null), F([I], W.prototype, "showInfoMessage", null), F([I], W.prototype, "requestCardDetails", null);
1116
+ I([L], G.prototype, "startLoadingCardForm", null), I([L], G.prototype, "stopLoadingCardForm", null), I([L], G.prototype, "pauseLoadingCardForm", null), I([L], G.prototype, "unpauseLoadingCardForm", null), I([L], G.prototype, "showMessage", null), I([L], G.prototype, "showInfoMessage", null), I([L], G.prototype, "requestCardDetails", null);
1117
1117
  //#endregion
1118
1118
  //#region src/utils/networkTokenOptions.ts
1119
1119
  function zt(e) {
@@ -1132,7 +1132,7 @@ function zt(e) {
1132
1132
  var { hideSpinner: Bt, showSpinner: Vt } = Oe(), Ht = { UPDATE: "UPDATE" }, Ut = (e, t) => ({ [Ht.UPDATE]: {
1133
1133
  url: e + ("/token/" + t + "/authentication"),
1134
1134
  method: "PUT"
1135
- } }), G = class extends W {
1135
+ } }), K = class extends G {
1136
1136
  environment;
1137
1137
  token;
1138
1138
  networkToken;
@@ -1154,8 +1154,8 @@ var { hideSpinner: Bt, showSpinner: Vt } = Oe(), Ht = { UPDATE: "UPDATE" }, Ut =
1154
1154
  ...n,
1155
1155
  ...t.networkTokenOptions
1156
1156
  };
1157
- let r = new j(t.environment, M(t.publicKey));
1158
- this.httpInvoker = new N(t.publicKey, "", r), this.apiUrl = t.apiUrl, window.addEventListener("message", this.messageHandler.bind(this)), this.init();
1157
+ let r = new M(t.environment, N(t.publicKey));
1158
+ this.httpInvoker = new P(t.publicKey, "", r), this.apiUrl = t.apiUrl, window.addEventListener("message", this.messageHandler.bind(this)), this.init();
1159
1159
  }
1160
1160
  invoke(e, t, n, r) {
1161
1161
  this.log("[MastercardTokenAuthenticationProcessor][invoke]", {
@@ -1266,17 +1266,17 @@ var { hideSpinner: Bt, showSpinner: Vt } = Oe(), Ht = { UPDATE: "UPDATE" }, Ut =
1266
1266
  VerificationTimestamp: t.verificationTimestamp,
1267
1267
  AdditionalData: t.additionalData,
1268
1268
  VerificationEvents: JSON.stringify(t.verificationEvents)
1269
- }), L(this, "[MastercardTokenAuthenticationProcessor][updateToken]: successCallback", (t, n) => {
1269
+ }), R(this, "[MastercardTokenAuthenticationProcessor][updateToken]: successCallback", (t, n) => {
1270
1270
  this.log("[MastercardTokenAuthenticationProcessor][updateToken]: successCallback", t, n), this.modalHide(), this.onSuccessCallback?.(e);
1271
- }), L(this, "[MastercardTokenAuthenticationProcessor][updateToken]: failureCallback", (e, t) => {
1271
+ }), R(this, "[MastercardTokenAuthenticationProcessor][updateToken]: failureCallback", (e, t) => {
1272
1272
  this.log("[MastercardTokenAuthenticationProcessor][updateToken]: failureCallback", e, t), this.modalHide(), this.onFailureCallback?.({ error: "Unknown error" });
1273
1273
  }));
1274
1274
  }
1275
1275
  };
1276
- F([I], G.prototype, "invoke", null), F([I], G.prototype, "messageHandler", null), F([I], G.prototype, "authenticate", null), F([I], G.prototype, "init", null), F([I], G.prototype, "initCss", null), F([I], G.prototype, "modalShow", null), F([I], G.prototype, "modalHide", null), F([I], G.prototype, "updateToken", null);
1276
+ I([L], K.prototype, "invoke", null), I([L], K.prototype, "messageHandler", null), I([L], K.prototype, "authenticate", null), I([L], K.prototype, "init", null), I([L], K.prototype, "initCss", null), I([L], K.prototype, "modalShow", null), I([L], K.prototype, "modalHide", null), I([L], K.prototype, "updateToken", null);
1277
1277
  //#endregion
1278
1278
  //#region src/sdk/processors/cardProcessor.ts
1279
- var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1279
+ var { hideSpinner: q, showSpinner: Wt } = Oe(), Gt = {
1280
1280
  TOKENISE_CARD: "TOKENISE_CARD",
1281
1281
  GET_PROVIDER_INFO: "GET_PROVIDER_INFO"
1282
1282
  }, Kt = (e, t, n) => ({
@@ -1288,7 +1288,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1288
1288
  url: e + "/info/providers/" + t,
1289
1289
  method: "GET"
1290
1290
  }
1291
- }), q = class extends W {
1291
+ }), J = class extends G {
1292
1292
  container = null;
1293
1293
  iframe = null;
1294
1294
  form = null;
@@ -1335,8 +1335,8 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1335
1335
  isMessageListenerAttached = !1;
1336
1336
  constructor(e, t) {
1337
1337
  super(e), this.debug = t.debug, this.environment = t.environment, this.url = t.url, this.apiUrl = t.apiUrl, this.secureUrl = t.secureUrl, this.version = t.version, this.publicKey = t.publicKey, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null, this.validationStatusChangeCallback = t.onValidationStatusChangeCallback || null;
1338
- let n = new j(t.environment, M(t.publicKey));
1339
- this.httpInvoker = new N(this.publicKey, t.version, n), this.boundMessageHandler = this.messageHandler.bind(this), this.attachMessageListener();
1338
+ let n = new M(t.environment, N(t.publicKey));
1339
+ this.httpInvoker = new P(this.publicKey, t.version, n), this.boundMessageHandler = this.messageHandler.bind(this), this.attachMessageListener();
1340
1340
  }
1341
1341
  attachMessageListener() {
1342
1342
  this.isMessageListenerAttached ||= (window.addEventListener("message", this.boundMessageHandler), !0);
@@ -1379,7 +1379,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1379
1379
  options: a
1380
1380
  }), this.attachMessageListener(), a?.createNetworkToken && !a?.tokenAuthenticationEnabled && (a.clickToPayEnabled = !1), a?.clickToPayEnabled && this.clickToPayProcessor && (a.threeDSEnabled = !1), this.secureFallback = !1, this.secureReady = !1, this.secureEnabled = !!a?.secureCardOrchestration?.enabled;
1381
1381
  let o = a?.threeDSEmail || "";
1382
- this.amount = r, this.currency = i, this.vault = O(a?.vault), this.verifyCard = O(a?.verifyCard), this.metadata = U(a?.metadata), this.fraudProcessor && (this.fraudProcessor.setAmount(r), this.fraudProcessor.setCurrency(i)), this.threeDsProcessor && (this.threeDsProcessor.setEmail(a?.threeDSEmail || ""), this.threeDsProcessor.setAmount(r), this.threeDsProcessor.setCurrency(i), this.threeDsProcessor.setClientParameters(a?.clientParameters || {})), a?.threeDSEnabled && (Te(r, D, "Missing or invalid amount", this.failureCallback), Te(i, R, "Missing or invalid currency", this.failureCallback), this.threeDSEnabled = !0);
1382
+ this.amount = r, this.currency = i, this.vault = O(a?.vault), this.verifyCard = O(a?.verifyCard), this.metadata = W(a?.metadata), this.fraudProcessor && (this.fraudProcessor.setAmount(r), this.fraudProcessor.setCurrency(i)), this.threeDsProcessor && (this.threeDsProcessor.setEmail(a?.threeDSEmail || ""), this.threeDsProcessor.setAmount(r), this.threeDsProcessor.setCurrency(i), this.threeDsProcessor.setClientParameters(a?.clientParameters || {})), a?.threeDSEnabled && (Te(r, D, "Missing or invalid amount", this.failureCallback), Te(i, z, "Missing or invalid currency", this.failureCallback), this.threeDSEnabled = !0);
1383
1383
  let s = Object.keys(a?.networkTokenOptions || {}).length ? a?.networkTokenOptions : a?.clickToPayOptions?.networkTokenOptions;
1384
1384
  a?.clickToPayEnabled && this.clickToPayProcessor && (this.clickToPayProcessor.setAmount(r), this.clickToPayProcessor.setCurrency(i), this.clickToPayProcessor.setCustomerInfo({
1385
1385
  ...this.customer || {},
@@ -1390,7 +1390,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1390
1390
  tokenAuthenticationEnabled: !!a?.tokenAuthenticationEnabled,
1391
1391
  networkTokenOptions: s
1392
1392
  }), this.clickToPayProcessor.setContainer(e), this.clickToPayProcessor.init(), this.clickToPayProcessor.start()), !a?.clickToPayEnabled && this.clickToPayProcessor && this.clickToPayProcessor.isInitialized() && this.clickToPayProcessor.stopUsing(), this.createNetworkToken = !!a?.createNetworkToken, this.tokenAuthenticationEnabled = !!a?.tokenAuthenticationEnabled, this.networkTokenProviders = a?.networkTokenProviders || [], this.networkTokenOptions = a?.networkTokenOptions || {}, this.container = e || null, this.form = t;
1393
- let c = E({
1393
+ let c = ge({
1394
1394
  el: this.container,
1395
1395
  component: Rt,
1396
1396
  props: {
@@ -1401,7 +1401,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1401
1401
  clickGate: this.getOnValidate.bind(this)
1402
1402
  },
1403
1403
  on: {
1404
- load: L(this, "[addCard], onload", (e) => {
1404
+ load: R(this, "[addCard], onload", (e) => {
1405
1405
  this.iframe = e;
1406
1406
  let t = this.secureEnabled ? {
1407
1407
  ...a?.secureCardOrchestration,
@@ -1460,7 +1460,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1460
1460
  message: "Invalid phone number"
1461
1461
  }, "*");
1462
1462
  }),
1463
- submit: L(this, "[addCard], onsubmit", () => {
1463
+ submit: R(this, "[addCard], onsubmit", () => {
1464
1464
  this.log("[CardProcessor]: submit event"), Wt(), this.requestCardDetails();
1465
1465
  })
1466
1466
  }
@@ -1479,19 +1479,19 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1479
1479
  });
1480
1480
  } else if (e.data.status === "secure-orchestrator-click-to-pay-card" && this.isTrustedSecureMessage(e)) this.checkoutWithSecureClickToPayCard(e.data.message || {});
1481
1481
  else if (e.data.status === "secure-orchestrator-click-to-pay-new-card" && this.isTrustedSecureMessage(e)) this.checkoutWithSecureClickToPayNewCard(e.data.message || {});
1482
- else if (e.data.status === "secure-orchestrator-failure" && this.isTrustedSecureMessage(e)) K(), this.showMessage(e.data.error || "Unable to process payment details"), this.failureCallback?.({ error: e.data.error || "Unable to process payment details" });
1483
- else if (e.data.status === "hide-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K();
1482
+ else if (e.data.status === "secure-orchestrator-failure" && this.isTrustedSecureMessage(e)) q(), this.showMessage(e.data.error || "Unable to process payment details"), this.failureCallback?.({ error: e.data.error || "Unable to process payment details" });
1483
+ else if (e.data.status === "hide-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), q();
1484
1484
  else if (e.data.status === "show-spinner") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), Wt();
1485
- else if (e.data.status === "card-form-validation-error") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K(), this.failureCallback?.({ error: e.data.message });
1486
- else if (e.data.status === "card-form-validation-status-change") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K(), this.validationStatusChangeCallback?.(e.data.message?.status, e.data.message?.message);
1485
+ else if (e.data.status === "card-form-validation-error") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), q(), this.failureCallback?.({ error: e.data.message });
1486
+ else if (e.data.status === "card-form-validation-status-change") this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), q(), this.validationStatusChangeCallback?.(e.data.message?.status, e.data.message?.message);
1487
1487
  else if (e.data.status === "tokenise-card-failure") {
1488
- if (this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), K(), e.data.message === "3D Secure required" && this.isSecureFlowEnabled()) {
1488
+ if (this.log(`[sdk][cardProcessor]: message "${e.data.status}" received`, e.data), q(), e.data.message === "3D Secure required" && this.isSecureFlowEnabled()) {
1489
1489
  this.postSecureMessage(_);
1490
1490
  return;
1491
1491
  }
1492
1492
  if (e.data.message === "3D Secure required" && this.secondaryThreeDsProcessor) {
1493
1493
  this.secondaryThreeDsProcessor?.threeDSInvoke(this.container, !0, (e) => {
1494
- K(), this.log("[threeDSInvoke], postAuthData", e), this.tokenise({
1494
+ q(), this.log("[threeDSInvoke], postAuthData", e), this.tokenise({
1495
1495
  threeDSServerTransID: e.threeDSServerTransID,
1496
1496
  externalThreeDsData: e.externalThreeDsData
1497
1497
  });
@@ -1514,20 +1514,20 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1514
1514
  }), this.tokenAuthenticationEnabled && e.data.options?.networkTokenAuthenticateUrl && e.data.options?.networkToken) {
1515
1515
  let n = this.initTokenAuthenticationProcessor(e.data.tokenId, e.data.options.networkToken, e.data.options?.networkTokenData, e.data.options.networkTokenAuthenticateUrl, e.data.options?.cardDetails, this.networkTokenOptions);
1516
1516
  if (n) {
1517
- n.invoke(this.amount, this.currency, L(this, "[sdk][cardProcessor], token authentication success", () => {
1518
- this.log("[sdk][cardProcessor], token authentication success"), K(), Qe(this.container, this.getSuccessMessage()), this.successCallback?.(t);
1519
- }), L(this, "[sdk][cardProcessor], token authentication error", (e) => {
1520
- K(), this.log("[sdk][cardProcessor], token authentication error", e);
1517
+ n.invoke(this.amount, this.currency, R(this, "[sdk][cardProcessor], token authentication success", () => {
1518
+ this.log("[sdk][cardProcessor], token authentication success"), q(), Qe(this.container, this.getSuccessMessage()), this.successCallback?.(t);
1519
+ }), R(this, "[sdk][cardProcessor], token authentication error", (e) => {
1520
+ q(), this.log("[sdk][cardProcessor], token authentication error", e);
1521
1521
  }));
1522
1522
  return;
1523
1523
  }
1524
1524
  }
1525
- K(), Qe(this.container, this.getSuccessMessage()), this.successCallback?.(t);
1525
+ q(), Qe(this.container, this.getSuccessMessage()), this.successCallback?.(t);
1526
1526
  }
1527
1527
  }
1528
1528
  }
1529
1529
  setCardDetailsPort(e) {
1530
- this.closeCardDetailsPort(), this.cardDetailsPort = e, this.cardDetailsPort.onmessage = L(this, "[sdk][cardProcessor]: cardDetailsPort message", (e) => {
1530
+ this.closeCardDetailsPort(), this.cardDetailsPort = e, this.cardDetailsPort.onmessage = R(this, "[sdk][cardProcessor]: cardDetailsPort message", (e) => {
1531
1531
  e?.data?.status && e.data.status === "card-details" && this.handleCardDetailsMessage(e.data);
1532
1532
  });
1533
1533
  }
@@ -1555,7 +1555,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1555
1555
  return this.secureEnabled && !this.secureFallback;
1556
1556
  }
1557
1557
  requestCardDetails() {
1558
- this.isSecureFlowEnabled() && !this.secureReady ? (K(), this.showMessage("Secure payment flow is not ready. Please try again."), this.failureCallback?.({ error: "Secure payment flow is not ready" })) : this.isSecureFlowEnabled() && this.secureReady ? (this.secureConfig?.clickToPay && this.clickToPayProcessor && this.postSecureMessage(x, { clickToPay: {
1558
+ this.isSecureFlowEnabled() && !this.secureReady ? (q(), this.showMessage("Secure payment flow is not ready. Please try again."), this.failureCallback?.({ error: "Secure payment flow is not ready" })) : this.isSecureFlowEnabled() && this.secureReady ? (this.secureConfig?.clickToPay && this.clickToPayProcessor && this.postSecureMessage(x, { clickToPay: {
1559
1559
  ...this.secureConfig.clickToPay,
1560
1560
  rememberMe: this.clickToPayProcessor.getRememberMe()
1561
1561
  } }), this.postSecureMessage(Se)) : this.cardDetailsPort ? this.cardDetailsPort.postMessage({ status: a }) : super.requestCardDetails();
@@ -1564,7 +1564,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1564
1564
  if (!e?.message) return;
1565
1565
  this.log(`[sdk][cardProcessor]: "${Ne}" message received`, e);
1566
1566
  let t = !!(this.clickToPayProcessor?.isEnabled() && this.clickToPayProcessor?.getRememberMe()), n = !!(this.clickToPayProcessor?.isEnabled() && e.message.srcDigitalCardId), r = !!(t && !n && e.message.cardNumber);
1567
- r && !this.clickToPayProcessor?.isSchemeSupported(e.message.cardNumber) ? (this.log("[clickToPayProcessor]: checkoutWithNewCard - Scheme is not supported!"), K(), this.showMessage("Please use another card or use an alternative payment method")) : n ? (K(), this.clickToPayProcessor?.checkoutWithCard(e.message, (t) => {
1567
+ r && !this.clickToPayProcessor?.isSchemeSupported(e.message.cardNumber) ? (this.log("[clickToPayProcessor]: checkoutWithNewCard - Scheme is not supported!"), q(), this.showMessage("Please use another card or use an alternative payment method")) : n ? (q(), this.clickToPayProcessor?.checkoutWithCard(e.message, (t) => {
1568
1568
  this.log("[clickToPayProcessor]: checkoutWithCard", t), t.checkoutActionCode !== "CANCEL" && t.checkoutActionCode !== "CHANGE_CARD" && (Wt(), this.tokenise({ clickToPayInfo: {
1569
1569
  correlationId: t.checkoutResponseData.srcCorrelationId,
1570
1570
  srcFlowId: t.headers["x-src-cx-flow-id"],
@@ -1573,7 +1573,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1573
1573
  digitalCardId: t.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
1574
1574
  } }));
1575
1575
  }, (e) => {
1576
- this.log("[clickToPayProcessor]: checkoutWithCard, error", e), K();
1576
+ this.log("[clickToPayProcessor]: checkoutWithCard, error", e), q();
1577
1577
  })) : (this.fraudProcessor?.setPaymentInfo({
1578
1578
  cardNumber: e.message.cardNumber,
1579
1579
  expiryDate: e.message.expiryDate,
@@ -1589,15 +1589,15 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1589
1589
  expiryDate: e.message.expiryDate,
1590
1590
  cardholder: e.message.cardholder,
1591
1591
  ccv: e.message.ccv
1592
- }), e.message.email && (this.threeDsProcessor?.setEmail(e.message.email), this.secondaryThreeDsProcessor?.setEmail(e.message.email)), this.fraudProcessor && !(n || r) ? (Wt(), this.fraudProcessor.fraudCheck(L(this, "[fraudProcessor][fraudCheck], success", (t) => {
1593
- jt(t) ? (K(), P(this.container, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.onSubmit({
1592
+ }), e.message.email && (this.threeDsProcessor?.setEmail(e.message.email), this.secondaryThreeDsProcessor?.setEmail(e.message.email)), this.fraudProcessor && !(n || r) ? (Wt(), this.fraudProcessor.fraudCheck(R(this, "[fraudProcessor][fraudCheck], success", (t) => {
1593
+ jt(t) ? (q(), F(this.container, "Payment couldn't be processed"), this.failureCallback?.({ error: "Payment couldn't be processed" })) : this.onSubmit({
1594
1594
  cardNumber: e.message.cardNumber,
1595
1595
  expiryDate: e.message.expiryDate,
1596
1596
  cardholder: e.message.cardholder,
1597
1597
  ccv: e.message.ccv
1598
1598
  }, t);
1599
- }), L(this, "[fraudProcessor][fraudCheck], error", (e) => {
1600
- K(), P(this.container, e.error), this.failureCallback?.(e);
1599
+ }), R(this, "[fraudProcessor][fraudCheck], error", (e) => {
1600
+ q(), F(this.container, e.error), this.failureCallback?.(e);
1601
1601
  }))) : this.onSubmit({
1602
1602
  cardNumber: e.message.cardNumber,
1603
1603
  expiryDate: e.message.expiryDate,
@@ -1613,8 +1613,8 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1613
1613
  ccv: "***"
1614
1614
  },
1615
1615
  fraudCheckResult: t
1616
- }), t?.managedOrderToken ? (K(), P(this.container, "3DS challenge could not be started"), this.failureCallback?.({ error: "3DS challenge could not be started" })) : this.clickToPayProcessor?.isEnabled() && this.clickToPayProcessor?.getRememberMe() ? this.tokeniseWithClickToPay(e, void 0, t) : this.threeDsProcessor ? this.threeDsProcessor?.threeDSInvoke(this.container, !1, (e) => {
1617
- K(), this.log("[threeDSInvoke], postAuthData", e), this.tokenise({
1616
+ }), t?.managedOrderToken ? (q(), F(this.container, "3DS challenge could not be started"), this.failureCallback?.({ error: "3DS challenge could not be started" })) : this.clickToPayProcessor?.isEnabled() && this.clickToPayProcessor?.getRememberMe() ? this.tokeniseWithClickToPay(e, void 0, t) : this.threeDsProcessor ? this.threeDsProcessor?.threeDSInvoke(this.container, !1, (e) => {
1617
+ q(), this.log("[threeDSInvoke], postAuthData", e), this.tokenise({
1618
1618
  threeDSServerTransID: e.threeDSServerTransID,
1619
1619
  fraudCheckResult: t,
1620
1620
  externalThreeDsData: e.externalThreeDsData
@@ -1644,7 +1644,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1644
1644
  }), this.iframe.contentWindow?.postMessage(t, "*");
1645
1645
  }
1646
1646
  tokeniseWithClickToPay(e, t, n) {
1647
- K(), this.clickToPayProcessor?.checkoutWithNewCard(e.cardNumber, e.expiryDate, e.ccv || "", !0, L(this, "[clickToPayProcessor]: checkoutWithNewCard", (r) => {
1647
+ q(), this.clickToPayProcessor?.checkoutWithNewCard(e.cardNumber, e.expiryDate, e.ccv || "", !0, R(this, "[clickToPayProcessor]: checkoutWithNewCard", (r) => {
1648
1648
  this.log("[clickToPayProcessor]: checkoutWithNewCard", r), r.checkoutActionCode !== "CANCEL" && (Wt(), this.tokenise({
1649
1649
  threeDSServerTransID: t,
1650
1650
  fraudCheckResult: n,
@@ -1656,32 +1656,32 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1656
1656
  digitalCardId: r.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
1657
1657
  }
1658
1658
  }));
1659
- }), L(this, "[clickToPayProcessor]: checkoutWithNewCard, error", (e) => {
1660
- this.log("[clickToPayProcessor]: checkoutWithNewCard, error", e), K(), P(this.container, e.message);
1659
+ }), R(this, "[clickToPayProcessor]: checkoutWithNewCard, error", (e) => {
1660
+ this.log("[clickToPayProcessor]: checkoutWithNewCard, error", e), q(), F(this.container, e.message);
1661
1661
  }));
1662
1662
  }
1663
1663
  checkoutWithSecureClickToPayCard(e) {
1664
- K(), this.clickToPayProcessor?.checkoutWithCard(e, L(this, "[clickToPayProcessor]: secure checkoutWithCard", (e) => {
1664
+ q(), this.clickToPayProcessor?.checkoutWithCard(e, R(this, "[clickToPayProcessor]: secure checkoutWithCard", (e) => {
1665
1665
  this.log("[clickToPayProcessor]: secure checkoutWithCard", e), e.checkoutActionCode !== "CANCEL" && e.checkoutActionCode !== "CHANGE_CARD" && (Wt(), this.tokenise({ clickToPayInfo: {
1666
1666
  correlationId: e.checkoutResponseData.srcCorrelationId,
1667
1667
  srcFlowId: e.headers["x-src-cx-flow-id"],
1668
1668
  merchantTransactionId: e.headers["merchant-transaction-id"],
1669
1669
  digitalCardId: e.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
1670
1670
  } }));
1671
- }), L(this, "[clickToPayProcessor]: secure checkoutWithCard, error", (e) => {
1672
- this.log("[clickToPayProcessor]: secure checkoutWithCard, error", e), K();
1671
+ }), R(this, "[clickToPayProcessor]: secure checkoutWithCard, error", (e) => {
1672
+ this.log("[clickToPayProcessor]: secure checkoutWithCard, error", e), q();
1673
1673
  }));
1674
1674
  }
1675
1675
  checkoutWithSecureClickToPayNewCard(e) {
1676
- !e.encryptedCard || !e.cardBrand ? (K(), this.showMessage("Unable to process Click to Pay card"), this.failureCallback?.({ error: "Unable to process Click to Pay card" })) : (K(), this.clickToPayProcessor?.checkoutWithEncryptedNewCard(e.encryptedCard, e.cardBrand, L(this, "[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", (e) => {
1676
+ !e.encryptedCard || !e.cardBrand ? (q(), this.showMessage("Unable to process Click to Pay card"), this.failureCallback?.({ error: "Unable to process Click to Pay card" })) : (q(), this.clickToPayProcessor?.checkoutWithEncryptedNewCard(e.encryptedCard, e.cardBrand, R(this, "[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", (e) => {
1677
1677
  this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard", e), e.checkoutActionCode !== "CANCEL" && (Wt(), this.tokenise({ clickToPayInfo: {
1678
1678
  correlationId: e.checkoutResponseData.srcCorrelationId,
1679
1679
  srcFlowId: e.headers["x-src-cx-flow-id"],
1680
1680
  merchantTransactionId: e.headers["merchant-transaction-id"],
1681
1681
  digitalCardId: e.checkoutResponseData.maskedCard.srcDigitalCardId.replace(/^-/, "")
1682
1682
  } }));
1683
- }), L(this, "[clickToPayProcessor]: secure checkoutWithEncryptedNewCard, error", (e) => {
1684
- this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard, error", e), K(), P(this.container, e.message);
1683
+ }), R(this, "[clickToPayProcessor]: secure checkoutWithEncryptedNewCard, error", (e) => {
1684
+ this.log("[clickToPayProcessor]: secure checkoutWithEncryptedNewCard, error", e), q(), F(this.container, e.message);
1685
1685
  })));
1686
1686
  }
1687
1687
  setAmount(e) {
@@ -1709,7 +1709,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1709
1709
  this.geolocation = { ...e }, this.isSecureFlowEnabled() && this.postSecureMessage(x, { geolocation: e });
1710
1710
  }
1711
1711
  tokeniseCard(e, t, n, r, i, a, o, s) {
1712
- D(e) ? ge(t) ? xe(n) ? Ie(i) ? this.httpInvoker?.invoke(Kt(this.apiUrl, e)[Gt.TOKENISE_CARD].url, Kt(this.apiUrl, e)[Gt.TOKENISE_CARD].method, JSON.stringify({
1712
+ D(e) ? _e(t) ? xe(n) ? Ie(i) ? this.httpInvoker?.invoke(Kt(this.apiUrl, e)[Gt.TOKENISE_CARD].url, Kt(this.apiUrl, e)[Gt.TOKENISE_CARD].method, JSON.stringify({
1713
1713
  paymentInformation: {
1714
1714
  cardNumber: t,
1715
1715
  expiryDate: n,
@@ -1729,7 +1729,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1729
1729
  lastName: this.customer?.lastName,
1730
1730
  email: this.customer?.email
1731
1731
  }), (e, t) => {
1732
- this.log("[tokeniseCardSuccessCallback]", e, t), K();
1732
+ this.log("[tokeniseCardSuccessCallback]", e, t), q();
1733
1733
  let n = JSON.parse(t);
1734
1734
  this.log("[tokeniseCardSuccessCallback], data", n);
1735
1735
  let r = { token: n.tokenId };
@@ -1741,7 +1741,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1741
1741
  scheme: n.card.iinData?.scheme
1742
1742
  }, r.iinData = n.card.iinData), this.fraudProcessor && (r.fraudCheckResult = this.fraudProcessor.getCheckResult() || void 0), this.successCallback?.(r);
1743
1743
  }, (e, t) => {
1744
- this.log("tokeniseCardFailureCallback", e, t), K(), this.failureCallback?.({
1744
+ this.log("tokeniseCardFailureCallback", e, t), q(), this.failureCallback?.({
1745
1745
  error: "Unable to tokenise payment information",
1746
1746
  body: t
1747
1747
  });
@@ -1755,7 +1755,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1755
1755
  });
1756
1756
  let o = (i?.scheme || "").toLowerCase(), s = this.networkTokenProviders.find((e) => e.providerType.toLowerCase() === o);
1757
1757
  switch (String(s?.providerType).toLowerCase()) {
1758
- case "mastercard": return new G(this.log.bind(this), {
1758
+ case "mastercard": return new K(this.log.bind(this), {
1759
1759
  container: this.container,
1760
1760
  token: e,
1761
1761
  networkToken: t,
@@ -1771,7 +1771,7 @@ var { hideSpinner: K, showSpinner: Wt } = Oe(), Gt = {
1771
1771
  }
1772
1772
  }
1773
1773
  };
1774
- F([I], q.prototype, "cleanUp", null), F([I], q.prototype, "addCard", null), F([I], q.prototype, "messageHandler", null), F([I], q.prototype, "setCardDetailsPort", null), F([I], q.prototype, "closeCardDetailsPort", null), F([I], q.prototype, "postSecureMessage", null), F([I], q.prototype, "requestCardDetails", null), F([I], q.prototype, "handleCardDetailsMessage", null), F([I], q.prototype, "onSubmit", null), F([I], q.prototype, "tokenise", null), F([I], q.prototype, "tokeniseWithClickToPay", null), F([I], q.prototype, "checkoutWithSecureClickToPayCard", null), F([I], q.prototype, "checkoutWithSecureClickToPayNewCard", null), F([I], q.prototype, "setAmount", null), F([I], q.prototype, "setCurrency", null), F([I], q.prototype, "setCustomerInfo", null), F([I], q.prototype, "setBillingAddress", null), F([I], q.prototype, "setOrderInfo", null), F([I], q.prototype, "setGeolocation", null), F([I], q.prototype, "tokeniseCard", null), F([I], q.prototype, "initTokenAuthenticationProcessor", null);
1774
+ I([L], J.prototype, "cleanUp", null), I([L], J.prototype, "addCard", null), I([L], J.prototype, "messageHandler", null), I([L], J.prototype, "setCardDetailsPort", null), I([L], J.prototype, "closeCardDetailsPort", null), I([L], J.prototype, "postSecureMessage", null), I([L], J.prototype, "requestCardDetails", null), I([L], J.prototype, "handleCardDetailsMessage", null), I([L], J.prototype, "onSubmit", null), I([L], J.prototype, "tokenise", null), I([L], J.prototype, "tokeniseWithClickToPay", null), I([L], J.prototype, "checkoutWithSecureClickToPayCard", null), I([L], J.prototype, "checkoutWithSecureClickToPayNewCard", null), I([L], J.prototype, "setAmount", null), I([L], J.prototype, "setCurrency", null), I([L], J.prototype, "setCustomerInfo", null), I([L], J.prototype, "setBillingAddress", null), I([L], J.prototype, "setOrderInfo", null), I([L], J.prototype, "setGeolocation", null), I([L], J.prototype, "tokeniseCard", null), I([L], J.prototype, "initTokenAuthenticationProcessor", null);
1775
1775
  //#endregion
1776
1776
  //#region src/sdk/utils/error.ts
1777
1777
  var qt = p("");
@@ -1808,7 +1808,7 @@ var Yt = {
1808
1808
  },
1809
1809
  emits: ["submit"],
1810
1810
  setup(e, { emit: t }) {
1811
- let n = e, r = t, a = p({}), { isLoading: o } = H(), l = p(""), d = p("PHONE"), f = p(""), m = le(() => d.value === "PHONE" ? "0405123456 or 0212341234" : Je(d.value.toLowerCase())), h = p(!0), { errorMessage: _ } = Jt();
1811
+ let n = e, r = t, a = p({}), { isLoading: o } = U(), l = p(""), d = p("PHONE"), f = p(""), m = le(() => d.value === "PHONE" ? "0405123456 or 0212341234" : Je(d.value.toLowerCase())), h = p(!0), { errorMessage: _ } = Jt();
1812
1812
  function v() {
1813
1813
  return a.value.payId = "", d.value === "PHONE" && (de(f.value) || (a.value.payId = "Invalid phone number")), d.value === "EMAIL" && (ke(f.value) || (a.value.payId = "Invalid email")), d.value === "ABN" && (ee(f.value.replace(/ /g, "")) || (a.value.payId = "Invalid ABN")), a.value.payId === "";
1814
1814
  }
@@ -1850,7 +1850,7 @@ var Yt = {
1850
1850
  k("option", { value: "PHONE" }, "Phone", -1),
1851
1851
  k("option", { value: "EMAIL" }, "Email", -1),
1852
1852
  k("option", { value: "ABN" }, "Abn", -1)
1853
- ]], 512), [[ve, d.value]])])]),
1853
+ ]], 512), [[ye, d.value]])])]),
1854
1854
  k("div", $t, [t[6] ||= k("label", null, " Pay Id ", -1), k("div", null, [
1855
1855
  u(k("input", {
1856
1856
  type: "text",
@@ -1900,8 +1900,8 @@ var Yt = {
1900
1900
  destroy = () => {};
1901
1901
  constructor(e, t) {
1902
1902
  this.log = e, this.apiUrl = t.apiUrl, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
1903
- let n = new j(t.environment, M(t.publicKey));
1904
- this.httpInvoker = new N(t.publicKey, t.version, n);
1903
+ let n = new M(t.environment, N(t.publicKey));
1904
+ this.httpInvoker = new P(t.publicKey, t.version, n);
1905
1905
  }
1906
1906
  setOnValidate(e) {
1907
1907
  this.userOnValidate = e;
@@ -1917,10 +1917,10 @@ var Yt = {
1917
1917
  amount: n,
1918
1918
  providerId: r,
1919
1919
  options: i
1920
- }), this.container = t, this.providerId = r, this.options = i, this.options.metadata = U(i?.metadata), !e(n)) throw P(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
1921
- if (!String(i.description).trim()) throw P(t, "Invalid description"), TypeError("invalid description");
1922
- if (i.maximumAmount ||= 1e3, i.maximumAmount < 0 || i.maximumAmount > 9999) throw P(t, "Invalid maximum amount: " + i.maximumAmount), TypeError("invalid maximumAmount: " + i.maximumAmount);
1923
- let a = E({
1920
+ }), this.container = t, this.providerId = r, this.options = i, this.options.metadata = W(i?.metadata), !e(n)) throw F(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
1921
+ if (!String(i.description).trim()) throw F(t, "Invalid description"), TypeError("invalid description");
1922
+ if (i.maximumAmount ||= 1e3, i.maximumAmount < 0 || i.maximumAmount > 9999) throw F(t, "Invalid maximum amount: " + i.maximumAmount), TypeError("invalid maximumAmount: " + i.maximumAmount);
1923
+ let a = ge({
1924
1924
  el: this.container,
1925
1925
  component: rn,
1926
1926
  props: {
@@ -1928,8 +1928,8 @@ var Yt = {
1928
1928
  log: this.log,
1929
1929
  clickGate: this.getOnValidate.bind(this)
1930
1930
  },
1931
- on: { submit: L(this, "[PayTo]: submit", (e) => {
1932
- this.log("[PayTo]: submit payto form", e), H().startLoading(), setTimeout(() => {
1931
+ on: { submit: R(this, "[PayTo]: submit", (e) => {
1932
+ this.log("[PayTo]: submit payto form", e), U().startLoading(), setTimeout(() => {
1933
1933
  this.tokenise(e);
1934
1934
  }, 500);
1935
1935
  }) }
@@ -1950,11 +1950,11 @@ var Yt = {
1950
1950
  };
1951
1951
  this.httpInvoker?.invoke(cn(this.apiUrl)[sn.TOKENISE].url, cn(this.apiUrl)[sn.TOKENISE].method, JSON.stringify(t), this.successPayToHandler.bind(this), this.failurePayToHandler.bind(this));
1952
1952
  }
1953
- successPayToHandler = L(this, "[PayTo][tokenise][successPayToHandler]", (e, t) => {
1953
+ successPayToHandler = R(this, "[PayTo][tokenise][successPayToHandler]", (e, t) => {
1954
1954
  this.log("successPayToHandler", e, t);
1955
1955
  let n = JSON.parse(t);
1956
1956
  if (!n || !n?.tokenId) return this.failurePayToHandler(e, t);
1957
- this.tokenId = n.tokenId, E({
1957
+ this.tokenId = n.tokenId, ge({
1958
1958
  el: this.container,
1959
1959
  component: on,
1960
1960
  props: {
@@ -1963,416 +1963,416 @@ var Yt = {
1963
1963
  }
1964
1964
  }), this.checkAgreement();
1965
1965
  });
1966
- failurePayToHandler = L(this, "[PayTo][tokenise][failurePayToHandler]", (e, t) => {
1967
- this.log("failurePayToHandler", e, t), H().stopLoading(), Jt().showErrorMessage("Invalid payment details");
1966
+ failurePayToHandler = R(this, "[PayTo][tokenise][failurePayToHandler]", (e, t) => {
1967
+ this.log("failurePayToHandler", e, t), U().stopLoading(), Jt().showErrorMessage("Invalid payment details");
1968
1968
  });
1969
- failurePayToAgreementHandler = L(this, "[PayTo][tokenise][failurePayToAgreementHandler]", (e, t) => {
1970
- H().stopLoading(), this.log("failurePayToAgreementHandler", e, t), P(this.container, "Agreement has been canceled"), this.failureCallback?.({
1969
+ failurePayToAgreementHandler = R(this, "[PayTo][tokenise][failurePayToAgreementHandler]", (e, t) => {
1970
+ U().stopLoading(), this.log("failurePayToAgreementHandler", e, t), F(this.container, "Agreement has been canceled"), this.failureCallback?.({
1971
1971
  error: "Agreement has been canceled",
1972
1972
  body: t
1973
1973
  });
1974
1974
  });
1975
1975
  successPayToAgreementHandler() {
1976
- H().stopLoading(), this.log("success agreement", this.tokenId), Qe(this.container, "PayTo Agreement Approved"), this.successCallback?.({ token: this.tokenId });
1976
+ U().stopLoading(), this.log("success agreement", this.tokenId), Qe(this.container, "PayTo Agreement Approved"), this.successCallback?.({ token: this.tokenId });
1977
1977
  }
1978
1978
  checkAgreement() {
1979
- this.checkAgreementHandler ||= setInterval(this.checkAgreement.bind(this), 5e3), this.httpInvoker?.invoke(cn(this.apiUrl, this.tokenId)[sn.TOKEN_STATUS].url, cn(this.apiUrl, this.tokenId)[sn.TOKEN_STATUS].method, {}, L(this, "[checkAgreement], success", (e, t) => {
1979
+ this.checkAgreementHandler ||= setInterval(this.checkAgreement.bind(this), 5e3), this.httpInvoker?.invoke(cn(this.apiUrl, this.tokenId)[sn.TOKEN_STATUS].url, cn(this.apiUrl, this.tokenId)[sn.TOKEN_STATUS].method, {}, R(this, "[checkAgreement], success", (e, t) => {
1980
1980
  this.log("checkAgreement", e, t);
1981
1981
  let n = JSON.parse(t);
1982
1982
  if (!n) return clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, t);
1983
1983
  if (n.payToStatus !== "PENDING") return n.payToStatus === "ACTIVE" ? (clearInterval(this.checkAgreementHandler), this.successPayToAgreementHandler()) : (clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, ""));
1984
- }), L(this, "[checkAgreement], failure", (e, t) => (this.log("checkAgreement", e, t), clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, t))));
1984
+ }), R(this, "[checkAgreement], failure", (e, t) => (this.log("checkAgreement", e, t), clearInterval(this.checkAgreementHandler), this.failurePayToAgreementHandler(e, t))));
1985
1985
  }
1986
1986
  };
1987
- F([I], ln.prototype, "cleanUp", null), F([I], ln.prototype, "addPayTo", null), F([I], ln.prototype, "tokenise", null), F([I], ln.prototype, "successPayToAgreementHandler", null), F([I], ln.prototype, "checkAgreement", null);
1987
+ I([L], ln.prototype, "cleanUp", null), I([L], ln.prototype, "addPayTo", null), I([L], ln.prototype, "tokenise", null), I([L], ln.prototype, "successPayToAgreementHandler", null), I([L], ln.prototype, "checkAgreement", null);
1988
1988
  //#endregion
1989
1989
  //#region src/sdk/checkout/checkoutProvider.type.ts
1990
- var J;
1990
+ var Y;
1991
1991
  (function(e) {
1992
1992
  e.AZUPAY = "azupay", e.SHIFT = "shift", e.PAYGLOCAL = "payglocal", e.PESAPAL = "pesapal", e.ADDI = "addi", e.AFFIRM = "affirm", e.AFTERPAY = "afterpay", e.ALMA = "alma", e.APLAZAME = "aplazame", e.APLAZO = "aplazo", e.ATOME = "atome", e.BILLEASE = "billease", e.CASHEW = "cashew", e.CASHPRESSO = "cashpresso", e.CLEARPAY = "clearpay", e.CLEO = "cleo", e.DANA = "dana", e.EASYPAISA = "easypaisa", e.FINVERO = "finvero", e.FUPAY = "fupay", e.GCASG = "gcasg", e.GRABPAY = "grabpay", e.HUMM = "humm", e.KAKAOPAY = "kakaopay", e.KLARNA = "klarna", e.KUESKIPAY = "kueskipay", e.LARA = "lara", e.LATITUDEPAY = "latitudepay", e.LAYBUY = "laybuy", e.LIMEPAY = "limepay", e.PACE = "pace", e.PAGALEVE = "pagaleve", e.PARIBAS = "paribas", e.PAYWITHFOUR = "paywithfour", e.PAYJUSTNOW = "payjustnow", e.PAYTM = "paytm", e.PAYBRIGHT = "paybright", e.PAYFLEX = "payflex", e.PAYRIGHT = "payright", e.POSTPAY = "postpay", e.RATEPAY = "ratepay", e.RIVERTY = "riverty", e.SCALAPAY = "scalapay", e.SEZZLE = "sezzle", e.SHOPBACK = "shopback", e.SMARTPAY = "smartpay", e.SOFINCO = "sofinco", e.SPLITIT = "splitit", e.TABBY = "tabby", e.TAMARA = "tamara", e.TENDOPAY = "tendopay", e.TOUCHNGO = "touchngo", e.TRIPLEA = "triplea", e.TRUEMONEY = "truemoney", e.TWISTO = "twisto", e.UPLIFT = "uplift", e.VALU = "valu", e.ZEST = "zest", e.ZIP = "zip", e.ZOODPAY = "zoodpay", e.BKASH = "bkash", e.ERATY = "eraty", e.PAYBYACCOUNT = "pay_by_account", e.UPI = "upi";
1993
- })(J ||= {});
1993
+ })(Y ||= {});
1994
1994
  //#endregion
1995
1995
  //#region src/sdk/checkout/checkoutOptions.ts
1996
1996
  var un = {
1997
- [J.AZUPAY]: {
1997
+ [Y.AZUPAY]: {
1998
1998
  name: "PayID",
1999
1999
  description: "",
2000
2000
  buttonTitle: "Pay with PayID",
2001
2001
  icon: "PayId"
2002
2002
  },
2003
- [J.SHIFT]: {
2003
+ [Y.SHIFT]: {
2004
2004
  name: "Shift",
2005
2005
  description: "",
2006
2006
  buttonTitle: "Pay with Shift",
2007
2007
  icon: "Shift"
2008
2008
  },
2009
- [J.PAYGLOCAL]: {
2009
+ [Y.PAYGLOCAL]: {
2010
2010
  name: "PayGLocal",
2011
2011
  description: "",
2012
2012
  buttonTitle: "Pay with PayGLocal",
2013
2013
  icon: "PayGLocal"
2014
2014
  },
2015
- [J.PESAPAL]: {
2015
+ [Y.PESAPAL]: {
2016
2016
  name: "PesaPal",
2017
2017
  description: "",
2018
2018
  buttonTitle: "Pay with PesaPal",
2019
2019
  icon: "Pesapal"
2020
2020
  },
2021
- [J.PAYBYACCOUNT]: {
2021
+ [Y.PAYBYACCOUNT]: {
2022
2022
  name: "Pay By Account",
2023
2023
  description: "",
2024
2024
  buttonTitle: "Pay with Pay By Account",
2025
2025
  icon: "PayByAccount"
2026
2026
  },
2027
- [J.UPI]: {
2027
+ [Y.UPI]: {
2028
2028
  name: "UPI",
2029
2029
  description: "",
2030
2030
  buttonTitle: "Pay with UPI",
2031
2031
  icon: "Upi"
2032
2032
  },
2033
- [J.ADDI]: {
2033
+ [Y.ADDI]: {
2034
2034
  name: "Addi",
2035
2035
  description: "",
2036
2036
  buttonTitle: "Pay with Addi",
2037
2037
  icon: "Addi"
2038
2038
  },
2039
- [J.AFFIRM]: {
2039
+ [Y.AFFIRM]: {
2040
2040
  name: "Affirm",
2041
2041
  description: "",
2042
2042
  buttonTitle: "Pay with Affirm",
2043
2043
  icon: "Affirm"
2044
2044
  },
2045
- [J.AFTERPAY]: {
2045
+ [Y.AFTERPAY]: {
2046
2046
  name: "Afterpay",
2047
2047
  description: "",
2048
2048
  buttonTitle: "Pay with Afterpay",
2049
2049
  icon: "Afterpay"
2050
2050
  },
2051
- [J.ALMA]: {
2051
+ [Y.ALMA]: {
2052
2052
  name: "Alma",
2053
2053
  description: "",
2054
2054
  buttonTitle: "Pay with Alma",
2055
2055
  icon: "Alma"
2056
2056
  },
2057
- [J.APLAZAME]: {
2057
+ [Y.APLAZAME]: {
2058
2058
  name: "Aplazame",
2059
2059
  description: "",
2060
2060
  buttonTitle: "Pay with Aplazame",
2061
2061
  icon: "Aplazame"
2062
2062
  },
2063
- [J.APLAZO]: {
2063
+ [Y.APLAZO]: {
2064
2064
  name: "Aplazo",
2065
2065
  description: "",
2066
2066
  buttonTitle: "Pay with Aplazo",
2067
2067
  icon: "Aplazo"
2068
2068
  },
2069
- [J.ATOME]: {
2069
+ [Y.ATOME]: {
2070
2070
  name: "Atome",
2071
2071
  description: "",
2072
2072
  buttonTitle: "Pay with Atome",
2073
2073
  icon: "Atome"
2074
2074
  },
2075
- [J.BILLEASE]: {
2075
+ [Y.BILLEASE]: {
2076
2076
  name: "Billease",
2077
2077
  description: "",
2078
2078
  buttonTitle: "Pay with Billease",
2079
2079
  icon: "Billease"
2080
2080
  },
2081
- [J.CASHEW]: {
2081
+ [Y.CASHEW]: {
2082
2082
  name: "Cashew",
2083
2083
  description: "",
2084
2084
  buttonTitle: "Pay with Cashew",
2085
2085
  icon: "Cashew"
2086
2086
  },
2087
- [J.CASHPRESSO]: {
2087
+ [Y.CASHPRESSO]: {
2088
2088
  name: "Cashpresso",
2089
2089
  description: "",
2090
2090
  buttonTitle: "Pay with Cashpresso",
2091
2091
  icon: "Cashpresso"
2092
2092
  },
2093
- [J.CLEARPAY]: {
2093
+ [Y.CLEARPAY]: {
2094
2094
  name: "Clearpay",
2095
2095
  description: "",
2096
2096
  buttonTitle: "Pay with Clearpay",
2097
2097
  icon: "Clearpay"
2098
2098
  },
2099
- [J.CLEO]: {
2099
+ [Y.CLEO]: {
2100
2100
  name: "Cleo",
2101
2101
  description: "",
2102
2102
  buttonTitle: "Pay with Cleo",
2103
2103
  icon: "Cleo"
2104
2104
  },
2105
- [J.DANA]: {
2105
+ [Y.DANA]: {
2106
2106
  name: "Dana",
2107
2107
  description: "",
2108
2108
  buttonTitle: "Pay with Dana",
2109
2109
  icon: "Dana"
2110
2110
  },
2111
- [J.EASYPAISA]: {
2111
+ [Y.EASYPAISA]: {
2112
2112
  name: "Easypaisa",
2113
2113
  description: "",
2114
2114
  buttonTitle: "Pay with Easypaisa",
2115
2115
  icon: "Easypaisa"
2116
2116
  },
2117
- [J.FINVERO]: {
2117
+ [Y.FINVERO]: {
2118
2118
  name: "Finvero",
2119
2119
  description: "",
2120
2120
  buttonTitle: "Pay with Finvero",
2121
2121
  icon: "Finvero"
2122
2122
  },
2123
- [J.FUPAY]: {
2123
+ [Y.FUPAY]: {
2124
2124
  name: "FuPay",
2125
2125
  description: "",
2126
2126
  buttonTitle: "Pay with FuPay",
2127
2127
  icon: "Fupay"
2128
2128
  },
2129
- [J.GCASG]: {
2129
+ [Y.GCASG]: {
2130
2130
  name: "GCasg",
2131
2131
  description: "",
2132
2132
  buttonTitle: "Pay with GCasg",
2133
2133
  icon: "Gcasg"
2134
2134
  },
2135
- [J.GRABPAY]: {
2135
+ [Y.GRABPAY]: {
2136
2136
  name: "GrabPay",
2137
2137
  description: "",
2138
2138
  buttonTitle: "Pay with GrabPay",
2139
2139
  icon: "Grabpay"
2140
2140
  },
2141
- [J.HUMM]: {
2141
+ [Y.HUMM]: {
2142
2142
  name: "Humm",
2143
2143
  description: "",
2144
2144
  buttonTitle: "Pay with Humm",
2145
2145
  icon: "Humm"
2146
2146
  },
2147
- [J.KAKAOPAY]: {
2147
+ [Y.KAKAOPAY]: {
2148
2148
  name: "KakaoPay",
2149
2149
  description: "",
2150
2150
  buttonTitle: "Pay with KakaoPay",
2151
2151
  icon: "Kakaopay"
2152
2152
  },
2153
- [J.KLARNA]: {
2153
+ [Y.KLARNA]: {
2154
2154
  name: "Klarna",
2155
2155
  description: "",
2156
2156
  buttonTitle: "Pay with Klarna",
2157
2157
  icon: "Klarna"
2158
2158
  },
2159
- [J.KUESKIPAY]: {
2159
+ [Y.KUESKIPAY]: {
2160
2160
  name: "KueskiPay",
2161
2161
  description: "",
2162
2162
  buttonTitle: "Pay with KueskiPay",
2163
2163
  icon: "Kueskipay"
2164
2164
  },
2165
- [J.LARA]: {
2165
+ [Y.LARA]: {
2166
2166
  name: "Lara",
2167
2167
  description: "",
2168
2168
  buttonTitle: "Pay with Lara",
2169
2169
  icon: "Lara"
2170
2170
  },
2171
- [J.LATITUDEPAY]: {
2171
+ [Y.LATITUDEPAY]: {
2172
2172
  name: "LatitudePay",
2173
2173
  description: "",
2174
2174
  buttonTitle: "Pay with LatitudePay",
2175
2175
  icon: "Latitudepay"
2176
2176
  },
2177
- [J.LAYBUY]: {
2177
+ [Y.LAYBUY]: {
2178
2178
  name: "Laybuy",
2179
2179
  description: "",
2180
2180
  buttonTitle: "Pay with Laybuy",
2181
2181
  icon: "Laybuy"
2182
2182
  },
2183
- [J.LIMEPAY]: {
2183
+ [Y.LIMEPAY]: {
2184
2184
  name: "Limepay",
2185
2185
  description: "",
2186
2186
  buttonTitle: "Pay with Limepay",
2187
2187
  icon: "Limepay"
2188
2188
  },
2189
- [J.PACE]: {
2189
+ [Y.PACE]: {
2190
2190
  name: "Pace",
2191
2191
  description: "",
2192
2192
  buttonTitle: "Pay with Pace",
2193
2193
  icon: "Pace"
2194
2194
  },
2195
- [J.PAGALEVE]: {
2195
+ [Y.PAGALEVE]: {
2196
2196
  name: "Pagaleve",
2197
2197
  description: "",
2198
2198
  buttonTitle: "Pay with Pagaleve",
2199
2199
  icon: "Pagaleve"
2200
2200
  },
2201
- [J.PARIBAS]: {
2201
+ [Y.PARIBAS]: {
2202
2202
  name: "BNP Paribas",
2203
2203
  description: "",
2204
2204
  buttonTitle: "Pay with BNP Paribas",
2205
2205
  icon: "Paribas"
2206
2206
  },
2207
- [J.PAYWITHFOUR]: {
2207
+ [Y.PAYWITHFOUR]: {
2208
2208
  name: "Pay With Four",
2209
2209
  description: "",
2210
2210
  buttonTitle: "Pay with Pay With Four",
2211
2211
  icon: "Paywithfour"
2212
2212
  },
2213
- [J.PAYJUSTNOW]: {
2213
+ [Y.PAYJUSTNOW]: {
2214
2214
  name: "PayJustNow",
2215
2215
  description: "",
2216
2216
  buttonTitle: "Pay with PayJustNow",
2217
2217
  icon: "Payjustnow"
2218
2218
  },
2219
- [J.PAYTM]: {
2219
+ [Y.PAYTM]: {
2220
2220
  name: "PayTM",
2221
2221
  description: "",
2222
2222
  buttonTitle: "Pay with PayTM",
2223
2223
  icon: "Paytm"
2224
2224
  },
2225
- [J.PAYBRIGHT]: {
2225
+ [Y.PAYBRIGHT]: {
2226
2226
  name: "Paybright",
2227
2227
  description: "",
2228
2228
  buttonTitle: "Pay with Paybright",
2229
2229
  icon: "Paybright"
2230
2230
  },
2231
- [J.PAYFLEX]: {
2231
+ [Y.PAYFLEX]: {
2232
2232
  name: "Payflex",
2233
2233
  description: "",
2234
2234
  buttonTitle: "Pay with Payflex",
2235
2235
  icon: "Payflex"
2236
2236
  },
2237
- [J.PAYRIGHT]: {
2237
+ [Y.PAYRIGHT]: {
2238
2238
  name: "Payright",
2239
2239
  description: "",
2240
2240
  buttonTitle: "Pay with Payright",
2241
2241
  icon: "Payright"
2242
2242
  },
2243
- [J.POSTPAY]: {
2243
+ [Y.POSTPAY]: {
2244
2244
  name: "Postpay",
2245
2245
  description: "",
2246
2246
  buttonTitle: "Pay with Postpay",
2247
2247
  icon: "Postpay"
2248
2248
  },
2249
- [J.RATEPAY]: {
2249
+ [Y.RATEPAY]: {
2250
2250
  name: "Ratepay",
2251
2251
  description: "",
2252
2252
  buttonTitle: "Pay with Ratepay",
2253
2253
  icon: "Ratepay"
2254
2254
  },
2255
- [J.RIVERTY]: {
2255
+ [Y.RIVERTY]: {
2256
2256
  name: "Riverty",
2257
2257
  description: "",
2258
2258
  buttonTitle: "Pay with Riverty",
2259
2259
  icon: "Riverty"
2260
2260
  },
2261
- [J.SCALAPAY]: {
2261
+ [Y.SCALAPAY]: {
2262
2262
  name: "Scalapay",
2263
2263
  description: "",
2264
2264
  buttonTitle: "Pay with Scalapay",
2265
2265
  icon: "Scalapay"
2266
2266
  },
2267
- [J.SEZZLE]: {
2267
+ [Y.SEZZLE]: {
2268
2268
  name: "Sezzle",
2269
2269
  description: "",
2270
2270
  buttonTitle: "Pay with Sezzle",
2271
2271
  icon: "Sezzle"
2272
2272
  },
2273
- [J.SHOPBACK]: {
2273
+ [Y.SHOPBACK]: {
2274
2274
  name: "ShopBack",
2275
2275
  description: "",
2276
2276
  buttonTitle: "Pay with ShopBack",
2277
2277
  icon: "Shopback"
2278
2278
  },
2279
- [J.SMARTPAY]: {
2279
+ [Y.SMARTPAY]: {
2280
2280
  name: "Smartpay",
2281
2281
  description: "",
2282
2282
  buttonTitle: "Pay with Smartpay",
2283
2283
  icon: "Smartpay"
2284
2284
  },
2285
- [J.SOFINCO]: {
2285
+ [Y.SOFINCO]: {
2286
2286
  name: "Sofinco",
2287
2287
  description: "",
2288
2288
  buttonTitle: "Pay with Sofinco",
2289
2289
  icon: "Sofinco"
2290
2290
  },
2291
- [J.SPLITIT]: {
2291
+ [Y.SPLITIT]: {
2292
2292
  name: "Splitit",
2293
2293
  description: "",
2294
2294
  buttonTitle: "Pay with Splitit",
2295
2295
  icon: "Splitit"
2296
2296
  },
2297
- [J.TABBY]: {
2297
+ [Y.TABBY]: {
2298
2298
  name: "Tabby",
2299
2299
  description: "",
2300
2300
  buttonTitle: "Pay with Tabby",
2301
2301
  icon: "Tabby"
2302
2302
  },
2303
- [J.TAMARA]: {
2303
+ [Y.TAMARA]: {
2304
2304
  name: "Tamara",
2305
2305
  description: "",
2306
2306
  buttonTitle: "Pay with Tamara",
2307
2307
  icon: "Tamara"
2308
2308
  },
2309
- [J.TENDOPAY]: {
2309
+ [Y.TENDOPAY]: {
2310
2310
  name: "Tendopay",
2311
2311
  description: "",
2312
2312
  buttonTitle: "Pay with Tendopay",
2313
2313
  icon: "Tendopay"
2314
2314
  },
2315
- [J.TOUCHNGO]: {
2315
+ [Y.TOUCHNGO]: {
2316
2316
  name: "Touch'n Go",
2317
2317
  description: "",
2318
2318
  buttonTitle: "Pay with Touch'n Go",
2319
2319
  icon: "Touchngo"
2320
2320
  },
2321
- [J.TRIPLEA]: {
2321
+ [Y.TRIPLEA]: {
2322
2322
  name: "Triple-A",
2323
2323
  description: "",
2324
2324
  buttonTitle: "Pay with Triple-A",
2325
2325
  icon: "Triplea"
2326
2326
  },
2327
- [J.TRUEMONEY]: {
2327
+ [Y.TRUEMONEY]: {
2328
2328
  name: "TrueMoney",
2329
2329
  description: "",
2330
2330
  buttonTitle: "Pay with TrueMoney",
2331
2331
  icon: "Truemoney"
2332
2332
  },
2333
- [J.TWISTO]: {
2333
+ [Y.TWISTO]: {
2334
2334
  name: "Twisto",
2335
2335
  description: "",
2336
2336
  buttonTitle: "Pay with Twisto",
2337
2337
  icon: "Twisto"
2338
2338
  },
2339
- [J.UPLIFT]: {
2339
+ [Y.UPLIFT]: {
2340
2340
  name: "Uplift",
2341
2341
  description: "",
2342
2342
  buttonTitle: "Pay with Uplift",
2343
2343
  icon: "Uplift"
2344
2344
  },
2345
- [J.VALU]: {
2345
+ [Y.VALU]: {
2346
2346
  name: "ValU",
2347
2347
  description: "",
2348
2348
  buttonTitle: "Pay with ValU",
2349
2349
  icon: "Valu"
2350
2350
  },
2351
- [J.ZEST]: {
2351
+ [Y.ZEST]: {
2352
2352
  name: "Zest Money",
2353
2353
  description: "",
2354
2354
  buttonTitle: "Pay with Zest Money",
2355
2355
  icon: "Zest"
2356
2356
  },
2357
- [J.ZIP]: {
2357
+ [Y.ZIP]: {
2358
2358
  name: "Zip",
2359
2359
  description: "",
2360
2360
  buttonTitle: "Pay with Zip",
2361
2361
  icon: "Zip"
2362
2362
  },
2363
- [J.ZOODPAY]: {
2363
+ [Y.ZOODPAY]: {
2364
2364
  name: "Zoodpay",
2365
2365
  description: "",
2366
2366
  buttonTitle: "Pay with Zoodpay",
2367
2367
  icon: "Zoodpay"
2368
2368
  },
2369
- [J.BKASH]: {
2369
+ [Y.BKASH]: {
2370
2370
  name: "bKash",
2371
2371
  description: "",
2372
2372
  buttonTitle: "Pay with bKash",
2373
2373
  icon: "Bkash"
2374
2374
  },
2375
- [J.ERATY]: {
2375
+ [Y.ERATY]: {
2376
2376
  name: "eRaty",
2377
2377
  description: "",
2378
2378
  buttonTitle: "Pay with eRaty",
@@ -2470,7 +2470,7 @@ var un = {
2470
2470
  "newWindowClose"
2471
2471
  ],
2472
2472
  setup(e, { emit: t }) {
2473
- let n = e, r = t, a = p(null), { isLoading: o } = H(), l = p(!0), d = p(n.providerType), f = p(""), m = p(!!n.options.checkoutOptions?.newWindow), h = null, _ = p(null), { errorMessage: v } = Jt(), y = le(() => un[d.value]?.buttonTitle || `Pay with ${d.value}`), x = le(() => {
2473
+ let n = e, r = t, a = p(null), { isLoading: o } = U(), l = p(!0), d = p(n.providerType), f = p(""), m = p(!!n.options.checkoutOptions?.newWindow), h = null, _ = p(null), { errorMessage: v } = Jt(), y = le(() => un[d.value]?.buttonTitle || `Pay with ${d.value}`), x = le(() => {
2474
2474
  let e = _.value?.gatewayTransactionData?.RedirectUrl || "";
2475
2475
  return !e || !me(e) ? "" : m.value ? e : `${e}${e.includes("?") ? "&" : "?"}embedded=true`;
2476
2476
  }), S = p(!1), ee = p(!1), te = le(() => x.value && !S.value && !ee.value);
@@ -2480,7 +2480,7 @@ var un = {
2480
2480
  let t = JSON.parse(e.data.originalError);
2481
2481
  t?.message && (f.value = t.message);
2482
2482
  }
2483
- e.data.status === "redirect" && e.data.component === "checkout" && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), S.value = !1, e.data.result === "failed" && (f.value = "Payment has been canceled", ie())), e.data.component === "checkout" && e.data.providerType === J.PAYBYACCOUNT && (e.data.status === "failure" ? (n.log?.("[BNPL][PayByAccount]: message received", e.data), f.value = e.data.error, r("newWindowClose")) : e.data.status === "success" && (n.log?.("[BNPL][PayByAccount]: message received", e.data), v.value = ""));
2483
+ e.data.status === "redirect" && e.data.component === "checkout" && (n.log?.(`[Checkout]: message "${e.data.status}" received`, e.data), S.value = !1, e.data.result === "failed" && (f.value = "Payment has been canceled", ie())), e.data.component === "checkout" && e.data.providerType === Y.PAYBYACCOUNT && (e.data.status === "failure" ? (n.log?.("[BNPL][PayByAccount]: message received", e.data), f.value = e.data.error, r("newWindowClose")) : e.data.status === "success" && (n.log?.("[BNPL][PayByAccount]: message received", e.data), v.value = ""));
2484
2484
  }
2485
2485
  }
2486
2486
  function re() {
@@ -2509,7 +2509,7 @@ var un = {
2509
2509
  window.addEventListener("message", ne), lt(a.value, "payfurl-combined-container") || (l.value = !0, r("activate", n.options));
2510
2510
  }), s(() => {
2511
2511
  window.removeEventListener("message", ne);
2512
- }), (e, t) => (b(), A(ye, null, [
2512
+ }), (e, t) => (b(), A(E, null, [
2513
2513
  u(Re(se, { "use-local": "" }, null, 512), [[De, !x.value]]),
2514
2514
  ee.value && !S.value ? (b(), Ve(se, {
2515
2515
  key: 0,
@@ -2560,8 +2560,8 @@ var un = {
2560
2560
  destroy = () => {};
2561
2561
  constructor(e, t) {
2562
2562
  this.log = e, this.apiUrl = t.apiUrl, this.redirectUrl = t.redirectUrl, this.successCallback = t.onSuccess || null;
2563
- let n = new j(t.environment, M(t.publicKey));
2564
- this.httpInvoker = new N(t.publicKey, t.version, n);
2563
+ let n = new M(t.environment, N(t.publicKey));
2564
+ this.httpInvoker = new P(t.publicKey, t.version, n);
2565
2565
  }
2566
2566
  setOnValidate(e) {
2567
2567
  this.userOnValidate = e;
@@ -2580,7 +2580,7 @@ var un = {
2580
2580
  options: a,
2581
2581
  checkoutOptions: o
2582
2582
  }), this.container = e;
2583
- let s = !1, c, l = E({
2583
+ let s = !1, c, l = ge({
2584
2584
  el: e,
2585
2585
  component: Sn,
2586
2586
  props: {
@@ -2595,7 +2595,7 @@ var un = {
2595
2595
  clickGate: this.getOnValidate.bind(this)
2596
2596
  },
2597
2597
  on: {
2598
- activate: L(this, "[sdk][checkoutProcessor][${providerType}]: activate checkout form", (e) => {
2598
+ activate: R(this, "[sdk][checkoutProcessor][${providerType}]: activate checkout form", (e) => {
2599
2599
  if (s) return;
2600
2600
  s = !0, this.log(`[sdk][checkoutProcessor][${r}]: activate checkout form`, e);
2601
2601
  let t = () => {
@@ -2603,16 +2603,16 @@ var un = {
2603
2603
  };
2604
2604
  this.checkout(e, r, a, t), c = this.getMessageHandler(e, r, a, t).bind(this), window.addEventListener("message", c);
2605
2605
  }),
2606
- popup: L(this, "[sdk][checkoutProcessor][${providerType}]: popup open", (t) => {
2606
+ popup: R(this, "[sdk][checkoutProcessor][${providerType}]: popup open", (t) => {
2607
2607
  this.log(`[sdk][checkoutProcessor][${r}]: popup open`, t), this.checkStatus(e, t, r, c);
2608
2608
  }),
2609
- popupClose: L(this, "[sdk][checkoutProcessor][${providerType}]: popup close", () => {
2609
+ popupClose: R(this, "[sdk][checkoutProcessor][${providerType}]: popup close", () => {
2610
2610
  this.log(`[sdk][checkoutProcessor][${r}]: popup close`), this.stopCheckingStatus(null);
2611
2611
  }),
2612
- newWindow: L(this, "[sdk][checkoutProcessor][${providerType}]: new window open", (t) => {
2612
+ newWindow: R(this, "[sdk][checkoutProcessor][${providerType}]: new window open", (t) => {
2613
2613
  this.log(`[sdk][checkoutProcessor][${r}]: new window open`, t), this.checkStatus(e, t, r, c);
2614
2614
  }),
2615
- newWindowClose: L(this, "[sdk][checkoutProcessor][${providerType}]: new window close", () => {
2615
+ newWindowClose: R(this, "[sdk][checkoutProcessor][${providerType}]: new window close", () => {
2616
2616
  this.log(`[sdk][checkoutProcessor][${r}]: new window close`), this.stopCheckingStatus(null);
2617
2617
  })
2618
2618
  }
@@ -2650,13 +2650,13 @@ var un = {
2650
2650
  ...e.checkoutOptions,
2651
2651
  redirectUrl: this.redirectUrl
2652
2652
  },
2653
- metadata: U(n?.metadata)
2654
- }), this.getSuccessCheckoutHandler(t).bind(this), L(this, "[sdk][checkoutProcessor][${providerType}]: failureCheckoutHandler", (e, n) => {
2653
+ metadata: W(n?.metadata)
2654
+ }), this.getSuccessCheckoutHandler(t).bind(this), R(this, "[sdk][checkoutProcessor][${providerType}]: failureCheckoutHandler", (e, n) => {
2655
2655
  r?.(e, n), this.getFailureCheckoutHandler(t).bind(this)(e, n);
2656
2656
  }));
2657
2657
  }
2658
2658
  getSuccessCheckoutHandler(e) {
2659
- return L(this, "[sdk][checkoutProcessor][${providerType}]: successCheckoutHandler", (t, n) => {
2659
+ return R(this, "[sdk][checkoutProcessor][${providerType}]: successCheckoutHandler", (t, n) => {
2660
2660
  this.log(`[sdk][checkoutProcessor][${e}]: successCheckoutHandler`, t, n);
2661
2661
  let r = JSON.parse(n), i = JSON.parse(window.atob(r.checkoutData));
2662
2662
  window.postMessage({
@@ -2668,8 +2668,8 @@ var un = {
2668
2668
  });
2669
2669
  }
2670
2670
  getFailureCheckoutHandler(e) {
2671
- return L(this, "[sdk][checkoutProcessor][${providerType}]: failureCheckoutHandler", (t, n) => {
2672
- this.log(`[sdk][checkoutProcessor][${e}]: failureCheckoutHandler`, t, n), H().stopLoading(), window.postMessage({
2671
+ return R(this, "[sdk][checkoutProcessor][${providerType}]: failureCheckoutHandler", (t, n) => {
2672
+ this.log(`[sdk][checkoutProcessor][${e}]: failureCheckoutHandler`, t, n), U().stopLoading(), window.postMessage({
2673
2673
  status: "error",
2674
2674
  component: "checkout",
2675
2675
  providerType: e,
@@ -2683,32 +2683,32 @@ var un = {
2683
2683
  }
2684
2684
  checkStatus(e, t, n, r) {
2685
2685
  this.checkStatusHandler || (this.checkStatusHandler = setInterval(this.checkStatus.bind(this, e, t, n, r), 5e3), this.log(`[sdk][checkoutProcessor][${n}]: Starting polling...`));
2686
- let i = this, a = L(this, `[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, (e, t) => {
2687
- H().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, e, t), window.postMessage({
2686
+ let i = this, a = R(this, `[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, (e, t) => {
2687
+ U().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: failureCheckStatusHandler`, e, t), window.postMessage({
2688
2688
  status: "message",
2689
2689
  component: "checkout",
2690
2690
  providerType: n,
2691
2691
  message: "Checkout has been cancelled"
2692
2692
  }, "*");
2693
- }), o = L(this, `[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, (t, r) => {
2694
- H().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, {
2693
+ }), o = R(this, `[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, (t, r) => {
2694
+ U().stopLoading(), i.log(`[sdk][checkoutProcessor][${n}]: successCheckStatusHandler`, {
2695
2695
  transactionId: t,
2696
2696
  token: r
2697
2697
  }), Qe(e, "Transaction in progress. Please don't close the window or navigate away");
2698
2698
  let a = {};
2699
2699
  t && (a.transactionId = t), r && (a.token = r), i.successCallback?.(a);
2700
2700
  });
2701
- this.httpInvoker?.invoke(wn(this.apiUrl, t)[Cn.CHECK_STATUS].url, wn(this.apiUrl, t)[Cn.CHECK_STATUS].method, {}, L(this, `[sdk][checkoutProcessor][${n}]: checkStatus, success`, (e, t) => {
2701
+ this.httpInvoker?.invoke(wn(this.apiUrl, t)[Cn.CHECK_STATUS].url, wn(this.apiUrl, t)[Cn.CHECK_STATUS].method, {}, R(this, `[sdk][checkoutProcessor][${n}]: checkStatus, success`, (e, t) => {
2702
2702
  let n = JSON.parse(t);
2703
2703
  if (this.log("checkoutStatus", n), !n) return this.stopCheckingStatus(r), a(e, t);
2704
2704
  if (n.status == "SUCCESS" && n.status === "SUCCESS") return this.stopCheckingStatus(r), o(n.transactionId, n.tokenId);
2705
- }), L(this, `[sdk][checkoutProcessor][${n}]: checkStatus, failure`, (e, t) => (this.log(`[sdk][checkoutProcessor][${n}]: checkStatus`, {
2705
+ }), R(this, `[sdk][checkoutProcessor][${n}]: checkStatus, failure`, (e, t) => (this.log(`[sdk][checkoutProcessor][${n}]: checkStatus`, {
2706
2706
  status: e,
2707
2707
  body: t
2708
2708
  }), this.stopCheckingStatus(r), a(e, t))));
2709
2709
  }
2710
2710
  getMessageHandler(e, t, n, r) {
2711
- return L(this, `[sdk][checkoutProcessor][${t}]: message received`, (i) => {
2711
+ return R(this, `[sdk][checkoutProcessor][${t}]: message received`, (i) => {
2712
2712
  if (i?.data?.status) {
2713
2713
  if (i.data.status === "set-amount") {
2714
2714
  if (Number(e.amount) == Number(i.data.amount)) return;
@@ -2721,68 +2721,10 @@ var un = {
2721
2721
  });
2722
2722
  }
2723
2723
  };
2724
- F([I], Tn.prototype, "cleanUp", null), F([I], Tn.prototype, "addCheckout", null), F([I], Tn.prototype, "checkout", null), F([I], Tn.prototype, "getSuccessCheckoutHandler", null), F([I], Tn.prototype, "getFailureCheckoutHandler", null), F([I], Tn.prototype, "stopCheckingStatus", null), F([I], Tn.prototype, "checkStatus", null), F([I], Tn.prototype, "getMessageHandler", null);
2725
- var Y = {
2726
- name: "@payfurl/client",
2727
- private: !1,
2728
- version: "4.9.4",
2729
- files: ["dist/sdk"],
2730
- type: "module",
2731
- main: "./dist/sdk/payfurl.umd.js",
2732
- module: "./dist/sdk/payfurl.es.js",
2733
- types: "./dist/sdk/payfurl.d.ts",
2734
- exports: { ".": {
2735
- import: "./dist/sdk/payfurl.es.js",
2736
- require: "./dist/sdk/payfurl.umd.js"
2737
- } },
2738
- scripts: {
2739
- dev: "node .build/config-local.mjs && vite -c vite.iframe.config.ts",
2740
- "build-iframe": "node .build/config-local.mjs && vite build -c vite.iframe.config.ts --emptyOutDir",
2741
- "build-secure": "node .build/config-local.mjs && vite build -c vite.secure.config.ts --emptyOutDir",
2742
- "build-sdk": "node .build/config-local.mjs && vite build -c vite.sdk.config.ts",
2743
- build: "npm run build-all",
2744
- "build-all": "npm run build-iframe && npm run build-secure && npm run build-sdk",
2745
- preview: "vite preview",
2746
- server: "python3 -m http.server 3001",
2747
- test: "node .build/config-local.mjs && jest",
2748
- "update-packages": "ncu -u && npm update --save",
2749
- remove_js: "git ls-files -o --exclude-standard | grep '.js' | xargs rm",
2750
- remove_d_ts: "git ls-files -o --exclude-standard | grep '.d.ts' | xargs rm"
2751
- },
2752
- dependencies: {
2753
- dayjs: "^1.11.13",
2754
- vue: "^3.5.10"
2755
- },
2756
- devDependencies: {
2757
- "@babel/preset-env": "^7.25.4",
2758
- "@babel/types": "^7.25.6",
2759
- "@jest/globals": "^29.7.0",
2760
- "@rollup/plugin-typescript": "^12.1.0",
2761
- "@types/applepayjs": "^14.0.8",
2762
- "@types/jest": "^29.5.13",
2763
- "@types/jest-when": "^3.5.5",
2764
- "@types/node": "^22.7.4",
2765
- "@vitejs/plugin-vue": "^6.0.7",
2766
- "@vue/eslint-config-prettier": "^9.0.0",
2767
- "@vue/eslint-config-typescript": "^13.0.0",
2768
- "@vue/vue3-jest": "^29.2.6",
2769
- "babel-jest": "^29.7.0",
2770
- eslint: "^8.56.0",
2771
- "eslint-plugin-vue": "^9.28.0",
2772
- jest: "^29.7.0",
2773
- "jest-environment-jsdom": "^29.7.0",
2774
- "jest-when": "^3.6.0",
2775
- prettier: "^3.3.3",
2776
- "rollup-plugin-visualizer": "^5.12.0",
2777
- "ts-jest": "^29.2.5",
2778
- "ts-node": "^10.9.2",
2779
- tslib: "^2.8.1",
2780
- typescript: "^5.6.2",
2781
- vite: "^8.0.16",
2782
- "vite-plugin-checker": "^0.8.0",
2783
- "vue-tsc": "^2.1.6"
2784
- }
2785
- }, En = {
2724
+ I([L], Tn.prototype, "cleanUp", null), I([L], Tn.prototype, "addCheckout", null), I([L], Tn.prototype, "checkout", null), I([L], Tn.prototype, "getSuccessCheckoutHandler", null), I([L], Tn.prototype, "getFailureCheckoutHandler", null), I([L], Tn.prototype, "stopCheckingStatus", null), I([L], Tn.prototype, "checkStatus", null), I([L], Tn.prototype, "getMessageHandler", null);
2725
+ //#endregion
2726
+ //#region src/sdk/processors/fraudProcessor.ts
2727
+ var En = {
2786
2728
  CHECK_FRAUD: "CHECK_FRAUD",
2787
2729
  RESOLVE_THREE_DS: "RESOLVE_THREE_DS",
2788
2730
  CANCEL_THREE_DS: "CANCEL_THREE_DS"
@@ -2817,8 +2759,8 @@ var Y = {
2817
2759
  httpInvoker = null;
2818
2760
  constructor(e, t) {
2819
2761
  this.log = e, this.providerId = t.providerId, this.stopPaymentOnFailure = t.stopPaymentOnFailure, this.apiUrl = t.apiUrl, this.metadata = t.metadata, this.getFraudCheckData = t.getFraudCheckData;
2820
- let n = new j(t.environment, M(t.publicKey));
2821
- this.httpInvoker = new N(t.publicKey, t.version, n);
2762
+ let n = new M(t.environment, N(t.publicKey));
2763
+ this.httpInvoker = new P(t.publicKey, t.version, n);
2822
2764
  }
2823
2765
  fraudCheck(e, t) {
2824
2766
  if (!this.paymentInformation && !this.paypalInformation) return t({ error: "Payment information is required" });
@@ -2831,13 +2773,13 @@ var Y = {
2831
2773
  address: this.address,
2832
2774
  order: this.order,
2833
2775
  metadata: this.metadata
2834
- }), this.httpInvoker?.invoke(Dn(this.apiUrl)[En.CHECK_FRAUD].url, Dn(this.apiUrl)[En.CHECK_FRAUD].method, this.getFraudCheckData(this.providerId, this.amount, this.currency, this.paymentInformation, this.paypalInformation, this.customer, this.address, this.order, this.metadata), L(this, "[fraudCheck], success", (n, r) => {
2776
+ }), this.httpInvoker?.invoke(Dn(this.apiUrl)[En.CHECK_FRAUD].url, Dn(this.apiUrl)[En.CHECK_FRAUD].method, this.getFraudCheckData(this.providerId, this.amount, this.currency, this.paymentInformation, this.paypalInformation, this.customer, this.address, this.order, this.metadata), R(this, "[fraudCheck], success", (n, r) => {
2835
2777
  if (this.log("[fraudCheck], success", n, r, this.stopPaymentOnFailure), this.checkResult = JSON.parse(r), this.checkResult === null) return t({
2836
2778
  error: "Fraud Check Failed",
2837
2779
  body: r
2838
2780
  });
2839
2781
  this.checkResult.providerId = this.providerId, this.checkResult.stopPaymentOnFailure = this.stopPaymentOnFailure, e(this.checkResult);
2840
- }), L(this, "[fraudCheck], failure", (e, n) => {
2782
+ }), R(this, "[fraudCheck], failure", (e, n) => {
2841
2783
  this.log("[fraudCheck], failure", e, n), t({
2842
2784
  error: "Fraud Check Failed",
2843
2785
  body: n
@@ -2845,7 +2787,7 @@ var Y = {
2845
2787
  }));
2846
2788
  }
2847
2789
  resolveThreeDsResult(e, t, n) {
2848
- this.httpInvoker?.invoke(Dn(this.apiUrl)[En.RESOLVE_THREE_DS].url, Dn(this.apiUrl)[En.RESOLVE_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), L(this, "[resolveThreeDsResult], success", (e, r) => {
2790
+ this.httpInvoker?.invoke(Dn(this.apiUrl)[En.RESOLVE_THREE_DS].url, Dn(this.apiUrl)[En.RESOLVE_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), R(this, "[resolveThreeDsResult], success", (e, r) => {
2849
2791
  this.log("[resolveThreeDsResult], success", e, r);
2850
2792
  let i = JSON.parse(r);
2851
2793
  if (i === null) return n({
@@ -2853,7 +2795,7 @@ var Y = {
2853
2795
  body: r
2854
2796
  });
2855
2797
  t(i);
2856
- }), L(this, "[resolveThreeDsResult], failure", (e, t) => {
2798
+ }), R(this, "[resolveThreeDsResult], failure", (e, t) => {
2857
2799
  this.log("[resolveThreeDsResult], failure", e, t), n({
2858
2800
  error: "3DS result resolution failed",
2859
2801
  body: t
@@ -2861,9 +2803,9 @@ var Y = {
2861
2803
  }));
2862
2804
  }
2863
2805
  cancelThreeDsOrder(e, t, n) {
2864
- this.httpInvoker?.invoke(Dn(this.apiUrl)[En.CANCEL_THREE_DS].url, Dn(this.apiUrl)[En.CANCEL_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), L(this, "[cancelThreeDsOrder], success", (e, n) => {
2806
+ this.httpInvoker?.invoke(Dn(this.apiUrl)[En.CANCEL_THREE_DS].url, Dn(this.apiUrl)[En.CANCEL_THREE_DS].method, JSON.stringify({ threeDSServerTransID: e }), R(this, "[cancelThreeDsOrder], success", (e, n) => {
2865
2807
  this.log("[cancelThreeDsOrder], success", e, n), t({});
2866
- }), L(this, "[cancelThreeDsOrder], failure", (e, t) => {
2808
+ }), R(this, "[cancelThreeDsOrder], failure", (e, t) => {
2867
2809
  this.log("[cancelThreeDsOrder], failure", e, t), n({
2868
2810
  error: "3DS cancel notification failed",
2869
2811
  body: t
@@ -2898,7 +2840,7 @@ var Y = {
2898
2840
  return this.checkResult;
2899
2841
  }
2900
2842
  };
2901
- F([I], On.prototype, "fraudCheck", null), F([I], On.prototype, "resolveThreeDsResult", null), F([I], On.prototype, "cancelThreeDsOrder", null);
2843
+ I([L], On.prototype, "fraudCheck", null), I([L], On.prototype, "resolveThreeDsResult", null), I([L], On.prototype, "cancelThreeDsOrder", null);
2902
2844
  //#endregion
2903
2845
  //#region src/sdk/utils/errorDetails.ts
2904
2846
  function kn(e) {
@@ -2952,7 +2894,7 @@ var Mn = { style: { position: "relative" } }, Nn = {
2952
2894
  "error"
2953
2895
  ],
2954
2896
  setup(e, { emit: t }) {
2955
- let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } = H();
2897
+ let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } = U();
2956
2898
  function _() {
2957
2899
  if (m) return;
2958
2900
  if (m = !0, document.getElementById(Pn)) {
@@ -3013,11 +2955,20 @@ var Mn = { style: { position: "relative" } }, Nn = {
3013
2955
  });
3014
2956
  }
3015
2957
  function re() {
2958
+ let e = n.options.billingDetailsRequired === !0;
3016
2959
  return {
3017
2960
  apiVersion: 2,
3018
2961
  apiVersionMinor: 0,
2962
+ ...e ? { emailRequired: !0 } : {},
3019
2963
  allowedPaymentMethods: [{
3020
2964
  ...x,
2965
+ parameters: {
2966
+ ...x.parameters,
2967
+ ...e ? {
2968
+ billingAddressRequired: !0,
2969
+ billingAddressParameters: { format: "FULL" }
2970
+ } : {}
2971
+ },
3021
2972
  tokenizationSpecification: {
3022
2973
  type: "PAYMENT_GATEWAY",
3023
2974
  parameters: {
@@ -3049,7 +3000,7 @@ var Mn = { style: { position: "relative" } }, Nn = {
3049
3000
  window.removeEventListener("message", C);
3050
3001
  }), c(() => {
3051
3002
  window.addEventListener("message", C), lt(a.value, "payfurl-combined-container") || (d.value = !0, r("activate"), _());
3052
- }), (e, t) => (b(), A(ye, null, [k("div", Mn, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
3003
+ }), (e, t) => (b(), A(E, null, [k("div", Mn, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
3053
3004
  style: { position: "relative" },
3054
3005
  ref_key: "root",
3055
3006
  ref: a
@@ -3075,8 +3026,8 @@ var Mn = { style: { position: "relative" } }, Nn = {
3075
3026
  order = null;
3076
3027
  constructor(e, t) {
3077
3028
  this.log = e, this.environment = t.environment, this.apiUrl = t.apiUrl, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
3078
- let n = new j(t.environment, M(t.publicKey));
3079
- this.httpInvoker = new N(t.publicKey, t.version, n);
3029
+ let n = new M(t.environment, N(t.publicKey));
3030
+ this.httpInvoker = new P(t.publicKey, t.version, n);
3080
3031
  }
3081
3032
  setAmount(e) {
3082
3033
  this.amount = e;
@@ -3111,7 +3062,7 @@ var Mn = { style: { position: "relative" } }, Nn = {
3111
3062
  }), this.validateOptions(e, n, r, i), this.setAmount(n), this.setCurrency(r);
3112
3063
  let a = !1;
3113
3064
  this.container = e;
3114
- let o = E({
3065
+ let o = ge({
3115
3066
  el: e,
3116
3067
  component: Fn,
3117
3068
  props: {
@@ -3124,12 +3075,26 @@ var Mn = { style: { position: "relative" } }, Nn = {
3124
3075
  clickGate: this.getOnValidate.bind(this)
3125
3076
  },
3126
3077
  on: {
3127
- activate: L(this, "[GooglePay]: activate", () => {
3078
+ activate: R(this, "[GooglePay]: activate", () => {
3128
3079
  a || (a = !0, this.log("[GooglePay]: activate googlepay form"));
3129
3080
  }),
3130
- complete: L(this, "[GooglePay]: complete", (n) => {
3081
+ complete: R(this, "[GooglePay]: complete", (n) => {
3131
3082
  this.log("[GooglePay]: complete", n);
3132
- let r = {
3083
+ let r = n.paymentMethodData.info.billingAddress, [a, ...o] = r?.name?.trim().split(/\s+/) ?? [], s = this.billingAddress ? {
3084
+ line1: this.billingAddress.streetAddress,
3085
+ line2: this.billingAddress.streetAddress2,
3086
+ city: this.billingAddress.city,
3087
+ country: this.billingAddress.country,
3088
+ postalCode: this.billingAddress.postalCode,
3089
+ state: this.billingAddress.state
3090
+ } : r && {
3091
+ line1: r.address1,
3092
+ line2: r.address2,
3093
+ city: r.locality,
3094
+ country: r.countryCode,
3095
+ postalCode: r.postalCode,
3096
+ state: r.administrativeArea
3097
+ }, c = {
3133
3098
  amount: this.amount,
3134
3099
  currency: this.currency,
3135
3100
  paymentData: {
@@ -3144,18 +3109,11 @@ var Mn = { style: { position: "relative" } }, Nn = {
3144
3109
  cardNetwork: n.paymentMethodData.info.cardNetwork
3145
3110
  }
3146
3111
  },
3147
- firstName: this.customer?.firstName,
3148
- lastName: this.customer?.lastName,
3149
- email: this.customer?.email,
3112
+ firstName: this.customer?.firstName || a,
3113
+ lastName: this.customer?.lastName || o.join(" ") || a,
3114
+ email: this.customer?.email || n.email,
3150
3115
  phone: this.customer?.phoneNumber,
3151
- address: this.billingAddress && {
3152
- line1: this.billingAddress.streetAddress,
3153
- line2: this.billingAddress.streetAddress2,
3154
- city: this.billingAddress.city,
3155
- country: this.billingAddress.country,
3156
- postalCode: this.billingAddress.postalCode,
3157
- state: this.billingAddress.state
3158
- } || void 0,
3116
+ address: s || void 0,
3159
3117
  order: this.order && {
3160
3118
  dutyAmount: this.order.taxAmount,
3161
3119
  freightAmount: this.order.shippingAmount,
@@ -3167,12 +3125,12 @@ var Mn = { style: { position: "relative" } }, Nn = {
3167
3125
  unitOfMeasure: e.unitOfMeasure
3168
3126
  }))
3169
3127
  } || void 0,
3170
- metadata: U(i?.metadata)
3128
+ metadata: W(i?.metadata)
3171
3129
  };
3172
- this.addChargeWithGooglePay(e, t, r);
3130
+ this.addChargeWithGooglePay(e, t, c);
3173
3131
  }),
3174
- error: L(this, "[GooglePay]: error", (t) => {
3175
- this.log("[GooglePay]: error", t), P(e, "Unable to pay with Google Pay"), this.failureCallback?.({
3132
+ error: R(this, "[GooglePay]: error", (t) => {
3133
+ this.log("[GooglePay]: error", t), F(e, "Unable to pay with Google Pay"), this.failureCallback?.({
3176
3134
  error: "Unable to pay with Google Pay",
3177
3135
  body: t
3178
3136
  });
@@ -3185,27 +3143,27 @@ var Mn = { style: { position: "relative" } }, Nn = {
3185
3143
  this.log("[addChargeWithGooglePay]", n), this.httpInvoker?.invoke(Ln(this.apiUrl)[In.ADD_CHARGE_WITH_GOOGLE_PAY].url, Ln(this.apiUrl)[In.ADD_CHARGE_WITH_GOOGLE_PAY].method, JSON.stringify(n), this.getSuccessAddChargeHandler(e).bind(this), this.getFailureAddChargeHandler(e).bind(this), { providerId: t });
3186
3144
  }
3187
3145
  getFailureAddChargeHandler(e) {
3188
- return L(this, "[GooglePay], failure", (t, n) => {
3189
- this.log("[GooglePay], failure", n), P(e, "Unable to pay with Google Pay"), this.failureCallback?.({
3146
+ return R(this, "[GooglePay], failure", (t, n) => {
3147
+ this.log("[GooglePay], failure", n), F(e, "Unable to pay with Google Pay"), this.failureCallback?.({
3190
3148
  error: "Unable to pay with Google Pay",
3191
3149
  body: n
3192
3150
  });
3193
3151
  });
3194
3152
  }
3195
3153
  getSuccessAddChargeHandler(e) {
3196
- return L(this, "[GooglePay], success", (e, t) => {
3154
+ return R(this, "[GooglePay], success", (e, t) => {
3197
3155
  let n = JSON.parse(t);
3198
3156
  this.log("[GooglePay], success", n), this.successCallback?.({ transactionId: n.chargeId });
3199
3157
  });
3200
3158
  }
3201
3159
  validateOptions(t, n, r, i) {
3202
- if (!R(r)) throw P(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
3203
- if (!e(n)) throw P(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
3204
- if (!i.gateway) throw P(t, "Invalid gateway parameter"), TypeError("Invalid gateway parameter");
3205
- if (!i.googlePayGatewayMerchantId) throw P(t, "Invalid gateway merchant id parameter"), TypeError("Invalid gateway merchant id parameter");
3160
+ if (!z(r)) throw F(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
3161
+ if (!e(n)) throw F(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
3162
+ if (!i.gateway) throw F(t, "Invalid gateway parameter"), TypeError("Invalid gateway parameter");
3163
+ if (!i.googlePayGatewayMerchantId) throw F(t, "Invalid gateway merchant id parameter"), TypeError("Invalid gateway merchant id parameter");
3206
3164
  }
3207
3165
  };
3208
- F([I], Rn.prototype, "cleanUp", null), F([I], Rn.prototype, "addGooglePay", null), F([I], Rn.prototype, "addChargeWithGooglePay", null), F([I], Rn.prototype, "getFailureAddChargeHandler", null), F([I], Rn.prototype, "getSuccessAddChargeHandler", null), F([I], Rn.prototype, "validateOptions", null);
3166
+ I([L], Rn.prototype, "cleanUp", null), I([L], Rn.prototype, "addGooglePay", null), I([L], Rn.prototype, "addChargeWithGooglePay", null), I([L], Rn.prototype, "getFailureAddChargeHandler", null), I([L], Rn.prototype, "getSuccessAddChargeHandler", null), I([L], Rn.prototype, "validateOptions", null);
3209
3167
  //#endregion
3210
3168
  //#region \0rolldown_dynamic_import_helper.js
3211
3169
  var zn = (e, t, n) => {
@@ -3291,7 +3249,7 @@ var $n = { style: { position: "relative" } }, er = {
3291
3249
  "cancel"
3292
3250
  ],
3293
3251
  setup(e, { emit: t }) {
3294
- let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } = H();
3252
+ let n = e, r = t, a = p(null), o = p(n.amount), l = p(n.currency), d = p(!0), f = p(""), m = !1, { isLoading: h } = U();
3295
3253
  function _() {
3296
3254
  if (n.log("[onApplePayButtonClicked]"), !ApplePaySession || n.clickGate()?.() === !1) return;
3297
3255
  let e = Kn(n.options, l.value, o.value), t = Wn(n.options.applePayVersion);
@@ -3322,7 +3280,7 @@ var $n = { style: { position: "relative" } }, er = {
3322
3280
  window.removeEventListener("message", y);
3323
3281
  }), c(() => {
3324
3282
  window.addEventListener("message", y), lt(a.value, "payfurl-combined-container") || (d.value = !0, r("activate"), v());
3325
- }), (e, t) => (b(), A(ye, null, [k("div", $n, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
3283
+ }), (e, t) => (b(), A(E, null, [k("div", $n, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
3326
3284
  style: { position: "relative" },
3327
3285
  ref_key: "root",
3328
3286
  ref: a
@@ -3360,8 +3318,8 @@ var $n = { style: { position: "relative" } }, er = {
3360
3318
  order = null;
3361
3319
  constructor(e, t) {
3362
3320
  this.log = e, this.environment = t.environment, this.apiUrl = t.apiUrl, this.publicKey = t.publicKey, this.version = t.version, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
3363
- let n = new j(t.environment, M(t.publicKey));
3364
- this.httpInvoker = new N(t.publicKey, t.version, n);
3321
+ let n = new M(t.environment, N(t.publicKey));
3322
+ this.httpInvoker = new P(t.publicKey, t.version, n);
3365
3323
  }
3366
3324
  setAmount(e) {
3367
3325
  this.amount = e, this.applePayButton?.setAmount(e);
@@ -3396,14 +3354,14 @@ var $n = { style: { position: "relative" } }, er = {
3396
3354
  }), this.validateOptions(e, n, r, i), this.setAmount(n), this.setCurrency(r);
3397
3355
  let a = !1;
3398
3356
  this.container = e;
3399
- let o = L(this, "[ApplePay][renderDefaultComponent]", () => {
3357
+ let o = R(this, "[ApplePay][renderDefaultComponent]", () => {
3400
3358
  this.log("[addApplePay], renderDefaultComponent", {
3401
3359
  providerId: t,
3402
3360
  amount: n,
3403
3361
  currency: r,
3404
3362
  options: i
3405
3363
  });
3406
- let o = E({
3364
+ let o = ge({
3407
3365
  el: e,
3408
3366
  component: tr,
3409
3367
  props: {
@@ -3419,10 +3377,10 @@ var $n = { style: { position: "relative" } }, er = {
3419
3377
  activate: () => {
3420
3378
  a || (a = !0, this.log("activate applepay form"));
3421
3379
  },
3422
- validateMerchant: L(this, "[addApplePay], validateMerchant", (n, r) => {
3380
+ validateMerchant: R(this, "[addApplePay], validateMerchant", (n, r) => {
3423
3381
  this.log("[ApplePay]: validate", n), this.validateMerchant(e, t, n, r);
3424
3382
  }),
3425
- submit: L(this, "[addApplePay], submit", (n, r) => {
3383
+ submit: R(this, "[addApplePay], submit", (n, r) => {
3426
3384
  this.log("[ApplePay]: complete", n);
3427
3385
  let a = {
3428
3386
  amount: this.amount,
@@ -3454,8 +3412,8 @@ var $n = { style: { position: "relative" } }, er = {
3454
3412
  };
3455
3413
  this.addChargeWithApplePay(e, t, a, r);
3456
3414
  }),
3457
- error: L(this, "[addApplePay], error", (t, n) => {
3458
- this.log("[ApplePay]: error", t), P(e, "Unable to pay with ApplePay"), n.completePayment({
3415
+ error: R(this, "[addApplePay], error", (t, n) => {
3416
+ this.log("[ApplePay]: error", t), F(e, "Unable to pay with ApplePay"), n.completePayment({
3459
3417
  status: ApplePaySession.STATUS_FAILURE,
3460
3418
  errors: [{
3461
3419
  code: "unknown",
@@ -3466,13 +3424,13 @@ var $n = { style: { position: "relative" } }, er = {
3466
3424
  body: t
3467
3425
  });
3468
3426
  }),
3469
- cancel: L(this, "[addApplePay], calcel", () => {
3470
- this.log("[ApplePay]: cancel"), P(e, "ApplePay canceled"), this.failureCallback?.({ error: "ApplePay canceled" });
3427
+ cancel: R(this, "[addApplePay], calcel", () => {
3428
+ this.log("[ApplePay]: cancel"), F(e, "ApplePay canceled"), this.failureCallback?.({ error: "ApplePay canceled" });
3471
3429
  })
3472
3430
  }
3473
3431
  });
3474
3432
  this.destroy = o.destroy;
3475
- }), s = L(this, "[ApplePay][renderCustomComponent]", (a) => {
3433
+ }), s = R(this, "[ApplePay][renderCustomComponent]", (a) => {
3476
3434
  this.log("[addApplePay], renderCustomComponent", {
3477
3435
  providerId: t,
3478
3436
  amount: n,
@@ -3486,7 +3444,7 @@ var $n = { style: { position: "relative" } }, er = {
3486
3444
  options: i,
3487
3445
  clientParameters: i.clientParameters,
3488
3446
  onValidate: this.getOnValidate.bind(this),
3489
- onSuccess: L(this, "[addApplePay], success", (e) => {
3447
+ onSuccess: R(this, "[addApplePay], success", (e) => {
3490
3448
  this.log("[addApplePay], success", e), this.applePayButton?.hide();
3491
3449
  let t = {
3492
3450
  token: e.token,
@@ -3494,7 +3452,7 @@ var $n = { style: { position: "relative" } }, er = {
3494
3452
  };
3495
3453
  e.clickToPayData && (t.clickToPayData = e.clickToPayData), this.successCallback?.(t);
3496
3454
  }),
3497
- onFailure: L(this, "[addApplePay], failure", (e) => {
3455
+ onFailure: R(this, "[addApplePay], failure", (e) => {
3498
3456
  this.log("[addApplePay], failure", e), this.applePayButton?.redraw(), this.failureCallback?.({ error: e.error });
3499
3457
  })
3500
3458
  }), this.billingAddress && this.applePayButton?.setBillingAddress(this.billingAddress), this.customer && this.applePayButton?.setCustomerInfo(this.customer), this.order && this.applePayButton?.setOrderInfo(this.order), this.applePayButton?.draw(), window.postMessage({ status: ze }, "*");
@@ -3502,24 +3460,24 @@ var $n = { style: { position: "relative" } }, er = {
3502
3460
  zn(/* #__PURE__ */ Object.assign({
3503
3461
  "./applepay/ApplePayButton.interface.ts": () => import("./ApplePayButton.interface-BvRk9kiK.js"),
3504
3462
  "./applepay/ApplePayButtonOptions.type.ts": () => import("./ApplePayButtonOptions.type-BvRk9kiK.js"),
3505
- "./applepay/PayWayAppleButton.ts": () => import("./PayWayAppleButton-BoR7Jodl.js"),
3506
- "./applepay/payway_rest.ts": () => import("./payway_rest-DJaZXkt6.js")
3507
- }), `./applepay/${i.providerType.toLowerCase()}.ts`, 3).then(L(this, "[localAddApplePay], then", (e) => {
3463
+ "./applepay/PayWayAppleButton.ts": () => import("./PayWayAppleButton-NRBJ3jjI.js"),
3464
+ "./applepay/payway_rest.ts": () => import("./payway_rest-BX6JbR1g.js")
3465
+ }), `./applepay/${i.providerType.toLowerCase()}.ts`, 3).then(R(this, "[localAddApplePay], then", (e) => {
3508
3466
  this.log(`Loading ${i.providerType}...`, e), s(e);
3509
3467
  })).catch(() => {
3510
3468
  this.log(`Error loading ${i.providerType}`), o();
3511
3469
  });
3512
3470
  }
3513
3471
  validateMerchant(e, t, n, r) {
3514
- this.log("[validateMerchant]", n), this.httpInvoker?.invoke(rr(this.apiUrl)[nr.VALIDATE_MERCHANT].url, rr(this.apiUrl)[nr.VALIDATE_MERCHANT].method, JSON.stringify(n), L(this, "[validateMerchant], success", (e, t) => {
3472
+ this.log("[validateMerchant]", n), this.httpInvoker?.invoke(rr(this.apiUrl)[nr.VALIDATE_MERCHANT].url, rr(this.apiUrl)[nr.VALIDATE_MERCHANT].method, JSON.stringify(n), R(this, "[validateMerchant], success", (e, t) => {
3515
3473
  try {
3516
3474
  let e = JSON.parse(t);
3517
3475
  this.log("[validateMerchant], success", e), r.completeMerchantValidation(e);
3518
3476
  } catch (e) {
3519
3477
  this.log("error parsing validateMerchant response", e);
3520
3478
  }
3521
- }), L(this, "[validateMerchant], failure", (t, n) => {
3522
- this.log("[validateMerchant], failure", n), P(e, "Unable to pay with ApplePay"), this.failureCallback?.({
3479
+ }), R(this, "[validateMerchant], failure", (t, n) => {
3480
+ this.log("[validateMerchant], failure", n), F(e, "Unable to pay with ApplePay"), this.failureCallback?.({
3523
3481
  error: "Unable to pay with ApplePay",
3524
3482
  body: n
3525
3483
  });
@@ -3529,8 +3487,8 @@ var $n = { style: { position: "relative" } }, er = {
3529
3487
  this.log("[addChargeWithApplePay]", n), this.httpInvoker?.invoke(rr(this.apiUrl)[nr.ADD_CHARGE_WITH_APPLE_PAY].url, rr(this.apiUrl)[nr.ADD_CHARGE_WITH_APPLE_PAY].method, JSON.stringify(n), this.getSuccessAddChargeHandler(e, r).bind(this), this.getFailureAddChargeHandler(e, r).bind(this), { providerId: t });
3530
3488
  }
3531
3489
  getFailureAddChargeHandler(e, t) {
3532
- return L(this, "[getFailureAddChargeHandler]", (n, r) => {
3533
- this.log("[ApplePay], failure", r), P(e, "Unable to pay with ApplePay"), t.completePayment({
3490
+ return R(this, "[getFailureAddChargeHandler]", (n, r) => {
3491
+ this.log("[ApplePay], failure", r), F(e, "Unable to pay with ApplePay"), t.completePayment({
3534
3492
  status: ApplePaySession.STATUS_FAILURE,
3535
3493
  errors: [{
3536
3494
  code: "unknown",
@@ -3543,7 +3501,7 @@ var $n = { style: { position: "relative" } }, er = {
3543
3501
  });
3544
3502
  }
3545
3503
  getSuccessAddChargeHandler(e, t) {
3546
- return L(this, "[getSuccessAddChargeHandler]", (e, n) => {
3504
+ return R(this, "[getSuccessAddChargeHandler]", (e, n) => {
3547
3505
  let r = JSON.parse(n);
3548
3506
  this.log("[ApplePay], success", r);
3549
3507
  let i = {
@@ -3554,12 +3512,12 @@ var $n = { style: { position: "relative" } }, er = {
3554
3512
  });
3555
3513
  }
3556
3514
  validateOptions(t, n, r, i) {
3557
- if (!R(r)) throw P(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
3558
- if (!e(n)) throw P(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
3559
- if (!i.lineItemLabel) throw P(t, "Invalid lineItemLabel parameter"), TypeError("Invalid lineItemLabel parameter");
3515
+ if (!z(r)) throw F(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
3516
+ if (!e(n)) throw F(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
3517
+ if (!i.lineItemLabel) throw F(t, "Invalid lineItemLabel parameter"), TypeError("Invalid lineItemLabel parameter");
3560
3518
  }
3561
3519
  };
3562
- F([I], ir.prototype, "cleanUp", null), F([I], ir.prototype, "addApplePay", null), F([I], ir.prototype, "validateMerchant", null), F([I], ir.prototype, "addChargeWithApplePay", null), F([I], ir.prototype, "getFailureAddChargeHandler", null), F([I], ir.prototype, "getSuccessAddChargeHandler", null), F([I], ir.prototype, "validateOptions", null);
3520
+ I([L], ir.prototype, "cleanUp", null), I([L], ir.prototype, "addApplePay", null), I([L], ir.prototype, "validateMerchant", null), I([L], ir.prototype, "addChargeWithApplePay", null), I([L], ir.prototype, "getFailureAddChargeHandler", null), I([L], ir.prototype, "getSuccessAddChargeHandler", null), I([L], ir.prototype, "validateOptions", null);
3563
3521
  //#endregion
3564
3522
  //#region src/components/ApplePayIcon.vue
3565
3523
  var ar = /*#__PURE__*/ w(/* @__PURE__ */ C({
@@ -3736,7 +3694,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
3736
3694
  sdk: "https://src.mastercard.com/sdk/srcsdk.mastercard.js",
3737
3695
  lib: "https://src.mastercard.com/srci/integration/2/lib.js?srcDpaId={dpaId}&locale=en_AU"
3738
3696
  }
3739
- }, Z = class extends W {
3697
+ }, Z = class extends G {
3740
3698
  enabled = !0;
3741
3699
  initialized = !1;
3742
3700
  loaded = !1;
@@ -3869,9 +3827,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
3869
3827
  return;
3870
3828
  }
3871
3829
  let t = document.createElement("script");
3872
- t.src = e, t.onload = L(this, "[ClickToPayProcessor]: CheckoutServiceLib loaded", () => {
3830
+ t.src = e, t.onload = R(this, "[ClickToPayProcessor]: CheckoutServiceLib loaded", () => {
3873
3831
  this.log("[ClickToPayProcessor]: CheckoutServiceLib loaded"), this.mcInitClickToPay();
3874
- }), t.onerror = L(this, "[ClickToPayProcessor]: CheckoutServiceLib error", (t) => {
3832
+ }), t.onerror = R(this, "[ClickToPayProcessor]: CheckoutServiceLib error", (t) => {
3875
3833
  this.log("[ClickToPayProcessor]: CheckoutServiceLib error", t), this.sendErrorNotification("CheckoutServiceLib error", [e, t]), this.stopUsing();
3876
3834
  }), document.head.appendChild(t);
3877
3835
  }
@@ -3989,7 +3947,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
3989
3947
  mcShowOtpInput(e, t, n) {
3990
3948
  this.log("[mcShowOtpInput]", this.requestedValidationChannelId, e, t, n);
3991
3949
  let r = this;
3992
- customElements.whenDefined("src-otp-input").then(L(this, "[mcShowOtpInput], success", () => {
3950
+ customElements.whenDefined("src-otp-input").then(R(this, "[mcShowOtpInput], success", () => {
3993
3951
  let i = e.find((e) => e.identityType === "SMS"), a = e.find((e) => e.identityType === "EMAIL"), o = [];
3994
3952
  (!this.requestedValidationChannelId || this.requestedValidationChannelId === "EMAIL") && a && (this.requestedValidationChannelId == "EMAIL" || !this.requestedValidationChannelId && t === "visa") && o.push(a.maskedValidationChannel), (!this.requestedValidationChannelId || this.requestedValidationChannelId === "SMS") && i && o.push(i.maskedValidationChannel), this.log("[src-otp-input], mcShowOtpInput", r.srcOtpInput, e, t, o, n), r.srcOtpInput.loadSupportedValidationChannels?.(e), r.srcOtpInput.setAttribute("network-id", t), r.srcOtpInput.setAttribute("card-brands", t), r.srcOtpInput.setAttribute("masked-identity-value", o.join(",")), n ? r.srcOtpInput.setAttribute("error-reason", n) : r.srcOtpInput.removeAttribute("error-reason"), r.srcOtpInput.style.display = "block", r.adjustRememberMeOnOtpInput(), r.pauseLoadingCardForm();
3995
3953
  })).catch((e) => {
@@ -4016,7 +3974,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4016
3974
  this.showLoginForm();
4017
3975
  }
4018
3976
  showLoginForm() {
4019
- let { destroy: e } = E({
3977
+ let { destroy: e } = ge({
4020
3978
  el: document.body,
4021
3979
  component: Dr,
4022
3980
  props: {
@@ -4024,10 +3982,10 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4024
3982
  options: this.options
4025
3983
  },
4026
3984
  on: {
4027
- close: L(this, "[showLoginForm], onclose", () => {
3985
+ close: R(this, "[showLoginForm], onclose", () => {
4028
3986
  this.log("[LoginForm.close]"), this.stopLoadingCardForm(), e();
4029
3987
  }),
4030
- submit: L(this, "[showLoginForm], onsubmit", ({ email: t, phone: n }) => {
3988
+ submit: R(this, "[showLoginForm], onsubmit", ({ email: t, phone: n }) => {
4031
3989
  this.log("[LoginForm.submit]", t, n), e(), this.customer || this.setCustomerInfo({
4032
3990
  firstName: "",
4033
3991
  lastName: "",
@@ -4035,7 +3993,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4035
3993
  phoneNumber: ""
4036
3994
  }), this.customer.email = t, this.customer.phoneNumber = n, !t && !n ? this.stopLoadingCardForm() : (this.setCards([]), this.mcIdLookup());
4037
3995
  }),
4038
- logout: L(this, "[showLoginForm], onlogout", () => {
3996
+ logout: R(this, "[showLoginForm], onlogout", () => {
4039
3997
  this.log("[LoginForm.logout]"), e(), this.stopLoadingCardForm(), this.setCards([]), this.mcLogout();
4040
3998
  })
4041
3999
  }
@@ -4043,9 +4001,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4043
4001
  }
4044
4002
  checkoutWithCard(e, t, n) {
4045
4003
  this.log("ClickToPayProcessor.checkoutWithExistingCard", e);
4046
- let r = this, i = L(this, "[checkoutWithCard.promiseResolvedHandler]", (e) => {
4004
+ let r = this, i = R(this, "[checkoutWithCard.promiseResolvedHandler]", (e) => {
4047
4005
  r.log("[checkoutWithCard.promiseResolvedHandler]", e), r.hideModalForm(), t(e);
4048
- }), a = L(this, "[checkoutWithCard.promiseRejectedHandler]", (t) => {
4006
+ }), a = R(this, "[checkoutWithCard.promiseRejectedHandler]", (t) => {
4049
4007
  r.log("[checkoutWithCard.promiseRejectedHandler]", t), r.stopUsing(), r.showInfoMessage(Ar), n(t), r.sendErrorNotification("checkoutWithCard error", [
4050
4008
  e,
4051
4009
  o,
@@ -4067,11 +4025,11 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4067
4025
  expiryDate: t,
4068
4026
  ccv: "***",
4069
4027
  enrollCard: r
4070
- }), this.tokenAuthenticationEnabled && this.showModalForm(), this.encryptCard(e, t, n, L(this, "[mcEncryptCard], success", (e, t) => {
4028
+ }), this.tokenAuthenticationEnabled && this.showModalForm(), this.encryptCard(e, t, n, R(this, "[mcEncryptCard], success", (e, t) => {
4071
4029
  this.checkoutWithEncryptedNewCard(e, t, (e) => {
4072
4030
  i(e);
4073
4031
  }, a);
4074
- }), L(this, "[mcEncryptCard], error", (n) => {
4032
+ }), R(this, "[mcEncryptCard], error", (n) => {
4075
4033
  a(n), this.sendErrorNotification("mcEncryptCard error", [{
4076
4034
  cardNumber: e,
4077
4035
  expiryDate: t,
@@ -4080,9 +4038,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4080
4038
  }));
4081
4039
  }
4082
4040
  checkoutWithEncryptedNewCard(e, t, n, r) {
4083
- let i = this, a = L(this, "[checkoutWithNewCard.promiseResolvedHandler]", (e) => {
4041
+ let i = this, a = R(this, "[checkoutWithNewCard.promiseResolvedHandler]", (e) => {
4084
4042
  i.log("[checkoutWithNewCard.promiseResolvedHandler]", e), i.hideModalForm(), e.checkoutActionCode === "SWITCH_CONSUMER" ? i.showLoginForm() : ["CHANGE_CARD", "CANCEL"].includes(e.checkoutActionCode) || n(e);
4085
- }), o = L(this, "[checkoutWithNewCard.promiseRejectedHandler]", (e) => {
4043
+ }), o = R(this, "[checkoutWithNewCard.promiseRejectedHandler]", (e) => {
4086
4044
  i.log("[checkoutWithNewCard.promiseRejectedHandler]", e), i.stopUsing(), i.showInfoMessage(Ar), r(e), i.sendErrorNotification("checkoutWithNewCard error", [s, e]);
4087
4045
  });
4088
4046
  this.showModalForm();
@@ -4109,9 +4067,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4109
4067
  this.log("[mcInitClickToPay] mcCheckoutService or sdk not found", window.MastercardCheckoutServices, window.SRCSDK_MASTERCARD), this.stopUsing();
4110
4068
  return;
4111
4069
  }
4112
- let e = this, t = L(this, "[mcInitClickToPay.promiseResolvedHandler]", (t) => {
4070
+ let e = this, t = R(this, "[mcInitClickToPay.promiseResolvedHandler]", (t) => {
4113
4071
  e.log("[mcInitClickToPay.promiseResolvedHandler]", t), e.updateAvailableCardBrands(t.availableCardBrands), e.loaded = !0, e.resolveReadyCallbacks(), e.localStartCallback && e.localStartCallback();
4114
- }), n = L(this, "[mcInitClickToPay.promiseRejectedHandler]", (t) => {
4072
+ }), n = R(this, "[mcInitClickToPay.promiseRejectedHandler]", (t) => {
4115
4073
  e.log("[mcInitClickToPay.promiseRejectedHandler]", t), e.loaded = !0, e.sendErrorNotification("mcInitClickToPay error", [r, t]), e.stopUsing();
4116
4074
  }), r = {
4117
4075
  srcDpaId: this.options.dpaId,
@@ -4128,9 +4086,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4128
4086
  return;
4129
4087
  }
4130
4088
  this.customer?.email || (e = !0);
4131
- let t = this, n = L(this, "[mcIdLookup.promiseResolvedHandler]", (n) => {
4089
+ let t = this, n = R(this, "[mcIdLookup.promiseResolvedHandler]", (n) => {
4132
4090
  t.log("[mcIdLookup.promiseResolvedHandler]", n), n.consumerPresent ? t.mcInitiateValidation() : !n.consumerPresent && !e && t.customer?.phoneNumber ? t.mcIdLookup(!0) : t.stopLoadingCardForm();
4133
- }), r = L(this, "[mcIdLookup.promiseRejectedHandler]", (e) => {
4091
+ }), r = R(this, "[mcIdLookup.promiseRejectedHandler]", (e) => {
4134
4092
  t.log("[mcIdLookup.promiseRejectedHandler]", e), t.stopLoadingCardForm(), t.sendErrorNotification("mcIdLookup error", [a, e]), t.stopUsing();
4135
4093
  }), i = We(this.customer?.phoneNumber || ""), a = e ? { mobileNumber: {
4136
4094
  phoneNumber: i[1] || "",
@@ -4142,7 +4100,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4142
4100
  this.log("[mcInitiateValidation]", e);
4143
4101
  let t = this;
4144
4102
  this.requestedValidationChannelId = e || "";
4145
- let n = L(this, "[mcInitiateValidation.promiseResolvedHandler]", (e) => {
4103
+ let n = R(this, "[mcInitiateValidation.promiseResolvedHandler]", (e) => {
4146
4104
  t.log("[mcInitiateValidation.promiseResolvedHandler]", e), t.supportedValidationChannels = e.supportedValidationChannels, t.validationChannelsNetwork = e.network, e.maskedValidationChannel && (!t.supportedValidationChannels || t.supportedValidationChannels.length === 0) && (t.supportedValidationChannels = [], (e.maskedValidationChannel.split(",") || []).forEach((e) => {
4147
4105
  t.supportedValidationChannels.push({
4148
4106
  maskedValidationChannel: e,
@@ -4150,15 +4108,15 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4150
4108
  validationChannelId: e.includes("@") ? "EMAIL" : "SMS"
4151
4109
  });
4152
4110
  })), t.mcShowOtpInput(t.supportedValidationChannels, e.network);
4153
- }), r = L(this, "[mcInitiateValidation.promiseRejectedHandler]", (n) => {
4111
+ }), r = R(this, "[mcInitiateValidation.promiseRejectedHandler]", (n) => {
4154
4112
  t.log("[mcInitiateValidation.promiseRejectedHandler]", n), t.stopUsing(), t.sendErrorNotification("mcInitiateValidation error", [{ requestedValidationChannelId: e }, n]);
4155
4113
  });
4156
4114
  this.log("[mcInitiateValidation]", e ? { requestedValidationChannelId: e } : null), window.mcCheckoutService.initiateValidation(e ? { requestedValidationChannelId: e } : void 0).then(n).catch(r);
4157
4115
  }
4158
4116
  mcValidate(e) {
4159
- let t = this, n = L(this, "[mcValidate.promiseResolvedHandler]", (e) => {
4117
+ let t = this, n = R(this, "[mcValidate.promiseResolvedHandler]", (e) => {
4160
4118
  t.log("[mcValidate.promiseResolvedHandler]", e), e.cards ? (t.setCards(e.cards), t.stopLoadingCardForm()) : t.mcGetCards(), t.saveRecognitionToken(e.recognitionToken);
4161
- }), r = L(this, "[mcValidate.promiseRejectedHandler]", (e) => {
4119
+ }), r = R(this, "[mcValidate.promiseRejectedHandler]", (e) => {
4162
4120
  t.log("[mcValidate.promiseRejectedHandler]", e), t.sendErrorNotification("mcValidate error", [i, e]), t.attempts++, t.attempts > 2 || !e?.reason || e.reason == "REQUEST_TIMEOUT" ? (t.stopLoadingCardForm(), t.showMessage("Too many attempts to access your click to pay profile. Please check out as a guest.")) : e.reason === "CODE_INVALID" || e.reason === "RETRIES_EXCEEDED" || e.reason === "ACCT_INACCESSIBLE" || e.reason === "CODE_EXPIRED" ? t.mcShowOtpInput(t.supportedValidationChannels, t.validationChannelsNetwork, e.reason) : (t.stopUsing(), t.showInfoMessage(Ar));
4163
4121
  }), i = {
4164
4122
  value: e,
@@ -4167,25 +4125,25 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4167
4125
  this.log("[mcValidate]", i), this.startLoadingCardForm(), window.mcCheckoutService.completeValidation(i).then(n).catch(r);
4168
4126
  }
4169
4127
  runClickToPay() {
4170
- let e = this, t = L(this, "[runClickToPay.promiseResolvedHandler]", (t) => {
4128
+ let e = this, t = R(this, "[runClickToPay.promiseResolvedHandler]", (t) => {
4171
4129
  e.log("[runClickToPay.promiseResolvedHandler]", t), !t || !t.length ? e.mcIdLookup() : (e.setCards(t), e.stopLoadingCardForm());
4172
- }), n = L(this, "[runClickToPay.promiseRejectedHandler]", (t) => {
4130
+ }), n = R(this, "[runClickToPay.promiseRejectedHandler]", (t) => {
4173
4131
  e.log("[runClickToPay.promiseRejectedHandler]", t), e.stopUsing(), e.stopLoadingCardForm(), e.sendErrorNotification("mcCheckoutService.getCards error", [t]);
4174
4132
  });
4175
4133
  this.log("[runClickToPay]"), window.mcCheckoutService.getCards().then(t).catch(n);
4176
4134
  }
4177
4135
  mcGetCards() {
4178
- let e = this, t = L(this, "[getCards.promiseResolvedHandler]", (t) => {
4136
+ let e = this, t = R(this, "[getCards.promiseResolvedHandler]", (t) => {
4179
4137
  e.log("[getCards.promiseResolvedHandler]", t), e.setCards(t), e.stopLoadingCardForm();
4180
- }), n = L(this, "[getCards.promiseRejectedHandler]", (t) => {
4138
+ }), n = R(this, "[getCards.promiseRejectedHandler]", (t) => {
4181
4139
  e.log("[getCards.promiseRejectedHandler]", t), e.stopLoadingCardForm(), e.stopUsing(), e.sendErrorNotification("getCards error", [t]);
4182
4140
  });
4183
4141
  this.log("[getCards]"), window.mcCheckoutService.getCards().then(t).catch(n);
4184
4142
  }
4185
4143
  mcEncryptCard(e, t, n, r, i) {
4186
- let a = this, o = L(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4144
+ let a = this, o = R(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4187
4145
  a.log("[encryptCard.promiseResolvedHandler]", e), r(e.encryptedCard, e.cardBrand);
4188
- }), s = L(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4146
+ }), s = R(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4189
4147
  a.log("[encryptCard.promiseResolvedHandler]", e), i(e), a.sendErrorNotification("encryptCard error", [l, e]);
4190
4148
  }), c = t.split("/"), l = {
4191
4149
  primaryAccountNumber: e,
@@ -4212,7 +4170,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4212
4170
  let t = this.getCardFormFrame();
4213
4171
  if (t) try {
4214
4172
  t.contentWindow?.postMessage({
4215
- status: _e,
4173
+ status: ve,
4216
4174
  availableCardBrands: e
4217
4175
  }, "*");
4218
4176
  } catch (e) {
@@ -4269,7 +4227,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4269
4227
  return e;
4270
4228
  }
4271
4229
  };
4272
- F([I], Z.prototype, "setContainer", null), F([I], Z.prototype, "setCustomerInfo", null), F([I], Z.prototype, "setCards", null), F([I], Z.prototype, "isSchemeSupported", null), F([I], Z.prototype, "messageHandler", null), F([I], Z.prototype, "init", null), F([I], Z.prototype, "cleanUp", null), F([I], Z.prototype, "start", null), F([I], Z.prototype, "initCheckoutServiceLib", null), F([I], Z.prototype, "initScripts", null), F([I], Z.prototype, "initCss", null), F([I], Z.prototype, "createOtpInput", null), F([I], Z.prototype, "attachOtpInput", null), F([I], Z.prototype, "createLearnMore", null), F([I], Z.prototype, "createModalForm", null), F([I], Z.prototype, "showModalForm", null), F([I], Z.prototype, "hideModalForm", null), F([I], Z.prototype, "mcHideOtpInput", null), F([I], Z.prototype, "mcShowOtpInput", null), F([I], Z.prototype, "adjustRememberMeOnOtpInput", null), F([I], Z.prototype, "mcHideLearnMore", null), F([I], Z.prototype, "mcShowLearnMore", null), F([I], Z.prototype, "showChangeUserPopup", null), F([I], Z.prototype, "showLoginForm", null), F([I], Z.prototype, "checkoutWithCard", null), F([I], Z.prototype, "checkoutWithNewCard", null), F([I], Z.prototype, "checkoutWithEncryptedNewCard", null), F([I], Z.prototype, "encryptCard", null), F([I], Z.prototype, "mcLogout", null), F([I], Z.prototype, "mcInitClickToPay", null), F([I], Z.prototype, "mcIdLookup", null), F([I], Z.prototype, "mcInitiateValidation", null), F([I], Z.prototype, "mcValidate", null), F([I], Z.prototype, "runClickToPay", null), F([I], Z.prototype, "mcGetCards", null), F([I], Z.prototype, "mcEncryptCard", null), F([I], Z.prototype, "stopUsing", null), F([I], Z.prototype, "updateAvailableCardBrands", null), F([I], Z.prototype, "getLibUrl", null), F([I], Z.prototype, "saveRecognitionToken", null), F([I], Z.prototype, "getRecognitionToken", null), F([I], Z.prototype, "sendErrorNotification", null), F([I], Z.prototype, "generateDpaTransactionOptions", null), F([I], Z.prototype, "generateConsumerInfo", null);
4230
+ I([L], Z.prototype, "setContainer", null), I([L], Z.prototype, "setCustomerInfo", null), I([L], Z.prototype, "setCards", null), I([L], Z.prototype, "isSchemeSupported", null), I([L], Z.prototype, "messageHandler", null), I([L], Z.prototype, "init", null), I([L], Z.prototype, "cleanUp", null), I([L], Z.prototype, "start", null), I([L], Z.prototype, "initCheckoutServiceLib", null), I([L], Z.prototype, "initScripts", null), I([L], Z.prototype, "initCss", null), I([L], Z.prototype, "createOtpInput", null), I([L], Z.prototype, "attachOtpInput", null), I([L], Z.prototype, "createLearnMore", null), I([L], Z.prototype, "createModalForm", null), I([L], Z.prototype, "showModalForm", null), I([L], Z.prototype, "hideModalForm", null), I([L], Z.prototype, "mcHideOtpInput", null), I([L], Z.prototype, "mcShowOtpInput", null), I([L], Z.prototype, "adjustRememberMeOnOtpInput", null), I([L], Z.prototype, "mcHideLearnMore", null), I([L], Z.prototype, "mcShowLearnMore", null), I([L], Z.prototype, "showChangeUserPopup", null), I([L], Z.prototype, "showLoginForm", null), I([L], Z.prototype, "checkoutWithCard", null), I([L], Z.prototype, "checkoutWithNewCard", null), I([L], Z.prototype, "checkoutWithEncryptedNewCard", null), I([L], Z.prototype, "encryptCard", null), I([L], Z.prototype, "mcLogout", null), I([L], Z.prototype, "mcInitClickToPay", null), I([L], Z.prototype, "mcIdLookup", null), I([L], Z.prototype, "mcInitiateValidation", null), I([L], Z.prototype, "mcValidate", null), I([L], Z.prototype, "runClickToPay", null), I([L], Z.prototype, "mcGetCards", null), I([L], Z.prototype, "mcEncryptCard", null), I([L], Z.prototype, "stopUsing", null), I([L], Z.prototype, "updateAvailableCardBrands", null), I([L], Z.prototype, "getLibUrl", null), I([L], Z.prototype, "saveRecognitionToken", null), I([L], Z.prototype, "getRecognitionToken", null), I([L], Z.prototype, "sendErrorNotification", null), I([L], Z.prototype, "generateDpaTransactionOptions", null), I([L], Z.prototype, "generateConsumerInfo", null);
4273
4231
  //#endregion
4274
4232
  //#region src/sdk/types/PaymentMethodInfo.type.ts
4275
4233
  var Mr;
@@ -4354,8 +4312,8 @@ var Nr = {
4354
4312
  n.value.type === g(Mr).PAYTO ? (b(), A("div", zr, [
4355
4313
  o(" Name: " + i(n.value.payTo?.payerName), 1),
4356
4314
  t[3] ||= k("br", null, null, -1),
4357
- n.value.payTo?.payerPayIdDetails ? (b(), A(ye, { key: 0 }, [o(i(n.value.payTo?.payerPayIdDetails?.payIdType) + ": " + i(n.value.payTo?.payerPayIdDetails?.payId), 1)], 64)) : T("", !0),
4358
- n.value.payTo?.payerDirectDebitDetails ? (b(), A(ye, { key: 1 }, [
4315
+ n.value.payTo?.payerPayIdDetails ? (b(), A(E, { key: 0 }, [o(i(n.value.payTo?.payerPayIdDetails?.payIdType) + ": " + i(n.value.payTo?.payerPayIdDetails?.payId), 1)], 64)) : T("", !0),
4316
+ n.value.payTo?.payerDirectDebitDetails ? (b(), A(E, { key: 1 }, [
4359
4317
  o(" BSB: " + i(n.value.payTo?.payerDirectDebitDetails?.bsb), 1),
4360
4318
  t[2] ||= k("br", null, null, -1),
4361
4319
  o(" Acc No: " + i(n.value.payTo?.payerDirectDebitDetails?.accountNumber), 1)
@@ -4425,7 +4383,7 @@ var Nr = {
4425
4383
  window.removeEventListener("message", m);
4426
4384
  }), (e, t) => l.value.length > 0 ? (b(), A("div", Vr, [
4427
4385
  d.value.global ? (b(), A("div", Hr, i(d.value.global), 1)) : T("", !0),
4428
- (b(!0), A(ye, null, we(f.value, (e, t) => (b(), A("div", {
4386
+ (b(!0), A(E, null, we(f.value, (e, t) => (b(), A("div", {
4429
4387
  key: `paymentMethod${t}`,
4430
4388
  class: ne(["payment-method-container", `${o.value?.paymentMethodId === e?.paymentMethodId ? "selected" : ""} ${d.value[`${e?.paymentMethodId}`] ? "error" : ""}`]),
4431
4389
  onClick: (t) => h(e)
@@ -4483,8 +4441,8 @@ var Nr = {
4483
4441
  userSuccessMessage = re;
4484
4442
  constructor(e, t) {
4485
4443
  this.log = e, this.debug = t.debug, this.environment = t.environment, this.apiUrl = t.apiUrl, this.publicKey = t.publicKey, this.version = t.version, this.failureCallback = t.onFailure || null, this.successCallback = t.onSuccess || null;
4486
- let n = new j(t.environment, M(t.publicKey));
4487
- this.httpInvoker = new N(t.publicKey, t.version, n);
4444
+ let n = new M(t.environment, N(t.publicKey));
4445
+ this.httpInvoker = new P(t.publicKey, t.version, n);
4488
4446
  }
4489
4447
  setAmount(e) {
4490
4448
  this.amount = e;
@@ -4582,7 +4540,7 @@ var Nr = {
4582
4540
  };
4583
4541
  }
4584
4542
  };
4585
- F([I], Yr.prototype, "setPaymentInfo", null), F([I], Yr.prototype, "cleanUp", null);
4543
+ I([L], Yr.prototype, "setPaymentInfo", null), I([L], Yr.prototype, "cleanUp", null);
4586
4544
  //#endregion
4587
4545
  //#region src/sdk/processors/paymentMethodProcessor.ts
4588
4546
  var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
@@ -4615,11 +4573,11 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4615
4573
  currency: i,
4616
4574
  customerId: n,
4617
4575
  options: a
4618
- }), this.container = t, this.networkTokenProviders = a?.networkTokenProviders || [], this.networkTokenProviders = a?.networkTokenProviders || [], !e(r)) throw P(t, "Invalid amount: " + r), TypeError("invalid amount: " + r);
4576
+ }), this.container = t, this.networkTokenProviders = a?.networkTokenProviders || [], this.networkTokenProviders = a?.networkTokenProviders || [], !e(r)) throw F(t, "Invalid amount: " + r), TypeError("invalid amount: " + r);
4619
4577
  this.getCustomerData(n, (e) => {
4620
4578
  this.log("[addPaymentMethods], customerInfo", e), this.getPaymentMethodsInfo(n, (n) => {
4621
4579
  this.log("[addPaymentMethods], paymentMethods", n);
4622
- let o = E({
4580
+ let o = ge({
4623
4581
  el: this.container,
4624
4582
  component: Jr,
4625
4583
  props: {
@@ -4663,7 +4621,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4663
4621
  networkToken: t.networkToken
4664
4622
  }))
4665
4623
  },
4666
- on: { submit: L(this, "[PaymentMethods]: submit", (e) => {
4624
+ on: { submit: R(this, "[PaymentMethods]: submit", (e) => {
4667
4625
  this.log("[PaymentMethods]: submit", e), e?.paymentMethodId && (Zr(), setTimeout(() => {
4668
4626
  this.onSubmit(t, r, i, a, e);
4669
4627
  }, 500));
@@ -4684,7 +4642,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4684
4642
  currency: r,
4685
4643
  authenticationData: i
4686
4644
  });
4687
- let a = L(this, "[PaymentMethodProcessor][tokenise], success", (t, n) => {
4645
+ let a = R(this, "[PaymentMethodProcessor][tokenise], success", (t, n) => {
4688
4646
  this.log("[PaymentMethodProcessor][tokenise], success", t, n), Xr();
4689
4647
  let r = JSON.parse(n), i = { token: r.tokenId };
4690
4648
  r.card && (i.cardDetails = {
@@ -4701,7 +4659,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4701
4659
  countryCode: r.card.iinData.countryCode || "",
4702
4660
  cardType: r.card.iinData.cardType || ""
4703
4661
  }), this.successCallback?.(i), Qe(e, this.getSuccessMessage());
4704
- }), o = L(this, "[PaymentMethodProcessor][tokenise], failure", (e, n) => {
4662
+ }), o = R(this, "[PaymentMethodProcessor][tokenise], failure", (e, n) => {
4705
4663
  this.log("[PaymentMethodProcessor][tokenise], failure", e, n), Xr();
4706
4664
  let r = JSON.parse(n);
4707
4665
  this.failureCallback?.({ error: r.message }), this.sendError(t, r.message);
@@ -4723,17 +4681,17 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4723
4681
  this.httpInvoker?.invoke($r(this.apiUrl)[Qr.TOKENISE].url, $r(this.apiUrl)[Qr.TOKENISE].method, JSON.stringify(s), a, o);
4724
4682
  }
4725
4683
  getCustomerData(e, t, n) {
4726
- let r = L(this, "[getCustomerData], success", (e, n) => {
4684
+ let r = R(this, "[getCustomerData], success", (e, n) => {
4727
4685
  this.log("[getCustomerData], success", e, n), t(JSON.parse(n));
4728
- }), i = L(this, "[getCustomerData], failure", (e, t) => {
4686
+ }), i = R(this, "[getCustomerData], failure", (e, t) => {
4729
4687
  this.log("[getCustomerData], failure", e, t), n(JSON.parse(t));
4730
4688
  });
4731
4689
  this.httpInvoker?.invoke($r(this.apiUrl, e)[Qr.CUSTOMER_INFO].url, $r(this.apiUrl, e)[Qr.CUSTOMER_INFO].method, {}, r, i);
4732
4690
  }
4733
4691
  getPaymentMethodsInfo(e, t, n) {
4734
- let r = L(this, "[getPaymentMethodsInfo], success", (e, n) => {
4692
+ let r = R(this, "[getPaymentMethodsInfo], success", (e, n) => {
4735
4693
  this.log("[getPaymentMethodsInfo], success", e, n), t(JSON.parse(n));
4736
- }), i = L(this, "[getPaymentMethodsInfo], failure", (e, t) => {
4694
+ }), i = R(this, "[getPaymentMethodsInfo], failure", (e, t) => {
4737
4695
  this.log("[getPaymentMethodsInfo], failure", e, t), n(JSON.parse(t));
4738
4696
  });
4739
4697
  this.httpInvoker?.invoke($r(this.apiUrl, e)[Qr.PAYMENT_METHODS_INFO].url, $r(this.apiUrl, e)[Qr.PAYMENT_METHODS_INFO].method, {}, r, i);
@@ -4752,9 +4710,9 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4752
4710
  this.tokenise(e, i.paymentMethodId, t, n);
4753
4711
  return;
4754
4712
  }
4755
- o.invoke(this.amount, this.currency, L(this, "[sdk][paymentMethodProcessor], token authentication success", (r) => {
4713
+ o.invoke(this.amount, this.currency, R(this, "[sdk][paymentMethodProcessor], token authentication success", (r) => {
4756
4714
  this.log("[sdk][paymentMethodProcessor], token authentication success"), this.tokenise(e, i.paymentMethodId, t, n, r.assuranceData?.verificationData?.[0]);
4757
- }), L(this, "[sdk][paymentMethodProcessor], token authentication error", (e) => {
4715
+ }), R(this, "[sdk][paymentMethodProcessor], token authentication error", (e) => {
4758
4716
  Xr(), this.log("[sdk][paymentMethodProcessor], token authentication error", e), this.failureCallback?.({ error: "Token Authentication Error" });
4759
4717
  }));
4760
4718
  }
@@ -4775,7 +4733,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4775
4733
  });
4776
4734
  let o = (i?.scheme || "").toLowerCase(), s = this.networkTokenProviders.find((e) => e.providerType.toLowerCase() === o);
4777
4735
  switch (String(s?.providerType).toLowerCase()) {
4778
- case "mastercard": return new G(this.log.bind(this), {
4736
+ case "mastercard": return new K(this.log.bind(this), {
4779
4737
  container: this.container,
4780
4738
  token: e,
4781
4739
  networkToken: t,
@@ -4794,7 +4752,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4794
4752
  e?.data?.status && e.data.status === "card-form-validation-status-change" && (this.log(`[sdk][paymentMethodProcessor]: message "${e.data.status}" received`, e.data), Xr(), this.validationStatusChangeCallback?.(e.data.message?.status, e.data.message?.message));
4795
4753
  }
4796
4754
  };
4797
- F([I], ei.prototype, "addPaymentMethods", null), F([I], ei.prototype, "tokenise", null), F([I], ei.prototype, "getCustomerData", null), F([I], ei.prototype, "getPaymentMethodsInfo", null), F([I], ei.prototype, "onSubmit", null), F([I], ei.prototype, "sendError", null), F([I], ei.prototype, "initTokenAuthenticationProcessor", null), F([I], ei.prototype, "messageHandler", null);
4755
+ I([L], ei.prototype, "addPaymentMethods", null), I([L], ei.prototype, "tokenise", null), I([L], ei.prototype, "getCustomerData", null), I([L], ei.prototype, "getPaymentMethodsInfo", null), I([L], ei.prototype, "onSubmit", null), I([L], ei.prototype, "sendError", null), I([L], ei.prototype, "initTokenAuthenticationProcessor", null), I([L], ei.prototype, "messageHandler", null);
4798
4756
  //#endregion
4799
4757
  //#region src/sdk/types/PaymentType.type.ts
4800
4758
  var Q;
@@ -4805,29 +4763,29 @@ var Q;
4805
4763
  //#region src/sdk/utils/paymentType.ts
4806
4764
  function ti(e) {
4807
4765
  switch (e) {
4808
- case J.SHIFT: return Q.shift;
4809
- case J.PESAPAL: return Q.pesapal;
4810
- case J.PAYBYACCOUNT: return Q.paybyaccount;
4811
- case J.PAYGLOCAL:
4812
- case J.ZIP: return Q.zip;
4766
+ case Y.SHIFT: return Q.shift;
4767
+ case Y.PESAPAL: return Q.pesapal;
4768
+ case Y.PAYBYACCOUNT: return Q.paybyaccount;
4769
+ case Y.PAYGLOCAL:
4770
+ case Y.ZIP: return Q.zip;
4813
4771
  }
4814
4772
  }
4815
4773
  //#endregion
4816
4774
  //#region src/sdk/utils/moduleLoader.ts
4817
4775
  var ni = {
4818
- cxpay: () => import("./cxpay-BpEM9LbT.js"),
4819
- default: () => import("./default-CE5nSCNU.js"),
4820
- ecentric: () => import("./ecentric-C-L8fXG9.js"),
4821
- epna: () => import("./epna-CJhaNici.js"),
4822
- flashbanc: () => import("./flashbanc-3uXb_QxD.js"),
4823
- forter: () => import("./forter-CMRlI8RN.js"),
4824
- gpayments: () => import("./gpayments-D6zvi_nT.js"),
4825
- metrics_global: () => import("./metrics_global-Bkoz0wJ4.js"),
4826
- nmi: () => import("./nmi-D4gXIH6V.js"),
4827
- nuvei: () => import("./nuvei-ZtJQN-Yz.js"),
4828
- payabli: () => import("./payabli-DlSJfDyv.js"),
4829
- payglocal: () => import("./payglocal-BC6XGiGa.js"),
4830
- skybank: () => import("./skybank-D-w9VqY5.js")
4776
+ cxpay: () => import("./cxpay-BEMrWL1q.js"),
4777
+ default: () => import("./default-BQDjOwfs.js"),
4778
+ ecentric: () => import("./ecentric-C5_oNEas.js"),
4779
+ epna: () => import("./epna-DX-S7yA6.js"),
4780
+ flashbanc: () => import("./flashbanc-xqp3XO6M.js"),
4781
+ forter: () => import("./forter-5rzXRwAX.js"),
4782
+ gpayments: () => import("./gpayments-DOv0-hRx.js"),
4783
+ metrics_global: () => import("./metrics_global-C--PnyF9.js"),
4784
+ nmi: () => import("./nmi-Y-RgOB0Y.js"),
4785
+ nuvei: () => import("./nuvei-BOMMfI_5.js"),
4786
+ payabli: () => import("./payabli-OU7W7cbE.js"),
4787
+ payglocal: () => import("./payglocal-BxWTWcIu.js"),
4788
+ skybank: () => import("./skybank-BxtSlq18.js")
4831
4789
  }, ri = { forter: () => import("./forter-B5mAsqh7.js") };
4832
4790
  async function ii(e) {
4833
4791
  let t = ni[e.toLowerCase()];
@@ -4888,9 +4846,9 @@ var { hideSpinner: oi } = Oe(), si = {
4888
4846
  paymentOptions = {};
4889
4847
  initProcessorsHandlers = [];
4890
4848
  init(e, t, n) {
4891
- if (this.environment = String(e).toLowerCase(), $e.init(this.environment, t, Y.version), window._payfurl) return window._payfurl;
4849
+ if (this.environment = String(e).toLowerCase(), $e.init(this.environment, t, j.version), window._payfurl) return window._payfurl;
4892
4850
  if (this.debug = n, this.publicKey = t, this.config = qe(this.environment), !this.config) throw this.showErrorMessage(null, "Error: Unable to configure SDK due to an incorrect environment setting."), this.userOnFailure?.({ error: "Unable to configure SDK" }), TypeError("Error: Unable to configure SDK due to an incorrect environment setting.");
4893
- return this.regionResolver = new j(e, M(t)), this.httpInvoker = new N(t, Y.version, this.regionResolver), this.loadCss(), window._payfurl = this, window.addEventListener("message", this.messageHandler.bind(this)), this;
4851
+ return this.regionResolver = new M(e, N(t)), this.httpInvoker = new P(t, j.version, this.regionResolver), this.loadCss(), window._payfurl = this, window.addEventListener("message", this.messageHandler.bind(this)), this;
4894
4852
  }
4895
4853
  execute() {
4896
4854
  window.postMessage({ status: oe }, "*");
@@ -4900,20 +4858,20 @@ var { hideSpinner: oi } = Oe(), si = {
4900
4858
  }
4901
4859
  initCardProcessor(e) {
4902
4860
  if (this.log("[initCardProcessor]", { container: e }), this.cardProcessor) return this.cardProcessor;
4903
- let t = new q(this.log.bind(this), {
4861
+ let t = new J(this.log.bind(this), {
4904
4862
  debug: this.debug,
4905
4863
  environment: this.environment,
4906
4864
  publicKey: this.publicKey,
4907
4865
  url: this.config.url,
4908
4866
  secureUrl: this.config.secureUrl,
4909
4867
  apiUrl: this.config.apiUrl,
4910
- version: Y.version,
4911
- onSuccess: L(this, "[cardProcessor], success", (t) => {
4868
+ version: j.version,
4869
+ onSuccess: R(this, "[cardProcessor], success", (t) => {
4912
4870
  this.log("[cardProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
4913
4871
  this.userOnSuccess || this.getForm(e)?.submit();
4914
4872
  }, 500)), this.userOnSuccess?.(t);
4915
4873
  }),
4916
- onFailure: L(this, "[cardProcessor], failure", (e) => {
4874
+ onFailure: R(this, "[cardProcessor], failure", (e) => {
4917
4875
  this.log("[cardProcessor], failure", e);
4918
4876
  let t = An(e.body);
4919
4877
  e.body && !t && this.log("[cardProcessor], failure", "no structured error detail in body"), this.userOnFailure?.({
@@ -4921,7 +4879,7 @@ var { hideSpinner: oi } = Oe(), si = {
4921
4879
  ...t && { errorDetails: t }
4922
4880
  });
4923
4881
  }),
4924
- onValidationStatusChangeCallback: L(this, "[cardProcessor], ValidationStatusChange", (e, t) => {
4882
+ onValidationStatusChangeCallback: R(this, "[cardProcessor], ValidationStatusChange", (e, t) => {
4925
4883
  this.log("[cardProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
4926
4884
  })
4927
4885
  });
@@ -4941,13 +4899,13 @@ var { hideSpinner: oi } = Oe(), si = {
4941
4899
  environment: this.environment,
4942
4900
  publicKey: this.publicKey,
4943
4901
  apiUrl: this.config.apiUrl,
4944
- version: Y.version,
4945
- onSuccess: L(this, "[paypalProcessor], success", (t) => {
4902
+ version: j.version,
4903
+ onSuccess: R(this, "[paypalProcessor], success", (t) => {
4946
4904
  this.log("[paypalProcessor], success", t, this.userOnSuccess), !this.userOnSuccess && t.transactionId && (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
4947
4905
  this.getForm(e)?.submit();
4948
4906
  }, 500)), this.userOnSuccess?.({ transactionId: t.transactionId });
4949
4907
  }),
4950
- onFailure: L(this, "[paypalProcessor], failure", (e) => {
4908
+ onFailure: R(this, "[paypalProcessor], failure", (e) => {
4951
4909
  this.log("[paypalProcessor], failure", e), this.userOnFailure?.({ error: e.error });
4952
4910
  })
4953
4911
  });
@@ -4961,15 +4919,15 @@ var { hideSpinner: oi } = Oe(), si = {
4961
4919
  publicKey: this.publicKey,
4962
4920
  apiUrl: this.config.apiUrl,
4963
4921
  redirectUrl: this.config.redirectUrl,
4964
- version: Y.version,
4965
- onSuccess: L(this, "[checkoutProcessor], success", (t) => {
4922
+ version: j.version,
4923
+ onSuccess: R(this, "[checkoutProcessor], success", (t) => {
4966
4924
  this.log("[checkoutProcessor], success", t), this.userOnSuccess || (t.transactionId && this._setToken(e, t.transactionId, "transactionId"), t.token && this._setToken(e, t.token, "token"), setTimeout(() => {
4967
4925
  this.getForm(e)?.submit();
4968
4926
  }, 500));
4969
4927
  let n = {};
4970
4928
  t.transactionId && (n.transactionId = t.transactionId), t.token && (n.token = t.token), this.userOnSuccess?.(n);
4971
4929
  }),
4972
- onFailure: L(this, "[checkoutProcessor], failure", (e) => {
4930
+ onFailure: R(this, "[checkoutProcessor], failure", (e) => {
4973
4931
  this.log("[checkoutProcessor], failure", e), this.userOnFailure?.({ error: e.error });
4974
4932
  })
4975
4933
  });
@@ -4982,13 +4940,13 @@ var { hideSpinner: oi } = Oe(), si = {
4982
4940
  environment: this.environment,
4983
4941
  publicKey: this.publicKey,
4984
4942
  apiUrl: this.config.apiUrl,
4985
- version: Y.version,
4986
- onSuccess: L(this, "[googlePayProcessor], success", (t) => {
4943
+ version: j.version,
4944
+ onSuccess: R(this, "[googlePayProcessor], success", (t) => {
4987
4945
  this.log("[googlePayProcessor], success", t), !this.userOnSuccess && t.transactionId && (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
4988
4946
  this.getForm(e)?.submit();
4989
4947
  }, 500)), this.userOnSuccess?.({ transactionId: t.transactionId });
4990
4948
  }),
4991
- onFailure: L(this, "[googlePayProcessor], failure", (e) => {
4949
+ onFailure: R(this, "[googlePayProcessor], failure", (e) => {
4992
4950
  this.log("[googlePayProcessor], failure", e), this.userOnFailure?.({ error: e.error });
4993
4951
  })
4994
4952
  });
@@ -5001,8 +4959,8 @@ var { hideSpinner: oi } = Oe(), si = {
5001
4959
  environment: this.environment,
5002
4960
  publicKey: this.publicKey,
5003
4961
  apiUrl: this.config.apiUrl,
5004
- version: Y.version,
5005
- onSuccess: L(this, "[applePayProcessor], success", (t) => {
4962
+ version: j.version,
4963
+ onSuccess: R(this, "[applePayProcessor], success", (t) => {
5006
4964
  this.log("[applePayProcessor], success", t), !this.userOnSuccess && t.transactionId ? (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
5007
4965
  this.getForm(e)?.submit();
5008
4966
  }, 500)) : !this.userOnSuccess && t.token ? (this._setToken(e, t.token), setTimeout(() => {
@@ -5012,7 +4970,7 @@ var { hideSpinner: oi } = Oe(), si = {
5012
4970
  token: t.token
5013
4971
  });
5014
4972
  }),
5015
- onFailure: L(this, "[applePayProcessor], failure", (e) => {
4973
+ onFailure: R(this, "[applePayProcessor], failure", (e) => {
5016
4974
  this.log("[applePayProcessor], failure", e), this.userOnFailure?.({ error: e.error });
5017
4975
  })
5018
4976
  });
@@ -5024,14 +4982,14 @@ var { hideSpinner: oi } = Oe(), si = {
5024
4982
  environment: this.environment,
5025
4983
  publicKey: this.publicKey,
5026
4984
  apiUrl: this.config.apiUrl,
5027
- version: Y.version,
4985
+ version: j.version,
5028
4986
  getPaymentOptions: this.getPaymentOptions.bind(this),
5029
- onSuccess: L(this, "[payToProcessor], success", (t) => {
4987
+ onSuccess: R(this, "[payToProcessor], success", (t) => {
5030
4988
  this.log("[payToProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
5031
4989
  this.userOnSuccess || this.getForm(e)?.submit();
5032
4990
  }, 500)), this.userOnSuccess?.({ token: t.token });
5033
4991
  }),
5034
- onFailure: L(this, "[payToProcessor], failure", (e) => {
4992
+ onFailure: R(this, "[payToProcessor], failure", (e) => {
5035
4993
  this.log("[payToProcessor], failure", e), this.userOnFailure?.({ error: e.error });
5036
4994
  })
5037
4995
  }), this.payToProcessor.setOnValidate(this.userOnValidate)), this.payToProcessor;
@@ -5043,16 +5001,16 @@ var { hideSpinner: oi } = Oe(), si = {
5043
5001
  publicKey: this.publicKey,
5044
5002
  apiUrl: this.config.apiUrl,
5045
5003
  cssUrl: this.config.cssUrl,
5046
- version: Y.version,
5047
- onSuccess: L(this, "[paymentMethodProcessor], success", (t) => {
5004
+ version: j.version,
5005
+ onSuccess: R(this, "[paymentMethodProcessor], success", (t) => {
5048
5006
  this.log("[paymentMethodProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
5049
5007
  this.userOnSuccess || this.getForm(e)?.submit();
5050
5008
  }, 500)), this.userOnSuccess?.(t);
5051
5009
  }),
5052
- onFailure: L(this, "[paymentMethodProcessor], failure", (e) => {
5010
+ onFailure: R(this, "[paymentMethodProcessor], failure", (e) => {
5053
5011
  this.log("[paymentMethodProcessor], failure", e), this.userOnFailure?.({ error: e.error });
5054
5012
  }),
5055
- onValidationStatusChangeCallback: L(this, "[paymentMethodProcessor], ValidationStatusChange", (e, t) => {
5013
+ onValidationStatusChangeCallback: R(this, "[paymentMethodProcessor], ValidationStatusChange", (e, t) => {
5056
5014
  this.log("[paymentMethodProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
5057
5015
  })
5058
5016
  }), this.initBaseProcessor(this.paymentMethodProcessor)), this.paymentMethodProcessor;
@@ -5098,7 +5056,7 @@ var { hideSpinner: oi } = Oe(), si = {
5098
5056
  t && !t.id && (t.id = "payfurl-form-" + Math.random().toString(36).slice(2, 9));
5099
5057
  let n = t?.id || e?.id || "container";
5100
5058
  if (this._submitFormHandlers[n]) return this._submitFormHandlers[n];
5101
- let r = L(this, "[getSubmitFormHandler][handler]", (t) => {
5059
+ let r = R(this, "[getSubmitFormHandler][handler]", (t) => {
5102
5060
  this.log("[sdk], submitForm", t), t.preventDefault();
5103
5061
  let n = this.getForm(e);
5104
5062
  (!n?.onsubmit || n.onsubmit(new SubmitEvent("submit"))) && (n && this.getInput(e, "token")?.value ? n.submit() : window.postMessage({ status: oe }, "*"));
@@ -5125,7 +5083,7 @@ var { hideSpinner: oi } = Oe(), si = {
5125
5083
  r?.currency && (r.currency = r?.currency.toUpperCase());
5126
5084
  let o = r?.currency || "";
5127
5085
  if (a && !e(a)) throw this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5128
- return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, n, "", r || {}, L(this, "[addCard][initProcessors], callback", (t, s) => {
5086
+ return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, n, "", r || {}, R(this, "[addCard][initProcessors], callback", (t, s) => {
5129
5087
  let c = this.resolveThreeDsProvider(t, s), l = s.allThreeDsProviders?.[0], u = s.fraudProviders?.[0], d = {
5130
5088
  ...r,
5131
5089
  requiredFields: t.requiredFields,
@@ -5143,7 +5101,7 @@ var { hideSpinner: oi } = Oe(), si = {
5143
5101
  networkTokenOptions: r?.networkTokenOptions,
5144
5102
  vault: O(r?.vault),
5145
5103
  verifyCard: O(r?.verifyCard),
5146
- metadata: U(r?.metadata),
5104
+ metadata: W(r?.metadata),
5147
5105
  secureCardOrchestration: {
5148
5106
  enabled: !0,
5149
5107
  secureUrl: this.config.secureUrl,
@@ -5151,10 +5109,10 @@ var { hideSpinner: oi } = Oe(), si = {
5151
5109
  debug: this.debug,
5152
5110
  publicKey: this.publicKey,
5153
5111
  apiUrl: this.config.apiUrl,
5154
- version: Y.version,
5112
+ version: j.version,
5155
5113
  amount: a,
5156
5114
  currency: o,
5157
- metadata: U(r?.metadata),
5115
+ metadata: W(r?.metadata),
5158
5116
  billingAddress: this.billingAddress,
5159
5117
  customer: this.customer,
5160
5118
  order: this.order,
@@ -5190,7 +5148,7 @@ var { hideSpinner: oi } = Oe(), si = {
5190
5148
  this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
5191
5149
  return;
5192
5150
  }
5193
- if (!R(o)) {
5151
+ if (!z(o)) {
5194
5152
  this.showErrorMessage(i, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" });
5195
5153
  return;
5196
5154
  }
@@ -5206,7 +5164,7 @@ var { hideSpinner: oi } = Oe(), si = {
5206
5164
  });
5207
5165
  let a = t && document.getElementById(t) || null;
5208
5166
  if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5209
- return r &&= r.toUpperCase(), this._cleanUp(a), this._initForm(a), this.setAmount(n), this.setCurrency(r), this.initProcessors(a, n, r, "", "", i || {}, L(this, "[addCardLeastCost][initProcessors], callback", (t, o) => {
5167
+ return r &&= r.toUpperCase(), this._cleanUp(a), this._initForm(a), this.setAmount(n), this.setCurrency(r), this.initProcessors(a, n, r, "", "", i || {}, R(this, "[addCardLeastCost][initProcessors], callback", (t, o) => {
5210
5168
  let s = this.resolveThreeDsProvider(t, o), c = o.allThreeDsProviders?.[0], l = o.fraudProviders?.[0], u = {
5211
5169
  ...i,
5212
5170
  requiredFields: t.requiredFields,
@@ -5224,7 +5182,7 @@ var { hideSpinner: oi } = Oe(), si = {
5224
5182
  networkTokenOptions: i?.networkTokenOptions,
5225
5183
  vault: O(i?.vault),
5226
5184
  verifyCard: O(i?.verifyCard),
5227
- metadata: U(i?.metadata),
5185
+ metadata: W(i?.metadata),
5228
5186
  secureCardOrchestration: {
5229
5187
  enabled: !0,
5230
5188
  secureUrl: this.config.secureUrl,
@@ -5232,10 +5190,10 @@ var { hideSpinner: oi } = Oe(), si = {
5232
5190
  debug: this.debug,
5233
5191
  publicKey: this.publicKey,
5234
5192
  apiUrl: this.config.apiUrl,
5235
- version: Y.version,
5193
+ version: j.version,
5236
5194
  amount: n,
5237
5195
  currency: r,
5238
- metadata: U(i?.metadata),
5196
+ metadata: W(i?.metadata),
5239
5197
  billingAddress: this.billingAddress,
5240
5198
  customer: this.customer,
5241
5199
  order: this.order,
@@ -5271,7 +5229,7 @@ var { hideSpinner: oi } = Oe(), si = {
5271
5229
  this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
5272
5230
  return;
5273
5231
  }
5274
- if (!R(r)) {
5232
+ if (!z(r)) {
5275
5233
  this.showErrorMessage(a, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" });
5276
5234
  return;
5277
5235
  }
@@ -5295,7 +5253,7 @@ var { hideSpinner: oi } = Oe(), si = {
5295
5253
  createNetworkToken: r?.createNetworkToken,
5296
5254
  tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled || r?.clickToPayOptions?.tokenAuthenticationEnabled,
5297
5255
  networkTokenOptions: r?.networkTokenOptions || r?.clickToPayOptions?.networkTokenOptions
5298
- }, L(this, "[addDropIn][initProcessors], callback", async (a, c) => {
5256
+ }, R(this, "[addDropIn][initProcessors], callback", async (a, c) => {
5299
5257
  r?.paypalProviderId && c.hasPaypalProviders && c.paypalProviders.includes(r?.paypalProviderId) && (c.hasPaypalProviders = !0, c.paypalProviders.unshift(r?.paypalProviderId)), r?.payToProviderId && c.hasPayToProviders && c.payToProviders.includes(r?.payToProviderId) && (c.hasPayToProviders = !0, c.payToProviders.unshift(r?.payToProviderId));
5300
5258
  let l = [
5301
5259
  c.hasCardProviders,
@@ -5323,7 +5281,7 @@ var { hideSpinner: oi } = Oe(), si = {
5323
5281
  networkTokenOptions: r?.networkTokenOptions,
5324
5282
  vault: O(r?.vault),
5325
5283
  verifyCard: O(r?.verifyCard),
5326
- metadata: U(r?.metadata),
5284
+ metadata: W(r?.metadata),
5327
5285
  secureCardOrchestration: {
5328
5286
  enabled: !0,
5329
5287
  secureUrl: this.config.secureUrl,
@@ -5331,10 +5289,10 @@ var { hideSpinner: oi } = Oe(), si = {
5331
5289
  debug: this.debug,
5332
5290
  publicKey: this.publicKey,
5333
5291
  apiUrl: this.config.apiUrl,
5334
- version: Y.version,
5292
+ version: j.version,
5335
5293
  amount: t,
5336
5294
  currency: n,
5337
- metadata: U(r?.metadata),
5295
+ metadata: W(r?.metadata),
5338
5296
  billingAddress: this.billingAddress,
5339
5297
  customer: this.customer,
5340
5298
  order: this.order,
@@ -5369,11 +5327,11 @@ var { hideSpinner: oi } = Oe(), si = {
5369
5327
  paypalButtonStyle: null,
5370
5328
  paypalEnablePayIn4: !1,
5371
5329
  transfer: null,
5372
- metadata: U(r?.metadata)
5330
+ metadata: W(r?.metadata)
5373
5331
  }, p = {
5374
5332
  description: String(r?.payToDescription).trim() || String(c.payToProvidersWithOptions[0]?.description) || "",
5375
5333
  maximumAmount: r?.payToMaximumAmount || Number(c.payToProvidersWithOptions[0]?.maximumAmount) || 0,
5376
- metadata: U(r?.metadata)
5334
+ metadata: W(r?.metadata)
5377
5335
  }, m = {
5378
5336
  taxAmount: this.order?.taxAmount,
5379
5337
  shippingAmount: this.order?.shippingAmount,
@@ -5381,14 +5339,15 @@ var { hideSpinner: oi } = Oe(), si = {
5381
5339
  orderItems: this.order?.orderItems,
5382
5340
  customer: this.customer || void 0,
5383
5341
  billingAddress: this.billingAddress || void 0,
5384
- metadata: U(r?.metadata)
5342
+ metadata: W(r?.metadata)
5385
5343
  }, h = c.hasGooglePayProviders ? c.googlePayProviders.find((e) => e.providerId === r?.googlePayOptions?.providerId) || c.googlePayProviders[0] : null, g = {
5386
5344
  gateway: r?.googlePayOptions?.gateway || h?.gateway || "",
5387
5345
  googlePayGatewayMerchantId: r?.googlePayOptions?.googlePayGatewayMerchantId || h?.googlePayGatewayMerchantId || "",
5388
5346
  googlePayMerchantId: r?.googlePayOptions?.googlePayMerchantId || h?.googlePayMerchantId || "",
5389
5347
  googlePayMerchantName: r?.googlePayOptions?.googlePayMerchantName || h?.googlePayMerchantName || "",
5390
5348
  buttonOptions: r?.googlePayOptions?.buttonOptions,
5391
- metadata: U(r?.metadata)
5349
+ billingDetailsRequired: r?.googlePayOptions?.billingDetailsRequired,
5350
+ metadata: W(r?.metadata)
5392
5351
  }, _ = c.hasApplePayProviders ? c.applePayProviders.find((e) => e.providerId === r?.applePayOptions?.providerId) || c.applePayProviders[0] : null, v = {
5393
5352
  lineItemLabel: r?.applePayOptions?.lineItemLabel || _?.lineItemLabel || "",
5394
5353
  displayName: r?.applePayOptions?.displayName || _?.displayName || "",
@@ -5402,7 +5361,7 @@ var { hideSpinner: oi } = Oe(), si = {
5402
5361
  supportedCountries: r?.applePayOptions?.supportedCountries || _?.supportedCountries,
5403
5362
  applePayVersion: r?.applePayOptions?.applePayVersion || _?.applePayVersion,
5404
5363
  clientParameters: a.clientParameters,
5405
- metadata: U(r?.metadata)
5364
+ metadata: W(r?.metadata)
5406
5365
  };
5407
5366
  if (!l && c.hasCardProviders) {
5408
5367
  if (o(Q.card)) {
@@ -5540,7 +5499,7 @@ var { hideSpinner: oi } = Oe(), si = {
5540
5499
  }, "*");
5541
5500
  }
5542
5501
  });
5543
- let l = E({
5502
+ let l = ge({
5544
5503
  el: document.getElementById(e),
5545
5504
  component: vt,
5546
5505
  props: { elements: s }
@@ -5559,8 +5518,8 @@ var { hideSpinner: oi } = Oe(), si = {
5559
5518
  let o = t && document.getElementById(t) || null;
5560
5519
  if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5561
5520
  if (!e(n)) throw this.showErrorMessage(o, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5562
- if (!R(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5563
- return r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r), this.initProcessors(o, n, r, i || "", "", {}, L(this, "[addPaypal][initProcessors], callback", (e, t) => {
5521
+ if (!z(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5522
+ return r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r), this.initProcessors(o, n, r, i || "", "", {}, R(this, "[addPaypal][initProcessors], callback", (e, t) => {
5564
5523
  let s = t.paypalProviders[0] || i || "";
5565
5524
  s ? this.initPaypalProcessor(o).addPaypal(o, this.getForm(o), n, r, s, a) : (this.showErrorMessage(o, "Missing parameter: Provider Id"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }));
5566
5525
  })), this;
@@ -5575,20 +5534,20 @@ var { hideSpinner: oi } = Oe(), si = {
5575
5534
  if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5576
5535
  if (!e(n)) throw this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5577
5536
  this._cleanUp(a), this._initForm(a), this.setAmount(n), this.setCurrency("AUD");
5578
- let o = L(this, "[localAddPayTo]", (e, t) => {
5537
+ let o = R(this, "[localAddPayTo]", (e, t) => {
5579
5538
  this.log("[addPayTo, local]", {
5580
5539
  amount: n,
5581
5540
  localProviderId: e,
5582
5541
  localOptions: t
5583
5542
  }), this.initPayToProcessor(a).addPayTo(a, n, e, t);
5584
5543
  });
5585
- return r && i?.maximumAmount && i?.description ? (o(r, i), this) : (this.initProcessors(a, n, "AUD", r || "", "", {}, L(this, "[addPayTo][initProcessors], callback", (e, t) => {
5544
+ return r && i?.maximumAmount && i?.description ? (o(r, i), this) : (this.initProcessors(a, n, "AUD", r || "", "", {}, R(this, "[addPayTo][initProcessors], callback", (e, t) => {
5586
5545
  if (!t.hasPayToProviders) return;
5587
5546
  let n = t.payToProvidersWithOptions[0];
5588
5547
  o(n.providerId, {
5589
5548
  maximumAmount: n.maximumAmount,
5590
5549
  description: n.description,
5591
- metadata: U(i?.metadata)
5550
+ metadata: W(i?.metadata)
5592
5551
  });
5593
5552
  })), this);
5594
5553
  }
@@ -5602,9 +5561,9 @@ var { hideSpinner: oi } = Oe(), si = {
5602
5561
  let o = t && document.getElementById(t) || null;
5603
5562
  if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5604
5563
  if (!e(n)) throw this.showErrorMessage(o, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5605
- if (!R(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5564
+ if (!z(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5606
5565
  r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r);
5607
- let s = L(this, "[localAddGooglePay]", (e, t) => {
5566
+ let s = R(this, "[localAddGooglePay]", (e, t) => {
5608
5567
  this.log("[addGooglePay, local]", {
5609
5568
  amount: n,
5610
5569
  currency: r,
@@ -5612,7 +5571,7 @@ var { hideSpinner: oi } = Oe(), si = {
5612
5571
  localOptions: t
5613
5572
  }), this.initGooglePayProcessor(o).addGooglePay(o, e, n, r, t);
5614
5573
  });
5615
- return i && a?.gateway && a?.googlePayGatewayMerchantId ? (s(i, a), this) : (this.initProcessors(o, n, r, i || "", "", {}, L(this, "[addGooglePay][initProcessors], callback", (e, t) => {
5574
+ return i && a?.gateway && a?.googlePayGatewayMerchantId ? (s(i, a), this) : (this.initProcessors(o, n, r, i || "", "", {}, R(this, "[addGooglePay][initProcessors], callback", (e, t) => {
5616
5575
  if (!t.hasGooglePayProviders) return;
5617
5576
  let n = i && t.googlePayProviders.find((e) => e.providerId === i) || t.googlePayProviders[0];
5618
5577
  s(n.providerId, {
@@ -5621,7 +5580,8 @@ var { hideSpinner: oi } = Oe(), si = {
5621
5580
  googlePayMerchantId: n.googlePayMerchantId,
5622
5581
  googlePayMerchantName: n.googlePayMerchantName,
5623
5582
  buttonOptions: a?.buttonOptions,
5624
- metadata: U(a?.metadata)
5583
+ billingDetailsRequired: a?.billingDetailsRequired,
5584
+ metadata: W(a?.metadata)
5625
5585
  });
5626
5586
  })), this);
5627
5587
  }
@@ -5634,7 +5594,7 @@ var { hideSpinner: oi } = Oe(), si = {
5634
5594
  }
5635
5595
  }
5636
5596
  addApplePay(e, t, n, r, i) {
5637
- return this.isApplePayAvailable().then(L(this, "[addApplePay], available", (a) => {
5597
+ return this.isApplePayAvailable().then(R(this, "[addApplePay], available", (a) => {
5638
5598
  a ? this.renderApplePay(e, t, n, r, i) : this.log("Your browser does not support ApplePay");
5639
5599
  })).catch(() => {}), this;
5640
5600
  }
@@ -5648,9 +5608,9 @@ var { hideSpinner: oi } = Oe(), si = {
5648
5608
  let o = t && document.getElementById(t) || null;
5649
5609
  if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5650
5610
  if (!e(n)) throw this.showErrorMessage(o, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5651
- if (!R(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5611
+ if (!z(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5652
5612
  r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r);
5653
- let s = L(this, "[localAddApplePay]", (e, t, i, a) => {
5613
+ let s = R(this, "[localAddApplePay]", (e, t, i, a) => {
5654
5614
  this.log("[addApplePay, local]", {
5655
5615
  amount: n,
5656
5616
  currency: r,
@@ -5663,7 +5623,7 @@ var { hideSpinner: oi } = Oe(), si = {
5663
5623
  clientParameters: a
5664
5624
  });
5665
5625
  });
5666
- this.initProcessors(o, n, r, i || "", "", {}, L(this, "[addApplePay][initProcessors], callback", (e, t) => {
5626
+ this.initProcessors(o, n, r, i || "", "", {}, R(this, "[addApplePay][initProcessors], callback", (e, t) => {
5667
5627
  if (!t.hasApplePayProviders) return;
5668
5628
  let n = i && t.applePayProviders.find((e) => e.providerId === i) || t.applePayProviders[0];
5669
5629
  s(n.providerId, n.providerType, {
@@ -5678,7 +5638,7 @@ var { hideSpinner: oi } = Oe(), si = {
5678
5638
  supportedNetworks: a?.supportedNetworks || n.supportedNetworks,
5679
5639
  supportedCountries: a?.supportedCountries || n.supportedCountries,
5680
5640
  applePayVersion: a?.applePayVersion || n.applePayVersion,
5681
- metadata: U(a?.metadata)
5641
+ metadata: W(a?.metadata)
5682
5642
  }, e.clientParameters || n.clientParameters);
5683
5643
  }));
5684
5644
  }
@@ -5723,7 +5683,7 @@ var { hideSpinner: oi } = Oe(), si = {
5723
5683
  orderItems: a,
5724
5684
  customer: o,
5725
5685
  billingAddress: s,
5726
- metadata: U(r?.metadata)
5686
+ metadata: W(r?.metadata)
5727
5687
  };
5728
5688
  return this.initCheckoutProcessor(i).addCheckout(i, t, this.currency, "upi", n, c, {
5729
5689
  documentId: r.documentId,
@@ -5748,9 +5708,9 @@ var { hideSpinner: oi } = Oe(), si = {
5748
5708
  });
5749
5709
  let u = t && document.getElementById(t) || null;
5750
5710
  if (!e(o)) throw this.showErrorMessage(u, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5751
- if (!R(s)) throw this.showErrorMessage(u, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5752
- return s &&= s.toUpperCase(), this._cleanUp(u), this._initForm(u), this.setAmount(o), this.setCurrency(s), n = Ye(n), this.getPaymentOptions(o, s, L(this, "[addThreeDsWithFullParameters][getPaymentOptions], callback", (e) => {
5753
- e.hasThreeDsProviders ? this.add3DsProcessor(u, e.threeDsProviders[0].providerId, e.threeDsProviders[0].providerType, "", e.threeDsProviders[0].clientParameters || {}, L(this, "[addThreeDsWithFullParameters][add3DsProcessor], onload", () => {
5711
+ if (!z(s)) throw this.showErrorMessage(u, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5712
+ return s &&= s.toUpperCase(), this._cleanUp(u), this._initForm(u), this.setAmount(o), this.setCurrency(s), n = Ye(n), this.getPaymentOptions(o, s, R(this, "[addThreeDsWithFullParameters][getPaymentOptions], callback", (e) => {
5713
+ e.hasThreeDsProviders ? this.add3DsProcessor(u, e.threeDsProviders[0].providerId, e.threeDsProviders[0].providerType, "", e.threeDsProviders[0].clientParameters || {}, R(this, "[addThreeDsWithFullParameters][add3DsProcessor], onload", () => {
5754
5714
  this.threeDsProcessor?.setEmail(a), this.threeDsProcessor?.setPaymentInfo({
5755
5715
  cardNumber: n,
5756
5716
  expiryDate: r,
@@ -5759,7 +5719,7 @@ var { hideSpinner: oi } = Oe(), si = {
5759
5719
  }), this.threeDsProcessor?.threeDSInvoke(u, !!l?.requireChallenge, (e) => {
5760
5720
  oi(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID });
5761
5721
  });
5762
- }), L(this, "[addThreeDsWithFullParameters][add3DsProcessor], onerror", () => {
5722
+ }), R(this, "[addThreeDsWithFullParameters][add3DsProcessor], onerror", () => {
5763
5723
  this.log(`Cannot load 3DS provider (${e.threeDsProviders[0].providerType})`), this.userOnSuccess?.({});
5764
5724
  })) : (this.log("No 3DS providers found"), this.userOnSuccess?.({}));
5765
5725
  })), this;
@@ -5780,13 +5740,13 @@ var { hideSpinner: oi } = Oe(), si = {
5780
5740
  let f = t && document.getElementById(t) || null;
5781
5741
  if (!D(n)) throw this.showErrorMessage(f, "Missing parameter: providerId"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }), TypeError("Missing parameter: providerId");
5782
5742
  if (!e(c)) throw this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5783
- if (!R(l)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5743
+ if (!z(l)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5784
5744
  return l &&= l.toUpperCase(), this._cleanUp(f), this._initForm(f), this.setAmount(c), this.setCurrency(l), r = Ye(r), this.initProcessors(f, c, l, n, "", {
5785
5745
  createNetworkToken: d?.createNetworkToken,
5786
5746
  clickToPayEnabled: !1
5787
- }, L(this, "[tokeniseWith3Ds][initProcessors], callback", (e, t) => {
5747
+ }, R(this, "[tokeniseWith3Ds][initProcessors], callback", (e, t) => {
5788
5748
  let s = (e) => {
5789
- this.tokeniseCard(n, r, i, a, o, U(u), e, d);
5749
+ this.tokeniseCard(n, r, i, a, o, W(u), e, d);
5790
5750
  };
5791
5751
  this.threeDsProcessor ? (this.threeDsProcessor?.setPaymentInfo({
5792
5752
  cardNumber: r,
@@ -5806,7 +5766,7 @@ var { hideSpinner: oi } = Oe(), si = {
5806
5766
  cardHolderName: r,
5807
5767
  options: s,
5808
5768
  metadata: a
5809
- }), t = Ye(t), this.initCardProcessor(null).tokeniseCard(e, t, n, r, i, U(a), o, s), this;
5769
+ }), t = Ye(t), this.initCardProcessor(null).tokeniseCard(e, t, n, r, i, W(a), o, s), this;
5810
5770
  }
5811
5771
  addThreeDsWithToken(t, n, r, i, a, o) {
5812
5772
  if (this.log("[addThreeDsWithToken]", {
@@ -5817,8 +5777,8 @@ var { hideSpinner: oi } = Oe(), si = {
5817
5777
  options: o
5818
5778
  }), !D(t)) throw this.userOnFailure?.({ error: "Missing parameter: Token Id" }), TypeError("Missing parameter: tokenId");
5819
5779
  if (!e(r)) throw this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5820
- if (!R(i)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5821
- return i &&= i.toUpperCase(), this.setAmount(r), this.setCurrency(i), this.initProcessors(null, r, i, "", t, { clickToPayEnabled: !1 }, L(this, "[addThreeDsWithToken][initProcessors], callback", () => {
5780
+ if (!z(i)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5781
+ return i &&= i.toUpperCase(), this.setAmount(r), this.setCurrency(i), this.initProcessors(null, r, i, "", t, { clickToPayEnabled: !1 }, R(this, "[addThreeDsWithToken][initProcessors], callback", () => {
5822
5782
  this.threeDsProcessor ? (this.threeDsProcessor?.setEmail(n), this.threeDsProcessor?.setTokenId(t), this.threeDsProcessor?.threeDSInvoke(null, !!o?.requireChallenge, (e) => {
5823
5783
  oi(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID }), this.threeDsProcessor?.updateTokenExternal3dsData(e.externalThreeDsData);
5824
5784
  }), this.threeDsProcessor?.setPaymentInfo({
@@ -5839,9 +5799,9 @@ var { hideSpinner: oi } = Oe(), si = {
5839
5799
  n?.(this.paymentOptions[r]);
5840
5800
  return;
5841
5801
  }
5842
- let i = L(this, "[getPaymentOptions], failure", (e, t) => {
5802
+ let i = R(this, "[getPaymentOptions], failure", (e, t) => {
5843
5803
  this.log("[getPaymentOptions], failure", t), this.showErrorMessage(null, "Unable to configure SDK"), this.userOnFailure?.({ error: "Unable to configure SDK" });
5844
- }), a = L(this, "[getPaymentOptions], success", (e, t) => {
5804
+ }), a = R(this, "[getPaymentOptions], success", (e, t) => {
5845
5805
  let i = JSON.parse(t);
5846
5806
  this.log("[getPaymentOptions], success", i), this.paymentOptions[r] = i, n?.(i);
5847
5807
  });
@@ -5859,9 +5819,9 @@ var { hideSpinner: oi } = Oe(), si = {
5859
5819
  i?.(this.paymentOptions[o]);
5860
5820
  return;
5861
5821
  }
5862
- let s = L(this, "[getProviderInfo], error", (e, t) => {
5822
+ let s = R(this, "[getProviderInfo], error", (e, t) => {
5863
5823
  this.log("[getProviderInfo], error", e, t), a({ error: "Unable to get provider information" });
5864
- }), c = L(this, "[getProviderInfo], success", (e, t) => {
5824
+ }), c = R(this, "[getProviderInfo], success", (e, t) => {
5865
5825
  this.log("[getProviderInfo], success", e, t);
5866
5826
  let n = JSON.parse(t);
5867
5827
  this.log("[getProviderInfo], data", n), this.paymentOptions[o] = n, i(n);
@@ -5900,7 +5860,7 @@ var { hideSpinner: oi } = Oe(), si = {
5900
5860
  return this;
5901
5861
  }
5902
5862
  showErrorMessage(e, t) {
5903
- this.log(t), P(e, t);
5863
+ this.log(t), F(e, t);
5904
5864
  }
5905
5865
  setBillingAddress(e) {
5906
5866
  return this.log("[setBillingAddress]", e), this.billingAddress = { ...e }, this.cardProcessor?.setBillingAddress(this.billingAddress), this.googlePayProcessor?.setBillingAddress(this.billingAddress), this.applePayProcessor?.setBillingAddress(this.billingAddress), this.threeDsProcessor?.setAddressInfo(this.billingAddress), this.fraudProcessor?.setAddressInfo(this.billingAddress), this.paymentMethodProcessor?.setBillingAddress(this.billingAddress), window.postMessage({
@@ -5947,40 +5907,40 @@ var { hideSpinner: oi } = Oe(), si = {
5947
5907
  }
5948
5908
  this.initProcessorsHandlers.push(o);
5949
5909
  let s = {}, c = "", l = "", u = !1, d = {}, f = "", p = "", m = {}, h = "", g = "", _ = {}, v = !1, y = (e) => {
5950
- this.getProviderInfo(r, t, n, i || "", L(this, "[getProviderInfo], success", (t) => {
5910
+ this.getProviderInfo(r, t, n, i || "", R(this, "[getProviderInfo], success", (t) => {
5951
5911
  s = { ...t }, !v && t.threeDsProviderId && (f = t.threeDsProviderId, p = t.threeDsProviderType, m = t.threeDsClientParameters || {}), e();
5952
- }), L(this, "[getProviderInfo], error", (t) => {
5912
+ }), R(this, "[getProviderInfo], error", (t) => {
5953
5913
  this.log("Unable to get provider information", t), e();
5954
5914
  }));
5955
- }, b = L(this, "[initFraudProcessor]", (e, t, n, r, i) => {
5956
- !e || !t ? i() : this.addFraudProcessor(e, t, n, r, {}, L(this, "[addFraudProcessor], success", () => {
5915
+ }, b = R(this, "[initFraudProcessor]", (e, t, n, r, i) => {
5916
+ !e || !t ? i() : this.addFraudProcessor(e, t, n, r, {}, R(this, "[addFraudProcessor], success", () => {
5957
5917
  i();
5958
- }), L(this, "[addFraudProcessor], error", () => {
5918
+ }), R(this, "[addFraudProcessor], error", () => {
5959
5919
  this.log("Error loading fraud provider", t), i();
5960
5920
  }));
5961
- }), x = L(this, "[initThreeDsProcessor]", (t, n, i) => {
5921
+ }), x = R(this, "[initThreeDsProcessor]", (t, n, i) => {
5962
5922
  !t || !n ? i() : this.add3DsProcessor(e, t, n, r, {
5963
5923
  ...s.clientParameters,
5964
5924
  ...m
5965
- }, L(this, "[add3DsProcessor], success", () => {
5925
+ }, R(this, "[add3DsProcessor], success", () => {
5966
5926
  i();
5967
- }), L(this, "[add3DsProcessor], error", () => {
5927
+ }), R(this, "[add3DsProcessor], error", () => {
5968
5928
  this.log("Error loading 3ds provider", n), i();
5969
5929
  }));
5970
- }), S = L(this, "[initSecondaryThreeDsProcessor]", (t, n, i) => {
5930
+ }), S = R(this, "[initSecondaryThreeDsProcessor]", (t, n, i) => {
5971
5931
  !t || !n ? i() : this.addSecondary3DsProcessor(e, t, n, r, {
5972
5932
  ...s.clientParameters,
5973
5933
  ..._
5974
- }, L(this, "[addSecondary3DsProcessor], success", () => {
5934
+ }, R(this, "[addSecondary3DsProcessor], success", () => {
5975
5935
  i();
5976
- }), L(this, "[addSecondary3DsProcessor], error", () => {
5936
+ }), R(this, "[addSecondary3DsProcessor], error", () => {
5977
5937
  this.log("Error loading 3ds provider", n), i();
5978
5938
  }));
5979
- }), ee = L(this, "[callCallbackHandlers]", (e, t) => {
5939
+ }), ee = R(this, "[callCallbackHandlers]", (e, t) => {
5980
5940
  for (let n of this.initProcessorsHandlers) n(e, t);
5981
5941
  this.initProcessorsHandlers = [];
5982
5942
  });
5983
- this.getPaymentOptions(t, n, L(this, "[getPaymentOptions], callback", (t) => {
5943
+ this.getPaymentOptions(t, n, R(this, "[getPaymentOptions], callback", (t) => {
5984
5944
  a?.createNetworkToken && !a?.tokenAuthenticationEnabled && (t.clickToPayEnabled = !1), t?.clickToPayEnabled && a?.clickToPayEnabled !== !1 && (v = !0), t?.hasNetworkTokenProviders && a?.tokenAuthenticationEnabled && (v = !0), !v && t.hasThreeDsProviders && (f = t.threeDsProviders[0].providerId, p = t.threeDsProviders[0].providerType, m = t.threeDsProviders[0].clientParameters || {}), !v && t.allThreeDsProviders?.[0]?.providerId && (h = t.allThreeDsProviders[0].providerId, g = t.allThreeDsProviders[0].providerType, _ = t.allThreeDsProviders[0].clientParameters || {}), !v && t.hasFraudProviders && (c = t.fraudProviders[0].providerId, l = t.fraudProviders[0].providerType, u = t.fraudProviders[0].stopPaymentOnFailure, d = t.fraudProviders[0].clientParameters || {}), t.clickToPayEnabled && a?.clickToPayEnabled !== !1 && this.initClickToPayProcessor(e, {
5985
5945
  ...t.clickToPayOptions,
5986
5946
  ...a?.clickToPayOptions,
@@ -6010,7 +5970,7 @@ var { hideSpinner: oi } = Oe(), si = {
6010
5970
  billingAddress: this.billingAddress,
6011
5971
  customer: this.customer,
6012
5972
  order: this.order
6013
- }), a?.()) : ai(t).then(L(this, "[addFraudProcessor], onload", (o) => {
5973
+ }), a?.()) : ai(t).then(R(this, "[addFraudProcessor], onload", (o) => {
6014
5974
  this.log(`Loading ${t}...`, o);
6015
5975
  let s = o.default(r);
6016
5976
  s?.getFraudCheckData && (this.fraudProcessor = new On(this.log.bind(this), {
@@ -6018,7 +5978,7 @@ var { hideSpinner: oi } = Oe(), si = {
6018
5978
  environment: this.environment,
6019
5979
  publicKey: this.publicKey,
6020
5980
  apiUrl: this.config.apiUrl,
6021
- version: Y.version,
5981
+ version: j.version,
6022
5982
  providerId: e,
6023
5983
  stopPaymentOnFailure: n,
6024
5984
  metadata: i,
@@ -6030,7 +5990,7 @@ var { hideSpinner: oi } = Oe(), si = {
6030
5990
  this.log("[fraudProcessor], failure", e);
6031
5991
  }
6032
5992
  }), this.amount && this.fraudProcessor.setAmount(this.amount), this.currency && this.fraudProcessor.setCurrency(this.currency), this.billingAddress && this.fraudProcessor.setAddressInfo(this.billingAddress), this.customer && this.fraudProcessor.setCustomerInfo(this.customer), this.order && this.fraudProcessor.setOrderInfo(this.order), this.cardProcessor?.addFraudProcessor(this.fraudProcessor), this.paypalProcessor?.addFraudProcessor(this.fraudProcessor), a?.());
6033
- })).catch(L(this, "[addFraudProcessor], onerror", (e) => {
5993
+ })).catch(R(this, "[addFraudProcessor], onerror", (e) => {
6034
5994
  this.log(`Error loading ${t}`, e), o?.();
6035
5995
  }));
6036
5996
  }
@@ -6042,19 +6002,19 @@ var { hideSpinner: oi } = Oe(), si = {
6042
6002
  } : t.threeDsProviders?.find((e) => e.providerId === t.required3dsProvider) || t.threeDsProviders?.[0];
6043
6003
  }
6044
6004
  add3DsProcessor(e, t, n, r, i, a, o) {
6045
- this.log("[add3DsProcessor]", t, n), ii(n).then(L(this, "[add3DsProcessor], onload", (o) => {
6005
+ this.log("[add3DsProcessor]", t, n), ii(n).then(R(this, "[add3DsProcessor], onload", (o) => {
6046
6006
  this.log(`Loading ${n}...`, o);
6047
6007
  let s = o.default(this.log.bind(this), e, {
6048
6008
  environment: this.environment,
6049
6009
  apiUrl: this.config.apiUrl,
6050
6010
  clientParameters: i
6051
6011
  });
6052
- s?.setThreeDsProcessor && (this.threeDsProcessor = new V(this.log.bind(this), {
6012
+ s?.setThreeDsProcessor && (this.threeDsProcessor = new H(this.log.bind(this), {
6053
6013
  debug: this.debug,
6054
6014
  environment: this.environment,
6055
6015
  publicKey: this.publicKey,
6056
6016
  apiUrl: this.config.apiUrl,
6057
- version: Y.version,
6017
+ version: j.version,
6058
6018
  providerId: t,
6059
6019
  cardProviderId: r,
6060
6020
  threeDsInvoker: {
@@ -6069,24 +6029,24 @@ var { hideSpinner: oi } = Oe(), si = {
6069
6029
  this.log("[threeDsProcessor], failure", e), this.userOnFailure?.({ error: e.error });
6070
6030
  }
6071
6031
  }), this.amount && this.threeDsProcessor.setAmount(this.amount), this.currency && this.threeDsProcessor.setCurrency(this.currency), this.billingAddress && this.threeDsProcessor.setAddressInfo(this.billingAddress), this.cardProcessor?.addThreeDsProcessor(this.threeDsProcessor), s.setThreeDsProcessor(this.threeDsProcessor), a?.());
6072
- })).catch(L(this, "[add3DsProcessor], onerror", (s) => {
6032
+ })).catch(R(this, "[add3DsProcessor], onerror", (s) => {
6073
6033
  this.log(`Error loading ${n}`, s), n === "default" ? o?.() : this.add3DsProcessor(e, t, "default", r, i, a, o);
6074
6034
  }));
6075
6035
  }
6076
6036
  addSecondary3DsProcessor(e, t, n, r, i, a, o) {
6077
- this.log("[addSecondary3DsProcessor]", t, n), ii(n).then(L(this, "[addSecondary3DsProcessor], onload", (o) => {
6037
+ this.log("[addSecondary3DsProcessor]", t, n), ii(n).then(R(this, "[addSecondary3DsProcessor], onload", (o) => {
6078
6038
  this.log(`Loading ${n}...`, o);
6079
6039
  let s = o.default(this.log.bind(this), e, {
6080
6040
  environment: this.environment,
6081
6041
  apiUrl: this.config.apiUrl,
6082
6042
  clientParameters: i
6083
6043
  });
6084
- s?.setThreeDsProcessor && (this.secondaryThreeDsProcessor = new V(this.log.bind(this), {
6044
+ s?.setThreeDsProcessor && (this.secondaryThreeDsProcessor = new H(this.log.bind(this), {
6085
6045
  debug: this.debug,
6086
6046
  environment: this.environment,
6087
6047
  publicKey: this.publicKey,
6088
6048
  apiUrl: this.config.apiUrl,
6089
- version: Y.version,
6049
+ version: j.version,
6090
6050
  providerId: t,
6091
6051
  cardProviderId: r,
6092
6052
  threeDsInvoker: {
@@ -6101,7 +6061,7 @@ var { hideSpinner: oi } = Oe(), si = {
6101
6061
  this.log("[secondaryThreeDsProcessor], failure", e), this.userOnFailure?.({ error: e.error });
6102
6062
  }
6103
6063
  }), this.amount && this.secondaryThreeDsProcessor.setAmount(this.amount), this.currency && this.secondaryThreeDsProcessor.setCurrency(this.currency), this.billingAddress && this.secondaryThreeDsProcessor.setAddressInfo(this.billingAddress), this.cardProcessor?.addSecondaryThreeDsProcessor(this.secondaryThreeDsProcessor), s.setThreeDsProcessor(this.secondaryThreeDsProcessor), a?.());
6104
- })).catch(L(this, "[addSecondary3DsProcessor], onerror", (s) => {
6064
+ })).catch(R(this, "[addSecondary3DsProcessor], onerror", (s) => {
6105
6065
  this.log(`Error loading ${n}`, s), n === "default" ? o?.() : this.addSecondary3DsProcessor(e, t, "default", r, i, a, o);
6106
6066
  }));
6107
6067
  }
@@ -6110,7 +6070,7 @@ var { hideSpinner: oi } = Oe(), si = {
6110
6070
  clickToPayOptions: e,
6111
6071
  tokenAuthenticationEnabled: e?.tokenAuthenticationEnabled,
6112
6072
  networkTokenOptions: e?.networkTokenOptions
6113
- }, L(this, "[preloadClickToPay], callback", (t, n) => {
6073
+ }, R(this, "[preloadClickToPay], callback", (t, n) => {
6114
6074
  n.clickToPayEnabled && this.initClickToPayProcessor(null, {
6115
6075
  ...n.clickToPayOptions,
6116
6076
  ...e
@@ -6127,7 +6087,7 @@ var { hideSpinner: oi } = Oe(), si = {
6127
6087
  if (!D(n)) throw this.showErrorMessage(i, "Missing parameter: customerId"), this.userOnFailure?.({ error: "Missing parameter: Customer Id" }), TypeError("Missing parameter: customerId");
6128
6088
  let a = Number(r?.amount) || 0, o = r?.currency || "";
6129
6089
  if (a && !e(a)) throw this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
6130
- return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, "", "", { tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled }, L(this, "[addSavedPaymentMethods][initProcessors], callback", (e, t) => {
6090
+ return this._cleanUp(i), this._initForm(i), this.setAmount(a), this.setCurrency(o), this.initProcessors(i, a, o, "", "", { tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled }, R(this, "[addSavedPaymentMethods][initProcessors], callback", (e, t) => {
6131
6091
  let s = {
6132
6092
  ...r,
6133
6093
  tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled && t.hasNetworkTokenProviders,
@@ -6147,7 +6107,7 @@ var { hideSpinner: oi } = Oe(), si = {
6147
6107
  }), t;
6148
6108
  }
6149
6109
  };
6150
- F([I], $.prototype, "init", null), F([I], $.prototype, "execute", null), F([I], $.prototype, "messageHandler", null), F([I], $.prototype, "initCardProcessor", null), F([I], $.prototype, "initClickToPayProcessor", null), F([I], $.prototype, "initPaypalProcessor", null), F([I], $.prototype, "initCheckoutProcessor", null), F([I], $.prototype, "initGooglePayProcessor", null), F([I], $.prototype, "initApplePayProcessor", null), F([I], $.prototype, "initPayToProcessor", null), F([I], $.prototype, "loadCss", null), F([I], $.prototype, "_cleanUp", null), F([I], $.prototype, "getForm", null), F([I], $.prototype, "getSubmit", null), F([I], $.prototype, "getInput", null), F([I], $.prototype, "_initForm", null), F([I], $.prototype, "_setToken", null), F([I], $.prototype, "getSubmitFormHandler", null), F([I], $.prototype, "getDestroyDropIn", null), F([I], $.prototype, "setDestroyDropIn", null), F([I], $.prototype, "addCard", null), F([I], $.prototype, "addCardLeastCost", null), F([I], $.prototype, "addDropIn", null), F([I], $.prototype, "addPaypal", null), F([I], $.prototype, "addPayTo", null), F([I], $.prototype, "addGooglePay", null), F([I], $.prototype, "addApplePay", null), F([I], $.prototype, "addCheckout", null), F([I], $.prototype, "addUpi", null), F([I], $.prototype, "addThreeDsWithFullParameters", null), F([I], $.prototype, "tokeniseWith3Ds", null), F([I], $.prototype, "tokeniseCard", null), F([I], $.prototype, "addThreeDsWithToken", null), F([I], $.prototype, "getPaymentOptions", null), F([I], $.prototype, "getProviderInfo", null), F([I], $.prototype, "setAmount", null), F([I], $.prototype, "setCurrency", null), F([I], $.prototype, "onSuccess", null), F([I], $.prototype, "onFailure", null), F([I], $.prototype, "onLoaded", null), F([I], $.prototype, "onValidationStatusChange", null), F([I], $.prototype, "onValidate", null), F([I], $.prototype, "showErrorMessage", null), F([I], $.prototype, "setBillingAddress", null), F([I], $.prototype, "setCustomerInfo", null), F([I], $.prototype, "setOrderInfo", null), F([I], $.prototype, "setGeolocation", null), F([I], $.prototype, "checkGeolocation", null), F([I], $.prototype, "initProcessors", null), F([I], $.prototype, "addFraudProcessor", null), F([I], $.prototype, "resolveThreeDsProvider", null), F([I], $.prototype, "add3DsProcessor", null), F([I], $.prototype, "addSecondary3DsProcessor", null), F([I], $.prototype, "preloadClickToPay", null), F([I], $.prototype, "addSavedPaymentMethods", null);
6110
+ I([L], $.prototype, "init", null), I([L], $.prototype, "execute", null), I([L], $.prototype, "messageHandler", null), I([L], $.prototype, "initCardProcessor", null), I([L], $.prototype, "initClickToPayProcessor", null), I([L], $.prototype, "initPaypalProcessor", null), I([L], $.prototype, "initCheckoutProcessor", null), I([L], $.prototype, "initGooglePayProcessor", null), I([L], $.prototype, "initApplePayProcessor", null), I([L], $.prototype, "initPayToProcessor", null), I([L], $.prototype, "loadCss", null), I([L], $.prototype, "_cleanUp", null), I([L], $.prototype, "getForm", null), I([L], $.prototype, "getSubmit", null), I([L], $.prototype, "getInput", null), I([L], $.prototype, "_initForm", null), I([L], $.prototype, "_setToken", null), I([L], $.prototype, "getSubmitFormHandler", null), I([L], $.prototype, "getDestroyDropIn", null), I([L], $.prototype, "setDestroyDropIn", null), I([L], $.prototype, "addCard", null), I([L], $.prototype, "addCardLeastCost", null), I([L], $.prototype, "addDropIn", null), I([L], $.prototype, "addPaypal", null), I([L], $.prototype, "addPayTo", null), I([L], $.prototype, "addGooglePay", null), I([L], $.prototype, "addApplePay", null), I([L], $.prototype, "addCheckout", null), I([L], $.prototype, "addUpi", null), I([L], $.prototype, "addThreeDsWithFullParameters", null), I([L], $.prototype, "tokeniseWith3Ds", null), I([L], $.prototype, "tokeniseCard", null), I([L], $.prototype, "addThreeDsWithToken", null), I([L], $.prototype, "getPaymentOptions", null), I([L], $.prototype, "getProviderInfo", null), I([L], $.prototype, "setAmount", null), I([L], $.prototype, "setCurrency", null), I([L], $.prototype, "onSuccess", null), I([L], $.prototype, "onFailure", null), I([L], $.prototype, "onLoaded", null), I([L], $.prototype, "onValidationStatusChange", null), I([L], $.prototype, "onValidate", null), I([L], $.prototype, "showErrorMessage", null), I([L], $.prototype, "setBillingAddress", null), I([L], $.prototype, "setCustomerInfo", null), I([L], $.prototype, "setOrderInfo", null), I([L], $.prototype, "setGeolocation", null), I([L], $.prototype, "checkGeolocation", null), I([L], $.prototype, "initProcessors", null), I([L], $.prototype, "addFraudProcessor", null), I([L], $.prototype, "resolveThreeDsProvider", null), I([L], $.prototype, "add3DsProcessor", null), I([L], $.prototype, "addSecondary3DsProcessor", null), I([L], $.prototype, "preloadClickToPay", null), I([L], $.prototype, "addSavedPaymentMethods", null);
6151
6111
  //#endregion
6152
6112
  //#region src/sdk/main.ts
6153
6113
  var li = new $();