@bootpay/client-js 5.2.0-beta.13 → 5.2.0-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -15,8 +15,8 @@ const te = {
15
15
  }), re = (r) => {
16
16
  let e = !1;
17
17
  return typeof r == "string" || Array.isArray(r) ? e = r.length === 0 : e = r == null || tt(r, "object") && r.constructor === Object && Object.keys(r).length === 0, e;
18
- }, M = (r) => !re(r), tt = (r, e) => typeof r === e, Rs = (r, e = void 0) => {
19
- if (M(e)) {
18
+ }, q = (r) => !re(r), tt = (r, e) => typeof r === e, Rs = (r, e = void 0) => {
19
+ if (q(e)) {
20
20
  const t = typeof e != "string" ? new URLSearchParams(JSON.parse(JSON.stringify(e))).toString() : e;
21
21
  return /\?/.test(r) ? `${r}&${t}` : `${r}?${t}`;
22
22
  } else
@@ -27,7 +27,7 @@ const te = {
27
27
  return r;
28
28
  };
29
29
  var N = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
30
- function qe(r) {
30
+ function Me(r) {
31
31
  return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
32
32
  }
33
33
  function Ts(r) {
@@ -567,7 +567,7 @@ function z() {
567
567
  });
568
568
  })(Jr);
569
569
  var Ls = Jr.exports;
570
- const K0 = /* @__PURE__ */ qe(Ls);
570
+ const K0 = /* @__PURE__ */ Me(Ls);
571
571
  var bt = { exports: {} }, G0;
572
572
  function Ce() {
573
573
  return G0 || (G0 = 1, function(r, e) {
@@ -643,9 +643,9 @@ function Ce() {
643
643
  });
644
644
  }(bt)), bt.exports;
645
645
  }
646
- var qs = Ce();
647
- const ke = /* @__PURE__ */ qe(qs);
648
- class Me {
646
+ var Ms = Ce();
647
+ const ke = /* @__PURE__ */ Me(Ms);
648
+ class qe {
649
649
  $blank(e) {
650
650
  return re(e);
651
651
  }
@@ -704,7 +704,7 @@ const Je = {
704
704
  this.level <= Je.error && console.error(this.messageStringify(r, e));
705
705
  }
706
706
  };
707
- class Ms extends Me {
707
+ class qs extends qe {
708
708
  constructor() {
709
709
  super(), this.$storage = {};
710
710
  }
@@ -791,7 +791,7 @@ class Ms extends Me {
791
791
  }
792
792
  }
793
793
  }
794
- class Ws extends Ms {
794
+ class Ws extends qs {
795
795
  constructor() {
796
796
  super(), this.currentUserUUID();
797
797
  }
@@ -861,7 +861,7 @@ class Ws extends Ms {
861
861
  }
862
862
  }
863
863
  }
864
- const Se = new Ws(), zs = "@bootpay/client-js", js = "5.2.0-beta.13", Ks = "dist/index.mjs", Gs = {
864
+ const Se = new Ws(), zs = "@bootpay/client-js", js = "5.2.0-beta.15", Ks = "dist/index.mjs", Gs = {
865
865
  ".": {
866
866
  import: "./dist/index.mjs",
867
867
  types: "./dist/index.d.ts"
@@ -1027,19 +1027,19 @@ const De = {
1027
1027
  return re(De.__BOOTPAY_NAMESPACE) && (De.__BOOTPAY_NAMESPACE = {}), this.addEventListener(r.split(".")[0], e, t || !1), De.__BOOTPAY_NAMESPACE[r] = e, this;
1028
1028
  },
1029
1029
  off(r) {
1030
- return M(De.__BOOTPAY_NAMESPACE) && M(De.__BOOTPAY_NAMESPACE[r]) && this.removeEventListener(r.split(".")[0], De.__BOOTPAY_NAMESPACE[r]), this;
1030
+ return q(De.__BOOTPAY_NAMESPACE) && q(De.__BOOTPAY_NAMESPACE[r]) && this.removeEventListener(r.split(".")[0], De.__BOOTPAY_NAMESPACE[r]), this;
1031
1031
  }
1032
1032
  };
1033
- class lt extends Me {
1033
+ class lt extends qe {
1034
1034
  constructor(e) {
1035
1035
  super(), this.$resolve = null, this.$reject = null, this.$messageEventName = (e == null ? void 0 : e.messageEventName) ?? "message.BootpayEvent", this.$eventHooks = (e == null ? void 0 : e.messageEventHooks) ?? {}, this.afterBind = e == null ? void 0 : e.afterBind, De.initialize();
1036
1036
  }
1037
1037
  bind(e, t) {
1038
1038
  this.$messageEventName && window.resetBootpayEventListener(this.$messageEventName, (s) => {
1039
1039
  const i = this.parseEvent(s.data);
1040
- if (U.debug("event received", JSON.stringify(i)), M(i) && M(i.event)) {
1040
+ if (U.debug("event received", JSON.stringify(i)), q(i) && q(i.event)) {
1041
1041
  const n = this.hookFunction(i.hook);
1042
- if (M(n) && M(n[i.event]))
1042
+ if (q(n) && q(n[i.event]))
1043
1043
  return n[i.event](i.data, this);
1044
1044
  U.debug("event", `${this.$messageEventName}: ${i.event} is not defined`);
1045
1045
  }
@@ -1049,10 +1049,10 @@ class lt extends Me {
1049
1049
  return this.$eventHooks[e];
1050
1050
  }
1051
1051
  reject(e) {
1052
- M(this.$reject) && this.$reject(e);
1052
+ q(this.$reject) && this.$reject(e);
1053
1053
  }
1054
1054
  resolve(e) {
1055
- M(this.$resolve) && this.$resolve(e);
1055
+ q(this.$resolve) && this.$resolve(e);
1056
1056
  }
1057
1057
  /**
1058
1058
  * 함수를 class instnace variables에 넣는다
@@ -1084,7 +1084,7 @@ class lt extends Me {
1084
1084
  }
1085
1085
  }
1086
1086
  const Qe = (r) => typeof r == "string" ? r.toUpperCase() : r instanceof Error ? r.message : r;
1087
- class Ae extends Me {
1087
+ class Ae extends qe {
1088
1088
  constructor(e = {}) {
1089
1089
  super();
1090
1090
  const { iframeId: t = "bootpay-iframe", template: s = this.defaultIframeHtml(), el: i = void 0 } = e;
@@ -1708,7 +1708,7 @@ var $t, sr;
1708
1708
  function Ni() {
1709
1709
  return sr || (sr = 1, $t = null), $t;
1710
1710
  }
1711
- var Z = ee, ir = Di, nr = We, Li = ns, qi = os, Mi = {
1711
+ var Z = ee, ir = Di, nr = We, Li = ns, Mi = os, qi = {
1712
1712
  "Content-Type": "application/x-www-form-urlencoded"
1713
1713
  };
1714
1714
  function or(r, e) {
@@ -1741,7 +1741,7 @@ var ft = {
1741
1741
  var s = Z.isObject(e), i = t && t["Content-Type"], n;
1742
1742
  if ((n = Z.isFileList(e)) || s && i === "multipart/form-data") {
1743
1743
  var y = this.env && this.env.FormData;
1744
- return qi(n ? { "files[]": e } : e, y && new y());
1744
+ return Mi(n ? { "files[]": e } : e, y && new y());
1745
1745
  } else if (s || i === "application/json")
1746
1746
  return or(t, "application/json"), zi(e);
1747
1747
  return e;
@@ -1782,7 +1782,7 @@ Z.forEach(["delete", "get", "head"], function(e) {
1782
1782
  ft.headers[e] = {};
1783
1783
  });
1784
1784
  Z.forEach(["post", "put", "patch"], function(e) {
1785
- ft.headers[e] = Z.merge(Mi);
1785
+ ft.headers[e] = Z.merge(qi);
1786
1786
  });
1787
1787
  var D0 = ft, ji = ee, Ki = D0, Gi = function(e, t, s) {
1788
1788
  var i = this || Ki;
@@ -2115,7 +2115,7 @@ ae.isAxiosError = an();
2115
2115
  B0.exports = ae;
2116
2116
  B0.exports.default = ae;
2117
2117
  var ln = B0.exports, un = ln;
2118
- const Ze = /* @__PURE__ */ qe(un);
2118
+ const Ze = /* @__PURE__ */ Me(un);
2119
2119
  var Ut = { exports: {} }, Ht = { exports: {} }, yr;
2120
2120
  function we() {
2121
2121
  return yr || (yr = 1, function(r, e) {
@@ -2226,7 +2226,7 @@ function fs() {
2226
2226
  });
2227
2227
  }(Lt)), Lt.exports;
2228
2228
  }
2229
- var qt = { exports: {} }, Er;
2229
+ var Mt = { exports: {} }, Er;
2230
2230
  function k0() {
2231
2231
  return Er || (Er = 1, function(r, e) {
2232
2232
  (function(t, s) {
@@ -2302,7 +2302,7 @@ function k0() {
2302
2302
  });
2303
2303
  })();
2304
2304
  });
2305
- }(qt)), qt.exports;
2305
+ }(Mt)), Mt.exports;
2306
2306
  }
2307
2307
  var gr;
2308
2308
  function Fe() {
@@ -2367,7 +2367,7 @@ function Fe() {
2367
2367
  });
2368
2368
  }(Nt)), Nt.exports;
2369
2369
  }
2370
- var Mt = { exports: {} }, br;
2370
+ var qt = { exports: {} }, br;
2371
2371
  function Q() {
2372
2372
  return br || (br = 1, function(r, e) {
2373
2373
  (function(t, s, i) {
@@ -2903,7 +2903,7 @@ function Q() {
2903
2903
  });
2904
2904
  }();
2905
2905
  });
2906
- }(Mt)), Mt.exports;
2906
+ }(qt)), qt.exports;
2907
2907
  }
2908
2908
  var Br;
2909
2909
  function hs() {
@@ -2966,7 +2966,7 @@ function hs() {
2966
2966
  }(Ut)), Ut.exports;
2967
2967
  }
2968
2968
  var pn = hs();
2969
- const rt = /* @__PURE__ */ qe(pn);
2969
+ const rt = /* @__PURE__ */ Me(pn);
2970
2970
  class ye {
2971
2971
  constructor() {
2972
2972
  this.$http = Ze.create({
@@ -2991,7 +2991,7 @@ class ye {
2991
2991
  }
2992
2992
  static objectKeyToUnderscore(e) {
2993
2993
  let t;
2994
- return M(e) && (Array.isArray(e) ? (t = [], e.forEach((s) => {
2994
+ return q(e) && (Array.isArray(e) ? (t = [], e.forEach((s) => {
2995
2995
  let i = {};
2996
2996
  Object.keys(s).forEach((n) => {
2997
2997
  i[this.toUnderscore(n)] = s[n];
@@ -3002,7 +3002,7 @@ class ye {
3002
3002
  }
3003
3003
  static objectKeyToCamel(e) {
3004
3004
  let t;
3005
- return M(e) && (Array.isArray(e) ? (t = [], e.forEach((s) => {
3005
+ return q(e) && (Array.isArray(e) ? (t = [], e.forEach((s) => {
3006
3006
  let i = {};
3007
3007
  Object.keys(s).forEach((n) => {
3008
3008
  i[this.toCamelcase(n)] = s[n];
@@ -3012,8 +3012,8 @@ class ye {
3012
3012
  }))), t;
3013
3013
  }
3014
3014
  static axiosMultipayConfigure() {
3015
- Ze.defaults.headers.common["Content-Type"] = "application/json", Ze.defaults.headers.common.Accept = "application/json", Ze.interceptors.request.use((e) => (M(e.data), this.isHttpBodyUsedMethod(e.method) && (e.data = ye.encryptParams(ye.objectKeyToUnderscore(e.data))), e.headers !== void 0 && M(e.headers.progress) && delete e.headers.progress, e), (e) => Promise.reject(e)), Ze.interceptors.response.use((e) => e, function(e) {
3016
- if (M(e.response)) {
3015
+ Ze.defaults.headers.common["Content-Type"] = "application/json", Ze.defaults.headers.common.Accept = "application/json", Ze.interceptors.request.use((e) => (q(e.data), this.isHttpBodyUsedMethod(e.method) && (e.data = ye.encryptParams(ye.objectKeyToUnderscore(e.data))), e.headers !== void 0 && q(e.headers.progress) && delete e.headers.progress, e), (e) => Promise.reject(e)), Ze.interceptors.response.use((e) => e, function(e) {
3016
+ if (q(e.response)) {
3017
3017
  let t = e.response.data;
3018
3018
  return t.status = e.response.status, Promise.reject(t);
3019
3019
  } else
@@ -3066,7 +3066,7 @@ class vn extends lt {
3066
3066
  bind(e, t) {
3067
3067
  this.isDone = !1, this.setCallbackFunction(e, t), window.resetBootpayEventListener(this.$messageEventName, (s) => {
3068
3068
  const i = this.parseEvent(s.data);
3069
- if (U.debug("event received", JSON.stringify(i)), M(i))
3069
+ if (U.debug("event received", JSON.stringify(i)), q(i))
3070
3070
  switch (U.debug("event", i), i.event) {
3071
3071
  case "error":
3072
3072
  case "cancel":
@@ -3242,8 +3242,8 @@ class yn extends ye {
3242
3242
  }
3243
3243
  send(e) {
3244
3244
  try {
3245
- if (M(this.$applicationId))
3246
- return e.application_id = this.$applicationId, e.status = M(e.status) ? e.status : 1, e.version = _e.version, e.tk = this.$tk, U.debug("send event", `${JSON.stringify(e)} 전송됨`), this.$http.post(
3245
+ if (q(this.$applicationId))
3246
+ return e.application_id = this.$applicationId, e.status = q(e.status) ? e.status : 1, e.version = _e.version, e.tk = this.$tk, U.debug("send event", `${JSON.stringify(e)} 전송됨`), this.$http.post(
3247
3247
  O.toAnalytics("event"),
3248
3248
  e
3249
3249
  );
@@ -3263,7 +3263,7 @@ class yn extends ye {
3263
3263
  * @date: 2022-05-13
3264
3264
  */
3265
3265
  sendCloseEvent() {
3266
- if (M(this.$receiptId))
3266
+ if (q(this.$receiptId))
3267
3267
  try {
3268
3268
  return this.$http.put(O.toApi(`close/${this.$receiptId}`));
3269
3269
  } catch (e) {
@@ -3378,7 +3378,7 @@ const et = new yn(), S0 = {
3378
3378
  },
3379
3379
  getLocaleMessage: (r, e) => {
3380
3380
  const s = r.split(".").reduce((i, n) => i[n], S0);
3381
- return M(s) && M(s[e]) ? s[e] : s.ko;
3381
+ return q(s) && q(s[e]) ? s[e] : s.ko;
3382
3382
  }
3383
3383
  };
3384
3384
  class mn extends Ae {
@@ -3702,7 +3702,7 @@ class mn extends Ae {
3702
3702
  return this.modeApiUrl[this.mode];
3703
3703
  }
3704
3704
  }
3705
- const W = new mn(), $e = class $e extends Me {
3705
+ const W = new mn(), $e = class $e extends qe {
3706
3706
  constructor() {
3707
3707
  super(), this.$session = Se, this.$logger = U, this.$event = et, this.platformType = te.PLATFORM.JS, this.$transactionKey = "", this.extra = {}, this.browserBootpayFilter = {
3708
3708
  instagram: /Instagram/i,
@@ -4007,7 +4007,7 @@ const W = new mn(), $e = class $e extends Me {
4007
4007
  * @param price: number
4008
4008
  */
4009
4009
  static invalidRequestItemsData(e, t) {
4010
- if (e !== void 0 && M(e)) {
4010
+ if (e !== void 0 && q(e)) {
4011
4011
  let s = 0;
4012
4012
  if (e.forEach((i, n) => {
4013
4013
  if (re(i.id))
@@ -4073,7 +4073,7 @@ class gn extends ye {
4073
4073
  const t = document.URL;
4074
4074
  if (t !== void 0 && t.search(/bootapi.co.kr/) === -1) {
4075
4075
  const s = this.$session.getUser();
4076
- e.application_id = O.currentApplicationId(e.application_id), e.sk = this.$session.currentSessionKey(), e.uuid = this.$session.currentUserUUID(), e.time = this.$session.currentTime(), e.url = t, e.referer = document.referrer !== void 0 && M(document.referrer) && document.referrer.search(new RegExp(window.location.hostname)) == -1 ? document.referrer : "", e.user_id = s === void 0 || re(s) ? void 0 : s.id, e.items = this.generateItemKeyToVersion1(e.items);
4076
+ e.application_id = O.currentApplicationId(e.application_id), e.sk = this.$session.currentSessionKey(), e.uuid = this.$session.currentUserUUID(), e.time = this.$session.currentTime(), e.url = t, e.referer = document.referrer !== void 0 && q(document.referrer) && document.referrer.search(new RegExp(window.location.hostname)) == -1 ? document.referrer : "", e.user_id = s === void 0 || re(s) ? void 0 : s.id, e.items = this.generateItemKeyToVersion1(e.items);
4077
4077
  try {
4078
4078
  const i = await this.$http.post(
4079
4079
  O.toAnalytics(`call?ver=${_e.version}`),
@@ -4291,7 +4291,7 @@ const Pe = {
4291
4291
  e = r.eventMessage;
4292
4292
  break;
4293
4293
  default:
4294
- if (M(r.event))
4294
+ if (q(r.event))
4295
4295
  e = r;
4296
4296
  else
4297
4297
  throw r;
@@ -4389,7 +4389,7 @@ class Bn extends lt {
4389
4389
  bind(e, t) {
4390
4390
  this.setCallbackFunction(e, t), window.resetBootpayEventListener(this.$messageEventName, (s) => {
4391
4391
  const i = this.parseEvent(s.data);
4392
- if (M(i))
4392
+ if (q(i))
4393
4393
  switch (U.debug("event", i), i.event) {
4394
4394
  case "error":
4395
4395
  case "cancel":
@@ -4769,7 +4769,7 @@ const vs = new _n(), Cn = {
4769
4769
  e = r.eventMessage;
4770
4770
  break;
4771
4771
  default:
4772
- if (M(r.event))
4772
+ if (q(r.event))
4773
4773
  e = r;
4774
4774
  else
4775
4775
  throw r;
@@ -4811,7 +4811,7 @@ const vs = new _n(), Cn = {
4811
4811
  };
4812
4812
  typeof window < "u" && (window.BootpaySDK = Cn);
4813
4813
  var An = we();
4814
- const ys = /* @__PURE__ */ qe(An), m0 = {
4814
+ const ys = /* @__PURE__ */ Me(An), m0 = {
4815
4815
  parameterPrefix: "__b_",
4816
4816
  // query string url 업데이트를 진행한다
4817
4817
  updateParameters({ parameters: r, replace: e }) {
@@ -5453,7 +5453,7 @@ function Es() {
5453
5453
  var I0 = o[he - 15], Te = I0.high, Ve = I0.low, bs = (Te >>> 1 | Ve << 31) ^ (Te >>> 8 | Ve << 24) ^ Te >>> 7, R0 = (Ve >>> 1 | Te << 31) ^ (Ve >>> 8 | Te << 24) ^ (Ve >>> 7 | Te << 25), T0 = o[he - 2], Oe = T0.high, Ye = T0.low, Bs = (Oe >>> 19 | Ye << 13) ^ (Oe << 3 | Ye >>> 29) ^ Oe >>> 6, O0 = (Ye >>> 19 | Oe << 13) ^ (Ye << 3 | Oe >>> 29) ^ (Ye >>> 6 | Oe << 26), U0 = o[he - 7], _s = U0.high, Cs = U0.low, H0 = o[he - 16], As = H0.high, N0 = H0.low;
5454
5454
  le = R0 + Cs, Ee = bs + _s + (le >>> 0 < R0 >>> 0 ? 1 : 0), le = le + O0, Ee = Ee + Bs + (le >>> 0 < O0 >>> 0 ? 1 : 0), le = le + N0, Ee = Ee + As + (le >>> 0 < N0 >>> 0 ? 1 : 0), ot.high = Ee, ot.low = le;
5455
5455
  }
5456
- var ws = fe & it ^ ~fe & nt, L0 = ce & Ke ^ ~ce & Ge, Fs = J & ie ^ J & ze ^ ie & ze, Ds = V & L ^ V & Re ^ L & Re, $s = (J >>> 28 | V << 4) ^ (J << 30 | V >>> 2) ^ (J << 25 | V >>> 7), q0 = (V >>> 28 | J << 4) ^ (V << 30 | J >>> 2) ^ (V << 25 | J >>> 7), ks = (fe >>> 14 | ce << 18) ^ (fe >>> 18 | ce << 14) ^ (fe << 23 | ce >>> 9), Ss = (ce >>> 14 | fe << 18) ^ (ce >>> 18 | fe << 14) ^ (ce << 23 | fe >>> 9), M0 = g[he], Ps = M0.high, W0 = M0.low, xe = Xe + Ss, ge = mt + ks + (xe >>> 0 < Xe >>> 0 ? 1 : 0), xe = xe + L0, ge = ge + ws + (xe >>> 0 < L0 >>> 0 ? 1 : 0), xe = xe + W0, ge = ge + Ps + (xe >>> 0 < W0 >>> 0 ? 1 : 0), xe = xe + le, ge = ge + Ee + (xe >>> 0 < le >>> 0 ? 1 : 0), z0 = q0 + Ds, Is = $s + Fs + (z0 >>> 0 < q0 >>> 0 ? 1 : 0);
5456
+ var ws = fe & it ^ ~fe & nt, L0 = ce & Ke ^ ~ce & Ge, Fs = J & ie ^ J & ze ^ ie & ze, Ds = V & L ^ V & Re ^ L & Re, $s = (J >>> 28 | V << 4) ^ (J << 30 | V >>> 2) ^ (J << 25 | V >>> 7), M0 = (V >>> 28 | J << 4) ^ (V << 30 | J >>> 2) ^ (V << 25 | J >>> 7), ks = (fe >>> 14 | ce << 18) ^ (fe >>> 18 | ce << 14) ^ (fe << 23 | ce >>> 9), Ss = (ce >>> 14 | fe << 18) ^ (ce >>> 18 | fe << 14) ^ (ce << 23 | fe >>> 9), q0 = g[he], Ps = q0.high, W0 = q0.low, xe = Xe + Ss, ge = mt + ks + (xe >>> 0 < Xe >>> 0 ? 1 : 0), xe = xe + L0, ge = ge + ws + (xe >>> 0 < L0 >>> 0 ? 1 : 0), xe = xe + W0, ge = ge + Ps + (xe >>> 0 < W0 >>> 0 ? 1 : 0), xe = xe + le, ge = ge + Ee + (xe >>> 0 < le >>> 0 ? 1 : 0), z0 = M0 + Ds, Is = $s + Fs + (z0 >>> 0 < M0 >>> 0 ? 1 : 0);
5457
5457
  mt = nt, Xe = Ge, nt = it, Ge = Ke, it = fe, Ke = ce, ce = je + xe | 0, fe = yt + ge + (ce >>> 0 < je >>> 0 ? 1 : 0) | 0, yt = ze, je = Re, ze = ie, Re = L, ie = J, L = V, V = xe + z0 | 0, J = ge + Is + (V >>> 0 < xe >>> 0 ? 1 : 0) | 0;
5458
5458
  }
5459
5459
  b = B.low = b + V, B.high = I + J + (b >>> 0 < V >>> 0 ? 1 : 0), F = d.low = F + L, d.high = C + ie + (F >>> 0 < L >>> 0 ? 1 : 0), R = l.low = R + Re, l.high = D + ze + (R >>> 0 < Re >>> 0 ? 1 : 0), H = v.low = H + je, v.high = T + yt + (H >>> 0 < je >>> 0 ? 1 : 0), j = E.low = j + ce, E.high = Y + fe + (j >>> 0 < ce >>> 0 ? 1 : 0), K = _.low = K + Ke, _.high = X + it + (K >>> 0 < Ke >>> 0 ? 1 : 0), S = A.low = S + Ge, A.high = $ + nt + (S >>> 0 < Ge >>> 0 ? 1 : 0), k = w.low = k + Xe, w.high = P + mt + (k >>> 0 < Xe >>> 0 ? 1 : 0);
@@ -6245,9 +6245,9 @@ function Ln() {
6245
6245
  });
6246
6246
  }(o0)), o0.exports;
6247
6247
  }
6248
- var a0 = { exports: {} }, qr;
6249
- function qn() {
6250
- return qr || (qr = 1, function(r, e) {
6248
+ var a0 = { exports: {} }, Mr;
6249
+ function Mn() {
6250
+ return Mr || (Mr = 1, function(r, e) {
6251
6251
  (function(t, s, i) {
6252
6252
  r.exports = s(z(), Q());
6253
6253
  })(N, function(t) {
@@ -6262,9 +6262,9 @@ function qn() {
6262
6262
  });
6263
6263
  }(a0)), a0.exports;
6264
6264
  }
6265
- var c0 = { exports: {} }, Mr;
6266
- function Mn() {
6267
- return Mr || (Mr = 1, function(r, e) {
6265
+ var c0 = { exports: {} }, qr;
6266
+ function qn() {
6267
+ return qr || (qr = 1, function(r, e) {
6268
6268
  (function(t, s, i) {
6269
6269
  r.exports = s(z(), Q());
6270
6270
  })(N, function(t) {
@@ -8374,13 +8374,13 @@ function Vn() {
8374
8374
  }
8375
8375
  (function(r, e) {
8376
8376
  (function(t, s, i) {
8377
- r.exports = s(z(), vt(), wn(), Fn(), Ce(), Dn(), we(), fs(), P0(), $n(), Es(), kn(), Sn(), Pn(), k0(), In(), Fe(), Q(), Rn(), Tn(), On(), Un(), Hn(), Nn(), Ln(), qn(), Mn(), Wn(), zn(), hs(), jn(), Kn(), Gn(), Xn(), Vn());
8377
+ r.exports = s(z(), vt(), wn(), Fn(), Ce(), Dn(), we(), fs(), P0(), $n(), Es(), kn(), Sn(), Pn(), k0(), In(), Fe(), Q(), Rn(), Tn(), On(), Un(), Hn(), Nn(), Ln(), Mn(), qn(), Wn(), zn(), hs(), jn(), Kn(), Gn(), Xn(), Vn());
8378
8378
  })(N, function(t) {
8379
8379
  return t;
8380
8380
  });
8381
8381
  })(ms);
8382
8382
  var Yn = ms.exports;
8383
- const oe = /* @__PURE__ */ qe(Yn);
8383
+ const oe = /* @__PURE__ */ Me(Yn);
8384
8384
  class Jn {
8385
8385
  constructor() {
8386
8386
  this.data = {
@@ -8437,7 +8437,7 @@ class Zn extends Jn {
8437
8437
  );
8438
8438
  }
8439
8439
  encryptKey() {
8440
- return M(this.data.client_key) ? ys(this.data.client_key).toString().substring(0, 16) : "";
8440
+ return q(this.data.client_key) ? ys(this.data.client_key).toString().substring(0, 16) : "";
8441
8441
  }
8442
8442
  currentBootpayStoreParameters() {
8443
8443
  let e = [];
@@ -8570,7 +8570,7 @@ class Qn extends Ae {
8570
8570
  }
8571
8571
  shopUrl() {
8572
8572
  const e = Object.fromEntries(new URLSearchParams(location.search));
8573
- return M(e.__b_u) ? g0.toExShopUrl(e.__b_u) : g0.toExShopUrl(
8573
+ return q(e.__b_u) ? g0.toExShopUrl(e.__b_u) : g0.toExShopUrl(
8574
8574
  `em/${this.$exStore.data.client_key}/${this.$exStore.encryptParameters()}?${this.$exStore.currentBootpayStoreParameters()}`
8575
8575
  );
8576
8576
  }
@@ -8626,14 +8626,14 @@ class to extends lt {
8626
8626
  afterBind: () => {
8627
8627
  window.resetBootpayEventListener("popstate.BootpayStoreEvent", (e) => {
8628
8628
  const t = Object.fromEntries(new URLSearchParams(location.search));
8629
- M(t.__b_u) && me.postMessage("BootpayRouterChange", { url: `/${t.__b_u}` });
8629
+ q(t.__b_u) && me.postMessage("BootpayRouterChange", { url: `/${t.__b_u}` });
8630
8630
  });
8631
8631
  }
8632
8632
  });
8633
8633
  }
8634
8634
  }
8635
8635
  const ro = new to();
8636
- class so extends Me {
8636
+ class so extends qe {
8637
8637
  constructor() {
8638
8638
  super();
8639
8639
  }
@@ -8671,7 +8671,7 @@ const v0 = new so(), io = {
8671
8671
  }
8672
8672
  };
8673
8673
  typeof window < "u" && (window.BootpayStore = io);
8674
- const q = {
8674
+ const M = {
8675
8675
  el: void 0,
8676
8676
  data: void 0,
8677
8677
  termsPassed: !1,
@@ -8687,7 +8687,7 @@ const q = {
8687
8687
  this.data.pg = r, this.data.method = e, this.data.wallet_id = t, this.termsPassed = s, this.data.terms = i, this.widgetExtra = n;
8688
8688
  },
8689
8689
  updateOnProcessing(r) {
8690
- M(r.price) && (this.data.price = r.price), M(r.tax_free) && (this.data.tax_free = r.tax_free), M(r.currency) && (this.data.currency = r.currency), r.user_token !== void 0 && (this.data.user_token = r.user_token), M(r.use_terms) && (this.data.use_terms = r.use_terms !== !1), M(r.sandbox) && (this.data.sandbox = r.sandbox === !0), M(r.widget_key) && (this.data.widget_key = r.widget_key), M(r.widget_type) && (this.widgetType = r.widget_type), r.external_terms !== void 0 && (this.data.external_terms = r.external_terms), r.use_bootpay_inapp_sdk !== void 0 && (this.data.use_bootpay_inapp_sdk = r.use_bootpay_inapp_sdk), r.widget_key !== void 0 && (this.data.widget_key = r.widget_key);
8690
+ q(r.price) && (this.data.price = r.price), q(r.tax_free) && (this.data.tax_free = r.tax_free), q(r.currency) && (this.data.currency = r.currency), r.user_token !== void 0 && (this.data.user_token = r.user_token), q(r.use_terms) && (this.data.use_terms = r.use_terms !== !1), q(r.sandbox) && (this.data.sandbox = r.sandbox === !0), q(r.widget_key) && (this.data.widget_key = r.widget_key), q(r.widget_type) && (this.widgetType = r.widget_type), r.external_terms !== void 0 && (this.data.external_terms = r.external_terms), r.use_bootpay_inapp_sdk !== void 0 && (this.data.use_bootpay_inapp_sdk = r.use_bootpay_inapp_sdk), r.widget_key !== void 0 && (this.data.widget_key = r.widget_key);
8691
8691
  },
8692
8692
  encryptParameters() {
8693
8693
  return encodeURIComponent(
@@ -8742,10 +8742,10 @@ const q = {
8742
8742
  * @date: 2024-08-19
8743
8743
  */
8744
8744
  getExtra(r = void 0) {
8745
- return Et(r ?? {}, Et(this.widgetExtra ?? {}, this.data.extra ?? {}));
8745
+ return Et(r ?? {}, Et(this.data.extra ?? {}, this.widgetExtra ?? {}));
8746
8746
  },
8747
8747
  getRequestPaymentData(r = void 0) {
8748
- return this.data.widget_sandbox = this.data.sandbox, this.data.extra = this.getExtra(r.extra), Et(r, this.data);
8748
+ return this.data.extra = {}, this.data.widget_sandbox = this.data.sandbox, this.data.extra = this.getExtra(r.extra), Et(r, this.data);
8749
8749
  },
8750
8750
  /**
8751
8751
  * 위젯에서 호출되는 훅
@@ -8756,7 +8756,7 @@ const q = {
8756
8756
  };
8757
8757
  class no extends Ae {
8758
8758
  constructor() {
8759
- super(), this.$iFrameId = "bootpay-widget-iframe", this.$widgetStore = q, this.$template = this.defaultIframeHtml();
8759
+ super(), this.$iFrameId = "bootpay-widget-iframe", this.$widgetStore = M, this.$template = this.defaultIframeHtml();
8760
8760
  }
8761
8761
  /**
8762
8762
  * 첫 Rendering을 진행한다
@@ -8807,7 +8807,7 @@ class no extends Ae {
8807
8807
  const G = new no();
8808
8808
  class oo extends Ae {
8809
8809
  constructor() {
8810
- super(), this.$brandpayWindowId = "__bootpay-card-easy-window", this.$iFrameId = "__bootpay-card-easy-iframe", this.$windowId = "__bootpay-card-easy-container-window", this.$additionalClass = O.isMobile() ? "transparent" : "rounded-iframe transparent", this.$template = this.template(), this.$widgetStore = q;
8810
+ super(), this.$brandpayWindowId = "__bootpay-card-easy-window", this.$iFrameId = "__bootpay-card-easy-iframe", this.$windowId = "__bootpay-card-easy-container-window", this.$additionalClass = O.isMobile() ? "transparent" : "rounded-iframe transparent", this.$template = this.template(), this.$widgetStore = M;
8811
8811
  }
8812
8812
  template() {
8813
8813
  return `
@@ -8982,7 +8982,7 @@ const b0 = new co(), xo = {
8982
8982
  return G.postMessage("bootpayWidgetBrandpayReload", r);
8983
8983
  },
8984
8984
  bootpayWidgetResize(r) {
8985
- return this.callBootpayDOMEvent("widget-resize", r), q.callHook("resize", r), G.resize(r);
8985
+ return this.callBootpayDOMEvent("widget-resize", r), M.callHook("resize", r), G.resize(r);
8986
8986
  },
8987
8987
  bootpayWidgetShowInterestInformation(r) {
8988
8988
  return be.showCardInterestInformation(r);
@@ -9043,7 +9043,7 @@ const b0 = new co(), xo = {
9043
9043
  });
9044
9044
  },
9045
9045
  bootpayWidgetTermAllAgree(r) {
9046
- this.callBootpayDOMEvent("all-agree-terms", r), q.callHook("allTermsAccepted", r);
9046
+ this.callBootpayDOMEvent("all-agree-terms", r), M.callHook("allTermsAccepted", r);
9047
9047
  },
9048
9048
  bootpayWidgetSelectPayment(r) {
9049
9049
  const { method_alias: e, payment_type: t, wallet_id: s } = r;
@@ -9054,10 +9054,10 @@ const b0 = new co(), xo = {
9054
9054
  });
9055
9055
  },
9056
9056
  bootpayWidgetReady(r) {
9057
- this.callBootpayDOMEvent("widget-ready", r), q.callHook("ready", r);
9057
+ this.callBootpayDOMEvent("widget-ready", r), M.callHook("ready", r);
9058
9058
  },
9059
9059
  bootpayWidgetUpdateStore(r) {
9060
- q.updateOnProcessing({
9060
+ M.updateOnProcessing({
9061
9061
  ...r
9062
9062
  });
9063
9063
  },
@@ -9079,7 +9079,7 @@ const b0 = new co(), xo = {
9079
9079
  );
9080
9080
  },
9081
9081
  brandpayWalletUpdated(r) {
9082
- q.callHook("brandpayWalletUpdated", r);
9082
+ M.callHook("brandpayWalletUpdated", r);
9083
9083
  },
9084
9084
  /**
9085
9085
  * 결제 선택시 global 이벤트를 분리하여 호출한다
@@ -9088,7 +9088,7 @@ const b0 = new co(), xo = {
9088
9088
  */
9089
9089
  triggerGlobalChangeEvent(r) {
9090
9090
  var e;
9091
- r.completed = M(r.pg) && M(r.method) && (r.term_passed === !0 || !q.data.use_terms) && (["BRANDPAY_CARD", "BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(r.method) === -1 || r.wallet_id !== void 0), (q.data.pg !== r.pg || q.data.method !== r.method || q.data.wallet_id !== r.wallet_id || JSON.stringify(q.widgetExtra) !== JSON.stringify(r.extra)) && (this.callBootpayDOMEvent("widget-change-payment", r), q.callHook("paymentMethodUpdated", r)), JSON.stringify((e = r.select_terms) == null ? void 0 : e.filter((t) => t.agree === !0)) !== JSON.stringify(q.data.terms.filter((t) => t.agree === !0)) && (this.callBootpayDOMEvent("widget-change-terms", r), q.callHook("termsConsentUpdated", r));
9091
+ r.completed = q(r.pg) && q(r.method) && (r.term_passed === !0 || !M.data.use_terms) && (["BRANDPAY_CARD", "BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(r.method) === -1 || r.wallet_id !== void 0), (M.data.pg !== r.pg || M.data.method !== r.method || M.data.wallet_id !== r.wallet_id || JSON.stringify(M.widgetExtra) !== JSON.stringify(r.extra)) && (this.callBootpayDOMEvent("widget-change-payment", r), M.callHook("paymentMethodUpdated", r)), JSON.stringify((e = r.select_terms) == null ? void 0 : e.filter((t) => t.agree === !0)) !== JSON.stringify(M.data.terms.filter((t) => t.agree === !0)) && (this.callBootpayDOMEvent("widget-change-terms", r), M.callHook("termsConsentUpdated", r));
9092
9092
  },
9093
9093
  callBootpayDOMEvent(r, e = void 0) {
9094
9094
  document.dispatchEvent(
@@ -9113,12 +9113,12 @@ class lo extends lt {
9113
9113
  }
9114
9114
  }
9115
9115
  const uo = new lo();
9116
- class po extends Me {
9116
+ class po extends qe {
9117
9117
  constructor() {
9118
9118
  super(), this.message = S0;
9119
9119
  }
9120
9120
  initialize() {
9121
- q.setWidgetData(
9121
+ M.setWidgetData(
9122
9122
  void 0,
9123
9123
  {
9124
9124
  application_id: void 0,
@@ -9139,7 +9139,7 @@ class po extends Me {
9139
9139
  throw new Error("결제금액은 1원 이상을 입력해주세요.");
9140
9140
  if (this.$blank(t == null ? void 0 : t.application_id))
9141
9141
  throw new Error("application_id가 입력되지 않았습니다.");
9142
- this.initialize(), q.setWidgetData(
9142
+ this.initialize(), M.setWidgetData(
9143
9143
  e,
9144
9144
  t
9145
9145
  ), G.render(), uo.bind();
@@ -9156,7 +9156,7 @@ class po extends Me {
9156
9156
  widget_key: a,
9157
9157
  external_terms: c
9158
9158
  } = e;
9159
- q.updateOnProcessing({
9159
+ M.updateOnProcessing({
9160
9160
  price: t,
9161
9161
  tax_free: s,
9162
9162
  currency: i,
@@ -9183,10 +9183,10 @@ class po extends Me {
9183
9183
  G.destroy();
9184
9184
  }
9185
9185
  selectPayment(e, t, s, i = !1, n, y) {
9186
- q.setPayment(e, t, s, i, n, y), U.debug("selectPayment", `pg: ${e}, method: ${t}, wallet_id: ${s}, terms: ${i}, select_terms: ${JSON.stringify(n)}, extra: ${JSON.stringify(y)}`);
9186
+ M.setPayment(e, t, s, i, n, y), U.debug("selectPayment", `pg: ${e}, method: ${t}, wallet_id: ${s}, terms: ${i}, select_terms: ${JSON.stringify(n)}, extra: ${JSON.stringify(y)}`);
9187
9187
  }
9188
9188
  currentTermsCondition() {
9189
- return q.data.terms;
9189
+ return M.data.terms;
9190
9190
  }
9191
9191
  /**
9192
9192
  * 부트페이 결제 요청을 한다
@@ -9194,7 +9194,7 @@ class po extends Me {
9194
9194
  * @date: 2023-06-21
9195
9195
  */
9196
9196
  async requestPayment(e) {
9197
- return this.widgetRequestPaymentValidate(1), Pe.requestPayment(q.getRequestPaymentData(e));
9197
+ return this.widgetRequestPaymentValidate(1), Pe.requestPayment(M.getRequestPaymentData(e));
9198
9198
  }
9199
9199
  /**
9200
9200
  * 부트페이 정기결제 요청
@@ -9202,7 +9202,7 @@ class po extends Me {
9202
9202
  * @date: 2024-08-19
9203
9203
  */
9204
9204
  async requestSubscription(e) {
9205
- return this.widgetRequestPaymentValidate(2), Pe.requestSubscription(q.getRequestPaymentData(e));
9205
+ return this.widgetRequestPaymentValidate(2), Pe.requestSubscription(M.getRequestPaymentData(e));
9206
9206
  }
9207
9207
  isRendered() {
9208
9208
  return G.isRendered();
@@ -9232,36 +9232,36 @@ class po extends Me {
9232
9232
  * @date: 2024-07-22
9233
9233
  */
9234
9234
  currentPaymentParameters() {
9235
- return this.widgetRequestPaymentValidate(), {
9236
- pg: q.data.pg,
9237
- method: q.data.method,
9238
- wallet_id: q.data.wallet_id,
9239
- terms: q.data.terms,
9240
- widget_key: q.data.widget_key,
9241
- widget_sandbox: q.data.sandbox,
9242
- extra: q.getExtra({})
9235
+ return {
9236
+ pg: M.data.pg,
9237
+ method: M.data.method,
9238
+ wallet_id: M.data.wallet_id,
9239
+ terms: M.data.terms,
9240
+ widget_key: M.data.widget_key,
9241
+ widget_sandbox: M.data.sandbox,
9242
+ extra: M.getExtra({})
9243
9243
  };
9244
9244
  }
9245
9245
  widgetRequestPaymentValidate(e = void 0) {
9246
- if (e !== void 0 && q.widgetType !== e)
9246
+ if (e !== void 0 && M.widgetType !== e)
9247
9247
  throw new ue({
9248
9248
  event: "error",
9249
9249
  error_code: "RC_WIDGET_TYPE_INVALID",
9250
9250
  message: e === 1 ? this.message.getLocaleMessage("widgetTypeNotPayment", "ko") : this.message.getLocaleMessage("widgetTypeNotSubscription", "ko")
9251
9251
  });
9252
- if (this.$blank(q.data.pg) || this.$blank(q.data.method))
9252
+ if (this.$blank(M.data.pg) || this.$blank(M.data.method))
9253
9253
  throw new ue({
9254
9254
  event: "error",
9255
9255
  error_code: "RC_PG_METHOD_NOT_SELECTED",
9256
9256
  message: this.message.getLocaleMessage("notSelectPayment", "ko")
9257
9257
  });
9258
- if (!q.termsPassed && q.data.use_terms)
9258
+ if (!M.termsPassed && M.data.use_terms)
9259
9259
  throw new ue({
9260
9260
  event: "error",
9261
9261
  error_code: "RC_TERMS_NOT_AGREE",
9262
9262
  message: this.message.getLocaleMessage("termsNotAgree", "ko")
9263
9263
  });
9264
- if (["BRANDPAY_CARD", "BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(q.data.method) > -1 && q.data.wallet_id === void 0)
9264
+ if (["BRANDPAY_CARD", "BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(M.data.method) > -1 && M.data.wallet_id === void 0)
9265
9265
  throw new ue({
9266
9266
  event: "error",
9267
9267
  error_code: "RC_BRANDPAY_NEED_SELECT_WALLET",
@@ -9306,7 +9306,7 @@ const se = new po(), fo = {
9306
9306
  e = r.eventMessage;
9307
9307
  break;
9308
9308
  default:
9309
- if (M(r.event))
9309
+ if (q(r.event))
9310
9310
  e = r;
9311
9311
  else
9312
9312
  throw r;
@@ -9381,10 +9381,10 @@ const se = new po(), fo = {
9381
9381
  return se.currentPaymentParameters();
9382
9382
  },
9383
9383
  isWidgetTypeSubscription() {
9384
- return q.widgetType === 2;
9384
+ return M.widgetType === 2;
9385
9385
  },
9386
9386
  isWidgetTypePayment() {
9387
- return q.widgetType === 1;
9387
+ return M.widgetType === 1;
9388
9388
  }
9389
9389
  };
9390
9390
  typeof window < "u" && (window.BootpayWidget = fo);