import { a as L, $ as N, S as W, i as q, s as H, f as k, b as I, n as z, d as O, c as U, h as R, j as o, l as C, k as h, m as S, t as x, e as n, p as K, q as V, u as Z, v as j, w as G, x as J, y as Q, z as X, A as $, B as tt } from "./GeneralLogout-hWNQ3J3o.js";
function Y(i, t) {
  L(i, t);
}
function it(i) {
  N.set(i);
}
const F = {
  en: {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  "zh-hk": {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  fr: {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  tr: {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  ro: {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  es: {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  pt: {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  hr: {
    titleBiometrics: "Biometrijska autentifikacija",
    descriptionParagraph1: "Koristite biometrijsku prijavu otiskom prsta ili licem za brži i jednostavniji pristup svom računu.",
    descriptionParagraph2: "Ovu značajku možete uključiti i isključiti u bilo kojem trenutku",
    btnEnableBiometrics: "Omogući biometriju",
    btnDisableBiometrics: "Onemogući biometriju"
  },
  "pt-br": {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  "es-mx": {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  },
  "en-us": {
    titleBiometrics: "Biometrics Authentication",
    descriptionParagraph1: "Use biometric login with your fingerprint or face for faster and easier access to your account.",
    descriptionParagraph2: "You can turn this feature on and off at any time",
    btnEnableBiometrics: "Enable biometrics",
    btnDisableBiometrics: "Disable biometrics"
  }
};
function et(i) {
  I(i, "svelte-6qxh5g", ".BiometricsWrapper{color:var(--emw--pam-typography, var(--emw--color-contrast, #07072A));padding:50px;max-width:760px}.BiometricsWrapper.BiometricsWrapperMobile{padding:20px 15px;max-width:unset}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:20px}.MenuReturnButton svg{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.BiometricsTitle{font-size:26px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:400}.BiometricsTitleMobile{font-size:16px}.BiometricsTitleNone{display:none}.BiometricsDescription{color:var(--emw--color-gray-300, #58586B);line-height:24px}.BiometricsDescription.BiometricsDescriptionMobile{font-size:12px;line-height:18px}.BiometricsActionButtons{display:grid;grid-column-gap:10px;grid-template-rows:auto;grid-template-columns:1fr;margin-top:20px;width:50%}.BiometricsActionButtons .BiometricsToggle{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));cursor:pointer;border-radius:5px;width:100%;height:50px;display:flex;align-items:center;justify-content:center;font-size:16px;text-transform:uppercase;transition-duration:0.3s;box-sizing:border-box}.BiometricsActionButtons.BiometricsActionButtonsMobile{width:100%;grid-template-columns:1fr}.BiometricsActionButtons.BiometricsActionButtonsMobile .BiometricsToggle{height:40px;font-size:12px}");
}
function rt(i) {
  let t, e, B, c, m, l, u, s, p, a, f = (
    /*$_*/
    i[2]("titleBiometrics") + ""
  ), y, w, v;
  return {
    c() {
      t = h("div"), e = j("svg"), B = j("defs"), c = j("style"), m = x(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), l = j("g"), u = j("g"), s = j("path"), p = S(), a = h("h2"), y = x(f), n(s, "class", "aaa"), n(s, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), n(s, "transform", "translate(15 15) rotate(180)"), n(u, "transform", "translate(20 158)"), n(l, "transform", "translate(-20 -158)"), n(e, "xmlns", "http://www.w3.org/2000/svg"), n(e, "width", "15"), n(e, "height", "15"), n(e, "viewBox", "0 0 15 15"), n(a, "class", "BiometricsTitleMobile"), n(a, "part", "BiometricsTitleMobile"), n(t, "class", "MenuReturnButton"), n(t, "part", "MenuReturnButton");
    },
    m(b, E) {
      R(b, t, E), o(t, e), o(e, B), o(B, c), o(c, m), o(e, l), o(l, u), o(u, s), o(t, p), o(t, a), o(a, y), w || (v = C(
        t,
        "click",
        /*click_handler*/
        i[11]
      ), w = !0);
    },
    p(b, E) {
      E & /*$_*/
      4 && f !== (f = /*$_*/
      b[2]("titleBiometrics") + "") && U(y, f);
    },
    d(b) {
      b && O(t), w = !1, v();
    }
  };
}
function ot(i) {
  let t, e, B, c, m = (
    /*$_*/
    i[2]("titleBiometrics") + ""
  ), l, u, s, p, a = (
    /*$_*/
    i[2]("descriptionParagraph1") + ""
  ), f, y, w, v = (
    /*$_*/
    i[2]("descriptionParagraph2") + ""
  ), b, E, _, D, M = (
    /*biometricsenabled*/
    (i[0] === "true" ? (
      /*$_*/
      i[2]("btnDisableBiometrics")
    ) : (
      /*$_*/
      i[2]("btnEnableBiometrics")
    )) + ""
  ), r, d, T, P = (
    /*isMobile*/
    i[3] && rt(i)
  );
  return {
    c() {
      t = h("div"), e = h("div"), P && P.c(), B = S(), c = h("h2"), l = x(m), u = S(), s = h("div"), p = h("p"), f = x(a), y = S(), w = h("p"), b = x(v), E = S(), _ = h("div"), D = h("button"), r = x(M), n(c, "class", "BiometricsTitle " + /*isMobile*/
      (i[3] ? "BiometricsTitleNone" : "")), n(s, "class", "BiometricsDescription " + /*isMobile*/
      (i[3] ? "BiometricsDescriptionMobile" : "")), n(D, "class", "BiometricsToggle"), n(_, "class", "BiometricsActionButtons " + /*isMobile*/
      (i[3] ? "BiometricsActionButtonsMobile" : "")), n(e, "class", "BiometricsWrapper " + /*isMobile*/
      (i[3] ? "BiometricsWrapperMobile" : ""));
    },
    m(g, A) {
      R(g, t, A), o(t, e), P && P.m(e, null), o(e, B), o(e, c), o(c, l), o(e, u), o(e, s), o(s, p), o(p, f), o(s, y), o(s, w), o(w, b), o(e, E), o(e, _), o(_, D), o(D, r), i[13](t), d || (T = C(
        D,
        "click",
        /*click_handler_1*/
        i[12]
      ), d = !0);
    },
    p(g, [A]) {
      /*isMobile*/
      g[3] && P.p(g, A), A & /*$_*/
      4 && m !== (m = /*$_*/
      g[2]("titleBiometrics") + "") && U(l, m), A & /*$_*/
      4 && a !== (a = /*$_*/
      g[2]("descriptionParagraph1") + "") && U(f, a), A & /*$_*/
      4 && v !== (v = /*$_*/
      g[2]("descriptionParagraph2") + "") && U(b, v), A & /*biometricsenabled, $_*/
      5 && M !== (M = /*biometricsenabled*/
      (g[0] === "true" ? (
        /*$_*/
        g[2]("btnDisableBiometrics")
      ) : (
        /*$_*/
        g[2]("btnEnableBiometrics")
      )) + "") && U(r, M);
    },
    i: z,
    o: z,
    d(g) {
      g && O(t), P && P.d(), i[13](null), d = !1, T();
    }
  };
}
function at(i, t, e) {
  let B;
  K(i, tt, (r) => e(2, B = r));
  let { biometricsenabled: c = "false" } = t, { lang: m = "en" } = t, { clientstyling: l = "" } = t, { clientstylingurl: u = "" } = t, { mbsource: s } = t, { translationurl: p = "" } = t, a, f = window.navigator.userAgent, y = V(f) !== "PC";
  const w = () => {
    fetch(p).then((d) => d.json()).then((d) => {
      Object.keys(d).forEach((T) => {
        Y(T, d[T]);
      });
    }).catch((d) => {
      console.log(d);
    });
  };
  Object.keys(F).forEach((r) => {
    Y(r, F[r]);
  });
  const v = () => {
    it(m);
  }, b = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: y
      },
      window.location.href
    );
  }, E = () => {
    c === "true" ? e(0, c = "false") : c === "false" && e(0, c = "true"), window.postMessage({
      type: "ToggleBiometrics",
      data: c
    });
  };
  Z(() => () => {
  });
  const _ = () => b(), D = () => E();
  function M(r) {
    G[r ? "unshift" : "push"](() => {
      a = r, e(1, a);
    });
  }
  return i.$$set = (r) => {
    "biometricsenabled" in r && e(0, c = r.biometricsenabled), "lang" in r && e(6, m = r.lang), "clientstyling" in r && e(7, l = r.clientstyling), "clientstylingurl" in r && e(8, u = r.clientstylingurl), "mbsource" in r && e(9, s = r.mbsource), "translationurl" in r && e(10, p = r.translationurl);
  }, i.$$.update = () => {
    i.$$.dirty & /*lang*/
    64 && m && v(), i.$$.dirty & /*clientstyling, customStylingContainer*/
    130 && l && a && J(a, l), i.$$.dirty & /*clientstylingurl, customStylingContainer*/
    258 && u && a && Q(a, u), i.$$.dirty & /*mbsource, customStylingContainer*/
    514 && s && a && X(a, `${s}.Style`), i.$$.dirty & /*translationurl*/
    1024 && p && w();
  }, [
    c,
    a,
    B,
    y,
    b,
    E,
    m,
    l,
    u,
    s,
    p,
    _,
    D,
    M
  ];
}
class nt extends W {
  constructor(t) {
    super(), q(
      this,
      t,
      at,
      ot,
      H,
      {
        biometricsenabled: 0,
        lang: 6,
        clientstyling: 7,
        clientstylingurl: 8,
        mbsource: 9,
        translationurl: 10
      },
      et
    );
  }
  get biometricsenabled() {
    return this.$$.ctx[0];
  }
  set biometricsenabled(t) {
    this.$$set({ biometricsenabled: t }), k();
  }
  get lang() {
    return this.$$.ctx[6];
  }
  set lang(t) {
    this.$$set({ lang: t }), k();
  }
  get clientstyling() {
    return this.$$.ctx[7];
  }
  set clientstyling(t) {
    this.$$set({ clientstyling: t }), k();
  }
  get clientstylingurl() {
    return this.$$.ctx[8];
  }
  set clientstylingurl(t) {
    this.$$set({ clientstylingurl: t }), k();
  }
  get mbsource() {
    return this.$$.ctx[9];
  }
  set mbsource(t) {
    this.$$set({ mbsource: t }), k();
  }
  get translationurl() {
    return this.$$.ctx[10];
  }
  set translationurl(t) {
    this.$$set({ translationurl: t }), k();
  }
}
$(nt, { biometricsenabled: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  nt as default
};
