choco-one-click-payment 1.1.43 → 1.1.44

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.esm.js CHANGED
@@ -4,6 +4,7 @@ const bt = {
4
4
  paymentMethod: "Способ оплаты",
5
5
  selectMethod: "Выберите метод",
6
6
  pay: "Оплатить",
7
+ login: "Войти",
7
8
  paymentSuccess: "Оплата прошла успешно!",
8
9
  paymentError: "Ошибка оплаты",
9
10
  paymentMethods: "Способ оплаты",
@@ -42,6 +43,7 @@ const bt = {
42
43
  paymentMethod: "Payment method",
43
44
  selectMethod: "Select method",
44
45
  pay: "Pay",
46
+ login: "Sign in",
45
47
  paymentSuccess: "Payment successful!",
46
48
  paymentError: "Payment error",
47
49
  paymentMethods: "Payment method",
@@ -80,6 +82,7 @@ const bt = {
80
82
  paymentMethod: "Төлем әдісі",
81
83
  selectMethod: "Әдісті таңдаңыз",
82
84
  pay: "Төлеу",
85
+ login: "Кіру",
83
86
  paymentSuccess: "Төлем сәтті өтті!",
84
87
  paymentError: "Төлем қатесі",
85
88
  paymentMethods: "Төлем әдісі",
@@ -118,6 +121,7 @@ const bt = {
118
121
  paymentMethod: "გადახდის მეთოდი",
119
122
  selectMethod: "აირჩიეთ მეთოდი",
120
123
  pay: "გადახდა",
124
+ login: "შესვლა",
121
125
  paymentSuccess: "გადახდა წარმატებით შესრულდა!",
122
126
  paymentError: "გადახდის შეცდომა",
123
127
  paymentMethods: "გადახდის მეთოდი",
@@ -237,30 +241,30 @@ function wt() {
237
241
  Object.defineProperty(l, "__esModule", {
238
242
  value: !0
239
243
  }), l.Centrifuge = void 0;
240
- var C = S(f(187)), B = S(f(471)), _ = f(147), b = f(853);
241
- function S(g) {
244
+ var C = P(f(187)), B = P(f(471)), _ = f(147), b = f(853);
245
+ function P(g) {
242
246
  return g && g.__esModule ? g : { default: g };
243
247
  }
244
- function T(g) {
248
+ function L(g) {
245
249
  "@babel/helpers - typeof";
246
- return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? T = function(p) {
250
+ return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? L = function(p) {
247
251
  return typeof p;
248
- } : T = function(p) {
252
+ } : L = function(p) {
249
253
  return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p;
250
- }, T(g);
254
+ }, L(g);
251
255
  }
252
256
  function v(g, h) {
253
257
  if (!(g instanceof h))
254
258
  throw new TypeError("Cannot call a class as a function");
255
259
  }
256
- function k(g, h) {
260
+ function S(g, h) {
257
261
  for (var p = 0; p < h.length; p++) {
258
262
  var A = h[p];
259
263
  A.enumerable = A.enumerable || !1, A.configurable = !0, "value" in A && (A.writable = !0), Object.defineProperty(g, A.key, A);
260
264
  }
261
265
  }
262
- function w(g, h, p) {
263
- return h && k(g.prototype, h), g;
266
+ function k(g, h, p) {
267
+ return h && S(g.prototype, h), g;
264
268
  }
265
269
  function I(g, h) {
266
270
  if (typeof h != "function" && h !== null)
@@ -272,7 +276,7 @@ function wt() {
272
276
  return A.__proto__ = n, A;
273
277
  }, R(g, h);
274
278
  }
275
- function L(g) {
279
+ function T(g) {
276
280
  var h = q();
277
281
  return function() {
278
282
  var A = J(g), n;
@@ -285,7 +289,7 @@ function wt() {
285
289
  };
286
290
  }
287
291
  function x(g, h) {
288
- if (h && (T(h) === "object" || typeof h == "function"))
292
+ if (h && (L(h) === "object" || typeof h == "function"))
289
293
  return h;
290
294
  if (h !== void 0)
291
295
  throw new TypeError("Derived constructors may only return object or undefined");
@@ -313,7 +317,7 @@ function wt() {
313
317
  }
314
318
  var F = "timeout", M = "connection closed", m = /* @__PURE__ */ (function(g) {
315
319
  I(p, g);
316
- var h = L(p);
320
+ var h = T(p);
317
321
  function p(A, n) {
318
322
  var r;
319
323
  return v(this, p), r = h.call(this), r._url = A, r._websocket = null, r._sockjs = null, r._isSockjs = !1, r._xmlhttprequest = null, r._binary = !1, r._methodType = null, r._pushType = null, r._encoder = null, r._decoder = null, r._status = "disconnected", r._reconnect = !0, r._reconnecting = !1, r._transport = null, r._transportName = null, r._transportClosed = !0, r._messageId = 0, r._clientID = null, r._refreshRequired = !1, r._subs = {}, r._serverSubs = {}, r._lastSeq = {}, r._lastGen = {}, r._lastOffset = {}, r._lastEpoch = {}, r._messages = [], r._isBatching = !1, r._isSubscribeBatching = !1, r._privateChannels = {}, r._numRefreshFailed = 0, r._refreshTimeout = null, r._pingTimeout = null, r._pongTimeout = null, r._subRefreshTimeouts = {}, r._retries = 0, r._callbacks = {}, r._latency = null, r._latencyStart = null, r._connectData = null, r._token = null, r._xhrID = 0, r._xhrs = {}, r._dispatchPromise = Promise.resolve(), r._protocol = "", r._config = {
@@ -351,7 +355,7 @@ function wt() {
351
355
  disableWithCredentials: !1
352
356
  }, r._configure(n), r;
353
357
  }
354
- return w(p, [{
358
+ return k(p, [{
355
359
  key: "setToken",
356
360
  value: function(n) {
357
361
  this._token = n;
@@ -389,13 +393,13 @@ function wt() {
389
393
  }, {
390
394
  key: "_ajax",
391
395
  value: function(n, r, c, d, y) {
392
- var E = this, P = "";
396
+ var E = this, w = "";
393
397
  this._debug("sending AJAX request to", n, "with data", JSON.stringify(d));
394
398
  var Q;
395
399
  this._xmlhttprequest !== null ? Q = new this._xmlhttprequest() : Q = f.g.XMLHttpRequest ? new f.g.XMLHttpRequest() : new f.g.ActiveXObject("Microsoft.XMLHTTP");
396
400
  for (var O in r)
397
- r.hasOwnProperty(O) && (P.length > 0 && (P += "&"), P += encodeURIComponent(O) + "=" + encodeURIComponent(r[O]));
398
- P.length > 0 && (P = "?" + P), Q.open("POST", n + P, !0), "withCredentials" in Q && (Q.withCredentials = !this._config.disableWithCredentials), Q.setRequestHeader("X-Requested-With", "XMLHttpRequest"), Q.setRequestHeader("Content-Type", "application/json");
401
+ r.hasOwnProperty(O) && (w.length > 0 && (w += "&"), w += encodeURIComponent(O) + "=" + encodeURIComponent(r[O]));
402
+ w.length > 0 && (w = "?" + w), Q.open("POST", n + w, !0), "withCredentials" in Q && (Q.withCredentials = !this._config.disableWithCredentials), Q.setRequestHeader("X-Requested-With", "XMLHttpRequest"), Q.setRequestHeader("Content-Type", "application/json");
399
403
  for (var X in c)
400
404
  c.hasOwnProperty(X) && Q.setRequestHeader(X, c[X]);
401
405
  return Q.onreadystatechange = function() {
@@ -437,7 +441,7 @@ function wt() {
437
441
  }, {
438
442
  key: "_websocketSupported",
439
443
  value: function() {
440
- return this._config.websocket !== null ? !0 : !(typeof WebSocket != "function" && (typeof WebSocket > "u" ? "undefined" : T(WebSocket)) !== "object");
444
+ return this._config.websocket !== null ? !0 : !(typeof WebSocket != "function" && (typeof WebSocket > "u" ? "undefined" : L(WebSocket)) !== "object");
441
445
  }
442
446
  }, {
443
447
  key: "_setFormat",
@@ -550,8 +554,8 @@ function wt() {
550
554
  n ? (E._isSuccess() && (E._triggerUnsubscribe(), E._recover = !0), E._shouldResubscribe() && E._setSubscribing()) : E._setUnsubscribed();
551
555
  }
552
556
  this._abortInflightXHRs(), this._refreshTimeout !== null && (clearTimeout(this._refreshTimeout), this._refreshTimeout = null);
553
- for (var P in this._subRefreshTimeouts)
554
- this._subRefreshTimeouts.hasOwnProperty(P) && this._subRefreshTimeouts[P] && this._clearSubRefreshTimeout(P);
557
+ for (var w in this._subRefreshTimeouts)
558
+ this._subRefreshTimeouts.hasOwnProperty(w) && this._subRefreshTimeouts[w] && this._clearSubRefreshTimeout(w);
555
559
  this._subRefreshTimeouts = {}, this._reconnect || (this._subs = {});
556
560
  }
557
561
  }, {
@@ -610,13 +614,13 @@ function wt() {
610
614
  };
611
615
  (n._token || n._connectData || n._config.name || n._config.version) && (d.params = {}), n._token && (d.params.token = n._token), n._connectData && (d.params.data = n._connectData), n._config.name && (d.params.name = n._config.name), n._config.version && (d.params.version = n._config.version);
612
616
  var y = {}, E = !1;
613
- for (var P in n._serverSubs)
614
- if (n._serverSubs.hasOwnProperty(P) && n._serverSubs[P].recoverable) {
617
+ for (var w in n._serverSubs)
618
+ if (n._serverSubs.hasOwnProperty(w) && n._serverSubs[w].recoverable) {
615
619
  E = !0;
616
620
  var Q = {
617
621
  recover: !0
618
622
  };
619
- n._serverSubs[P].seq || n._serverSubs[P].gen ? (n._serverSubs[P].seq && (Q.seq = n._serverSubs[P].seq), n._serverSubs[P].gen && (Q.gen = n._serverSubs[P].gen)) : n._serverSubs[P].offset && (Q.offset = n._serverSubs[P].offset), n._serverSubs[P].epoch && (Q.epoch = n._serverSubs[P].epoch), y[P] = Q;
623
+ n._serverSubs[w].seq || n._serverSubs[w].gen ? (n._serverSubs[w].seq && (Q.seq = n._serverSubs[w].seq), n._serverSubs[w].gen && (Q.gen = n._serverSubs[w].gen)) : n._serverSubs[w].offset && (Q.offset = n._serverSubs[w].offset), n._serverSubs[w].epoch && (Q.epoch = n._serverSubs[w].epoch), y[w] = Q;
620
624
  }
621
625
  E && (d.params || (d.params = {}), d.params.subs = y), n._latencyStart = /* @__PURE__ */ new Date(), n._call(d).then(function(O) {
622
626
  n._connectResponse(n._decoder.decodeCommandResult(n._methodType.CONNECT, O.result), E), O.next && O.next();
@@ -631,8 +635,8 @@ function wt() {
631
635
  var y = M, E = !0;
632
636
  if (d && "reason" in d && d.reason)
633
637
  try {
634
- var P = JSON.parse(d.reason);
635
- n._debug("reason is an advice object", P), y = P.reason, E = P.reconnect;
638
+ var w = JSON.parse(d.reason);
639
+ n._debug("reason is an advice object", w), y = w.reason, E = w.reconnect;
636
640
  } catch {
637
641
  y = d.reason, n._debug("reason is a plain string", y);
638
642
  }
@@ -967,8 +971,8 @@ function wt() {
967
971
  data: E
968
972
  }, y);
969
973
  else {
970
- var P = this._ajax(this._config.subscribeEndpoint, this._config.subscribeParams, this._config.subscribeHeaders, E, y);
971
- this._xhrs[d] = P;
974
+ var w = this._ajax(this._config.subscribeEndpoint, this._config.subscribeParams, this._config.subscribeHeaders, E, y);
975
+ this._xhrs[d] = w;
972
976
  }
973
977
  }
974
978
  }, {
@@ -1025,9 +1029,9 @@ function wt() {
1025
1029
  var E = n._needRecover();
1026
1030
  if (E === !0) {
1027
1031
  y.params.recover = !0;
1028
- var P = this._getLastSeq(d), Q = this._getLastGen(d);
1029
- if (P || Q)
1030
- P && (y.params.seq = P), Q && (y.params.gen = Q);
1032
+ var w = this._getLastSeq(d), Q = this._getLastGen(d);
1033
+ if (w || Q)
1034
+ w && (y.params.seq = w), Q && (y.params.gen = Q);
1031
1035
  else {
1032
1036
  var O = this._getLastOffset(d);
1033
1037
  O && (y.params.offset = O);
@@ -1087,12 +1091,12 @@ function wt() {
1087
1091
  E._shouldResubscribe() && this._subscribe(E, d);
1088
1092
  }
1089
1093
  this.stopSubscribeBatching(), this.stopBatching(), this._startPing();
1090
- var P = {
1094
+ var w = {
1091
1095
  client: n.client,
1092
1096
  transport: this._transportName,
1093
1097
  latency: this._latency
1094
1098
  };
1095
- n.data && (P.data = n.data), this.emit("connect", P), n.subs && this._processServerSubs(n.subs);
1099
+ n.data && (w.data = n.data), this.emit("connect", w), n.subs && this._processServerSubs(n.subs);
1096
1100
  }
1097
1101
  }
1098
1102
  }, {
@@ -1108,9 +1112,9 @@ function wt() {
1108
1112
  }
1109
1113
  for (var E in n)
1110
1114
  if (n.hasOwnProperty(E)) {
1111
- var P = n[E];
1112
- if (P.recovered) {
1113
- var Q = P.publications;
1115
+ var w = n[E];
1116
+ if (w.recovered) {
1117
+ var Q = w.publications;
1114
1118
  if (Q && Q.length > 0) {
1115
1119
  Q.length > 1 && (!Q[0].offset || Q[0].offset > Q[1].offset) && (Q = Q.reverse());
1116
1120
  for (var O in Q)
@@ -1118,11 +1122,11 @@ function wt() {
1118
1122
  }
1119
1123
  }
1120
1124
  this._serverSubs[E] = {
1121
- seq: P.seq,
1122
- gen: P.gen,
1123
- offset: P.offset,
1124
- epoch: P.epoch,
1125
- recoverable: P.recoverable
1125
+ seq: w.seq,
1126
+ gen: w.gen,
1127
+ offset: w.offset,
1128
+ epoch: w.epoch,
1129
+ recoverable: w.recoverable
1126
1130
  };
1127
1131
  }
1128
1132
  }
@@ -1186,8 +1190,8 @@ function wt() {
1186
1190
  var E = c.publications;
1187
1191
  if (E && E.length > 0) {
1188
1192
  E.length >= 2 && !E[0].offset && !E[1].offset && (E = E.reverse());
1189
- for (var P in E)
1190
- E.hasOwnProperty(P) && this._handlePublication(n, E[P]);
1193
+ for (var w in E)
1194
+ E.hasOwnProperty(w) && this._handlePublication(n, E[w]);
1191
1195
  }
1192
1196
  if (c.recoverable && (!r || !c.recovered) && (this._lastSeq[n] = c.seq || 0, this._lastGen[n] = c.gen || 0, this._lastOffset[n] = c.offset || 0), this._lastEpoch[n] = c.epoch || "", c.recoverable && (y._recoverable = !0), c.expires === !0) {
1193
1197
  var Q = setTimeout(function() {
@@ -1207,13 +1211,13 @@ function wt() {
1207
1211
  }
1208
1212
  var y = this._callbacks[c];
1209
1213
  if (clearTimeout(this._callbacks[c].timeout), delete this._callbacks[c], (0, b.errorExists)(n)) {
1210
- var P = y.errback;
1211
- if (!P) {
1214
+ var w = y.errback;
1215
+ if (!w) {
1212
1216
  r();
1213
1217
  return;
1214
1218
  }
1215
1219
  var Q = n.error;
1216
- P({
1220
+ w({
1217
1221
  error: Q,
1218
1222
  next: r
1219
1223
  });
@@ -1307,8 +1311,8 @@ function wt() {
1307
1311
  var E = this._decoder.decodePushData(this._pushType.PUBLICATION, c.data);
1308
1312
  this._handlePublication(y, E);
1309
1313
  } else if (d === this._pushType.MESSAGE) {
1310
- var P = this._decoder.decodePushData(this._pushType.MESSAGE, c.data);
1311
- this._handleMessage(P);
1314
+ var w = this._decoder.decodePushData(this._pushType.MESSAGE, c.data);
1315
+ this._handleMessage(w);
1312
1316
  } else if (d === this._pushType.JOIN) {
1313
1317
  var Q = this._decoder.decodePushData(this._pushType.JOIN, c.data);
1314
1318
  this._handleJoin(y, Q);
@@ -1457,8 +1461,8 @@ function wt() {
1457
1461
  var E = {
1458
1462
  client: this._clientID,
1459
1463
  channels: c
1460
- }, P = this._clientID, Q = this._newXHRID(), O = function(D) {
1461
- if (Q in n._xhrs && delete n._xhrs[Q], n._clientID === P) {
1464
+ }, w = this._clientID, Q = this._newXHRID(), O = function(D) {
1465
+ if (Q in n._xhrs && delete n._xhrs[Q], n._clientID === w) {
1462
1466
  if (D.error || D.status !== 200) {
1463
1467
  n._debug("authorization request failed");
1464
1468
  for (var re in c)
@@ -1562,18 +1566,18 @@ function wt() {
1562
1566
  Object.defineProperty(l, "__esModule", {
1563
1567
  value: !0
1564
1568
  }), l.JsonPushType = l.JsonMethodType = l.JsonEncoder = l.JsonDecoder = void 0;
1565
- function f(v, k) {
1566
- if (!(v instanceof k))
1569
+ function f(v, S) {
1570
+ if (!(v instanceof S))
1567
1571
  throw new TypeError("Cannot call a class as a function");
1568
1572
  }
1569
- function C(v, k) {
1570
- for (var w = 0; w < k.length; w++) {
1571
- var I = k[w];
1573
+ function C(v, S) {
1574
+ for (var k = 0; k < S.length; k++) {
1575
+ var I = S[k];
1572
1576
  I.enumerable = I.enumerable || !1, I.configurable = !0, "value" in I && (I.writable = !0), Object.defineProperty(v, I.key, I);
1573
1577
  }
1574
1578
  }
1575
- function B(v, k, w) {
1576
- return k && C(v.prototype, k), v;
1579
+ function B(v, S, k) {
1580
+ return S && C(v.prototype, S), v;
1577
1581
  }
1578
1582
  var _ = {
1579
1583
  CONNECT: 0,
@@ -1599,29 +1603,29 @@ function wt() {
1599
1603
  SUBSCRIBE: 5
1600
1604
  };
1601
1605
  l.JsonPushType = b;
1602
- var S = /* @__PURE__ */ (function() {
1606
+ var P = /* @__PURE__ */ (function() {
1603
1607
  function v() {
1604
1608
  f(this, v);
1605
1609
  }
1606
1610
  return B(v, [{
1607
1611
  key: "encodeCommands",
1608
- value: function(w) {
1609
- return w.map(function(I) {
1612
+ value: function(k) {
1613
+ return k.map(function(I) {
1610
1614
  return JSON.stringify(I);
1611
1615
  }).join(`
1612
1616
  `);
1613
1617
  }
1614
1618
  }]), v;
1615
1619
  })();
1616
- l.JsonEncoder = S;
1617
- var T = /* @__PURE__ */ (function() {
1620
+ l.JsonEncoder = P;
1621
+ var L = /* @__PURE__ */ (function() {
1618
1622
  function v() {
1619
1623
  f(this, v);
1620
1624
  }
1621
1625
  return B(v, [{
1622
1626
  key: "decodeReplies",
1623
- value: function(w) {
1624
- return w.split(`
1627
+ value: function(k) {
1628
+ return k.split(`
1625
1629
  `).filter(function(I) {
1626
1630
  return I !== "";
1627
1631
  }).map(function(I) {
@@ -1630,22 +1634,22 @@ function wt() {
1630
1634
  }
1631
1635
  }, {
1632
1636
  key: "decodeCommandResult",
1633
- value: function(w, I) {
1637
+ value: function(k, I) {
1634
1638
  return I;
1635
1639
  }
1636
1640
  }, {
1637
1641
  key: "decodePush",
1638
- value: function(w) {
1639
- return w;
1642
+ value: function(k) {
1643
+ return k;
1640
1644
  }
1641
1645
  }, {
1642
1646
  key: "decodePushData",
1643
- value: function(w, I) {
1647
+ value: function(k, I) {
1644
1648
  return I;
1645
1649
  }
1646
1650
  }]), v;
1647
1651
  })();
1648
- l.JsonDecoder = T;
1652
+ l.JsonDecoder = L;
1649
1653
  })
1650
1654
  ),
1651
1655
  /***/
@@ -1667,28 +1671,28 @@ function wt() {
1667
1671
  function b(h) {
1668
1672
  return h && h.__esModule ? h : { default: h };
1669
1673
  }
1670
- function S(h, p) {
1674
+ function P(h, p) {
1671
1675
  if (!(h instanceof p))
1672
1676
  throw new TypeError("Cannot call a class as a function");
1673
1677
  }
1674
- function T(h, p) {
1678
+ function L(h, p) {
1675
1679
  for (var A = 0; A < p.length; A++) {
1676
1680
  var n = p[A];
1677
1681
  n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(h, n.key, n);
1678
1682
  }
1679
1683
  }
1680
1684
  function v(h, p, A) {
1681
- return p && T(h.prototype, p), h;
1685
+ return p && L(h.prototype, p), h;
1682
1686
  }
1683
- function k(h, p) {
1687
+ function S(h, p) {
1684
1688
  if (typeof p != "function" && p !== null)
1685
1689
  throw new TypeError("Super expression must either be null or a function");
1686
- h.prototype = Object.create(p && p.prototype, { constructor: { value: h, writable: !0, configurable: !0 } }), p && w(h, p);
1690
+ h.prototype = Object.create(p && p.prototype, { constructor: { value: h, writable: !0, configurable: !0 } }), p && k(h, p);
1687
1691
  }
1688
- function w(h, p) {
1689
- return w = Object.setPrototypeOf || function(n, r) {
1692
+ function k(h, p) {
1693
+ return k = Object.setPrototypeOf || function(n, r) {
1690
1694
  return n.__proto__ = r, n;
1691
- }, w(h, p);
1695
+ }, k(h, p);
1692
1696
  }
1693
1697
  function I(h) {
1694
1698
  var p = x();
@@ -1707,9 +1711,9 @@ function wt() {
1707
1711
  return p;
1708
1712
  if (p !== void 0)
1709
1713
  throw new TypeError("Derived constructors may only return object or undefined");
1710
- return L(h);
1714
+ return T(h);
1711
1715
  }
1712
- function L(h) {
1716
+ function T(h) {
1713
1717
  if (h === void 0)
1714
1718
  throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
1715
1719
  return h;
@@ -1730,11 +1734,11 @@ function wt() {
1730
1734
  }, N(h);
1731
1735
  }
1732
1736
  var q = 0, J = 1, F = 2, M = 3, m = 4, g = /* @__PURE__ */ (function(h) {
1733
- k(A, h);
1737
+ S(A, h);
1734
1738
  var p = I(A);
1735
1739
  function A(n, r, c) {
1736
1740
  var d;
1737
- return S(this, A), d = p.call(this), d.channel = r, d._centrifuge = n, d._status = q, d._error = null, d._isResubscribe = !1, d._ready = !1, d._subscriptionPromise = null, d._noResubscribe = !1, d._recoverable = !1, d._recover = !1, d._setEvents(c), d._initializePromise(), d._promises = {}, d._promiseId = 0, d._subscribeData = null, d.on("error", function(y) {
1741
+ return P(this, A), d = p.call(this), d.channel = r, d._centrifuge = n, d._status = q, d._error = null, d._isResubscribe = !1, d._ready = !1, d._subscriptionPromise = null, d._noResubscribe = !1, d._recoverable = !1, d._recover = !1, d._setEvents(c), d._initializePromise(), d._promises = {}, d._promiseId = 0, d._subscribeData = null, d.on("error", function(y) {
1738
1742
  this._centrifuge._debug("subscription error", y);
1739
1743
  }), d;
1740
1744
  }
@@ -1963,29 +1967,29 @@ function wt() {
1963
1967
  (function(a, l, f) {
1964
1968
  Object.defineProperty(l, "__esModule", {
1965
1969
  value: !0
1966
- }), l.backoff = b, l.errorExists = S, l.extend = T, l.isFunction = B, l.log = _, l.startsWith = C;
1967
- function C(v, k) {
1968
- return v.lastIndexOf(k, 0) === 0;
1970
+ }), l.backoff = b, l.errorExists = P, l.extend = L, l.isFunction = B, l.log = _, l.startsWith = C;
1971
+ function C(v, S) {
1972
+ return v.lastIndexOf(S, 0) === 0;
1969
1973
  }
1970
1974
  function B(v) {
1971
1975
  return v == null ? !1 : typeof v == "function";
1972
1976
  }
1973
- function _(v, k) {
1977
+ function _(v, S) {
1974
1978
  if (f.g.console) {
1975
- var w = f.g.console[v];
1976
- B(w) && w.apply(f.g.console, k);
1979
+ var k = f.g.console[v];
1980
+ B(k) && k.apply(f.g.console, S);
1977
1981
  }
1978
1982
  }
1979
- function b(v, k, w) {
1980
- var I = 0.5 * Math.random(), R = Math.min(w, k * Math.pow(2, v + 1));
1983
+ function b(v, S, k) {
1984
+ var I = 0.5 * Math.random(), R = Math.min(k, S * Math.pow(2, v + 1));
1981
1985
  return Math.floor((1 - I) * R);
1982
1986
  }
1983
- function S(v) {
1987
+ function P(v) {
1984
1988
  return "error" in v && v.error !== null;
1985
1989
  }
1986
- function T(v, k) {
1987
- for (var w in k)
1988
- k.hasOwnProperty(w) && (v[w] = k[w]);
1990
+ function L(v, S) {
1991
+ for (var k in S)
1992
+ S.hasOwnProperty(k) && (v[k] = S[k]);
1989
1993
  return v;
1990
1994
  }
1991
1995
  })
@@ -2012,20 +2016,20 @@ function wt() {
2012
2016
  b.init.call(this);
2013
2017
  }
2014
2018
  a.exports = b, a.exports.once = J, b.EventEmitter = b, b.prototype._events = void 0, b.prototype._eventsCount = 0, b.prototype._maxListeners = void 0;
2015
- var S = 10;
2016
- function T(m) {
2019
+ var P = 10;
2020
+ function L(m) {
2017
2021
  if (typeof m != "function")
2018
2022
  throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof m);
2019
2023
  }
2020
2024
  Object.defineProperty(b, "defaultMaxListeners", {
2021
2025
  enumerable: !0,
2022
2026
  get: function() {
2023
- return S;
2027
+ return P;
2024
2028
  },
2025
2029
  set: function(m) {
2026
2030
  if (typeof m != "number" || m < 0 || _(m))
2027
2031
  throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + m + ".");
2028
- S = m;
2032
+ P = m;
2029
2033
  }
2030
2034
  }), b.init = function() {
2031
2035
  (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
@@ -2063,9 +2067,9 @@ function wt() {
2063
2067
  f(E[p], this, h);
2064
2068
  return !0;
2065
2069
  };
2066
- function k(m, g, h, p) {
2070
+ function S(m, g, h, p) {
2067
2071
  var A, n, r;
2068
- if (T(h), n = m._events, n === void 0 ? (n = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (n.newListener !== void 0 && (m.emit(
2072
+ if (L(h), n = m._events, n === void 0 ? (n = m._events = /* @__PURE__ */ Object.create(null), m._eventsCount = 0) : (n.newListener !== void 0 && (m.emit(
2069
2073
  "newListener",
2070
2074
  g,
2071
2075
  h.listener ? h.listener : h
@@ -2079,25 +2083,25 @@ function wt() {
2079
2083
  return m;
2080
2084
  }
2081
2085
  b.prototype.addListener = function(g, h) {
2082
- return k(this, g, h, !1);
2086
+ return S(this, g, h, !1);
2083
2087
  }, b.prototype.on = b.prototype.addListener, b.prototype.prependListener = function(g, h) {
2084
- return k(this, g, h, !0);
2088
+ return S(this, g, h, !0);
2085
2089
  };
2086
- function w() {
2090
+ function k() {
2087
2091
  if (!this.fired)
2088
2092
  return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
2089
2093
  }
2090
2094
  function I(m, g, h) {
2091
- var p = { fired: !1, wrapFn: void 0, target: m, type: g, listener: h }, A = w.bind(p);
2095
+ var p = { fired: !1, wrapFn: void 0, target: m, type: g, listener: h }, A = k.bind(p);
2092
2096
  return A.listener = h, p.wrapFn = A, A;
2093
2097
  }
2094
2098
  b.prototype.once = function(g, h) {
2095
- return T(h), this.on(g, I(this, g, h)), this;
2099
+ return L(h), this.on(g, I(this, g, h)), this;
2096
2100
  }, b.prototype.prependOnceListener = function(g, h) {
2097
- return T(h), this.prependListener(g, I(this, g, h)), this;
2101
+ return L(h), this.prependListener(g, I(this, g, h)), this;
2098
2102
  }, b.prototype.removeListener = function(g, h) {
2099
2103
  var p, A, n, r, c;
2100
- if (T(h), A = this._events, A === void 0)
2104
+ if (L(h), A = this._events, A === void 0)
2101
2105
  return this;
2102
2106
  if (p = A[g], p === void 0)
2103
2107
  return this;
@@ -2145,9 +2149,9 @@ function wt() {
2145
2149
  }, b.prototype.rawListeners = function(g) {
2146
2150
  return R(this, g, !1);
2147
2151
  }, b.listenerCount = function(m, g) {
2148
- return typeof m.listenerCount == "function" ? m.listenerCount(g) : L.call(m, g);
2149
- }, b.prototype.listenerCount = L;
2150
- function L(m) {
2152
+ return typeof m.listenerCount == "function" ? m.listenerCount(g) : T.call(m, g);
2153
+ }, b.prototype.listenerCount = T;
2154
+ function T(m) {
2151
2155
  var g = this._events;
2152
2156
  if (g !== void 0) {
2153
2157
  var h = g[m];
@@ -2314,16 +2318,16 @@ function Rt(e) {
2314
2318
  };
2315
2319
  }
2316
2320
  function Ot(e, t, o = {}) {
2317
- var k, w, I, R;
2318
- const i = [], s = (k = e == null ? void 0 : e.kaspi) == null ? void 0 : k.data, u = ((w = e == null ? void 0 : e.cards_v2) == null ? void 0 : w.data) || [], a = ((R = (I = e == null ? void 0 : e.payment_methods) == null ? void 0 : I.data) == null ? void 0 : R.attributes) || {}, l = W(a.payment_method_kaspi), f = W(a.payment_method_card), C = typeof window < "u" && window.self === window.top, _ = Xe() === "ios", b = !!(o != null && o.onlyKaspiAvailable), S = !!(o != null && o.disableKaspi);
2319
- return s != null && s.isKaspiOnly && l && !S ? [ee] : b ? s != null && s.isAvailable && l && !S ? [ee] : [] : (W(a.payment_method_apple_pay) && !me("apple_pay") && (Ce() && C || ye() || _ || st() === 16) && i.push(it), s != null && s.isAvailable && l && !S && i.push(ee), f && u.filter((L) => !L.isExpired).forEach((L) => {
2321
+ var S, k, I, R;
2322
+ const i = [], s = (S = e == null ? void 0 : e.kaspi) == null ? void 0 : S.data, u = ((k = e == null ? void 0 : e.cards_v2) == null ? void 0 : k.data) || [], a = ((R = (I = e == null ? void 0 : e.payment_methods) == null ? void 0 : I.data) == null ? void 0 : R.attributes) || {}, l = W(a.payment_method_kaspi), f = W(a.payment_method_card), C = typeof window < "u" && window.self === window.top, _ = Xe() === "ios", b = !!(o != null && o.onlyKaspiAvailable), P = !!(o != null && o.disableKaspi);
2323
+ return s != null && s.isKaspiOnly && l && !P ? [ee] : b ? s != null && s.isAvailable && l && !P ? [ee] : [] : (W(a.payment_method_apple_pay) && !me("apple_pay") && (Ce() && C || ye() || _ || st() === 16) && i.push(it), s != null && s.isAvailable && l && !P && i.push(ee), f && u.filter((T) => !T.isExpired).forEach((T) => {
2320
2324
  i.push({
2321
- iconType: ge(L.attributes.mask),
2325
+ iconType: ge(T.attributes.mask),
2322
2326
  type: "card",
2323
- cardId: L.id,
2324
- label: `•••• ${L.attributes.mask.slice(-4)}`,
2325
- cardType: L.type,
2326
- isDefault: L.attributes.isDefault
2327
+ cardId: T.id,
2328
+ label: `•••• ${T.attributes.mask.slice(-4)}`,
2329
+ cardType: T.type,
2330
+ isDefault: T.attributes.isDefault
2327
2331
  });
2328
2332
  }), W(a.payment_method_google_pay) && !me("google_pay") && !(o != null && o.disableGooglePay) && !Ce() && !ye() && i.push(at), W(a.payment_method_new_card) && i.push({
2329
2333
  iconType: "new_card",
@@ -2332,19 +2336,19 @@ function Ot(e, t, o = {}) {
2332
2336
  }), i);
2333
2337
  }
2334
2338
  function Re(e, t = {}) {
2335
- var v, k, w, I;
2336
- const o = (v = e == null ? void 0 : e.kaspi) == null ? void 0 : v.data, i = ((k = e == null ? void 0 : e.cards_v2) == null ? void 0 : k.data) || [], s = ((I = (w = e == null ? void 0 : e.payment_methods) == null ? void 0 : w.data) == null ? void 0 : I.attributes) || {}, u = W(s.payment_method_kaspi), a = W(s.payment_method_card), l = !!(t != null && t.disableKaspi), f = typeof window < "u" && window.self === window.top, B = Xe() === "ios", _ = W(s.payment_method_apple_pay) && !me("apple_pay") && (Ce() && f || ye() || B || st() === 16), b = W(s.payment_method_google_pay) && !me("google_pay") && !(t != null && t.disableGooglePay) && !Ce() && !ye();
2339
+ var v, S, k, I;
2340
+ const o = (v = e == null ? void 0 : e.kaspi) == null ? void 0 : v.data, i = ((S = e == null ? void 0 : e.cards_v2) == null ? void 0 : S.data) || [], s = ((I = (k = e == null ? void 0 : e.payment_methods) == null ? void 0 : k.data) == null ? void 0 : I.attributes) || {}, u = W(s.payment_method_kaspi), a = W(s.payment_method_card), l = !!(t != null && t.disableKaspi), f = typeof window < "u" && window.self === window.top, B = Xe() === "ios", _ = W(s.payment_method_apple_pay) && !me("apple_pay") && (Ce() && f || ye() || B || st() === 16), b = W(s.payment_method_google_pay) && !me("google_pay") && !(t != null && t.disableGooglePay) && !Ce() && !ye();
2337
2341
  if (o != null && o.isKaspiOnly && u && !l || t != null && t.onlyKaspiAvailable && (o != null && o.isAvailable) && u && !l)
2338
2342
  return ee;
2339
- const S = Rt(e);
2340
- if ((S == null ? void 0 : S.type) === "kaspi_pay" && (o != null && o.isAvailable) && u && !l)
2343
+ const P = Rt(e);
2344
+ if ((P == null ? void 0 : P.type) === "kaspi_pay" && (o != null && o.isAvailable) && u && !l)
2341
2345
  return ee;
2342
- if ((S == null ? void 0 : S.type) === "apple_pay" && _) return it;
2343
- if ((S == null ? void 0 : S.type) === "google_pay" && b) return at;
2344
- if ((S == null ? void 0 : S.type) === "new_card" && W(s.payment_method_new_card))
2346
+ if ((P == null ? void 0 : P.type) === "apple_pay" && _) return it;
2347
+ if ((P == null ? void 0 : P.type) === "google_pay" && b) return at;
2348
+ if ((P == null ? void 0 : P.type) === "new_card" && W(s.payment_method_new_card))
2345
2349
  return { iconType: "new_card", type: "new_card", label: "Оплата новой картой" };
2346
- if ((S == null ? void 0 : S.type) === "card" && a) {
2347
- const R = S.cardId != null ? i.find((L) => !L.isExpired && String(L.id) === S.cardId) : null;
2350
+ if ((P == null ? void 0 : P.type) === "card" && a) {
2351
+ const R = P.cardId != null ? i.find((T) => !T.isExpired && String(T.id) === P.cardId) : null;
2348
2352
  if (R)
2349
2353
  return {
2350
2354
  iconType: ge(R.attributes.mask),
@@ -2355,9 +2359,9 @@ function Re(e, t = {}) {
2355
2359
  };
2356
2360
  }
2357
2361
  if (a) {
2358
- const R = i.find((L) => {
2362
+ const R = i.find((T) => {
2359
2363
  var x;
2360
- return ((x = L.attributes) == null ? void 0 : x.isDefault) && !L.isExpired;
2364
+ return ((x = T.attributes) == null ? void 0 : x.isDefault) && !T.isExpired;
2361
2365
  });
2362
2366
  if (R)
2363
2367
  return {
@@ -2369,13 +2373,13 @@ function Re(e, t = {}) {
2369
2373
  };
2370
2374
  }
2371
2375
  if (o != null && o.isAvailable && u && !l) return ee;
2372
- const T = a ? i.find((R) => !R.isExpired) : null;
2373
- return T ? {
2374
- iconType: ge(T.attributes.mask),
2376
+ const L = a ? i.find((R) => !R.isExpired) : null;
2377
+ return L ? {
2378
+ iconType: ge(L.attributes.mask),
2375
2379
  type: "card",
2376
- cardId: T.id,
2377
- label: `••••${T.attributes.mask.slice(-4)}`,
2378
- cardType: T.type
2380
+ cardId: L.id,
2381
+ label: `••••${L.attributes.mask.slice(-4)}`,
2382
+ cardType: L.type
2379
2383
  } : null;
2380
2384
  }
2381
2385
  function ct(e) {
@@ -2923,18 +2927,18 @@ function cn(e) {
2923
2927
  useBonuses: B,
2924
2928
  coupon: _,
2925
2929
  useCoupon: b,
2926
- couponDisabled: S,
2927
- cashbackFormatted: T,
2930
+ couponDisabled: P,
2931
+ cashbackFormatted: L,
2928
2932
  disabled: v,
2929
- paymentMethodDisabled: k = !1,
2930
- loading: w,
2933
+ paymentMethodDisabled: S = !1,
2934
+ loading: k,
2931
2935
  showFreedomBtn: I,
2932
2936
  freedomAmountFormatted: R,
2933
- t: L,
2937
+ t: T,
2934
2938
  currency: x
2935
- } = e, N = (s == null ? void 0 : s.label) ?? L("selectMethod"), q = Ee(s), J = ut(u, a), F = sn(l, f, C, B, _, b, S, L, x), M = an(T, L), m = (a == null ? void 0 : a.type) === "google_pay", g = (a == null ? void 0 : a.type) === "apple_pay", h = m || g;
2939
+ } = e, N = (s == null ? void 0 : s.label) ?? T("selectMethod"), q = Ee(s), J = ut(u, a), F = sn(l, f, C, B, _, b, P, T, x), M = an(L, T), m = (a == null ? void 0 : a.type) === "google_pay", g = (a == null ? void 0 : a.type) === "apple_pay", h = m || g;
2936
2940
  return `
2937
- <div class="choco-widget-bottom-bar" role="region" aria-label="${L("paymentMethod")}">
2941
+ <div class="choco-widget-bottom-bar" role="region" aria-label="${T("paymentMethod")}">
2938
2942
  ${F}
2939
2943
  <div class="choco-widget-payment-info">
2940
2944
  ${I ? `
@@ -2942,7 +2946,7 @@ function cn(e) {
2942
2946
  class="choco-widget-freedom-card-btn"
2943
2947
  data-action="freedom-card"
2944
2948
  type="button"
2945
- ${v || w ? "disabled" : ""}
2949
+ ${v || k ? "disabled" : ""}
2946
2950
  >
2947
2951
  от ${R} по карте Freedom
2948
2952
  </button>
@@ -2951,11 +2955,11 @@ function cn(e) {
2951
2955
  <button
2952
2956
  class="choco-widget-payment-method ${(s == null ? void 0 : s.type) || ""}"
2953
2957
  data-action="change-method"
2954
- aria-label="${L("paymentMethod")}: ${N}"
2958
+ aria-label="${T("paymentMethod")}: ${N}"
2955
2959
  type="button"
2956
- ${k || v || w ? "disabled" : ""}
2960
+ ${S || v || k ? "disabled" : ""}
2957
2961
  >
2958
- <div class="choco-widget-method-label">${L("paymentMethod")}</div>
2962
+ <div class="choco-widget-method-label">${T("paymentMethod")}</div>
2959
2963
  <div class="choco-widget-method-value">
2960
2964
  <div class="choco-widget-method-icon-wrapper ${s == null ? void 0 : s.type}" aria-hidden="true">${q}</div>
2961
2965
  <div class="choco-widget-method-details">
@@ -2969,17 +2973,17 @@ function cn(e) {
2969
2973
  </div>
2970
2974
  </button>
2971
2975
  <div class="choco-widget-google-pay-amount ${h ? "" : "choco-widget-google-pay-amount--hidden"}" aria-live="polite">
2972
- <div class="choco-widget-google-pay-amount-label">${L("total")} ${t}</div>
2973
- ${i ? `<div class="choco-widget-google-pay-amount-value">${L("instead")} <span class="choco-widget-google-pay-amount-value-number">${o || ""}</span></div>` : ""}
2976
+ <div class="choco-widget-google-pay-amount-label">${T("total")} ${t}</div>
2977
+ ${i ? `<div class="choco-widget-google-pay-amount-value">${T("instead")} <span class="choco-widget-google-pay-amount-value-number">${o || ""}</span></div>` : ""}
2974
2978
  </div>
2975
2979
  <button
2976
- class="choco-widget-pay-button ${w ? "choco-widget-pay-button--loading" : ""} ${h ? "choco-widget-pay-button--hidden" : ""}"
2980
+ class="choco-widget-pay-button ${k ? "choco-widget-pay-button--loading" : ""} ${h ? "choco-widget-pay-button--hidden" : ""}"
2977
2981
  data-action="pay"
2978
- aria-label="${L("pay")} ${t}"
2982
+ aria-label="${S ? T("login") : `${T("pay")} ${t}`}"
2979
2983
  type="button"
2980
- ${v || w ? "disabled" : ""}
2984
+ ${v || k ? "disabled" : ""}
2981
2985
  >
2982
- ${L("pay")} ${t}
2986
+ ${S ? T("login") : `${T("pay")} ${t}`}
2983
2987
  </button>
2984
2988
  </div>
2985
2989
  <div class="choco-widget-google-pay-row ${m ? "" : "choco-widget-google-pay-row--hidden"}">
@@ -3011,7 +3015,7 @@ function cn(e) {
3011
3015
  <path d="M15 18L9 12L15 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
3012
3016
  </svg>
3013
3017
  </button>
3014
- <h3 class="choco-widget-sheet-title" id="choco-sheet-title">${L("paymentMethods")}</h3>
3018
+ <h3 class="choco-widget-sheet-title" id="choco-sheet-title">${T("paymentMethods")}</h3>
3015
3019
  <button
3016
3020
  class="choco-widget-sheet-button choco-widget-sheet-button--edit"
3017
3021
  data-action="edit-sheet"
@@ -3026,7 +3030,7 @@ function cn(e) {
3026
3030
  <button
3027
3031
  class="choco-widget-sheet-button choco-widget-sheet-button--previous"
3028
3032
  data-action="previous-sheet"
3029
- aria-label="${L("back")}"
3033
+ aria-label="${T("back")}"
3030
3034
  type="button"
3031
3035
  style="display: none;"
3032
3036
  >
@@ -3041,8 +3045,8 @@ function cn(e) {
3041
3045
  </div>
3042
3046
  <div class="choco-widget-sheet-delete-confirm" data-delete-confirm="content" aria-hidden="true">
3043
3047
  <div class="choco-widget-sheet-delete-confirm-actions">
3044
- <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--cancel" data-action="confirm-delete-cancel">${L("cancel")}</button>
3045
- <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--delete" data-action="confirm-delete-submit">${L("delete")}</button>
3048
+ <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--cancel" data-action="confirm-delete-cancel">${T("cancel")}</button>
3049
+ <button type="button" class="choco-widget-delete-confirm-btn choco-widget-delete-confirm-btn--delete" data-action="confirm-delete-submit">${T("delete")}</button>
3046
3050
  </div>
3047
3051
  </div>
3048
3052
  ${M}
@@ -3052,10 +3056,10 @@ function cn(e) {
3052
3056
  <div class="choco-widget-add-card-sheet choco-widget-payment-sheet" data-sheet="add-card" aria-hidden="true" style="display: none;">
3053
3057
  <div class="choco-widget-sheet-content choco-widget-add-card-sheet-content">
3054
3058
  <div class="choco-widget-sheet-header">
3055
- <h3 class="choco-widget-sheet-title">${L("addCard")}</h3>
3059
+ <h3 class="choco-widget-sheet-title">${T("addCard")}</h3>
3056
3060
  </div>
3057
3061
  <div class="choco-widget-add-card-iframe-wrapper">
3058
- <iframe id="choco-widget-add-card-iframe" class="choco-widget-add-card-iframe" title="${L("addCard")}" sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
3062
+ <iframe id="choco-widget-add-card-iframe" class="choco-widget-add-card-iframe" title="${T("addCard")}" sandbox="allow-forms allow-modals allow-orientation-lock allow-pointer-lock allow-popups allow-popups-to-escape-sandbox allow-presentation allow-same-origin allow-scripts"></iframe>
3059
3063
  </div>
3060
3064
  </div>
3061
3065
  </div>
@@ -3093,10 +3097,10 @@ function hn(e) {
3093
3097
  lt(e) && (e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.innerHTML = An());
3094
3098
  }
3095
3099
  function fn(e) {
3096
- var B, _, b, S, T;
3100
+ var B, _, b, P, L;
3097
3101
  if (e._destroyed || !lt(e)) return;
3098
3102
  e.container.style.setProperty("--choco-widget-accent-color", e.config.color), e.container.classList.remove("choco-one-click-widget--visible");
3099
- const t = e.getAvailablePaymentMethods(), o = (B = e.checkoutContext) == null ? void 0 : B.data, i = e.config.currency || "KZT", s = (S = (b = (_ = o == null ? void 0 : o.balance) == null ? void 0 : _.data) == null ? void 0 : b.money) == null ? void 0 : S[i], u = s > 0 ? K(s, e.config.locale, e.config.currency) : null, a = (T = o == null ? void 0 : o.cashback) == null ? void 0 : T.data, l = (a == null ? void 0 : a.cashbackAmount) > 0 ? K(a.cashbackAmount, e.config.locale, e.config.currency) : null, f = e._getPayableAmount(), C = f < e.config.amount;
3103
+ const t = e.getAvailablePaymentMethods(), o = (B = e.checkoutContext) == null ? void 0 : B.data, i = e.config.currency || "KZT", s = (P = (b = (_ = o == null ? void 0 : o.balance) == null ? void 0 : _.data) == null ? void 0 : b.money) == null ? void 0 : P[i], u = s > 0 ? K(s, e.config.locale, e.config.currency) : null, a = (L = o == null ? void 0 : o.cashback) == null ? void 0 : L.data, l = (a == null ? void 0 : a.cashbackAmount) > 0 ? K(a.cashbackAmount, e.config.locale, e.config.currency) : null, f = e._getPayableAmount(), C = f < e.config.amount;
3100
3104
  e.container.innerHTML = cn({
3101
3105
  amountFormatted: K(f, e.config.locale, e.config.currency),
3102
3106
  originalAmountFormatted: K(
@@ -3125,7 +3129,7 @@ function fn(e) {
3125
3129
  e.config.locale,
3126
3130
  e.config.currency
3127
3131
  ),
3128
- t: (v, k) => e.t(v, k),
3132
+ t: (v, S) => e.t(v, S),
3129
3133
  currency: i
3130
3134
  }), e._attachEventListeners(), e.isOpen = !0, e._emitUserEvent("one_click_pay_cta_rendered", {
3131
3135
  terminal_id: e.config.terminalId,
@@ -3174,13 +3178,13 @@ function dt(e) {
3174
3178
  t && e.selectedPaymentMethod && (t.className = `choco-widget-payment-method ${e.selectedPaymentMethod.type}`), o && e.selectedPaymentMethod && (o.className = `choco-widget-method-name ${e.selectedPaymentMethod.type}`, o.textContent = e.selectedPaymentMethod.label), i && e.selectedPaymentMethod && (i.className = `choco-widget-method-icon-wrapper ${e.selectedPaymentMethod.type}`, i.innerHTML = ln(e.selectedPaymentMethod)), ht(e);
3175
3179
  }
3176
3180
  function pe(e) {
3177
- var _, b, S, T, v, k;
3181
+ var _, b, P, L, v, S;
3178
3182
  const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-pay-button"), o = (b = e.container) == null ? void 0 : b.querySelector(
3179
3183
  ".choco-widget-google-pay-amount"
3180
- ), i = (S = e.container) == null ? void 0 : S.querySelector(
3184
+ ), i = (P = e.container) == null ? void 0 : P.querySelector(
3181
3185
  ".choco-widget-google-pay-amount-label"
3182
3186
  );
3183
- let s = (T = e.container) == null ? void 0 : T.querySelector(
3187
+ let s = (L = e.container) == null ? void 0 : L.querySelector(
3184
3188
  ".choco-widget-google-pay-amount-value"
3185
3189
  ), u = (v = e.container) == null ? void 0 : v.querySelector(
3186
3190
  ".choco-widget-google-pay-amount-value-number"
@@ -3190,8 +3194,11 @@ function pe(e) {
3190
3194
  e.config.locale,
3191
3195
  e.config.currency
3192
3196
  );
3193
- t && (t.textContent = `${e.t("pay")} ${l}`, t.setAttribute("aria-label", `${e.t("pay")} ${l}`));
3194
- const B = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-freedom-card-btn");
3197
+ if (t) {
3198
+ const k = e.paymentMethodDisabled ? e.t("login") : `${e.t("pay")} ${l}`;
3199
+ t.textContent = k, t.setAttribute("aria-label", k);
3200
+ }
3201
+ const B = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-freedom-card-btn");
3195
3202
  if (B && (B.textContent = `от ${K(Math.round(a * 0.84), e.config.locale, e.config.currency)} по карте Freedom`), i && (i.textContent = `${e.t("total")} ${l}`), !f) {
3196
3203
  s == null || s.remove();
3197
3204
  return;
@@ -3201,16 +3208,16 @@ function pe(e) {
3201
3208
  )), u ? u.textContent = C : s && (s.textContent = `${e.t("instead")} ${C}`);
3202
3209
  }
3203
3210
  function ht(e) {
3204
- var f, C, B, _, b, S, T, v, k, w;
3211
+ var f, C, B, _, b, P, L, v, S, k;
3205
3212
  const t = ((f = e.selectedPaymentMethod) == null ? void 0 : f.type) === "google_pay", o = ((C = e.selectedPaymentMethod) == null ? void 0 : C.type) === "apple_pay", i = t || o, s = (B = e.container) == null ? void 0 : B.querySelector(".choco-widget-pay-button"), u = (_ = e.container) == null ? void 0 : _.querySelector(
3206
3213
  ".choco-widget-google-pay-amount"
3207
- ), a = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-google-pay-row"), l = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-apple-pay-row");
3214
+ ), a = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-google-pay-row"), l = (P = e.container) == null ? void 0 : P.querySelector(".choco-widget-apple-pay-row");
3208
3215
  if (s == null || s.classList.toggle("choco-widget-pay-button--hidden", i), u == null || u.classList.toggle(
3209
3216
  "choco-widget-google-pay-amount--hidden",
3210
3217
  !i
3211
3218
  ), a == null || a.classList.toggle("choco-widget-google-pay-row--hidden", !t), l == null || l.classList.toggle("choco-widget-apple-pay-row--hidden", !o), t) {
3212
3219
  gn(e);
3213
- const I = (T = e.container) == null ? void 0 : T.querySelector(
3220
+ const I = (L = e.container) == null ? void 0 : L.querySelector(
3214
3221
  '[data-action="apple-pay-button-slot"]'
3215
3222
  );
3216
3223
  I && (I.innerHTML = "");
@@ -3222,9 +3229,9 @@ function ht(e) {
3222
3229
  I && (I.innerHTML = ""), pn(e);
3223
3230
  } else {
3224
3231
  e._googlePayButtonRenderVersion += 1;
3225
- const I = (k = e.container) == null ? void 0 : k.querySelector(
3232
+ const I = (S = e.container) == null ? void 0 : S.querySelector(
3226
3233
  '[data-action="google-pay-button-slot"]'
3227
- ), R = (w = e.container) == null ? void 0 : w.querySelector(
3234
+ ), R = (k = e.container) == null ? void 0 : k.querySelector(
3228
3235
  '[data-action="apple-pay-button-slot"]'
3229
3236
  );
3230
3237
  I && (I.innerHTML = ""), R && (R.innerHTML = "");
@@ -3304,28 +3311,28 @@ function ne(e) {
3304
3311
  e.loading = !0, Y(e);
3305
3312
  }
3306
3313
  function j(e) {
3307
- var _, b, S, T, v, k, w, I;
3314
+ var _, b, P, L, v, S, k, I;
3308
3315
  e.loading = !1;
3309
- const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-payment-method"), o = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), i = (S = e.container) == null ? void 0 : S.querySelector(
3316
+ const t = (_ = e.container) == null ? void 0 : _.querySelector(".choco-widget-payment-method"), o = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-pay-button"), i = (P = e.container) == null ? void 0 : P.querySelector(
3310
3317
  ".choco-widget-google-pay-button-slot button"
3311
- ), s = (T = e.container) == null ? void 0 : T.querySelector(
3318
+ ), s = (L = e.container) == null ? void 0 : L.querySelector(
3312
3319
  ".choco-widget-apple-pay-button-slot button"
3313
3320
  ), u = (v = e.container) == null ? void 0 : v.querySelector(
3314
3321
  ".choco-widget-google-pay-amount"
3315
- ), a = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-google-pay-row"), l = (w = e.container) == null ? void 0 : w.querySelector(".choco-widget-apple-pay-row"), f = (I = e.container) == null ? void 0 : I.querySelector(
3322
+ ), a = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-google-pay-row"), l = (k = e.container) == null ? void 0 : k.querySelector(".choco-widget-apple-pay-row"), f = (I = e.container) == null ? void 0 : I.querySelector(
3316
3323
  ".choco-widget-balance-section"
3317
3324
  ), C = e._isInteractionBlocked(), B = e.paymentMethodDisabled || C;
3318
3325
  t && (t.disabled = B), o && (o.disabled = C, o.classList.remove("choco-widget-pay-button--loading")), i && (i.disabled = C), s && (s.disabled = C), u == null || u.classList.toggle("choco-widget-wallet-blocked", C), u == null || u.setAttribute("aria-disabled", String(C)), a == null || a.classList.toggle("choco-widget-wallet-blocked", C), a == null || a.setAttribute("aria-disabled", String(C)), l == null || l.classList.toggle("choco-widget-wallet-blocked", C), l == null || l.setAttribute("aria-disabled", String(C)), f == null || f.classList.remove("disabled");
3319
3326
  }
3320
3327
  function Y(e) {
3321
- var b, S, T, v, k, w, I, R, L;
3322
- const t = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-payment-method"), o = (S = e.container) == null ? void 0 : S.querySelector(".choco-widget-pay-button"), i = (T = e.container) == null ? void 0 : T.querySelector(".choco-widget-freedom-card-btn"), s = (v = e.container) == null ? void 0 : v.querySelector(
3328
+ var b, P, L, v, S, k, I, R, T;
3329
+ const t = (b = e.container) == null ? void 0 : b.querySelector(".choco-widget-payment-method"), o = (P = e.container) == null ? void 0 : P.querySelector(".choco-widget-pay-button"), i = (L = e.container) == null ? void 0 : L.querySelector(".choco-widget-freedom-card-btn"), s = (v = e.container) == null ? void 0 : v.querySelector(
3323
3330
  ".choco-widget-google-pay-button-slot button"
3324
- ), u = (k = e.container) == null ? void 0 : k.querySelector(
3331
+ ), u = (S = e.container) == null ? void 0 : S.querySelector(
3325
3332
  ".choco-widget-apple-pay-button-slot button"
3326
- ), a = (w = e.container) == null ? void 0 : w.querySelector(
3333
+ ), a = (k = e.container) == null ? void 0 : k.querySelector(
3327
3334
  ".choco-widget-google-pay-amount"
3328
- ), l = (I = e.container) == null ? void 0 : I.querySelector(".choco-widget-google-pay-row"), f = (R = e.container) == null ? void 0 : R.querySelector(".choco-widget-apple-pay-row"), C = (L = e.container) == null ? void 0 : L.querySelector(
3335
+ ), l = (I = e.container) == null ? void 0 : I.querySelector(".choco-widget-google-pay-row"), f = (R = e.container) == null ? void 0 : R.querySelector(".choco-widget-apple-pay-row"), C = (T = e.container) == null ? void 0 : T.querySelector(
3329
3336
  ".choco-widget-balance-section"
3330
3337
  ), B = e._isInteractionBlocked(), _ = e.paymentMethodDisabled || B;
3331
3338
  C == null || C.classList.toggle("disabled", B), t && (t.disabled = _), o && (o.disabled = B, o.classList.toggle("choco-widget-pay-button--loading", e.loading)), i && (i.disabled = B), s && (s.disabled = B), u && (u.disabled = B), a == null || a.classList.toggle("choco-widget-wallet-blocked", B), a == null || a.setAttribute("aria-disabled", String(B)), l == null || l.classList.toggle("choco-widget-wallet-blocked", B), l == null || l.setAttribute("aria-disabled", String(B)), f == null || f.classList.toggle("choco-widget-wallet-blocked", B), f == null || f.setAttribute("aria-disabled", String(B));
@@ -3703,8 +3710,8 @@ async function In(e, t) {
3703
3710
  }, s.begin();
3704
3711
  }
3705
3712
  async function Qn(e, t) {
3706
- var k, w, I, R, L, x;
3707
- const o = (k = e.checkoutContext) == null ? void 0 : k.data, i = ((I = (w = o == null ? void 0 : o.payment_methods) == null ? void 0 : w.data) == null ? void 0 : I.attributes) || {}, s = i.google_pay_settings || {};
3713
+ var S, k, I, R, T, x;
3714
+ const o = (S = e.checkoutContext) == null ? void 0 : S.data, i = ((I = (k = o == null ? void 0 : o.payment_methods) == null ? void 0 : k.data) == null ? void 0 : I.attributes) || {}, s = i.google_pay_settings || {};
3708
3715
  if (!(i.payment_method_google_pay === "enabled" || i.payment_method_google_pay === !0)) {
3709
3716
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3710
3717
  return;
@@ -3739,7 +3746,7 @@ async function Qn(e, t) {
3739
3746
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3740
3747
  return;
3741
3748
  }
3742
- const S = [
3749
+ const P = [
3743
3750
  {
3744
3751
  type: "CARD",
3745
3752
  parameters: {
@@ -3752,10 +3759,10 @@ async function Qn(e, t) {
3752
3759
  parameters: { gateway: a, gatewayMerchantId: l }
3753
3760
  }
3754
3761
  }
3755
- ], T = {
3762
+ ], L = {
3756
3763
  apiVersion: 2,
3757
3764
  apiVersionMinor: 0,
3758
- allowedPaymentMethods: S,
3765
+ allowedPaymentMethods: P,
3759
3766
  transactionInfo: {
3760
3767
  totalPriceStatus: "FINAL",
3761
3768
  totalPriceLabel: "Итого",
@@ -3771,14 +3778,14 @@ async function Qn(e, t) {
3771
3778
  const N = await v.isReadyToPay({
3772
3779
  apiVersion: 2,
3773
3780
  apiVersionMinor: 0,
3774
- allowedPaymentMethods: S
3781
+ allowedPaymentMethods: P
3775
3782
  });
3776
3783
  if (!(N != null && N.result)) {
3777
3784
  e.config.onError({ attributes: { message: e.t("errorGooglePayUnsupported") } });
3778
3785
  return;
3779
3786
  }
3780
3787
  ne(e);
3781
- const q = await v.loadPaymentData(T), J = (L = (R = q == null ? void 0 : q.paymentMethodData) == null ? void 0 : R.tokenizationData) == null ? void 0 : L.token;
3788
+ const q = await v.loadPaymentData(L), J = (T = (R = q == null ? void 0 : q.paymentMethodData) == null ? void 0 : R.tokenizationData) == null ? void 0 : T.token;
3782
3789
  if (!J) throw new Error(e.t("errorGooglePayPayment"));
3783
3790
  const F = JSON.parse(J), M = await At(
3784
3791
  e.apiUrl,
@@ -3825,7 +3832,7 @@ async function Sn(e, t, o) {
3825
3832
  }
3826
3833
  }
3827
3834
  function Pn(e) {
3828
- var a, l, f, C, B, _, b, S, T, v, k, w;
3835
+ var a, l, f, C, B, _, b, P, L, v, S, k;
3829
3836
  const t = e.container;
3830
3837
  (a = t.querySelector('[data-action="freedom-card"]')) == null || a.addEventListener("click", () => {
3831
3838
  e.config.onFreedomLink && e.config.onFreedomLink();
@@ -3835,17 +3842,17 @@ function Pn(e) {
3835
3842
  e.isPaymentSheetEditMode = !0, Ae(e), ue(e);
3836
3843
  }), (_ = t.querySelector('[data-action="previous-sheet"]')) == null || _.addEventListener("click", () => {
3837
3844
  e.isPaymentSheetEditMode = !1, Ae(e), ue(e);
3838
- }), (b = t.querySelector('[data-action="close-add-card"]')) == null || b.addEventListener("click", () => ae(e)), (S = t.querySelector('[data-action="confirm-delete-cancel"]')) == null || S.addEventListener("click", () => ve(e)), (T = t.querySelector('[data-action="confirm-delete-submit"]')) == null || T.addEventListener("click", () => {
3845
+ }), (b = t.querySelector('[data-action="close-add-card"]')) == null || b.addEventListener("click", () => ae(e)), (P = t.querySelector('[data-action="confirm-delete-cancel"]')) == null || P.addEventListener("click", () => ve(e)), (L = t.querySelector('[data-action="confirm-delete-submit"]')) == null || L.addEventListener("click", () => {
3839
3846
  if (e._pendingDeleteMethod) {
3840
3847
  const I = e._pendingDeleteMethod;
3841
3848
  De(e, !0), bn(e, I).then(() => G(e)).finally(() => De(e, !1));
3842
3849
  }
3843
3850
  }), t.querySelectorAll(".choco-widget-method-item").forEach((I) => {
3844
3851
  I.addEventListener("click", (R) => {
3845
- const L = JSON.parse(
3852
+ const T = JSON.parse(
3846
3853
  R.currentTarget.getAttribute("data-method") || "{}"
3847
3854
  );
3848
- gt(e, L);
3855
+ gt(e, T);
3849
3856
  });
3850
3857
  });
3851
3858
  const o = t.querySelector('[data-sheet="payment"]');
@@ -3857,11 +3864,11 @@ function Pn(e) {
3857
3864
  e.useBalance = I.target.checked, tt(e), e._updatePayButtonAmount();
3858
3865
  }));
3859
3866
  const s = t.querySelector('[data-action="toggle-bonuses"]');
3860
- s && ((k = s.querySelector("input[type='checkbox']")) == null || k.addEventListener("change", (I) => {
3867
+ s && ((S = s.querySelector("input[type='checkbox']")) == null || S.addEventListener("change", (I) => {
3861
3868
  e.useBonuses = I.target.checked, e.config.onAppliedBonus(e.useBonuses), tt(e), e._updatePayButtonAmount();
3862
3869
  }));
3863
3870
  const u = t.querySelector('[data-action="toggle-coupon"]');
3864
- u && ((w = u.querySelector("input[type='checkbox']")) == null || w.addEventListener("change", (I) => {
3871
+ u && ((k = u.querySelector("input[type='checkbox']")) == null || k.addEventListener("change", (I) => {
3865
3872
  e.useCoupon = I.target.checked, e._updatePayButtonAmount();
3866
3873
  })), document.removeEventListener("keydown", e._boundKeyDown), document.addEventListener("keydown", e._boundKeyDown), ht(e);
3867
3874
  }
@@ -3957,7 +3964,7 @@ class ie {
3957
3964
  return Number.isFinite(t) && t > 0 ? t : 0;
3958
3965
  }
3959
3966
  _getPaymentBreakdown() {
3960
- const t = this.config.amount, o = this._getBalanceAmount(), i = this.useBalance ? Math.min(o, t) : 0, s = t - i, u = this.useBalance && i >= t, a = this.useBonuses ? this._getAvailableBonus() : 0, l = Math.max(s - a, 0), f = this._getCouponDiscount(), C = Math.max(l - f, 0), B = this.useBalance ? t : C, _ = this.useBalance && !u, S = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
3967
+ const t = this.config.amount, o = this._getBalanceAmount(), i = this.useBalance ? Math.min(o, t) : 0, s = t - i, u = this.useBalance && i >= t, a = this.useBonuses ? this._getAvailableBonus() : 0, l = Math.max(s - a, 0), f = this._getCouponDiscount(), C = Math.max(l - f, 0), B = this.useBalance ? t : C, _ = this.useBalance && !u, P = this.useCoupon && this.selectedCoupon && !this._isCouponDisabled() ? {
3961
3968
  id: this.selectedCoupon.voucher_id,
3962
3969
  template_id: this.selectedCoupon.template_id,
3963
3970
  type: this.selectedCoupon.type
@@ -3968,7 +3975,7 @@ class ie {
3968
3975
  checkoutAmount: B,
3969
3976
  forceBalanceMethod: u,
3970
3977
  useBalance: _,
3971
- voucher: S
3978
+ voucher: P
3972
3979
  }
3973
3980
  };
3974
3981
  }