import { a as F, $ as J, S as K, i as Q, s as X, f as h, b as Y, Z as $, d as S, v as ee, U as te, V as ne, _ as oe, a0 as ae, a1 as re, t as E, c as j, m as d, w as L, e as _, p as B, u as T, r as i, g as ie, h as le, o as se, j as ce, n as me, x as W, z as fe, A as de, B as ue, C as be, D as ge } from "./PlayerAccountController-DQUfjs7n.js";
function N(n, e) {
  F(n, e);
}
function he(n) {
  J.set(n);
}
const P = {
  en: {
    cancel: "Cancel",
    confirm: "Confirm"
  },
  fr: {
    cancel: "Annuler",
    confirm: "Confirmer"
  },
  ro: {
    cancel: "Anulează",
    confirm: "Confirmă"
  },
  es: {
    cancel: "Cancelar",
    confirm: "Confirmar"
  },
  pt: {
    cancel: "Cancelar",
    confirm: "Confirmar"
  },
  "zh-hk": {
    cancel: "取消",
    confirm: "確認"
  },
  hr: {
    cancel: "Otkaži",
    confirm: "Potvrdi"
  },
  "pt-br": {
    cancel: "Cancelar",
    confirm: "confirme"
  },
  "es-mx": {
    cancel: "Cancelar",
    confirm: "Confirmar"
  },
  tr: {
    cancel: "İptal etmek",
    confirm: "Onaylamak"
  },
  "en-us": {
    cancel: "Cancel",
    confirm: "Confirm"
  }
};
function Ce(n) {
  Y(n, "svelte-8g0wf4", '*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}.GeneralConfirmationWrapper{position:fixed;top:0;right:0;bottom:0;left:0;background-color:var(--emw--color-background, rgba(0, 0, 0, 0.7));display:flex;justify-content:center;align-items:center;z-index:300;color:var(--emw--color-typography, #ffffff)}.GeneralConfirmationTitle{margin-bottom:20px}.GeneralConfirmationContainer{position:relative;background:linear-gradient(to right, var(--emw--color-primary-variant, #184026), var(--emw--color-secondary-variant, #013e5c));border:5px solid transparent;padding:60px 30px 30px;background-clip:padding-box;border-radius:var(--emw--border-radius-medium, 10px);text-align:center}.GeneralConfirmationContainer::before{content:"";position:absolute;top:-4px;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)}.GeneralConfirmationContainer::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)}.GeneralConfirmationContainerMobile{padding:40px;max-width:330px}.GeneralConfirmationContainerMobile .GeneralConfirmationControlAreaMobile .GeneralCancelButton,.GeneralConfirmationContainerMobile .GeneralConfirmationControlAreaMobile .GeneralConfirmButton{width:120px;height:auto;font-size:var(--emw--font-size-x-small, 12px)}.GeneralConfirmationContent{font-size:var(--emw--font-size-medium, 18px);font-weight:300}.GeneralConfirmationControlArea{display:flex;gap:10px;direction:ltr;margin-top:30px}.GeneralConfirmationControlArea .GeneralCancelButton,.GeneralConfirmationControlArea .GeneralConfirmButton{flex:1;background:transparent;border:1px solid var(--emw--color-gray-100, #bfcbc3);color:var(--emw--color-gray-100, #bfcbc3);cursor:pointer;border-radius:var(--emw--button-border-radius, 50px);width:200px;height:50px;font-size:var(--emw--font-size-small, 16px);text-transform:uppercase;text-align:center;transition-duration:0.3s;box-sizing:border-box;padding:10px}.GeneralConfirmationControlArea .GeneralConfirmButton{background-color:var(--emw--color-primary, #22b04e);border:2px solid var(--emw--button-border-color, #063b17);border-radius:var(--emw--button-border-radius, 50px);color:var(--emw--button-typography, var(--emw--button-text-color, #ffffff))}.ModalCloseBtn{position:absolute;display:flex;align-items:center;justify-content:center;top:5px;right:5px;padding:8px;border-radius:50%;cursor:pointer;transition:all 150ms ease-in-out}.ModalCloseBtn svg{width:35px;height:40px}.ModalCloseBtn:hover{background:rgba(255, 255, 255, 0.2)}.GeneralConfirmationMobileWrapper{border:none;padding:0}');
}
const pe = (n) => ({}), U = (n) => ({});
function xe(n) {
  let e, t;
  return {
    c() {
      e = W("svg"), t = W("path"), i(t, "stroke-linecap", "round"), i(t, "stroke-linejoin", "round"), i(t, "stroke-width", "2"), i(t, "d", "M6 18L18 6M6 6l12 12"), i(e, "class", "w-6 h-6"), i(e, "fill", "none"), i(e, "stroke", "currentColor"), i(e, "viewBox", "0 0 24 24"), i(e, "xmlns", "http://www.w3.org/2000/svg");
    },
    m(r, l) {
      j(r, e, l), d(e, t);
    },
    p: me,
    d(r) {
      r && S(e);
    }
  };
}
function D(n) {
  let e, t, r;
  return {
    c() {
      e = _("div"), t = _("h2"), r = T(
        /*modaltitle*/
        n[1]
      ), i(e, "class", "GeneralConfirmationTitle");
    },
    m(l, u) {
      j(l, e, u), d(e, t), d(t, r);
    },
    p(l, u) {
      u & /*modaltitle*/
      2 && E(
        r,
        /*modaltitle*/
        l[1]
      );
    },
    d(l) {
      l && S(e);
    }
  };
}
function H(n) {
  let e, t = (
    /*$_*/
    n[4]("cancel") + ""
  ), r, l, u;
  return {
    c() {
      e = _("button"), r = T(t), i(e, "class", "GeneralCancelButton");
    },
    m(f, v) {
      j(f, e, v), d(e, r), l || (u = L(
        e,
        "click",
        /*click_handler*/
        n[18]
      ), l = !0);
    },
    p(f, v) {
      v & /*$_*/
      16 && t !== (t = /*$_*/
      f[4]("cancel") + "") && E(r, t);
    },
    d(f) {
      f && S(e), l = !1, u();
    }
  };
}
function ve(n) {
  let e, t, r, l, u, f, v, C, y, p, w = (
    /*$_*/
    n[4]("confirm") + ""
  ), k, b, G, A;
  const M = (
    /*#slots*/
    n[17].close
  ), s = $(
    M,
    n,
    /*$$scope*/
    n[16],
    U
  ), x = s || xe();
  let c = (
    /*modaltitle*/
    n[1] && D(n)
  ), m = (
    /*hascancelbutton*/
    n[2] && H(n)
  );
  return {
    c() {
      e = _("div"), t = _("div"), r = _("span"), x && x.c(), l = B(), c && c.c(), u = B(), f = _("div"), v = B(), C = _("div"), m && m.c(), y = B(), p = _("button"), k = T(w), i(r, "class", "ModalCloseBtn"), i(r, "role", "button"), i(f, "class", "GeneralConfirmationContent"), i(p, "class", "GeneralConfirmButton"), i(C, "class", "GeneralConfirmationControlArea " + /*isMobile*/
      (n[5] ? "GeneralConfirmationControlAreaMobile" : "")), i(t, "class", "GeneralConfirmationContainer " + /*isMobile*/
      (n[5] ? "GeneralConfirmationContainerMobile" : "")), i(e, "class", "GeneralConfirmationWrapper " + /*isMobile*/
      (n[5] ? "GeneralConfirmationMobileWrapper" : ""));
    },
    m(a, g) {
      j(a, e, g), d(e, t), d(t, r), x && x.m(r, null), d(t, l), c && c.m(t, null), d(t, u), d(t, f), f.innerHTML = /*modaltext*/
      n[0], d(t, v), d(t, C), m && m.m(C, null), d(C, y), d(C, p), d(p, k), n[20](e), b = !0, G || (A = [
        L(
          r,
          "click",
          /*close*/
          n[6]
        ),
        L(
          p,
          "click",
          /*click_handler_1*/
          n[19]
        )
      ], G = !0);
    },
    p(a, [g]) {
      s && s.p && (!b || g & /*$$scope*/
      65536) && oe(
        s,
        M,
        a,
        /*$$scope*/
        a[16],
        b ? re(
          M,
          /*$$scope*/
          a[16],
          g,
          pe
        ) : ae(
          /*$$scope*/
          a[16]
        ),
        U
      ), /*modaltitle*/
      a[1] ? c ? c.p(a, g) : (c = D(a), c.c(), c.m(t, u)) : c && (c.d(1), c = null), (!b || g & /*modaltext*/
      1) && (f.innerHTML = /*modaltext*/
      a[0]), /*hascancelbutton*/
      a[2] ? m ? m.p(a, g) : (m = H(a), m.c(), m.m(C, y)) : m && (m.d(1), m = null), (!b || g & /*$_*/
      16) && w !== (w = /*$_*/
      a[4]("confirm") + "") && E(k, w);
    },
    i(a) {
      b || (ne(x, a), b = !0);
    },
    o(a) {
      te(x, a), b = !1;
    },
    d(a) {
      a && S(e), x && x.d(a), c && c.d(), m && m.d(), n[20](null), G = !1, ee(A);
    }
  };
}
function _e(n, e, t) {
  let r;
  ie(n, ge, (o) => t(4, r = o));
  let { $$slots: l = {}, $$scope: u } = e, { modaltext: f = "Are you sure that you want to perform this action?" } = e, { modaltitle: v = "" } = e, { hascancelbutton: C = !1 } = e, { modalconfirmevent: y = "" } = e, { modalcancelevent: p = "" } = e, { modalconfirmdata: w = {} } = e, { lang: k = "en" } = e, { clientstyling: b = "" } = e, { clientstylingurl: G = "" } = e, { translationurl: A = "" } = e, { mbsource: M } = e, s, x, c = window.navigator.userAgent, m = le(c) !== "PC";
  const a = () => {
    window.postMessage({ type: "ModalClosed" }, window.location.href);
  }, g = (o) => {
    o === "confirm" && y && s.dispatchEvent(new CustomEvent(
      y,
      {
        detail: w,
        // payload
        bubbles: !0,
        composed: !0
      }
    )), o === "cancel" && p && s.dispatchEvent(new CustomEvent(p, { bubbles: !0, composed: !0 })), a();
  }, R = () => {
    fetch(A).then((z) => z.json()).then((z) => {
      Object.keys(z).forEach((O) => {
        N(O, z[O]);
      });
    }).catch((z) => {
      console.log(z);
    });
  };
  Object.keys(P).forEach((o) => {
    N(o, P[o]);
  });
  const q = () => {
    he(k);
  };
  se(() => () => {
  });
  const I = () => g("cancel"), V = () => g("confirm");
  function Z(o) {
    ce[o ? "unshift" : "push"](() => {
      s = o, t(3, s);
    });
  }
  return n.$$set = (o) => {
    "modaltext" in o && t(0, f = o.modaltext), "modaltitle" in o && t(1, v = o.modaltitle), "hascancelbutton" in o && t(2, C = o.hascancelbutton), "modalconfirmevent" in o && t(8, y = o.modalconfirmevent), "modalcancelevent" in o && t(9, p = o.modalcancelevent), "modalconfirmdata" in o && t(10, w = o.modalconfirmdata), "lang" in o && t(11, k = o.lang), "clientstyling" in o && t(12, b = o.clientstyling), "clientstylingurl" in o && t(13, G = o.clientstylingurl), "translationurl" in o && t(14, A = o.translationurl), "mbsource" in o && t(15, M = o.mbsource), "$$scope" in o && t(16, u = o.$$scope);
  }, n.$$.update = () => {
    n.$$.dirty & /*modaltext, lang*/
    2049 && f && k && q(), n.$$.dirty & /*clientstyling, customStylingContainer*/
    4104 && b && s && fe(s, b), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
    8200 && G && s && de(s, G), n.$$.dirty & /*mbsource, customStylingContainer*/
    32776 && M && s && ue(s, `${M}.Style`, x), n.$$.dirty & /*translationurl*/
    16384 && A && R();
  }, [
    f,
    v,
    C,
    s,
    r,
    m,
    a,
    g,
    y,
    p,
    w,
    k,
    b,
    G,
    A,
    M,
    u,
    l,
    I,
    V,
    Z
  ];
}
class ye extends K {
  constructor(e) {
    super(), Q(
      this,
      e,
      _e,
      ve,
      X,
      {
        modaltext: 0,
        modaltitle: 1,
        hascancelbutton: 2,
        modalconfirmevent: 8,
        modalcancelevent: 9,
        modalconfirmdata: 10,
        lang: 11,
        clientstyling: 12,
        clientstylingurl: 13,
        translationurl: 14,
        mbsource: 15
      },
      Ce
    );
  }
  get modaltext() {
    return this.$$.ctx[0];
  }
  set modaltext(e) {
    this.$$set({ modaltext: e }), h();
  }
  get modaltitle() {
    return this.$$.ctx[1];
  }
  set modaltitle(e) {
    this.$$set({ modaltitle: e }), h();
  }
  get hascancelbutton() {
    return this.$$.ctx[2];
  }
  set hascancelbutton(e) {
    this.$$set({ hascancelbutton: e }), h();
  }
  get modalconfirmevent() {
    return this.$$.ctx[8];
  }
  set modalconfirmevent(e) {
    this.$$set({ modalconfirmevent: e }), h();
  }
  get modalcancelevent() {
    return this.$$.ctx[9];
  }
  set modalcancelevent(e) {
    this.$$set({ modalcancelevent: e }), h();
  }
  get modalconfirmdata() {
    return this.$$.ctx[10];
  }
  set modalconfirmdata(e) {
    this.$$set({ modalconfirmdata: e }), h();
  }
  get lang() {
    return this.$$.ctx[11];
  }
  set lang(e) {
    this.$$set({ lang: e }), h();
  }
  get clientstyling() {
    return this.$$.ctx[12];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), h();
  }
  get clientstylingurl() {
    return this.$$.ctx[13];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), h();
  }
  get translationurl() {
    return this.$$.ctx[14];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), h();
  }
  get mbsource() {
    return this.$$.ctx[15];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), h();
  }
}
be(ye, { modaltext: {}, modaltitle: {}, hascancelbutton: { type: "Boolean" }, modalconfirmevent: {}, modalcancelevent: {}, modalconfirmdata: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {} }, ["close"], [], !0);
export {
  ye as default
};
