import { __require as F } from "./index-utils10.js";
import { __require as g } from "./index-normalizeHeaderName.js";
import { __require as x } from "./index-AxiosError.js";
import { __require as R } from "./index-transitional.js";
import { __require as d } from "./index-toFormData.js";
import { __require as w } from "./index-toURLEncodedForm.js";
import { __require as J } from "./index-platform.js";
import { __require as C } from "./index-formDataToJSON.js";
import { __require as h } from "./index-xhr.js";
var m, q;
function z() {
  if (q) return m;
  q = 1;
  var e = F(), p = g(), c = x(), y = R(), _ = d(), N = w(), l = J(), T = C(), O = {
    "Content-Type": "application/x-www-form-urlencoded"
  };
  function v(i, r) {
    !e.isUndefined(i) && e.isUndefined(i["Content-Type"]) && (i["Content-Type"] = r);
  }
  function E() {
    var i;
    return typeof XMLHttpRequest < "u" ? i = h() : typeof process < "u" && Object.prototype.toString.call(process) === "[object process]" && (i = h()), i;
  }
  function D(i, r, t) {
    if (e.isString(i))
      try {
        return (r || JSON.parse)(i), e.trim(i);
      } catch (o) {
        if (o.name !== "SyntaxError")
          throw o;
      }
    return (t || JSON.stringify)(i);
  }
  var f = {
    transitional: y,
    adapter: E(),
    transformRequest: [function(r, t) {
      p(t, "Accept"), p(t, "Content-Type");
      var o = t && t["Content-Type"] || "", s = o.indexOf("application/json") > -1, a = e.isObject(r);
      a && e.isHTMLForm(r) && (r = new FormData(r));
      var u = e.isFormData(r);
      if (u)
        return s ? JSON.stringify(T(r)) : r;
      if (e.isArrayBuffer(r) || e.isBuffer(r) || e.isStream(r) || e.isFile(r) || e.isBlob(r))
        return r;
      if (e.isArrayBufferView(r))
        return r.buffer;
      if (e.isURLSearchParams(r))
        return v(t, "application/x-www-form-urlencoded;charset=utf-8"), r.toString();
      var n;
      if (a) {
        if (o.indexOf("application/x-www-form-urlencoded") !== -1)
          return N(r, this.formSerializer).toString();
        if ((n = e.isFileList(r)) || o.indexOf("multipart/form-data") > -1) {
          var S = this.env && this.env.FormData;
          return _(
            n ? { "files[]": r } : r,
            S && new S(),
            this.formSerializer
          );
        }
      }
      return a || s ? (v(t, "application/json"), D(r)) : r;
    }],
    transformResponse: [function(r) {
      var t = this.transitional || f.transitional, o = t && t.forcedJSONParsing, s = this.responseType === "json";
      if (r && e.isString(r) && (o && !this.responseType || s)) {
        var a = t && t.silentJSONParsing, u = !a && s;
        try {
          return JSON.parse(r);
        } catch (n) {
          if (u)
            throw n.name === "SyntaxError" ? c.from(n, c.ERR_BAD_RESPONSE, this, null, this.response) : n;
        }
      }
      return r;
    }],
    /**
     * A timeout in milliseconds to abort a request. If set to 0 (default) a
     * timeout is not created.
     */
    timeout: 0,
    xsrfCookieName: "XSRF-TOKEN",
    xsrfHeaderName: "X-XSRF-TOKEN",
    maxContentLength: -1,
    maxBodyLength: -1,
    env: {
      FormData: l.classes.FormData,
      Blob: l.classes.Blob
    },
    validateStatus: function(r) {
      return r >= 200 && r < 300;
    },
    headers: {
      common: {
        Accept: "application/json, text/plain, */*"
      }
    }
  };
  return e.forEach(["delete", "get", "head"], function(r) {
    f.headers[r] = {};
  }), e.forEach(["post", "put", "patch"], function(r) {
    f.headers[r] = e.merge(O);
  }), m = f, m;
}
export {
  z as __require
};
