import { a as he, $ as Le, S as fe, i as ve, s as Te, f as A, b as Se, n as D, d as x, e as R, g as w, t as a, h as we, M as be, o as _e, k as q, u as I, p as g, v as E, l as Z, m as Ae, J as B, x as Pe, q as Q, y as J, a8 as $, B as ke, C as Ce, D as Ie, c as Ee, A as De } from "./PlayerAccountController-BLu_m4ej.js";
function ee(t, e) {
  he(t, e);
}
function xe(t) {
  Le.set(t);
}
const K = {
  en: {
    expandLimits: "LIMIT HISTORY",
    daily: "per day",
    weekly: "per week",
    monthly: "per month",
    loss: "Loss Limit",
    deposit: "Deposit Limit",
    wagering: "Wagering Limit",
    max: "Stake limit",
    wageringSports: "Stake Limit",
    loading: "Loading limits history...",
    error: "Something went wrong. Please try again.",
    limitRemoved: "Limit removed",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  de: {
    expandLimits: "LIMIT-VERLAUF",
    daily: "pro Tag",
    weekly: "pro Woche",
    monthly: "pro Monat",
    loss: "Verlustlimit",
    deposit: "Einzahlungslimit",
    wagering: "Einsatzlimit",
    max: "Einsatzlimit",
    loading: "Lädt ...",
    error: "Etwas ist schiefgelaufen. Bitte nochmal versuchen!",
    limitRemoved: "Limit entfernt",
    historyProductTypeSports: "Sport",
    historyProductTypeAll: "Alle",
    historyProductTypeCasino: "Slots",
    historyLimitTypeDeposit: "Einzahlungslimit",
    historyLimitTypeWagering: "Einsatzlimit",
    historyLimitTypeLoss: "Verlustlimit"
  },
  hr: {
    expandLimits: "POVIJEST OGRANIČENJA",
    daily: "dnevno",
    weekly: "tjedno",
    monthly: "mjesečno",
    loss: "Ograničenje gubitka",
    deposit: "Ograničenje uplate",
    wagering: "Ograničenje igranja",
    max: "Ograničenje uloga",
    loading: "Učitavanje povijesti ograničenja...",
    error: "Nešto je pošlo po zlu. Molimo vas pokušajte ponovno.",
    limitRemoved: "Ograničenje uklonjeno",
    historyProductTypeSports: "Sportovi",
    historyProductTypeAll: "Sve",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Ograničenje uplate",
    historyLimitTypeWagering: "Ograničenje igranja",
    historyLimitTypeLoss: "Ograničenje gubitka",
    wageringSports: "Ograničenje uloga"
  },
  sl: {
    expandLimits: "LIMIT ZGODOVINA",
    daily: "na dan",
    weekly: "na teden",
    monthly: "na mesec",
    loss: "Limit izgube",
    deposit: "Limit vplačila",
    wagering: "Limit na vložek",
    max: "Limit vložkov",
    loading: "Nalaga...",
    error: "Nekaj ​​je šlo narobe. Prosim poskusite ponovno.",
    limitRemoved: "Limit odstranjen",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  pl: {
    expandLimits: "HISTORIA LIMITU",
    daily: "na dzień",
    weekly: "na tydzień",
    monthly: "na miesiąc",
    loss: "Limit Strat",
    deposit: "Limit depozytów",
    wagering: "Limit Stawek",
    max: "Limit stawek",
    loading: "Ładowanie...",
    error: "Coś poszło nie tak. Proszę spróbuj ponownie.",
    limitRemoved: "Usunięty limit",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  "zh-hk": {
    expandLimits: "极限历史",
    daily: "每天",
    weekly: "每个星期",
    monthly: "每月",
    loss: "损失限额",
    deposit: "存款限额",
    wagering: "投注限额",
    loading: "加载请稍候...",
    error: "500 - 服务器错误",
    limitRemoved: "移除限制",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  fr: {
    expandLimits: "LIMITER L'HISTORIQUE",
    daily: "par jour",
    weekly: "par semaine",
    monthly: "par mois",
    loss: "Limite de perte",
    deposit: "Limite de dépôt",
    wagering: "Limite de mise",
    loading: "Chargement, veuillez patienter...",
    error: "500 - Erreur de serveur",
    limitRemoved: "Limite supprimée",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  ro: {
    expandLimits: "ISTORIC LIMITE",
    daily: "pe zi",
    weekly: "pe saptamana",
    monthly: "pe luna",
    loss: "Limita de pierdere",
    deposit: "Limita de incarcare",
    loading: "Se incarca, va rugam asteptati...",
    error: "500 - Eroare de server",
    limitRemoved: "Limita eliminata",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Limita depunere",
    historyLimitTypeWagering: "Limita pariere",
    historyLimitTypeLoss: "Limita pierdere"
  },
  es: {
    expandLimits: "HISTORIAL DE LÍMITES",
    daily: "por día",
    weekly: "por semana",
    monthly: "por mes",
    loss: "Límite de pérdida",
    deposit: "Límite de depósito",
    wagering: "Límite de apuestas",
    max: "Límite de apuesta",
    loading: "Cargando historial de límites…",
    error: "Algo salió mal. Por favor inténtalo de nuevo.",
    limitRemoved: "Límite eliminado",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  },
  "pt-br": {
    expandLimits: "HISTÓRICO DE LIMITE",
    daily: "Por dia",
    weekly: "por semana",
    monthly: "por mês",
    loss: "Limite de perda",
    deposit: "Limite de depósito",
    wagering: "Limite de Quantidade de Apostas",
    max: "Limite de apostas",
    wageringSports: "Limite de Quantidade de Apostas Esportivas",
    Loading: "Carregando histórico de limite...",
    error: "Algo deu errado. Por favor, tente novamente",
    limitRemoved: "Limite removido",
    historyProductTypeSports: "Esportes",
    historyProductTypeAll: "Todos",
    historyProductTypeCasino: "casino",
    historyLimitTypeDeposit: "Limite de depósito",
    historyLimitTypeWagering: "Limite de valor da aposta",
    historyLimitTypeLoss: "Limite de perda"
  },
  "es-mx": {
    expandLimits: "HISTORIAL DE LÍMITES",
    daily: "Por día",
    weekly: "por semana",
    monthly: "por mes",
    loss: "Límite de pérdidas",
    deposit: "Límite de depósito",
    wagering: "Límite de monto de apuestas",
    max: "Límite de apuestas",
    wageringSports: "Límite de monto de apuestas deportivas",
    Loading: "Cargando historial de límites...",
    error: "Algo salió mal. Por favor intente de nuevo",
    limitRemoved: "Límite removido",
    historyProductTypeSports: "Deportes",
    historyProductTypeAll: "Todo",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Límite de depósito",
    historyLimitTypeWagering: "Límite de monto de apuesta",
    historyLimitTypeLoss: "Límite de pérdida"
  },
  tr: {
    expandLimits: "SINIR GEÇMİŞİ",
    daily: "günlük",
    weekly: "haftada",
    monthly: "her ay",
    loss: "Kayıp Limiti",
    deposit: "Para Yatırma Limiti",
    wagering: "Bahis Limiti",
    max: "Bahis limiti",
    wageringSports: "Bahis Limiti",
    loading: "Limit geçmişi yükleniyor...",
    error: "Bir şeyler yanlış gitti. Lütfen tekrar deneyin.",
    limitRemoved: "Sınır kaldırıldı",
    historyProductTypeSports: "Spor Dalları",
    historyProductTypeAll: "Tüm",
    historyProductTypeCasino: "Kumarhane",
    historyLimitTypeDeposit: "Para Yatırma Limiti",
    historyLimitTypeWagering: "Bahis Limiti",
    historyLimitTypeLoss: "Kayıp Limiti"
  },
  "en-us": {
    expandLimits: "LIMIT HISTORY",
    daily: "per day",
    weekly: "per week",
    monthly: "per month",
    loss: "Loss Limit",
    deposit: "Deposit Limit",
    wagering: "Wagering Limit",
    max: "Stake limit",
    wageringSports: "Stake Limit",
    loading: "Loading limits history...",
    error: "Something went wrong. Please try again.",
    limitRemoved: "Limit removed",
    historyProductTypeSports: "Sports",
    historyProductTypeAll: "All",
    historyProductTypeCasino: "Casino",
    historyLimitTypeDeposit: "Deposit Limit",
    historyLimitTypeWagering: "Wagering Limit",
    historyLimitTypeLoss: "Loss Limit"
  }
};
function Re(t) {
  Se(t, "svelte-19ml84y", ':host{font-family:system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";font-size:1.3rem}.svelte-19ml84y.svelte-19ml84y,.svelte-19ml84y.svelte-19ml84y::before,.svelte-19ml84y.svelte-19ml84y::after{color:var(--emw--pam-typography, var(--emw--color-contrast, #07072A));margin:0;padding:0;list-style:none;text-decoration:none;outline:none;box-sizing:border-box}.player-account-gaming-limits-history-2.svelte-19ml84y.svelte-19ml84y{color:var(--emw--color-white, #FFFFFF)}button.svelte-19ml84y.svelte-19ml84y{font-size:1rem;border:0;padding:0}.ExpandButton.svelte-19ml84y.svelte-19ml84y{color:#999;display:flex;justify-content:center;align-items:center;margin-right:-14px;background:transparent}.ExpandButton.svelte-19ml84y svg.svelte-19ml84y{width:28px;height:auto;margin-left:-4px}.extended.svelte-19ml84y.svelte-19ml84y{transform:rotate(180deg)}.HistoryWrapper.svelte-19ml84y.svelte-19ml84y{display:flex;flex-direction:column}.HistoryWrapper.Desktop.svelte-19ml84y.svelte-19ml84y{width:320px;padding:0 12px;margin:12px auto}.hidden.svelte-19ml84y.svelte-19ml84y{display:none}.HistoryRow.svelte-19ml84y.svelte-19ml84y{padding:12px 0;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--emw--color-gray-100, #E6E6E6)}.GeneralLimitInformation.svelte-19ml84y.svelte-19ml84y{display:flex;flex-direction:column;gap:4px}.LimitType.svelte-19ml84y.svelte-19ml84y{font-size:1.3rem}.LimitAmountPeriod.svelte-19ml84y.svelte-19ml84y{color:#999}.LimitContainer.svelte-19ml84y.svelte-19ml84y{animation:svelte-19ml84y-animateEntry 0.7s ease-in}@keyframes svelte-19ml84y-animateEntry{0%{opacity:0;transform:translateX(500px)}100%{opacity:1;transform:translateX(0)}}');
}
function te(t, e, i) {
  const r = t.slice();
  return r[37] = e[i], r[38] = e, r[39] = i, r;
}
function Oe(t) {
  let e, i, r, o = (
    /*$_*/
    t[9]("expandLimits") + ""
  ), n, m, l, v, L, d, p, u, f, P = Z(
    /*lazyShowedHistoryArray*/
    t[7]
  ), T = [];
  for (let h = 0; h < P.length; h += 1)
    T[h] = ie(te(t, P, h));
  return {
    c() {
      e = w("div"), i = w("div"), r = w("button"), n = E(o), m = Q(), l = J("svg"), v = J("path"), L = J("path"), d = Q(), p = w("div");
      for (let h = 0; h < T.length; h += 1)
        T[h].c();
      a(v, "d", "M10.5 15l7.5 7.5 7.5-7.5z"), a(v, "class", "svelte-19ml84y"), a(L, "d", "M0 0h36v36h-36z"), a(L, "fill", "none"), a(L, "class", "svelte-19ml84y"), a(l, "class", "ExpandArrow svelte-19ml84y"), a(l, "xmlns", "http://www.w3.org/2000/svg"), a(l, "width", "36"), a(l, "height", "36"), a(l, "viewBox", "0 0 36 36"), a(l, "fill", "#999"), B(
        l,
        "extended",
        /*extended*/
        t[8]
      ), a(r, "class", "ExpandButton svelte-19ml84y"), a(p, "class", "HistoryDisplayArea svelte-19ml84y"), B(
        p,
        "hidden",
        /*hidden*/
        t[5]
      ), a(i, "class", "HistoryWrapper " + /*isDesktop*/
      (t[10] ? "Desktop" : "") + " svelte-19ml84y"), a(e, "class", "player-account-gaming-limits-history-2 svelte-19ml84y");
    },
    m(h, b) {
      R(h, e, b), g(e, i), g(i, r), g(r, n), g(r, m), g(r, l), g(l, v), g(l, L), g(i, d), g(i, p);
      for (let y = 0; y < T.length; y += 1)
        T[y] && T[y].m(p, null);
      u || (f = Pe(
        r,
        "click",
        /*toggleHistoryDisplayArea*/
        t[11]
      ), u = !0);
    },
    p(h, b) {
      if (b[0] & /*$_*/
      512 && o !== (o = /*$_*/
      h[9]("expandLimits") + "") && I(n, o), b[0] & /*extended*/
      256 && B(
        l,
        "extended",
        /*extended*/
        h[8]
      ), b[0] & /*numberofentries, limitContainer, lazyShowedHistoryArray, $_*/
      650) {
        P = Z(
          /*lazyShowedHistoryArray*/
          h[7]
        );
        let y;
        for (y = 0; y < P.length; y += 1) {
          const W = te(h, P, y);
          T[y] ? T[y].p(W, b) : (T[y] = ie(W), T[y].c(), T[y].m(p, null));
        }
        for (; y < T.length; y += 1)
          T[y].d(1);
        T.length = P.length;
      }
      b[0] & /*hidden*/
      32 && B(
        p,
        "hidden",
        /*hidden*/
        h[5]
      );
    },
    d(h) {
      h && x(e), Ae(T, h), u = !1, f();
    }
  };
}
function We(t) {
  return { c: D, m: D, p: D, d: D };
}
function je(t) {
  let e, i = (
    /*lang*/
    (t[0] ? (
      /*$_*/
      t[9]("error")
    ) : "500 Server Error") + ""
  ), r;
  return {
    c() {
      e = w("p"), r = E(i), a(e, "class", "svelte-19ml84y");
    },
    m(o, n) {
      R(o, e, n), g(e, r);
    },
    p(o, n) {
      n[0] & /*lang, $_*/
      513 && i !== (i = /*lang*/
      (o[0] ? (
        /*$_*/
        o[9]("error")
      ) : "500 Server Error") + "") && I(r, i);
    },
    d(o) {
      o && x(e);
    }
  };
}
function ze(t) {
  let e, i, r, o = (
    /*history*/
    t[37].type + ""
  ), n, m, l = (
    /*history*/
    t[37].amount + ""
  ), v, L, d = (
    /*history*/
    t[37].date + ""
  ), p;
  return {
    c() {
      e = w("div"), i = w("span"), r = w("span"), n = E(o), m = w("span"), v = E(l), L = w("span"), p = E(d), a(r, "class", "LimitType svelte-19ml84y"), a(m, "class", "LimitAmountPeriod svelte-19ml84y"), a(i, "class", "GeneralLimitInformation svelte-19ml84y"), a(L, "class", "DateLimitInformation svelte-19ml84y"), a(e, "class", "HistoryRow svelte-19ml84y");
    },
    m(u, f) {
      R(u, e, f), g(e, i), g(i, r), g(r, n), g(i, m), g(m, v), g(e, L), g(L, p);
    },
    p(u, f) {
      f[0] & /*lazyShowedHistoryArray*/
      128 && o !== (o = /*history*/
      u[37].type + "") && I(n, o), f[0] & /*lazyShowedHistoryArray*/
      128 && l !== (l = /*history*/
      u[37].amount + "") && I(v, l), f[0] & /*lazyShowedHistoryArray*/
      128 && d !== (d = /*history*/
      u[37].date + "") && I(p, d);
    },
    d(u) {
      u && x(e);
    }
  };
}
function Me(t) {
  let e, i, r, o = (
    /*history*/
    t[37].type + ""
  ), n, m, l = (
    /*$_*/
    t[9]("limitRemoved") + ""
  ), v, L, d = (
    /*history*/
    t[37].date + ""
  ), p;
  return {
    c() {
      e = w("div"), i = w("span"), r = w("span"), n = E(o), m = w("span"), v = E(l), L = w("span"), p = E(d), a(r, "class", "LimitType svelte-19ml84y"), a(m, "class", "LimitAmountPeriod svelte-19ml84y"), a(i, "class", "GeneralLimitInformation svelte-19ml84y"), a(L, "class", "DateLimitInformation svelte-19ml84y"), a(e, "class", "HistoryRow svelte-19ml84y");
    },
    m(u, f) {
      R(u, e, f), g(e, i), g(i, r), g(r, n), g(i, m), g(m, v), g(e, L), g(L, p);
    },
    p(u, f) {
      f[0] & /*lazyShowedHistoryArray*/
      128 && o !== (o = /*history*/
      u[37].type + "") && I(n, o), f[0] & /*$_*/
      512 && l !== (l = /*$_*/
      u[9]("limitRemoved") + "") && I(v, l), f[0] & /*lazyShowedHistoryArray*/
      128 && d !== (d = /*history*/
      u[37].date + "") && I(p, d);
    },
    d(u) {
      u && x(e);
    }
  };
}
function ie(t) {
  let e, i, r, o = (
    /*index*/
    t[39]
  );
  function n(d, p) {
    return (
      /*history*/
      d[37].removed ? Me : ze
    );
  }
  let m = n(t), l = m(t);
  const v = () => (
    /*div_binding*/
    t[22](e, o)
  ), L = () => (
    /*div_binding*/
    t[22](null, o)
  );
  return {
    c() {
      e = w("div"), l.c(), i = Q(), a(e, "class", r = $(
        /*index*/
        t[39] > +/*numberofentries*/
        t[1] ? "LimitContainer" : ""
      ) + " svelte-19ml84y");
    },
    m(d, p) {
      R(d, e, p), l.m(e, null), g(e, i), v();
    },
    p(d, p) {
      t = d, m === (m = n(t)) && l ? l.p(t, p) : (l.d(1), l = m(t), l && (l.c(), l.m(e, i))), p[0] & /*numberofentries*/
      2 && r !== (r = $(
        /*index*/
        t[39] > +/*numberofentries*/
        t[1] ? "LimitContainer" : ""
      ) + " svelte-19ml84y") && a(e, "class", r), o !== /*index*/
      t[39] && (L(), o = /*index*/
      t[39], v());
    },
    d(d) {
      d && x(e), l.d(), L();
    }
  };
}
function He(t) {
  let e;
  function i(n, m) {
    return (
      /*hasErrors*/
      n[6] ? je : (
        /*isLoading*/
        n[4] ? We : Oe
      )
    );
  }
  let r = i(t), o = r(t);
  return {
    c() {
      e = w("div"), o.c(), a(e, "class", "svelte-19ml84y");
    },
    m(n, m) {
      R(n, e, m), o.m(e, null), t[23](e);
    },
    p(n, m) {
      r === (r = i(n)) && o ? o.p(n, m) : (o.d(1), o = r(n), o && (o.c(), o.m(e, null)));
    },
    i: D,
    o: D,
    d(n) {
      n && x(e), o.d(), t[23](null);
    }
  };
}
function Fe(t, e, i) {
  let r;
  we(t, De, (s) => i(9, r = s));
  let o = window.navigator.userAgent, n = !be(o), { lang: m = "" } = e, { userid: l = "" } = e, { session: v = "" } = e, { endpoint: L = "" } = e, { apiversion: d = "" } = e, { numberofentries: p = "10" } = e, { customcurrencysymbols: u = "" } = e, { limitformat: f = "" } = e, { clientstyling: P = "" } = e, { clientstylingurl: T = "" } = e, { mbsource: h } = e, { translationurl: b = "" } = e, y, W, C = new Array(), N = parseInt(p, 10), U = !1, j = !0, z = [], M = [], H = !0, G = !1, O = { EUR: "€", RON: "lei", TRY: "₺" };
  const se = () => {
    fetch(b).then((c) => c.json()).then((c) => {
      Object.keys(c).forEach((_) => {
        ee(_, c[_]);
      });
    }).catch((c) => {
      console.log(c);
    });
  };
  Object.keys(K).forEach((s) => {
    ee(s, K[s]);
  });
  const re = () => {
    let s = d === "gmcore" ? `/v2/player/${l}/transactions/limit` : `/v1/player/${l}/limits/monetary/history`, c = new URL(s, L);
    c.searchParams.append("startDate", `${(/* @__PURE__ */ new Date("2022")).toISOString()}`), c.searchParams.append("endDate", `${(/* @__PURE__ */ new Date("2099")).toISOString()}`), c.searchParams.append("limit", "10000");
    let _ = {
      method: "GET",
      headers: { "X-SessionID": v }
    };
    fetch(c.href, _).then((S) => {
      if (S.status >= 300)
        throw i(4, j = !1), i(6, U = !0), new Error("There was an error fetching the limits");
      return S.json();
    }).then(
      (S) => {
        S.length && (z = oe(S), i(7, M = z.slice(0, N))), i(4, j = !1);
      },
      (S) => {
        console.error("There was an error", S), i(6, U = !0);
      }
    );
  }, oe = (s) => {
    const c = !!K[m];
    return s.map((S) => {
      let k = {
        amount: "",
        currency: "",
        date: "",
        period: "",
        type: "",
        removed: !1
      };
      return k.amount = le(S), k.currency = c ? O[S.limitCurrencyCode] : S.limitCurrencyCode, k.date = new Intl.DateTimeFormat("de", { dateStyle: "medium" }).format(new Date(S.limitDate)), k.period = r(`${S.limitPeriod.toLowerCase()}`), k.type = d === "gmcore" ? r(`historyLimitType${S.limitType.split(" ")[0]}`) : r(`historyLimitType${S.limitType.split(" ")[0]}`) + " " + r(`historyProductType${S.limitProductType}`), k.removed = S.limitAmount === -1, k;
    });
  }, le = (s) => {
    let c = f || Intl.NumberFormat("en-US", { maximumFractionDigits: 0 }).format(s.limitAmount);
    if (!f) {
      let ge = O[s.limitCurrencyCode] || s.limitCurrencyCode;
      return `${c}${ge}`;
    }
    typeof s.limitAmount == "string" && s.limitAmount.includes(",") && (s.limitAmount = s.limitAmount.replaceAll(",", ""));
    const _ = c.match(/\{(\d+)decimals\}/), S = _ ? parseInt(_[1], 10) : 2, k = _ ? new RegExp("\\{\\d+decimals\\}", "g") : "{decimals}";
    let F = parseFloat(s.limitAmount).toFixed(S);
    const [ue, V] = f.includes(".") ? [",", "."] : [".", ","];
    let [Y, ce] = F.split(".");
    return Y = Y.replace(/\B(?=(\d{3})+(?!\d))/g, ue), F = `${Y}${V}${ce}`, c = c.replace("{currency}", O[s.limitCurrencyCode] || s.limitCurrencyCode).replace("{amount}", F.split(V)[0]).replace(
      k,
      F.split(V)[1]
    ), c;
  }, ne = () => {
    i(5, H = !H), i(8, G = !G);
  };
  let X = new IntersectionObserver((s) => {
    s.forEach((c) => {
      c.isIntersecting && (N += parseInt(p, 10) || 10, M.length < z.length && i(7, M = z.slice(0, N)));
    });
  });
  const ae = () => {
    X.observe(C[C.length - 1]);
  }, me = () => {
    if (!u)
      return;
    let s = {};
    u.split(",").forEach((c) => {
      let _ = c.split(":");
      s[_[0].trim()] = _[1].trim();
    }), O = { ...O, ...s };
  }, ye = () => {
    xe(m);
  };
  _e(() => () => {
    X.unobserve(C[C.length - 1]);
  });
  function de(s, c) {
    q[s ? "unshift" : "push"](() => {
      C[c] = s, i(3, C);
    });
  }
  function pe(s) {
    q[s ? "unshift" : "push"](() => {
      y = s, i(2, y);
    });
  }
  return t.$$set = (s) => {
    "lang" in s && i(0, m = s.lang), "userid" in s && i(12, l = s.userid), "session" in s && i(13, v = s.session), "endpoint" in s && i(14, L = s.endpoint), "apiversion" in s && i(15, d = s.apiversion), "numberofentries" in s && i(1, p = s.numberofentries), "customcurrencysymbols" in s && i(16, u = s.customcurrencysymbols), "limitformat" in s && i(17, f = s.limitformat), "clientstyling" in s && i(18, P = s.clientstyling), "clientstylingurl" in s && i(19, T = s.clientstylingurl), "mbsource" in s && i(20, h = s.mbsource), "translationurl" in s && i(21, b = s.translationurl);
  }, t.$$.update = () => {
    t.$$.dirty[0] & /*customcurrencysymbols*/
    65536 && u && me(), t.$$.dirty[0] & /*endpoint, userid, session, apiversion*/
    61440 && L && l && v && d && re(), t.$$.dirty[0] & /*limitContainer, isLoading, hidden*/
    56 && C[0] && !j && !H && ae(), t.$$.dirty[0] & /*lang*/
    1 && m && ye(), t.$$.dirty[0] & /*clientstyling, customStylingContainer*/
    262148 && P && y && ke(y, P), t.$$.dirty[0] & /*clientstylingurl, customStylingContainer*/
    524292 && T && y && Ce(y, T), t.$$.dirty[0] & /*mbsource, customStylingContainer*/
    1048580 && h && y && Ie(y, `${h}.Style`, W), t.$$.dirty[0] & /*translationurl, customStylingContainer*/
    2097156 && b && y && se();
  }, [
    m,
    p,
    y,
    C,
    j,
    H,
    U,
    M,
    G,
    r,
    n,
    ne,
    l,
    v,
    L,
    d,
    u,
    f,
    P,
    T,
    h,
    b,
    de,
    pe
  ];
}
class Be extends fe {
  constructor(e) {
    super(), ve(
      this,
      e,
      Fe,
      He,
      Te,
      {
        lang: 0,
        userid: 12,
        session: 13,
        endpoint: 14,
        apiversion: 15,
        numberofentries: 1,
        customcurrencysymbols: 16,
        limitformat: 17,
        clientstyling: 18,
        clientstylingurl: 19,
        mbsource: 20,
        translationurl: 21
      },
      Re,
      [-1, -1]
    );
  }
  get lang() {
    return this.$$.ctx[0];
  }
  set lang(e) {
    this.$$set({ lang: e }), A();
  }
  get userid() {
    return this.$$.ctx[12];
  }
  set userid(e) {
    this.$$set({ userid: e }), A();
  }
  get session() {
    return this.$$.ctx[13];
  }
  set session(e) {
    this.$$set({ session: e }), A();
  }
  get endpoint() {
    return this.$$.ctx[14];
  }
  set endpoint(e) {
    this.$$set({ endpoint: e }), A();
  }
  get apiversion() {
    return this.$$.ctx[15];
  }
  set apiversion(e) {
    this.$$set({ apiversion: e }), A();
  }
  get numberofentries() {
    return this.$$.ctx[1];
  }
  set numberofentries(e) {
    this.$$set({ numberofentries: e }), A();
  }
  get customcurrencysymbols() {
    return this.$$.ctx[16];
  }
  set customcurrencysymbols(e) {
    this.$$set({ customcurrencysymbols: e }), A();
  }
  get limitformat() {
    return this.$$.ctx[17];
  }
  set limitformat(e) {
    this.$$set({ limitformat: e }), A();
  }
  get clientstyling() {
    return this.$$.ctx[18];
  }
  set clientstyling(e) {
    this.$$set({ clientstyling: e }), A();
  }
  get clientstylingurl() {
    return this.$$.ctx[19];
  }
  set clientstylingurl(e) {
    this.$$set({ clientstylingurl: e }), A();
  }
  get mbsource() {
    return this.$$.ctx[20];
  }
  set mbsource(e) {
    this.$$set({ mbsource: e }), A();
  }
  get translationurl() {
    return this.$$.ctx[21];
  }
  set translationurl(e) {
    this.$$set({ translationurl: e }), A();
  }
}
Ee(Be, { lang: {}, userid: {}, session: {}, endpoint: {}, apiversion: {}, numberofentries: {}, customcurrencysymbols: {}, limitformat: {}, clientstyling: {}, clientstylingurl: {}, mbsource: {}, translationurl: {} }, [], [], !0);
export {
  Be as default
};
