import { a as ne, $ as oe, S as re, i as le, s as se, f as O, b as ce, n as I, d as T, c as H, e as f, t as d, g as ue, h as de, j as pe, o as he, k as fe, l as Y, m as te, p as r, q as F, r as b, u as N, x as G, v as V, w as me, y as E, U as ye, L as ge, A as ke, B as ve, C as be, D as Ce } from "./PlayerAccountControllerNd-DobNa2EP.js";
import "../stencil/ui-skeleton-fEyshHrf.js";
function J(i, e) {
  ne(i, e);
}
function _e(i) {
  oe.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 we(i) {
  ce(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 xe(i, e, t) {
  const n = i.slice();
  return n[30] = e[t], n;
}
function Re(i) {
  let e, t, n, a, o = (
    /*$_*/
    i[5]("titleRealityCheck") + ""
  ), u, C, g, m, v = (
    /*$_*/
    i[5]("realityCheckText") + ""
  ), w, k, M, x, h, s, y = (
    /*$_*/
    i[5]("setFrequency") + ""
  ), B, L, D, U, W, z = (
    /*isMobile*/
    i[6] && Se(i)
  ), S = (
    /*realityCheckSuccess*/
    i[4] && $(i)
  ), P = Y(
    /*realityCheckOptions*/
    i[7]
  ), R = [];
  for (let p = 0; p < P.length; p += 1)
    R[p] = ee(K(i, P, p));
  return {
    c() {
      e = f("div"), z && z.c(), t = F(), S && S.c(), n = F(), a = f("h2"), u = V(o), C = F(), g = f("div"), m = f("p"), w = V(v), k = F(), M = f("form");
      for (let p = 0; p < R.length; p += 1)
        R[p].c();
      x = F(), h = f("div"), s = f("button"), B = V(y), d(a, "class", "RealityCheckTitle " + /*isMobile*/
      (i[6] ? "RealityCheckTitleNone" : "")), d(g, "class", "RealityCheckDescription " + /*isMobile*/
      (i[6] ? "RealityCheckDescriptionMobile" : "")), d(s, "class", L = "PlayerRealityCheckButton " + /*currentRealityCheckValue*/
      (i[3] === /*realityCheckValue*/
      i[2] ? "ButtonInactive" : "")), s.disabled = D = /*currentRealityCheckValue*/
      i[3] === /*realityCheckValue*/
      i[2], d(h, "class", "BottomButtonsArea " + /*isMobile*/
      (i[6] ? "BottomButtonsAreaMobile" : "")), d(M, "class", "customRadio"), d(e, "class", "containerTimeout");
    },
    m(p, q) {
      H(p, e, q), z && z.m(e, null), r(e, t), S && S.m(e, null), r(e, n), r(e, a), r(a, u), r(e, C), r(e, g), r(g, m), r(m, w), r(e, k), r(e, M);
      for (let _ = 0; _ < R.length; _ += 1)
        R[_] && R[_].m(M, null);
      r(M, x), r(M, h), r(h, s), r(s, B), U || (W = G(
        s,
        "click",
        /*submitRealityCheckValue*/
        i[8]
      ), U = !0);
    },
    p(p, q) {
      if (
        /*isMobile*/
        p[6] && z.p(p, q), /*realityCheckSuccess*/
        p[4] ? S ? S.p(p, q) : (S = $(p), S.c(), S.m(e, n)) : S && (S.d(1), S = null), q[0] & /*$_*/
        32 && o !== (o = /*$_*/
        p[5]("titleRealityCheck") + "") && N(u, o), q[0] & /*$_*/
        32 && v !== (v = /*$_*/
        p[5]("realityCheckText") + "") && N(w, v), q[0] & /*realityCheckOptions, realityCheckValue*/
        132
      ) {
        P = Y(
          /*realityCheckOptions*/
          p[7]
        );
        let _;
        for (_ = 0; _ < P.length; _ += 1) {
          const X = K(p, P, _);
          R[_] ? R[_].p(X, q) : (R[_] = ee(X), R[_].c(), R[_].m(M, x));
        }
        for (; _ < R.length; _ += 1)
          R[_].d(1);
        R.length = P.length;
      }
      q[0] & /*$_*/
      32 && y !== (y = /*$_*/
      p[5]("setFrequency") + "") && N(B, y), q[0] & /*currentRealityCheckValue, realityCheckValue*/
      12 && L !== (L = "PlayerRealityCheckButton " + /*currentRealityCheckValue*/
      (p[3] === /*realityCheckValue*/
      p[2] ? "ButtonInactive" : "")) && d(s, "class", L), q[0] & /*currentRealityCheckValue, realityCheckValue*/
      12 && D !== (D = /*currentRealityCheckValue*/
      p[3] === /*realityCheckValue*/
      p[2]) && (s.disabled = D);
    },
    d(p) {
      p && T(e), z && z.d(), S && S.d(), te(R, p), U = !1, W();
    }
  };
}
function Me(i) {
  let e, t, n, a, o, u, C, g, m;
  function v(h, s) {
    return (
      /*isMobile*/
      h[6] ? Be : je
    );
  }
  let k = v(i)(i), M = Y({ length: 6 }), x = [];
  for (let h = 0; h < M.length; h += 1)
    x[h] = qe(xe(i, M, h));
  return {
    c() {
      e = f("div"), k.c(), t = F(), n = f("div"), a = f("ui-skeleton"), o = F(), u = f("div");
      for (let h = 0; h < x.length; h += 1)
        x[h].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"
      ), d(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"
      ), d(g, "class", "Button"), d(u, "class", "SkeletonOptionContainer"), d(e, "class", "SkeletonContainer");
    },
    m(h, s) {
      H(h, e, s), k.m(e, null), r(e, t), r(e, n), r(n, a), r(e, o), r(e, u);
      for (let y = 0; y < x.length; y += 1)
        x[y] && x[y].m(u, null);
      r(u, C), r(u, g), r(g, m);
    },
    p(h, s) {
      k.p(h, s);
    },
    d(h) {
      h && T(e), k.d(), te(x, h);
    }
  };
}
function Se(i) {
  let e, t, n, a, o, u, C, g, m, v, w, k = (
    /*$_*/
    i[5]("titleRealityCheck") + ""
  ), M, x, h, s = (
    /*realityCheckSuccess*/
    i[4] && Q(i)
  );
  return {
    c() {
      s && s.c(), e = F(), t = f("div"), n = E("svg"), a = E("defs"), o = E("style"), u = V(".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"), M = V(k), d(m, "class", "aaa"), d(m, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), d(m, "transform", "translate(15 15) rotate(180)"), d(g, "transform", "translate(20 158)"), d(C, "transform", "translate(-20 -158)"), d(n, "xmlns", "http://www.w3.org/2000/svg"), d(n, "width", "15"), d(n, "height", "15"), d(n, "viewBox", "0 0 15 15"), d(w, "class", "RealityCheckTitleMobile"), d(t, "class", "MenuReturnButton");
    },
    m(y, B) {
      s && s.m(y, B), H(y, e, B), H(y, t, B), r(t, n), r(n, a), r(a, o), r(o, u), r(n, C), r(C, g), r(g, m), r(t, v), r(t, w), r(w, M), x || (h = [
        G(
          t,
          "click",
          /*click_handler*/
          i[18]
        ),
        G(t, "keydown", null)
      ], x = !0);
    },
    p(y, B) {
      /*realityCheckSuccess*/
      y[4] ? s ? s.p(y, B) : (s = Q(y), s.c(), s.m(e.parentNode, e)) : s && (s.d(1), s = null), B[0] & /*$_*/
      32 && k !== (k = /*$_*/
      y[5]("titleRealityCheck") + "") && N(M, k);
    },
    d(y) {
      y && (T(e), T(t)), s && s.d(y), x = !1, me(h);
    }
  };
}
function Q(i) {
  let e, t = (
    /*$_*/
    i[5]("successMessage") + ""
  ), n;
  return {
    c() {
      e = f("div"), n = V(t), d(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 = V(t), d(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] + ""
  ), u, C, g, m;
  return C = ye(
    /*$$binding_groups*/
    i[20][0]
  ), {
    c() {
      e = f("div"), t = f("input"), n = F(), a = f("label"), u = V(o), d(t, "type", "radio"), d(
        t,
        "id",
        /*value*/
        i[33]
      ), t.__value = /*value*/
      i[33], ge(t, t.__value), d(
        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, u), 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 je(i) {
  let e;
  return {
    c() {
      e = f("div"), e.innerHTML = '<ui-skeleton structure="title" width="200px" margin-top="20px"></ui-skeleton>', d(e, "class", "SkeletonHeaderText");
    },
    m(t, n) {
      H(t, e, n);
    },
    p: I,
    d(t) {
      t && T(e);
    }
  };
}
function Be(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"), d(e, "class", "SkeletonMenuButton " + /*isMobile*/
      (i[6] ? "Mobile" : ""));
    },
    m(o, u) {
      H(o, e, u), r(e, t), r(e, n), r(e, a);
    },
    p: I,
    d(o) {
      o && T(e);
    }
  };
}
function qe(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>', d(e, "class", "SkeletonOption");
    },
    m(t, n) {
      H(t, e, n);
    },
    p: I,
    d(t) {
      t && T(e);
    }
  };
}
function Fe(i) {
  let e;
  function t(o, u) {
    return (
      /*skeletonLoading*/
      o[1] ? Me : Re
    );
  }
  let n = t(i), a = n(i);
  return {
    c() {
      e = f("div"), a.c(), d(e, "class", "PlayerRealityCheckWrapper " + /*isMobile*/
      (i[6] ? "PlayerRealityCheckWrapperMobile" : ""));
    },
    m(o, u) {
      H(o, e, u), a.m(e, null), i[21](e);
    },
    p(o, u) {
      n === (n = t(o)) && a ? a.p(o, u) : (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 Te(i, e, t) {
  let n;
  ue(i, de, (l) => t(5, n = l));
  let { endpoint: a = "" } = e, { playerid: o = "" } = e, { session: u = "" } = e, { lang: C = "en" } = e, { clientstyling: g = "" } = e, { clientstylingurl: m = "" } = e, { mbsource: v } = e, { translationurl: w = "" } = e, k, M, x = pe(window.navigator.userAgent) !== "PC", h = !0, s, y, B = !1, L = [];
  const D = () => {
    const l = new URL(`${a}/v1/player/${o}/realitycheck`), c = new Headers();
    c.append("X-SessionID", u);
    const A = { method: "GET", headers: c };
    fetch(l.href, A).then((j) => j.json()).then(
      (j) => {
        t(2, s = t(3, y = j.UserRealityCheckValue));
      },
      (j) => {
        console.error(j);
      }
    );
  }, U = () => {
    const l = new URL(`${a}/v1/player/${o}/availablerealityvalues`), c = new Headers();
    c.append("X-SessionID", u), c.append("accept", "application/json");
    const A = { method: "GET", headers: c };
    fetch(l.href, A).then((j) => j.json()).then(
      (j) => {
        W(j.AvailableRealityCheckValues), t(1, h = !1);
      },
      (j) => {
        console.error(j);
      }
    );
  }, W = (l) => {
    l.forEach((c) => {
      c == 0 ? L.push({
        value: c.toString(),
        text: n("never")
      }) : c < 60 ? L.push({
        value: c.toString(),
        text: c + " " + n("minutes")
      }) : c == 60 ? L.push({
        value: c.toString(),
        text: n("oneHour")
      }) : c > 60 && L.push({
        value: c.toString(),
        text: c / 60 + " " + n("hours")
      });
    });
  }, z = async () => {
    const l = new URL(`${a}/v1/player/${o}/realitycheck`), c = new Headers();
    c.append("X-SessionID", u), c.append("Content-Type", "application/json"), c.append("Accept", "application/json"), c.append("realityCheckValue", `${parseInt(s, 10)}`);
    const A = { method: "POST", headers: c };
    return await fetch(l.href, A).then(
      (j) => j.status == 200,
      (j) => (console.error(j), !1)
    );
  }, S = (l) => {
    l.preventDefault(), z().then((c) => {
      c && (P(), D());
    });
  }, P = () => {
    window.postMessage(
      {
        type: "WidgetNotification",
        data: {
          type: "success",
          message: n("realityCheckSuccess")
        }
      },
      window.location.href
    ), t(4, B = !0), setTimeout(() => t(4, B = !1), 2e3);
  }, R = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: x
      },
      window.location.href
    );
  }, p = () => {
    _e(C);
  }, q = () => {
    fetch(w).then((c) => c.json()).then((c) => {
      Object.keys(c).forEach((A) => {
        J(A, c[A]);
      });
    }).catch((c) => {
      console.log(c);
    });
  };
  Object.keys(Z).forEach((l) => {
    J(l, Z[l]);
  }), he(() => () => {
  });
  const _ = [[]], X = () => R();
  function ie() {
    s = this.__value, t(2, s);
  }
  function ae(l) {
    fe[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, u = 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 && p(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    7168 && a && o && u && D(), i.$$.dirty[0] & /*endpoint, playerid, session*/
    7168 && a && o && u && U(), i.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    16385 && g && k && ke(k, g), i.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    32769 && m && k && ve(k, m), i.$$.dirty[0] & /*mbsource, customStylingContainer*/
    65537 && v && k && be(k, `${v}.Style`, M), i.$$.dirty[0] & /*translationurl*/
    131072 && w && q();
  }, [
    k,
    h,
    s,
    y,
    B,
    n,
    x,
    L,
    S,
    R,
    a,
    o,
    u,
    C,
    g,
    m,
    v,
    w,
    X,
    ie,
    _,
    ae
  ];
}
class He extends re {
  constructor(e) {
    super(), le(
      this,
      e,
      Te,
      Fe,
      se,
      {
        endpoint: 10,
        playerid: 11,
        session: 12,
        lang: 13,
        clientstyling: 14,
        clientstylingurl: 15,
        mbsource: 16,
        translationurl: 17
      },
      we,
      [-1, -1]
    );
  }
  get endpoint() {
    return this.$$.ctx[10];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), O();
  }
  get playerid() {
    return this.$$.ctx[11];
  }
  set playerid(e) {
    this.$$set({ playerid: e }), O();
  }
  get session() {
    return this.$$.ctx[12];
  }
  set session(e) {
    this.$$set({ session: e }), O();
  }
  get lang() {
    return this.$$.ctx[13];
  }
  set lang(e) {
    this.$$set({ lang: e }), O();
  }
  get clientstyling() {
    return this.$$.ctx[14];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), O();
  }
  get clientstylingurl() {
    return this.$$.ctx[15];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), O();
  }
  get mbsource() {
    return this.$$.ctx[16];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), O();
  }
  get translationurl() {
    return this.$$.ctx[17];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), O();
  }
}
Ce(He, { endpoint: {}, playerid: {}, session: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  He as default
};
