var Q = (e, l, o) => new Promise((c, m) => {
  var L = (h) => {
    try {
      g(o.next(h));
    } catch (S) {
      m(S);
    }
  }, $ = (h) => {
    try {
      g(o.throw(h));
    } catch (S) {
      m(S);
    }
  }, g = (h) => h.done ? c(h.value) : Promise.resolve(h.value).then(L, $);
  g((o = o.apply(e, l)).next());
});
import { b as se, p as ue, r as de, h as D, H as le } from "./index-1ef3a64c-D5p-wZAC.js";
import { c as ce } from "./app-globals-0f993ce5-DzSE6TtH.js";
var he = () => {
  const e = import.meta.url, l = {};
  return e !== "" && (l.resourcesUrl = new URL(".", e).href), ue(l);
};
he().then((e) => Q(void 0, null, function* () {
  return yield ce(), se([["user-deposit-withdrawal", [[1, "user-deposit-withdrawal", { mbSource: [513, "mb-source"], clientStyling: [513, "client-styling"], clientStylingUrl: [513, "client-styling-url"], translationUrl: [513, "translation-url"], endpoint: [513], type: [513], channel: [513], language: [513], productType: [513, "product-type"], userId: [513, "user-id"], session: [513], successUrl: [513, "success-url"], cancelUrl: [513, "cancel-url"], failUrl: [513, "fail-url"], sportsUrl: [513, "sports-url"], casinoUrl: [513, "casino-url"], contactUrl: [513, "contact-url"], depositUrl: [513, "deposit-url"], currency: [513], showBonusSelectionInput: [513, "show-bonus-selection-input"], isShortCashier: [516, "is-short-cashier"], homeUrl: [513, "home-url"], beforeRedirect: [16], forwardCashierRedirects: [516, "forward-cashier-redirects"], dynamicHeight: [32], cashierInfoUrl: [32] }, null, { clientStyling: ["handleClientStylingChange"], clientStylingUrl: ["handleClientStylingChangeURL"] }]]]], e);
}));
const fe = "en", pe = ["ro", "en", "fr", "hr", "en-us", "es-mx", "pt-br", "es", "de", "pt", "tr"], re = {
  en: {
    Deposit: "Deposit",
    Withdraw: "Withdraw",
    denyDeposit: "Please be informed that currently you are not allowed to initiate deposit transactions.",
    denyWithdrawal: "Please be informed that currently you are not allowed to initiate withdrawal transactions.",
    notFoundErrorCode: "Not found error code",
    errorCode21121: "Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",
    errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
    errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
  },
  "en-us": {
    Deposit: "Deposit",
    Withdraw: "Withdraw",
    denyDeposit: "Please be informed that currently you are not allowed to initiate deposit transactions.",
    denyWithdrawal: "Please be informed that currently you are not allowed to initiate withdrawal transactions.",
    notFoundErrorCode: "Not found error code",
    errorCode21121: "Dear Player! Please be informed that currently you are allowed to initiate only withdrawal transactions from your player account. Error Code: 21121",
    errorCode21122: "Dear player! Please be informed that currently you are not allowed to initiate withdrawal transaction from your player account. Error Code: 21122",
    errorCode21123: "Dear player! Please be informed that currently you are not allowed to make a deposit to your player account. Error Code:21123"
  },
  ro: {
    Deposit: "Depunere",
    Withdraw: "Retragere",
    denyDeposit: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de depunere.",
    denyWithdrawal: "Vă informăm că în prezent nu aveți permisiunea de a iniția tranzacții de retragere.",
    notFoundErrorCode: "Cod de eroare negăsit",
    errorCode21122: "Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a iniția o tranzacție de retragere din contul dvs. de jucător. Cod de eroare: 21122",
    errorCode21123: "Stimate jucător! Vă informăm că în prezent nu aveți permisiunea de a efectua o depunere în contul dvs. de jucător. Cod de eroare: 21123"
  },
  fr: {
    Deposit: "Dépôt",
    Withdraw: "Retrait",
    denyDeposit: "Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de dépôt.",
    denyWithdrawal: "Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier des transactions de retrait.",
    notFoundErrorCode: "Code d’erreur introuvable",
    errorCode21122: "Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à initier une transaction de retrait depuis votre compte joueur. Code d’erreur : 21122",
    errorCode21123: "Cher joueur ! Veuillez noter qu’actuellement vous n’êtes pas autorisé à effectuer un dépôt sur votre compte joueur. Code d’erreur : 21123"
  },
  hr: {
    Deposit: "Uplata",
    Withdraw: "Isplata",
    denyDeposit: "Obavještavamo Vas da trenutno nemate mogućnost uplata.",
    denyWithdrawal: "Obavještavamo vas da trenutno niste ovlašteni za pokretanje transakcija isplate.",
    notFoundErrorCode: "Not found error code",
    errorCode21122: "Poštovani, trenutno nije moguće izvršiti isplatu sa Vašeg računa. Error Code: 21122",
    errorCode21123: "Poštovani, trenutno nije moguće izvršiti uplatu na Vaš račun. Error Code:21123"
  },
  de: {
    Deposit: "Einzahlung",
    Withdraw: "Abhebung",
    denyDeposit: "Bitte beachten Sie, dass Sie derzeit keine Einzahlungs-Transaktionen durchführen dürfen.",
    denyWithdrawal: "Bitte beachten Sie, dass Sie derzeit keine Abhebungs-Transaktionen durchführen dürfen.",
    notFoundErrorCode: "Fehlercode nicht gefunden",
    errorCode21122: "Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Abhebung von Ihrem Spielerkonto durchführen dürfen. Fehlercode: 21122",
    errorCode21123: "Sehr geehrter Spieler! Bitte beachten Sie, dass Sie derzeit keine Einzahlung auf Ihr Spielerkonto durchführen dürfen. Fehlercode: 21123"
  },
  es: {
    Deposit: "Depósito",
    Withdraw: "Retiro",
    denyDeposit: "Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",
    denyWithdrawal: "Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",
    notFoundErrorCode: "Código de error no encontrado",
    errorCode21122: "¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",
    errorCode21123: "¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"
  },
  pt: {
    Deposit: "Depósito",
    Withdraw: "Levantamento",
    denyDeposit: "Informamos que atualmente não tem permissão para iniciar transações de depósito.",
    denyWithdrawal: "Informamos que atualmente não tem permissão para iniciar transações de levantamento.",
    notFoundErrorCode: "Código de erro não encontrado",
    errorCode21122: "Caro jogador! Informamos que atualmente não tem permissão para iniciar uma transação de levantamento na sua conta de jogador. Código de erro: 21122",
    errorCode21123: "Caro jogador! Informamos que atualmente não tem permissão para realizar um depósito na sua conta de jogador. Código de erro: 21123"
  },
  "es-mx": {
    Deposit: "Depósito",
    Withdraw: "Retiro",
    denyDeposit: "Le informamos que actualmente no tiene permitido iniciar transacciones de depósito.",
    denyWithdrawal: "Le informamos que actualmente no tiene permitido iniciar transacciones de retiro.",
    notFoundErrorCode: "Código de error no encontrado",
    errorCode21122: "¡Estimado jugador! Le informamos que actualmente no tiene permitido iniciar una transacción de retiro desde su cuenta de jugador. Código de error: 21122",
    errorCode21123: "¡Estimado jugador! Le informamos que actualmente no tiene permitido realizar un depósito en su cuenta de jugador. Código de error: 21123"
  },
  "pt-br": {
    Deposit: "Depósito",
    Withdraw: "Saque",
    denyDeposit: "Informamos que atualmente você não tem permissão para iniciar transações de depósito.",
    denyWithdrawal: "Informamos que atualmente você não tem permissão para iniciar transações de saque.",
    notFoundErrorCode: "Código de erro não encontrado",
    errorCode21122: "Caro jogador! Informamos que atualmente você não tem permissão para iniciar uma transação de saque em sua conta de jogador. Código de erro: 21122",
    errorCode21123: "Caro jogador! Informamos que atualmente você não tem permissão para realizar um depósito em sua conta de jogador. Código de erro: 21123"
  },
  tr: {
    Deposit: "Para Yatırma",
    Withdraw: "Para Çekme",
    denyDeposit: "Lütfen şu anda para yatırma işlemi başlatamayacağınızı bilgilerinize sunarız.",
    denyWithdrawal: "Lütfen şu anda para çekme işlemi başlatamayacağınızı bilgilerinize sunarız.",
    notFoundErrorCode: "Hata kodu bulunamadı",
    errorCode21122: "Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınızdan para çekme işlemi başlatamayacağınızı bilgilerinize sunarız. Hata Kodu: 21122",
    errorCode21123: "Değerli oyuncumuz! Lütfen şu anda oyuncu hesabınıza para yatırma işlemi yapamayacağınızı bilgilerinize sunarız. Hata Kodu: 21123"
  }
}, me = (e) => new Promise((l) => {
  fetch(e).then((o) => o.json()).then((o) => {
    Object.keys(o).forEach((c) => {
      for (let m in o[c])
        re[c][m] = o[c][m];
    }), l(!0);
  });
}), j = (e, l) => {
  const o = l;
  return re[o !== void 0 && pe.includes(o) ? o : fe][e];
};
function K(e, l) {
  if (e) {
    const o = document.createElement("style");
    o.innerHTML = l, e.appendChild(o);
  }
}
function ee(e, l) {
  if (!e || !l)
    return;
  const o = new URL(l);
  fetch(o.href).then((c) => c.text()).then((c) => {
    const m = document.createElement("style");
    m.innerHTML = c, e && e.appendChild(m);
  }).catch((c) => {
    console.error("There was an error while trying to load client styling from URL", c);
  });
}
function ye(e, l, o) {
  if (window.emMessageBus) {
    const c = document.createElement("style");
    window.emMessageBus.subscribe(l, (m) => {
      c.innerHTML = m, e && e.appendChild(c);
    });
  }
}
const ge = (e) => !!(e.toLowerCase().match(/android/i) || e.toLowerCase().match(/blackberry|bb/i) || e.toLowerCase().match(/iphone|ipad|ipod/i) || e.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i));
var ne = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {}, ie = { exports: {} };
(function(e, l) {
  (function(o, c) {
    e.exports = c();
  })(ne, function() {
    var o = 1e3, c = 6e4, m = 36e5, L = "millisecond", $ = "second", g = "minute", h = "hour", S = "day", _ = "week", M = "month", N = "quarter", T = "year", z = "date", s = "Invalid Date", U = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, H = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(a) {
      var n = ["th", "st", "nd", "rd"], t = a % 100;
      return "[" + a + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
    } }, W = function(a, n, t) {
      var i = String(a);
      return !i || i.length >= n ? a : "" + Array(n + 1 - i.length).join(t) + a;
    }, G = { s: W, z: function(a) {
      var n = -a.utcOffset(), t = Math.abs(n), i = Math.floor(t / 60), r = t % 60;
      return (n <= 0 ? "+" : "-") + W(i, 2, "0") + ":" + W(r, 2, "0");
    }, m: function a(n, t) {
      if (n.date() < t.date())
        return -a(t, n);
      var i = 12 * (t.year() - n.year()) + (t.month() - n.month()), r = n.clone().add(i, M), u = t - r < 0, d = n.clone().add(i + (u ? -1 : 1), M);
      return +(-(i + (t - r) / (u ? r - d : d - r)) || 0);
    }, a: function(a) {
      return a < 0 ? Math.ceil(a) || 0 : Math.floor(a);
    }, p: function(a) {
      return { M, y: T, w: _, d: S, D: z, h, m: g, s: $, ms: L, Q: N }[a] || String(a || "").toLowerCase().replace(/s$/, "");
    }, u: function(a) {
      return a === void 0;
    } }, x = "en", k = {};
    k[x] = F;
    var q = "$isDayjsObject", A = function(a) {
      return a instanceof Z || !(!a || !a[q]);
    }, R = function a(n, t, i) {
      var r;
      if (!n)
        return x;
      if (typeof n == "string") {
        var u = n.toLowerCase();
        k[u] && (r = u), t && (k[u] = t, r = u);
        var d = n.split("-");
        if (!r && d.length > 1)
          return a(d[0]);
      } else {
        var p = n.name;
        k[p] = n, r = p;
      }
      return !i && r && (x = r), r || !i && x;
    }, w = function(a, n) {
      if (A(a))
        return a.clone();
      var t = typeof n == "object" ? n : {};
      return t.date = a, t.args = arguments, new Z(t);
    }, f = G;
    f.l = R, f.i = A, f.w = function(a, n) {
      return w(a, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
    };
    var Z = function() {
      function a(t) {
        this.$L = R(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[q] = !0;
      }
      var n = a.prototype;
      return n.parse = function(t) {
        this.$d = function(i) {
          var r = i.date, u = i.utc;
          if (r === null)
            return /* @__PURE__ */ new Date(NaN);
          if (f.u(r))
            return /* @__PURE__ */ new Date();
          if (r instanceof Date)
            return new Date(r);
          if (typeof r == "string" && !/Z$/i.test(r)) {
            var d = r.match(U);
            if (d) {
              var p = d[2] - 1 || 0, y = (d[7] || "0").substring(0, 3);
              return u ? new Date(Date.UTC(d[1], p, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, y)) : new Date(d[1], p, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, y);
            }
          }
          return new Date(r);
        }(t), this.init();
      }, n.init = function() {
        var t = this.$d;
        this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
      }, n.$utils = function() {
        return f;
      }, n.isValid = function() {
        return this.$d.toString() !== s;
      }, n.isSame = function(t, i) {
        var r = w(t);
        return this.startOf(i) <= r && r <= this.endOf(i);
      }, n.isAfter = function(t, i) {
        return w(t) < this.startOf(i);
      }, n.isBefore = function(t, i) {
        return this.endOf(i) < w(t);
      }, n.$g = function(t, i, r) {
        return f.u(t) ? this[i] : this.set(r, t);
      }, n.unix = function() {
        return Math.floor(this.valueOf() / 1e3);
      }, n.valueOf = function() {
        return this.$d.getTime();
      }, n.startOf = function(t, i) {
        var r = this, u = !!f.u(i) || i, d = f.p(t), p = function(I, b) {
          var O = f.w(r.$u ? Date.UTC(r.$y, b, I) : new Date(r.$y, b, I), r);
          return u ? O : O.endOf(S);
        }, y = function(I, b) {
          return f.w(r.toDate()[I].apply(r.toDate("s"), (u ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(b)), r);
        }, C = this.$W, v = this.$M, E = this.$D, Y = "set" + (this.$u ? "UTC" : "");
        switch (d) {
          case T:
            return u ? p(1, 0) : p(31, 11);
          case M:
            return u ? p(1, v) : p(0, v + 1);
          case _:
            var P = this.$locale().weekStart || 0, B = (C < P ? C + 7 : C) - P;
            return p(u ? E - B : E + (6 - B), v);
          case S:
          case z:
            return y(Y + "Hours", 0);
          case h:
            return y(Y + "Minutes", 1);
          case g:
            return y(Y + "Seconds", 2);
          case $:
            return y(Y + "Milliseconds", 3);
          default:
            return this.clone();
        }
      }, n.endOf = function(t) {
        return this.startOf(t, !1);
      }, n.$set = function(t, i) {
        var r, u = f.p(t), d = "set" + (this.$u ? "UTC" : ""), p = (r = {}, r[S] = d + "Date", r[z] = d + "Date", r[M] = d + "Month", r[T] = d + "FullYear", r[h] = d + "Hours", r[g] = d + "Minutes", r[$] = d + "Seconds", r[L] = d + "Milliseconds", r)[u], y = u === S ? this.$D + (i - this.$W) : i;
        if (u === M || u === T) {
          var C = this.clone().set(z, 1);
          C.$d[p](y), C.init(), this.$d = C.set(z, Math.min(this.$D, C.daysInMonth())).$d;
        } else
          p && this.$d[p](y);
        return this.init(), this;
      }, n.set = function(t, i) {
        return this.clone().$set(t, i);
      }, n.get = function(t) {
        return this[f.p(t)]();
      }, n.add = function(t, i) {
        var r, u = this;
        t = Number(t);
        var d = f.p(i), p = function(v) {
          var E = w(u);
          return f.w(E.date(E.date() + Math.round(v * t)), u);
        };
        if (d === M)
          return this.set(M, this.$M + t);
        if (d === T)
          return this.set(T, this.$y + t);
        if (d === S)
          return p(1);
        if (d === _)
          return p(7);
        var y = (r = {}, r[g] = c, r[h] = m, r[$] = o, r)[d] || 1, C = this.$d.getTime() + t * y;
        return f.w(C, this);
      }, n.subtract = function(t, i) {
        return this.add(-1 * t, i);
      }, n.format = function(t) {
        var i = this, r = this.$locale();
        if (!this.isValid())
          return r.invalidDate || s;
        var u = t || "YYYY-MM-DDTHH:mm:ssZ", d = f.z(this), p = this.$H, y = this.$m, C = this.$M, v = r.weekdays, E = r.months, Y = r.meridiem, P = function(b, O, V, J) {
          return b && (b[O] || b(i, u)) || V[O].slice(0, J);
        }, B = function(b) {
          return f.s(p % 12 || 12, b, "0");
        }, I = Y || function(b, O, V) {
          var J = b < 12 ? "AM" : "PM";
          return V ? J.toLowerCase() : J;
        };
        return u.replace(H, function(b, O) {
          return O || function(V) {
            switch (V) {
              case "YY":
                return String(i.$y).slice(-2);
              case "YYYY":
                return f.s(i.$y, 4, "0");
              case "M":
                return C + 1;
              case "MM":
                return f.s(C + 1, 2, "0");
              case "MMM":
                return P(r.monthsShort, C, E, 3);
              case "MMMM":
                return P(E, C);
              case "D":
                return i.$D;
              case "DD":
                return f.s(i.$D, 2, "0");
              case "d":
                return String(i.$W);
              case "dd":
                return P(r.weekdaysMin, i.$W, v, 2);
              case "ddd":
                return P(r.weekdaysShort, i.$W, v, 3);
              case "dddd":
                return v[i.$W];
              case "H":
                return String(p);
              case "HH":
                return f.s(p, 2, "0");
              case "h":
                return B(1);
              case "hh":
                return B(2);
              case "a":
                return I(p, y, !0);
              case "A":
                return I(p, y, !1);
              case "m":
                return String(y);
              case "mm":
                return f.s(y, 2, "0");
              case "s":
                return String(i.$s);
              case "ss":
                return f.s(i.$s, 2, "0");
              case "SSS":
                return f.s(i.$ms, 3, "0");
              case "Z":
                return d;
            }
            return null;
          }(b) || d.replace(":", "");
        });
      }, n.utcOffset = function() {
        return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
      }, n.diff = function(t, i, r) {
        var u, d = this, p = f.p(i), y = w(t), C = (y.utcOffset() - this.utcOffset()) * c, v = this - y, E = function() {
          return f.m(d, y);
        };
        switch (p) {
          case T:
            u = E() / 12;
            break;
          case M:
            u = E();
            break;
          case N:
            u = E() / 3;
            break;
          case _:
            u = (v - C) / 6048e5;
            break;
          case S:
            u = (v - C) / 864e5;
            break;
          case h:
            u = v / m;
            break;
          case g:
            u = v / c;
            break;
          case $:
            u = v / o;
            break;
          default:
            u = v;
        }
        return r ? u : f.a(u);
      }, n.daysInMonth = function() {
        return this.endOf(M).$D;
      }, n.$locale = function() {
        return k[this.$L];
      }, n.locale = function(t, i) {
        if (!t)
          return this.$L;
        var r = this.clone(), u = R(t, i, !0);
        return u && (r.$L = u), r;
      }, n.clone = function() {
        return f.w(this.$d, this);
      }, n.toDate = function() {
        return new Date(this.valueOf());
      }, n.toJSON = function() {
        return this.isValid() ? this.toISOString() : null;
      }, n.toISOString = function() {
        return this.$d.toISOString();
      }, n.toString = function() {
        return this.$d.toUTCString();
      }, a;
    }(), X = Z.prototype;
    return w.prototype = X, [["$ms", L], ["$s", $], ["$m", g], ["$H", h], ["$W", S], ["$M", M], ["$y", T], ["$D", z]].forEach(function(a) {
      X[a[1]] = function(n) {
        return this.$g(n, a[0], a[1]);
      };
    }), w.extend = function(a, n) {
      return a.$i || (a(n, Z, w), a.$i = !0), w;
    }, w.locale = R, w.isDayjs = A, w.unix = function(a) {
      return w(1e3 * a);
    }, w.en = k[x], w.Ls = k, w.p = {}, w;
  });
})(ie);
const ae = ie.exports;
var oe = { exports: {} };
(function(e, l) {
  (function(o, c) {
    e.exports = c();
  })(ne, function() {
    var o = "minute", c = /[+-]\d\d(?::?\d\d)?/g, m = /([+-]|\d\d)/g;
    return function(L, $, g) {
      var h = $.prototype;
      g.utc = function(s) {
        var U = { date: s, utc: !0, args: arguments };
        return new $(U);
      }, h.utc = function(s) {
        var U = g(this.toDate(), { locale: this.$L, utc: !0 });
        return s ? U.add(this.utcOffset(), o) : U;
      }, h.local = function() {
        return g(this.toDate(), { locale: this.$L, utc: !1 });
      };
      var S = h.parse;
      h.parse = function(s) {
        s.utc && (this.$u = !0), this.$utils().u(s.$offset) || (this.$offset = s.$offset), S.call(this, s);
      };
      var _ = h.init;
      h.init = function() {
        if (this.$u) {
          var s = this.$d;
          this.$y = s.getUTCFullYear(), this.$M = s.getUTCMonth(), this.$D = s.getUTCDate(), this.$W = s.getUTCDay(), this.$H = s.getUTCHours(), this.$m = s.getUTCMinutes(), this.$s = s.getUTCSeconds(), this.$ms = s.getUTCMilliseconds();
        } else
          _.call(this);
      };
      var M = h.utcOffset;
      h.utcOffset = function(s, U) {
        var H = this.$utils().u;
        if (H(s))
          return this.$u ? 0 : H(this.$offset) ? M.call(this) : this.$offset;
        if (typeof s == "string" && (s = function(x) {
          x === void 0 && (x = "");
          var k = x.match(c);
          if (!k)
            return null;
          var q = ("" + k[0]).match(m) || ["-", 0, 0], A = q[0], R = 60 * +q[1] + +q[2];
          return R === 0 ? 0 : A === "+" ? R : -R;
        }(s), s === null))
          return this;
        var F = Math.abs(s) <= 16 ? 60 * s : s, W = this;
        if (U)
          return W.$offset = F, W.$u = s === 0, W;
        if (s !== 0) {
          var G = this.$u ? this.toDate().getTimezoneOffset() : -1 * this.utcOffset();
          (W = this.local().add(F + G, o)).$offset = F, W.$x.$localOffset = G;
        } else
          W = this.utc();
        return W;
      };
      var N = h.format;
      h.format = function(s) {
        var U = s || (this.$u ? "YYYY-MM-DDTHH:mm:ss[Z]" : "");
        return N.call(this, U);
      }, h.valueOf = function() {
        var s = this.$utils().u(this.$offset) ? 0 : this.$offset + (this.$x.$localOffset || this.$d.getTimezoneOffset());
        return this.$d.valueOf() - 6e4 * s;
      }, h.isUTC = function() {
        return !!this.$u;
      }, h.toISOString = function() {
        return this.toDate().toISOString();
      }, h.toString = function() {
        return this.toDate().toUTCString();
      };
      var T = h.toDate;
      h.toDate = function(s) {
        return s === "s" && this.$offset ? g(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate() : T.call(this);
      };
      var z = h.diff;
      h.diff = function(s, U, H) {
        if (s && this.$u === s.$u)
          return z.call(this, s, U, H);
        var F = this.local(), W = g(s).local();
        return z.call(F, W, U, H);
      };
    };
  });
})(oe);
const we = oe.exports, Ce = `:host {
  font: inherit;
  display: block;
  height: 100%;
  container-type: inline-size;
}

.DepositWithdrawalContainer {
  container-type: inline-size;
  container-name: deposit-container;
}

.CategoryTitle {
  font-size: var(--emw--font-size-x-large, 26px);
  color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
}

.MenuReturnButton {
  font: inherit;
  color: var(--emw--color-gray-300, #58586B);
  display: inline-flex;
  align-items: center;
  column-gap: 10px;
  margin-bottom: 10px;
}
.MenuReturnButton svg {
  fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
}
.MenuReturnButton h2.CategoryTitleMobile {
  font-size: 16px;
  color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));
}

.ErrorMessage {
  color: var(--emw--pam-color-typography, var(--emw--color-typography, #FFFFFF));
}

.DepositWithdrawalWrapper {
  width: 100%;
  margin: 0;
  padding: 50px;
  box-sizing: border-box;
  overflow-y: scroll;
}
.DepositWithdrawalWrapper iframe {
  border-width: 0;
}

.ShortCashier.DepositWithdrawalWrapper {
  height: 500px;
}
.ShortCashier.CategoryTitle.CategoryTitle {
  margin-right: 20px;
  padding-top: 20px;
  color: var(--emw--color-black, #000000);
}
.ShortCashier .ErrorMessage {
  margin: auto;
  width: 90%;
  margin-top: 70px;
  text-align: center;
  color: var(--emw--color-black, #000000);
}

@container (max-width: 768px) {
  .DepositWithdrawalWrapper {
    padding: 20px 15px;
  }
  .DepositWithdrawalWrapper:not(.ShortCashier) {
    overflow: visible;
  }
}`, ve = Ce;
ae.extend(we);
const $e = "user-deposit-withdrawal", te = [
  "mm-hcback-to-merchant",
  "mm-hc-back-tomerchant",
  "mm-hc-sports",
  "mm-hc-casino",
  "mm-hc-contact",
  "mm-wm-hc-init-deposit",
  "mm-wm-hc-init-deposit-quick"
], Se = () => {
}, be = class {
  constructor(e) {
    de(this, e), this.bindedHandler = this.handleMessage.bind(this), this.userAgent = window.navigator.userAgent, this.isMobile = ge(this.userAgent), this.errorCodes = ["21123", "21122", "21121"], this.toggleScreen = () => {
      window.postMessage({ type: "PlayerAccountMenuActive", isMobile: this.isMobile }, window.location.href);
    }, this.mbSource = void 0, this.clientStyling = "", this.clientStylingUrl = "", this.translationUrl = "", this.endpoint = void 0, this.type = void 0, this.channel = void 0, this.language = void 0, this.productType = "", this.userId = void 0, this.session = void 0, this.successUrl = void 0, this.cancelUrl = void 0, this.failUrl = void 0, this.sportsUrl = void 0, this.casinoUrl = void 0, this.contactUrl = void 0, this.depositUrl = void 0, this.currency = "", this.showBonusSelectionInput = "true", this.isShortCashier = !1, this.homeUrl = void 0, this.beforeRedirect = Se, this.forwardCashierRedirects = !1, this.dynamicHeight = void 0, this.cashierInfoUrl = void 0;
  }
  get typeParameter() {
    if (this.type === "deposit")
      return "Deposit";
    if (this.type === "withdraw")
      return "Withdraw";
  }
  handleClientStylingChange(e, l) {
    e != l && K(this.stylingContainer, this.clientStyling);
  }
  handleClientStylingChangeURL(e, l) {
    e != l && this.clientStylingUrl && ee(this.stylingContainer, this.clientStylingUrl);
  }
  componentWillLoad() {
    return Q(this, null, function* () {
      if (yield this.loadWidget(), this.translationUrl)
        return me(this.translationUrl);
    });
  }
  componentDidLoad() {
    this.stylingContainer && (window.emMessageBus != null ? ye(this.stylingContainer, `${this.mbSource}.Style`) : (this.clientStyling && K(this.stylingContainer, this.clientStyling), this.clientStylingUrl && ee(this.stylingContainer, this.clientStylingUrl))), window.addEventListener("message", this.bindedHandler, !1);
  }
  disconnectedCallback() {
    window.removeEventListener("message", this.bindedHandler, !1), this.stylingSubscription && this.stylingSubscription.unsubscribe();
  }
  render() {
    return D(le, { key: "46153b61097691f3a3b2da29aa260edf0688f01c" }, D("div", { key: "0082deaaf9c6348cff4010ec8b1f58e5ea26e99b", ref: (e) => this.stylingContainer = e, class: "" }, D("div", { key: "8aec364ea2134d01c2b29fc75136cad08fd5d965", class: `DepositWithdrawalWrapper ${this.isShortCashier ? "ShortCashier" : ""}` }, !(this.isMobile && !this.isShortCashier) && D("h2", { key: "4b0184e2354199332c8438b4430c047982364dff", class: "CategoryTitle" }, j(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language)), D("div", { key: "49c9dbda82eb6576bc11375371f4359ba0b0285d", style: { marginTop: this.isShortCashier ? "30px" : "0" } }, this.isMobile && !this.isShortCashier ? D("div", { class: "MenuReturnButton", onClick: this.toggleScreen }, D("svg", { xmlns: "http://www.w3.org/2000/svg", width: "15", height: "15", viewBox: "0 0 15 15" }, D("defs", null), D("g", { transform: "translate(-20 -158)" }, D("g", { transform: "translate(20 158)" }, D("path", { class: "aaa", d: "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z", transform: "translate(15 15) rotate(180)" })))), D("h2", { class: "CategoryTitleMobile" }, j(this.typeParameter === "Withdraw" ? "Withdraw" : "Deposit", this.language))) : null), this.cashierInfoUrl ? D("iframe", { width: "100%", allow: "payment", height: this.dynamicHeight, src: this.cashierInfoUrl }) : D("h3", { innerHTML: this.type === "deposit" ? j("denyDeposit", this.language) : j("denyWithdrawal", this.language), class: "ErrorMessage" }))));
  }
  loadWidget() {
    return Q(this, null, function* () {
      const e = {
        Channel: this.channel,
        Type: this.typeParameter,
        SuccessUrl: this.successUrl,
        CancelUrl: this.cancelUrl,
        FailUrl: this.failUrl,
        Language: this.language,
        productType: this.productType,
        isShortCashier: this.isShortCashier,
        currency: this.currency,
        showBonusSelectionInput: this.showBonusSelectionInput
      };
      if (!(Object.values(e).some((l) => l === void 0) || !this.endpoint))
        try {
          const l = `${this.endpoint}/v1/player/${this.userId}/payment/GetPaymentSession`, o = yield fetch(l, {
            method: "POST",
            headers: {
              "X-Sessionid": this.session,
              "Content-Type": "application/json",
              "X-Client-Request-Timestamp": ae.utc().format("YYYY-MM-DD HH:mm:ss.SSS")
            },
            body: JSON.stringify(e)
          });
          if (!o.ok) {
            const m = yield o.text();
            throw new Error(m);
          }
          const c = yield o.json();
          if (c.CashierInfo)
            this.cashierInfoUrl = c.CashierInfo.Url;
          else {
            let m;
            if (c.ResponseMessage) {
              let $ = this.errorCodes.find((g) => c.ResponseMessage.includes(g)) || null;
              $ ? m = j(`errorCode${$}`, this.language) : m = j("notFoundErrorCode", this.language);
            } else
              m = this.type === "deposit" ? j("denyDeposit", this.language) : j("denyWithdrawal", this.language);
            const L = { type: "error", message: m };
            window.postMessage({ type: "DenyDepositOrWithdrawal", data: L }, window.location.href);
          }
        } catch (l) {
          console.error(l);
        }
    });
  }
  handleMessage(e) {
    const l = this.extractPayload(e);
    if (!l)
      return;
    this.applyLayoutHints(l);
    const o = this.extractCashierRedirectReason(l);
    if (!o || this.emitForwardedRedirect(e, o))
      return;
    const c = this.resolveRedirectPlan(o);
    c && this.doRedirect(c.reason, c.targetUrl);
  }
  extractCashierRedirectReason(e) {
    if (typeof (e == null ? void 0 : e.type) == "string" && te.includes(e.type))
      return e.type;
    if (typeof (e == null ? void 0 : e.redirect) == "string" && te.includes(e.redirect))
      return e.redirect;
  }
  extractPayload(e) {
    if (!(!(e != null && e.data) || typeof e.data != "object"))
      return e.data;
  }
  applyLayoutHints(e) {
    e["MMFE:openFullCashier"] === "true" && (window.postMessage({ type: "GoToDeposit" }, window.location.href), window.postMessage({ type: "CloseShortCashier" }, window.location.href)), e["MMFE:setQuickDepositHeight"] && this.isShortCashier && (this.dynamicHeight = e["MMFE:setQuickDepositHeight"].toString() + "px"), e["MMFE:setIFrameHeight"] && (this.dynamicHeight = e["MMFE:setIFrameHeight"].toString() + "px");
  }
  resolveRedirectPlan(e) {
    switch (e) {
      case "mm-hcback-to-merchant":
      case "mm-hc-back-tomerchant":
        return this.buildRedirectPlan(e, this.homeUrl);
      case "mm-hc-sports":
        return this.buildRedirectPlan(e, this.sportsUrl);
      case "mm-hc-casino":
        return this.buildRedirectPlan(window.location.href, this.casinoUrl);
      case "mm-hc-contact":
        return window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.buildRedirectPlan(window.location.href, this.contactUrl);
      case "mm-wm-hc-init-deposit":
      case "mm-wm-hc-init-deposit-quick":
        return window.postMessage({ type: "CloseShortCashier" }, window.location.href), this.buildRedirectPlan(window.location.href, this.depositUrl);
      default:
        return;
    }
  }
  buildRedirectPlan(e, l) {
    if (l)
      return { reason: e, targetUrl: l };
  }
  emitForwardedRedirect(e, l) {
    if (!this.forwardCashierRedirects)
      return !1;
    const o = {
      type: `${$e}:${l}`,
      originalType: l,
      payload: e.data,
      origin: e.origin
    };
    return window.postMessage(o, window.location.href), !0;
  }
  doRedirect(e, l) {
    const o = { reason: e, url: l, cancel: !1 };
    if (this.beforeRedirect(o), !o.cancel) {
      if (!o.url) {
        window.location.href = "/";
        return;
      }
      window.location.href = o.url;
    }
  }
  static get watchers() {
    return {
      clientStyling: ["handleClientStylingChange"],
      clientStylingUrl: ["handleClientStylingChangeURL"]
    };
  }
};
be.style = ve;
export {
  be as user_deposit_withdrawal
};
