import { y as i, ba as r, bb as p, bc as I } from "./StoreProvider-CBB99upB.js";
import { a as c } from "./utils-DNSfZiio.js";
try {
  let e = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, n = new e.Error().stack;
  n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "571eba14-5430-4652-82cc-feea607e3865", e._sentryDebugIdIdentifier = "sentry-dbid-571eba14-5430-4652-82cc-feea607e3865");
} catch {
}
const D = (e) => e && typeof e == "object" && "messageCode" in e && e.messageCode === "maintenanceMode", d = {
  [i.INDIVIDUAL]: {
    TAX_ID_NUMBER: "individual.taxInformation"
  },
  [i.BUSINESS_DETAILS]: {
    TAX_ID_NUMBER: "organization.taxInformation"
  }
}, b = (e, n, a) => {
  if (e?.invalidFields && e?.invalidFields.length > 0)
    return e?.invalidFields.reduce(
      (o, s) => {
        if (s?.name) {
          let t = f(s?.name, n);
          a && (t = a[s?.name]), t && c(t, o, !0);
        }
        return o;
      },
      {}
    );
}, f = (e, n) => {
  switch (n) {
    case i.INDIVIDUAL: {
      const a = d?.[i.INDIVIDUAL]?.[e];
      return a || I[e];
    }
    case i.BUSINESS_DETAILS: {
      const a = d?.[i.BUSINESS_DETAILS]?.[e];
      return a || p[e];
    }
    case i.PAYOUT:
    case i.PAYIN:
      return r[e];
    default:
      return null;
  }
}, u = "30_102", l = (e, n) => !!e && typeof e == "object" && "errorCode" in e && e.errorCode === n, g = (e) => l(e, u);
export {
  D as a,
  g as i,
  b as p
};
