@bootpay/client-js 5.2.0-beta.2 → 5.2.0-beta.3

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.es.js CHANGED
@@ -224,8 +224,8 @@ function z() {
224
224
  var f = this.words, m = l.words, b = this.sigBytes, E = l.sigBytes;
225
225
  if (this.clamp(), b % 4)
226
226
  for (var k = 0; k < E; k++) {
227
- var S = m[k >>> 2] >>> 24 - k % 4 * 8 & 255;
228
- f[b + k >>> 2] |= S << 24 - (b + k) % 4 * 8;
227
+ var B = m[k >>> 2] >>> 24 - k % 4 * 8 & 255;
228
+ f[b + k >>> 2] |= B << 24 - (b + k) % 4 * 8;
229
229
  }
230
230
  else
231
231
  for (var A = 0; A < E; A += 4)
@@ -428,12 +428,12 @@ function z() {
428
428
  * var processedData = bufferedBlockAlgorithm._process(!!'flush');
429
429
  */
430
430
  _process: function(l) {
431
- var f, m = this._data, b = m.words, E = m.sigBytes, k = this.blockSize, S = k * 4, A = E / S;
431
+ var f, m = this._data, b = m.words, E = m.sigBytes, k = this.blockSize, B = k * 4, A = E / B;
432
432
  l ? A = s.ceil(A) : A = s.max((A | 0) - this._minBufferSize, 0);
433
433
  var _ = A * k, w = s.min(_ * 4, E);
434
434
  if (_) {
435
- for (var B = 0; B < _; B += k)
436
- this._doProcessBlock(b, B);
435
+ for (var S = 0; S < _; S += k)
436
+ this._doProcessBlock(b, S);
437
437
  f = b.splice(0, _), m.sigBytes -= w;
438
438
  }
439
439
  return new y.init(f, w);
@@ -861,7 +861,7 @@ class js extends zs {
861
861
  }
862
862
  }
863
863
  }
864
- const Te = new js(), Ks = "@bootpay/client-js", Gs = "5.2.0-beta.2", Xs = "dist/index.es.js", Vs = "dist/src/index.d.ts", Ys = "dist/index.css", Js = {
864
+ const Te = new js(), Ks = "@bootpay/client-js", Gs = "5.2.0-beta.3", Xs = "dist/index.es.js", Vs = "dist/src/index.d.ts", Ys = "dist/index.css", Js = {
865
865
  test: 'echo "Error: no test specified" && exit 1',
866
866
  build: "rm -rf ./dist && vite build",
867
867
  deploy: "NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"
@@ -1001,7 +1001,7 @@ class pe extends Error {
1001
1001
  super(), this.name = "BootpayEventError", this.eventMessage = e;
1002
1002
  }
1003
1003
  }
1004
- const Se = {
1004
+ const Be = {
1005
1005
  __BOOTPAY_NAMESPACE: {},
1006
1006
  isBind: !1,
1007
1007
  initialize() {
@@ -1014,15 +1014,15 @@ const Se = {
1014
1014
  }), this.isBind = !0);
1015
1015
  },
1016
1016
  on(t, e, r = void 0) {
1017
- return re(Se.__BOOTPAY_NAMESPACE) && (Se.__BOOTPAY_NAMESPACE = {}), this.addEventListener(t.split(".")[0], e, r || !1), Se.__BOOTPAY_NAMESPACE[t] = e, this;
1017
+ return re(Be.__BOOTPAY_NAMESPACE) && (Be.__BOOTPAY_NAMESPACE = {}), this.addEventListener(t.split(".")[0], e, r || !1), Be.__BOOTPAY_NAMESPACE[t] = e, this;
1018
1018
  },
1019
1019
  off(t) {
1020
- return N(Se.__BOOTPAY_NAMESPACE) && N(Se.__BOOTPAY_NAMESPACE[t]) && this.removeEventListener(t.split(".")[0], Se.__BOOTPAY_NAMESPACE[t]), this;
1020
+ return N(Be.__BOOTPAY_NAMESPACE) && N(Be.__BOOTPAY_NAMESPACE[t]) && this.removeEventListener(t.split(".")[0], Be.__BOOTPAY_NAMESPACE[t]), this;
1021
1021
  }
1022
1022
  };
1023
1023
  class ot extends Ae {
1024
1024
  constructor(e) {
1025
- 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, Se.initialize();
1025
+ 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, Be.initialize();
1026
1026
  }
1027
1027
  bind(e, r) {
1028
1028
  this.$messageEventName && window.resetBootpayEventListener(this.$messageEventName, (s) => {
@@ -1199,7 +1199,7 @@ function Oe(t) {
1199
1199
  return kr(r) === t;
1200
1200
  };
1201
1201
  }
1202
- function Sr(t) {
1202
+ function Br(t) {
1203
1203
  return Array.isArray(t);
1204
1204
  }
1205
1205
  function pt(t) {
@@ -1229,15 +1229,15 @@ function lt(t) {
1229
1229
  return e === null || e === Object.prototype;
1230
1230
  }
1231
1231
  var pn = Oe("Date"), hn = Oe("File"), fn = Oe("Blob"), xn = Oe("FileList");
1232
- function Br(t) {
1232
+ function Sr(t) {
1233
1233
  return Er.call(t) === "[object Function]";
1234
1234
  }
1235
1235
  function vn(t) {
1236
- return ts(t) && Br(t.pipe);
1236
+ return ts(t) && Sr(t.pipe);
1237
1237
  }
1238
1238
  function yn(t) {
1239
1239
  var e = "[object FormData]";
1240
- return t && (typeof FormData == "function" && t instanceof FormData || Er.call(t) === e || Br(t.toString) && t.toString() === e);
1240
+ return t && (typeof FormData == "function" && t instanceof FormData || Er.call(t) === e || Sr(t.toString) && t.toString() === e);
1241
1241
  }
1242
1242
  var mn = Oe("URLSearchParams");
1243
1243
  function gn(t) {
@@ -1248,7 +1248,7 @@ function bn() {
1248
1248
  }
1249
1249
  function Pr(t, e) {
1250
1250
  if (!(t === null || typeof t > "u"))
1251
- if (typeof t != "object" && (t = [t]), Sr(t))
1251
+ if (typeof t != "object" && (t = [t]), Br(t))
1252
1252
  for (var r = 0, s = t.length; r < s; r++)
1253
1253
  e.call(null, t[r], r, t);
1254
1254
  else
@@ -1258,7 +1258,7 @@ function Pr(t, e) {
1258
1258
  function gr() {
1259
1259
  var t = {};
1260
1260
  function e(n, i) {
1261
- lt(t[i]) && lt(n) ? t[i] = gr(t[i], n) : lt(n) ? t[i] = gr({}, n) : Sr(n) ? t[i] = n.slice() : t[i] = n;
1261
+ lt(t[i]) && lt(n) ? t[i] = gr(t[i], n) : lt(n) ? t[i] = gr({}, n) : Br(n) ? t[i] = n.slice() : t[i] = n;
1262
1262
  }
1263
1263
  for (var r = 0, s = arguments.length; r < s; r++)
1264
1264
  Pr(arguments[r], e);
@@ -1290,7 +1290,7 @@ function kn(t, e, r) {
1290
1290
  var s = t.indexOf(e, r);
1291
1291
  return s !== -1 && s === r;
1292
1292
  }
1293
- function Sn(t) {
1293
+ function Bn(t) {
1294
1294
  if (!t) return null;
1295
1295
  var e = t.length;
1296
1296
  if (pt(e)) return null;
@@ -1298,12 +1298,12 @@ function Sn(t) {
1298
1298
  r[e] = t[e];
1299
1299
  return r;
1300
1300
  }
1301
- var Bn = /* @__PURE__ */ function(t) {
1301
+ var Sn = /* @__PURE__ */ function(t) {
1302
1302
  return function(e) {
1303
1303
  return t && e instanceof t;
1304
1304
  };
1305
1305
  }(typeof Uint8Array < "u" && Object.getPrototypeOf(Uint8Array)), Q = {
1306
- isArray: Sr,
1306
+ isArray: Br,
1307
1307
  isArrayBuffer: es,
1308
1308
  isBuffer: cn,
1309
1309
  isFormData: yn,
@@ -1316,7 +1316,7 @@ var Bn = /* @__PURE__ */ function(t) {
1316
1316
  isDate: pn,
1317
1317
  isFile: hn,
1318
1318
  isBlob: fn,
1319
- isFunction: Br,
1319
+ isFunction: Sr,
1320
1320
  isStream: vn,
1321
1321
  isURLSearchParams: mn,
1322
1322
  isStandardBrowserEnv: bn,
@@ -1330,8 +1330,8 @@ var Bn = /* @__PURE__ */ function(t) {
1330
1330
  kindOf: kr,
1331
1331
  kindOfTest: Oe,
1332
1332
  endsWith: kn,
1333
- toArray: Sn,
1334
- isTypedArray: Bn,
1333
+ toArray: Bn,
1334
+ isTypedArray: Sn,
1335
1335
  isFileList: xn
1336
1336
  }, Me = Q;
1337
1337
  function Yr(t) {
@@ -1483,12 +1483,12 @@ function An() {
1483
1483
  ));
1484
1484
  }, kt;
1485
1485
  }
1486
- var St, Zr;
1486
+ var Bt, Zr;
1487
1487
  function On() {
1488
- if (Zr) return St;
1488
+ if (Zr) return Bt;
1489
1489
  Zr = 1;
1490
1490
  var t = Q;
1491
- return St = t.isStandardBrowserEnv() ? (
1491
+ return Bt = t.isStandardBrowserEnv() ? (
1492
1492
  // Standard browser envs support document.cookie
1493
1493
  /* @__PURE__ */ function() {
1494
1494
  return {
@@ -1518,7 +1518,7 @@ function On() {
1518
1518
  }
1519
1519
  };
1520
1520
  }()
1521
- ), St;
1521
+ ), Bt;
1522
1522
  }
1523
1523
  var Un = function(e) {
1524
1524
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
@@ -1526,9 +1526,9 @@ var Un = function(e) {
1526
1526
  return r ? e.replace(/\/+$/, "") + "/" + r.replace(/^\/+/, "") : e;
1527
1527
  }, Fn = Un, Hn = Dn, cs = function(e, r) {
1528
1528
  return e && !Fn(r) ? Hn(e, r) : r;
1529
- }, Bt, Qr;
1529
+ }, St, Qr;
1530
1530
  function Nn() {
1531
- if (Qr) return Bt;
1531
+ if (Qr) return St;
1532
1532
  Qr = 1;
1533
1533
  var t = Q, e = [
1534
1534
  "age",
@@ -1549,7 +1549,7 @@ function Nn() {
1549
1549
  "retry-after",
1550
1550
  "user-agent"
1551
1551
  ];
1552
- return Bt = function(s) {
1552
+ return St = function(s) {
1553
1553
  var n = {}, i, x, d;
1554
1554
  return s && t.forEach(s.split(`
1555
1555
  `), function(a) {
@@ -1559,7 +1559,7 @@ function Nn() {
1559
1559
  i === "set-cookie" ? n[i] = (n[i] ? n[i] : []).concat([x]) : n[i] = n[i] ? n[i] + ", " + x : x;
1560
1560
  }
1561
1561
  }), n;
1562
- }, Bt;
1562
+ }, St;
1563
1563
  }
1564
1564
  var Pt, e0;
1565
1565
  function Mn() {
@@ -1634,15 +1634,15 @@ function n0() {
1634
1634
  var E = o.auth.username || "", k = o.auth.password ? unescape(encodeURIComponent(o.auth.password)) : "";
1635
1635
  $.Authorization = "Basic " + btoa(E + ":" + k);
1636
1636
  }
1637
- var S = n(o.baseURL, o.url);
1638
- b.open(o.method.toUpperCase(), s(S, o.params, o.paramsSerializer), !0), b.timeout = o.timeout;
1637
+ var B = n(o.baseURL, o.url);
1638
+ b.open(o.method.toUpperCase(), s(B, o.params, o.paramsSerializer), !0), b.timeout = o.timeout;
1639
1639
  function A() {
1640
1640
  if (b) {
1641
- var B = "getAllResponseHeaders" in b ? i(b.getAllResponseHeaders()) : null, I = !l || l === "text" || l === "json" ? b.responseText : b.response, O = {
1641
+ var S = "getAllResponseHeaders" in b ? i(b.getAllResponseHeaders()) : null, I = !l || l === "text" || l === "json" ? b.responseText : b.response, O = {
1642
1642
  data: I,
1643
1643
  status: b.status,
1644
1644
  statusText: b.statusText,
1645
- headers: B,
1645
+ headers: S,
1646
1646
  config: o,
1647
1647
  request: b
1648
1648
  };
@@ -1668,15 +1668,15 @@ function n0() {
1668
1668
  b
1669
1669
  )), b = null;
1670
1670
  }, t.isStandardBrowserEnv()) {
1671
- var _ = (o.withCredentials || x(S)) && o.xsrfCookieName ? r.read(o.xsrfCookieName) : void 0;
1671
+ var _ = (o.withCredentials || x(B)) && o.xsrfCookieName ? r.read(o.xsrfCookieName) : void 0;
1672
1672
  _ && ($[o.xsrfHeaderName] = _);
1673
1673
  }
1674
1674
  "setRequestHeader" in b && t.forEach($, function(I, O) {
1675
1675
  typeof g > "u" && O.toLowerCase() === "content-type" ? delete $[O] : b.setRequestHeader(O, I);
1676
- }), t.isUndefined(o.withCredentials) || (b.withCredentials = !!o.withCredentials), l && l !== "json" && (b.responseType = o.responseType), typeof o.onDownloadProgress == "function" && b.addEventListener("progress", o.onDownloadProgress), typeof o.onUploadProgress == "function" && b.upload && b.upload.addEventListener("progress", o.onUploadProgress), (o.cancelToken || o.signal) && (f = function(B) {
1677
- b && (v(!B || B && B.type ? new a() : B), b.abort(), b = null);
1676
+ }), t.isUndefined(o.withCredentials) || (b.withCredentials = !!o.withCredentials), l && l !== "json" && (b.responseType = o.responseType), typeof o.onDownloadProgress == "function" && b.addEventListener("progress", o.onDownloadProgress), typeof o.onUploadProgress == "function" && b.upload && b.upload.addEventListener("progress", o.onUploadProgress), (o.cancelToken || o.signal) && (f = function(S) {
1677
+ b && (v(!S || S && S.type ? new a() : S), b.abort(), b = null);
1678
1678
  }, o.cancelToken && o.cancelToken.subscribe(f), o.signal && (o.signal.aborted ? f() : o.signal.addEventListener("abort", f))), g || (g = null);
1679
- var w = c(S);
1679
+ var w = c(B);
1680
1680
  if (w && ["http", "https", "file"].indexOf(w) === -1) {
1681
1681
  v(new p("Unsupported protocol " + w + ":", p.ERR_BAD_REQUEST, o));
1682
1682
  return;
@@ -2123,8 +2123,8 @@ function Ue() {
2123
2123
  var l = g + $, f = v[l];
2124
2124
  v[l] = (f << 8 | f >>> 24) & 16711935 | (f << 24 | f >>> 8) & 4278255360;
2125
2125
  }
2126
- var m = this._hash.words, b = v[g + 0], E = v[g + 1], k = v[g + 2], S = v[g + 3], A = v[g + 4], _ = v[g + 5], w = v[g + 6], B = v[g + 7], I = v[g + 8], O = v[g + 9], U = v[g + 10], H = v[g + 11], Y = v[g + 12], j = v[g + 13], X = v[g + 14], K = v[g + 15], P = m[0], T = m[1], R = m[2], C = m[3];
2127
- P = y(P, T, R, C, b, 7, a[0]), C = y(C, P, T, R, E, 12, a[1]), R = y(R, C, P, T, k, 17, a[2]), T = y(T, R, C, P, S, 22, a[3]), P = y(P, T, R, C, A, 7, a[4]), C = y(C, P, T, R, _, 12, a[5]), R = y(R, C, P, T, w, 17, a[6]), T = y(T, R, C, P, B, 22, a[7]), P = y(P, T, R, C, I, 7, a[8]), C = y(C, P, T, R, O, 12, a[9]), R = y(R, C, P, T, U, 17, a[10]), T = y(T, R, C, P, H, 22, a[11]), P = y(P, T, R, C, Y, 7, a[12]), C = y(C, P, T, R, j, 12, a[13]), R = y(R, C, P, T, X, 17, a[14]), T = y(T, R, C, P, K, 22, a[15]), P = o(P, T, R, C, E, 5, a[16]), C = o(C, P, T, R, w, 9, a[17]), R = o(R, C, P, T, H, 14, a[18]), T = o(T, R, C, P, b, 20, a[19]), P = o(P, T, R, C, _, 5, a[20]), C = o(C, P, T, R, U, 9, a[21]), R = o(R, C, P, T, K, 14, a[22]), T = o(T, R, C, P, A, 20, a[23]), P = o(P, T, R, C, O, 5, a[24]), C = o(C, P, T, R, X, 9, a[25]), R = o(R, C, P, T, S, 14, a[26]), T = o(T, R, C, P, I, 20, a[27]), P = o(P, T, R, C, j, 5, a[28]), C = o(C, P, T, R, k, 9, a[29]), R = o(R, C, P, T, B, 14, a[30]), T = o(T, R, C, P, Y, 20, a[31]), P = u(P, T, R, C, _, 4, a[32]), C = u(C, P, T, R, I, 11, a[33]), R = u(R, C, P, T, H, 16, a[34]), T = u(T, R, C, P, X, 23, a[35]), P = u(P, T, R, C, E, 4, a[36]), C = u(C, P, T, R, A, 11, a[37]), R = u(R, C, P, T, B, 16, a[38]), T = u(T, R, C, P, U, 23, a[39]), P = u(P, T, R, C, j, 4, a[40]), C = u(C, P, T, R, b, 11, a[41]), R = u(R, C, P, T, S, 16, a[42]), T = u(T, R, C, P, w, 23, a[43]), P = u(P, T, R, C, O, 4, a[44]), C = u(C, P, T, R, Y, 11, a[45]), R = u(R, C, P, T, K, 16, a[46]), T = u(T, R, C, P, k, 23, a[47]), P = h(P, T, R, C, b, 6, a[48]), C = h(C, P, T, R, B, 10, a[49]), R = h(R, C, P, T, X, 15, a[50]), T = h(T, R, C, P, _, 21, a[51]), P = h(P, T, R, C, Y, 6, a[52]), C = h(C, P, T, R, S, 10, a[53]), R = h(R, C, P, T, U, 15, a[54]), T = h(T, R, C, P, E, 21, a[55]), P = h(P, T, R, C, I, 6, a[56]), C = h(C, P, T, R, K, 10, a[57]), R = h(R, C, P, T, w, 15, a[58]), T = h(T, R, C, P, j, 21, a[59]), P = h(P, T, R, C, A, 6, a[60]), C = h(C, P, T, R, H, 10, a[61]), R = h(R, C, P, T, k, 15, a[62]), T = h(T, R, C, P, O, 21, a[63]), m[0] = m[0] + P | 0, m[1] = m[1] + T | 0, m[2] = m[2] + R | 0, m[3] = m[3] + C | 0;
2126
+ var m = this._hash.words, b = v[g + 0], E = v[g + 1], k = v[g + 2], B = v[g + 3], A = v[g + 4], _ = v[g + 5], w = v[g + 6], S = v[g + 7], I = v[g + 8], O = v[g + 9], U = v[g + 10], H = v[g + 11], Y = v[g + 12], j = v[g + 13], X = v[g + 14], K = v[g + 15], P = m[0], T = m[1], R = m[2], C = m[3];
2127
+ P = y(P, T, R, C, b, 7, a[0]), C = y(C, P, T, R, E, 12, a[1]), R = y(R, C, P, T, k, 17, a[2]), T = y(T, R, C, P, B, 22, a[3]), P = y(P, T, R, C, A, 7, a[4]), C = y(C, P, T, R, _, 12, a[5]), R = y(R, C, P, T, w, 17, a[6]), T = y(T, R, C, P, S, 22, a[7]), P = y(P, T, R, C, I, 7, a[8]), C = y(C, P, T, R, O, 12, a[9]), R = y(R, C, P, T, U, 17, a[10]), T = y(T, R, C, P, H, 22, a[11]), P = y(P, T, R, C, Y, 7, a[12]), C = y(C, P, T, R, j, 12, a[13]), R = y(R, C, P, T, X, 17, a[14]), T = y(T, R, C, P, K, 22, a[15]), P = o(P, T, R, C, E, 5, a[16]), C = o(C, P, T, R, w, 9, a[17]), R = o(R, C, P, T, H, 14, a[18]), T = o(T, R, C, P, b, 20, a[19]), P = o(P, T, R, C, _, 5, a[20]), C = o(C, P, T, R, U, 9, a[21]), R = o(R, C, P, T, K, 14, a[22]), T = o(T, R, C, P, A, 20, a[23]), P = o(P, T, R, C, O, 5, a[24]), C = o(C, P, T, R, X, 9, a[25]), R = o(R, C, P, T, B, 14, a[26]), T = o(T, R, C, P, I, 20, a[27]), P = o(P, T, R, C, j, 5, a[28]), C = o(C, P, T, R, k, 9, a[29]), R = o(R, C, P, T, S, 14, a[30]), T = o(T, R, C, P, Y, 20, a[31]), P = u(P, T, R, C, _, 4, a[32]), C = u(C, P, T, R, I, 11, a[33]), R = u(R, C, P, T, H, 16, a[34]), T = u(T, R, C, P, X, 23, a[35]), P = u(P, T, R, C, E, 4, a[36]), C = u(C, P, T, R, A, 11, a[37]), R = u(R, C, P, T, S, 16, a[38]), T = u(T, R, C, P, U, 23, a[39]), P = u(P, T, R, C, j, 4, a[40]), C = u(C, P, T, R, b, 11, a[41]), R = u(R, C, P, T, B, 16, a[42]), T = u(T, R, C, P, w, 23, a[43]), P = u(P, T, R, C, O, 4, a[44]), C = u(C, P, T, R, Y, 11, a[45]), R = u(R, C, P, T, K, 16, a[46]), T = u(T, R, C, P, k, 23, a[47]), P = h(P, T, R, C, b, 6, a[48]), C = h(C, P, T, R, S, 10, a[49]), R = h(R, C, P, T, X, 15, a[50]), T = h(T, R, C, P, _, 21, a[51]), P = h(P, T, R, C, Y, 6, a[52]), C = h(C, P, T, R, B, 10, a[53]), R = h(R, C, P, T, U, 15, a[54]), T = h(T, R, C, P, E, 21, a[55]), P = h(P, T, R, C, I, 6, a[56]), C = h(C, P, T, R, K, 10, a[57]), R = h(R, C, P, T, w, 15, a[58]), T = h(T, R, C, P, j, 21, a[59]), P = h(P, T, R, C, A, 6, a[60]), C = h(C, P, T, R, H, 10, a[61]), R = h(R, C, P, T, k, 15, a[62]), T = h(T, R, C, P, O, 21, a[63]), m[0] = m[0] + P | 0, m[1] = m[1] + T | 0, m[2] = m[2] + R | 0, m[3] = m[3] + C | 0;
2128
2128
  },
2129
2129
  _doFinalize: function() {
2130
2130
  var v = this._data, g = v.words, $ = this._nDataBytes * 8, l = v.sigBytes * 8;
@@ -2132,8 +2132,8 @@ function Ue() {
2132
2132
  var f = s.floor($ / 4294967296), m = $;
2133
2133
  g[(l + 64 >>> 9 << 4) + 15] = (f << 8 | f >>> 24) & 16711935 | (f << 24 | f >>> 8) & 4278255360, g[(l + 64 >>> 9 << 4) + 14] = (m << 8 | m >>> 24) & 16711935 | (m << 24 | m >>> 8) & 4278255360, v.sigBytes = (g.length + 1) * 4, this._process();
2134
2134
  for (var b = this._hash, E = b.words, k = 0; k < 4; k++) {
2135
- var S = E[k];
2136
- E[k] = (S << 8 | S >>> 24) & 16711935 | (S << 24 | S >>> 8) & 4278255360;
2135
+ var B = E[k];
2136
+ E[k] = (B << 8 | B >>> 24) & 16711935 | (B << 24 | B >>> 8) & 4278255360;
2137
2137
  }
2138
2138
  return b;
2139
2139
  },
@@ -2409,8 +2409,8 @@ function ee() {
2409
2409
  *
2410
2410
  * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
2411
2411
  */
2412
- init: function(_, w, B) {
2413
- this.cfg = this.cfg.extend(B), this._xformMode = _, this._key = w, this.reset();
2412
+ init: function(_, w, S) {
2413
+ this.cfg = this.cfg.extend(S), this._xformMode = _, this._key = w, this.reset();
2414
2414
  },
2415
2415
  /**
2416
2416
  * Resets this cipher to its initial state.
@@ -2479,11 +2479,11 @@ function ee() {
2479
2479
  }
2480
2480
  return function(w) {
2481
2481
  return {
2482
- encrypt: function(B, I, O) {
2483
- return _(I).encrypt(w, B, I, O);
2482
+ encrypt: function(S, I, O) {
2483
+ return _(I).encrypt(w, S, I, O);
2484
2484
  },
2485
- decrypt: function(B, I, O) {
2486
- return _(I).decrypt(w, B, I, O);
2485
+ decrypt: function(S, I, O) {
2486
+ return _(I).decrypt(w, S, I, O);
2487
2487
  }
2488
2488
  };
2489
2489
  };
@@ -2553,9 +2553,9 @@ function ee() {
2553
2553
  *
2554
2554
  * mode.processBlock(data.words, offset);
2555
2555
  */
2556
- processBlock: function(B, I) {
2556
+ processBlock: function(S, I) {
2557
2557
  var O = this._cipher, U = O.blockSize;
2558
- w.call(this, B, I, U), O.encryptBlock(B, I), this._prevBlock = B.slice(I, I + U);
2558
+ w.call(this, S, I, U), O.encryptBlock(S, I), this._prevBlock = S.slice(I, I + U);
2559
2559
  }
2560
2560
  }), _.Decryptor = _.extend({
2561
2561
  /**
@@ -2568,16 +2568,16 @@ function ee() {
2568
2568
  *
2569
2569
  * mode.processBlock(data.words, offset);
2570
2570
  */
2571
- processBlock: function(B, I) {
2572
- var O = this._cipher, U = O.blockSize, H = B.slice(I, I + U);
2573
- O.decryptBlock(B, I), w.call(this, B, I, U), this._prevBlock = H;
2571
+ processBlock: function(S, I) {
2572
+ var O = this._cipher, U = O.blockSize, H = S.slice(I, I + U);
2573
+ O.decryptBlock(S, I), w.call(this, S, I, U), this._prevBlock = H;
2574
2574
  }
2575
2575
  });
2576
- function w(B, I, O) {
2576
+ function w(S, I, O) {
2577
2577
  var U, H = this._iv;
2578
2578
  H ? (U = H, this._iv = s) : U = this._prevBlock;
2579
2579
  for (var Y = 0; Y < O; Y++)
2580
- B[I + Y] ^= U[Y];
2580
+ S[I + Y] ^= U[Y];
2581
2581
  }
2582
2582
  return _;
2583
2583
  }(), $ = n.pad = {}, l = $.Pkcs7 = {
@@ -2594,7 +2594,7 @@ function ee() {
2594
2594
  * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
2595
2595
  */
2596
2596
  pad: function(_, w) {
2597
- for (var B = w * 4, I = B - _.sigBytes % B, O = I << 24 | I << 16 | I << 8 | I, U = [], H = 0; H < I; H += 4)
2597
+ for (var S = w * 4, I = S - _.sigBytes % S, O = I << 24 | I << 16 | I << 8 | I, U = [], H = 0; H < I; H += 4)
2598
2598
  U.push(O);
2599
2599
  var Y = d.create(U, I);
2600
2600
  _.concat(Y);
@@ -2629,8 +2629,8 @@ function ee() {
2629
2629
  reset: function() {
2630
2630
  var _;
2631
2631
  u.reset.call(this);
2632
- var w = this.cfg, B = w.iv, I = w.mode;
2633
- this._xformMode == this._ENC_XFORM_MODE ? _ = I.createEncryptor : (_ = I.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == _ ? this._mode.init(this, B && B.words) : (this._mode = _.call(I, this, B && B.words), this._mode.__creator = _);
2632
+ var w = this.cfg, S = w.iv, I = w.mode;
2633
+ this._xformMode == this._ENC_XFORM_MODE ? _ = I.createEncryptor : (_ = I.createDecryptor, this._minBufferSize = 1), this._mode && this._mode.__creator == _ ? this._mode.init(this, S && S.words) : (this._mode = _.call(I, this, S && S.words), this._mode.__creator = _);
2634
2634
  },
2635
2635
  _doProcessBlock: function(_, w) {
2636
2636
  this._mode.processBlock(_, w);
@@ -2697,8 +2697,8 @@ function ee() {
2697
2697
  * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
2698
2698
  */
2699
2699
  stringify: function(_) {
2700
- var w, B = _.ciphertext, I = _.salt;
2701
- return I ? w = d.create([1398893684, 1701076831]).concat(I).concat(B) : w = B, w.toString(c);
2700
+ var w, S = _.ciphertext, I = _.salt;
2701
+ return I ? w = d.create([1398893684, 1701076831]).concat(I).concat(S) : w = S, w.toString(c);
2702
2702
  },
2703
2703
  /**
2704
2704
  * Converts an OpenSSL-compatible string to a cipher params object.
@@ -2714,8 +2714,8 @@ function ee() {
2714
2714
  * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
2715
2715
  */
2716
2716
  parse: function(_) {
2717
- var w, B = c.parse(_), I = B.words;
2718
- return I[0] == 1398893684 && I[1] == 1701076831 && (w = d.create(I.slice(2, 4)), I.splice(0, 4), B.sigBytes -= 16), f.create({ ciphertext: B, salt: w });
2717
+ var w, S = c.parse(_), I = S.words;
2718
+ return I[0] == 1398893684 && I[1] == 1701076831 && (w = d.create(I.slice(2, 4)), I.splice(0, 4), S.sigBytes -= 16), f.create({ ciphertext: S, salt: w });
2719
2719
  }
2720
2720
  }, E = i.SerializableCipher = x.extend({
2721
2721
  /**
@@ -2744,12 +2744,12 @@ function ee() {
2744
2744
  * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
2745
2745
  * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
2746
2746
  */
2747
- encrypt: function(_, w, B, I) {
2747
+ encrypt: function(_, w, S, I) {
2748
2748
  I = this.cfg.extend(I);
2749
- var O = _.createEncryptor(B, I), U = O.finalize(w), H = O.cfg;
2749
+ var O = _.createEncryptor(S, I), U = O.finalize(w), H = O.cfg;
2750
2750
  return f.create({
2751
2751
  ciphertext: U,
2752
- key: B,
2752
+ key: S,
2753
2753
  iv: H.iv,
2754
2754
  algorithm: _,
2755
2755
  mode: H.mode,
@@ -2775,9 +2775,9 @@ function ee() {
2775
2775
  * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
2776
2776
  * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
2777
2777
  */
2778
- decrypt: function(_, w, B, I) {
2778
+ decrypt: function(_, w, S, I) {
2779
2779
  I = this.cfg.extend(I), w = this._parse(w, I.format);
2780
- var O = _.createDecryptor(B, I).finalize(w.ciphertext);
2780
+ var O = _.createDecryptor(S, I).finalize(w.ciphertext);
2781
2781
  return O;
2782
2782
  },
2783
2783
  /**
@@ -2798,7 +2798,7 @@ function ee() {
2798
2798
  _parse: function(_, w) {
2799
2799
  return typeof _ == "string" ? w.parse(_, this) : _;
2800
2800
  }
2801
- }), k = n.kdf = {}, S = k.OpenSSL = {
2801
+ }), k = n.kdf = {}, B = k.OpenSSL = {
2802
2802
  /**
2803
2803
  * Derives a key and IV from a password.
2804
2804
  *
@@ -2816,9 +2816,9 @@ function ee() {
2816
2816
  * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
2817
2817
  * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
2818
2818
  */
2819
- execute: function(_, w, B, I) {
2819
+ execute: function(_, w, S, I) {
2820
2820
  I || (I = d.random(64 / 8));
2821
- var O = o.create({ keySize: w + B }).compute(_, I), U = d.create(O.words.slice(w), B * 4);
2821
+ var O = o.create({ keySize: w + S }).compute(_, I), U = d.create(O.words.slice(w), S * 4);
2822
2822
  return O.sigBytes = w * 4, f.create({ key: O, iv: U, salt: I });
2823
2823
  }
2824
2824
  }, A = i.PasswordBasedCipher = E.extend({
@@ -2828,7 +2828,7 @@ function ee() {
2828
2828
  * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
2829
2829
  */
2830
2830
  cfg: E.cfg.extend({
2831
- kdf: S
2831
+ kdf: B
2832
2832
  }),
2833
2833
  /**
2834
2834
  * Encrypts a message using a password.
@@ -2847,9 +2847,9 @@ function ee() {
2847
2847
  * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
2848
2848
  * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
2849
2849
  */
2850
- encrypt: function(_, w, B, I) {
2850
+ encrypt: function(_, w, S, I) {
2851
2851
  I = this.cfg.extend(I);
2852
- var O = I.kdf.execute(B, _.keySize, _.ivSize);
2852
+ var O = I.kdf.execute(S, _.keySize, _.ivSize);
2853
2853
  I.iv = O.iv;
2854
2854
  var U = E.encrypt.call(this, _, w, O.key, I);
2855
2855
  return U.mixIn(O), U;
@@ -2871,9 +2871,9 @@ function ee() {
2871
2871
  * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
2872
2872
  * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
2873
2873
  */
2874
- decrypt: function(_, w, B, I) {
2874
+ decrypt: function(_, w, S, I) {
2875
2875
  I = this.cfg.extend(I), w = this._parse(w, I.format);
2876
- var O = I.kdf.execute(B, _.keySize, _.ivSize, w.salt);
2876
+ var O = I.kdf.execute(S, _.keySize, _.ivSize, w.salt);
2877
2877
  I.iv = O.iv;
2878
2878
  var U = E.decrypt.call(this, _, w, O.key, I);
2879
2879
  return U;
@@ -2897,25 +2897,25 @@ function xs() {
2897
2897
  for (var b = 0, E = 0, m = 0; m < 256; m++) {
2898
2898
  var k = E ^ E << 1 ^ E << 2 ^ E << 3 ^ E << 4;
2899
2899
  k = k >>> 8 ^ k & 255 ^ 99, d[b] = k, p[k] = b;
2900
- var S = f[b], A = f[S], _ = f[A], w = f[k] * 257 ^ k * 16843008;
2900
+ var B = f[b], A = f[B], _ = f[A], w = f[k] * 257 ^ k * 16843008;
2901
2901
  a[b] = w << 24 | w >>> 8, c[b] = w << 16 | w >>> 16, y[b] = w << 8 | w >>> 24, o[b] = w;
2902
- var w = _ * 16843009 ^ A * 65537 ^ S * 257 ^ b * 16843008;
2903
- u[k] = w << 24 | w >>> 8, h[k] = w << 16 | w >>> 16, v[k] = w << 8 | w >>> 24, g[k] = w, b ? (b = S ^ f[f[f[_ ^ S]]], E ^= f[f[E]]) : b = E = 1;
2902
+ var w = _ * 16843009 ^ A * 65537 ^ B * 257 ^ b * 16843008;
2903
+ u[k] = w << 24 | w >>> 8, h[k] = w << 16 | w >>> 16, v[k] = w << 8 | w >>> 24, g[k] = w, b ? (b = B ^ f[f[f[_ ^ B]]], E ^= f[f[E]]) : b = E = 1;
2904
2904
  }
2905
2905
  })();
2906
2906
  var $ = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], l = x.AES = i.extend({
2907
2907
  _doReset: function() {
2908
2908
  var f;
2909
2909
  if (!(this._nRounds && this._keyPriorReset === this._key)) {
2910
- for (var m = this._keyPriorReset = this._key, b = m.words, E = m.sigBytes / 4, k = this._nRounds = E + 6, S = (k + 1) * 4, A = this._keySchedule = [], _ = 0; _ < S; _++)
2910
+ for (var m = this._keyPriorReset = this._key, b = m.words, E = m.sigBytes / 4, k = this._nRounds = E + 6, B = (k + 1) * 4, A = this._keySchedule = [], _ = 0; _ < B; _++)
2911
2911
  _ < E ? A[_] = b[_] : (f = A[_ - 1], _ % E ? E > 6 && _ % E == 4 && (f = d[f >>> 24] << 24 | d[f >>> 16 & 255] << 16 | d[f >>> 8 & 255] << 8 | d[f & 255]) : (f = f << 8 | f >>> 24, f = d[f >>> 24] << 24 | d[f >>> 16 & 255] << 16 | d[f >>> 8 & 255] << 8 | d[f & 255], f ^= $[_ / E | 0] << 24), A[_] = A[_ - E] ^ f);
2912
- for (var w = this._invKeySchedule = [], B = 0; B < S; B++) {
2913
- var _ = S - B;
2914
- if (B % 4)
2912
+ for (var w = this._invKeySchedule = [], S = 0; S < B; S++) {
2913
+ var _ = B - S;
2914
+ if (S % 4)
2915
2915
  var f = A[_];
2916
2916
  else
2917
2917
  var f = A[_ - 4];
2918
- B < 4 || _ <= 4 ? w[B] = f : w[B] = u[d[f >>> 24]] ^ h[d[f >>> 16 & 255]] ^ v[d[f >>> 8 & 255]] ^ g[d[f & 255]];
2918
+ S < 4 || _ <= 4 ? w[S] = f : w[S] = u[d[f >>> 24]] ^ h[d[f >>> 16 & 255]] ^ v[d[f >>> 8 & 255]] ^ g[d[f & 255]];
2919
2919
  }
2920
2920
  }
2921
2921
  },
@@ -2928,12 +2928,12 @@ function xs() {
2928
2928
  var b = f[m + 1];
2929
2929
  f[m + 1] = f[m + 3], f[m + 3] = b;
2930
2930
  },
2931
- _doCryptBlock: function(f, m, b, E, k, S, A, _) {
2932
- for (var w = this._nRounds, B = f[m] ^ b[0], I = f[m + 1] ^ b[1], O = f[m + 2] ^ b[2], U = f[m + 3] ^ b[3], H = 4, Y = 1; Y < w; Y++) {
2933
- var j = E[B >>> 24] ^ k[I >>> 16 & 255] ^ S[O >>> 8 & 255] ^ A[U & 255] ^ b[H++], X = E[I >>> 24] ^ k[O >>> 16 & 255] ^ S[U >>> 8 & 255] ^ A[B & 255] ^ b[H++], K = E[O >>> 24] ^ k[U >>> 16 & 255] ^ S[B >>> 8 & 255] ^ A[I & 255] ^ b[H++], P = E[U >>> 24] ^ k[B >>> 16 & 255] ^ S[I >>> 8 & 255] ^ A[O & 255] ^ b[H++];
2934
- B = j, I = X, O = K, U = P;
2931
+ _doCryptBlock: function(f, m, b, E, k, B, A, _) {
2932
+ for (var w = this._nRounds, S = f[m] ^ b[0], I = f[m + 1] ^ b[1], O = f[m + 2] ^ b[2], U = f[m + 3] ^ b[3], H = 4, Y = 1; Y < w; Y++) {
2933
+ var j = E[S >>> 24] ^ k[I >>> 16 & 255] ^ B[O >>> 8 & 255] ^ A[U & 255] ^ b[H++], X = E[I >>> 24] ^ k[O >>> 16 & 255] ^ B[U >>> 8 & 255] ^ A[S & 255] ^ b[H++], K = E[O >>> 24] ^ k[U >>> 16 & 255] ^ B[S >>> 8 & 255] ^ A[I & 255] ^ b[H++], P = E[U >>> 24] ^ k[S >>> 16 & 255] ^ B[I >>> 8 & 255] ^ A[O & 255] ^ b[H++];
2934
+ S = j, I = X, O = K, U = P;
2935
2935
  }
2936
- var j = (_[B >>> 24] << 24 | _[I >>> 16 & 255] << 16 | _[O >>> 8 & 255] << 8 | _[U & 255]) ^ b[H++], X = (_[I >>> 24] << 24 | _[O >>> 16 & 255] << 16 | _[U >>> 8 & 255] << 8 | _[B & 255]) ^ b[H++], K = (_[O >>> 24] << 24 | _[U >>> 16 & 255] << 16 | _[B >>> 8 & 255] << 8 | _[I & 255]) ^ b[H++], P = (_[U >>> 24] << 24 | _[B >>> 16 & 255] << 16 | _[I >>> 8 & 255] << 8 | _[O & 255]) ^ b[H++];
2936
+ var j = (_[S >>> 24] << 24 | _[I >>> 16 & 255] << 16 | _[O >>> 8 & 255] << 8 | _[U & 255]) ^ b[H++], X = (_[I >>> 24] << 24 | _[O >>> 16 & 255] << 16 | _[U >>> 8 & 255] << 8 | _[S & 255]) ^ b[H++], K = (_[O >>> 24] << 24 | _[U >>> 16 & 255] << 16 | _[S >>> 8 & 255] << 8 | _[I & 255]) ^ b[H++], P = (_[U >>> 24] << 24 | _[S >>> 16 & 255] << 16 | _[I >>> 8 & 255] << 8 | _[O & 255]) ^ b[H++];
2937
2937
  f[m] = j, f[m + 1] = X, f[m + 2] = K, f[m + 3] = P;
2938
2938
  },
2939
2939
  keySize: 256 / 32
@@ -4618,7 +4618,7 @@ class ki extends ge {
4618
4618
  this.$present(document.querySelector("body").className) && (document.querySelector("body").className = document.querySelector("body").className.replace(/bootpay-open/gi, "")), this.$present(this.byId(this.$windowId)) && (this.byId(this.$windowId).outerHTML = ""), document.body.classList.remove("bootpay-open"), ie.clearPollingEvent(), setTimeout(() => ie.callBootpayDOMEvent("close"), 300);
4619
4619
  }
4620
4620
  }
4621
- const vs = new ki(), Si = {
4621
+ const vs = new ki(), Bi = {
4622
4622
  $templateUserToken: vs,
4623
4623
  /**
4624
4624
  * Password Token을 가져온다
@@ -4785,9 +4785,9 @@ const vs = new ki(), Si = {
4785
4785
  });
4786
4786
  }
4787
4787
  };
4788
- typeof window < "u" && (window.BootpaySDK = Si);
4789
- var Bi = Ue();
4790
- const Or = /* @__PURE__ */ ze(Bi), br = {
4788
+ typeof window < "u" && (window.BootpaySDK = Bi);
4789
+ var Si = Ue();
4790
+ const Or = /* @__PURE__ */ ze(Si), br = {
4791
4791
  parameterPrefix: "__b_",
4792
4792
  // query string url 업데이트를 진행한다
4793
4793
  updateParameters({ parameters: t, replace: e }) {
@@ -5030,9 +5030,9 @@ function gt() {
5030
5030
  });
5031
5031
  }(Kt)), Kt.exports;
5032
5032
  }
5033
- var Gt = { exports: {} }, S0;
5033
+ var Gt = { exports: {} }, B0;
5034
5034
  function Pi() {
5035
- return S0 || (S0 = 1, function(t, e) {
5035
+ return B0 || (B0 = 1, function(t, e) {
5036
5036
  (function(r, s) {
5037
5037
  t.exports = s(z());
5038
5038
  })(M, function(r) {
@@ -5052,9 +5052,9 @@ function Pi() {
5052
5052
  });
5053
5053
  }(Gt)), Gt.exports;
5054
5054
  }
5055
- var Xt = { exports: {} }, B0;
5055
+ var Xt = { exports: {} }, S0;
5056
5056
  function Ii() {
5057
- return B0 || (B0 = 1, function(t, e) {
5057
+ return S0 || (S0 = 1, function(t, e) {
5058
5058
  (function(r, s) {
5059
5059
  t.exports = s(z());
5060
5060
  })(M, function(r) {
@@ -5252,14 +5252,14 @@ function ms() {
5252
5252
  this._hash = new x.init(a.slice(0));
5253
5253
  },
5254
5254
  _doProcessBlock: function(u, h) {
5255
- for (var v = this._hash.words, g = v[0], $ = v[1], l = v[2], f = v[3], m = v[4], b = v[5], E = v[6], k = v[7], S = 0; S < 64; S++) {
5256
- if (S < 16)
5257
- y[S] = u[h + S] | 0;
5255
+ for (var v = this._hash.words, g = v[0], $ = v[1], l = v[2], f = v[3], m = v[4], b = v[5], E = v[6], k = v[7], B = 0; B < 64; B++) {
5256
+ if (B < 16)
5257
+ y[B] = u[h + B] | 0;
5258
5258
  else {
5259
- var A = y[S - 15], _ = (A << 25 | A >>> 7) ^ (A << 14 | A >>> 18) ^ A >>> 3, w = y[S - 2], B = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
5260
- y[S] = _ + y[S - 7] + B + y[S - 16];
5259
+ var A = y[B - 15], _ = (A << 25 | A >>> 7) ^ (A << 14 | A >>> 18) ^ A >>> 3, w = y[B - 2], S = (w << 15 | w >>> 17) ^ (w << 13 | w >>> 19) ^ w >>> 10;
5260
+ y[B] = _ + y[B - 7] + S + y[B - 16];
5261
5261
  }
5262
- var I = m & b ^ ~m & E, O = g & $ ^ g & l ^ $ & l, U = (g << 30 | g >>> 2) ^ (g << 19 | g >>> 13) ^ (g << 10 | g >>> 22), H = (m << 26 | m >>> 6) ^ (m << 21 | m >>> 11) ^ (m << 7 | m >>> 25), Y = k + H + I + c[S] + y[S], j = U + O;
5262
+ var I = m & b ^ ~m & E, O = g & $ ^ g & l ^ $ & l, U = (g << 30 | g >>> 2) ^ (g << 19 | g >>> 13) ^ (g << 10 | g >>> 22), H = (m << 26 | m >>> 6) ^ (m << 21 | m >>> 11) ^ (m << 7 | m >>> 25), Y = k + H + I + c[B] + y[B], j = U + O;
5263
5263
  k = E, E = b, b = m, m = f + Y | 0, f = l, l = $, $ = g, g = Y + j | 0;
5264
5264
  }
5265
5265
  v[0] = v[0] + g | 0, v[1] = v[1] + $ | 0, v[2] = v[2] + l | 0, v[3] = v[3] + f | 0, v[4] = v[4] + m | 0, v[5] = v[5] + b | 0, v[6] = v[6] + E | 0, v[7] = v[7] + k | 0;
@@ -5419,18 +5419,18 @@ function gs() {
5419
5419
  ]);
5420
5420
  },
5421
5421
  _doProcessBlock: function(h, v) {
5422
- for (var g = this._hash.words, $ = g[0], l = g[1], f = g[2], m = g[3], b = g[4], E = g[5], k = g[6], S = g[7], A = $.high, _ = $.low, w = l.high, B = l.low, I = f.high, O = f.low, U = m.high, H = m.low, Y = b.high, j = b.low, X = E.high, K = E.low, P = k.high, T = k.low, R = S.high, C = S.low, J = A, V = _, ne = w, L = B, Ke = I, Fe = O, bt = U, Ge = H, fe = Y, ce = j, at = X, Xe = K, ct = P, Ve = T, _t = R, Ye = C, xe = 0; xe < 80; xe++) {
5422
+ for (var g = this._hash.words, $ = g[0], l = g[1], f = g[2], m = g[3], b = g[4], E = g[5], k = g[6], B = g[7], A = $.high, _ = $.low, w = l.high, S = l.low, I = f.high, O = f.low, U = m.high, H = m.low, Y = b.high, j = b.low, X = E.high, K = E.low, P = k.high, T = k.low, R = B.high, C = B.low, J = A, V = _, ne = w, L = S, Ke = I, Fe = O, bt = U, Ge = H, fe = Y, ce = j, at = X, Xe = K, ct = P, Ve = T, _t = R, Ye = C, xe = 0; xe < 80; xe++) {
5423
5423
  var ue, be, dt = o[xe];
5424
5424
  if (xe < 16)
5425
5425
  be = dt.high = h[v + xe * 2] | 0, ue = dt.low = h[v + xe * 2 + 1] | 0;
5426
5426
  else {
5427
- var Ur = o[xe - 15], He = Ur.high, Je = Ur.low, $s = (He >>> 1 | Je << 31) ^ (He >>> 8 | Je << 24) ^ He >>> 7, Dr = (Je >>> 1 | He << 31) ^ (Je >>> 8 | He << 24) ^ (Je >>> 7 | He << 25), Fr = o[xe - 2], Ne = Fr.high, Ze = Fr.low, Es = (Ne >>> 19 | Ze << 13) ^ (Ne << 3 | Ze >>> 29) ^ Ne >>> 6, Hr = (Ze >>> 19 | Ne << 13) ^ (Ze << 3 | Ne >>> 29) ^ (Ze >>> 6 | Ne << 26), Nr = o[xe - 7], ks = Nr.high, Ss = Nr.low, Mr = o[xe - 16], Bs = Mr.high, Lr = Mr.low;
5428
- ue = Dr + Ss, be = $s + ks + (ue >>> 0 < Dr >>> 0 ? 1 : 0), ue = ue + Hr, be = be + Es + (ue >>> 0 < Hr >>> 0 ? 1 : 0), ue = ue + Lr, be = be + Bs + (ue >>> 0 < Lr >>> 0 ? 1 : 0), dt.high = be, dt.low = ue;
5427
+ var Ur = o[xe - 15], He = Ur.high, Je = Ur.low, $s = (He >>> 1 | Je << 31) ^ (He >>> 8 | Je << 24) ^ He >>> 7, Dr = (Je >>> 1 | He << 31) ^ (Je >>> 8 | He << 24) ^ (Je >>> 7 | He << 25), Fr = o[xe - 2], Ne = Fr.high, Ze = Fr.low, Es = (Ne >>> 19 | Ze << 13) ^ (Ne << 3 | Ze >>> 29) ^ Ne >>> 6, Hr = (Ze >>> 19 | Ne << 13) ^ (Ze << 3 | Ne >>> 29) ^ (Ze >>> 6 | Ne << 26), Nr = o[xe - 7], ks = Nr.high, Bs = Nr.low, Mr = o[xe - 16], Ss = Mr.high, Lr = Mr.low;
5428
+ ue = Dr + Bs, be = $s + ks + (ue >>> 0 < Dr >>> 0 ? 1 : 0), ue = ue + Hr, be = be + Es + (ue >>> 0 < Hr >>> 0 ? 1 : 0), ue = ue + Lr, be = be + Ss + (ue >>> 0 < Lr >>> 0 ? 1 : 0), dt.high = be, dt.low = ue;
5429
5429
  }
5430
5430
  var Ps = fe & at ^ ~fe & ct, qr = ce & Xe ^ ~ce & Ve, Is = J & ne ^ J & Ke ^ ne & Ke, Cs = V & L ^ V & Fe ^ L & Fe, Ts = (J >>> 28 | V << 4) ^ (J << 30 | V >>> 2) ^ (J << 25 | V >>> 7), Wr = (V >>> 28 | J << 4) ^ (V << 30 | J >>> 2) ^ (V << 25 | J >>> 7), Rs = (fe >>> 14 | ce << 18) ^ (fe >>> 18 | ce << 14) ^ (fe << 23 | ce >>> 9), As = (ce >>> 14 | fe << 18) ^ (ce >>> 18 | fe << 14) ^ (ce << 23 | fe >>> 9), zr = y[xe], Os = zr.high, jr = zr.low, de = Ye + As, _e = _t + Rs + (de >>> 0 < Ye >>> 0 ? 1 : 0), de = de + qr, _e = _e + Ps + (de >>> 0 < qr >>> 0 ? 1 : 0), de = de + jr, _e = _e + Os + (de >>> 0 < jr >>> 0 ? 1 : 0), de = de + ue, _e = _e + be + (de >>> 0 < ue >>> 0 ? 1 : 0), Kr = Wr + Cs, Us = Ts + Is + (Kr >>> 0 < Wr >>> 0 ? 1 : 0);
5431
5431
  _t = ct, Ye = Ve, ct = at, Ve = Xe, at = fe, Xe = ce, ce = Ge + de | 0, fe = bt + _e + (ce >>> 0 < Ge >>> 0 ? 1 : 0) | 0, bt = Ke, Ge = Fe, Ke = ne, Fe = L, ne = J, L = V, V = de + Kr | 0, J = _e + Us + (V >>> 0 < de >>> 0 ? 1 : 0) | 0;
5432
5432
  }
5433
- _ = $.low = _ + V, $.high = A + J + (_ >>> 0 < V >>> 0 ? 1 : 0), B = l.low = B + L, l.high = w + ne + (B >>> 0 < L >>> 0 ? 1 : 0), O = f.low = O + Fe, f.high = I + Ke + (O >>> 0 < Fe >>> 0 ? 1 : 0), H = m.low = H + Ge, m.high = U + bt + (H >>> 0 < Ge >>> 0 ? 1 : 0), j = b.low = j + ce, b.high = Y + fe + (j >>> 0 < ce >>> 0 ? 1 : 0), K = E.low = K + Xe, E.high = X + at + (K >>> 0 < Xe >>> 0 ? 1 : 0), T = k.low = T + Ve, k.high = P + ct + (T >>> 0 < Ve >>> 0 ? 1 : 0), C = S.low = C + Ye, S.high = R + _t + (C >>> 0 < Ye >>> 0 ? 1 : 0);
5433
+ _ = $.low = _ + V, $.high = A + J + (_ >>> 0 < V >>> 0 ? 1 : 0), S = l.low = S + L, l.high = w + ne + (S >>> 0 < L >>> 0 ? 1 : 0), O = f.low = O + Fe, f.high = I + Ke + (O >>> 0 < Fe >>> 0 ? 1 : 0), H = m.low = H + Ge, m.high = U + bt + (H >>> 0 < Ge >>> 0 ? 1 : 0), j = b.low = j + ce, b.high = Y + fe + (j >>> 0 < ce >>> 0 ? 1 : 0), K = E.low = K + Xe, E.high = X + at + (K >>> 0 < Xe >>> 0 ? 1 : 0), T = k.low = T + Ve, k.high = P + ct + (T >>> 0 < Ve >>> 0 ? 1 : 0), C = B.low = C + Ye, B.high = R + _t + (C >>> 0 < Ye >>> 0 ? 1 : 0);
5434
5434
  },
5435
5435
  _doFinalize: function() {
5436
5436
  var h = this._data, v = h.words, g = this._nDataBytes * 8, $ = h.sigBytes * 8;
@@ -5497,14 +5497,14 @@ function Ai() {
5497
5497
  for (var $ = 0; $ < 5; $++)
5498
5498
  o[g + 5 * $] = $ + (2 * g + 3 * $) % 5 * 5;
5499
5499
  for (var b = 1, E = 0; E < 24; E++) {
5500
- for (var k = 0, S = 0, A = 0; A < 7; A++) {
5500
+ for (var k = 0, B = 0, A = 0; A < 7; A++) {
5501
5501
  if (b & 1) {
5502
5502
  var _ = (1 << A) - 1;
5503
- _ < 32 ? S ^= 1 << _ : k ^= 1 << _ - 32;
5503
+ _ < 32 ? B ^= 1 << _ : k ^= 1 << _ - 32;
5504
5504
  }
5505
5505
  b & 128 ? b = b << 1 ^ 113 : b <<= 1;
5506
5506
  }
5507
- u[E] = a.create(k, S);
5507
+ u[E] = a.create(k, B);
5508
5508
  }
5509
5509
  })();
5510
5510
  var h = [];
@@ -5536,18 +5536,18 @@ function Ai() {
5536
5536
  var k = l[m];
5537
5537
  k.high ^= E, k.low ^= b;
5538
5538
  }
5539
- for (var S = 0; S < 24; S++) {
5539
+ for (var B = 0; B < 24; B++) {
5540
5540
  for (var A = 0; A < 5; A++) {
5541
- for (var _ = 0, w = 0, B = 0; B < 5; B++) {
5542
- var k = l[A + 5 * B];
5541
+ for (var _ = 0, w = 0, S = 0; S < 5; S++) {
5542
+ var k = l[A + 5 * S];
5543
5543
  _ ^= k.high, w ^= k.low;
5544
5544
  }
5545
5545
  var I = h[A];
5546
5546
  I.high = _, I.low = w;
5547
5547
  }
5548
5548
  for (var A = 0; A < 5; A++)
5549
- for (var O = h[(A + 4) % 5], U = h[(A + 1) % 5], H = U.high, Y = U.low, _ = O.high ^ (H << 1 | Y >>> 31), w = O.low ^ (Y << 1 | H >>> 31), B = 0; B < 5; B++) {
5550
- var k = l[A + 5 * B];
5549
+ for (var O = h[(A + 4) % 5], U = h[(A + 1) % 5], H = U.high, Y = U.low, _ = O.high ^ (H << 1 | Y >>> 31), w = O.low ^ (Y << 1 | H >>> 31), S = 0; S < 5; S++) {
5550
+ var k = l[A + 5 * S];
5551
5551
  k.high ^= _, k.low ^= w;
5552
5552
  }
5553
5553
  for (var j = 1; j < 25; j++) {
@@ -5559,11 +5559,11 @@ function Ai() {
5559
5559
  var R = h[0], C = l[0];
5560
5560
  R.high = C.high, R.low = C.low;
5561
5561
  for (var A = 0; A < 5; A++)
5562
- for (var B = 0; B < 5; B++) {
5563
- var j = A + 5 * B, k = l[j], J = h[j], V = h[(A + 1) % 5 + 5 * B], ne = h[(A + 2) % 5 + 5 * B];
5562
+ for (var S = 0; S < 5; S++) {
5563
+ var j = A + 5 * S, k = l[j], J = h[j], V = h[(A + 1) % 5 + 5 * S], ne = h[(A + 2) % 5 + 5 * S];
5564
5564
  k.high = J.high ^ ~V.high & ne.high, k.low = J.low ^ ~V.low & ne.low;
5565
5565
  }
5566
- var k = l[0], L = u[S];
5566
+ var k = l[0], L = u[B];
5567
5567
  k.high ^= L.high, k.low ^= L.low;
5568
5568
  }
5569
5569
  },
@@ -5572,8 +5572,8 @@ function Ai() {
5572
5572
  this._nDataBytes * 8;
5573
5573
  var l = g.sigBytes * 8, f = this.blockSize * 32;
5574
5574
  $[l >>> 5] |= 1 << 24 - l % 32, $[(s.ceil((l + 1) / f) * f >>> 5) - 1] |= 128, g.sigBytes = $.length * 4, this._process();
5575
- for (var m = this._state, b = this.cfg.outputLength / 8, E = b / 8, k = [], S = 0; S < E; S++) {
5576
- var A = m[S], _ = A.high, w = A.low;
5575
+ for (var m = this._state, b = this.cfg.outputLength / 8, E = b / 8, k = [], B = 0; B < E; B++) {
5576
+ var A = m[B], _ = A.high, w = A.low;
5577
5577
  _ = (_ << 8 | _ >>> 24) & 16711935 | (_ << 24 | _ >>> 8) & 4278255360, w = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360, k.push(w), k.push(_);
5578
5578
  }
5579
5579
  return new x.init(k, b);
@@ -5935,22 +5935,22 @@ function Oi() {
5935
5935
  this._hash = x.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
5936
5936
  },
5937
5937
  _doProcessBlock: function(E, k) {
5938
- for (var S = 0; S < 16; S++) {
5939
- var A = k + S, _ = E[A];
5938
+ for (var B = 0; B < 16; B++) {
5939
+ var A = k + B, _ = E[A];
5940
5940
  E[A] = (_ << 8 | _ >>> 24) & 16711935 | (_ << 24 | _ >>> 8) & 4278255360;
5941
5941
  }
5942
- var w = this._hash.words, B = u.words, I = h.words, O = a.words, U = c.words, H = y.words, Y = o.words, j, X, K, P, T, R, C, J, V, ne;
5942
+ var w = this._hash.words, S = u.words, I = h.words, O = a.words, U = c.words, H = y.words, Y = o.words, j, X, K, P, T, R, C, J, V, ne;
5943
5943
  R = j = w[0], C = X = w[1], J = K = w[2], V = P = w[3], ne = T = w[4];
5944
- for (var L, S = 0; S < 80; S += 1)
5945
- L = j + E[k + O[S]] | 0, S < 16 ? L += g(X, K, P) + B[0] : S < 32 ? L += $(X, K, P) + B[1] : S < 48 ? L += l(X, K, P) + B[2] : S < 64 ? L += f(X, K, P) + B[3] : L += m(X, K, P) + B[4], L = L | 0, L = b(L, H[S]), L = L + T | 0, j = T, T = P, P = b(K, 10), K = X, X = L, L = R + E[k + U[S]] | 0, S < 16 ? L += m(C, J, V) + I[0] : S < 32 ? L += f(C, J, V) + I[1] : S < 48 ? L += l(C, J, V) + I[2] : S < 64 ? L += $(C, J, V) + I[3] : L += g(C, J, V) + I[4], L = L | 0, L = b(L, Y[S]), L = L + ne | 0, R = ne, ne = V, V = b(J, 10), J = C, C = L;
5944
+ for (var L, B = 0; B < 80; B += 1)
5945
+ L = j + E[k + O[B]] | 0, B < 16 ? L += g(X, K, P) + S[0] : B < 32 ? L += $(X, K, P) + S[1] : B < 48 ? L += l(X, K, P) + S[2] : B < 64 ? L += f(X, K, P) + S[3] : L += m(X, K, P) + S[4], L = L | 0, L = b(L, H[B]), L = L + T | 0, j = T, T = P, P = b(K, 10), K = X, X = L, L = R + E[k + U[B]] | 0, B < 16 ? L += m(C, J, V) + I[0] : B < 32 ? L += f(C, J, V) + I[1] : B < 48 ? L += l(C, J, V) + I[2] : B < 64 ? L += $(C, J, V) + I[3] : L += g(C, J, V) + I[4], L = L | 0, L = b(L, Y[B]), L = L + ne | 0, R = ne, ne = V, V = b(J, 10), J = C, C = L;
5946
5946
  L = w[1] + K + V | 0, w[1] = w[2] + P + ne | 0, w[2] = w[3] + T + R | 0, w[3] = w[4] + j + C | 0, w[4] = w[0] + X + J | 0, w[0] = L;
5947
5947
  },
5948
5948
  _doFinalize: function() {
5949
- var E = this._data, k = E.words, S = this._nDataBytes * 8, A = E.sigBytes * 8;
5950
- k[A >>> 5] |= 128 << 24 - A % 32, k[(A + 64 >>> 9 << 4) + 14] = (S << 8 | S >>> 24) & 16711935 | (S << 24 | S >>> 8) & 4278255360, E.sigBytes = (k.length + 1) * 4, this._process();
5951
- for (var _ = this._hash, w = _.words, B = 0; B < 5; B++) {
5952
- var I = w[B];
5953
- w[B] = (I << 8 | I >>> 24) & 16711935 | (I << 24 | I >>> 8) & 4278255360;
5949
+ var E = this._data, k = E.words, B = this._nDataBytes * 8, A = E.sigBytes * 8;
5950
+ k[A >>> 5] |= 128 << 24 - A % 32, k[(A + 64 >>> 9 << 4) + 14] = (B << 8 | B >>> 24) & 16711935 | (B << 24 | B >>> 8) & 4278255360, E.sigBytes = (k.length + 1) * 4, this._process();
5951
+ for (var _ = this._hash, w = _.words, S = 0; S < 5; S++) {
5952
+ var I = w[S];
5953
+ w[S] = (I << 8 | I >>> 24) & 16711935 | (I << 24 | I >>> 8) & 4278255360;
5954
5954
  }
5955
5955
  return _;
5956
5956
  },
@@ -5959,20 +5959,20 @@ function Oi() {
5959
5959
  return E._hash = this._hash.clone(), E;
5960
5960
  }
5961
5961
  });
5962
- function g(E, k, S) {
5963
- return E ^ k ^ S;
5962
+ function g(E, k, B) {
5963
+ return E ^ k ^ B;
5964
5964
  }
5965
- function $(E, k, S) {
5966
- return E & k | ~E & S;
5965
+ function $(E, k, B) {
5966
+ return E & k | ~E & B;
5967
5967
  }
5968
- function l(E, k, S) {
5969
- return (E | ~k) ^ S;
5968
+ function l(E, k, B) {
5969
+ return (E | ~k) ^ B;
5970
5970
  }
5971
- function f(E, k, S) {
5972
- return E & S | k & ~S;
5971
+ function f(E, k, B) {
5972
+ return E & B | k & ~B;
5973
5973
  }
5974
- function m(E, k, S) {
5975
- return E ^ (k | ~S);
5974
+ function m(E, k, B) {
5975
+ return E ^ (k | ~B);
5976
5976
  }
5977
5977
  function b(E, k) {
5978
5978
  return E << k | E >>> 32 - k;
@@ -6032,9 +6032,9 @@ function Ui() {
6032
6032
  for (var u = this.cfg, h = a.create(u.hasher, y), v = x.create(), g = x.create([1]), $ = v.words, l = g.words, f = u.keySize, m = u.iterations; $.length < f; ) {
6033
6033
  var b = h.update(o).finalize(g);
6034
6034
  h.reset();
6035
- for (var E = b.words, k = E.length, S = b, A = 1; A < m; A++) {
6036
- S = h.finalize(S), h.reset();
6037
- for (var _ = S.words, w = 0; w < k; w++)
6035
+ for (var E = b.words, k = E.length, B = b, A = 1; A < m; A++) {
6036
+ B = h.finalize(B), h.reset();
6037
+ for (var _ = B.words, w = 0; w < k; w++)
6038
6038
  E[w] ^= _[w];
6039
6039
  }
6040
6040
  v.concat(b), l[0]++;
@@ -6978,12 +6978,12 @@ function Gi() {
6978
6978
  f[m] = l[b >>> 5] >>> 31 - b % 32 & 1;
6979
6979
  }
6980
6980
  for (var E = this._subKeys = [], k = 0; k < 16; k++) {
6981
- for (var S = E[k] = [], A = c[k], m = 0; m < 24; m++)
6982
- S[m / 6 | 0] |= f[(a[m] - 1 + A) % 28] << 31 - m % 6, S[4 + (m / 6 | 0)] |= f[28 + (a[m + 24] - 1 + A) % 28] << 31 - m % 6;
6983
- S[0] = S[0] << 1 | S[0] >>> 31;
6981
+ for (var B = E[k] = [], A = c[k], m = 0; m < 24; m++)
6982
+ B[m / 6 | 0] |= f[(a[m] - 1 + A) % 28] << 31 - m % 6, B[4 + (m / 6 | 0)] |= f[28 + (a[m + 24] - 1 + A) % 28] << 31 - m % 6;
6983
+ B[0] = B[0] << 1 | B[0] >>> 31;
6984
6984
  for (var m = 1; m < 7; m++)
6985
- S[m] = S[m] >>> (m - 1) * 4 + 3;
6986
- S[7] = S[7] << 5 | S[7] >>> 27;
6985
+ B[m] = B[m] >>> (m - 1) * 4 + 3;
6986
+ B[7] = B[7] << 5 | B[7] >>> 27;
6987
6987
  }
6988
6988
  for (var _ = this._invSubKeys = [], m = 0; m < 16; m++)
6989
6989
  _[m] = E[15 - m];
@@ -6997,9 +6997,9 @@ function Gi() {
6997
6997
  _doCryptBlock: function($, l, f) {
6998
6998
  this._lBlock = $[l], this._rBlock = $[l + 1], h.call(this, 4, 252645135), h.call(this, 16, 65535), v.call(this, 2, 858993459), v.call(this, 8, 16711935), h.call(this, 1, 1431655765);
6999
6999
  for (var m = 0; m < 16; m++) {
7000
- for (var b = f[m], E = this._lBlock, k = this._rBlock, S = 0, A = 0; A < 8; A++)
7001
- S |= y[A][((k ^ b[A]) & o[A]) >>> 0];
7002
- this._lBlock = k, this._rBlock = E ^ S;
7000
+ for (var b = f[m], E = this._lBlock, k = this._rBlock, B = 0, A = 0; A < 8; A++)
7001
+ B |= y[A][((k ^ b[A]) & o[A]) >>> 0];
7002
+ this._lBlock = k, this._rBlock = E ^ B;
7003
7003
  }
7004
7004
  var _ = this._lBlock;
7005
7005
  this._lBlock = this._rBlock, this._rBlock = _, h.call(this, 1, 1431655765), v.call(this, 8, 16711935), v.call(this, 2, 858993459), h.call(this, 16, 65535), h.call(this, 4, 252645135), $[l] = this._lBlock, $[l + 1] = this._rBlock;
@@ -7825,8 +7825,8 @@ const ht = new co(), lo = {
7825
7825
  bootpayWidgetError(t, e) {
7826
7826
  return e.reject(t);
7827
7827
  },
7828
- bootpayWidgetOOpayReload(t) {
7829
- return G.postMessage("bootpayWidgetOOpayReload", t);
7828
+ bootpayWidgetBrandpayReload(t) {
7829
+ return G.postMessage("bootpayWidgetBrandpayReload", t);
7830
7830
  },
7831
7831
  bootpayWidgetResize(t) {
7832
7832
  return this.callBootpayDOMEvent("widget-resize", t), q.callHook("resize", t), G.resize(t);
@@ -7843,7 +7843,7 @@ const ht = new co(), lo = {
7843
7843
  bootpayWidgetPaymentWindowResize(t) {
7844
7844
  return ke.resize(t);
7845
7845
  },
7846
- bootpayWidgetOOpayWindowClose() {
7846
+ bootpayWidgetBrandpayWindowClose() {
7847
7847
  return ke.destroy();
7848
7848
  },
7849
7849
  bootpayWidgetModalOpen(t) {
@@ -8261,7 +8261,7 @@ class xo extends bs {
8261
8261
  }
8262
8262
  const ft = new xo(), ws = {
8263
8263
  resize: (t) => {
8264
- Be.resize(t);
8264
+ Se.resize(t);
8265
8265
  },
8266
8266
  showModal: (t) => {
8267
8267
  Ie.createIFrame(t.url);
@@ -8278,12 +8278,12 @@ const ft = new xo(), ws = {
8278
8278
  t.confirmButtonText,
8279
8279
  t.cancelButtonText,
8280
8280
  () => {
8281
- Be.postMessage("BootpayWalletAlertConfirm", {
8281
+ Se.postMessage("BootpayWalletAlertConfirm", {
8282
8282
  confirm: !0
8283
8283
  });
8284
8284
  },
8285
8285
  () => {
8286
- Be.postMessage("BootpayWalletAlertConfirm", {
8286
+ Se.postMessage("BootpayWalletAlertConfirm", {
8287
8287
  confirm: !1
8288
8288
  });
8289
8289
  },
@@ -8295,10 +8295,10 @@ const ft = new xo(), ws = {
8295
8295
  * @date: 2025-01-17
8296
8296
  */
8297
8297
  addedSuccess: (t) => {
8298
- Be.postMessage("addedSuccess", t);
8298
+ Se.postMessage("addedSuccess", t);
8299
8299
  },
8300
8300
  synchronize: (t) => {
8301
- Be.postMessage("walletDataSynchronize", t);
8301
+ Se.postMessage("walletDataSynchronize", t);
8302
8302
  },
8303
8303
  onReady: (t) => {
8304
8304
  ft.callHook("ready", t);
@@ -8346,7 +8346,7 @@ class mo extends ge {
8346
8346
  this.templateResize(this.el, e);
8347
8347
  }
8348
8348
  }
8349
- const Be = new mo();
8349
+ const Se = new mo();
8350
8350
  class go extends Ae {
8351
8351
  constructor() {
8352
8352
  super();
@@ -8356,7 +8356,7 @@ class go extends Ae {
8356
8356
  throw new Error("application id가 입력되지 않았습니다.");
8357
8357
  if (this.$blank(e))
8358
8358
  throw new Error("지갑을 렌더링할 DOM Element ID를 입력해주세요.");
8359
- ft.set(r), Be.render(e);
8359
+ ft.set(r), Se.render(e);
8360
8360
  }
8361
8361
  }
8362
8362
  const bo = new go(), _o = {
@@ -8369,7 +8369,7 @@ const bo = new go(), _o = {
8369
8369
  Ee.setEnvironmentMode(t, e), D.set(t);
8370
8370
  },
8371
8371
  isRendered() {
8372
- return Be.isRendered();
8372
+ return Se.isRendered();
8373
8373
  },
8374
8374
  synchronizedFromBootpay(t) {
8375
8375
  ws.synchronize(t);
@@ -8379,7 +8379,7 @@ typeof window < "u" && (window.BootpayWallet = _o);
8379
8379
  export {
8380
8380
  Ee as Bootpay,
8381
8381
  D as BootpayEnvironment,
8382
- Si as BootpaySDK,
8382
+ Bi as BootpaySDK,
8383
8383
  no as BootpayStore,
8384
8384
  _o as BootpayWallet,
8385
8385
  fo as BootpayWidget,
package/dist/index.umd.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function(){"use strict";try{if(typeof document<"u"){var o=document.createElement("style");o.appendChild(document.createTextNode('.bootpay-progress-background{position:fixed;display:block;background-color:transparent;left:0;right:0;top:0;bottom:0;text-align:center;z-index:200000;white-space:nowrap}.bootpay-progress-background.blur-off{background-color:transparent}.bootpay-progress-background:before{display:inline-block;height:100%;content:" ";vertical-align:middle}.bootpay-progress-background .progress-message-window{display:inline-block;text-align:center;max-width:600px;border-radius:3px;width:100%;background-color:transparent;padding:0;vertical-align:middle}@media (min-width: 600px){.bootpay-progress-background .progress-message-window{padding:1rem}}.bootpay-progress-background .progress-message-window .bootpay-spinner{display:inline-block;width:50px;height:50px;border-radius:50%;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2);border-left:2px solid #ffffff;animation:spin 1s infinite linear}.bootpay-progress-background .progress-message-window .alfred-text{margin-top:1rem}.bootpay-progress-background .progress-message-window .alfred-text span.alfred-inner-text{font-weight:400;color:#eee}@keyframes spin{0%{transform:rotate(0);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}50%{transform:rotate(180deg);border-left:3px solid #ffffff;border-top:2px solid rgba(255,255,255,.4);border-right:2px solid rgba(255,255,255,.4);border-bottom:2px solid rgba(255,255,255,.4)}to{transform:rotate(360deg);border-left:2px solid #ffffff;border-top:2px solid rgba(255,255,255,.2);border-right:2px solid rgba(255,255,255,.2);border-bottom:2px solid rgba(255,255,255,.2)}}body.bootpay-open{position:fixed!important;left:0;right:0;bottom:0;top:0;padding:0;margin:0;height:100vh!important;overflow:hidden!important;-webkit-overflow-scrolling:auto!important}body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:transparent}@media (min-width: 600px){body.bootpay-open.bootpay-mobile .bootpay-payment-background{background-color:#000000b3}}body.bootpay-open .bootpay-payment-background{position:fixed;left:0;right:0;top:0;bottom:0;display:block;text-align:center;background-color:#000000b3;z-index:9999}body.bootpay-open .bootpay-payment-background:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert{padding:1rem}body.bootpay-open .bootpay-payment-background.__alert:before{display:inline-block;vertical-align:middle;height:100%;content:" "}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{position:absolute;max-width:400px;width:100%;background-color:#fff;border-radius:12px;left:50%;top:50%;transform:translate(-50%,-50%);overflow:hidden;box-shadow:0 0 10px #0000001a}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-in{animation:__bootpay-fade-in .1s linear}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window.fade-out{animation:__bootpay-fade-out .1s linear}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window{left:1rem;right:1rem;width:auto;top:50%;transform:translateY(-50%)}}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header{padding:1rem;text-align:left;font-size:20px;font-weight:600;position:relative}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{top:40%;transform:translateY(-50%);padding:0;right:1rem}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn{right:8px;top:50%;transform:translateY(-55%)}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:before,body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-header>.bootpay-close-btn:after{background-color:#333;width:1px}}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-body{padding:1.5rem 1rem;text-align:center;font-size:16px;color:#333;line-height:1.5}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer{display:flex;justify-content:flex-end;border-top:1px solid #f2f2f2}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close{flex:0 1 50%;padding:1rem;background-color:#fff;color:#333;font-size:16px;cursor:pointer;border:0;outline:none}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.border-right{border-right:1px solid #f2f2f2}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close:hover{background-color:#e0e0e0}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary{color:#507cf3;font-weight:600}body.bootpay-open .bootpay-payment-background.__alert>.bootpay-confirm-window>.bootpay__alert-footer>button.bootpay__alert-close.bootpay-primary:hover{color:#3f6be2}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:relative;display:inline-block;vertical-align:middle}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{max-width:470px;height:90%}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window{position:absolute;left:0;right:0;top:0;bottom:0;border-radius:0!important}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window.__mobile{position:absolute;max-width:inherit;left:0;right:0;top:0;bottom:0;height:100%}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%!important;height:100%!important;border-radius:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.transparent{background:transparent!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{position:absolute;display:none;top:-32px;right:4px;color:#fff;font-size:32px;text-decoration:none;outline:none;box-shadow:none;border:0;background-color:transparent}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#fff!important}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close{top:1rem;right:16px;color:#000;padding:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:before,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>button.bootpay-payment-close:after{width:2px!important;background-color:#000!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:relative;width:400px;height:600px;display:none;background-color:#fff;border-radius:5px;overflow:hidden}@media (max-width: 768px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window{position:absolute;left:0;top:0;bottom:0;right:0;width:100%;height:100%;border-radius:0}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.header{position:absolute;left:0;right:0;top:0;height:50px;color:#333;background-color:#fff;text-align:left}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body{position:absolute;left:0;right:0;top:50px;bottom:72px;padding:1rem;text-align:left;font-size:14px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-item-name-id{font-size:16px;color:#888;font-weight:400!important;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>#bootpay-price-id{font-size:36px;color:#333;font-weight:700;text-align:center;line-height:normal}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.body>.agree-text{position:absolute;bottom:1rem;left:0;right:0;color:#888;font-size:14px;text-align:center}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer{position:absolute;left:0;right:0;bottom:0;height:72px;padding:0 1rem;margin:0}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button{display:block;width:100%;padding:1rem;outline:none;border:none;background-color:#507cf3;border-radius:5px;color:#fff;font-size:16px}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:hover,body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>.bootpay-popup-window>.footer>button.bootpay-button:active{outline:none;box-shadow:none}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:100%;height:100%;display:none;border:0!important;outline:0!important;border-radius:0;box-shadow:none}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe{width:0;height:0;border:0;outline:0;border-radius:0!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{border-radius:0}@media (min-width: 600px){body.bootpay-open .bootpay-payment-background>.bootpay-payment-window>iframe.rounded-iframe{width:0;height:0;border:0;outline:0;border-radius:20px!important;box-shadow:none!important}}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-up{animation:__bootpay-slide-up .3s linear}body.bootpay-open .bootpay-payment-background #__bootpay-modal-iframe.slide-down{animation:__bootpay-slide-down .3s linear}body.bootpay-open .bootpay-payment-background>.bootpay-confirm-window>iframe{display:none;width:1px;height:1px;background:transparent;border:0!important;outline:0!important}.bootpay-close-btn{position:absolute;box-shadow:none;background-color:transparent;outline:0;z-index:10001;right:8px;top:8px;height:21px;width:21px;border:0!important;outline:none!important}@media (min-width: 600px){.bootpay-close-btn{right:4px;top:-32px;width:25px;height:25px;background:transparent;outline:none!important;border:0!important}}.bootpay-close-btn.active,.bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-close-btn:before,.bootpay-close-btn:after{position:absolute;left:8px;top:2px;content:" ";height:24px;width:1px;background-color:#333}@media (min-width: 600px){.bootpay-close-btn:before,.bootpay-close-btn:after{height:23px;top:0;width:2px;background-color:#fff}}.bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-close-btn:after{transform:rotate(-45deg)}@keyframes __bootpay-slide-up{0%{transform:translateY(150%);opacity:0}to{transform:translateY(0);opacity:1}}@keyframes __bootpay-slide-down{0%{transform:translateY(0);opacity:1}to{transform:translateY(150%);opacity:0}}@keyframes __bootpay-fade-in{0%{opacity:0;scale:.9}to{opacity:1;scale:1}}@keyframes __bootpay-fade-out{0%{opacity:1;scale:1}to{opacity:0;scale:.9}}.__bootpay-store-el-fullscreen{position:absolute;left:0;right:0;top:0;bottom:0;height:100%}.bootpay-store-iframe-container{width:100%;height:100%}.bootpay-store-iframe-container>iframe{width:100%;border:0;outline:none;overflow:scroll}.bootpay-store-iframe-container>.bootpay-store-overlay{position:fixed;left:0;right:0;top:0;bottom:0;background-color:#000000b3;z-index:100000;text-align:center;display:none}.bootpay-store-iframe-container>.bootpay-store-overlay.fade-in{animation:fadeIn .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay.fade-out{animation:fadeOut .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay:before{display:inline-block;vertical-align:middle;height:100%;content:" "}@media (max-width: 600px){.bootpay-store-iframe-container>.bootpay-store-overlay:before{display:block;height:inherit;vertical-align:inherit}}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-overlay-iframe-container{display:inline-block;vertical-align:middle}@media (max-width: 600px){.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-overlay-iframe-container{width:100%!important;height:100%!important}}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container{display:inline-block;background-color:#fff;vertical-align:middle;max-width:450px;width:100%;text-align:left;border-radius:12px;overflow:hidden}@media (max-width: 768px){.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container{margin:1rem}}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container.zoom-in{animation:zoomIn .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container.zoom-out{animation:zoomOut .2s ease}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header{position:relative;padding:1rem 1.5rem;font-size:18px}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn{position:absolute;box-shadow:none;background-color:transparent;outline:0;z-index:10001;right:1rem;top:50%;transform:translateY(-50%);height:21px;width:21px;border:0!important;outline:none!important}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn.active,.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:focus{outline:none!important;border:0!important}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:before,.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:after{position:absolute;left:8px;top:0;content:" ";height:24px;width:1px;background-color:#888}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:before{transform:rotate(45deg)}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-header .bootpay-close-btn:after{transform:rotate(-45deg)}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-body{padding:1rem 1.5rem 2rem}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer>.bootpay-store-alert-button-grid{display:flex;width:100%}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer>.bootpay-store-alert-button-grid>.bootpay-store-cols{flex:0 50%}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn{display:block;box-shadow:none;background-color:transparent;border:0!important;outline:none!important;width:100%;padding:1rem 0}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-cancel-button{background-color:#f1f1f1;color:#333;font-size:18px;font-weight:500}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-cancel-button:hover{opacity:.8}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-confirm-button{background-color:#507cf3;color:#fff;font-size:18px;font-weight:500}.bootpay-store-iframe-container>.bootpay-store-overlay>.bootpay-store-alert-container>.bootpay-store-alert-footer button.bootpay-btn.bootpay-alert-confirm-button:hover{opacity:.8}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes zoomIn{0%{transform:scale(.9)}to{transform:scale(1)}}@keyframes zoomOut{0%{transform:scale(1)}to{transform:scale(.9)}}')),document.head.appendChild(o)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
- (function(ue,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(ue=typeof globalThis<"u"?globalThis:ue||self,Z(ue.Bootpay={}))})(this,function(ue){"use strict";const Z={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(t){return`__bootpay_track_${t}__`}},Ur=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)}),re=t=>{let e=!1;return typeof t=="string"||Array.isArray(t)?e=t.length===0:e=t==null||Ge(t,"object")&&t.constructor===Object&&Object.keys(t).length===0,e},M=t=>!re(t),Ge=(t,e)=>typeof t===e,Ps=(t,e=void 0)=>{if(M(e)){const r=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(t)?`${t}&${r}`:`${t}?${r}`}else return t},_t=(t,e)=>{for(let r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t};var N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Is(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),r}var Fr={exports:{}};function Cs(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wt={exports:{}};const Ts=Is(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Hr;function z(){return Hr||(Hr=1,function(t,e){(function(r,s){t.exports=s()})(N,function(){var r=r||function(s,n){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof N<"u"&&N.crypto&&(i=N.crypto),!i&&typeof Cs=="function")try{i=Ts}catch{}var x=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function l(){}return function(f){var m;return l.prototype=f,m=new l,l.prototype=null,m}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(l){var f=d(this);return l&&f.mixIn(l),(!f.hasOwnProperty("init")||this.init===f.init)&&(f.init=function(){f.$super.init.apply(this,arguments)}),f.init.prototype=f,f.$super=this,f},create:function(){var l=this.extend();return l.init.apply(l,arguments),l},init:function(){},mixIn:function(l){for(var f in l)l.hasOwnProperty(f)&&(this[f]=l[f]);l.hasOwnProperty("toString")&&(this.toString=l.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),y=a.WordArray=c.extend({init:function(l,f){l=this.words=l||[],f!=n?this.sigBytes=f:this.sigBytes=l.length*4},toString:function(l){return(l||u).stringify(this)},concat:function(l){var f=this.words,m=l.words,b=this.sigBytes,E=l.sigBytes;if(this.clamp(),b%4)for(var k=0;k<E;k++){var B=m[k>>>2]>>>24-k%4*8&255;f[b+k>>>2]|=B<<24-(b+k)%4*8}else for(var A=0;A<E;A+=4)f[b+A>>>2]=m[A>>>2];return this.sigBytes+=E,this},clamp:function(){var l=this.words,f=this.sigBytes;l[f>>>2]&=4294967295<<32-f%4*8,l.length=s.ceil(f/4)},clone:function(){var l=c.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var f=[],m=0;m<l;m+=4)f.push(x());return new y.init(f,l)}}),o=p.enc={},u=o.Hex={stringify:function(l){for(var f=l.words,m=l.sigBytes,b=[],E=0;E<m;E++){var k=f[E>>>2]>>>24-E%4*8&255;b.push((k>>>4).toString(16)),b.push((k&15).toString(16))}return b.join("")},parse:function(l){for(var f=l.length,m=[],b=0;b<f;b+=2)m[b>>>3]|=parseInt(l.substr(b,2),16)<<24-b%8*4;return new y.init(m,f/2)}},h=o.Latin1={stringify:function(l){for(var f=l.words,m=l.sigBytes,b=[],E=0;E<m;E++){var k=f[E>>>2]>>>24-E%4*8&255;b.push(String.fromCharCode(k))}return b.join("")},parse:function(l){for(var f=l.length,m=[],b=0;b<f;b++)m[b>>>2]|=(l.charCodeAt(b)&255)<<24-b%4*8;return new y.init(m,f)}},v=o.Utf8={stringify:function(l){try{return decodeURIComponent(escape(h.stringify(l)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(l){return h.parse(unescape(encodeURIComponent(l)))}},g=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new y.init,this._nDataBytes=0},_append:function(l){typeof l=="string"&&(l=v.parse(l)),this._data.concat(l),this._nDataBytes+=l.sigBytes},_process:function(l){var f,m=this._data,b=m.words,E=m.sigBytes,k=this.blockSize,B=k*4,A=E/B;l?A=s.ceil(A):A=s.max((A|0)-this._minBufferSize,0);var _=A*k,w=s.min(_*4,E);if(_){for(var S=0;S<_;S+=k)this._doProcessBlock(b,S);f=b.splice(0,_),m.sigBytes-=w}return new y.init(f,w)},clone:function(){var l=c.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0});a.Hasher=g.extend({cfg:c.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var f=this._doFinalize();return f},blockSize:16,_createHelper:function(l){return function(f,m){return new l.init(m).finalize(f)}},_createHmacHelper:function(l){return function(f,m){return new $.HMAC.init(l,m).finalize(f)}}});var $=p.algo={};return p}(Math);return r})}(wt)),wt.exports}(function(t,e){(function(r,s){t.exports=s(z())})(N,function(r){return r.enc.Utf8})})(Fr);var Rs=Fr.exports;const Mr=He(Rs);var $t={exports:{}},Nr;function Be(){return Nr||(Nr=1,function(t,e){(function(r,s){t.exports=s(z())})(N,function(r){return function(){var s=r,n=s.lib,i=n.WordArray,x=s.enc;x.Base64={stringify:function(p){var a=p.words,c=p.sigBytes,y=this._map;p.clamp();for(var o=[],u=0;u<c;u+=3)for(var h=a[u>>>2]>>>24-u%4*8&255,v=a[u+1>>>2]>>>24-(u+1)%4*8&255,g=a[u+2>>>2]>>>24-(u+2)%4*8&255,$=h<<16|v<<8|g,l=0;l<4&&u+l*.75<c;l++)o.push(y.charAt($>>>6*(3-l)&63));var f=y.charAt(64);if(f)for(;o.length%4;)o.push(f);return o.join("")},parse:function(p){var a=p.length,c=this._map,y=this._reverseMap;if(!y){y=this._reverseMap=[];for(var o=0;o<c.length;o++)y[c.charCodeAt(o)]=o}var u=c.charAt(64);if(u){var h=p.indexOf(u);h!==-1&&(a=h)}return d(p,a,y)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(p,a,c){for(var y=[],o=0,u=0;u<a;u++)if(u%4){var h=c[p.charCodeAt(u-1)]<<u%4*2,v=c[p.charCodeAt(u)]>>>6-u%4*2,g=h|v;y[o>>>2]|=g<<24-o%4*8,o++}return i.create(y,o)}}(),r.enc.Base64})}($t)),$t.exports}var As=Be();const Se=He(As);class Pe{$blank(e){return re(e)}$present(e){return!this.$blank(e)}$type(e,r){return Ge(e,r)}$uuid(){return Ur()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Se.stringify(Mr.parse(e))}$decrypt(e){return Mr.stringify(Se.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Xe={debug:1,info:2,warning:3,error:4},F={level:Xe.warning,setLogLevel(t){this.level=t},messageStringify(t,e){try{return e=`${t}: ${Ge(e,"object")?JSON.stringify(e):e}`}catch(r){console.error(`log parse error: ${r}`)}},debug(t,e){this.level<=Xe.debug&&console.log(this.messageStringify(t,e))},info(t,e){this.level<=Xe.info&&console.info(this.messageStringify(t,e))},warn(t,e){this.level<=Xe.warning&&console.warn(this.messageStringify(t,e))},error(t,e){this.level<=Xe.error&&console.error(this.messageStringify(t,e))}};class Os extends Pe{constructor(){super(),this.$storage={}}get(e){let r="";try{r=window.localStorage.getItem(e)}catch{r=this.$storage[e]}return this.$present(r)?this.$decrypt(r):void 0}set(e,r){try{window.localStorage.setItem(e,this.$encrypt(r))}catch{this.$storage[e]=this.$encrypt(r)}return r}currentUserUUID(){const e=Z.STORAGE_PREFIX("uuid"),r=this.get(e);return this.$blank(r)?this.set(e,this.$uuid()):r}setUUID(e){const r=Z.STORAGE_PREFIX("uuid");return this.set(r,e)}getToJSON(e){const r=this.get(e);return this.$present(r)?this.caseMarshalToJson(r):r}setToJSON(e,r){return this.set(e,JSON.stringify(r)),r}caseMarshalToJson(e){try{return JSON.parse(e)}catch{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class Ds extends Os{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),r=Z.STORAGE_PREFIX("session"),s=this.getToJSON(r);return this.$blank(s)||s.time+1800<e?this.setToJSON(r,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid:s.uuid}currentTimeTerm(){const e=Z.STORAGE_PREFIX("session"),r=this.getToJSON(e);return this.$blank(r.term)?-1:r.term}currentTime(){const e=Z.STORAGE_PREFIX("session"),r=this.getToJSON(e);return this.$blank(r.time)?-1:r.time}setTime(e){const r=Math.round(new Date().getTime()/1e3),s=Z.STORAGE_PREFIX("session"),n=this.getToJSON(s),i=this.$blank(n)?{time:e>0?e:r,term:e>0?r-e:-1,uuid:`${this.$uuid()}-${r}`}:n;i.time=e,this.setToJSON(s,i)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(Z.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(Z.STORAGE_PREFIX("user")))}catch(e){F.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const Ie=new Ds,we={name:"@bootpay/client-js",version:"5.2.0-beta.2",main:"dist/index.es.js",types:"dist/src/index.d.ts",styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"^3.3.0"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},D={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:we.version,applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set(t){this.mode=t},setApplicationId(t){return this.applicationId=t,this.currentApplicationId(void 0)},setLocale(t){this.locale=t,this.isSetLocale=!0},currentApplicationId(t=void 0){return t===void 0?this.applicationId:t},setDevelopmentHost(t){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,t)},setVersion(t,e,r=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=t,this.packageVersion=r===void 0||r===""?we.version:r},toApi(t){return[this.API_URL[this.mode],t].join("/")},toDoor(t){return[this.DOOR_URL[this.mode],t].join("/")},toWidget(t){return[this.WIDGET_URL[this.mode],t].join("/")},isMobile(){if(typeof window>"u")return!1;const t=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(t)},isMobileSafari(){if(typeof window>"u")return!1;const t=window.navigator.userAgent;return(t.match(/iPad/i)||t.match(/iPhone/i))&&!t.match(/CriOS/i)},toAnalytics(t){return[this.ANALYTICS_URL[this.mode],t].join("/")}};class pe extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const Ce={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(t,e,r){this.removeBootpayEventListener(t).addBootpayEventListener(t,e,r)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(t,e,r){this.removeBootpayEventListener(t).addBootpayEventListener(t,e,r)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(t,e,r){this.removeBootpayEventListener(t).addBootpayEventListener(t,e,r)}),this.isBind=!0)},on(t,e,r=void 0){return re(Ce.__BOOTPAY_NAMESPACE)&&(Ce.__BOOTPAY_NAMESPACE={}),this.addEventListener(t.split(".")[0],e,r||!1),Ce.__BOOTPAY_NAMESPACE[t]=e,this},off(t){return M(Ce.__BOOTPAY_NAMESPACE)&&M(Ce.__BOOTPAY_NAMESPACE[t])&&this.removeEventListener(t.split(".")[0],Ce.__BOOTPAY_NAMESPACE[t]),this}};class Ve extends Pe{constructor(e){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,Ce.initialize()}bind(e,r){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,s=>{const n=this.parseEvent(s.data);if(F.debug("event received",JSON.stringify(n)),M(n)&&M(n.event)){const i=this.hookFunction(n.hook);if(M(i)&&M(i[n.event]))return i[n.event](n.data,this);F.debug("event",`${this.$messageEventName}: ${n.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,r)}hookFunction(e){return this.$eventHooks[e]}reject(e){M(this.$reject)&&this.$reject(e)}resolve(e){M(this.$resolve)&&this.$resolve(e)}setCallbackFunction(e,r){this.$resolve=e,this.$reject=r}parseEvent(e){let r={};if(this.$present(e)&&this.$type(e,"string")){try{r=JSON.parse(e)}catch(s){F.info("json parsing failed",`data: ${e}, message: ${Ye(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return r.bootpay_event?(delete r.bootpay_event,r):null}else return null}}const Ye=t=>typeof t=="string"?t.toUpperCase():t instanceof Error?t.message:t;class _e extends Pe{constructor(){super(),this.$windowId="",this.$template=""}defaultIframeHtml(){return`
2
+ (function(ue,Z){typeof exports=="object"&&typeof module<"u"?Z(exports):typeof define=="function"&&define.amd?define(["exports"],Z):(ue=typeof globalThis<"u"?globalThis:ue||self,Z(ue.Bootpay={}))})(this,function(ue){"use strict";const Z={PLATFORM:{JS:1,ANDROID:2,IOS:3,REST:4},STORAGE_PREFIX(t){return`__bootpay_track_${t}__`}},Ur=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{let e=Math.random()*16|0;return(t=="x"?e:e&3|8).toString(16)}),re=t=>{let e=!1;return typeof t=="string"||Array.isArray(t)?e=t.length===0:e=t==null||Ge(t,"object")&&t.constructor===Object&&Object.keys(t).length===0,e},M=t=>!re(t),Ge=(t,e)=>typeof t===e,Ps=(t,e=void 0)=>{if(M(e)){const r=typeof e!="string"?new URLSearchParams(JSON.parse(JSON.stringify(e))).toString():e;return/\?/.test(t)?`${t}&${r}`:`${t}?${r}`}else return t},_t=(t,e)=>{for(let r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t};var N=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function He(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Is(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var r=function s(){return this instanceof s?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var n=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(r,s,n.get?n:{enumerable:!0,get:function(){return t[s]}})}),r}var Fr={exports:{}};function Cs(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var wt={exports:{}};const Ts=Is(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Hr;function z(){return Hr||(Hr=1,function(t,e){(function(r,s){t.exports=s()})(N,function(){var r=r||function(s,n){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof N<"u"&&N.crypto&&(i=N.crypto),!i&&typeof Cs=="function")try{i=Ts}catch{}var x=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},d=Object.create||function(){function l(){}return function(f){var m;return l.prototype=f,m=new l,l.prototype=null,m}}(),p={},a=p.lib={},c=a.Base=function(){return{extend:function(l){var f=d(this);return l&&f.mixIn(l),(!f.hasOwnProperty("init")||this.init===f.init)&&(f.init=function(){f.$super.init.apply(this,arguments)}),f.init.prototype=f,f.$super=this,f},create:function(){var l=this.extend();return l.init.apply(l,arguments),l},init:function(){},mixIn:function(l){for(var f in l)l.hasOwnProperty(f)&&(this[f]=l[f]);l.hasOwnProperty("toString")&&(this.toString=l.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),y=a.WordArray=c.extend({init:function(l,f){l=this.words=l||[],f!=n?this.sigBytes=f:this.sigBytes=l.length*4},toString:function(l){return(l||u).stringify(this)},concat:function(l){var f=this.words,m=l.words,b=this.sigBytes,E=l.sigBytes;if(this.clamp(),b%4)for(var k=0;k<E;k++){var B=m[k>>>2]>>>24-k%4*8&255;f[b+k>>>2]|=B<<24-(b+k)%4*8}else for(var A=0;A<E;A+=4)f[b+A>>>2]=m[A>>>2];return this.sigBytes+=E,this},clamp:function(){var l=this.words,f=this.sigBytes;l[f>>>2]&=4294967295<<32-f%4*8,l.length=s.ceil(f/4)},clone:function(){var l=c.clone.call(this);return l.words=this.words.slice(0),l},random:function(l){for(var f=[],m=0;m<l;m+=4)f.push(x());return new y.init(f,l)}}),o=p.enc={},u=o.Hex={stringify:function(l){for(var f=l.words,m=l.sigBytes,b=[],E=0;E<m;E++){var k=f[E>>>2]>>>24-E%4*8&255;b.push((k>>>4).toString(16)),b.push((k&15).toString(16))}return b.join("")},parse:function(l){for(var f=l.length,m=[],b=0;b<f;b+=2)m[b>>>3]|=parseInt(l.substr(b,2),16)<<24-b%8*4;return new y.init(m,f/2)}},h=o.Latin1={stringify:function(l){for(var f=l.words,m=l.sigBytes,b=[],E=0;E<m;E++){var k=f[E>>>2]>>>24-E%4*8&255;b.push(String.fromCharCode(k))}return b.join("")},parse:function(l){for(var f=l.length,m=[],b=0;b<f;b++)m[b>>>2]|=(l.charCodeAt(b)&255)<<24-b%4*8;return new y.init(m,f)}},v=o.Utf8={stringify:function(l){try{return decodeURIComponent(escape(h.stringify(l)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(l){return h.parse(unescape(encodeURIComponent(l)))}},g=a.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new y.init,this._nDataBytes=0},_append:function(l){typeof l=="string"&&(l=v.parse(l)),this._data.concat(l),this._nDataBytes+=l.sigBytes},_process:function(l){var f,m=this._data,b=m.words,E=m.sigBytes,k=this.blockSize,B=k*4,A=E/B;l?A=s.ceil(A):A=s.max((A|0)-this._minBufferSize,0);var _=A*k,w=s.min(_*4,E);if(_){for(var S=0;S<_;S+=k)this._doProcessBlock(b,S);f=b.splice(0,_),m.sigBytes-=w}return new y.init(f,w)},clone:function(){var l=c.clone.call(this);return l._data=this._data.clone(),l},_minBufferSize:0});a.Hasher=g.extend({cfg:c.extend(),init:function(l){this.cfg=this.cfg.extend(l),this.reset()},reset:function(){g.reset.call(this),this._doReset()},update:function(l){return this._append(l),this._process(),this},finalize:function(l){l&&this._append(l);var f=this._doFinalize();return f},blockSize:16,_createHelper:function(l){return function(f,m){return new l.init(m).finalize(f)}},_createHmacHelper:function(l){return function(f,m){return new $.HMAC.init(l,m).finalize(f)}}});var $=p.algo={};return p}(Math);return r})}(wt)),wt.exports}(function(t,e){(function(r,s){t.exports=s(z())})(N,function(r){return r.enc.Utf8})})(Fr);var Rs=Fr.exports;const Mr=He(Rs);var $t={exports:{}},Nr;function Be(){return Nr||(Nr=1,function(t,e){(function(r,s){t.exports=s(z())})(N,function(r){return function(){var s=r,n=s.lib,i=n.WordArray,x=s.enc;x.Base64={stringify:function(p){var a=p.words,c=p.sigBytes,y=this._map;p.clamp();for(var o=[],u=0;u<c;u+=3)for(var h=a[u>>>2]>>>24-u%4*8&255,v=a[u+1>>>2]>>>24-(u+1)%4*8&255,g=a[u+2>>>2]>>>24-(u+2)%4*8&255,$=h<<16|v<<8|g,l=0;l<4&&u+l*.75<c;l++)o.push(y.charAt($>>>6*(3-l)&63));var f=y.charAt(64);if(f)for(;o.length%4;)o.push(f);return o.join("")},parse:function(p){var a=p.length,c=this._map,y=this._reverseMap;if(!y){y=this._reverseMap=[];for(var o=0;o<c.length;o++)y[c.charCodeAt(o)]=o}var u=c.charAt(64);if(u){var h=p.indexOf(u);h!==-1&&(a=h)}return d(p,a,y)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="};function d(p,a,c){for(var y=[],o=0,u=0;u<a;u++)if(u%4){var h=c[p.charCodeAt(u-1)]<<u%4*2,v=c[p.charCodeAt(u)]>>>6-u%4*2,g=h|v;y[o>>>2]|=g<<24-o%4*8,o++}return i.create(y,o)}}(),r.enc.Base64})}($t)),$t.exports}var As=Be();const Se=He(As);class Pe{$blank(e){return re(e)}$present(e){return!this.$blank(e)}$type(e,r){return Ge(e,r)}$uuid(){return Ur()}$encrypt(e){return this.$type(e,"object")&&(e=JSON.stringify(e)),Se.stringify(Mr.parse(e))}$decrypt(e){return Mr.stringify(Se.parse(e))}getUserAgent(){return window.navigator.userAgent}}const Xe={debug:1,info:2,warning:3,error:4},F={level:Xe.warning,setLogLevel(t){this.level=t},messageStringify(t,e){try{return e=`${t}: ${Ge(e,"object")?JSON.stringify(e):e}`}catch(r){console.error(`log parse error: ${r}`)}},debug(t,e){this.level<=Xe.debug&&console.log(this.messageStringify(t,e))},info(t,e){this.level<=Xe.info&&console.info(this.messageStringify(t,e))},warn(t,e){this.level<=Xe.warning&&console.warn(this.messageStringify(t,e))},error(t,e){this.level<=Xe.error&&console.error(this.messageStringify(t,e))}};class Os extends Pe{constructor(){super(),this.$storage={}}get(e){let r="";try{r=window.localStorage.getItem(e)}catch{r=this.$storage[e]}return this.$present(r)?this.$decrypt(r):void 0}set(e,r){try{window.localStorage.setItem(e,this.$encrypt(r))}catch{this.$storage[e]=this.$encrypt(r)}return r}currentUserUUID(){const e=Z.STORAGE_PREFIX("uuid"),r=this.get(e);return this.$blank(r)?this.set(e,this.$uuid()):r}setUUID(e){const r=Z.STORAGE_PREFIX("uuid");return this.set(r,e)}getToJSON(e){const r=this.get(e);return this.$present(r)?this.caseMarshalToJson(r):r}setToJSON(e,r){return this.set(e,JSON.stringify(r)),r}caseMarshalToJson(e){try{return JSON.parse(e)}catch{return JSON.parse(e.replace(/\\\"/g,'"'))}}}class Ds extends Os{constructor(){super(),this.currentUserUUID()}currentSessionKey(){const e=Math.round(new Date().getTime()/1e3),r=Z.STORAGE_PREFIX("session"),s=this.getToJSON(r);return this.$blank(s)||s.time+1800<e?this.setToJSON(r,{time:e,term:this.$blank(s)?-1:e-s.time,uuid:`${this.$uuid()}-${e}`}).uuid:s.uuid}currentTimeTerm(){const e=Z.STORAGE_PREFIX("session"),r=this.getToJSON(e);return this.$blank(r.term)?-1:r.term}currentTime(){const e=Z.STORAGE_PREFIX("session"),r=this.getToJSON(e);return this.$blank(r.time)?-1:r.time}setTime(e){const r=Math.round(new Date().getTime()/1e3),s=Z.STORAGE_PREFIX("session"),n=this.getToJSON(s),i=this.$blank(n)?{time:e>0?e:r,term:e>0?r-e:-1,uuid:`${this.$uuid()}-${r}`}:n;i.time=e,this.setToJSON(s,i)}generateKey(){return`${this.$uuid()}-${new Date().getTime()}`}setUser(e){return this.set(Z.STORAGE_PREFIX("user"),e===void 0?void 0:JSON.stringify(e)),e}getUser(){try{return JSON.parse(this.get(Z.STORAGE_PREFIX("user")))}catch(e){F.error("User Storage",`사용자 정보를 추출하는데 실패하였습니다. [ ${e.message} ]`);return}}}const Ie=new Ds,we={name:"@bootpay/client-js",version:"5.2.0-beta.3",main:"dist/index.es.js",types:"dist/src/index.d.ts",styles:"dist/index.css",scripts:{test:'echo "Error: no test specified" && exit 1',build:"rm -rf ./dist && vite build",deploy:"NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"},dependencies:{typescript:"^5.5.4"},devDependencies:{"@types/ws":"^8.5.5","@types/node":"^18.15.3","@webpack-cli/serve":"^2.0.5","webpack-dev-server":"^4.15.1",webpack:"^5.87.0","webpack-cli":"^5.1.4",axios:"^0.27.2","crypto-js":"^4.1.1","@types/crypto-js":"^4.1.1","@babel/core":"^7.22.5","@babel/plugin-transform-regenerator":"^7.22.5","@babel/plugin-transform-runtime":"^7.22.5","@babel/plugin-transform-object-assign":"^7.22.5","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-transform-destructuring":"^7.24.8","@babel/preset-env":"^7.22.5","@babel/preset-typescript":"^7.22.5","@babel/runtime-corejs3":"^7.22.5","@babel/plugin-transform-classes":"^7.22.5","core-js":"^3.31.0","babel-loader":"^9.1.2","css-loader":"^6.8.1",sass:"^1.63.4","sass-loader":"^13.3.2","style-loader":"^3.3.3",vite:"^5.4.3","vite-plugin-dts":"^3.6.4","vite-plugin-tsconfig":"^1.0.4","vite-plugin-css-injected-by-js":"^3.3.0"},resolutions:{"@webpack-cli/serve":"^1.3.1"},keywords:[],author:"",license:"ISC",description:""},D={mode:"production",locale:"ko",isSetLocale:!1,packageVersion:we.version,applicationId:"",API_URL:{development:"https://dev-api.bootpay.co.kr/v2",stage:"https://stage-api.bootpay.co.kr/v2",production:"https://api.bootpay.co.kr/v2"},ANALYTICS_URL:{development:"https://dev-analytics.bootpay.co.kr",stage:"https://stage-analytics.bootpay.co.kr",production:"https://analytics.bootpay.co.kr"},DOOR_URL:{development:"https://door-dev.bootpay.co.kr",stage:"https://door-stage.bootpay.co.kr",production:"https://door.bootpay.co.kr"},WIDGET_URL:{development:"https://dev-widget.bootpay.co.kr",stage:"https://stage-widget.bootpay.co.kr",production:"https://widget.bootpay.co.kr"},sdkNames:{android:100,android_react_native:101,android_flutter:102,android_unity:103,ios:200,ios_react_native:201,ios_flutter:202,ios_unity:203,ios_objc:204,ios_swift_ui:205,mac_swift:206,mac_flutter:207},sdkVersion:"",sdkName:0,set(t){this.mode=t},setApplicationId(t){return this.applicationId=t,this.currentApplicationId(void 0)},setLocale(t){this.locale=t,this.isSetLocale=!0},currentApplicationId(t=void 0){return t===void 0?this.applicationId:t},setDevelopmentHost(t){this.API_URL.development=this.API_URL.development.replace(/dev-api.bootpay.co.kr\/v2/gi,t)},setVersion(t,e,r=void 0){this.sdkName=this.sdkNames[e]===void 0?0:this.sdkNames[e],this.sdkVersion=t,this.packageVersion=r===void 0||r===""?we.version:r},toApi(t){return[this.API_URL[this.mode],t].join("/")},toDoor(t){return[this.DOOR_URL[this.mode],t].join("/")},toWidget(t){return[this.WIDGET_URL[this.mode],t].join("/")},isMobile(){if(typeof window>"u")return!1;const t=window.navigator.userAgent||window.navigator.vendor;return/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/.test(t)},isMobileSafari(){if(typeof window>"u")return!1;const t=window.navigator.userAgent;return(t.match(/iPad/i)||t.match(/iPhone/i))&&!t.match(/CriOS/i)},toAnalytics(t){return[this.ANALYTICS_URL[this.mode],t].join("/")}};class pe extends Error{constructor(e){super(),this.name="BootpayEventError",this.eventMessage=e}}const Ce={__BOOTPAY_NAMESPACE:{},isBind:!1,initialize(){this.isBind||(typeof window<"u"&&(window.addBootpayEventListener=this.on,window.removeBootpayEventListener=this.off,window.resetBootpayEventListener=function(t,e,r){this.removeBootpayEventListener(t).addBootpayEventListener(t,e,r)}),typeof document<"u"&&(document.addBootpayEventListener=this.on,document.removeBootpayEventListener=this.off,document.resetBootpayEventListener=function(t,e,r){this.removeBootpayEventListener(t).addBootpayEventListener(t,e,r)}),typeof Element<"u"&&(Element.prototype.addBootpayEventListener=this.on,Element.prototype.removeBootpayEventListener=this.off,Element.prototype.resetBootpayEventListener=function(t,e,r){this.removeBootpayEventListener(t).addBootpayEventListener(t,e,r)}),this.isBind=!0)},on(t,e,r=void 0){return re(Ce.__BOOTPAY_NAMESPACE)&&(Ce.__BOOTPAY_NAMESPACE={}),this.addEventListener(t.split(".")[0],e,r||!1),Ce.__BOOTPAY_NAMESPACE[t]=e,this},off(t){return M(Ce.__BOOTPAY_NAMESPACE)&&M(Ce.__BOOTPAY_NAMESPACE[t])&&this.removeEventListener(t.split(".")[0],Ce.__BOOTPAY_NAMESPACE[t]),this}};class Ve extends Pe{constructor(e){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,Ce.initialize()}bind(e,r){this.$messageEventName&&window.resetBootpayEventListener(this.$messageEventName,s=>{const n=this.parseEvent(s.data);if(F.debug("event received",JSON.stringify(n)),M(n)&&M(n.event)){const i=this.hookFunction(n.hook);if(M(i)&&M(i[n.event]))return i[n.event](n.data,this);F.debug("event",`${this.$messageEventName}: ${n.event} is not defined`)}}),this.afterBind&&this.afterBind(),this.setCallbackFunction(e,r)}hookFunction(e){return this.$eventHooks[e]}reject(e){M(this.$reject)&&this.$reject(e)}resolve(e){M(this.$resolve)&&this.$resolve(e)}setCallbackFunction(e,r){this.$resolve=e,this.$reject=r}parseEvent(e){let r={};if(this.$present(e)&&this.$type(e,"string")){try{r=JSON.parse(e)}catch(s){F.info("json parsing failed",`data: ${e}, message: ${Ye(s)} JSON 파싱 형태가 아닌 이벤트 입니다.`)}return r.bootpay_event?(delete r.bootpay_event,r):null}else return null}}const Ye=t=>typeof t=="string"?t.toUpperCase():t instanceof Error?t.message:t;class _e extends Pe{constructor(){super(),this.$windowId="",this.$template=""}defaultIframeHtml(){return`
3
3
  <iframe id="${this.$iFrameId}" src="" frameborder="0" allowtransparency="true" scrolling="no" style="background: transparent; width: 100%; height: 100%;"></iframe>
4
4
  `}byId(e){return document.getElementById(e)}createTemplateHtml(){this.byId(this.$windowId)===null&&document.body.insertAdjacentHTML("beforeend",this.$template)}bodyOpen(e=void 0){const r=document.querySelector("body");this.$present(r.className)?r.className=`${r.className} bootpay-open`:r.className="bootpay-open",this.$present(e)&&(r.className=`${r.className} ${e}`)}bodyClose(){const e=document.querySelector("body");e.className=e.className.replace("bootpay-open","")}templateResize(e,r){const s=this.byId(e);if(s!==void 0)for(let n in Object.keys(r)){let i=Object.keys(r)[n],x=r[i];this.$present(x)&&!String(x).match(/%/)&&!String(x).match(/vh/)&&(i.match(/width/)||i.match(/Width/)||i.match(/height/)||i.match(/Height/))&&(x=`${String(r[i]).replace(/px/gi,"")}px`),s.style.setProperty(i,x)}}isRendered(){const e=document.getElementById(this.$iFrameId);return F.debug("isRendered",`iFrameElement: ${e}`),e!==null&&e.src!==null&&e.src!==""}postMessage(e,r=void 0){var n;const s=this.byId(this.$iFrameId);(n=s==null?void 0:s.contentWindow)==null||n.postMessage(JSON.stringify({bootpay_event:!0,event:e,data:r}),"*")}}class Us extends _e{constructor(){super(),this.$alfredId="bootpay-alfred-progress-id",this.$alfredTextId="__alfred-text-message__"}template(e){return`
5
5
  <div class="bootpay-progress-background" id="${this.$alfredId}" style="display: none;">
@@ -134,4 +134,4 @@
134
134
  </div>
135
135
  </div>
136
136
  </div>
137
- `}show(e,r="알림",s="확인",n="취소",i,x,d=!0){this.$title=r,this.$message=e,this.$confirmButtonText=s,this.$cancelButtonText=n,this.$template=this.template(),this.createTemplateHtml(),document.getElementById(this.$hookConfirmButtonId).addEventListener("click",()=>{this.destroy(),i!==void 0&&i()}),document.getElementById(this.$hookCancelButtonId).addEventListener("click",()=>{this.destroy(),x!==void 0&&x()}),document.getElementById(this.$hookCloseButtonId).addEventListener("click",()=>{this.destroy(),x!==void 0&&x()}),d?(document.getElementById(this.$hookCancelButtonId).removeAttribute("style"),document.getElementById(this.$hookConfirmButtonId).removeAttribute("style")):(document.getElementById(this.$hookCancelButtonId).style.display="none",document.getElementById(this.$hookConfirmButtonId).style.flex="0 1 100%"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$modalWindowId);e.classList.remove("fade-in"),e.classList.add("fade-out"),setTimeout(()=>{const r=document.getElementById(this.$windowId);r!==void 0&&(r.outerHTML="",r.remove()),this.bodyClose()},100)}}const vt=new Fi,Hi={$eventPrefix:"bootpay",bootpayWidgetSelectMethod(t){return this.triggerGlobalChangeEvent(t),se.selectPayment(t.pg,t.method,t.wallet_id,t.term_passed===!0,t.select_terms,t.extra)},bootpayWidgetResponseGetEnvironmentWidget(t){return Oe.postMessage("bootpayResponseGetEnvironmentWidget",{use_only_brandpay:G.$widgetStore.data.use_only_brandpay,user_token:G.$widgetStore.data.user_token,sandbox:G.$widgetStore.data.sandbox,use_terms:G.$widgetStore.data.use_terms,platform:t.platform})},bootpayWidgetResponseCurrentStores(t){return Oe.postMessage("bootpayResponseCurrentStores",t)},bootpayWidgetError(t,e){return e.reject(t)},bootpayWidgetOOpayReload(t){return G.postMessage("bootpayWidgetOOpayReload",t)},bootpayWidgetResize(t){return this.callBootpayDOMEvent("widget-resize",t),q.callHook("resize",t),G.resize(t)},bootpayWidgetShowInterestInformation(t){return Oe.showCardInterestInformation(t)},bootpayWidgetAddWallet(t){return Oe.addWallet(t.url)},bootpayWidgetRemoveWallet(t){return Oe.removeWallet(t.wallet_id)},bootpayWidgetPaymentWindowResize(t){return Oe.resize(t)},bootpayWidgetOOpayWindowClose(){return Oe.destroy()},bootpayWidgetModalOpen(t){return De.createIFrame(t.url)},bootpayWidgetModalClose(){return De.destroy()},bootpayRequestModalCurrentStores(t){return G.postMessage("bootpayWidgetRequestModalCurrentStores",t)},bootpayRequestGetEnvironmentModalWidget(t){return G.postMessage("bootpayWidgetGetEnvironmentModalWidget",t)},bootpayWidgetResponseGetEnvironmentModalWidget(t){return De.postMessage("bootpayResponseGetEnvironmentModalWidget",{application_id:G.$widgetStore.data.application_id,use_only_brandpay:G.$widgetStore.data.use_only_brandpay,user_token:G.$widgetStore.data.user_token,sandbox:G.$widgetStore.data.sandbox,use_terms:G.$widgetStore.data.use_terms,external_terms:G.$widgetStore.data.external_terms,key:G.$widgetStore.data.widget_key,platform:t.platform,log_level:F.level})},bootpayWidgetModalResize(t){return De.resize(t)},bootpayWidgetPaymentGetStoreData(){const{application_id:t,price:e,tax_free:r,user_token:s}=G.$widgetStore.data;return G.postMessage("bootpayWidgetResponseStoreData",{applicationId:t,price:e,widgetExtra:G.$widgetStore.widgetExtra,taxFree:r,userToken:s})},bootpayWidgetTermAllAgree(t){this.callBootpayDOMEvent("all-agree-terms",t),q.callHook("allTermsAccepted",t)},bootpayWidgetSelectPayment(t){const{method_alias:e,payment_type:r,wallet_id:s}=t;return G.postMessage("bootpayWidgetSelectPayment",{method_alias:e,payment_type:r,wallet_id:s})},bootpayWidgetReady(t){this.callBootpayDOMEvent("widget-ready",t),q.callHook("ready",t)},bootpayWidgetUpdateStore(t){q.updateOnProcessing({...t})},bootpayWidgetToUrl(t){location.href=t.url},bootpayWidgetShowModal(t){return vt.show(t.message,t.title,t.confirmButtonText,t.cancelButtonText,()=>{window.BootpayWidget.alertConfirm()},()=>{window.BootpayWidget.alertCancel()})},triggerGlobalChangeEvent(t){var e;t.completed=M(t.pg)&&M(t.method)&&(t.term_passed===!0||!q.data.use_terms)&&(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(t.method)===-1||t.wallet_id!==void 0),(q.data.pg!==t.pg||q.data.method!==t.method||q.data.wallet_id!==t.wallet_id||JSON.stringify(q.widgetExtra)!==JSON.stringify(t.extra))&&(this.callBootpayDOMEvent("widget-change-payment",t),q.callHook("changePayment",t)),JSON.stringify((e=t.select_terms)==null?void 0:e.filter(r=>r.agree===!0))!==JSON.stringify(q.data.terms.filter(r=>r.agree===!0))&&(this.callBootpayDOMEvent("widget-change-terms",t),q.callHook("changeTerms",t))},callBootpayDOMEvent(t,e=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,t].join("-"),{detail:e}))}};class Mi extends Ve{constructor(){super({messageEventName:"message.BootpayWidgetEvent",messageEventHooks:{WidgetWindowMessage:Hi}})}}const Ni=new Mi;class Li extends Pe{constructor(){super(),this.message=rr}initialize(){q.setWidgetData(void 0,{application_id:void 0,order_name:"",order_id:void 0,price:0,tax_free:0,currency:"KRW",user_token:void 0,pg:void 0,method:void 0,widget_key:void 0})}render(e,r){if(this.$blank(r==null?void 0:r.price)||r.price<0)throw new Error("결제금액은 1원 이상을 입력해주세요.");if(this.$blank(r==null?void 0:r.application_id))throw new Error("application_id가 입력되지 않았습니다.");this.initialize(),q.setWidgetData(e,r),G.render(),Ni.bind()}update(e){const{price:r,tax_free:s,currency:n,user_token:i,use_only_brandpay:x,use_terms:d,sandbox:p,widget_key:a,external_terms:c}=e;q.updateOnProcessing({price:r,tax_free:s,currency:n,user_token:i,use_only_brandpay:x,use_terms:d,external_terms:c,sandbox:p,widget_key:a}),(this.$present(i)||this.$present(x)||this.$present(d)||this.$present(p))&&G.postMessage("bootpayWidgetUpdateUserToken",{user_token:i,use_only_brandpay:x,use_terms:d,external_terms:c,sandbox:p,key:a})}rerender(){G.rerender()}destroy(){G.destroy()}selectPayment(e,r,s,n=!1,i,x){q.setPayment(e,r,s,n,i,x),F.debug("selectPayment",`pg: ${e}, method: ${r}, wallet_id: ${s}, terms: ${n}, select_terms: ${JSON.stringify(i)}, extra: ${JSON.stringify(x)}`)}currentTermsCondition(){return q.data.terms}async requestPayment(e){return this.widgetRequestPaymentValidate(1),ge.requestPayment(q.getRequestPaymentData(e))}async requestSubscription(e){return this.widgetRequestPaymentValidate(2),ge.requestSubscription(q.getRequestPaymentData(e))}isRendered(){return G.isRendered()}synchronizedRealTimeTransfer(e){G.postMessage("bootpayWidgetSynchronizedRealTimeTransfer",e)}sendSelectPayment(e){G.postMessage("bootpayWidgetSelectPayment",e)}sendMessage(e,r){G.postMessage(e,r)}currentPaymentParameters(){return this.widgetRequestPaymentValidate(),{pg:q.data.pg,method:q.data.method,wallet_id:q.data.wallet_id,terms:q.data.terms,widget_key:q.data.widget_key,widget_sandbox:q.data.sandbox,extra:q.getExtra({})}}widgetRequestPaymentValidate(e=void 0){if(e!==void 0&&q.widgetType!==e)throw new pe({event:"error",error_code:"RC_WIDGET_TYPE_INVALID",message:e===1?this.message.getLocaleMessage("widgetTypeNotPayment","ko"):this.message.getLocaleMessage("widgetTypeNotSubscription","ko")});if(this.$blank(q.data.pg)||this.$blank(q.data.method))throw new pe({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!q.termsPassed&&q.data.use_terms)throw new pe({event:"error",error_code:"RC_TERMS_NOT_AGREE",message:this.message.getLocaleMessage("termsNotAgree","ko")});if(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(q.data.method)>-1&&q.data.wallet_id===void 0)throw new pe({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectOOPay","ko")})}}const se=new Li,hs={render(t,e){se.render(t,e)},rerender(){se.rerender()},setEnvironmentMode(t,e){ge.setEnvironmentMode(t,e),D.set(t)},async requestPayment(t){return new Promise(async(e,r)=>{try{const s=await se.requestPayment(t);return e(s)}catch(s){return r(this.errorHandler(s))}})},async requestSubscription(t){return new Promise(async(e,r)=>{try{const s=await se.requestSubscription(t);return e(s)}catch(s){return r(this.errorHandler(s))}})},errorHandler(t){let e;switch(he.hideProgress(),t.name){case"BootpayEventError":e=t.eventMessage;break;default:if(M(t.event))e=t;else throw t}return e},update(t,e=!0){se.update(t),e&&this.rerender()},currentTermsCondition(){return se.currentTermsCondition()},destroy(){se.destroy()},isRendered(){return se.isRendered()},synchronizedRealTimeTransfer(t){se.synchronizedRealTimeTransfer(t)},selectPayment(t){se.sendSelectPayment(t)},setLogLevel(t){F.setLogLevel(t)},sendMessage(t,e=void 0){se.sendMessage(t,e)},setDevice(t){return ge.setDevice(t)},alertConfirm(){vt.destroy(),se.sendMessage("BootpayWidgetAlertConfirm",{confirm:!0})},alertCancel(){vt.destroy(),se.sendMessage("BootpayWidgetAlertConfirm",{confirm:!1})},currentPaymentParameters(){return se.currentPaymentParameters()},isWidgetTypeSubscription(){return q.widgetType===2},isWidgetTypePayment(){return q.widgetType===1}};typeof window<"u"&&(window.BootpayWidget=hs);class Wi extends ls{constructor(){super(),this.data={application_id:"",user_token:"",widget_key:"",hooks:{}}}encryptKey(){return M(this.data.application_id)?sr(this.data.application_id).toString().substring(0,16):""}set(e){this.data=e}callHook(e,r){this.data.hooks&&this.data.hooks[e]&&typeof this.data.hooks[e]=="function"&&this.data.hooks[e](r)}encryptParameters(){return encodeURIComponent(this.encrypt({user_token:this.data.user_token,widget_key:this.data.widget_key,sandbox:this.data.sandbox,extra:this.data.extra,log_level:F.level}))}}const yt=new Wi,fs={resize:t=>{Ue.resize(t)},showModal:t=>{De.createIFrame(t.url)},resizeModal:t=>{De.resize(t)},closeModal:()=>{De.destroy()},confirmModal:t=>vt.show(t.message,t.title,t.confirmButtonText,t.cancelButtonText,()=>{Ue.postMessage("BootpayWalletAlertConfirm",{confirm:!0})},()=>{Ue.postMessage("BootpayWalletAlertConfirm",{confirm:!1})},t.confirm),addedSuccess:t=>{Ue.postMessage("addedSuccess",t)},synchronize:t=>{Ue.postMessage("walletDataSynchronize",t)},onReady:t=>{yt.callHook("ready",t)},onChange:t=>{yt.callHook("change",t)}};class qi extends Ve{constructor(){super({messageEventName:"message.BootpayWalletEvent",messageEventHooks:{WalletWindowMessage:fs}})}}const zi=new qi;class ji extends _e{constructor(){super(),this.$iFrameId="bootpay-wallet-iframe",this.$template=this.defaultIframeHtml(),this.$walletStore=yt,this.el=void 0}render(e){this.el=String(e).replace(/#/g,"");const r=document.getElementById(this.el);if(this.$blank(e)||r===null)throw new Error("부트페이 지갑을 렌더링할 DOM Element ID를 입력해주세요.");this.templateRender(),zi.bind()}templateRender(){const e=document.getElementById(this.el);e.style.setProperty("height","0"),e.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",D.toWidget(`wallet/${this.$walletStore.data.application_id}/${this.$walletStore.encryptParameters()}`))}destroy(){const e=document.getElementById(this.el);e.innerHTML=""}resize(e){this.templateResize(this.el,e)}}const Ue=new ji;class Ki extends Pe{constructor(){super()}render(e,r){if(this.$blank(r.application_id))throw new Error("application id가 입력되지 않았습니다.");if(this.$blank(e))throw new Error("지갑을 렌더링할 DOM Element ID를 입력해주세요.");yt.set(r),Ue.render(e)}}const Gi=new Ki,xs={render(t,e){Gi.render(t,e)},rerender(){},setEnvironmentMode(t,e){ge.setEnvironmentMode(t,e),D.set(t)},isRendered(){return Ue.isRendered()},synchronizedFromBootpay(t){fs.synchronize(t)}};typeof window<"u"&&(window.BootpayWallet=xs),ue.Bootpay=ge,ue.BootpayEnvironment=D,ue.BootpaySDK=O0,ue.BootpayStore=ps,ue.BootpayWallet=xs,ue.BootpayWidget=hs,ue.default=ge,Object.defineProperties(ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
137
+ `}show(e,r="알림",s="확인",n="취소",i,x,d=!0){this.$title=r,this.$message=e,this.$confirmButtonText=s,this.$cancelButtonText=n,this.$template=this.template(),this.createTemplateHtml(),document.getElementById(this.$hookConfirmButtonId).addEventListener("click",()=>{this.destroy(),i!==void 0&&i()}),document.getElementById(this.$hookCancelButtonId).addEventListener("click",()=>{this.destroy(),x!==void 0&&x()}),document.getElementById(this.$hookCloseButtonId).addEventListener("click",()=>{this.destroy(),x!==void 0&&x()}),d?(document.getElementById(this.$hookCancelButtonId).removeAttribute("style"),document.getElementById(this.$hookConfirmButtonId).removeAttribute("style")):(document.getElementById(this.$hookCancelButtonId).style.display="none",document.getElementById(this.$hookConfirmButtonId).style.flex="0 1 100%"),this.bodyOpen()}destroy(){const e=document.getElementById(this.$modalWindowId);e.classList.remove("fade-in"),e.classList.add("fade-out"),setTimeout(()=>{const r=document.getElementById(this.$windowId);r!==void 0&&(r.outerHTML="",r.remove()),this.bodyClose()},100)}}const vt=new Fi,Hi={$eventPrefix:"bootpay",bootpayWidgetSelectMethod(t){return this.triggerGlobalChangeEvent(t),se.selectPayment(t.pg,t.method,t.wallet_id,t.term_passed===!0,t.select_terms,t.extra)},bootpayWidgetResponseGetEnvironmentWidget(t){return Oe.postMessage("bootpayResponseGetEnvironmentWidget",{use_only_brandpay:G.$widgetStore.data.use_only_brandpay,user_token:G.$widgetStore.data.user_token,sandbox:G.$widgetStore.data.sandbox,use_terms:G.$widgetStore.data.use_terms,platform:t.platform})},bootpayWidgetResponseCurrentStores(t){return Oe.postMessage("bootpayResponseCurrentStores",t)},bootpayWidgetError(t,e){return e.reject(t)},bootpayWidgetBrandpayReload(t){return G.postMessage("bootpayWidgetBrandpayReload",t)},bootpayWidgetResize(t){return this.callBootpayDOMEvent("widget-resize",t),q.callHook("resize",t),G.resize(t)},bootpayWidgetShowInterestInformation(t){return Oe.showCardInterestInformation(t)},bootpayWidgetAddWallet(t){return Oe.addWallet(t.url)},bootpayWidgetRemoveWallet(t){return Oe.removeWallet(t.wallet_id)},bootpayWidgetPaymentWindowResize(t){return Oe.resize(t)},bootpayWidgetBrandpayWindowClose(){return Oe.destroy()},bootpayWidgetModalOpen(t){return De.createIFrame(t.url)},bootpayWidgetModalClose(){return De.destroy()},bootpayRequestModalCurrentStores(t){return G.postMessage("bootpayWidgetRequestModalCurrentStores",t)},bootpayRequestGetEnvironmentModalWidget(t){return G.postMessage("bootpayWidgetGetEnvironmentModalWidget",t)},bootpayWidgetResponseGetEnvironmentModalWidget(t){return De.postMessage("bootpayResponseGetEnvironmentModalWidget",{application_id:G.$widgetStore.data.application_id,use_only_brandpay:G.$widgetStore.data.use_only_brandpay,user_token:G.$widgetStore.data.user_token,sandbox:G.$widgetStore.data.sandbox,use_terms:G.$widgetStore.data.use_terms,external_terms:G.$widgetStore.data.external_terms,key:G.$widgetStore.data.widget_key,platform:t.platform,log_level:F.level})},bootpayWidgetModalResize(t){return De.resize(t)},bootpayWidgetPaymentGetStoreData(){const{application_id:t,price:e,tax_free:r,user_token:s}=G.$widgetStore.data;return G.postMessage("bootpayWidgetResponseStoreData",{applicationId:t,price:e,widgetExtra:G.$widgetStore.widgetExtra,taxFree:r,userToken:s})},bootpayWidgetTermAllAgree(t){this.callBootpayDOMEvent("all-agree-terms",t),q.callHook("allTermsAccepted",t)},bootpayWidgetSelectPayment(t){const{method_alias:e,payment_type:r,wallet_id:s}=t;return G.postMessage("bootpayWidgetSelectPayment",{method_alias:e,payment_type:r,wallet_id:s})},bootpayWidgetReady(t){this.callBootpayDOMEvent("widget-ready",t),q.callHook("ready",t)},bootpayWidgetUpdateStore(t){q.updateOnProcessing({...t})},bootpayWidgetToUrl(t){location.href=t.url},bootpayWidgetShowModal(t){return vt.show(t.message,t.title,t.confirmButtonText,t.cancelButtonText,()=>{window.BootpayWidget.alertConfirm()},()=>{window.BootpayWidget.alertCancel()})},triggerGlobalChangeEvent(t){var e;t.completed=M(t.pg)&&M(t.method)&&(t.term_passed===!0||!q.data.use_terms)&&(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(t.method)===-1||t.wallet_id!==void 0),(q.data.pg!==t.pg||q.data.method!==t.method||q.data.wallet_id!==t.wallet_id||JSON.stringify(q.widgetExtra)!==JSON.stringify(t.extra))&&(this.callBootpayDOMEvent("widget-change-payment",t),q.callHook("changePayment",t)),JSON.stringify((e=t.select_terms)==null?void 0:e.filter(r=>r.agree===!0))!==JSON.stringify(q.data.terms.filter(r=>r.agree===!0))&&(this.callBootpayDOMEvent("widget-change-terms",t),q.callHook("changeTerms",t))},callBootpayDOMEvent(t,e=void 0){document.dispatchEvent(new CustomEvent([this.$eventPrefix,t].join("-"),{detail:e}))}};class Mi extends Ve{constructor(){super({messageEventName:"message.BootpayWidgetEvent",messageEventHooks:{WidgetWindowMessage:Hi}})}}const Ni=new Mi;class Li extends Pe{constructor(){super(),this.message=rr}initialize(){q.setWidgetData(void 0,{application_id:void 0,order_name:"",order_id:void 0,price:0,tax_free:0,currency:"KRW",user_token:void 0,pg:void 0,method:void 0,widget_key:void 0})}render(e,r){if(this.$blank(r==null?void 0:r.price)||r.price<0)throw new Error("결제금액은 1원 이상을 입력해주세요.");if(this.$blank(r==null?void 0:r.application_id))throw new Error("application_id가 입력되지 않았습니다.");this.initialize(),q.setWidgetData(e,r),G.render(),Ni.bind()}update(e){const{price:r,tax_free:s,currency:n,user_token:i,use_only_brandpay:x,use_terms:d,sandbox:p,widget_key:a,external_terms:c}=e;q.updateOnProcessing({price:r,tax_free:s,currency:n,user_token:i,use_only_brandpay:x,use_terms:d,external_terms:c,sandbox:p,widget_key:a}),(this.$present(i)||this.$present(x)||this.$present(d)||this.$present(p))&&G.postMessage("bootpayWidgetUpdateUserToken",{user_token:i,use_only_brandpay:x,use_terms:d,external_terms:c,sandbox:p,key:a})}rerender(){G.rerender()}destroy(){G.destroy()}selectPayment(e,r,s,n=!1,i,x){q.setPayment(e,r,s,n,i,x),F.debug("selectPayment",`pg: ${e}, method: ${r}, wallet_id: ${s}, terms: ${n}, select_terms: ${JSON.stringify(i)}, extra: ${JSON.stringify(x)}`)}currentTermsCondition(){return q.data.terms}async requestPayment(e){return this.widgetRequestPaymentValidate(1),ge.requestPayment(q.getRequestPaymentData(e))}async requestSubscription(e){return this.widgetRequestPaymentValidate(2),ge.requestSubscription(q.getRequestPaymentData(e))}isRendered(){return G.isRendered()}synchronizedRealTimeTransfer(e){G.postMessage("bootpayWidgetSynchronizedRealTimeTransfer",e)}sendSelectPayment(e){G.postMessage("bootpayWidgetSelectPayment",e)}sendMessage(e,r){G.postMessage(e,r)}currentPaymentParameters(){return this.widgetRequestPaymentValidate(),{pg:q.data.pg,method:q.data.method,wallet_id:q.data.wallet_id,terms:q.data.terms,widget_key:q.data.widget_key,widget_sandbox:q.data.sandbox,extra:q.getExtra({})}}widgetRequestPaymentValidate(e=void 0){if(e!==void 0&&q.widgetType!==e)throw new pe({event:"error",error_code:"RC_WIDGET_TYPE_INVALID",message:e===1?this.message.getLocaleMessage("widgetTypeNotPayment","ko"):this.message.getLocaleMessage("widgetTypeNotSubscription","ko")});if(this.$blank(q.data.pg)||this.$blank(q.data.method))throw new pe({event:"error",error_code:"RC_PG_METHOD_NOT_SELECTED",message:this.message.getLocaleMessage("notSelectPayment","ko")});if(!q.termsPassed&&q.data.use_terms)throw new pe({event:"error",error_code:"RC_TERMS_NOT_AGREE",message:this.message.getLocaleMessage("termsNotAgree","ko")});if(["BRANDPAY_CARD","BRANDPAY_AUTOMATIC_TRANSFER"].indexOf(q.data.method)>-1&&q.data.wallet_id===void 0)throw new pe({event:"error",error_code:"RC_BRANDPAY_NEED_SELECT_WALLET",message:this.message.getLocaleMessage("notSelectOOPay","ko")})}}const se=new Li,hs={render(t,e){se.render(t,e)},rerender(){se.rerender()},setEnvironmentMode(t,e){ge.setEnvironmentMode(t,e),D.set(t)},async requestPayment(t){return new Promise(async(e,r)=>{try{const s=await se.requestPayment(t);return e(s)}catch(s){return r(this.errorHandler(s))}})},async requestSubscription(t){return new Promise(async(e,r)=>{try{const s=await se.requestSubscription(t);return e(s)}catch(s){return r(this.errorHandler(s))}})},errorHandler(t){let e;switch(he.hideProgress(),t.name){case"BootpayEventError":e=t.eventMessage;break;default:if(M(t.event))e=t;else throw t}return e},update(t,e=!0){se.update(t),e&&this.rerender()},currentTermsCondition(){return se.currentTermsCondition()},destroy(){se.destroy()},isRendered(){return se.isRendered()},synchronizedRealTimeTransfer(t){se.synchronizedRealTimeTransfer(t)},selectPayment(t){se.sendSelectPayment(t)},setLogLevel(t){F.setLogLevel(t)},sendMessage(t,e=void 0){se.sendMessage(t,e)},setDevice(t){return ge.setDevice(t)},alertConfirm(){vt.destroy(),se.sendMessage("BootpayWidgetAlertConfirm",{confirm:!0})},alertCancel(){vt.destroy(),se.sendMessage("BootpayWidgetAlertConfirm",{confirm:!1})},currentPaymentParameters(){return se.currentPaymentParameters()},isWidgetTypeSubscription(){return q.widgetType===2},isWidgetTypePayment(){return q.widgetType===1}};typeof window<"u"&&(window.BootpayWidget=hs);class Wi extends ls{constructor(){super(),this.data={application_id:"",user_token:"",widget_key:"",hooks:{}}}encryptKey(){return M(this.data.application_id)?sr(this.data.application_id).toString().substring(0,16):""}set(e){this.data=e}callHook(e,r){this.data.hooks&&this.data.hooks[e]&&typeof this.data.hooks[e]=="function"&&this.data.hooks[e](r)}encryptParameters(){return encodeURIComponent(this.encrypt({user_token:this.data.user_token,widget_key:this.data.widget_key,sandbox:this.data.sandbox,extra:this.data.extra,log_level:F.level}))}}const yt=new Wi,fs={resize:t=>{Ue.resize(t)},showModal:t=>{De.createIFrame(t.url)},resizeModal:t=>{De.resize(t)},closeModal:()=>{De.destroy()},confirmModal:t=>vt.show(t.message,t.title,t.confirmButtonText,t.cancelButtonText,()=>{Ue.postMessage("BootpayWalletAlertConfirm",{confirm:!0})},()=>{Ue.postMessage("BootpayWalletAlertConfirm",{confirm:!1})},t.confirm),addedSuccess:t=>{Ue.postMessage("addedSuccess",t)},synchronize:t=>{Ue.postMessage("walletDataSynchronize",t)},onReady:t=>{yt.callHook("ready",t)},onChange:t=>{yt.callHook("change",t)}};class qi extends Ve{constructor(){super({messageEventName:"message.BootpayWalletEvent",messageEventHooks:{WalletWindowMessage:fs}})}}const zi=new qi;class ji extends _e{constructor(){super(),this.$iFrameId="bootpay-wallet-iframe",this.$template=this.defaultIframeHtml(),this.$walletStore=yt,this.el=void 0}render(e){this.el=String(e).replace(/#/g,"");const r=document.getElementById(this.el);if(this.$blank(e)||r===null)throw new Error("부트페이 지갑을 렌더링할 DOM Element ID를 입력해주세요.");this.templateRender(),zi.bind()}templateRender(){const e=document.getElementById(this.el);e.style.setProperty("height","0"),e.innerHTML=this.$template,this.byId(this.$iFrameId).setAttribute("src",D.toWidget(`wallet/${this.$walletStore.data.application_id}/${this.$walletStore.encryptParameters()}`))}destroy(){const e=document.getElementById(this.el);e.innerHTML=""}resize(e){this.templateResize(this.el,e)}}const Ue=new ji;class Ki extends Pe{constructor(){super()}render(e,r){if(this.$blank(r.application_id))throw new Error("application id가 입력되지 않았습니다.");if(this.$blank(e))throw new Error("지갑을 렌더링할 DOM Element ID를 입력해주세요.");yt.set(r),Ue.render(e)}}const Gi=new Ki,xs={render(t,e){Gi.render(t,e)},rerender(){},setEnvironmentMode(t,e){ge.setEnvironmentMode(t,e),D.set(t)},isRendered(){return Ue.isRendered()},synchronizedFromBootpay(t){fs.synchronize(t)}};typeof window<"u"&&(window.BootpayWallet=xs),ue.Bootpay=ge,ue.BootpayEnvironment=D,ue.BootpaySDK=O0,ue.BootpayStore=ps,ue.BootpayWallet=xs,ue.BootpayWidget=hs,ue.default=ge,Object.defineProperties(ue,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  "name": "@bootpay/client-js",
3
- "version": "5.2.0-beta.2",
3
+ "version": "5.2.0-beta.3",
4
4
  "main": "dist/index.es.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "styles": "dist/index.css",
@@ -7,13 +7,13 @@ export declare const WidgetWindowMessage: {
7
7
  bootpayWidgetResponseGetEnvironmentWidget(data: any): void;
8
8
  bootpayWidgetResponseCurrentStores(data: any): void;
9
9
  bootpayWidgetError(data: any, event: BootpayWindowEvent): void;
10
- bootpayWidgetOOpayReload(data: any): void;
10
+ bootpayWidgetBrandpayReload(data: any): void;
11
11
  bootpayWidgetResize(data: any): void;
12
12
  bootpayWidgetShowInterestInformation(data: any): void;
13
13
  bootpayWidgetAddWallet(data: any): void;
14
14
  bootpayWidgetRemoveWallet(data: any): void;
15
15
  bootpayWidgetPaymentWindowResize(data: any): void;
16
- bootpayWidgetOOpayWindowClose(): void;
16
+ bootpayWidgetBrandpayWindowClose(): void;
17
17
  bootpayWidgetModalOpen(data: any): void;
18
18
  bootpayWidgetModalClose(): void;
19
19
  bootpayRequestModalCurrentStores(data: any): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bootpay/client-js",
3
- "version": "5.2.0-beta.2",
3
+ "version": "5.2.0-beta.3",
4
4
  "main": "dist/index.es.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "styles": "dist/index.css",