import { S as Ee, b as xe, f as S, c as Te, a as Ae, d as Pe, h as _, x as De, k as N, n as ie, v as z, w as Ne, Q as ze, G as Fe, g as y, E as M, K as le, j as w, l as d, M as He, y as x, D as oe, I as Q, A as ee, z as T, r as We, C as je } from "./CashierConfirmModal-B0WZGuf5.js";
import { a as Oe, i as Ue, $ as Re, b as Be } from "./CashierError-Dyf5BWS1.js";
import { d as re, u as Ie } from "./CashierMethodDetails-C6upoqd2.js";
function ae(t, e) {
  Oe(t, e);
}
function Ge(t) {
  Ue({
    fallbackLocale: "en"
  }), Re.set(t);
}
const me = {
  en: {
    generalMin: "Min",
    generalMax: "Max",
    showAll: "SHOW ALL",
    showLess: "SHOW LESS",
    error: "Error",
    noPaymentMethods: "No payment methods available"
  },
  uk: {
    generalMin: "Мін",
    generalMax: "Макс"
  },
  hr: {
    generalMin: "Minimalno",
    generalMax: "Maksimalno",
    showAll: "Prikaži sve",
    showLess: "Prikaži manje"
  },
  tr: {
    generalMin: "Min",
    generalMax: "Maks",
    showAll: "HEPSİNİ GÖSTER",
    showLess: "DAHA AZ GÖSTER",
    error: "Hata",
    noPaymentMethods: "Hiçbir ödeme yöntemi mevcut değil"
  },
  "en-us": {
    generalMin: "Min",
    generalMax: "Max",
    showAll: "SHOW ALL",
    showLess: "SHOW LESS"
  }
};
function Ve(t) {
  Pe(t, "svelte-1wlv0rl", "*,*::before,*::after{margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.CashierMethodList{display:flex;flex-direction:column;background:var(--emw--color-background, #fff);box-shadow:0 0 4px var(--mmw--color-black-transparency-10, rgba(0, 0, 0, 0.1));width:100%;border-radius:var(--mmw--border-radius-medium-plus, 6px);container-name:method-list;container-type:inline-size}.SelectorWrapper{display:flex;flex-direction:row;align-items:center;justify-content:left;cursor:pointer;position:relative;height:var(--mmw-method-height, 80px);box-sizing:border-box;border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:0 var(--emw--spacing-small, 12px)}.SelectorWrapper:first-child{border-radius:var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px) 0 0}.SelectorWrapper:last-child{border-radius:0 0 var(--mmw--border-radius-medium-plus, 6px) var(--mmw--border-radius-medium-plus, 6px)}.SelectorWrapper.checked{background:var(--emw--color-background-secondary, #F9F8F8)}.SelectorWrapper:not(.checked):hover{background:linear-gradient(0, var(--emw--color-background-secondary, #F9F8F8) 0%, var(--emw--color-background, #fff) 100%)}.MethodLogo{display:flex;justify-content:center;align-items:center;margin-right:var(--mmw--spacing-small, 14px);width:var(--mmw-logo-width, 110px);min-height:var(--mmw-logo-height, 64px);background:var(--emw--color-background, #FFF);border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--mmw--border-radius-medium-plus, 6px);overflow:hidden;max-height:calc(100% - var(--emw--spacing-small, 12px) - var(--emw--spacing-small, 12px))}.MethodLogo img{width:100%;height:100%}.MethodTitle{color:var(--mmw--color-grey-10, #111);font-size:var(--emw--font-size-medium, 16px);word-break:break-all}.MethodLimits{display:flex;flex-direction:column;align-items:flex-end;margin-left:auto}.Limits{max-width:100%;white-space:nowrap;font-size:var(--emw--font-size-small, 14px);line-height:var(--emw--line-height-xl, 24px);color:var(--mmw--color-grey-290, #666);font-weight:var(--emw--font-weight-normal, 400);font-style:normal}.EmptyContentMessageWrapper{display:flex;flex-direction:column;box-sizing:border-box;background:var(--emw--color-gray-50, #F7F8FA);border-bottom:1px solid var(--mmw--color-grey-105, #E8E9EB);padding:var(--emw--spacing-small, 12px);max-height:500px}.EmptyContentMessageHeader{display:flex;gap:4px;align-items:end}.EmptyContentMessageTitle{font-size:var(--emw--font-size-small, 16px);font-weight:var(--emw--font-weight-semibold, 500);color:var(--emw--color-warning, rgb(250, 146, 0))}.EmptyContentMessageText{word-break:break-word;padding:var(--emw--spacing-small, 12px) calc(var(--emw--spacing-small, 12px) / 2);font-size:var(--emw--font-size-small, 14px)}.EmptyContentMessageDesktop p{font-size:var(--emw--font-size-medium, 16px)}.IconWarning{width:30px;display:flex}.IconWarning svg{height:18px;fill:var(--emw--color-warning, rgb(250, 146, 0))}.ShowAllButton{cursor:pointer;color:var(--mmw--color-grey-290, #666);text-align:center;font-size:var(--emw--font-size-x-small, 12px);font-style:normal;font-weight:var(--emw--font-weight-semibold, 500);font-family:inherit;background:var(--emw--color-gray-50, #F7F8FA);line-height:normal;border:1px solid var(--mmw--color-grey-105, #E8E9EB);border-radius:var(--emw--border-radius-medium, 4px);margin:var(--emw--spacing-small, 12px) auto;height:36px;display:flex;align-items:center;justify-content:center;width:80%}.ShowAllButton:hover{background:var(--emw--color-background, #fff)}@container method-list (width < 450px){.MethodLogo{min-width:var(--mmw-logo-small-width, 90px);min-height:var(--mmw-logo--small-height, 50px);overflow:hidden}.CashierMethodList .MethodTitle{display:inline-block;flex-grow:1;font-size:var(--emw--font-size-medium, 16px);line-height:120%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.CashierMethodList .MethodLimits .Limits{flex-shrink:0;font-size:var(--emw--font-size-x-small, 12px)}}@container method-list (max-width: 300px){.Limits{display:none}}");
}
function ce(t, e, s) {
  const r = t.slice();
  return r[48] = e[s], r[50] = s, r;
}
function de(t) {
  let e;
  return {
    c() {
      e = y("cashier-spinner"), M(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), M(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      );
    },
    m(s, r) {
      N(s, e, r);
    },
    p(s, r) {
      r[0] & /*clientstylingurl*/
      16 && M(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        s[4]
      ), r[0] & /*clientstyling*/
      8 && M(
        e,
        "clientstyling",
        /*clientstyling*/
        s[3]
      );
    },
    d(s) {
      s && z(e);
    }
  };
}
function ue(t) {
  let e, s, r, a, l = le(
    /*paymentMethodsToShow*/
    t[8]
  ), o = [];
  for (let c = 0; c < l.length; c += 1)
    o[c] = he(ce(t, l, c));
  let i = (
    /*noPaymentMethodsAvailable*/
    t[13] && !/*showSpinner*/
    t[12] && ge(t)
  ), m = (
    /*methodsButtonToggleText*/
    t[7] && fe(t)
  );
  return {
    c() {
      e = y("div"), s = y("div");
      for (let c = 0; c < o.length; c += 1)
        o[c].c();
      r = _(), i && i.c(), a = _(), m && m.c(), w(s, "class", "CashierMethodList"), w(e, "class", "CashierMethodListWidget");
    },
    m(c, f) {
      N(c, e, f), d(e, s);
      for (let u = 0; u < o.length; u += 1)
        o[u] && o[u].m(s, null);
      d(s, r), i && i.m(s, null), d(e, a), m && m.m(e, null), t[27](e);
    },
    p(c, f) {
      if (f[0] & /*selectedPaymentMethod, paymentMethodsToShow, selectPayMeth, formatter, $_*/
      115008) {
        l = le(
          /*paymentMethodsToShow*/
          c[8]
        );
        let u;
        for (u = 0; u < l.length; u += 1) {
          const g = ce(c, l, u);
          o[u] ? o[u].p(g, f) : (o[u] = he(g), o[u].c(), o[u].m(s, r));
        }
        for (; u < o.length; u += 1)
          o[u].d(1);
        o.length = l.length;
      }
      /*noPaymentMethodsAvailable*/
      c[13] && !/*showSpinner*/
      c[12] ? i ? i.p(c, f) : (i = ge(c), i.c(), i.m(s, null)) : i && (i.d(1), i = null), /*methodsButtonToggleText*/
      c[7] ? m ? m.p(c, f) : (m = fe(c), m.c(), m.m(e, null)) : m && (m.d(1), m = null);
    },
    d(c) {
      c && z(e), He(o, c), i && i.d(), m && m.d(), t[27](null);
    }
  };
}
function he(t) {
  let e, s, r, a, l, o, i, m, c = (
    /*payMeth*/
    (t[48].Label || /*payMeth*/
    t[48].Name) + ""
  ), f, u, g, p, P = (
    /*$_*/
    t[14]("generalMin") + ""
  ), F, k, C = (
    /*formatter*/
    t[15].format(
      /*payMeth*/
      t[48].DisplayCurrency.MinAmountLimit
    ) + ""
  ), D, H, L = (
    /*payMeth*/
    t[48].DisplayCurrency.Name + ""
  ), W, Y, E, j = (
    /*$_*/
    t[14]("generalMax") + ""
  ), O, I, U = (
    /*formatter*/
    t[15].format(
      /*payMeth*/
      t[48].DisplayCurrency.MaxAmountLimit
    ) + ""
  ), R, J, G = (
    /*payMeth*/
    t[48].DisplayCurrency.Name + ""
  ), V, q, X;
  function K() {
    return (
      /*click_handler*/
      t[25](
        /*payMeth*/
        t[48]
      )
    );
  }
  return {
    c() {
      e = y("div"), s = y("div"), r = y("img"), o = _(), i = y("div"), m = y("span"), f = x(c), u = _(), g = y("div"), p = y("span"), F = x(P), k = _(), D = x(C), H = _(), W = x(L), Y = _(), E = y("span"), O = x(j), I = _(), R = x(U), J = _(), V = x(G), oe(r.src, a = /*payMeth*/
      t[48].LogoUrl) || w(r, "src", a), w(r, "alt", l = /*payMeth*/
      t[48].Label), w(s, "class", "MethodLogo"), w(i, "class", "MethodTitle"), w(p, "class", "Limits"), w(E, "class", "Limits"), w(g, "class", "MethodLimits"), w(e, "class", "SelectorWrapper"), Q(
        e,
        "checked",
        /*selectedPaymentMethod*/
        t[6] === /*payMeth*/
        t[48].Name
      );
    },
    m(B, v) {
      N(B, e, v), d(e, s), d(s, r), d(e, o), d(e, i), d(i, m), d(m, f), d(e, u), d(e, g), d(g, p), d(p, F), d(p, k), d(p, D), d(p, H), d(p, W), d(g, Y), d(g, E), d(E, O), d(E, I), d(E, R), d(E, J), d(E, V), q || (X = [
        ee(e, "click", K),
        ee(e, "keyup", Ye)
      ], q = !0);
    },
    p(B, v) {
      t = B, v[0] & /*paymentMethodsToShow*/
      256 && !oe(r.src, a = /*payMeth*/
      t[48].LogoUrl) && w(r, "src", a), v[0] & /*paymentMethodsToShow*/
      256 && l !== (l = /*payMeth*/
      t[48].Label) && w(r, "alt", l), v[0] & /*paymentMethodsToShow*/
      256 && c !== (c = /*payMeth*/
      (t[48].Label || /*payMeth*/
      t[48].Name) + "") && T(f, c), v[0] & /*$_*/
      16384 && P !== (P = /*$_*/
      t[14]("generalMin") + "") && T(F, P), v[0] & /*paymentMethodsToShow*/
      256 && C !== (C = /*formatter*/
      t[15].format(
        /*payMeth*/
        t[48].DisplayCurrency.MinAmountLimit
      ) + "") && T(D, C), v[0] & /*paymentMethodsToShow*/
      256 && L !== (L = /*payMeth*/
      t[48].DisplayCurrency.Name + "") && T(W, L), v[0] & /*$_*/
      16384 && j !== (j = /*$_*/
      t[14]("generalMax") + "") && T(O, j), v[0] & /*paymentMethodsToShow*/
      256 && U !== (U = /*formatter*/
      t[15].format(
        /*payMeth*/
        t[48].DisplayCurrency.MaxAmountLimit
      ) + "") && T(R, U), v[0] & /*paymentMethodsToShow*/
      256 && G !== (G = /*payMeth*/
      t[48].DisplayCurrency.Name + "") && T(V, G), v[0] & /*selectedPaymentMethod, paymentMethodsToShow*/
      320 && Q(
        e,
        "checked",
        /*selectedPaymentMethod*/
        t[6] === /*payMeth*/
        t[48].Name
      );
    },
    d(B) {
      B && z(e), q = !1, We(X);
    }
  };
}
function ge(t) {
  let e, s, r, a, l, o = (
    /*$_*/
    t[14]("error") + ""
  ), i, m, c, f = (
    /*$_*/
    t[14]("noPaymentMethods") + ""
  ), u;
  return {
    c() {
      e = y("div"), s = y("div"), r = y("div"), r.innerHTML = '<svg fill="currentColor" height="200px" width="200px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 294.995 294.995" xml:space="preserve" stroke="#fa9200"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path d="M291.874,248.279L165.605,26.526c-4.007-7.037-10.776-11.26-18.107-11.26s-14.101,4.202-18.107,11.239L3.121,248.238 c-3.979,6.989-4.164,15.013-0.493,21.326c3.67,6.313,10.663,10.165,18.705,10.165h252.329c8.042,0,15.035-3.852,18.705-10.165 C296.038,263.251,295.854,255.268,291.874,248.279z M146.665,86.229c9.665,0,17.5,7.835,17.5,17.5v63c0,9.665-7.835,17.5-17.5,17.5 c-9.665,0-17.5-7.835-17.5-17.5v-63C129.165,94.064,137,86.229,146.665,86.229z M147.498,204.005c9.665,0,17.5,7.835,17.5,17.5 c0,9.665-7.835,17.5-17.5,17.5c-9.665,0-17.5-7.835-17.5-17.5C129.998,211.84,137.833,204.005,147.498,204.005z"></path></g></g></svg>', a = _(), l = y("p"), i = x(o), m = _(), c = y("p"), u = x(f), w(r, "class", "IconWarning"), w(l, "class", "EmptyContentMessageTitle"), w(s, "class", "EmptyContentMessageHeader"), w(c, "class", "EmptyContentMessageText"), w(e, "class", "EmptyContentMessageWrapper"), Q(
        e,
        "EmptyContentMessageDesktop",
        /*desktopView*/
        t[11]
      );
    },
    m(g, p) {
      N(g, e, p), d(e, s), d(s, r), d(s, a), d(s, l), d(l, i), d(e, m), d(e, c), d(c, u);
    },
    p(g, p) {
      p[0] & /*$_*/
      16384 && o !== (o = /*$_*/
      g[14]("error") + "") && T(i, o), p[0] & /*$_*/
      16384 && f !== (f = /*$_*/
      g[14]("noPaymentMethods") + "") && T(u, f), p[0] & /*desktopView*/
      2048 && Q(
        e,
        "EmptyContentMessageDesktop",
        /*desktopView*/
        g[11]
      );
    },
    d(g) {
      g && z(e);
    }
  };
}
function fe(t) {
  let e, s, r, a;
  return {
    c() {
      e = y("div"), s = x(
        /*methodsButtonToggleText*/
        t[7]
      ), w(e, "class", "ShowAllButton");
    },
    m(l, o) {
      N(l, e, o), d(e, s), r || (a = ee(
        e,
        "click",
        /*click_handler_1*/
        t[26]
      ), r = !0);
    },
    p(l, o) {
      o[0] & /*methodsButtonToggleText*/
      128 && T(
        s,
        /*methodsButtonToggleText*/
        l[7]
      );
    },
    d(l) {
      l && z(e), r = !1, a();
    }
  };
}
function pe(t) {
  let e, s, r;
  return {
    c() {
      e = y("cashier-error"), s = y("span"), r = x(
        /*errorMessage*/
        t[10]
      ), w(s, "slot", "text"), M(
        e,
        "lang",
        /*lang*/
        t[0]
      ), M(
        e,
        "assetsurl",
        /*assetsurl*/
        t[1]
      ), M(
        e,
        "translationurl",
        /*translationurl*/
        t[2]
      ), M(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        t[4]
      ), M(
        e,
        "clientstyling",
        /*clientstyling*/
        t[3]
      ), M(e, "hidebuttons", "true");
    },
    m(a, l) {
      N(a, e, l), d(e, s), d(s, r);
    },
    p(a, l) {
      l[0] & /*errorMessage*/
      1024 && T(
        r,
        /*errorMessage*/
        a[10]
      ), l[0] & /*lang*/
      1 && M(
        e,
        "lang",
        /*lang*/
        a[0]
      ), l[0] & /*assetsurl*/
      2 && M(
        e,
        "assetsurl",
        /*assetsurl*/
        a[1]
      ), l[0] & /*translationurl*/
      4 && M(
        e,
        "translationurl",
        /*translationurl*/
        a[2]
      ), l[0] & /*clientstylingurl*/
      16 && M(
        e,
        "clientstylingurl",
        /*clientstylingurl*/
        a[4]
      ), l[0] & /*clientstyling*/
      8 && M(
        e,
        "clientstyling",
        /*clientstyling*/
        a[3]
      );
    },
    d(a) {
      a && z(e);
    }
  };
}
function qe(t) {
  let e, s, r, a = (
    /*showSpinner*/
    t[12] && de(t)
  ), l = (
    /*showMethodsList*/
    (t[9] || /*desktopView*/
    t[11]) && ue(t)
  ), o = (
    /*errorMessage*/
    t[10] && pe(t)
  );
  return {
    c() {
      a && a.c(), e = _(), l && l.c(), s = _(), o && o.c(), r = De();
    },
    m(i, m) {
      a && a.m(i, m), N(i, e, m), l && l.m(i, m), N(i, s, m), o && o.m(i, m), N(i, r, m);
    },
    p(i, m) {
      /*showSpinner*/
      i[12] ? a ? a.p(i, m) : (a = de(i), a.c(), a.m(e.parentNode, e)) : a && (a.d(1), a = null), /*showMethodsList*/
      i[9] || /*desktopView*/
      i[11] ? l ? l.p(i, m) : (l = ue(i), l.c(), l.m(s.parentNode, s)) : l && (l.d(1), l = null), /*errorMessage*/
      i[10] ? o ? o.p(i, m) : (o = pe(i), o.c(), o.m(r.parentNode, r)) : o && (o.d(1), o = null);
    },
    i: ie,
    o: ie,
    d(i) {
      i && (z(e), z(s), z(r)), a && a.d(i), l && l.d(i), o && o.d(i);
    }
  };
}
const Ye = () => {
};
function Je(t, e, s) {
  let r;
  Ne(t, Be, (n) => s(14, r = n)), re.extend(Ie);
  let { lang: a = "en" } = e, { local: l = "en-US" } = e, { endpoint: o } = e, { session: i } = e, { customerid: m } = e, { assetsurl: c } = e, { currency: f } = e, { numberofmethodsshown: u } = e, { translationurl: g = "" } = e, { clientstyling: p = "" } = e, { clientstylingurl: P = "" } = e, { ismobileview: F } = e, k = [], C, D, H = "", L = [], W = !0, Y = new Intl.NumberFormat(l, { minimumFractionDigits: 2 }), E = "", j, O = !0, I = !1, U = !1;
  var R;
  (function(n) {
    n.PlayerSessionIsNotValid = "PlayerSessionIsNotValid", n.Success = "Success", n.JwtTokenError = "JwtTokenError";
  })(R || (R = {})), ze();
  const J = () => {
    let n = g;
    if (n)
      return fetch(n).then((h) => h.json()).then((h) => {
        Object.keys(h).forEach((A) => {
          ae(A, h[A]);
        });
      }).catch((h) => {
        console.log(h);
      });
  };
  Object.keys(me).forEach((n) => {
    ae(n, me[n]);
  });
  const G = () => {
    Ge(a);
  }, V = () => {
    s(12, I = !0);
    const n = new URL(`${o}/v1/player/${m}/payment/GetPaymentMetadata`), h = new Headers();
    h.append("accept", "application/json"), h.append("Content-Type", "application/json"), h.append("X-Client-Request-Timestamp", re.utc().format("YYYY-MM-DD HH:mm:ss.SSS"));
    const A = {
      method: "POST",
      headers: h,
      body: JSON.stringify({
        XPaymentSessionToken: i,
        Currency: f,
        Tags: { UserAgent: window.navigator.userAgent }
      })
    };
    fetch(n, A).then((b) => b.json()).then((b) => {
      if (b.error) {
        s(10, E = b.error);
        return;
      }
      if (b.ResponseCode !== R.Success) {
        j = b.ResponseCode, B();
        return;
      }
      k = b.PaymentMethods?.Ordering ? q(b) : X(b), s(7, H = u && +u > 0 && k.length > +u ? r("showAll") : ""), s(8, L = H ? k.slice(0, +u) : k), window.postMessage(
        {
          type: "StartSessionCountdown",
          paymentMethodName: k[0].Name,
          xPaymentSessionToken: b.XPaymentSessionToken
        },
        window.location.href
      ), window.postMessage({ type: "DataLoading", isDataLoaded: !1 });
    }).finally(() => {
      s(12, I = !1), window.postMessage({ type: "DataLoading", isDataLoaded: !0 }), s(13, U = !L.length);
    });
  }, q = (n) => {
    const h = [];
    return n.PaymentMethods.Ordering.DefaultPaymentMethodsOrder.forEach((A) => {
      const b = n.PaymentMethods.PaymentMethods.find((Z) => Z.Name === A);
      if (b) {
        const Z = b?.Logos.find(($) => $.LogoType === "Desktop") || {}, Se = b?.Logos.find(($) => $.LogoType === "Mobile") || {}, ne = O ? Z : Se;
        h.push({
          ...b,
          LogoUrl: ne.LogoUrl ? `https:${ne.LogoUrl}` : ""
        });
      }
    }), h;
  }, X = (n) => n.PaymentMethods.PaymentMethods.map((h) => ({
    ...h,
    LogoUrl: h.Logos && h.Logos.length && h.Logos[0].LogoUrl ? `https:${h.Logos[0].LogoUrl}` : ""
  })), K = (n) => {
    s(6, D = n.Name), window.postMessage({ type: "SelectPayMeth", details: n }, window.location.href), dispatchEvent(new CustomEvent(
      "selectPayMeth",
      {
        detail: n,
        bubbles: !0,
        cancelable: !0,
        composed: !0
      }
    ));
  }, B = () => {
    window.postMessage(
      {
        type: "ErrorResponseCode",
        errorResponseCode: j
      },
      window.location.href
    );
  }, v = () => {
    s(11, O = F === "false");
  }, te = () => {
    L == k ? ye() : we();
  }, we = () => {
    s(8, L = k), s(7, H = r("showLess"));
  }, ye = () => {
    s(8, L = k.slice(0, +u)), D && !L.find((n) => n.Name === D) && L.splice(0, 0, k.find((n) => n.Name === D)), s(7, H = r("showAll"));
  }, be = () => {
    s(9, W = !0);
  }, Me = (n) => {
    s(9, W = !n.hideMethodsList);
  }, ve = () => {
    let n = document.createElement("style");
    n.innerHTML = p, C.appendChild(n);
  }, Le = () => {
    let n = new URL(P), h = document.createElement("style");
    fetch(n.href).then((A) => A.text()).then((A) => {
      h.innerHTML = A, setTimeout(
        () => {
          C.appendChild(h);
        },
        1
      ), setTimeout(
        () => {
        },
        500
      );
    });
  };
  Fe(() => (window.addEventListener("message", se, !1), () => {
    window.removeEventListener("message", se, !1);
  }));
  const se = (n) => {
    switch (n.data.type) {
      case "BackToMethodList":
        be();
        break;
      case "HideMethodsList":
        Me(n.data.details);
        break;
    }
  }, _e = (n) => K(n), ke = () => te();
  function Ce(n) {
    je[n ? "unshift" : "push"](() => {
      C = n, s(5, C);
    });
  }
  return t.$$set = (n) => {
    "lang" in n && s(0, a = n.lang), "local" in n && s(18, l = n.local), "endpoint" in n && s(19, o = n.endpoint), "session" in n && s(20, i = n.session), "customerid" in n && s(21, m = n.customerid), "assetsurl" in n && s(1, c = n.assetsurl), "currency" in n && s(22, f = n.currency), "numberofmethodsshown" in n && s(23, u = n.numberofmethodsshown), "translationurl" in n && s(2, g = n.translationurl), "clientstyling" in n && s(3, p = n.clientstyling), "clientstylingurl" in n && s(4, P = n.clientstylingurl), "ismobileview" in n && s(24, F = n.ismobileview);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*endpoint, session, customerid*/
    3670016 && o && i && m && V(), t.$$.dirty[0] & /*lang*/
    1 && a && G(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    40 && p && C && ve(), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    48 && P && C && Le(), t.$$.dirty[0] & /*ismobileview*/
    16777216 && F && v(), t.$$.dirty[0] & /*lang, translationurl*/
    5 && a && g && J();
  }, [
    a,
    c,
    g,
    p,
    P,
    C,
    D,
    H,
    L,
    W,
    E,
    O,
    I,
    U,
    r,
    Y,
    K,
    te,
    l,
    o,
    i,
    m,
    f,
    u,
    F,
    _e,
    ke,
    Ce
  ];
}
class Xe extends Ee {
  constructor(e) {
    super(), xe(
      this,
      e,
      Je,
      qe,
      Ae,
      {
        lang: 0,
        local: 18,
        endpoint: 19,
        session: 20,
        customerid: 21,
        assetsurl: 1,
        currency: 22,
        numberofmethodsshown: 23,
        translationurl: 2,
        clientstyling: 3,
        clientstylingurl: 4,
        ismobileview: 24
      },
      Ve,
      [-1, -1]
    );
  }
  get lang() {
    return this.$$.ctx[0];
  }
  set lang(e) {
    this.$$set({ lang: e }), S();
  }
  get local() {
    return this.$$.ctx[18];
  }
  set local(e) {
    this.$$set({ local: e }), S();
  }
  get endpoint() {
    return this.$$.ctx[19];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), S();
  }
  get session() {
    return this.$$.ctx[20];
  }
  set session(e) {
    this.$$set({ session: e }), S();
  }
  get customerid() {
    return this.$$.ctx[21];
  }
  set customerid(e) {
    this.$$set({ customerid: e }), S();
  }
  get assetsurl() {
    return this.$$.ctx[1];
  }
  set assetsurl(e) {
    this.$$set({ assetsurl: e }), S();
  }
  get currency() {
    return this.$$.ctx[22];
  }
  set currency(e) {
    this.$$set({ currency: e }), S();
  }
  get numberofmethodsshown() {
    return this.$$.ctx[23];
  }
  set numberofmethodsshown(e) {
    this.$$set({ numberofmethodsshown: e }), S();
  }
  get translationurl() {
    return this.$$.ctx[2];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), S();
  }
  get clientstyling() {
    return this.$$.ctx[3];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), S();
  }
  get clientstylingurl() {
    return this.$$.ctx[4];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), S();
  }
  get ismobileview() {
    return this.$$.ctx[24];
  }
  set ismobileview(e) {
    this.$$set({ ismobileview: e }), S();
  }
}
Te(Xe, { lang: {}, local: {}, endpoint: {}, session: {}, customerid: {}, assetsurl: {}, currency: {}, numberofmethodsshown: {}, translationurl: {}, clientstyling: {}, clientstylingurl: {}, ismobileview: {} }, [], [], !0);
export {
  Xe as default
};
