import { a as Z, $ as P, S as Y, i as U, s as J, f as E, b as K, n as T, d as D, u as S, c as j, p as a, x as N, e as C, q as z, v as W, t as s, g as V, h as G, j as Q, o as X, y as F, w as $, k as ee, l as te, m as oe, A as re, B as ae, C as ne, D as le } from "./PlayerAccountControllerNd-DobNa2EP.js";
import "../stencil/ui-skeleton-fEyshHrf.js";
function H(o, e) {
  Z(o, e);
}
function se(o) {
  P.set(o);
}
const L = {
  en: {
    titleAccountClosure: "Account Closure",
    accountClosureDescription: "Account Closure provides a permanent access restriction to your account if you feel you need a break, or you just want to stop using our services.",
    closeAccount: "Close Account",
    modal: "Are you sure you want to close your account?",
    accountClosureCancel: "No",
    accountClosureConfirm: "Yes"
  },
  "zh-hk": {
    titleAccountClosure: "賬戶關閉",
    accountClosureDescription: "如果您覺得需要休息，或者您只是想停止使用我們的服務，賬戶關閉會為您的賬戶提供永久訪問限制。",
    closeAccount: "關閉賬戶",
    modal: "您確定要關閉您的帳戶嗎？",
    accountClosureCancel: "不",
    accountClosureConfirm: "是的"
  },
  fr: {
    titleAccountClosure: "Fermeture du compte",
    accountClosureDescription: "La fermeture du compte fournit une restriction permanente d'accès à votre compte si vous sentez que vous avez besoin d'une pause ou si vous souhaitez arrêter d'utiliser notre service",
    closeAccount: "Fermer le compte",
    modal: "êtes-vous sûr de vouloir fermer votre compte?",
    accountClosureCancel: "Non",
    accountClosureConfirm: "Oui"
  },
  ro: {
    titleAccountClosure: "Închidere Cont",
    accountClosureDescription: 'Opțiunea "Închidere Cont" asigură suspendarea permanentă a accesului la contul tău dacă simți că ai nevoie de o pauză sau că vrei să nu mai folosești serviciile noastre.',
    closeAccount: "Închide Cont",
    modal: "Esti sigur ca vrei sa inchizi contul?",
    accountClosureCancel: "Nu",
    accountClosureConfirm: "Da"
  },
  es: {
    titleAccountClosure: "Cierre de cuenta",
    accountClosureDescription: "Cierre de cuenta provee una restricción permamente de poder ingresar a su cuenta si desea tomar una pausa.",
    closeAccount: "Cerrar cuenta",
    modal: "Esta seguro que desea cerrar su cuenta?",
    accountClosureCancel: "No",
    accountClosureConfirm: "Sí"
  },
  pt: {
    titleAccountClosure: "Encerramento da conta",
    accountClosureDescription: "O Encerramento de Conta fornece uma restrição de acesso permanente à sua conta se você achar que precisa de uma pausa ou apenas deseja parar de usar nossos serviços.",
    closeAccount: "Encerrar conta",
    modal: "Tem certeza de que deseja encerrar sua conta?",
    accountClosureCancel: "Não",
    accountClosureConfirm: "Sim"
  },
  hr: {
    titleAccountClosure: "Zatvaranje računa",
    accountClosureDescription: "Zatvaranje računa omogućuje trajno ograničenje pristupa vašem računu ako smatrate da vam je potreban odmor",
    closeAccount: "Zatvori račun",
    modal: "Jeste li sigurni da želite zatvoriti svoj račun?",
    accountClosureCancel: "Ne",
    accountClosureConfirm: "Da"
  },
  "pt-br": {
    titleAccountClosure: "Encerramento da conta",
    accountClosureDescription: "O encerramento da conta oferece restrição permanente de acesso à sua conta se você achar que precisa de uma pausa,ou simplesmente deseja parar de usar nossos serviços",
    closeAccount: "Conta de data",
    modal: "Tem certeza de que deseja namorar sua conta?",
    accountClosureCancel: "Não",
    accountClosureConfirm: "Sim"
  },
  "es-mx": {
    titleAccountClosure: "Cierre de cuenta",
    accountClosureDescription: "El cierre de la cuenta ofrece restricción permanente al acceso de su cuenta si considera que necesita un descanso,o simplemente quiere dejar de utilizar nuestros servicios",
    closeAccount: "Cerrar cuenta",
    modal: "Está seguro que quiere cerrar su cuenta?",
    accountClosureCancel: "No",
    accountClosureConfirm: "Sí"
  },
  tr: {
    titleAccountClosure: "Hesap kapatma",
    accountClosureDescription: "Hesap Kapatma, bir ara vermeniz gerektiğini düşünüyorsanız veya hizmetlerimizi kullanmayı bırakmak istiyorsanız, hesabınıza kalıcı erişim kısıtlaması sağlar.",
    closeAccount: "Hesabı kapat",
    modal: "Hesabınızı kapatmak istediğinizden emin misiniz?",
    accountClosureCancel: "HAYIR",
    accountClosureConfirm: "Evet"
  },
  "en-us": {
    titleAccountClosure: "Account Closure",
    accountClosureDescription: "Account Closure provides a permanent access restriction to your account if you feel you need a break, or you just want to stop using our services.",
    closeAccount: "Close Account",
    modal: "Are you sure you want to close your account?",
    accountClosureCancel: "No",
    accountClosureConfirm: "Yes"
  }
};
function ie(o) {
  K(o, "svelte-1qi2pir", '.skeletonContainerClosure .skeletonWrapper{animation:fadeIn ease 0.3s;display:flex;flex-wrap:wrap;gap:8px}.skeletonContainerClosure .skeletonWrapper .skeletonNotification{width:100%}@keyframes fadeIn{0%{opacity:0.01}1%{opacity:0}50%{opacity:0}100%{opacity:1}}.AccountClosureWrapper{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));background-color:var(--emw--pam-color-bg, var(--emw--background-color, #F1F1F1));border-radius:var(--emw--border-radius-medium, 10px);padding:50px;height:100vh}.AccountClosureWrapper.AccountClosureWrapperMobile{padding:20px 15px;max-width:unset;border-radius:0}.MenuReturnButton{color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));display:inline-flex;align-items:center;column-gap:10px;margin-bottom:10px}.MenuReturnButton svg .aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E))}.AccountClosureTitle{font-size:26px;color:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));font-weight:var(--emw--font-weight-normal, 400)}.AccountClosureTitleMobile{font-size:var(--emw--font-size-large, 20px)}.AccountClosureTitleNone{display:none}.AccountClosureDescription{color:var(--emw--color-gray-300, #58586B);line-height:24px}.AccountClosureDescription.AccountClosureDescriptionMobile{font-size:var(--emw--font-size-small, 14px);line-height:18px}.AccountClosureActionButtons{display:grid;grid-column-gap:10px;grid-template-rows:auto;grid-template-columns:1fr;margin-top:20px;width:50%;color:var(--emw--button-typography, var(--emw--button-text-color, #FFFFFF))}.AccountClosureActionButtons.AccountClosureActionButtonsMobile{width:100%;grid-template-columns:1fr}.AccountClosureSave{background:var(--emw--color-primary, #23B04E);border-radius:var(--emw--button-border-radius, 10px);padding:13px 0;color:var(--emw--button-typography, var(--emw--button-text-color, #FFFFFF));width:100%;max-width:400px;min-width:200px;display:flex;align-items:center;justify-content:center;font-size:var(--emw--font-size-medium, 16px);text-transform:uppercase;transition-duration:0.3s;box-sizing:border-box;cursor:pointer;border:none}.AccountClosureSave:hover{filter:brightness(0.9)}.AccountClosureSave.AccountClosureSaveMobile{width:100%;padding:10px 0;font-size:var(--emw--font-size-small, 14px);grid-template-columns:1fr}.ModalWrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:rgba(0, 0, 0, 0.7);display:flex;justify-content:center;align-items:center;z-index:300}.ModalWrapper .ModalContent{position:relative;background:var(--emw--color-primary, #23B04E);padding:30px;background-clip:padding-box;border-radius:var(--emw--border-radius-medium, 10px)}.ModalWrapper .ModalContent::before{content:"";position:absolute;top:-6px;left:-8px;width:103%;height:105%;z-index:-1;opacity:0.5;border-radius:inherit;filter:blur(6px)}.ModalWrapper .ModalContent::after{position:absolute;top:-4px;bottom:-4px;left:-4px;right:-4px;content:"";z-index:-1;border-radius:var(--emw--border-radius-medium, 10px)}.ModalWrapper .ModalBody{background:transparent;padding:30px;text-align:center}.ModalWrapper .ModalBody .ModalText{font-size:var(--emw--font-size-x-large, 24px);margin-bottom:40px;color:white}.ModalWrapper .ModalBody .ModalButtons{justify-content:center;display:flex;gap:36px}.ModalWrapper .ModalBody .ModalCancel,.ModalWrapper .ModalBody .ModalConfirm{background:transparent;border:1px solid var(--emw--color-white, #FFFFFF);color:var(--emw--color-white, #FFFFFF);cursor:pointer;border-radius:var(--emw--button-border-radius, 10px);width:200px;height:42px;font-size:var(--emw--font-size-medium, 16px);text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.ModalWrapper .ModalBody .ModalCancel:hover,.ModalWrapper .ModalBody .ModalConfirm:hover{filter:brightness(0.9)}.ModalWrapper.ModalWrapperMobile .ModalContent{padding:20px;width:80vw;border-top:none}.ModalWrapper.ModalWrapperMobile .ModalBody{padding:0;background:transparent}.ModalWrapper.ModalWrapperMobile .ModalText{font-size:var(--emw--font-size-medium, 16px)}.ModalWrapper.ModalWrapperMobile .ModalButtons{gap:10px}.ModalWrapper.ModalWrapperMobile .ModalCancel,.ModalWrapper.ModalWrapperMobile .ModalConfirm{height:40px;width:50%;font-size:var(--emw--font-size-small, 14px)}');
}
function ce(o, e, t) {
  const l = o.slice();
  return l[22] = e[t], l;
}
function ue(o) {
  let e, t, l, n, r, m, d, u, y, f, b = (
    /*$_*/
    o[3]("titleAccountClosure") + ""
  ), A, i, k;
  return {
    c() {
      e = C("div"), t = F("svg"), l = F("defs"), n = F("style"), r = W(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = F("g"), d = F("g"), u = F("path"), y = z(), f = C("h2"), A = W(b), s(u, "class", "aaa"), s(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), s(u, "transform", "translate(15 15) rotate(180)"), s(d, "transform", "translate(20 158)"), s(m, "transform", "translate(-20 -158)"), s(t, "xmlns", "http://www.w3.org/2000/svg"), s(t, "width", "15"), s(t, "height", "15"), s(t, "viewBox", "0 0 15 15"), s(f, "class", "AccountClosureTitleMobile"), s(f, "part", "AccountClosureTitleMobile"), s(e, "class", "MenuReturnButton"), s(e, "part", "MenuReturnButton");
    },
    m(w, p) {
      j(w, e, p), a(e, t), a(t, l), a(l, n), a(n, r), a(t, m), a(m, d), a(d, u), a(e, y), a(e, f), a(f, A), i || (k = N(
        e,
        "click",
        /*click_handler*/
        o[13]
      ), i = !0);
    },
    p(w, p) {
      p & /*$_*/
      8 && b !== (b = /*$_*/
      w[3]("titleAccountClosure") + "") && S(A, b);
    },
    d(w) {
      w && D(e), i = !1, k();
    }
  };
}
function de(o) {
  let e, t, l = (
    /*$_*/
    o[3]("accountClosureDescription") + ""
  );
  return {
    c() {
      e = C("div"), t = C("p"), s(e, "class", "AccountClosureDescription " + /*isMobile*/
      (o[4] ? "AccountClosureDescriptionMobile" : ""));
    },
    m(n, r) {
      j(n, e, r), a(e, t), t.innerHTML = l;
    },
    p(n, r) {
      r & /*$_*/
      8 && l !== (l = /*$_*/
      n[3]("accountClosureDescription") + "") && (t.innerHTML = l);
    },
    d(n) {
      n && D(e);
    }
  };
}
function pe(o) {
  let e, t, l = te({ length: 4 }), n = [];
  for (let r = 0; r < l.length; r += 1)
    n[r] = me(ce(o, l, r));
  return {
    c() {
      e = C("div"), t = C("div");
      for (let r = 0; r < n.length; r += 1)
        n[r].c();
      s(t, "class", "skeletonWrapper"), s(e, "class", "skeletonContainerClosure");
    },
    m(r, m) {
      j(r, e, m), a(e, t);
      for (let d = 0; d < n.length; d += 1)
        n[d] && n[d].m(t, null);
    },
    p: T,
    d(r) {
      r && D(e), oe(n, r);
    }
  };
}
function me(o) {
  let e;
  return {
    c() {
      e = C("div"), e.innerHTML = '<ui-skeleton structure="rectangle" width="auto" height="24px"></ui-skeleton> ', s(e, "class", "skeletonNotification");
    },
    m(t, l) {
      j(t, e, l);
    },
    p: T,
    d(t) {
      t && D(e);
    }
  };
}
function O(o) {
  let e, t, l, n, r = (
    /*$_*/
    o[3]("modal") + ""
  ), m, d, u, y, f = (
    /*$_*/
    o[3]("accountClosureCancel") + ""
  ), b, A, i, k = (
    /*$_*/
    o[3]("accountClosureConfirm") + ""
  ), w, p, _;
  return {
    c() {
      e = C("div"), t = C("div"), l = C("div"), n = C("p"), m = W(r), d = z(), u = C("div"), y = C("button"), b = W(f), A = z(), i = C("button"), w = W(k), s(n, "class", "ModalText"), s(y, "class", "ModalCancel"), s(i, "class", "ModalConfirm"), s(u, "class", "ModalButtons"), s(l, "class", "ModalBody"), s(t, "class", "ModalContent"), s(e, "class", "ModalWrapper " + /*isMobile*/
      (o[4] ? "ModalWrapperMobile" : ""));
    },
    m(M, g) {
      j(M, e, g), a(e, t), a(t, l), a(l, n), a(n, m), a(l, d), a(l, u), a(u, y), a(y, b), a(u, A), a(u, i), a(i, w), p || (_ = [
        N(
          y,
          "click",
          /*click_handler_2*/
          o[15]
        ),
        N(
          i,
          "click",
          /*click_handler_3*/
          o[16]
        )
      ], p = !0);
    },
    p(M, g) {
      g & /*$_*/
      8 && r !== (r = /*$_*/
      M[3]("modal") + "") && S(m, r), g & /*$_*/
      8 && f !== (f = /*$_*/
      M[3]("accountClosureCancel") + "") && S(b, f), g & /*$_*/
      8 && k !== (k = /*$_*/
      M[3]("accountClosureConfirm") + "") && S(w, k);
    },
    d(M) {
      M && D(e), p = !1, $(_);
    }
  };
}
function fe(o) {
  let e, t, l, n, r = (
    /*$_*/
    o[3]("titleAccountClosure") + ""
  ), m, d, u, y, f, b = (
    /*$_*/
    o[3]("closeAccount") + ""
  ), A, i, k, w, p = (
    /*isMobile*/
    o[4] && ue(o)
  );
  function _(v, x) {
    return (
      /*skeletonLoading*/
      v[1] ? pe : de
    );
  }
  let M = _(o), g = M(o), h = (
    /*closureModal*/
    o[2] && O(o)
  );
  return {
    c() {
      e = C("div"), t = C("div"), p && p.c(), l = z(), n = C("h2"), m = W(r), d = z(), g.c(), u = z(), y = C("div"), f = C("button"), A = W(b), i = z(), h && h.c(), s(n, "class", "AccountClosureTitle " + /*isMobile*/
      (o[4] ? "AccountClosureTitleNone" : "")), s(f, "class", "AccountClosureSave " + /*isMobile*/
      (o[4] ? "AccountClosureSaveMobile" : "")), s(y, "class", "AccountClosureActionButtons " + /*isMobile*/
      (o[4] ? "AccountClosureActionButtonsMobile" : "")), s(t, "class", "AccountClosureWrapper " + /*isMobile*/
      (o[4] ? "AccountClosureWrapperMobile" : ""));
    },
    m(v, x) {
      j(v, e, x), a(e, t), p && p.m(t, null), a(t, l), a(t, n), a(n, m), a(t, d), g.m(t, null), a(t, u), a(t, y), a(y, f), a(f, A), a(e, i), h && h.m(e, null), o[17](e), k || (w = N(
        f,
        "click",
        /*click_handler_1*/
        o[14]
      ), k = !0);
    },
    p(v, [x]) {
      /*isMobile*/
      v[4] && p.p(v, x), x & /*$_*/
      8 && r !== (r = /*$_*/
      v[3]("titleAccountClosure") + "") && S(m, r), M === (M = _(v)) && g ? g.p(v, x) : (g.d(1), g = M(v), g && (g.c(), g.m(t, u))), x & /*$_*/
      8 && b !== (b = /*$_*/
      v[3]("closeAccount") + "") && S(A, b), /*closureModal*/
      v[2] ? h ? h.p(v, x) : (h = O(v), h.c(), h.m(e, null)) : h && (h.d(1), h = null);
    },
    i: T,
    o: T,
    d(v) {
      v && D(e), p && p.d(), g.d(), h && h.d(), o[17](null), k = !1, w();
    }
  };
}
function Ce(o, e, t) {
  let l;
  V(o, G, (c) => t(3, l = c));
  let { lang: n = "en" } = e, { clientstyling: r = "" } = e, { clientstylingurl: m = "" } = e, { mbsource: d } = e, { translationurl: u = "" } = e, y = window.navigator.userAgent, f = Q(y) !== "PC", b = !1, A = !1, i, k;
  const w = () => {
    t(1, b = !0), fetch(u).then((B) => B.json()).then((B) => {
      Object.keys(B).forEach((q) => {
        H(q, B[q]);
      });
    }).catch((B) => {
      console.log(B);
    }).finally(() => {
      t(1, b = !1);
    });
  };
  Object.keys(L).forEach((c) => {
    H(c, L[c]);
  });
  const p = (c) => {
    t(2, A = c), c === !0 ? window.postMessage({ type: "DisableScroll" }, window.location.href) : window.postMessage({ type: "EnableScroll" }, window.location.href);
  }, _ = () => {
    p(!1), window.postMessage({ type: "AccountClosure" }, window.location.href);
  }, M = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: f
      },
      window.location.href
    );
  }, g = () => {
    se(n);
  };
  X(() => () => {
  });
  const h = () => M(), v = () => p(!0), x = () => p(!1), R = () => _();
  function I(c) {
    ee[c ? "unshift" : "push"](() => {
      i = c, t(0, i);
    });
  }
  return o.$$set = (c) => {
    "lang" in c && t(8, n = c.lang), "clientstyling" in c && t(9, r = c.clientstyling), "clientstylingurl" in c && t(10, m = c.clientstylingurl), "mbsource" in c && t(11, d = c.mbsource), "translationurl" in c && t(12, u = c.translationurl);
  }, o.$$.update = () => {
    o.$$.dirty & /*lang*/
    256 && n && g(), o.$$.dirty & /*clientstyling, customStylingContainer*/
    513 && r && i && re(i, r), o.$$.dirty & /*clientstylingurl, customStylingContainer*/
    1025 && m && i && ae(i, m), o.$$.dirty & /*mbsource, customStylingContainer*/
    2049 && d && i && ne(i, `${d}.Style`, k), o.$$.dirty & /*translationurl*/
    4096 && u && w();
  }, [
    i,
    b,
    A,
    l,
    f,
    p,
    _,
    M,
    n,
    r,
    m,
    d,
    u,
    h,
    v,
    x,
    R,
    I
  ];
}
class ge extends Y {
  constructor(e) {
    super(), U(
      this,
      e,
      Ce,
      fe,
      J,
      {
        lang: 8,
        clientstyling: 9,
        clientstylingurl: 10,
        mbsource: 11,
        translationurl: 12
      },
      ie
    );
  }
  get lang() {
    return this.$$.ctx[8];
  }
  set lang(e) {
    this.$$set({ lang: e }), E();
  }
  get clientstyling() {
    return this.$$.ctx[9];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), E();
  }
  get clientstylingurl() {
    return this.$$.ctx[10];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), E();
  }
  get mbsource() {
    return this.$$.ctx[11];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), E();
  }
  get translationurl() {
    return this.$$.ctx[12];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), E();
  }
}
le(ge, { lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  ge as default
};
