import { u as m } from "./index.es119.js";
import { t as h } from "./index.es300.js";
import { __require as p } from "./index.es126.js";
import { d as o } from "./index.es123.js";
import { __require as n } from "./index.es124.js";
var l = m, t = h, q = p(), R = o, v = n();
function s(r) {
  if (r.cancelToken && r.cancelToken.throwIfRequested(), r.signal && r.signal.aborted)
    throw new v("canceled");
}
var I = function(e) {
  s(e), e.headers = e.headers || {}, e.data = t.call(
    e,
    e.data,
    e.headers,
    e.transformRequest
  ), e.headers = l.merge(
    e.headers.common || {},
    e.headers[e.method] || {},
    e.headers
  ), l.forEach(
    ["delete", "get", "head", "post", "put", "patch", "common"],
    function(a) {
      delete e.headers[a];
    }
  );
  var u = e.adapter || R.adapter;
  return u(e).then(function(a) {
    return s(e), a.data = t.call(
      e,
      a.data,
      a.headers,
      e.transformResponse
    ), a;
  }, function(a) {
    return q(a) || (s(e), a && a.response && (a.response.data = t.call(
      e,
      a.response.data,
      a.response.headers,
      e.transformResponse
    ))), Promise.reject(a);
  });
};
export {
  I as d
};
//# sourceMappingURL=index.es254.js.map
