@payfurl/client 4.9.4 → 4.9.5

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.
@@ -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-DUKC8zu2.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-Ksgqjvdu.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-DMTJSYFZ.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)) {
@@ -3049,7 +2991,7 @@ var Mn = { style: { position: "relative" } }, Nn = {
3049
2991
  window.removeEventListener("message", C);
3050
2992
  }), c(() => {
3051
2993
  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", {
2994
+ }), (e, t) => (b(), A(E, null, [k("div", Mn, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
3053
2995
  style: { position: "relative" },
3054
2996
  ref_key: "root",
3055
2997
  ref: a
@@ -3075,8 +3017,8 @@ var Mn = { style: { position: "relative" } }, Nn = {
3075
3017
  order = null;
3076
3018
  constructor(e, t) {
3077
3019
  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);
3020
+ let n = new M(t.environment, N(t.publicKey));
3021
+ this.httpInvoker = new P(t.publicKey, t.version, n);
3080
3022
  }
3081
3023
  setAmount(e) {
3082
3024
  this.amount = e;
@@ -3111,7 +3053,7 @@ var Mn = { style: { position: "relative" } }, Nn = {
3111
3053
  }), this.validateOptions(e, n, r, i), this.setAmount(n), this.setCurrency(r);
3112
3054
  let a = !1;
3113
3055
  this.container = e;
3114
- let o = E({
3056
+ let o = ge({
3115
3057
  el: e,
3116
3058
  component: Fn,
3117
3059
  props: {
@@ -3124,10 +3066,10 @@ var Mn = { style: { position: "relative" } }, Nn = {
3124
3066
  clickGate: this.getOnValidate.bind(this)
3125
3067
  },
3126
3068
  on: {
3127
- activate: L(this, "[GooglePay]: activate", () => {
3069
+ activate: R(this, "[GooglePay]: activate", () => {
3128
3070
  a || (a = !0, this.log("[GooglePay]: activate googlepay form"));
3129
3071
  }),
3130
- complete: L(this, "[GooglePay]: complete", (n) => {
3072
+ complete: R(this, "[GooglePay]: complete", (n) => {
3131
3073
  this.log("[GooglePay]: complete", n);
3132
3074
  let r = {
3133
3075
  amount: this.amount,
@@ -3167,12 +3109,12 @@ var Mn = { style: { position: "relative" } }, Nn = {
3167
3109
  unitOfMeasure: e.unitOfMeasure
3168
3110
  }))
3169
3111
  } || void 0,
3170
- metadata: U(i?.metadata)
3112
+ metadata: W(i?.metadata)
3171
3113
  };
3172
3114
  this.addChargeWithGooglePay(e, t, r);
3173
3115
  }),
3174
- error: L(this, "[GooglePay]: error", (t) => {
3175
- this.log("[GooglePay]: error", t), P(e, "Unable to pay with Google Pay"), this.failureCallback?.({
3116
+ error: R(this, "[GooglePay]: error", (t) => {
3117
+ this.log("[GooglePay]: error", t), F(e, "Unable to pay with Google Pay"), this.failureCallback?.({
3176
3118
  error: "Unable to pay with Google Pay",
3177
3119
  body: t
3178
3120
  });
@@ -3185,27 +3127,27 @@ var Mn = { style: { position: "relative" } }, Nn = {
3185
3127
  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
3128
  }
3187
3129
  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?.({
3130
+ return R(this, "[GooglePay], failure", (t, n) => {
3131
+ this.log("[GooglePay], failure", n), F(e, "Unable to pay with Google Pay"), this.failureCallback?.({
3190
3132
  error: "Unable to pay with Google Pay",
3191
3133
  body: n
3192
3134
  });
3193
3135
  });
3194
3136
  }
3195
3137
  getSuccessAddChargeHandler(e) {
3196
- return L(this, "[GooglePay], success", (e, t) => {
3138
+ return R(this, "[GooglePay], success", (e, t) => {
3197
3139
  let n = JSON.parse(t);
3198
3140
  this.log("[GooglePay], success", n), this.successCallback?.({ transactionId: n.chargeId });
3199
3141
  });
3200
3142
  }
3201
3143
  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");
3144
+ if (!z(r)) throw F(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
3145
+ if (!e(n)) throw F(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
3146
+ if (!i.gateway) throw F(t, "Invalid gateway parameter"), TypeError("Invalid gateway parameter");
3147
+ if (!i.googlePayGatewayMerchantId) throw F(t, "Invalid gateway merchant id parameter"), TypeError("Invalid gateway merchant id parameter");
3206
3148
  }
3207
3149
  };
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);
3150
+ 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
3151
  //#endregion
3210
3152
  //#region \0rolldown_dynamic_import_helper.js
3211
3153
  var zn = (e, t, n) => {
@@ -3291,7 +3233,7 @@ var $n = { style: { position: "relative" } }, er = {
3291
3233
  "cancel"
3292
3234
  ],
3293
3235
  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();
3236
+ 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
3237
  function _() {
3296
3238
  if (n.log("[onApplePayButtonClicked]"), !ApplePaySession || n.clickGate()?.() === !1) return;
3297
3239
  let e = Kn(n.options, l.value, o.value), t = Wn(n.options.applePayVersion);
@@ -3322,7 +3264,7 @@ var $n = { style: { position: "relative" } }, er = {
3322
3264
  window.removeEventListener("message", y);
3323
3265
  }), c(() => {
3324
3266
  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", {
3267
+ }), (e, t) => (b(), A(E, null, [k("div", $n, [u(Re(se, null, null, 512), [[De, g(h)]])]), k("div", {
3326
3268
  style: { position: "relative" },
3327
3269
  ref_key: "root",
3328
3270
  ref: a
@@ -3360,8 +3302,8 @@ var $n = { style: { position: "relative" } }, er = {
3360
3302
  order = null;
3361
3303
  constructor(e, t) {
3362
3304
  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);
3305
+ let n = new M(t.environment, N(t.publicKey));
3306
+ this.httpInvoker = new P(t.publicKey, t.version, n);
3365
3307
  }
3366
3308
  setAmount(e) {
3367
3309
  this.amount = e, this.applePayButton?.setAmount(e);
@@ -3396,14 +3338,14 @@ var $n = { style: { position: "relative" } }, er = {
3396
3338
  }), this.validateOptions(e, n, r, i), this.setAmount(n), this.setCurrency(r);
3397
3339
  let a = !1;
3398
3340
  this.container = e;
3399
- let o = L(this, "[ApplePay][renderDefaultComponent]", () => {
3341
+ let o = R(this, "[ApplePay][renderDefaultComponent]", () => {
3400
3342
  this.log("[addApplePay], renderDefaultComponent", {
3401
3343
  providerId: t,
3402
3344
  amount: n,
3403
3345
  currency: r,
3404
3346
  options: i
3405
3347
  });
3406
- let o = E({
3348
+ let o = ge({
3407
3349
  el: e,
3408
3350
  component: tr,
3409
3351
  props: {
@@ -3419,10 +3361,10 @@ var $n = { style: { position: "relative" } }, er = {
3419
3361
  activate: () => {
3420
3362
  a || (a = !0, this.log("activate applepay form"));
3421
3363
  },
3422
- validateMerchant: L(this, "[addApplePay], validateMerchant", (n, r) => {
3364
+ validateMerchant: R(this, "[addApplePay], validateMerchant", (n, r) => {
3423
3365
  this.log("[ApplePay]: validate", n), this.validateMerchant(e, t, n, r);
3424
3366
  }),
3425
- submit: L(this, "[addApplePay], submit", (n, r) => {
3367
+ submit: R(this, "[addApplePay], submit", (n, r) => {
3426
3368
  this.log("[ApplePay]: complete", n);
3427
3369
  let a = {
3428
3370
  amount: this.amount,
@@ -3454,8 +3396,8 @@ var $n = { style: { position: "relative" } }, er = {
3454
3396
  };
3455
3397
  this.addChargeWithApplePay(e, t, a, r);
3456
3398
  }),
3457
- error: L(this, "[addApplePay], error", (t, n) => {
3458
- this.log("[ApplePay]: error", t), P(e, "Unable to pay with ApplePay"), n.completePayment({
3399
+ error: R(this, "[addApplePay], error", (t, n) => {
3400
+ this.log("[ApplePay]: error", t), F(e, "Unable to pay with ApplePay"), n.completePayment({
3459
3401
  status: ApplePaySession.STATUS_FAILURE,
3460
3402
  errors: [{
3461
3403
  code: "unknown",
@@ -3466,13 +3408,13 @@ var $n = { style: { position: "relative" } }, er = {
3466
3408
  body: t
3467
3409
  });
3468
3410
  }),
3469
- cancel: L(this, "[addApplePay], calcel", () => {
3470
- this.log("[ApplePay]: cancel"), P(e, "ApplePay canceled"), this.failureCallback?.({ error: "ApplePay canceled" });
3411
+ cancel: R(this, "[addApplePay], calcel", () => {
3412
+ this.log("[ApplePay]: cancel"), F(e, "ApplePay canceled"), this.failureCallback?.({ error: "ApplePay canceled" });
3471
3413
  })
3472
3414
  }
3473
3415
  });
3474
3416
  this.destroy = o.destroy;
3475
- }), s = L(this, "[ApplePay][renderCustomComponent]", (a) => {
3417
+ }), s = R(this, "[ApplePay][renderCustomComponent]", (a) => {
3476
3418
  this.log("[addApplePay], renderCustomComponent", {
3477
3419
  providerId: t,
3478
3420
  amount: n,
@@ -3486,7 +3428,7 @@ var $n = { style: { position: "relative" } }, er = {
3486
3428
  options: i,
3487
3429
  clientParameters: i.clientParameters,
3488
3430
  onValidate: this.getOnValidate.bind(this),
3489
- onSuccess: L(this, "[addApplePay], success", (e) => {
3431
+ onSuccess: R(this, "[addApplePay], success", (e) => {
3490
3432
  this.log("[addApplePay], success", e), this.applePayButton?.hide();
3491
3433
  let t = {
3492
3434
  token: e.token,
@@ -3494,7 +3436,7 @@ var $n = { style: { position: "relative" } }, er = {
3494
3436
  };
3495
3437
  e.clickToPayData && (t.clickToPayData = e.clickToPayData), this.successCallback?.(t);
3496
3438
  }),
3497
- onFailure: L(this, "[addApplePay], failure", (e) => {
3439
+ onFailure: R(this, "[addApplePay], failure", (e) => {
3498
3440
  this.log("[addApplePay], failure", e), this.applePayButton?.redraw(), this.failureCallback?.({ error: e.error });
3499
3441
  })
3500
3442
  }), 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 +3444,24 @@ var $n = { style: { position: "relative" } }, er = {
3502
3444
  zn(/* #__PURE__ */ Object.assign({
3503
3445
  "./applepay/ApplePayButton.interface.ts": () => import("./ApplePayButton.interface-BvRk9kiK.js"),
3504
3446
  "./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) => {
3447
+ "./applepay/PayWayAppleButton.ts": () => import("./PayWayAppleButton-BKBON7Yl.js"),
3448
+ "./applepay/payway_rest.ts": () => import("./payway_rest-DQj75YyG.js")
3449
+ }), `./applepay/${i.providerType.toLowerCase()}.ts`, 3).then(R(this, "[localAddApplePay], then", (e) => {
3508
3450
  this.log(`Loading ${i.providerType}...`, e), s(e);
3509
3451
  })).catch(() => {
3510
3452
  this.log(`Error loading ${i.providerType}`), o();
3511
3453
  });
3512
3454
  }
3513
3455
  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) => {
3456
+ 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
3457
  try {
3516
3458
  let e = JSON.parse(t);
3517
3459
  this.log("[validateMerchant], success", e), r.completeMerchantValidation(e);
3518
3460
  } catch (e) {
3519
3461
  this.log("error parsing validateMerchant response", e);
3520
3462
  }
3521
- }), L(this, "[validateMerchant], failure", (t, n) => {
3522
- this.log("[validateMerchant], failure", n), P(e, "Unable to pay with ApplePay"), this.failureCallback?.({
3463
+ }), R(this, "[validateMerchant], failure", (t, n) => {
3464
+ this.log("[validateMerchant], failure", n), F(e, "Unable to pay with ApplePay"), this.failureCallback?.({
3523
3465
  error: "Unable to pay with ApplePay",
3524
3466
  body: n
3525
3467
  });
@@ -3529,8 +3471,8 @@ var $n = { style: { position: "relative" } }, er = {
3529
3471
  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
3472
  }
3531
3473
  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({
3474
+ return R(this, "[getFailureAddChargeHandler]", (n, r) => {
3475
+ this.log("[ApplePay], failure", r), F(e, "Unable to pay with ApplePay"), t.completePayment({
3534
3476
  status: ApplePaySession.STATUS_FAILURE,
3535
3477
  errors: [{
3536
3478
  code: "unknown",
@@ -3543,7 +3485,7 @@ var $n = { style: { position: "relative" } }, er = {
3543
3485
  });
3544
3486
  }
3545
3487
  getSuccessAddChargeHandler(e, t) {
3546
- return L(this, "[getSuccessAddChargeHandler]", (e, n) => {
3488
+ return R(this, "[getSuccessAddChargeHandler]", (e, n) => {
3547
3489
  let r = JSON.parse(n);
3548
3490
  this.log("[ApplePay], success", r);
3549
3491
  let i = {
@@ -3554,12 +3496,12 @@ var $n = { style: { position: "relative" } }, er = {
3554
3496
  });
3555
3497
  }
3556
3498
  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");
3499
+ if (!z(r)) throw F(t, "Invalid currency: " + r), TypeError("invalid currency: " + r);
3500
+ if (!e(n)) throw F(t, "Invalid amount: " + n), TypeError("invalid amount: " + n);
3501
+ if (!i.lineItemLabel) throw F(t, "Invalid lineItemLabel parameter"), TypeError("Invalid lineItemLabel parameter");
3560
3502
  }
3561
3503
  };
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);
3504
+ 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
3505
  //#endregion
3564
3506
  //#region src/components/ApplePayIcon.vue
3565
3507
  var ar = /*#__PURE__*/ w(/* @__PURE__ */ C({
@@ -3736,7 +3678,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
3736
3678
  sdk: "https://src.mastercard.com/sdk/srcsdk.mastercard.js",
3737
3679
  lib: "https://src.mastercard.com/srci/integration/2/lib.js?srcDpaId={dpaId}&locale=en_AU"
3738
3680
  }
3739
- }, Z = class extends W {
3681
+ }, Z = class extends G {
3740
3682
  enabled = !0;
3741
3683
  initialized = !1;
3742
3684
  loaded = !1;
@@ -3869,9 +3811,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
3869
3811
  return;
3870
3812
  }
3871
3813
  let t = document.createElement("script");
3872
- t.src = e, t.onload = L(this, "[ClickToPayProcessor]: CheckoutServiceLib loaded", () => {
3814
+ t.src = e, t.onload = R(this, "[ClickToPayProcessor]: CheckoutServiceLib loaded", () => {
3873
3815
  this.log("[ClickToPayProcessor]: CheckoutServiceLib loaded"), this.mcInitClickToPay();
3874
- }), t.onerror = L(this, "[ClickToPayProcessor]: CheckoutServiceLib error", (t) => {
3816
+ }), t.onerror = R(this, "[ClickToPayProcessor]: CheckoutServiceLib error", (t) => {
3875
3817
  this.log("[ClickToPayProcessor]: CheckoutServiceLib error", t), this.sendErrorNotification("CheckoutServiceLib error", [e, t]), this.stopUsing();
3876
3818
  }), document.head.appendChild(t);
3877
3819
  }
@@ -3989,7 +3931,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
3989
3931
  mcShowOtpInput(e, t, n) {
3990
3932
  this.log("[mcShowOtpInput]", this.requestedValidationChannelId, e, t, n);
3991
3933
  let r = this;
3992
- customElements.whenDefined("src-otp-input").then(L(this, "[mcShowOtpInput], success", () => {
3934
+ customElements.whenDefined("src-otp-input").then(R(this, "[mcShowOtpInput], success", () => {
3993
3935
  let i = e.find((e) => e.identityType === "SMS"), a = e.find((e) => e.identityType === "EMAIL"), o = [];
3994
3936
  (!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
3937
  })).catch((e) => {
@@ -4016,7 +3958,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4016
3958
  this.showLoginForm();
4017
3959
  }
4018
3960
  showLoginForm() {
4019
- let { destroy: e } = E({
3961
+ let { destroy: e } = ge({
4020
3962
  el: document.body,
4021
3963
  component: Dr,
4022
3964
  props: {
@@ -4024,10 +3966,10 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4024
3966
  options: this.options
4025
3967
  },
4026
3968
  on: {
4027
- close: L(this, "[showLoginForm], onclose", () => {
3969
+ close: R(this, "[showLoginForm], onclose", () => {
4028
3970
  this.log("[LoginForm.close]"), this.stopLoadingCardForm(), e();
4029
3971
  }),
4030
- submit: L(this, "[showLoginForm], onsubmit", ({ email: t, phone: n }) => {
3972
+ submit: R(this, "[showLoginForm], onsubmit", ({ email: t, phone: n }) => {
4031
3973
  this.log("[LoginForm.submit]", t, n), e(), this.customer || this.setCustomerInfo({
4032
3974
  firstName: "",
4033
3975
  lastName: "",
@@ -4035,7 +3977,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4035
3977
  phoneNumber: ""
4036
3978
  }), this.customer.email = t, this.customer.phoneNumber = n, !t && !n ? this.stopLoadingCardForm() : (this.setCards([]), this.mcIdLookup());
4037
3979
  }),
4038
- logout: L(this, "[showLoginForm], onlogout", () => {
3980
+ logout: R(this, "[showLoginForm], onlogout", () => {
4039
3981
  this.log("[LoginForm.logout]"), e(), this.stopLoadingCardForm(), this.setCards([]), this.mcLogout();
4040
3982
  })
4041
3983
  }
@@ -4043,9 +3985,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4043
3985
  }
4044
3986
  checkoutWithCard(e, t, n) {
4045
3987
  this.log("ClickToPayProcessor.checkoutWithExistingCard", e);
4046
- let r = this, i = L(this, "[checkoutWithCard.promiseResolvedHandler]", (e) => {
3988
+ let r = this, i = R(this, "[checkoutWithCard.promiseResolvedHandler]", (e) => {
4047
3989
  r.log("[checkoutWithCard.promiseResolvedHandler]", e), r.hideModalForm(), t(e);
4048
- }), a = L(this, "[checkoutWithCard.promiseRejectedHandler]", (t) => {
3990
+ }), a = R(this, "[checkoutWithCard.promiseRejectedHandler]", (t) => {
4049
3991
  r.log("[checkoutWithCard.promiseRejectedHandler]", t), r.stopUsing(), r.showInfoMessage(Ar), n(t), r.sendErrorNotification("checkoutWithCard error", [
4050
3992
  e,
4051
3993
  o,
@@ -4067,11 +4009,11 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4067
4009
  expiryDate: t,
4068
4010
  ccv: "***",
4069
4011
  enrollCard: r
4070
- }), this.tokenAuthenticationEnabled && this.showModalForm(), this.encryptCard(e, t, n, L(this, "[mcEncryptCard], success", (e, t) => {
4012
+ }), this.tokenAuthenticationEnabled && this.showModalForm(), this.encryptCard(e, t, n, R(this, "[mcEncryptCard], success", (e, t) => {
4071
4013
  this.checkoutWithEncryptedNewCard(e, t, (e) => {
4072
4014
  i(e);
4073
4015
  }, a);
4074
- }), L(this, "[mcEncryptCard], error", (n) => {
4016
+ }), R(this, "[mcEncryptCard], error", (n) => {
4075
4017
  a(n), this.sendErrorNotification("mcEncryptCard error", [{
4076
4018
  cardNumber: e,
4077
4019
  expiryDate: t,
@@ -4080,9 +4022,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4080
4022
  }));
4081
4023
  }
4082
4024
  checkoutWithEncryptedNewCard(e, t, n, r) {
4083
- let i = this, a = L(this, "[checkoutWithNewCard.promiseResolvedHandler]", (e) => {
4025
+ let i = this, a = R(this, "[checkoutWithNewCard.promiseResolvedHandler]", (e) => {
4084
4026
  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) => {
4027
+ }), o = R(this, "[checkoutWithNewCard.promiseRejectedHandler]", (e) => {
4086
4028
  i.log("[checkoutWithNewCard.promiseRejectedHandler]", e), i.stopUsing(), i.showInfoMessage(Ar), r(e), i.sendErrorNotification("checkoutWithNewCard error", [s, e]);
4087
4029
  });
4088
4030
  this.showModalForm();
@@ -4109,9 +4051,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4109
4051
  this.log("[mcInitClickToPay] mcCheckoutService or sdk not found", window.MastercardCheckoutServices, window.SRCSDK_MASTERCARD), this.stopUsing();
4110
4052
  return;
4111
4053
  }
4112
- let e = this, t = L(this, "[mcInitClickToPay.promiseResolvedHandler]", (t) => {
4054
+ let e = this, t = R(this, "[mcInitClickToPay.promiseResolvedHandler]", (t) => {
4113
4055
  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) => {
4056
+ }), n = R(this, "[mcInitClickToPay.promiseRejectedHandler]", (t) => {
4115
4057
  e.log("[mcInitClickToPay.promiseRejectedHandler]", t), e.loaded = !0, e.sendErrorNotification("mcInitClickToPay error", [r, t]), e.stopUsing();
4116
4058
  }), r = {
4117
4059
  srcDpaId: this.options.dpaId,
@@ -4128,9 +4070,9 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4128
4070
  return;
4129
4071
  }
4130
4072
  this.customer?.email || (e = !0);
4131
- let t = this, n = L(this, "[mcIdLookup.promiseResolvedHandler]", (n) => {
4073
+ let t = this, n = R(this, "[mcIdLookup.promiseResolvedHandler]", (n) => {
4132
4074
  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) => {
4075
+ }), r = R(this, "[mcIdLookup.promiseRejectedHandler]", (e) => {
4134
4076
  t.log("[mcIdLookup.promiseRejectedHandler]", e), t.stopLoadingCardForm(), t.sendErrorNotification("mcIdLookup error", [a, e]), t.stopUsing();
4135
4077
  }), i = We(this.customer?.phoneNumber || ""), a = e ? { mobileNumber: {
4136
4078
  phoneNumber: i[1] || "",
@@ -4142,7 +4084,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4142
4084
  this.log("[mcInitiateValidation]", e);
4143
4085
  let t = this;
4144
4086
  this.requestedValidationChannelId = e || "";
4145
- let n = L(this, "[mcInitiateValidation.promiseResolvedHandler]", (e) => {
4087
+ let n = R(this, "[mcInitiateValidation.promiseResolvedHandler]", (e) => {
4146
4088
  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
4089
  t.supportedValidationChannels.push({
4148
4090
  maskedValidationChannel: e,
@@ -4150,15 +4092,15 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4150
4092
  validationChannelId: e.includes("@") ? "EMAIL" : "SMS"
4151
4093
  });
4152
4094
  })), t.mcShowOtpInput(t.supportedValidationChannels, e.network);
4153
- }), r = L(this, "[mcInitiateValidation.promiseRejectedHandler]", (n) => {
4095
+ }), r = R(this, "[mcInitiateValidation.promiseRejectedHandler]", (n) => {
4154
4096
  t.log("[mcInitiateValidation.promiseRejectedHandler]", n), t.stopUsing(), t.sendErrorNotification("mcInitiateValidation error", [{ requestedValidationChannelId: e }, n]);
4155
4097
  });
4156
4098
  this.log("[mcInitiateValidation]", e ? { requestedValidationChannelId: e } : null), window.mcCheckoutService.initiateValidation(e ? { requestedValidationChannelId: e } : void 0).then(n).catch(r);
4157
4099
  }
4158
4100
  mcValidate(e) {
4159
- let t = this, n = L(this, "[mcValidate.promiseResolvedHandler]", (e) => {
4101
+ let t = this, n = R(this, "[mcValidate.promiseResolvedHandler]", (e) => {
4160
4102
  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) => {
4103
+ }), r = R(this, "[mcValidate.promiseRejectedHandler]", (e) => {
4162
4104
  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
4105
  }), i = {
4164
4106
  value: e,
@@ -4167,25 +4109,25 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4167
4109
  this.log("[mcValidate]", i), this.startLoadingCardForm(), window.mcCheckoutService.completeValidation(i).then(n).catch(r);
4168
4110
  }
4169
4111
  runClickToPay() {
4170
- let e = this, t = L(this, "[runClickToPay.promiseResolvedHandler]", (t) => {
4112
+ let e = this, t = R(this, "[runClickToPay.promiseResolvedHandler]", (t) => {
4171
4113
  e.log("[runClickToPay.promiseResolvedHandler]", t), !t || !t.length ? e.mcIdLookup() : (e.setCards(t), e.stopLoadingCardForm());
4172
- }), n = L(this, "[runClickToPay.promiseRejectedHandler]", (t) => {
4114
+ }), n = R(this, "[runClickToPay.promiseRejectedHandler]", (t) => {
4173
4115
  e.log("[runClickToPay.promiseRejectedHandler]", t), e.stopUsing(), e.stopLoadingCardForm(), e.sendErrorNotification("mcCheckoutService.getCards error", [t]);
4174
4116
  });
4175
4117
  this.log("[runClickToPay]"), window.mcCheckoutService.getCards().then(t).catch(n);
4176
4118
  }
4177
4119
  mcGetCards() {
4178
- let e = this, t = L(this, "[getCards.promiseResolvedHandler]", (t) => {
4120
+ let e = this, t = R(this, "[getCards.promiseResolvedHandler]", (t) => {
4179
4121
  e.log("[getCards.promiseResolvedHandler]", t), e.setCards(t), e.stopLoadingCardForm();
4180
- }), n = L(this, "[getCards.promiseRejectedHandler]", (t) => {
4122
+ }), n = R(this, "[getCards.promiseRejectedHandler]", (t) => {
4181
4123
  e.log("[getCards.promiseRejectedHandler]", t), e.stopLoadingCardForm(), e.stopUsing(), e.sendErrorNotification("getCards error", [t]);
4182
4124
  });
4183
4125
  this.log("[getCards]"), window.mcCheckoutService.getCards().then(t).catch(n);
4184
4126
  }
4185
4127
  mcEncryptCard(e, t, n, r, i) {
4186
- let a = this, o = L(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4128
+ let a = this, o = R(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4187
4129
  a.log("[encryptCard.promiseResolvedHandler]", e), r(e.encryptedCard, e.cardBrand);
4188
- }), s = L(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4130
+ }), s = R(this, "[encryptCard.promiseResolvedHandler]", (e) => {
4189
4131
  a.log("[encryptCard.promiseResolvedHandler]", e), i(e), a.sendErrorNotification("encryptCard error", [l, e]);
4190
4132
  }), c = t.split("/"), l = {
4191
4133
  primaryAccountNumber: e,
@@ -4212,7 +4154,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4212
4154
  let t = this.getCardFormFrame();
4213
4155
  if (t) try {
4214
4156
  t.contentWindow?.postMessage({
4215
- status: _e,
4157
+ status: ve,
4216
4158
  availableCardBrands: e
4217
4159
  }, "*");
4218
4160
  } catch (e) {
@@ -4269,7 +4211,7 @@ var Ar = "Click to Pay is unavailable. Please proceed with an alternative paymen
4269
4211
  return e;
4270
4212
  }
4271
4213
  };
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);
4214
+ 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
4215
  //#endregion
4274
4216
  //#region src/sdk/types/PaymentMethodInfo.type.ts
4275
4217
  var Mr;
@@ -4354,8 +4296,8 @@ var Nr = {
4354
4296
  n.value.type === g(Mr).PAYTO ? (b(), A("div", zr, [
4355
4297
  o(" Name: " + i(n.value.payTo?.payerName), 1),
4356
4298
  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 }, [
4299
+ 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),
4300
+ n.value.payTo?.payerDirectDebitDetails ? (b(), A(E, { key: 1 }, [
4359
4301
  o(" BSB: " + i(n.value.payTo?.payerDirectDebitDetails?.bsb), 1),
4360
4302
  t[2] ||= k("br", null, null, -1),
4361
4303
  o(" Acc No: " + i(n.value.payTo?.payerDirectDebitDetails?.accountNumber), 1)
@@ -4425,7 +4367,7 @@ var Nr = {
4425
4367
  window.removeEventListener("message", m);
4426
4368
  }), (e, t) => l.value.length > 0 ? (b(), A("div", Vr, [
4427
4369
  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", {
4370
+ (b(!0), A(E, null, we(f.value, (e, t) => (b(), A("div", {
4429
4371
  key: `paymentMethod${t}`,
4430
4372
  class: ne(["payment-method-container", `${o.value?.paymentMethodId === e?.paymentMethodId ? "selected" : ""} ${d.value[`${e?.paymentMethodId}`] ? "error" : ""}`]),
4431
4373
  onClick: (t) => h(e)
@@ -4483,8 +4425,8 @@ var Nr = {
4483
4425
  userSuccessMessage = re;
4484
4426
  constructor(e, t) {
4485
4427
  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);
4428
+ let n = new M(t.environment, N(t.publicKey));
4429
+ this.httpInvoker = new P(t.publicKey, t.version, n);
4488
4430
  }
4489
4431
  setAmount(e) {
4490
4432
  this.amount = e;
@@ -4582,7 +4524,7 @@ var Nr = {
4582
4524
  };
4583
4525
  }
4584
4526
  };
4585
- F([I], Yr.prototype, "setPaymentInfo", null), F([I], Yr.prototype, "cleanUp", null);
4527
+ I([L], Yr.prototype, "setPaymentInfo", null), I([L], Yr.prototype, "cleanUp", null);
4586
4528
  //#endregion
4587
4529
  //#region src/sdk/processors/paymentMethodProcessor.ts
4588
4530
  var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
@@ -4615,11 +4557,11 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4615
4557
  currency: i,
4616
4558
  customerId: n,
4617
4559
  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);
4560
+ }), this.container = t, this.networkTokenProviders = a?.networkTokenProviders || [], this.networkTokenProviders = a?.networkTokenProviders || [], !e(r)) throw F(t, "Invalid amount: " + r), TypeError("invalid amount: " + r);
4619
4561
  this.getCustomerData(n, (e) => {
4620
4562
  this.log("[addPaymentMethods], customerInfo", e), this.getPaymentMethodsInfo(n, (n) => {
4621
4563
  this.log("[addPaymentMethods], paymentMethods", n);
4622
- let o = E({
4564
+ let o = ge({
4623
4565
  el: this.container,
4624
4566
  component: Jr,
4625
4567
  props: {
@@ -4663,7 +4605,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4663
4605
  networkToken: t.networkToken
4664
4606
  }))
4665
4607
  },
4666
- on: { submit: L(this, "[PaymentMethods]: submit", (e) => {
4608
+ on: { submit: R(this, "[PaymentMethods]: submit", (e) => {
4667
4609
  this.log("[PaymentMethods]: submit", e), e?.paymentMethodId && (Zr(), setTimeout(() => {
4668
4610
  this.onSubmit(t, r, i, a, e);
4669
4611
  }, 500));
@@ -4684,7 +4626,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4684
4626
  currency: r,
4685
4627
  authenticationData: i
4686
4628
  });
4687
- let a = L(this, "[PaymentMethodProcessor][tokenise], success", (t, n) => {
4629
+ let a = R(this, "[PaymentMethodProcessor][tokenise], success", (t, n) => {
4688
4630
  this.log("[PaymentMethodProcessor][tokenise], success", t, n), Xr();
4689
4631
  let r = JSON.parse(n), i = { token: r.tokenId };
4690
4632
  r.card && (i.cardDetails = {
@@ -4701,7 +4643,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4701
4643
  countryCode: r.card.iinData.countryCode || "",
4702
4644
  cardType: r.card.iinData.cardType || ""
4703
4645
  }), this.successCallback?.(i), Qe(e, this.getSuccessMessage());
4704
- }), o = L(this, "[PaymentMethodProcessor][tokenise], failure", (e, n) => {
4646
+ }), o = R(this, "[PaymentMethodProcessor][tokenise], failure", (e, n) => {
4705
4647
  this.log("[PaymentMethodProcessor][tokenise], failure", e, n), Xr();
4706
4648
  let r = JSON.parse(n);
4707
4649
  this.failureCallback?.({ error: r.message }), this.sendError(t, r.message);
@@ -4723,17 +4665,17 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4723
4665
  this.httpInvoker?.invoke($r(this.apiUrl)[Qr.TOKENISE].url, $r(this.apiUrl)[Qr.TOKENISE].method, JSON.stringify(s), a, o);
4724
4666
  }
4725
4667
  getCustomerData(e, t, n) {
4726
- let r = L(this, "[getCustomerData], success", (e, n) => {
4668
+ let r = R(this, "[getCustomerData], success", (e, n) => {
4727
4669
  this.log("[getCustomerData], success", e, n), t(JSON.parse(n));
4728
- }), i = L(this, "[getCustomerData], failure", (e, t) => {
4670
+ }), i = R(this, "[getCustomerData], failure", (e, t) => {
4729
4671
  this.log("[getCustomerData], failure", e, t), n(JSON.parse(t));
4730
4672
  });
4731
4673
  this.httpInvoker?.invoke($r(this.apiUrl, e)[Qr.CUSTOMER_INFO].url, $r(this.apiUrl, e)[Qr.CUSTOMER_INFO].method, {}, r, i);
4732
4674
  }
4733
4675
  getPaymentMethodsInfo(e, t, n) {
4734
- let r = L(this, "[getPaymentMethodsInfo], success", (e, n) => {
4676
+ let r = R(this, "[getPaymentMethodsInfo], success", (e, n) => {
4735
4677
  this.log("[getPaymentMethodsInfo], success", e, n), t(JSON.parse(n));
4736
- }), i = L(this, "[getPaymentMethodsInfo], failure", (e, t) => {
4678
+ }), i = R(this, "[getPaymentMethodsInfo], failure", (e, t) => {
4737
4679
  this.log("[getPaymentMethodsInfo], failure", e, t), n(JSON.parse(t));
4738
4680
  });
4739
4681
  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 +4694,9 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4752
4694
  this.tokenise(e, i.paymentMethodId, t, n);
4753
4695
  return;
4754
4696
  }
4755
- o.invoke(this.amount, this.currency, L(this, "[sdk][paymentMethodProcessor], token authentication success", (r) => {
4697
+ o.invoke(this.amount, this.currency, R(this, "[sdk][paymentMethodProcessor], token authentication success", (r) => {
4756
4698
  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) => {
4699
+ }), R(this, "[sdk][paymentMethodProcessor], token authentication error", (e) => {
4758
4700
  Xr(), this.log("[sdk][paymentMethodProcessor], token authentication error", e), this.failureCallback?.({ error: "Token Authentication Error" });
4759
4701
  }));
4760
4702
  }
@@ -4775,7 +4717,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4775
4717
  });
4776
4718
  let o = (i?.scheme || "").toLowerCase(), s = this.networkTokenProviders.find((e) => e.providerType.toLowerCase() === o);
4777
4719
  switch (String(s?.providerType).toLowerCase()) {
4778
- case "mastercard": return new G(this.log.bind(this), {
4720
+ case "mastercard": return new K(this.log.bind(this), {
4779
4721
  container: this.container,
4780
4722
  token: e,
4781
4723
  networkToken: t,
@@ -4794,7 +4736,7 @@ var { hideSpinner: Xr, showSpinner: Zr } = Oe(), Qr = {
4794
4736
  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
4737
  }
4796
4738
  };
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);
4739
+ 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
4740
  //#endregion
4799
4741
  //#region src/sdk/types/PaymentType.type.ts
4800
4742
  var Q;
@@ -4805,11 +4747,11 @@ var Q;
4805
4747
  //#region src/sdk/utils/paymentType.ts
4806
4748
  function ti(e) {
4807
4749
  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;
4750
+ case Y.SHIFT: return Q.shift;
4751
+ case Y.PESAPAL: return Q.pesapal;
4752
+ case Y.PAYBYACCOUNT: return Q.paybyaccount;
4753
+ case Y.PAYGLOCAL:
4754
+ case Y.ZIP: return Q.zip;
4813
4755
  }
4814
4756
  }
4815
4757
  //#endregion
@@ -4888,9 +4830,9 @@ var { hideSpinner: oi } = Oe(), si = {
4888
4830
  paymentOptions = {};
4889
4831
  initProcessorsHandlers = [];
4890
4832
  init(e, t, n) {
4891
- if (this.environment = String(e).toLowerCase(), $e.init(this.environment, t, Y.version), window._payfurl) return window._payfurl;
4833
+ if (this.environment = String(e).toLowerCase(), $e.init(this.environment, t, j.version), window._payfurl) return window._payfurl;
4892
4834
  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;
4835
+ 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
4836
  }
4895
4837
  execute() {
4896
4838
  window.postMessage({ status: oe }, "*");
@@ -4900,20 +4842,20 @@ var { hideSpinner: oi } = Oe(), si = {
4900
4842
  }
4901
4843
  initCardProcessor(e) {
4902
4844
  if (this.log("[initCardProcessor]", { container: e }), this.cardProcessor) return this.cardProcessor;
4903
- let t = new q(this.log.bind(this), {
4845
+ let t = new J(this.log.bind(this), {
4904
4846
  debug: this.debug,
4905
4847
  environment: this.environment,
4906
4848
  publicKey: this.publicKey,
4907
4849
  url: this.config.url,
4908
4850
  secureUrl: this.config.secureUrl,
4909
4851
  apiUrl: this.config.apiUrl,
4910
- version: Y.version,
4911
- onSuccess: L(this, "[cardProcessor], success", (t) => {
4852
+ version: j.version,
4853
+ onSuccess: R(this, "[cardProcessor], success", (t) => {
4912
4854
  this.log("[cardProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
4913
4855
  this.userOnSuccess || this.getForm(e)?.submit();
4914
4856
  }, 500)), this.userOnSuccess?.(t);
4915
4857
  }),
4916
- onFailure: L(this, "[cardProcessor], failure", (e) => {
4858
+ onFailure: R(this, "[cardProcessor], failure", (e) => {
4917
4859
  this.log("[cardProcessor], failure", e);
4918
4860
  let t = An(e.body);
4919
4861
  e.body && !t && this.log("[cardProcessor], failure", "no structured error detail in body"), this.userOnFailure?.({
@@ -4921,7 +4863,7 @@ var { hideSpinner: oi } = Oe(), si = {
4921
4863
  ...t && { errorDetails: t }
4922
4864
  });
4923
4865
  }),
4924
- onValidationStatusChangeCallback: L(this, "[cardProcessor], ValidationStatusChange", (e, t) => {
4866
+ onValidationStatusChangeCallback: R(this, "[cardProcessor], ValidationStatusChange", (e, t) => {
4925
4867
  this.log("[cardProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
4926
4868
  })
4927
4869
  });
@@ -4941,13 +4883,13 @@ var { hideSpinner: oi } = Oe(), si = {
4941
4883
  environment: this.environment,
4942
4884
  publicKey: this.publicKey,
4943
4885
  apiUrl: this.config.apiUrl,
4944
- version: Y.version,
4945
- onSuccess: L(this, "[paypalProcessor], success", (t) => {
4886
+ version: j.version,
4887
+ onSuccess: R(this, "[paypalProcessor], success", (t) => {
4946
4888
  this.log("[paypalProcessor], success", t, this.userOnSuccess), !this.userOnSuccess && t.transactionId && (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
4947
4889
  this.getForm(e)?.submit();
4948
4890
  }, 500)), this.userOnSuccess?.({ transactionId: t.transactionId });
4949
4891
  }),
4950
- onFailure: L(this, "[paypalProcessor], failure", (e) => {
4892
+ onFailure: R(this, "[paypalProcessor], failure", (e) => {
4951
4893
  this.log("[paypalProcessor], failure", e), this.userOnFailure?.({ error: e.error });
4952
4894
  })
4953
4895
  });
@@ -4961,15 +4903,15 @@ var { hideSpinner: oi } = Oe(), si = {
4961
4903
  publicKey: this.publicKey,
4962
4904
  apiUrl: this.config.apiUrl,
4963
4905
  redirectUrl: this.config.redirectUrl,
4964
- version: Y.version,
4965
- onSuccess: L(this, "[checkoutProcessor], success", (t) => {
4906
+ version: j.version,
4907
+ onSuccess: R(this, "[checkoutProcessor], success", (t) => {
4966
4908
  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
4909
  this.getForm(e)?.submit();
4968
4910
  }, 500));
4969
4911
  let n = {};
4970
4912
  t.transactionId && (n.transactionId = t.transactionId), t.token && (n.token = t.token), this.userOnSuccess?.(n);
4971
4913
  }),
4972
- onFailure: L(this, "[checkoutProcessor], failure", (e) => {
4914
+ onFailure: R(this, "[checkoutProcessor], failure", (e) => {
4973
4915
  this.log("[checkoutProcessor], failure", e), this.userOnFailure?.({ error: e.error });
4974
4916
  })
4975
4917
  });
@@ -4982,13 +4924,13 @@ var { hideSpinner: oi } = Oe(), si = {
4982
4924
  environment: this.environment,
4983
4925
  publicKey: this.publicKey,
4984
4926
  apiUrl: this.config.apiUrl,
4985
- version: Y.version,
4986
- onSuccess: L(this, "[googlePayProcessor], success", (t) => {
4927
+ version: j.version,
4928
+ onSuccess: R(this, "[googlePayProcessor], success", (t) => {
4987
4929
  this.log("[googlePayProcessor], success", t), !this.userOnSuccess && t.transactionId && (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
4988
4930
  this.getForm(e)?.submit();
4989
4931
  }, 500)), this.userOnSuccess?.({ transactionId: t.transactionId });
4990
4932
  }),
4991
- onFailure: L(this, "[googlePayProcessor], failure", (e) => {
4933
+ onFailure: R(this, "[googlePayProcessor], failure", (e) => {
4992
4934
  this.log("[googlePayProcessor], failure", e), this.userOnFailure?.({ error: e.error });
4993
4935
  })
4994
4936
  });
@@ -5001,8 +4943,8 @@ var { hideSpinner: oi } = Oe(), si = {
5001
4943
  environment: this.environment,
5002
4944
  publicKey: this.publicKey,
5003
4945
  apiUrl: this.config.apiUrl,
5004
- version: Y.version,
5005
- onSuccess: L(this, "[applePayProcessor], success", (t) => {
4946
+ version: j.version,
4947
+ onSuccess: R(this, "[applePayProcessor], success", (t) => {
5006
4948
  this.log("[applePayProcessor], success", t), !this.userOnSuccess && t.transactionId ? (this._setToken(e, t.transactionId, "transactionId"), setTimeout(() => {
5007
4949
  this.getForm(e)?.submit();
5008
4950
  }, 500)) : !this.userOnSuccess && t.token ? (this._setToken(e, t.token), setTimeout(() => {
@@ -5012,7 +4954,7 @@ var { hideSpinner: oi } = Oe(), si = {
5012
4954
  token: t.token
5013
4955
  });
5014
4956
  }),
5015
- onFailure: L(this, "[applePayProcessor], failure", (e) => {
4957
+ onFailure: R(this, "[applePayProcessor], failure", (e) => {
5016
4958
  this.log("[applePayProcessor], failure", e), this.userOnFailure?.({ error: e.error });
5017
4959
  })
5018
4960
  });
@@ -5024,14 +4966,14 @@ var { hideSpinner: oi } = Oe(), si = {
5024
4966
  environment: this.environment,
5025
4967
  publicKey: this.publicKey,
5026
4968
  apiUrl: this.config.apiUrl,
5027
- version: Y.version,
4969
+ version: j.version,
5028
4970
  getPaymentOptions: this.getPaymentOptions.bind(this),
5029
- onSuccess: L(this, "[payToProcessor], success", (t) => {
4971
+ onSuccess: R(this, "[payToProcessor], success", (t) => {
5030
4972
  this.log("[payToProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
5031
4973
  this.userOnSuccess || this.getForm(e)?.submit();
5032
4974
  }, 500)), this.userOnSuccess?.({ token: t.token });
5033
4975
  }),
5034
- onFailure: L(this, "[payToProcessor], failure", (e) => {
4976
+ onFailure: R(this, "[payToProcessor], failure", (e) => {
5035
4977
  this.log("[payToProcessor], failure", e), this.userOnFailure?.({ error: e.error });
5036
4978
  })
5037
4979
  }), this.payToProcessor.setOnValidate(this.userOnValidate)), this.payToProcessor;
@@ -5043,16 +4985,16 @@ var { hideSpinner: oi } = Oe(), si = {
5043
4985
  publicKey: this.publicKey,
5044
4986
  apiUrl: this.config.apiUrl,
5045
4987
  cssUrl: this.config.cssUrl,
5046
- version: Y.version,
5047
- onSuccess: L(this, "[paymentMethodProcessor], success", (t) => {
4988
+ version: j.version,
4989
+ onSuccess: R(this, "[paymentMethodProcessor], success", (t) => {
5048
4990
  this.log("[paymentMethodProcessor], success", t), t.token && (this._setToken(e, t.token), setTimeout(() => {
5049
4991
  this.userOnSuccess || this.getForm(e)?.submit();
5050
4992
  }, 500)), this.userOnSuccess?.(t);
5051
4993
  }),
5052
- onFailure: L(this, "[paymentMethodProcessor], failure", (e) => {
4994
+ onFailure: R(this, "[paymentMethodProcessor], failure", (e) => {
5053
4995
  this.log("[paymentMethodProcessor], failure", e), this.userOnFailure?.({ error: e.error });
5054
4996
  }),
5055
- onValidationStatusChangeCallback: L(this, "[paymentMethodProcessor], ValidationStatusChange", (e, t) => {
4997
+ onValidationStatusChangeCallback: R(this, "[paymentMethodProcessor], ValidationStatusChange", (e, t) => {
5056
4998
  this.log("[paymentMethodProcessor], ValidationStatusChange", e, t), this.userOnValidationStatusChange?.(e, t);
5057
4999
  })
5058
5000
  }), this.initBaseProcessor(this.paymentMethodProcessor)), this.paymentMethodProcessor;
@@ -5098,7 +5040,7 @@ var { hideSpinner: oi } = Oe(), si = {
5098
5040
  t && !t.id && (t.id = "payfurl-form-" + Math.random().toString(36).slice(2, 9));
5099
5041
  let n = t?.id || e?.id || "container";
5100
5042
  if (this._submitFormHandlers[n]) return this._submitFormHandlers[n];
5101
- let r = L(this, "[getSubmitFormHandler][handler]", (t) => {
5043
+ let r = R(this, "[getSubmitFormHandler][handler]", (t) => {
5102
5044
  this.log("[sdk], submitForm", t), t.preventDefault();
5103
5045
  let n = this.getForm(e);
5104
5046
  (!n?.onsubmit || n.onsubmit(new SubmitEvent("submit"))) && (n && this.getInput(e, "token")?.value ? n.submit() : window.postMessage({ status: oe }, "*"));
@@ -5125,7 +5067,7 @@ var { hideSpinner: oi } = Oe(), si = {
5125
5067
  r?.currency && (r.currency = r?.currency.toUpperCase());
5126
5068
  let o = r?.currency || "";
5127
5069
  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) => {
5070
+ 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
5071
  let c = this.resolveThreeDsProvider(t, s), l = s.allThreeDsProviders?.[0], u = s.fraudProviders?.[0], d = {
5130
5072
  ...r,
5131
5073
  requiredFields: t.requiredFields,
@@ -5143,7 +5085,7 @@ var { hideSpinner: oi } = Oe(), si = {
5143
5085
  networkTokenOptions: r?.networkTokenOptions,
5144
5086
  vault: O(r?.vault),
5145
5087
  verifyCard: O(r?.verifyCard),
5146
- metadata: U(r?.metadata),
5088
+ metadata: W(r?.metadata),
5147
5089
  secureCardOrchestration: {
5148
5090
  enabled: !0,
5149
5091
  secureUrl: this.config.secureUrl,
@@ -5151,10 +5093,10 @@ var { hideSpinner: oi } = Oe(), si = {
5151
5093
  debug: this.debug,
5152
5094
  publicKey: this.publicKey,
5153
5095
  apiUrl: this.config.apiUrl,
5154
- version: Y.version,
5096
+ version: j.version,
5155
5097
  amount: a,
5156
5098
  currency: o,
5157
- metadata: U(r?.metadata),
5099
+ metadata: W(r?.metadata),
5158
5100
  billingAddress: this.billingAddress,
5159
5101
  customer: this.customer,
5160
5102
  order: this.order,
@@ -5190,7 +5132,7 @@ var { hideSpinner: oi } = Oe(), si = {
5190
5132
  this.showErrorMessage(i, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
5191
5133
  return;
5192
5134
  }
5193
- if (!R(o)) {
5135
+ if (!z(o)) {
5194
5136
  this.showErrorMessage(i, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" });
5195
5137
  return;
5196
5138
  }
@@ -5206,7 +5148,7 @@ var { hideSpinner: oi } = Oe(), si = {
5206
5148
  });
5207
5149
  let a = t && document.getElementById(t) || null;
5208
5150
  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) => {
5151
+ 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
5152
  let s = this.resolveThreeDsProvider(t, o), c = o.allThreeDsProviders?.[0], l = o.fraudProviders?.[0], u = {
5211
5153
  ...i,
5212
5154
  requiredFields: t.requiredFields,
@@ -5224,7 +5166,7 @@ var { hideSpinner: oi } = Oe(), si = {
5224
5166
  networkTokenOptions: i?.networkTokenOptions,
5225
5167
  vault: O(i?.vault),
5226
5168
  verifyCard: O(i?.verifyCard),
5227
- metadata: U(i?.metadata),
5169
+ metadata: W(i?.metadata),
5228
5170
  secureCardOrchestration: {
5229
5171
  enabled: !0,
5230
5172
  secureUrl: this.config.secureUrl,
@@ -5232,10 +5174,10 @@ var { hideSpinner: oi } = Oe(), si = {
5232
5174
  debug: this.debug,
5233
5175
  publicKey: this.publicKey,
5234
5176
  apiUrl: this.config.apiUrl,
5235
- version: Y.version,
5177
+ version: j.version,
5236
5178
  amount: n,
5237
5179
  currency: r,
5238
- metadata: U(i?.metadata),
5180
+ metadata: W(i?.metadata),
5239
5181
  billingAddress: this.billingAddress,
5240
5182
  customer: this.customer,
5241
5183
  order: this.order,
@@ -5271,7 +5213,7 @@ var { hideSpinner: oi } = Oe(), si = {
5271
5213
  this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" });
5272
5214
  return;
5273
5215
  }
5274
- if (!R(r)) {
5216
+ if (!z(r)) {
5275
5217
  this.showErrorMessage(a, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" });
5276
5218
  return;
5277
5219
  }
@@ -5295,7 +5237,7 @@ var { hideSpinner: oi } = Oe(), si = {
5295
5237
  createNetworkToken: r?.createNetworkToken,
5296
5238
  tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled || r?.clickToPayOptions?.tokenAuthenticationEnabled,
5297
5239
  networkTokenOptions: r?.networkTokenOptions || r?.clickToPayOptions?.networkTokenOptions
5298
- }, L(this, "[addDropIn][initProcessors], callback", async (a, c) => {
5240
+ }, R(this, "[addDropIn][initProcessors], callback", async (a, c) => {
5299
5241
  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
5242
  let l = [
5301
5243
  c.hasCardProviders,
@@ -5323,7 +5265,7 @@ var { hideSpinner: oi } = Oe(), si = {
5323
5265
  networkTokenOptions: r?.networkTokenOptions,
5324
5266
  vault: O(r?.vault),
5325
5267
  verifyCard: O(r?.verifyCard),
5326
- metadata: U(r?.metadata),
5268
+ metadata: W(r?.metadata),
5327
5269
  secureCardOrchestration: {
5328
5270
  enabled: !0,
5329
5271
  secureUrl: this.config.secureUrl,
@@ -5331,10 +5273,10 @@ var { hideSpinner: oi } = Oe(), si = {
5331
5273
  debug: this.debug,
5332
5274
  publicKey: this.publicKey,
5333
5275
  apiUrl: this.config.apiUrl,
5334
- version: Y.version,
5276
+ version: j.version,
5335
5277
  amount: t,
5336
5278
  currency: n,
5337
- metadata: U(r?.metadata),
5279
+ metadata: W(r?.metadata),
5338
5280
  billingAddress: this.billingAddress,
5339
5281
  customer: this.customer,
5340
5282
  order: this.order,
@@ -5369,11 +5311,11 @@ var { hideSpinner: oi } = Oe(), si = {
5369
5311
  paypalButtonStyle: null,
5370
5312
  paypalEnablePayIn4: !1,
5371
5313
  transfer: null,
5372
- metadata: U(r?.metadata)
5314
+ metadata: W(r?.metadata)
5373
5315
  }, p = {
5374
5316
  description: String(r?.payToDescription).trim() || String(c.payToProvidersWithOptions[0]?.description) || "",
5375
5317
  maximumAmount: r?.payToMaximumAmount || Number(c.payToProvidersWithOptions[0]?.maximumAmount) || 0,
5376
- metadata: U(r?.metadata)
5318
+ metadata: W(r?.metadata)
5377
5319
  }, m = {
5378
5320
  taxAmount: this.order?.taxAmount,
5379
5321
  shippingAmount: this.order?.shippingAmount,
@@ -5381,14 +5323,14 @@ var { hideSpinner: oi } = Oe(), si = {
5381
5323
  orderItems: this.order?.orderItems,
5382
5324
  customer: this.customer || void 0,
5383
5325
  billingAddress: this.billingAddress || void 0,
5384
- metadata: U(r?.metadata)
5326
+ metadata: W(r?.metadata)
5385
5327
  }, h = c.hasGooglePayProviders ? c.googlePayProviders.find((e) => e.providerId === r?.googlePayOptions?.providerId) || c.googlePayProviders[0] : null, g = {
5386
5328
  gateway: r?.googlePayOptions?.gateway || h?.gateway || "",
5387
5329
  googlePayGatewayMerchantId: r?.googlePayOptions?.googlePayGatewayMerchantId || h?.googlePayGatewayMerchantId || "",
5388
5330
  googlePayMerchantId: r?.googlePayOptions?.googlePayMerchantId || h?.googlePayMerchantId || "",
5389
5331
  googlePayMerchantName: r?.googlePayOptions?.googlePayMerchantName || h?.googlePayMerchantName || "",
5390
5332
  buttonOptions: r?.googlePayOptions?.buttonOptions,
5391
- metadata: U(r?.metadata)
5333
+ metadata: W(r?.metadata)
5392
5334
  }, _ = c.hasApplePayProviders ? c.applePayProviders.find((e) => e.providerId === r?.applePayOptions?.providerId) || c.applePayProviders[0] : null, v = {
5393
5335
  lineItemLabel: r?.applePayOptions?.lineItemLabel || _?.lineItemLabel || "",
5394
5336
  displayName: r?.applePayOptions?.displayName || _?.displayName || "",
@@ -5402,7 +5344,7 @@ var { hideSpinner: oi } = Oe(), si = {
5402
5344
  supportedCountries: r?.applePayOptions?.supportedCountries || _?.supportedCountries,
5403
5345
  applePayVersion: r?.applePayOptions?.applePayVersion || _?.applePayVersion,
5404
5346
  clientParameters: a.clientParameters,
5405
- metadata: U(r?.metadata)
5347
+ metadata: W(r?.metadata)
5406
5348
  };
5407
5349
  if (!l && c.hasCardProviders) {
5408
5350
  if (o(Q.card)) {
@@ -5540,7 +5482,7 @@ var { hideSpinner: oi } = Oe(), si = {
5540
5482
  }, "*");
5541
5483
  }
5542
5484
  });
5543
- let l = E({
5485
+ let l = ge({
5544
5486
  el: document.getElementById(e),
5545
5487
  component: vt,
5546
5488
  props: { elements: s }
@@ -5559,8 +5501,8 @@ var { hideSpinner: oi } = Oe(), si = {
5559
5501
  let o = t && document.getElementById(t) || null;
5560
5502
  if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5561
5503
  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) => {
5504
+ if (!z(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5505
+ 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
5506
  let s = t.paypalProviders[0] || i || "";
5565
5507
  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
5508
  })), this;
@@ -5575,20 +5517,20 @@ var { hideSpinner: oi } = Oe(), si = {
5575
5517
  if (!a) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5576
5518
  if (!e(n)) throw this.showErrorMessage(a, "Missing parameter: amount"), this.userOnFailure?.({ error: "Missing parameter: amount" }), TypeError("Missing parameter: amount");
5577
5519
  this._cleanUp(a), this._initForm(a), this.setAmount(n), this.setCurrency("AUD");
5578
- let o = L(this, "[localAddPayTo]", (e, t) => {
5520
+ let o = R(this, "[localAddPayTo]", (e, t) => {
5579
5521
  this.log("[addPayTo, local]", {
5580
5522
  amount: n,
5581
5523
  localProviderId: e,
5582
5524
  localOptions: t
5583
5525
  }), this.initPayToProcessor(a).addPayTo(a, n, e, t);
5584
5526
  });
5585
- return r && i?.maximumAmount && i?.description ? (o(r, i), this) : (this.initProcessors(a, n, "AUD", r || "", "", {}, L(this, "[addPayTo][initProcessors], callback", (e, t) => {
5527
+ return r && i?.maximumAmount && i?.description ? (o(r, i), this) : (this.initProcessors(a, n, "AUD", r || "", "", {}, R(this, "[addPayTo][initProcessors], callback", (e, t) => {
5586
5528
  if (!t.hasPayToProviders) return;
5587
5529
  let n = t.payToProvidersWithOptions[0];
5588
5530
  o(n.providerId, {
5589
5531
  maximumAmount: n.maximumAmount,
5590
5532
  description: n.description,
5591
- metadata: U(i?.metadata)
5533
+ metadata: W(i?.metadata)
5592
5534
  });
5593
5535
  })), this);
5594
5536
  }
@@ -5602,9 +5544,9 @@ var { hideSpinner: oi } = Oe(), si = {
5602
5544
  let o = t && document.getElementById(t) || null;
5603
5545
  if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5604
5546
  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");
5547
+ if (!z(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5606
5548
  r &&= r.toUpperCase(), this._cleanUp(o), this._initForm(o), this.setAmount(n), this.setCurrency(r);
5607
- let s = L(this, "[localAddGooglePay]", (e, t) => {
5549
+ let s = R(this, "[localAddGooglePay]", (e, t) => {
5608
5550
  this.log("[addGooglePay, local]", {
5609
5551
  amount: n,
5610
5552
  currency: r,
@@ -5612,7 +5554,7 @@ var { hideSpinner: oi } = Oe(), si = {
5612
5554
  localOptions: t
5613
5555
  }), this.initGooglePayProcessor(o).addGooglePay(o, e, n, r, t);
5614
5556
  });
5615
- return i && a?.gateway && a?.googlePayGatewayMerchantId ? (s(i, a), this) : (this.initProcessors(o, n, r, i || "", "", {}, L(this, "[addGooglePay][initProcessors], callback", (e, t) => {
5557
+ return i && a?.gateway && a?.googlePayGatewayMerchantId ? (s(i, a), this) : (this.initProcessors(o, n, r, i || "", "", {}, R(this, "[addGooglePay][initProcessors], callback", (e, t) => {
5616
5558
  if (!t.hasGooglePayProviders) return;
5617
5559
  let n = i && t.googlePayProviders.find((e) => e.providerId === i) || t.googlePayProviders[0];
5618
5560
  s(n.providerId, {
@@ -5621,7 +5563,7 @@ var { hideSpinner: oi } = Oe(), si = {
5621
5563
  googlePayMerchantId: n.googlePayMerchantId,
5622
5564
  googlePayMerchantName: n.googlePayMerchantName,
5623
5565
  buttonOptions: a?.buttonOptions,
5624
- metadata: U(a?.metadata)
5566
+ metadata: W(a?.metadata)
5625
5567
  });
5626
5568
  })), this);
5627
5569
  }
@@ -5634,7 +5576,7 @@ var { hideSpinner: oi } = Oe(), si = {
5634
5576
  }
5635
5577
  }
5636
5578
  addApplePay(e, t, n, r, i) {
5637
- return this.isApplePayAvailable().then(L(this, "[addApplePay], available", (a) => {
5579
+ return this.isApplePayAvailable().then(R(this, "[addApplePay], available", (a) => {
5638
5580
  a ? this.renderApplePay(e, t, n, r, i) : this.log("Your browser does not support ApplePay");
5639
5581
  })).catch(() => {}), this;
5640
5582
  }
@@ -5648,9 +5590,9 @@ var { hideSpinner: oi } = Oe(), si = {
5648
5590
  let o = t && document.getElementById(t) || null;
5649
5591
  if (!o) throw this.userOnFailure?.({ error: "Container is not available" }), TypeError("Container is not available");
5650
5592
  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");
5593
+ if (!z(r)) throw this.showErrorMessage(o, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5652
5594
  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) => {
5595
+ let s = R(this, "[localAddApplePay]", (e, t, i, a) => {
5654
5596
  this.log("[addApplePay, local]", {
5655
5597
  amount: n,
5656
5598
  currency: r,
@@ -5663,7 +5605,7 @@ var { hideSpinner: oi } = Oe(), si = {
5663
5605
  clientParameters: a
5664
5606
  });
5665
5607
  });
5666
- this.initProcessors(o, n, r, i || "", "", {}, L(this, "[addApplePay][initProcessors], callback", (e, t) => {
5608
+ this.initProcessors(o, n, r, i || "", "", {}, R(this, "[addApplePay][initProcessors], callback", (e, t) => {
5667
5609
  if (!t.hasApplePayProviders) return;
5668
5610
  let n = i && t.applePayProviders.find((e) => e.providerId === i) || t.applePayProviders[0];
5669
5611
  s(n.providerId, n.providerType, {
@@ -5678,7 +5620,7 @@ var { hideSpinner: oi } = Oe(), si = {
5678
5620
  supportedNetworks: a?.supportedNetworks || n.supportedNetworks,
5679
5621
  supportedCountries: a?.supportedCountries || n.supportedCountries,
5680
5622
  applePayVersion: a?.applePayVersion || n.applePayVersion,
5681
- metadata: U(a?.metadata)
5623
+ metadata: W(a?.metadata)
5682
5624
  }, e.clientParameters || n.clientParameters);
5683
5625
  }));
5684
5626
  }
@@ -5723,7 +5665,7 @@ var { hideSpinner: oi } = Oe(), si = {
5723
5665
  orderItems: a,
5724
5666
  customer: o,
5725
5667
  billingAddress: s,
5726
- metadata: U(r?.metadata)
5668
+ metadata: W(r?.metadata)
5727
5669
  };
5728
5670
  return this.initCheckoutProcessor(i).addCheckout(i, t, this.currency, "upi", n, c, {
5729
5671
  documentId: r.documentId,
@@ -5748,9 +5690,9 @@ var { hideSpinner: oi } = Oe(), si = {
5748
5690
  });
5749
5691
  let u = t && document.getElementById(t) || null;
5750
5692
  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", () => {
5693
+ if (!z(s)) throw this.showErrorMessage(u, "Missing parameter: currency"), this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5694
+ 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) => {
5695
+ e.hasThreeDsProviders ? this.add3DsProcessor(u, e.threeDsProviders[0].providerId, e.threeDsProviders[0].providerType, "", e.threeDsProviders[0].clientParameters || {}, R(this, "[addThreeDsWithFullParameters][add3DsProcessor], onload", () => {
5754
5696
  this.threeDsProcessor?.setEmail(a), this.threeDsProcessor?.setPaymentInfo({
5755
5697
  cardNumber: n,
5756
5698
  expiryDate: r,
@@ -5759,7 +5701,7 @@ var { hideSpinner: oi } = Oe(), si = {
5759
5701
  }), this.threeDsProcessor?.threeDSInvoke(u, !!l?.requireChallenge, (e) => {
5760
5702
  oi(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID });
5761
5703
  });
5762
- }), L(this, "[addThreeDsWithFullParameters][add3DsProcessor], onerror", () => {
5704
+ }), R(this, "[addThreeDsWithFullParameters][add3DsProcessor], onerror", () => {
5763
5705
  this.log(`Cannot load 3DS provider (${e.threeDsProviders[0].providerType})`), this.userOnSuccess?.({});
5764
5706
  })) : (this.log("No 3DS providers found"), this.userOnSuccess?.({}));
5765
5707
  })), this;
@@ -5780,13 +5722,13 @@ var { hideSpinner: oi } = Oe(), si = {
5780
5722
  let f = t && document.getElementById(t) || null;
5781
5723
  if (!D(n)) throw this.showErrorMessage(f, "Missing parameter: providerId"), this.userOnFailure?.({ error: "Missing parameter: Provider Id" }), TypeError("Missing parameter: providerId");
5782
5724
  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");
5725
+ if (!z(l)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5784
5726
  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
5727
  createNetworkToken: d?.createNetworkToken,
5786
5728
  clickToPayEnabled: !1
5787
- }, L(this, "[tokeniseWith3Ds][initProcessors], callback", (e, t) => {
5729
+ }, R(this, "[tokeniseWith3Ds][initProcessors], callback", (e, t) => {
5788
5730
  let s = (e) => {
5789
- this.tokeniseCard(n, r, i, a, o, U(u), e, d);
5731
+ this.tokeniseCard(n, r, i, a, o, W(u), e, d);
5790
5732
  };
5791
5733
  this.threeDsProcessor ? (this.threeDsProcessor?.setPaymentInfo({
5792
5734
  cardNumber: r,
@@ -5806,7 +5748,7 @@ var { hideSpinner: oi } = Oe(), si = {
5806
5748
  cardHolderName: r,
5807
5749
  options: s,
5808
5750
  metadata: a
5809
- }), t = Ye(t), this.initCardProcessor(null).tokeniseCard(e, t, n, r, i, U(a), o, s), this;
5751
+ }), t = Ye(t), this.initCardProcessor(null).tokeniseCard(e, t, n, r, i, W(a), o, s), this;
5810
5752
  }
5811
5753
  addThreeDsWithToken(t, n, r, i, a, o) {
5812
5754
  if (this.log("[addThreeDsWithToken]", {
@@ -5817,8 +5759,8 @@ var { hideSpinner: oi } = Oe(), si = {
5817
5759
  options: o
5818
5760
  }), !D(t)) throw this.userOnFailure?.({ error: "Missing parameter: Token Id" }), TypeError("Missing parameter: tokenId");
5819
5761
  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", () => {
5762
+ if (!z(i)) throw this.userOnFailure?.({ error: "Missing parameter: currency" }), TypeError("Missing parameter: currency");
5763
+ return i &&= i.toUpperCase(), this.setAmount(r), this.setCurrency(i), this.initProcessors(null, r, i, "", t, { clickToPayEnabled: !1 }, R(this, "[addThreeDsWithToken][initProcessors], callback", () => {
5822
5764
  this.threeDsProcessor ? (this.threeDsProcessor?.setEmail(n), this.threeDsProcessor?.setTokenId(t), this.threeDsProcessor?.threeDSInvoke(null, !!o?.requireChallenge, (e) => {
5823
5765
  oi(), this.log("[threeDSInvoke], postAuthData", e), this.userOnSuccess?.({ threeDSServerTransID: e.threeDSServerTransID }), this.threeDsProcessor?.updateTokenExternal3dsData(e.externalThreeDsData);
5824
5766
  }), this.threeDsProcessor?.setPaymentInfo({
@@ -5839,9 +5781,9 @@ var { hideSpinner: oi } = Oe(), si = {
5839
5781
  n?.(this.paymentOptions[r]);
5840
5782
  return;
5841
5783
  }
5842
- let i = L(this, "[getPaymentOptions], failure", (e, t) => {
5784
+ let i = R(this, "[getPaymentOptions], failure", (e, t) => {
5843
5785
  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) => {
5786
+ }), a = R(this, "[getPaymentOptions], success", (e, t) => {
5845
5787
  let i = JSON.parse(t);
5846
5788
  this.log("[getPaymentOptions], success", i), this.paymentOptions[r] = i, n?.(i);
5847
5789
  });
@@ -5859,9 +5801,9 @@ var { hideSpinner: oi } = Oe(), si = {
5859
5801
  i?.(this.paymentOptions[o]);
5860
5802
  return;
5861
5803
  }
5862
- let s = L(this, "[getProviderInfo], error", (e, t) => {
5804
+ let s = R(this, "[getProviderInfo], error", (e, t) => {
5863
5805
  this.log("[getProviderInfo], error", e, t), a({ error: "Unable to get provider information" });
5864
- }), c = L(this, "[getProviderInfo], success", (e, t) => {
5806
+ }), c = R(this, "[getProviderInfo], success", (e, t) => {
5865
5807
  this.log("[getProviderInfo], success", e, t);
5866
5808
  let n = JSON.parse(t);
5867
5809
  this.log("[getProviderInfo], data", n), this.paymentOptions[o] = n, i(n);
@@ -5900,7 +5842,7 @@ var { hideSpinner: oi } = Oe(), si = {
5900
5842
  return this;
5901
5843
  }
5902
5844
  showErrorMessage(e, t) {
5903
- this.log(t), P(e, t);
5845
+ this.log(t), F(e, t);
5904
5846
  }
5905
5847
  setBillingAddress(e) {
5906
5848
  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 +5889,40 @@ var { hideSpinner: oi } = Oe(), si = {
5947
5889
  }
5948
5890
  this.initProcessorsHandlers.push(o);
5949
5891
  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) => {
5892
+ this.getProviderInfo(r, t, n, i || "", R(this, "[getProviderInfo], success", (t) => {
5951
5893
  s = { ...t }, !v && t.threeDsProviderId && (f = t.threeDsProviderId, p = t.threeDsProviderType, m = t.threeDsClientParameters || {}), e();
5952
- }), L(this, "[getProviderInfo], error", (t) => {
5894
+ }), R(this, "[getProviderInfo], error", (t) => {
5953
5895
  this.log("Unable to get provider information", t), e();
5954
5896
  }));
5955
- }, b = L(this, "[initFraudProcessor]", (e, t, n, r, i) => {
5956
- !e || !t ? i() : this.addFraudProcessor(e, t, n, r, {}, L(this, "[addFraudProcessor], success", () => {
5897
+ }, b = R(this, "[initFraudProcessor]", (e, t, n, r, i) => {
5898
+ !e || !t ? i() : this.addFraudProcessor(e, t, n, r, {}, R(this, "[addFraudProcessor], success", () => {
5957
5899
  i();
5958
- }), L(this, "[addFraudProcessor], error", () => {
5900
+ }), R(this, "[addFraudProcessor], error", () => {
5959
5901
  this.log("Error loading fraud provider", t), i();
5960
5902
  }));
5961
- }), x = L(this, "[initThreeDsProcessor]", (t, n, i) => {
5903
+ }), x = R(this, "[initThreeDsProcessor]", (t, n, i) => {
5962
5904
  !t || !n ? i() : this.add3DsProcessor(e, t, n, r, {
5963
5905
  ...s.clientParameters,
5964
5906
  ...m
5965
- }, L(this, "[add3DsProcessor], success", () => {
5907
+ }, R(this, "[add3DsProcessor], success", () => {
5966
5908
  i();
5967
- }), L(this, "[add3DsProcessor], error", () => {
5909
+ }), R(this, "[add3DsProcessor], error", () => {
5968
5910
  this.log("Error loading 3ds provider", n), i();
5969
5911
  }));
5970
- }), S = L(this, "[initSecondaryThreeDsProcessor]", (t, n, i) => {
5912
+ }), S = R(this, "[initSecondaryThreeDsProcessor]", (t, n, i) => {
5971
5913
  !t || !n ? i() : this.addSecondary3DsProcessor(e, t, n, r, {
5972
5914
  ...s.clientParameters,
5973
5915
  ..._
5974
- }, L(this, "[addSecondary3DsProcessor], success", () => {
5916
+ }, R(this, "[addSecondary3DsProcessor], success", () => {
5975
5917
  i();
5976
- }), L(this, "[addSecondary3DsProcessor], error", () => {
5918
+ }), R(this, "[addSecondary3DsProcessor], error", () => {
5977
5919
  this.log("Error loading 3ds provider", n), i();
5978
5920
  }));
5979
- }), ee = L(this, "[callCallbackHandlers]", (e, t) => {
5921
+ }), ee = R(this, "[callCallbackHandlers]", (e, t) => {
5980
5922
  for (let n of this.initProcessorsHandlers) n(e, t);
5981
5923
  this.initProcessorsHandlers = [];
5982
5924
  });
5983
- this.getPaymentOptions(t, n, L(this, "[getPaymentOptions], callback", (t) => {
5925
+ this.getPaymentOptions(t, n, R(this, "[getPaymentOptions], callback", (t) => {
5984
5926
  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
5927
  ...t.clickToPayOptions,
5986
5928
  ...a?.clickToPayOptions,
@@ -6010,7 +5952,7 @@ var { hideSpinner: oi } = Oe(), si = {
6010
5952
  billingAddress: this.billingAddress,
6011
5953
  customer: this.customer,
6012
5954
  order: this.order
6013
- }), a?.()) : ai(t).then(L(this, "[addFraudProcessor], onload", (o) => {
5955
+ }), a?.()) : ai(t).then(R(this, "[addFraudProcessor], onload", (o) => {
6014
5956
  this.log(`Loading ${t}...`, o);
6015
5957
  let s = o.default(r);
6016
5958
  s?.getFraudCheckData && (this.fraudProcessor = new On(this.log.bind(this), {
@@ -6018,7 +5960,7 @@ var { hideSpinner: oi } = Oe(), si = {
6018
5960
  environment: this.environment,
6019
5961
  publicKey: this.publicKey,
6020
5962
  apiUrl: this.config.apiUrl,
6021
- version: Y.version,
5963
+ version: j.version,
6022
5964
  providerId: e,
6023
5965
  stopPaymentOnFailure: n,
6024
5966
  metadata: i,
@@ -6030,7 +5972,7 @@ var { hideSpinner: oi } = Oe(), si = {
6030
5972
  this.log("[fraudProcessor], failure", e);
6031
5973
  }
6032
5974
  }), 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) => {
5975
+ })).catch(R(this, "[addFraudProcessor], onerror", (e) => {
6034
5976
  this.log(`Error loading ${t}`, e), o?.();
6035
5977
  }));
6036
5978
  }
@@ -6042,19 +5984,19 @@ var { hideSpinner: oi } = Oe(), si = {
6042
5984
  } : t.threeDsProviders?.find((e) => e.providerId === t.required3dsProvider) || t.threeDsProviders?.[0];
6043
5985
  }
6044
5986
  add3DsProcessor(e, t, n, r, i, a, o) {
6045
- this.log("[add3DsProcessor]", t, n), ii(n).then(L(this, "[add3DsProcessor], onload", (o) => {
5987
+ this.log("[add3DsProcessor]", t, n), ii(n).then(R(this, "[add3DsProcessor], onload", (o) => {
6046
5988
  this.log(`Loading ${n}...`, o);
6047
5989
  let s = o.default(this.log.bind(this), e, {
6048
5990
  environment: this.environment,
6049
5991
  apiUrl: this.config.apiUrl,
6050
5992
  clientParameters: i
6051
5993
  });
6052
- s?.setThreeDsProcessor && (this.threeDsProcessor = new V(this.log.bind(this), {
5994
+ s?.setThreeDsProcessor && (this.threeDsProcessor = new H(this.log.bind(this), {
6053
5995
  debug: this.debug,
6054
5996
  environment: this.environment,
6055
5997
  publicKey: this.publicKey,
6056
5998
  apiUrl: this.config.apiUrl,
6057
- version: Y.version,
5999
+ version: j.version,
6058
6000
  providerId: t,
6059
6001
  cardProviderId: r,
6060
6002
  threeDsInvoker: {
@@ -6069,24 +6011,24 @@ var { hideSpinner: oi } = Oe(), si = {
6069
6011
  this.log("[threeDsProcessor], failure", e), this.userOnFailure?.({ error: e.error });
6070
6012
  }
6071
6013
  }), 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) => {
6014
+ })).catch(R(this, "[add3DsProcessor], onerror", (s) => {
6073
6015
  this.log(`Error loading ${n}`, s), n === "default" ? o?.() : this.add3DsProcessor(e, t, "default", r, i, a, o);
6074
6016
  }));
6075
6017
  }
6076
6018
  addSecondary3DsProcessor(e, t, n, r, i, a, o) {
6077
- this.log("[addSecondary3DsProcessor]", t, n), ii(n).then(L(this, "[addSecondary3DsProcessor], onload", (o) => {
6019
+ this.log("[addSecondary3DsProcessor]", t, n), ii(n).then(R(this, "[addSecondary3DsProcessor], onload", (o) => {
6078
6020
  this.log(`Loading ${n}...`, o);
6079
6021
  let s = o.default(this.log.bind(this), e, {
6080
6022
  environment: this.environment,
6081
6023
  apiUrl: this.config.apiUrl,
6082
6024
  clientParameters: i
6083
6025
  });
6084
- s?.setThreeDsProcessor && (this.secondaryThreeDsProcessor = new V(this.log.bind(this), {
6026
+ s?.setThreeDsProcessor && (this.secondaryThreeDsProcessor = new H(this.log.bind(this), {
6085
6027
  debug: this.debug,
6086
6028
  environment: this.environment,
6087
6029
  publicKey: this.publicKey,
6088
6030
  apiUrl: this.config.apiUrl,
6089
- version: Y.version,
6031
+ version: j.version,
6090
6032
  providerId: t,
6091
6033
  cardProviderId: r,
6092
6034
  threeDsInvoker: {
@@ -6101,7 +6043,7 @@ var { hideSpinner: oi } = Oe(), si = {
6101
6043
  this.log("[secondaryThreeDsProcessor], failure", e), this.userOnFailure?.({ error: e.error });
6102
6044
  }
6103
6045
  }), 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) => {
6046
+ })).catch(R(this, "[addSecondary3DsProcessor], onerror", (s) => {
6105
6047
  this.log(`Error loading ${n}`, s), n === "default" ? o?.() : this.addSecondary3DsProcessor(e, t, "default", r, i, a, o);
6106
6048
  }));
6107
6049
  }
@@ -6110,7 +6052,7 @@ var { hideSpinner: oi } = Oe(), si = {
6110
6052
  clickToPayOptions: e,
6111
6053
  tokenAuthenticationEnabled: e?.tokenAuthenticationEnabled,
6112
6054
  networkTokenOptions: e?.networkTokenOptions
6113
- }, L(this, "[preloadClickToPay], callback", (t, n) => {
6055
+ }, R(this, "[preloadClickToPay], callback", (t, n) => {
6114
6056
  n.clickToPayEnabled && this.initClickToPayProcessor(null, {
6115
6057
  ...n.clickToPayOptions,
6116
6058
  ...e
@@ -6127,7 +6069,7 @@ var { hideSpinner: oi } = Oe(), si = {
6127
6069
  if (!D(n)) throw this.showErrorMessage(i, "Missing parameter: customerId"), this.userOnFailure?.({ error: "Missing parameter: Customer Id" }), TypeError("Missing parameter: customerId");
6128
6070
  let a = Number(r?.amount) || 0, o = r?.currency || "";
6129
6071
  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) => {
6072
+ 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
6073
  let s = {
6132
6074
  ...r,
6133
6075
  tokenAuthenticationEnabled: r?.tokenAuthenticationEnabled && t.hasNetworkTokenProviders,
@@ -6147,7 +6089,7 @@ var { hideSpinner: oi } = Oe(), si = {
6147
6089
  }), t;
6148
6090
  }
6149
6091
  };
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);
6092
+ 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
6093
  //#endregion
6152
6094
  //#region src/sdk/main.ts
6153
6095
  var li = new $();