import { a as K, $ as F, S as Q, i as V, s as X, f as g, b as Y, J as Z, d as S, r as $, K as ee, L as te, M as ne, N as oe, O as ae, c as E, h as L, j as d, l as j, k as _, m as B, t as O, e as i, p as re, q as ie, u as le, n as se, v as N, w as ce, x as me, y as fe, z as de, A as ue, B as be } from "./GeneralLogout-CCZ-t51N.js";
function W(n, e) {
  K(n, e);
}
function ge(n) {
  F.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 he(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 Ce = (n) => ({}), q = (n) => ({});
function xe(n) {
  let e, t;
  return {
    c() {
      e = N("svg"), t = N("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, s) {
      L(r, e, s), d(e, t);
    },
    p: se,
    d(r) {
      r && S(e);
    }
  };
}
function H(n) {
  let e, t, r;
  return {
    c() {
      e = _("div"), t = _("h2"), r = O(
        /*modaltitle*/
        n[1]
      ), i(e, "class", "GeneralConfirmationTitle");
    },
    m(s, u) {
      L(s, e, u), d(e, t), d(t, r);
    },
    p(s, u) {
      u & /*modaltitle*/
      2 && E(
        r,
        /*modaltitle*/
        s[1]
      );
    },
    d(s) {
      s && S(e);
    }
  };
}
function R(n) {
  let e, t = (
    /*$_*/
    n[4]("cancel") + ""
  ), r, s, u;
  return {
    c() {
      e = _("button"), r = O(t), i(e, "class", "GeneralCancelButton");
    },
    m(f, v) {
      L(f, e, v), d(e, r), s || (u = j(
        e,
        "click",
        /*click_handler*/
        n[18]
      ), s = !0);
    },
    p(f, v) {
      v & /*$_*/
      16 && t !== (t = /*$_*/
      f[4]("cancel") + "") && E(r, t);
    },
    d(f) {
      f && S(e), s = !1, u();
    }
  };
}
function pe(n) {
  let e, t, r, s, u, f, v, h, y, C, w = (
    /*$_*/
    n[4]("confirm") + ""
  ), k, b, G, A;
  const M = (
    /*#slots*/
    n[17].close
  ), c = Z(
    M,
    n,
    /*$$scope*/
    n[16],
    q
  ), x = c || xe();
  let m = (
    /*modaltitle*/
    n[1] && H(n)
  ), l = (
    /*hascancelbutton*/
    n[2] && R(n)
  );
  return {
    c() {
      e = _("div"), t = _("div"), r = _("span"), x && x.c(), s = B(), m && m.c(), u = B(), f = _("div"), v = B(), h = _("div"), l && l.c(), y = B(), C = _("button"), k = O(w), i(r, "class", "ModalCloseBtn"), i(r, "role", "button"), i(f, "class", "GeneralConfirmationContent"), i(C, "class", "GeneralConfirmButton"), i(h, "class", "GeneralConfirmationControlArea " + /*isMobile*/
      (n[5] ? "GeneralConfirmationControlAreaMobile" : "")), i(t, "class", "GeneralConfirmationContainer " + /*isMobile*/
      (n[5] ? "GeneralConfirmationContainerMobile" : "")), i(e, "class", "GeneralConfirmationWrapper " + /*isMobile*/
      (n[5] ? "GeneralConfirmationMobileWrapper" : ""));
    },
    m(a, p) {
      L(a, e, p), d(e, t), d(t, r), x && x.m(r, null), d(t, s), m && m.m(t, null), d(t, u), d(t, f), f.innerHTML = /*modaltext*/
      n[0], d(t, v), d(t, h), l && l.m(h, null), d(h, y), d(h, C), d(C, k), n[20](e), b = !0, G || (A = [
        j(
          r,
          "click",
          /*close*/
          n[6]
        ),
        j(
          C,
          "click",
          /*click_handler_1*/
          n[19]
        )
      ], G = !0);
    },
    p(a, [p]) {
      c && c.p && (!b || p & /*$$scope*/
      65536) && ne(
        c,
        M,
        a,
        /*$$scope*/
        a[16],
        b ? ae(
          M,
          /*$$scope*/
          a[16],
          p,
          Ce
        ) : oe(
          /*$$scope*/
          a[16]
        ),
        q
      ), /*modaltitle*/
      a[1] ? m ? m.p(a, p) : (m = H(a), m.c(), m.m(t, u)) : m && (m.d(1), m = null), (!b || p & /*modaltext*/
      1) && (f.innerHTML = /*modaltext*/
      a[0]), /*hascancelbutton*/
      a[2] ? l ? l.p(a, p) : (l = R(a), l.c(), l.m(h, y)) : l && (l.d(1), l = null), (!b || p & /*$_*/
      16) && w !== (w = /*$_*/
      a[4]("confirm") + "") && E(k, w);
    },
    i(a) {
      b || (te(x, a), b = !0);
    },
    o(a) {
      ee(x, a), b = !1;
    },
    d(a) {
      a && S(e), x && x.d(a), m && m.d(), l && l.d(), n[20](null), G = !1, $(A);
    }
  };
}
function ve(n, e, t) {
  let r;
  re(n, be, (o) => t(4, r = o));
  let { $$slots: s = {}, $$scope: u } = e, { modaltext: f = "Are you sure that you want to perform this action?" } = e, { modaltitle: v = "" } = e, { hascancelbutton: h = !1 } = e, { modalconfirmevent: y = "" } = e, { modalcancelevent: C = "" } = e, { modalconfirmdata: w = {} } = e, { lang: k = "en" } = e, { clientstyling: b = "" } = e, { clientstylingurl: G = "" } = e, { translationurl: A = "" } = e, { mbsource: M } = e, c, x = window.navigator.userAgent, m = ie(x) !== "PC";
  const l = () => {
    window.postMessage({ type: "ModalClosed" }, window.location.href);
  }, a = (o) => {
    o === "confirm" && y && c.dispatchEvent(new CustomEvent(
      y,
      {
        detail: w,
        // payload
        bubbles: !0,
        composed: !0
      }
    )), o === "cancel" && C && c.dispatchEvent(new CustomEvent(C, { bubbles: !0, composed: !0 })), l();
  }, p = () => {
    fetch(A).then((z) => z.json()).then((z) => {
      Object.keys(z).forEach((T) => {
        W(T, z[T]);
      });
    }).catch((z) => {
      console.log(z);
    });
  };
  Object.keys(P).forEach((o) => {
    W(o, P[o]);
  });
  const U = () => {
    ge(k);
  };
  le(() => () => {
  });
  const D = () => a("cancel"), I = () => a("confirm");
  function J(o) {
    ce[o ? "unshift" : "push"](() => {
      c = o, t(3, c);
    });
  }
  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, h = o.hascancelbutton), "modalconfirmevent" in o && t(8, y = o.modalconfirmevent), "modalcancelevent" in o && t(9, C = 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 && U(), n.$$.dirty & /*clientstyling, customStylingContainer*/
    4104 && b && c && me(c, b), n.$$.dirty & /*clientstylingurl, customStylingContainer*/
    8200 && G && c && fe(c, G), n.$$.dirty & /*mbsource, customStylingContainer*/
    32776 && M && c && de(c, `${M}.Style`), n.$$.dirty & /*translationurl*/
    16384 && A && p();
  }, [
    f,
    v,
    h,
    c,
    r,
    m,
    l,
    a,
    y,
    C,
    w,
    k,
    b,
    G,
    A,
    M,
    u,
    s,
    D,
    I,
    J
  ];
}
class _e extends Q {
  constructor(e) {
    super(), V(
      this,
      e,
      ve,
      pe,
      X,
      {
        modaltext: 0,
        modaltitle: 1,
        hascancelbutton: 2,
        modalconfirmevent: 8,
        modalcancelevent: 9,
        modalconfirmdata: 10,
        lang: 11,
        clientstyling: 12,
        clientstylingurl: 13,
        translationurl: 14,
        mbsource: 15
      },
      he
    );
  }
  get modaltext() {
    return this.$$.ctx[0];
  }
  set modaltext(e) {
    this.$$set({ modaltext: e }), g();
  }
  get modaltitle() {
    return this.$$.ctx[1];
  }
  set modaltitle(e) {
    this.$$set({ modaltitle: e }), g();
  }
  get hascancelbutton() {
    return this.$$.ctx[2];
  }
  set hascancelbutton(e) {
    this.$$set({ hascancelbutton: e }), g();
  }
  get modalconfirmevent() {
    return this.$$.ctx[8];
  }
  set modalconfirmevent(e) {
    this.$$set({ modalconfirmevent: e }), g();
  }
  get modalcancelevent() {
    return this.$$.ctx[9];
  }
  set modalcancelevent(e) {
    this.$$set({ modalcancelevent: e }), g();
  }
  get modalconfirmdata() {
    return this.$$.ctx[10];
  }
  set modalconfirmdata(e) {
    this.$$set({ modalconfirmdata: e }), g();
  }
  get lang() {
    return this.$$.ctx[11];
  }
  set lang(e) {
    this.$$set({ lang: e }), g();
  }
  get clientstyling() {
    return this.$$.ctx[12];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), g();
  }
  get clientstylingurl() {
    return this.$$.ctx[13];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), g();
  }
  get translationurl() {
    return this.$$.ctx[14];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), g();
  }
  get mbsource() {
    return this.$$.ctx[15];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), g();
  }
}
ue(_e, { modaltext: {}, modaltitle: {}, hascancelbutton: { type: "Boolean" }, modalconfirmevent: {}, modalcancelevent: {}, modalconfirmdata: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, mbsource: {} }, ["close"], [], !0);
export {
  _e as default
};
