import { a as Z, $ as P, S as Y, i as U, s as J, f as j, b as K, n as T, d as D, u as F, e as S, p as a, x as N, g as C, q as z, v as B, t as i, h as V, j as G, o as Q, y as E, w as X, k as $, l as ee, m as oe, B as te, C as re, D as ae, c as ne, A as le } from "./PlayerAccountController-BLu_m4ej.js";
import "../stencil/ui-skeleton-DNuG5l9W.js";
function H(t, e) {
  Z(t, e);
}
function ie(t) {
  P.set(t);
}
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 ce(t) {
  K(t, "svelte-1oeuewt", '.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:5%;padding:50px;max-width:760px}.AccountClosureWrapper.AccountClosureWrapperMobile{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: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-image:linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));border:2px solid var(--emw--button-border-color, #0E5924);border-radius:var(--emw--button-border-radius, 10px);padding:30px 0;color:var(--emw--button-typography, var(--emw--button-text-color, #FFFFFF));width:100%;height:50px;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}.AccountClosureSave.AccountClosureSaveMobile{width:100%;height:40px;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:100}.ModalWrapper .ModalContent{position:relative;background:linear-gradient(to right, var(--emw--color-primary-variant, #184026), var(--emw--color-secondary-variant, #013E5C));border:5px solid transparent;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;background:linear-gradient(to right, var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-secondary, #E98B0F) 80%, black 20%), #22B04E);opacity:0.5;border-radius:inherit;filter:blur(6px)}.ModalWrapper .ModalContent::after{position:absolute;top:-4px;bottom:-4px;left:-4px;right:-4px;background:linear-gradient(to right, color-mix(in srgb, var(--emw--color-primary-variant, #184026) 80%, white 10%), color-mix(in srgb, var(--emw--color-secondary-variant, #013E5C) 80%, white 10%));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{display:flex;gap:36px}.ModalWrapper .ModalBody .ModalCancel,.ModalWrapper .ModalBody .ModalConfirm{background:transparent;border:1px solid #BFCBC3;color:#BFCBC3;cursor:pointer;border-radius:var(--emw--button-border-radius, 10px);width:200px;height:50px;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 .ModalConfirm{background-color:var(--emw--color-primary, #22B04E);border:2px solid var(--emw--button-border-color, #063B17);border-radius:var(--emw--button-border-radius, 10px);color:var(--emw--button-typography, var(--emw--button-text-color, #FFFFFF))}.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 se(t, e, o) {
  const l = t.slice();
  return l[22] = e[o], l;
}
function ue(t) {
  let e, o, l, n, r, m, d, u, h, f, v = (
    /*$_*/
    t[3]("titleAccountClosure") + ""
  ), A, c, x;
  return {
    c() {
      e = C("div"), o = E("svg"), l = E("defs"), n = E("style"), r = B(".aaa{fill:var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));}"), m = E("g"), d = E("g"), u = E("path"), h = z(), f = C("h2"), A = B(v), i(u, "class", "aaa"), i(u, "d", "M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z"), i(u, "transform", "translate(15 15) rotate(180)"), i(d, "transform", "translate(20 158)"), i(m, "transform", "translate(-20 -158)"), i(o, "xmlns", "http://www.w3.org/2000/svg"), i(o, "width", "15"), i(o, "height", "15"), i(o, "viewBox", "0 0 15 15"), i(f, "class", "AccountClosureTitleMobile"), i(f, "part", "AccountClosureTitleMobile"), i(e, "class", "MenuReturnButton"), i(e, "part", "MenuReturnButton");
    },
    m(M, p) {
      S(M, e, p), a(e, o), a(o, l), a(l, n), a(n, r), a(o, m), a(m, d), a(d, u), a(e, h), a(e, f), a(f, A), c || (x = N(
        e,
        "click",
        /*click_handler*/
        t[13]
      ), c = !0);
    },
    p(M, p) {
      p & /*$_*/
      8 && v !== (v = /*$_*/
      M[3]("titleAccountClosure") + "") && F(A, v);
    },
    d(M) {
      M && D(e), c = !1, x();
    }
  };
}
function de(t) {
  let e, o, l = (
    /*$_*/
    t[3]("accountClosureDescription") + ""
  );
  return {
    c() {
      e = C("div"), o = C("p"), i(e, "class", "AccountClosureDescription " + /*isMobile*/
      (t[4] ? "AccountClosureDescriptionMobile" : ""));
    },
    m(n, r) {
      S(n, e, r), a(e, o), o.innerHTML = l;
    },
    p(n, r) {
      r & /*$_*/
      8 && l !== (l = /*$_*/
      n[3]("accountClosureDescription") + "") && (o.innerHTML = l);
    },
    d(n) {
      n && D(e);
    }
  };
}
function pe(t) {
  let e, o, l = ee({ length: 4 }), n = [];
  for (let r = 0; r < l.length; r += 1)
    n[r] = me(se(t, l, r));
  return {
    c() {
      e = C("div"), o = C("div");
      for (let r = 0; r < n.length; r += 1)
        n[r].c();
      i(o, "class", "skeletonWrapper"), i(e, "class", "skeletonContainerClosure");
    },
    m(r, m) {
      S(r, e, m), a(e, o);
      for (let d = 0; d < n.length; d += 1)
        n[d] && n[d].m(o, null);
    },
    p: T,
    d(r) {
      r && D(e), oe(n, r);
    }
  };
}
function me(t) {
  let e;
  return {
    c() {
      e = C("div"), e.innerHTML = '<ui-skeleton structure="rectangle" width="auto" height="24px"></ui-skeleton> ', i(e, "class", "skeletonNotification");
    },
    m(o, l) {
      S(o, e, l);
    },
    p: T,
    d(o) {
      o && D(e);
    }
  };
}
function O(t) {
  let e, o, l, n, r = (
    /*$_*/
    t[3]("modal") + ""
  ), m, d, u, h, f = (
    /*$_*/
    t[3]("accountClosureCancel") + ""
  ), v, A, c, x = (
    /*$_*/
    t[3]("accountClosureConfirm") + ""
  ), M, p, _;
  return {
    c() {
      e = C("div"), o = C("div"), l = C("div"), n = C("p"), m = B(r), d = z(), u = C("div"), h = C("button"), v = B(f), A = z(), c = C("button"), M = B(x), i(n, "class", "ModalText"), i(h, "class", "ModalCancel"), i(c, "class", "ModalConfirm"), i(u, "class", "ModalButtons"), i(l, "class", "ModalBody"), i(o, "class", "ModalContent"), i(e, "class", "ModalWrapper " + /*isMobile*/
      (t[4] ? "ModalWrapperMobile" : ""));
    },
    m(w, g) {
      S(w, e, g), a(e, o), a(o, l), a(l, n), a(n, m), a(l, d), a(l, u), a(u, h), a(h, v), a(u, A), a(u, c), a(c, M), p || (_ = [
        N(
          h,
          "click",
          /*click_handler_2*/
          t[15]
        ),
        N(
          c,
          "click",
          /*click_handler_3*/
          t[16]
        )
      ], p = !0);
    },
    p(w, g) {
      g & /*$_*/
      8 && r !== (r = /*$_*/
      w[3]("modal") + "") && F(m, r), g & /*$_*/
      8 && f !== (f = /*$_*/
      w[3]("accountClosureCancel") + "") && F(v, f), g & /*$_*/
      8 && x !== (x = /*$_*/
      w[3]("accountClosureConfirm") + "") && F(M, x);
    },
    d(w) {
      w && D(e), p = !1, X(_);
    }
  };
}
function fe(t) {
  let e, o, l, n, r = (
    /*$_*/
    t[3]("titleAccountClosure") + ""
  ), m, d, u, h, f, v = (
    /*$_*/
    t[3]("closeAccount") + ""
  ), A, c, x, M, p = (
    /*isMobile*/
    t[4] && ue(t)
  );
  function _(b, k) {
    return (
      /*skeletonLoading*/
      b[1] ? pe : de
    );
  }
  let w = _(t), g = w(t), y = (
    /*closureModal*/
    t[2] && O(t)
  );
  return {
    c() {
      e = C("div"), o = C("div"), p && p.c(), l = z(), n = C("h2"), m = B(r), d = z(), g.c(), u = z(), h = C("div"), f = C("button"), A = B(v), c = z(), y && y.c(), i(n, "class", "AccountClosureTitle " + /*isMobile*/
      (t[4] ? "AccountClosureTitleNone" : "")), i(f, "class", "AccountClosureSave " + /*isMobile*/
      (t[4] ? "AccountClosureSaveMobile" : "")), i(h, "class", "AccountClosureActionButtons " + /*isMobile*/
      (t[4] ? "AccountClosureActionButtonsMobile" : "")), i(o, "class", "AccountClosureWrapper " + /*isMobile*/
      (t[4] ? "AccountClosureWrapperMobile" : ""));
    },
    m(b, k) {
      S(b, e, k), a(e, o), p && p.m(o, null), a(o, l), a(o, n), a(n, m), a(o, d), g.m(o, null), a(o, u), a(o, h), a(h, f), a(f, A), a(e, c), y && y.m(e, null), t[17](e), x || (M = N(
        f,
        "click",
        /*click_handler_1*/
        t[14]
      ), x = !0);
    },
    p(b, [k]) {
      /*isMobile*/
      b[4] && p.p(b, k), k & /*$_*/
      8 && r !== (r = /*$_*/
      b[3]("titleAccountClosure") + "") && F(m, r), w === (w = _(b)) && g ? g.p(b, k) : (g.d(1), g = w(b), g && (g.c(), g.m(o, u))), k & /*$_*/
      8 && v !== (v = /*$_*/
      b[3]("closeAccount") + "") && F(A, v), /*closureModal*/
      b[2] ? y ? y.p(b, k) : (y = O(b), y.c(), y.m(e, null)) : y && (y.d(1), y = null);
    },
    i: T,
    o: T,
    d(b) {
      b && D(e), p && p.d(), g.d(), y && y.d(), t[17](null), x = !1, M();
    }
  };
}
function Ce(t, e, o) {
  let l;
  V(t, le, (s) => o(3, l = s));
  let { lang: n = "en" } = e, { clientstyling: r = "" } = e, { clientstylingurl: m = "" } = e, { mbsource: d } = e, { translationurl: u = "" } = e, h = window.navigator.userAgent, f = G(h) !== "PC", v = !1, A = !1, c, x;
  const M = () => {
    o(1, v = !0), fetch(u).then((W) => W.json()).then((W) => {
      Object.keys(W).forEach((q) => {
        H(q, W[q]);
      });
    }).catch((W) => {
      console.log(W);
    }).finally(() => {
      o(1, v = !1);
    });
  };
  Object.keys(L).forEach((s) => {
    H(s, L[s]);
  });
  const p = (s) => {
    o(2, A = s), s === !0 ? window.postMessage({ type: "DisableScroll" }, window.location.href) : window.postMessage({ type: "EnableScroll" }, window.location.href);
  }, _ = () => {
    p(!1), window.postMessage({ type: "AccountClosure" }, window.location.href);
  }, w = () => {
    window.postMessage(
      {
        type: "PlayerAccountMenuActive",
        isMobile: f
      },
      window.location.href
    );
  }, g = () => {
    ie(n);
  };
  Q(() => () => {
  });
  const y = () => w(), b = () => p(!0), k = () => p(!1), R = () => _();
  function I(s) {
    $[s ? "unshift" : "push"](() => {
      c = s, o(0, c);
    });
  }
  return t.$$set = (s) => {
    "lang" in s && o(8, n = s.lang), "clientstyling" in s && o(9, r = s.clientstyling), "clientstylingurl" in s && o(10, m = s.clientstylingurl), "mbsource" in s && o(11, d = s.mbsource), "translationurl" in s && o(12, u = s.translationurl);
  }, t.$$.update = () => {
    t.$$.dirty & /*lang*/
    256 && n && g(), t.$$.dirty & /*clientstyling, customStylingContainer*/
    513 && r && c && te(c, r), t.$$.dirty & /*clientstylingurl, customStylingContainer*/
    1025 && m && c && re(c, m), t.$$.dirty & /*mbsource, customStylingContainer*/
    2049 && d && c && ae(c, `${d}.Style`, x), t.$$.dirty & /*translationurl*/
    4096 && u && M();
  }, [
    c,
    v,
    A,
    l,
    f,
    p,
    _,
    w,
    n,
    r,
    m,
    d,
    u,
    y,
    b,
    k,
    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
      },
      ce
    );
  }
  get lang() {
    return this.$$.ctx[8];
  }
  set lang(e) {
    this.$$set({ lang: e }), j();
  }
  get clientstyling() {
    return this.$$.ctx[9];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), j();
  }
  get clientstylingurl() {
    return this.$$.ctx[10];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), j();
  }
  get mbsource() {
    return this.$$.ctx[11];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), j();
  }
  get translationurl() {
    return this.$$.ctx[12];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), j();
  }
}
ne(ge, { lang: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  ge as default
};
