import { a as ae, $ as ne, S as oe, i as re, s as le, f as A, b as se, n as I, d as T, h as H, k as f, e as p, p as ce, q as ue, u as de, w as pe, C as Y, D as te, j as r, m as F, g as b, c as N, l as G, t as O, r as he, v as E, a7 as fe, V as me, x as ye, y as ge, z as ke, A as ve, B as be } from "./GeneralLogout-CCZ-t51N.js";
import "../stencil/ui-skeleton-BQnxp85t.js";
function J(i, e) {
  ae(i, e);
}
function Ce(i) {
  ne.set(i);
}
const Z = {
  en: {
    titleRealityCheck: "Reality Check",
    never: "Never",
    minutes: "Minutes",
    oneHour: "1 Hour",
    hours: "Hours",
    successMessage: "Reality check has been successfully updated.",
    realityCheckText: "The Reality Check facility allows you to set the frequency at which you will see a Reality Check on the screen within your gaming session. A Reality Check means a display of the time elapsed since your session began. You are able to control the frequency at which the Reality Check will appear on your screen.",
    realityCheckLoading: "Loading items, please wait ...",
    setFrequency: "Set frequency"
  },
  "zh-hk": {
    titleRealityCheck: "現實檢查",
    never: "絕不",
    minutes: "分鐘",
    oneHour: "1小時",
    hours: "小時",
    successMessage: "現實檢查已成功更新。",
    realityCheckText: "該工具允許您設置在遊戲會話中在屏幕上看到消息的頻率。 它將顯示自會話開始以來經過的時間。",
    realityCheckLoading: "正在加載項目，請稍候...",
    setFrequency: "設置頻率"
  },
  fr: {
    titleRealityCheck: "Verification de la réalité",
    never: "Jamais",
    minutes: "Minutes",
    oneHour: "1 Heure",
    hours: "Heure",
    successMessage: "Le contrôle de la réalité a été mis à jour avec succès.",
    realityCheckText: "La fonction de contrôle de la réalité vous permet de définir la fréquence à laquelle vous verrez un contrôlede la réalité sur l'écran au cours de votre sessions de jeu , c'est-à-dire un affichage du temps écoulé depuis le début de votre session.",
    realityCheckLoading: "Chargement des éléments, veuillez patienter ...",
    setFrequency: "Régler la fréquence"
  },
  ro: {
    titleRealityCheck: "Verificare timp",
    never: "Niciodata",
    minutes: "Minute",
    oneHour: "1 Ora",
    hours: "Ore",
    successMessage: "Frecvența a fost setată cu succes!",
    realityCheckText: "Opțiunea Reality Check îți permite să setezi frecvența cu care vei vedea verificarea timpului de joc pe parcursul sesiunii tale de joc. O astfel de verificare reprezintă afișarea timpului trecut de la începerea sesiunii de joc.",
    realityCheckLoading: "Se încarcă...",
    setFrequency: "Stabilește frecvența"
  },
  es: {
    titleRealityCheck: "Verificación de la realidad",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 Hora",
    hours: "Horas",
    successMessage: "La verificación de la realidad se ha actualizado con éxito.",
    realityCheckText: "La función de Verificación de la realidad le permite establecer la frecuencia con la que verá una Verificación de la realidad en la pantalla dentro de su sesión de juego. Una verificación de la realidad significa una visualización del tiempo transcurrido desde que comenzó su sesión. Puede controlar la frecuencia con la que aparecerá la Verificación de realidad en su pantalla.",
    realityCheckLoading: "Cargando items",
    setFrequency: "Estabelecer frecuencia"
  },
  pt: {
    titleRealityCheck: "Verificação da realidade",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 hora",
    hours: "Horas",
    successMessage: "A verificação da realidade foi atualizada com sucesso.",
    realityCheckText: "O recurso Verificação da Realidade permite que você defina a frequência com que você verá uma Verificação da Realidade na tela durante sua sessão de jogo. Uma verificação da realidade significa uma exibição do tempo decorrido desde o início da sua sessão.",
    realityCheckLoading: "Carregando itens, por favor aguarde...",
    setFrequency: "Definir frequência"
  },
  hr: {
    titleRealityCheck: "Provjera stvarnosti",
    never: "Nikad",
    minutes: "Minuta",
    oneHour: "1 sat",
    hours: "Sati",
    successMessage: "Provjera stvarnosti je uspješno ažurirana.",
    realityCheckText: "Mogućnost Provjere stvarnosti omogućuje vam da postavite učestalost na kojoj ćete vidjeti Provjeru stvarnosti na zaslonu tijekom svoje sesije igranja. Provjera stvarnosti znači prikaz vremena proteklog od početka vaše sesije. Možete kontrolirati učestalost kojom će se Reality Provjera stvarnosti pojaviti na vašem zaslonu.",
    realityCheckLoading: "Učitavanje stavki",
    setFrequency: "Postavite frekvenciju"
  },
  "pt-br": {
    titleRealityCheck: "Verificação da realidade",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 hora",
    hours: "Horas",
    successMessage: "A verificação da realidade foi atualizada com sucesso.",
    realityCheckText: "A instalação da verificação da realidade permite ajustar a frequência com que a verificação da realidade aparece na tela durante a sessão de jogo. Uma verificação da realidade significa exibir o tempo decorrido desde que você iniciou sua sessão. Você é capaz de controlar a frequência com que essa verificação da realidade aparecerá na sua tela.",
    realityCheckLoading: "Carregando itens, por favor espere...",
    setFrequency: "Definir frequência"
  },
  "es-mx": {
    titleRealityCheck: "Control de Realidad",
    never: "Nunca",
    minutes: "Minutos",
    oneHour: "1 Hora",
    hours: "Horas",
    successMessage: "El control de realidad ha sido actualizada exitosamente.",
    realityCheckText: "La instalación del control de realidad le permite ajustar la frequencia en la que aparece la verificación de realidad en la pantalla durante su sesión de juego. Un control de realidad significa la visualización del tiempo transcurrido desde que arranco su sesión. Ustede es capaza de controlar la frecuencia en la que esta verificación de realidad aparecerá en su pantalla.",
    realityCheckLoading: "Cargando elementos, por favor espere...",
    setFrequency: "Fijar frecuencia"
  },
  "en-us": {
    titleRealityCheck: "Reality Check",
    never: "Never",
    minutes: "Minutes",
    oneHour: "1 Hour",
    hours: "Hours",
    successMessage: "Reality check has been successfully updated.",
    realityCheckText: "The Reality Check facility allows you to set the frequency at which you will see a Reality Check on the screen within your gaming session. A Reality Check means a display of the time elapsed since your session began. You are able to control the frequency at which the Reality Check will appear on your screen.",
    realityCheckLoading: "Loading items, please wait ...",
    setFrequency: "Set frequency"
  }
};
function _e(i) {
  se(i, "svelte-17lev58", '.SkeletonContainer{width:100%;display:flex;flex-direction:column;gap:17px;animation-name:fadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.3s}.SkeletonContainer .SkeletonMenuButton{display:flex;gap:20px;width:100%}.SkeletonContainer .SkeletonMenuButton.Mobile{margin-top:10px}.SkeletonContainer .SkeletonTextContainer{width:100%;min-height:140px}.SkeletonContainer .SkeletonOptionContainer{display:flex;flex-direction:column;width:100%;min-height:200px}.SkeletonContainer .SkeletonOptionContainer .SkeletonOption{display:flex;flex-direction:row;align-items:center;gap:10px;width:100%;margin:0 0 13px}.SkeletonContainer .SkeletonOptionContainer .SkeletonOption .SkeletonOptionText{width:20%;margin-top:10px}.SkeletonContainer .SkeletonOptionContainer .Button{margin-top:5px}.successMessage{position:absolute;display:block;top:25px;left:50px;background:var(--emw--color-valid, var(--emw--color-green, #48952a));font-size:14px;border-radius:5px;padding:10px;color:var(--emw--color-white, #FFFFFF)}.successMessage.successMessageMobile{display:none}.successMessageMobile{display:block;background:var(--emw--color-valid, var(--emw--color-green, #48952a));font-size:14px;border-radius:5px;padding:10px;color:var(--emw--color-white, #FFFFFF)}.successMessageMobile.successMessage{display:none}.TextContainer{display:flex;flex-direction:column;padding:10px 20px}.customRadio{margin-top:15px}.customRadio div{margin:0 0 20px}.customRadio input[type=radio]{position:absolute;left:-9999px}.customRadio input[type=radio]+label{position:relative;padding:3px 0 0 30px;cursor:pointer}.customRadio input[type=radio]+label:before{content:"";background:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-300, #58586B);height:16px;width:16px;border-radius:50%;position:absolute;top:0;left:0}.customRadio input[type=radio]+label:after{content:"";background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));width:14px;height:14px;border-radius:50%;position:absolute;top:2px;left:2px;opacity:0;transform:scale(2);transition:transform 0.3s linear, opacity 0.3s linear}.customRadio input[type=radio]:checked+label:after{opacity:1;transform:scale(1)}.RealityCheckDescription{color:var(--emw--pam-typography, var(--emw--color-contrast, #07072A));line-height:24px}.RealityCheckDescription p{min-height:140px}.RealityCheckDescription.RealityChecktionMobile{font-size:12px;line-height:18px}.PlayerDetailsContent{display:grid;grid-column-gap:50px;grid-row-gap:20px;grid-template-rows:auto;grid-template-columns:1fr;padding-bottom:30px}.PlayerRealityCheckWrapper{position:relative;color:var(--emw--pam-contrast, var(--emw--color-contrast, #07072A));padding:50px;max-width:760px}.PlayerRealityCheckWrapper.PlayerRealityCheckWrapperMobile{padding:20px 15px;max-width:unset}.RealityCheckTitle{font-size:26px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:400}.RealityCheckTitleMobile{font-size:16px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.RealityCheckTitleNone{display:none}.BottomButtonsArea{display:grid;grid-column-gap:30px;grid-template-rows:auto;grid-template-columns:1fr 1fr;margin-top:20px}.BottomButtonsArea.BottomButtonsAreaMobile{width:100%;grid-template-columns:1fr}.PlayerRealityCheckButton{cursor:pointer;border-radius:5px;width:100%;height:50px;display:flex;align-items:center;justify-content:center;font-size:15px;color:var(--emw--button-typography, var(--emw--color-white, #FFFFFF));text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.PlayerRealityCheckButton.ButtonInactive{background:transparent;border:1px solid var(--emw--color-gray-300, #58586B);cursor:not-allowed;opacity:0.6;color:var(--emw--color-gray-300, #58586B)}.PlayerRealityCheckButton{background:transparent;border:1px solid var(--emw--color-gray-300, #58586B)}.PlayerRealityCheckButton{background:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));border:1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.PlayerDetailsContent{grid-template-columns:1fr}.containerTimeout{animation-name:fadeIn;animation-iteration-count:1;animation-timing-function:ease-in;animation-duration:0.3s}.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))}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}');
}
function K(i, e, t) {
  const n = i.slice();
  return n[33] = e[t].value, n[34] = e[t].text, n[36] = t, n;
}
function we(i, e, t) {
  const n = i.slice();
  return n[30] = e[t], n;
}
function xe(i) {
  let e, t, n, a, o = (
    /*$_*/
    i[5]("titleRealityCheck") + ""
  ), c, C, g, m, v = (
    /*$_*/
    i[5]("realityCheckText") + ""
  ), w, k, R, x, u, d, y = (
    /*$_*/
    i[5]("setFrequency") + ""
  ), S, V, D, U, W, L = (
    /*isMobile*/
    i[6] && Me(i)
  ), j = (
    /*realityCheckSuccess*/
    i[4] && $(i)
  ), z = Y(
    /*realityCheckOptions*/
    i[7]
  ), M = [];
  for (let h = 0; h < z.length; h += 1)
    M[h] = ee(K(i, z, h));
  return {
    c() {
      e = f("div"), L && L.c(), t = F(), j && j.c(), n = F(), a = f("h2"), c = O(o), C = F(), g = f("div"), m = f("p"), w = O(v), k = F(), R = f("form");
      for (let h = 0; h < M.length; h += 1)
        M[h].c();
      x = F(), u = f("div"), d = f("button"), S = O(y), p(a, "class", "RealityCheckTitle " + /*isMobile*/
      (i[6] ? "RealityCheckTitleNone" : "")), p(g, "class", "RealityCheckDescription " + /*isMobile*/
      (i[6] ? "RealityCheckDescriptionMobile" : "")), p(d, "class", V = "PlayerRealityCheckButton " + /*currentRealityCheckValue*/
      (i[3] === /*realityCheckValue*/
      i[2] ? "ButtonInactive" : "")), d.disabled = D = /*currentRealityCheckValue*/
      i[3] === /*realityCheckValue*/
      i[2], p(u, "class", "BottomButtonsArea " + /*isMobile*/
      (i[6] ? "BottomButtonsAreaMobile" : "")), p(R, "class", "customRadio"), p(e, "class", "containerTimeout");
    },
    m(h, q) {
      H(h, e, q), L && L.m(e, null), r(e, t), j && j.m(e, null), r(e, n), r(e, a), r(a, c), r(e, C), r(e, g), r(g, m), r(m, w), r(e, k), r(e, R);
      for (let _ = 0; _ < M.length; _ += 1)
        M[_] && M[_].m(R, null);
      r(R, x), r(R, u), r(u, d), r(d, S), U || (W = G(
        d,
        "click",
        /*submitRealityCheckValue*/
        i[8]
      ), U = !0);
    },
    p(h, q) {
      if (
        /*isMobile*/
        h[6] && L.p(h, q), /*realityCheckSuccess*/
        h[4] ? j ? j.p(h, q) : (j = $(h), j.c(), j.m(e, n)) : j && (j.d(1), j = null), q[0] & /*$_*/
        32 && o !== (o = /*$_*/
        h[5]("titleRealityCheck") + "") && N(c, o), q[0] & /*$_*/
        32 && v !== (v = /*$_*/
        h[5]("realityCheckText") + "") && N(w, v), q[0] & /*realityCheckOptions, realityCheckValue*/
        132
      ) {
        z = Y(
          /*realityCheckOptions*/
          h[7]
        );
        let _;
        for (_ = 0; _ < z.length; _ += 1) {
          const X = K(h, z, _);
          M[_] ? M[_].p(X, q) : (M[_] = ee(X), M[_].c(), M[_].m(R, x));
        }
        for (; _ < M.length; _ += 1)
          M[_].d(1);
        M.length = z.length;
      }
      q[0] & /*$_*/
      32 && y !== (y = /*$_*/
      h[5]("setFrequency") + "") && N(S, y), q[0] & /*currentRealityCheckValue, realityCheckValue*/
      12 && V !== (V = "PlayerRealityCheckButton " + /*currentRealityCheckValue*/
      (h[3] === /*realityCheckValue*/
      h[2] ? "ButtonInactive" : "")) && p(d, "class", V), q[0] & /*currentRealityCheckValue, realityCheckValue*/
      12 && D !== (D = /*currentRealityCheckValue*/
      h[3] === /*realityCheckValue*/
      h[2]) && (d.disabled = D);
    },
    d(h) {
      h && T(e), L && L.d(), j && j.d(), te(M, h), U = !1, W();
    }
  };
}
function Re(i) {
  let e, t, n, a, o, c, C, g, m;
  function v(u, d) {
    return (
      /*isMobile*/
      u[6] ? je : Se
    );
  }
  let k = v(i)(i), R = Y({ length: 6 }), x = [];
  for (let u = 0; u < R.length; u += 1)
    x[u] = Be(we(i, R, u));
  return {
    c() {
      e = f("div"), k.c(), t = F(), n = f("div"), a = f("ui-skeleton"), o = F(), c = f("div");
      for (let u = 0; u < x.length; u += 1)
        x[u].c();
      C = F(), g = f("div"), m = f("ui-skeleton"), b(a, "structure", "text"), b(a, "height", "15px"), b(a, "width", "100%"), b(a, "margin-bottom", "7px"), b(
        a,
        "rows",
        /*isMobile*/
        i[6] ? "5" : "3"
      ), p(n, "class", "SkeletonTextContainer"), b(m, "structure", "rectangle"), b(m, "height", "50px"), b(m, "margin-bottom", "0"), b(m, "borderRadius", "5px"), b(
        m,
        "width",
        /*isMobile*/
        i[6] ? "100%" : "350px"
      ), p(g, "class", "Button"), p(c, "class", "SkeletonOptionContainer"), p(e, "class", "SkeletonContainer");
    },
    m(u, d) {
      H(u, e, d), k.m(e, null), r(e, t), r(e, n), r(n, a), r(e, o), r(e, c);
      for (let y = 0; y < x.length; y += 1)
        x[y] && x[y].m(c, null);
      r(c, C), r(c, g), r(g, m);
    },
    p(u, d) {
      k.p(u, d);
    },
    d(u) {
      u && T(e), k.d(), te(x, u);
    }
  };
}
function Me(i) {
  let e, t, n, a, o, c, C, g, m, v, w, k = (
    /*$_*/
    i[5]("titleRealityCheck") + ""
  ), R, x, u, d = (
    /*realityCheckSuccess*/
    i[4] && Q(i)
  );
  return {
    c() {
      d && d.c(), e = F(), t = f("div"), n = E("svg"), a = E("defs"), o = E("style"), c = O(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), C = E("g"), g = E("g"), m = E("path"), v = F(), w = f("h2"), R = O(k), p(m, "class", "aaa"), p(m, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), p(m, "transform", "translate(15 15) rotate(180)"), p(g, "transform", "translate(20 158)"), p(C, "transform", "translate(-20 -158)"), p(n, "xmlns", "http://www.w3.org/2000/svg"), p(n, "width", "15"), p(n, "height", "15"), p(n, "viewBox", "0 0 15 15"), p(w, "class", "RealityCheckTitleMobile"), p(t, "class", "MenuReturnButton");
    },
    m(y, S) {
      d && d.m(y, S), H(y, e, S), H(y, t, S), r(t, n), r(n, a), r(a, o), r(o, c), r(n, C), r(C, g), r(g, m), r(t, v), r(t, w), r(w, R), x || (u = [
        G(
          t,
          "click",
          /*click_handler*/
          i[18]
        ),
        G(t, "keydown", null)
      ], x = !0);
    },
    p(y, S) {
      /*realityCheckSuccess*/
      y[4] ? d ? d.p(y, S) : (d = Q(y), d.c(), d.m(e.parentNode, e)) : d && (d.d(1), d = null), S[0] & /*$_*/
      32 && k !== (k = /*$_*/
      y[5]("titleRealityCheck") + "") && N(R, k);
    },
    d(y) {
      y && (T(e), T(t)), d && d.d(y), x = !1, he(u);
    }
  };
}
function Q(i) {
  let e, t = (
    /*$_*/
    i[5]("successMessage") + ""
  ), n;
  return {
    c() {
      e = f("div"), n = O(t), p(e, "class", "successMessageMobile");
    },
    m(a, o) {
      H(a, e, o), r(e, n);
    },
    p(a, o) {
      o[0] & /*$_*/
      32 && t !== (t = /*$_*/
      a[5]("successMessage") + "") && N(n, t);
    },
    d(a) {
      a && T(e);
    }
  };
}
function $(i) {
  let e, t = (
    /*$_*/
    i[5]("successMessage") + ""
  ), n;
  return {
    c() {
      e = f("div"), n = O(t), p(e, "class", "successMessage " + /*isMobile*/
      (i[6] ? "successMessageMobile" : ""));
    },
    m(a, o) {
      H(a, e, o), r(e, n);
    },
    p(a, o) {
      o[0] & /*$_*/
      32 && t !== (t = /*$_*/
      a[5]("successMessage") + "") && N(n, t);
    },
    d(a) {
      a && T(e);
    }
  };
}
function ee(i) {
  let e, t, n, a, o = (
    /*text*/
    i[34] + ""
  ), c, C, g, m;
  return C = fe(
    /*$$binding_groups*/
    i[20][0]
  ), {
    c() {
      e = f("div"), t = f("input"), n = F(), a = f("label"), c = O(o), p(t, "type", "radio"), p(
        t,
        "id",
        /*value*/
        i[33]
      ), t.__value = /*value*/
      i[33], me(t, t.__value), p(
        a,
        "for",
        /*value*/
        i[33]
      ), C.p(t);
    },
    m(v, w) {
      H(v, e, w), r(e, t), t.checked = t.__value === /*realityCheckValue*/
      i[2], r(e, n), r(e, a), r(a, c), g || (m = G(
        t,
        "change",
        /*input_change_handler*/
        i[19]
      ), g = !0);
    },
    p(v, w) {
      w[0] & /*realityCheckValue*/
      4 && (t.checked = t.__value === /*realityCheckValue*/
      v[2]);
    },
    d(v) {
      v && T(e), C.r(), g = !1, m();
    }
  };
}
function Se(i) {
  let e;
  return {
    c() {
      e = f("div"), e.innerHTML = '<ui-skeleton structure="title" width="200px" margin-top="20px"></ui-skeleton>', p(e, "class", "SkeletonHeaderText");
    },
    m(t, n) {
      H(t, e, n);
    },
    p: I,
    d(t) {
      t && T(e);
    }
  };
}
function je(i) {
  let e, t, n, a;
  return {
    c() {
      e = f("div"), t = f("ui-skeleton"), n = F(), a = f("ui-skeleton"), b(t, "structure", "title"), b(t, "width", "20px"), b(t, "height", "20px"), b(t, "margin-top", "5px"), b(t, "margin-bottom", "15px"), b(a, "structure", "title"), b(a, "width", "100px"), b(a, "height", "20px"), b(a, "margin-top", "5px"), b(a, "margin-bottom", "15px"), p(e, "class", "SkeletonMenuButton " + /*isMobile*/
      (i[6] ? "Mobile" : ""));
    },
    m(o, c) {
      H(o, e, c), r(e, t), r(e, n), r(e, a);
    },
    p: I,
    d(o) {
      o && T(e);
    }
  };
}
function Be(i) {
  let e;
  return {
    c() {
      e = f("div"), e.innerHTML = '<div class="SkeletonOptionCircle"><ui-skeleton structure="circle" size="20px"></ui-skeleton></div> <div class="SkeletonOptionText"><ui-skeleton structure="text" height="10px" width="auto"></ui-skeleton></div>', p(e, "class", "SkeletonOption");
    },
    m(t, n) {
      H(t, e, n);
    },
    p: I,
    d(t) {
      t && T(e);
    }
  };
}
function qe(i) {
  let e;
  function t(o, c) {
    return (
      /*skeletonLoading*/
      o[1] ? Re : xe
    );
  }
  let n = t(i), a = n(i);
  return {
    c() {
      e = f("div"), a.c(), p(e, "class", "PlayerRealityCheckWrapper " + /*isMobile*/
      (i[6] ? "PlayerRealityCheckWrapperMobile" : ""));
    },
    m(o, c) {
      H(o, e, c), a.m(e, null), i[21](e);
    },
    p(o, c) {
      n === (n = t(o)) && a ? a.p(o, c) : (a.d(1), a = n(o), a && (a.c(), a.m(e, null)));
    },
    i: I,
    o: I,
    d(o) {
      o && T(e), a.d(), i[21](null);
    }
  };
}
function Fe(i, e, t) {
  let n;
  ce(i, be, (l) => t(5, n = l));
  let { endpoint: a = "" } = e, { playerid: o = "" } = e, { session: c = "" } = e, { lang: C = "en" } = e, { clientstyling: g = "" } = e, { clientstylingurl: m = "" } = e, { mbsource: v } = e, { translationurl: w = "" } = e, k, R = ue(window.navigator.userAgent) !== "PC", x = !0, u, d, y = !1, S = [];
  const V = () => {
    const l = new URL(`${a}/v1/player/${o}/realitycheck`), s = new Headers();
    s.append("X-SessionID", c);
    const P = { method: "GET", headers: s };
    fetch(l.href, P).then((B) => B.json()).then(
      (B) => {
        t(2, u = t(3, d = B.UserRealityCheckValue));
      },
      (B) => {
        console.error(B);
      }
    );
  }, D = () => {
    const l = new URL(`${a}/v1/player/${o}/availablerealityvalues`), s = new Headers();
    s.append("X-SessionID", c), s.append("accept", "application/json");
    const P = { method: "GET", headers: s };
    fetch(l.href, P).then((B) => B.json()).then(
      (B) => {
        U(B.AvailableRealityCheckValues), t(1, x = !1);
      },
      (B) => {
        console.error(B);
      }
    );
  }, U = (l) => {
    l.forEach((s) => {
      s == 0 ? S.push({
        value: s.toString(),
        text: n("never")
      }) : s < 60 ? S.push({
        value: s.toString(),
        text: s + " " + n("minutes")
      }) : s == 60 ? S.push({
        value: s.toString(),
        text: n("oneHour")
      }) : s > 60 && S.push({
        value: s.toString(),
        text: s / 60 + " " + n("hours")
      });
    });
  }, W = async () => {
    const l = new URL(`${a}/v1/player/${o}/realitycheck`), s = new Headers();
    s.append("X-SessionID", c), s.append("Content-Type", "application/json"), s.append("Accept", "application/json"), s.append("realityCheckValue", `${parseInt(u, 10)}`);
    const P = { method: "POST", headers: s };
    return await fetch(l.href, P).then(
      (B) => B.status == 200,
      (B) => (console.error(B), !1)
    );
  }, L = (l) => {
    l.preventDefault(), W().then((s) => {
      s && (j(), V());
    });
  }, j = () => {
    window.postMessage(
      {
        type: "WidgetNotification",
        data: {
          type: "success",
          message: n("realityCheckSuccess")
        }
      },
      window.location.href
    ), t(4, y = !0), setTimeout(() => t(4, y = !1), 2e3);
  }, z = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: R
      },
      window.location.href
    );
  }, M = () => {
    Ce(C);
  }, h = () => {
    fetch(w).then((s) => s.json()).then((s) => {
      Object.keys(s).forEach((P) => {
        J(P, s[P]);
      });
    }).catch((s) => {
      console.log(s);
    });
  };
  Object.keys(Z).forEach((l) => {
    J(l, Z[l]);
  }), de(() => () => {
  });
  const q = [[]], _ = () => z();
  function X() {
    u = this.__value, t(2, u);
  }
  function ie(l) {
    pe[l ? "unshift" : "push"](() => {
      k = l, t(0, k);
    });
  }
  return i.$$set = (l) => {
    "endpoint" in l && t(10, a = l.endpoint), "playerid" in l && t(11, o = l.playerid), "session" in l && t(12, c = l.session), "lang" in l && t(13, C = l.lang), "clientstyling" in l && t(14, g = l.clientstyling), "clientstylingurl" in l && t(15, m = l.clientstylingurl), "mbsource" in l && t(16, v = l.mbsource), "translationurl" in l && t(17, w = l.translationurl);
  }, i.$$.update = () => {
    i.$$.dirty[0] & /*lang*/
    8192 && C && M(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    7168 && a && o && c && V(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    7168 && a && o && c && D(), i.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    16385 && g && k && ye(k, g), i.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    32769 && m && k && ge(k, m), i.$$.dirty[0] & /*mbsource, customStylingContainer*/
    65537 && v && k && ke(k, `${v}.Style`), i.$$.dirty[0] & /*translationurl*/
    131072 && w && h();
  }, [
    k,
    x,
    u,
    d,
    y,
    n,
    R,
    S,
    L,
    z,
    a,
    o,
    c,
    C,
    g,
    m,
    v,
    w,
    _,
    X,
    q,
    ie
  ];
}
class Te extends oe {
  constructor(e) {
    super(), re(
      this,
      e,
      Fe,
      qe,
      le,
      {
        endpoint: 10,
        playerid: 11,
        session: 12,
        lang: 13,
        clientstyling: 14,
        clientstylingurl: 15,
        mbsource: 16,
        translationurl: 17
      },
      _e,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[10];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), A();
  }
  get playerid() {
    return this.$$.ctx[11];
  }
  set playerid(e) {
    this.$$set({ playerid: e }), A();
  }
  get session() {
    return this.$$.ctx[12];
  }
  set session(e) {
    this.$$set({ session: e }), A();
  }
  get lang() {
    return this.$$.ctx[13];
  }
  set lang(e) {
    this.$$set({ lang: e }), A();
  }
  get clientstyling() {
    return this.$$.ctx[14];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), A();
  }
  get clientstylingurl() {
    return this.$$.ctx[15];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), A();
  }
  get mbsource() {
    return this.$$.ctx[16];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), A();
  }
  get translationurl() {
    return this.$$.ctx[17];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), A();
  }
}
ve(Te, { endpoint: {}, playerid: {}, session: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  Te as default
};
