{"ast":null,"code":"'use strict';\n\nvar utils = require('./../utils');\n\nvar buildURL = require('../helpers/buildURL');\n\nvar InterceptorManager = require('./InterceptorManager');\n\nvar dispatchRequest = require('./dispatchRequest');\n\nvar mergeConfig = require('./mergeConfig');\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\n\n\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\n\n\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config); // Set config.method\n\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n } // Hook up interceptors middleware\n\n\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n}; // Provide aliases for supported request methods\n\n\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\nmodule.exports = Axios;","map":{"version":3,"sources":["/app/node_modules/axios/lib/core/Axios.js"],"names":["utils","require","buildURL","InterceptorManager","dispatchRequest","mergeConfig","Axios","instanceConfig","defaults","interceptors","request","response","prototype","config","arguments","url","method","toLowerCase","chain","undefined","promise","Promise","resolve","forEach","unshiftRequestInterceptors","interceptor","unshift","fulfilled","rejected","pushResponseInterceptors","push","length","then","shift","getUri","params","paramsSerializer","replace","forEachMethodNoData","data","forEachMethodWithData","module","exports"],"mappings":"AAAA;;AAEA,IAAIA,KAAK,GAAGC,OAAO,CAAC,YAAD,CAAnB;;AACA,IAAIC,QAAQ,GAAGD,OAAO,CAAC,qBAAD,CAAtB;;AACA,IAAIE,kBAAkB,GAAGF,OAAO,CAAC,sBAAD,CAAhC;;AACA,IAAIG,eAAe,GAAGH,OAAO,CAAC,mBAAD,CAA7B;;AACA,IAAII,WAAW,GAAGJ,OAAO,CAAC,eAAD,CAAzB;AAEA;AACA;AACA;AACA;AACA;;;AACA,SAASK,KAAT,CAAeC,cAAf,EAA+B;AAC7B,OAAKC,QAAL,GAAgBD,cAAhB;AACA,OAAKE,YAAL,GAAoB;AAClBC,IAAAA,OAAO,EAAE,IAAIP,kBAAJ,EADS;AAElBQ,IAAAA,QAAQ,EAAE,IAAIR,kBAAJ;AAFQ,GAApB;AAID;AAED;AACA;AACA;AACA;AACA;;;AACAG,KAAK,CAACM,SAAN,CAAgBF,OAAhB,GAA0B,SAASA,OAAT,CAAiBG,MAAjB,EAAyB;AACjD;AACA;AACA,MAAI,OAAOA,MAAP,KAAkB,QAAtB,EAAgC;AAC9BA,IAAAA,MAAM,GAAGC,SAAS,CAAC,CAAD,CAAT,IAAgB,EAAzB;AACAD,IAAAA,MAAM,CAACE,GAAP,GAAaD,SAAS,CAAC,CAAD,CAAtB;AACD,GAHD,MAGO;AAC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OD,CATD;AAWAE,MAAM,CAACC,OAAP,GAAiBpC,KAAjB","sourcesContent":["'use strict';\n\nvar utils = require('./../utils');\nvar buildURL = require('../helpers/buildURL');\nvar InterceptorManager = require('./InterceptorManager');\nvar dispatchRequest = require('./dispatchRequest');\nvar mergeConfig = require('./mergeConfig');\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = arguments[1] || {};\n config.url = arguments[0];\n } else {\n config = config || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n // Set config.method\n if (config.method) {\n config.method = config.method.toLowerCase();\n } else if (this.defaults.method) {\n config.method = this.defaults.method.toLowerCase();\n } else {\n config.method = 'get';\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\nAxios.prototype.getUri = function getUri(config) {\n config = mergeConfig(this.defaults, config);\n return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\\?/, '');\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n"]},"metadata":{},"sourceType":"script"}