node-red-contrib-tak-registration 0.11.6 → 0.12.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (388) hide show
  1. package/node_modules/@types/node/README.md +2 -2
  2. package/node_modules/@types/node/assert.d.ts +88 -44
  3. package/node_modules/@types/node/async_hooks.d.ts +17 -15
  4. package/node_modules/@types/node/buffer.d.ts +29 -110
  5. package/node_modules/@types/node/child_process.d.ts +38 -34
  6. package/node_modules/@types/node/cluster.d.ts +165 -19
  7. package/node_modules/@types/node/console.d.ts +64 -27
  8. package/node_modules/@types/node/crypto.d.ts +106 -142
  9. package/node_modules/@types/node/dgram.d.ts +14 -14
  10. package/node_modules/@types/node/diagnostics_channel.d.ts +12 -3
  11. package/node_modules/@types/node/dns/promises.d.ts +79 -28
  12. package/node_modules/@types/node/dns.d.ts +124 -69
  13. package/node_modules/@types/node/dom-events.d.ts +2 -0
  14. package/node_modules/@types/node/domain.d.ts +4 -4
  15. package/node_modules/@types/node/events.d.ts +115 -63
  16. package/node_modules/@types/node/fs/promises.d.ts +34 -12
  17. package/node_modules/@types/node/fs.d.ts +104 -40
  18. package/node_modules/@types/node/globals.d.ts +1 -0
  19. package/node_modules/@types/node/http.d.ts +69 -48
  20. package/node_modules/@types/node/http2.d.ts +83 -47
  21. package/node_modules/@types/node/https.d.ts +3 -3
  22. package/node_modules/@types/node/index.d.ts +1 -0
  23. package/node_modules/@types/node/inspector.d.ts +5 -6
  24. package/node_modules/@types/node/module.d.ts +0 -14
  25. package/node_modules/@types/node/net.d.ts +58 -13
  26. package/node_modules/@types/node/os.d.ts +29 -12
  27. package/node_modules/@types/node/package.json +4 -16
  28. package/node_modules/@types/node/path.d.ts +1 -1
  29. package/node_modules/@types/node/perf_hooks.d.ts +308 -48
  30. package/node_modules/@types/node/process.d.ts +241 -48
  31. package/node_modules/@types/node/punycode.d.ts +4 -4
  32. package/node_modules/@types/node/querystring.d.ts +18 -6
  33. package/node_modules/@types/node/readline/promises.d.ts +9 -9
  34. package/node_modules/@types/node/readline.d.ts +23 -22
  35. package/node_modules/@types/node/repl.d.ts +21 -21
  36. package/node_modules/@types/node/sea.d.ts +153 -0
  37. package/node_modules/@types/node/stream/web.d.ts +3 -2
  38. package/node_modules/@types/node/stream.d.ts +63 -57
  39. package/node_modules/@types/node/string_decoder.d.ts +3 -3
  40. package/node_modules/@types/node/test.d.ts +363 -98
  41. package/node_modules/@types/node/timers/promises.d.ts +10 -6
  42. package/node_modules/@types/node/timers.d.ts +5 -5
  43. package/node_modules/@types/node/tls.d.ts +39 -32
  44. package/node_modules/@types/node/trace_events.d.ts +40 -25
  45. package/node_modules/@types/node/tty.d.ts +8 -8
  46. package/node_modules/@types/node/url.d.ts +15 -7
  47. package/node_modules/@types/node/util.d.ts +131 -22
  48. package/node_modules/@types/node/v8.d.ts +51 -7
  49. package/node_modules/@types/node/vm.d.ts +43 -24
  50. package/node_modules/@types/node/wasi.d.ts +12 -10
  51. package/node_modules/@types/node/worker_threads.d.ts +19 -16
  52. package/node_modules/@types/node/zlib.d.ts +16 -3
  53. package/node_modules/adm-zip/README.md +2 -1
  54. package/node_modules/adm-zip/adm-zip.js +46 -45
  55. package/node_modules/adm-zip/headers/entryHeader.js +14 -12
  56. package/node_modules/adm-zip/headers/mainHeader.js +1 -1
  57. package/node_modules/adm-zip/methods/inflater.js +6 -3
  58. package/node_modules/adm-zip/methods/zipcrypto.js +6 -2
  59. package/node_modules/adm-zip/package.json +2 -2
  60. package/node_modules/adm-zip/util/errors.js +1 -0
  61. package/node_modules/adm-zip/zipEntry.js +64 -43
  62. package/node_modules/adm-zip/zipFile.js +35 -35
  63. package/node_modules/axios/CHANGELOG.md +868 -759
  64. package/node_modules/axios/README.md +65 -17
  65. package/node_modules/axios/dist/axios.js +1330 -583
  66. package/node_modules/axios/dist/axios.js.map +1 -1
  67. package/node_modules/axios/dist/axios.min.js +1 -1
  68. package/node_modules/axios/dist/axios.min.js.map +1 -1
  69. package/node_modules/axios/dist/browser/axios.cjs +696 -316
  70. package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
  71. package/node_modules/axios/dist/esm/axios.js +696 -316
  72. package/node_modules/axios/dist/esm/axios.js.map +1 -1
  73. package/node_modules/axios/dist/esm/axios.min.js +1 -1
  74. package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
  75. package/node_modules/axios/dist/node/axios.cjs +607 -257
  76. package/node_modules/axios/dist/node/axios.cjs.map +1 -1
  77. package/node_modules/axios/index.d.cts +5 -2
  78. package/node_modules/axios/index.d.ts +5 -2
  79. package/node_modules/axios/lib/adapters/adapters.js +3 -1
  80. package/node_modules/axios/lib/adapters/fetch.js +227 -0
  81. package/node_modules/axios/lib/adapters/http.js +1 -1
  82. package/node_modules/axios/lib/adapters/xhr.js +31 -101
  83. package/node_modules/axios/lib/core/Axios.js +17 -11
  84. package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
  85. package/node_modules/axios/lib/core/mergeConfig.js +1 -1
  86. package/node_modules/axios/lib/defaults/index.js +7 -5
  87. package/node_modules/axios/lib/env/data.js +1 -1
  88. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +9 -8
  89. package/node_modules/axios/lib/helpers/composeSignals.js +46 -0
  90. package/node_modules/axios/lib/helpers/progressEventReducer.js +32 -0
  91. package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
  92. package/node_modules/axios/lib/helpers/throttle.js +5 -3
  93. package/node_modules/axios/lib/helpers/trackStream.js +55 -0
  94. package/node_modules/axios/lib/platform/common/utils.js +4 -1
  95. package/node_modules/axios/lib/utils.js +7 -2
  96. package/node_modules/axios/package.json +27 -26
  97. package/node_modules/fast-xml-parser/CHANGELOG.md +14 -0
  98. package/node_modules/fast-xml-parser/README.md +7 -14
  99. package/node_modules/fast-xml-parser/package.json +1 -1
  100. package/node_modules/fast-xml-parser/src/fxp.d.ts +4 -4
  101. package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
  102. package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
  103. package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
  104. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
  105. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
  106. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
  107. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
  108. package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +96 -0
  109. package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
  110. package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
  111. package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
  112. package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
  113. package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
  114. package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
  115. package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
  116. package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
  117. package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
  118. package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
  119. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
  120. package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
  121. package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +31 -0
  122. package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
  123. package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
  124. package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
  125. package/node_modules/fast-xml-parser/src/validator.js +2 -0
  126. package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +13 -4
  127. package/node_modules/follow-redirects/index.js +1 -1
  128. package/node_modules/follow-redirects/package.json +1 -1
  129. package/node_modules/hasown/CHANGELOG.md +12 -0
  130. package/node_modules/hasown/index.d.ts +2 -2
  131. package/node_modules/hasown/package.json +5 -2
  132. package/node_modules/hasown/tsconfig.json +3 -46
  133. package/node_modules/object-is/.eslintrc +1 -1
  134. package/node_modules/object-is/.nycrc +0 -4
  135. package/node_modules/object-is/CHANGELOG.md +25 -0
  136. package/node_modules/object-is/README.md +20 -20
  137. package/node_modules/object-is/package.json +23 -14
  138. package/node_modules/protobufjs/LICENSE +39 -39
  139. package/node_modules/protobufjs/README.md +727 -740
  140. package/node_modules/protobufjs/dist/light/protobuf.js +6264 -6264
  141. package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
  142. package/node_modules/protobufjs/dist/light/protobuf.min.js +2 -2
  143. package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
  144. package/node_modules/protobufjs/dist/minimal/protobuf.js +1928 -1928
  145. package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
  146. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
  147. package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
  148. package/node_modules/protobufjs/dist/protobuf.js +7978 -7961
  149. package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
  150. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  151. package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
  152. package/node_modules/protobufjs/ext/debug/README.md +4 -4
  153. package/node_modules/protobufjs/ext/debug/index.js +71 -71
  154. package/node_modules/protobufjs/ext/descriptor/README.md +72 -72
  155. package/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -191
  156. package/node_modules/protobufjs/ext/descriptor/index.js +1052 -1052
  157. package/node_modules/protobufjs/ext/descriptor/test.js +54 -54
  158. package/node_modules/protobufjs/google/LICENSE +27 -27
  159. package/node_modules/protobufjs/google/README.md +1 -1
  160. package/node_modules/protobufjs/google/api/annotations.json +82 -82
  161. package/node_modules/protobufjs/google/api/annotations.proto +10 -10
  162. package/node_modules/protobufjs/google/api/http.json +85 -85
  163. package/node_modules/protobufjs/google/api/http.proto +30 -30
  164. package/node_modules/protobufjs/google/protobuf/api.json +117 -117
  165. package/node_modules/protobufjs/google/protobuf/api.proto +33 -33
  166. package/node_modules/protobufjs/google/protobuf/descriptor.json +738 -738
  167. package/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -286
  168. package/node_modules/protobufjs/google/protobuf/source_context.json +19 -19
  169. package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -7
  170. package/node_modules/protobufjs/google/protobuf/type.json +201 -201
  171. package/node_modules/protobufjs/google/protobuf/type.proto +89 -89
  172. package/node_modules/protobufjs/index.d.ts +2741 -2741
  173. package/node_modules/protobufjs/index.js +4 -4
  174. package/node_modules/protobufjs/light.d.ts +2 -2
  175. package/node_modules/protobufjs/light.js +3 -3
  176. package/node_modules/protobufjs/minimal.d.ts +2 -2
  177. package/node_modules/protobufjs/minimal.js +4 -4
  178. package/node_modules/protobufjs/package.json +111 -111
  179. package/node_modules/protobufjs/scripts/postinstall.js +32 -32
  180. package/node_modules/protobufjs/src/common.js +399 -399
  181. package/node_modules/protobufjs/src/converter.js +301 -301
  182. package/node_modules/protobufjs/src/decoder.js +129 -129
  183. package/node_modules/protobufjs/src/encoder.js +100 -100
  184. package/node_modules/protobufjs/src/enum.js +198 -198
  185. package/node_modules/protobufjs/src/field.js +377 -377
  186. package/node_modules/protobufjs/src/index-light.js +104 -104
  187. package/node_modules/protobufjs/src/index-minimal.js +36 -36
  188. package/node_modules/protobufjs/src/index.js +12 -12
  189. package/node_modules/protobufjs/src/mapfield.js +126 -126
  190. package/node_modules/protobufjs/src/message.js +138 -138
  191. package/node_modules/protobufjs/src/method.js +160 -160
  192. package/node_modules/protobufjs/src/namespace.js +433 -433
  193. package/node_modules/protobufjs/src/object.js +243 -243
  194. package/node_modules/protobufjs/src/oneof.js +203 -203
  195. package/node_modules/protobufjs/src/parse.js +889 -872
  196. package/node_modules/protobufjs/src/reader.js +416 -416
  197. package/node_modules/protobufjs/src/reader_buffer.js +51 -51
  198. package/node_modules/protobufjs/src/root.js +368 -368
  199. package/node_modules/protobufjs/src/roots.js +18 -18
  200. package/node_modules/protobufjs/src/rpc/service.js +142 -142
  201. package/node_modules/protobufjs/src/rpc.js +36 -36
  202. package/node_modules/protobufjs/src/service.js +167 -167
  203. package/node_modules/protobufjs/src/tokenize.js +416 -416
  204. package/node_modules/protobufjs/src/type.js +589 -589
  205. package/node_modules/protobufjs/src/types.js +196 -196
  206. package/node_modules/protobufjs/src/typescript.jsdoc +15 -15
  207. package/node_modules/protobufjs/src/util/longbits.js +200 -200
  208. package/node_modules/protobufjs/src/util/minimal.js +438 -438
  209. package/node_modules/protobufjs/src/util.js +212 -212
  210. package/node_modules/protobufjs/src/verifier.js +176 -176
  211. package/node_modules/protobufjs/src/wrappers.js +102 -102
  212. package/node_modules/protobufjs/src/writer.js +465 -465
  213. package/node_modules/protobufjs/src/writer_buffer.js +85 -85
  214. package/node_modules/protobufjs/tsconfig.json +7 -7
  215. package/node_modules/set-function-length/CHANGELOG.md +11 -0
  216. package/node_modules/set-function-length/env.d.ts +9 -6
  217. package/node_modules/set-function-length/env.js +1 -0
  218. package/node_modules/set-function-length/index.d.ts +6 -6
  219. package/node_modules/set-function-length/index.js +1 -3
  220. package/node_modules/set-function-length/package.json +11 -13
  221. package/node_modules/set-function-length/tsconfig.json +7 -57
  222. package/node_modules/undici-types/LICENSE +21 -0
  223. package/node_modules/undici-types/balanced-pool.d.ts +11 -0
  224. package/node_modules/undici-types/client.d.ts +12 -1
  225. package/node_modules/undici-types/diagnostics-channel.d.ts +1 -2
  226. package/node_modules/undici-types/dispatcher.d.ts +17 -3
  227. package/node_modules/undici-types/eventsource.d.ts +61 -0
  228. package/node_modules/undici-types/fetch.d.ts +22 -23
  229. package/node_modules/undici-types/handlers.d.ts +10 -4
  230. package/node_modules/undici-types/index.d.ts +6 -1
  231. package/node_modules/undici-types/package.json +1 -1
  232. package/node_modules/undici-types/pool.d.ts +11 -0
  233. package/node_modules/undici-types/proxy-agent.d.ts +0 -2
  234. package/node_modules/undici-types/readable.d.ts +2 -3
  235. package/node_modules/undici-types/retry-agent.d.ts +11 -0
  236. package/node_modules/undici-types/retry-handler.d.ts +116 -0
  237. package/node_modules/undici-types/util.d.ts +31 -0
  238. package/node_modules/undici-types/webidl.d.ts +6 -1
  239. package/node_modules/undici-types/websocket.d.ts +22 -1
  240. package/node_modules/uuid/CHANGELOG.md +18 -0
  241. package/node_modules/uuid/README.md +134 -16
  242. package/node_modules/uuid/dist/commonjs-browser/index.js +40 -15
  243. package/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
  244. package/node_modules/uuid/dist/commonjs-browser/md5.js +30 -53
  245. package/node_modules/uuid/dist/commonjs-browser/native.js +3 -4
  246. package/node_modules/uuid/dist/commonjs-browser/nil.js +1 -2
  247. package/node_modules/uuid/dist/commonjs-browser/parse.js +14 -15
  248. package/node_modules/uuid/dist/commonjs-browser/regex.js +1 -2
  249. package/node_modules/uuid/dist/commonjs-browser/rng.js +2 -4
  250. package/node_modules/uuid/dist/commonjs-browser/sha1.js +27 -49
  251. package/node_modules/uuid/dist/commonjs-browser/stringify.js +10 -16
  252. package/node_modules/uuid/dist/commonjs-browser/v1.js +73 -49
  253. package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
  254. package/node_modules/uuid/dist/commonjs-browser/v3.js +3 -8
  255. package/node_modules/uuid/dist/commonjs-browser/v35.js +15 -32
  256. package/node_modules/uuid/dist/commonjs-browser/v4.js +7 -18
  257. package/node_modules/uuid/dist/commonjs-browser/v5.js +3 -8
  258. package/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
  259. package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
  260. package/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
  261. package/node_modules/uuid/dist/commonjs-browser/validate.js +2 -7
  262. package/node_modules/uuid/dist/commonjs-browser/version.js +2 -8
  263. package/node_modules/uuid/dist/esm-browser/index.js +9 -4
  264. package/node_modules/uuid/dist/esm-browser/max.js +1 -0
  265. package/node_modules/uuid/dist/esm-browser/md5.js +29 -50
  266. package/node_modules/uuid/dist/esm-browser/native.js +1 -1
  267. package/node_modules/uuid/dist/esm-browser/parse.js +12 -10
  268. package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
  269. package/node_modules/uuid/dist/esm-browser/rng.js +3 -4
  270. package/node_modules/uuid/dist/esm-browser/sha1.js +26 -46
  271. package/node_modules/uuid/dist/esm-browser/stringify.js +9 -11
  272. package/node_modules/uuid/dist/esm-browser/v1.js +74 -44
  273. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
  274. package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
  275. package/node_modules/uuid/dist/esm-browser/v35.js +14 -25
  276. package/node_modules/uuid/dist/esm-browser/v4.js +5 -9
  277. package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
  278. package/node_modules/uuid/dist/esm-browser/v6.js +36 -0
  279. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
  280. package/node_modules/uuid/dist/esm-browser/v7.js +146 -0
  281. package/node_modules/uuid/dist/esm-browser/validate.js +0 -2
  282. package/node_modules/uuid/dist/esm-browser/version.js +0 -3
  283. package/node_modules/uuid/dist/esm-node/index.js +9 -4
  284. package/node_modules/uuid/dist/esm-node/max.js +1 -0
  285. package/node_modules/uuid/dist/esm-node/md5.js +1 -4
  286. package/node_modules/uuid/dist/esm-node/native.js +1 -1
  287. package/node_modules/uuid/dist/esm-node/parse.js +11 -9
  288. package/node_modules/uuid/dist/esm-node/regex.js +1 -1
  289. package/node_modules/uuid/dist/esm-node/rng.js +1 -3
  290. package/node_modules/uuid/dist/esm-node/sha1.js +1 -4
  291. package/node_modules/uuid/dist/esm-node/stringify.js +7 -9
  292. package/node_modules/uuid/dist/esm-node/v1.js +66 -36
  293. package/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
  294. package/node_modules/uuid/dist/esm-node/v35.js +8 -19
  295. package/node_modules/uuid/dist/esm-node/v4.js +4 -8
  296. package/node_modules/uuid/dist/esm-node/v6.js +32 -0
  297. package/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
  298. package/node_modules/uuid/dist/esm-node/v7.js +146 -0
  299. package/node_modules/uuid/dist/esm-node/validate.js +0 -2
  300. package/node_modules/uuid/dist/esm-node/version.js +0 -3
  301. package/node_modules/uuid/dist/index.js +40 -15
  302. package/node_modules/uuid/dist/max.js +7 -0
  303. package/node_modules/uuid/dist/md5-browser.js +8 -31
  304. package/node_modules/uuid/dist/md5.js +4 -10
  305. package/node_modules/uuid/dist/native-browser.js +2 -3
  306. package/node_modules/uuid/dist/native.js +5 -9
  307. package/node_modules/uuid/dist/nil.js +1 -2
  308. package/node_modules/uuid/dist/parse.js +13 -14
  309. package/node_modules/uuid/dist/regex.js +1 -2
  310. package/node_modules/uuid/dist/rng-browser.js +1 -3
  311. package/node_modules/uuid/dist/rng.js +3 -10
  312. package/node_modules/uuid/dist/sha1-browser.js +1 -23
  313. package/node_modules/uuid/dist/sha1.js +4 -10
  314. package/node_modules/uuid/dist/stringify.js +8 -14
  315. package/node_modules/uuid/dist/uuid-bin.js +12 -22
  316. package/node_modules/uuid/dist/v1.js +66 -42
  317. package/node_modules/uuid/dist/v1ToV6.js +26 -0
  318. package/node_modules/uuid/dist/v3.js +2 -7
  319. package/node_modules/uuid/dist/v35.js +11 -28
  320. package/node_modules/uuid/dist/v4.js +6 -17
  321. package/node_modules/uuid/dist/v5.js +2 -7
  322. package/node_modules/uuid/dist/v6.js +38 -0
  323. package/node_modules/uuid/dist/v6ToV1.js +26 -0
  324. package/node_modules/uuid/dist/v7.js +152 -0
  325. package/node_modules/uuid/dist/validate.js +2 -7
  326. package/node_modules/uuid/dist/version.js +2 -8
  327. package/node_modules/uuid/package.json +41 -34
  328. package/node_modules/uuid/wrapper.mjs +5 -0
  329. package/package.json +6 -6
  330. package/tak-ingest.js +1 -1
  331. package/tak-registration.js +8 -1
  332. package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
  333. package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
  334. package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
  335. package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2363
  336. package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
  337. package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
  338. package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
  339. package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
  340. package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4487
  341. package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -596
  342. package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -545
  343. package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
  344. package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
  345. package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
  346. package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
  347. package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
  348. package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
  349. package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4311
  350. package/node_modules/@types/node/ts4.8/globals.d.ts +0 -411
  351. package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
  352. package/node_modules/@types/node/ts4.8/http.d.ts +0 -1887
  353. package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
  354. package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
  355. package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
  356. package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
  357. package/node_modules/@types/node/ts4.8/module.d.ts +0 -315
  358. package/node_modules/@types/node/ts4.8/net.d.ts +0 -954
  359. package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
  360. package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
  361. package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -645
  362. package/node_modules/@types/node/ts4.8/process.d.ts +0 -1561
  363. package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
  364. package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
  365. package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
  366. package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
  367. package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
  368. package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
  369. package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
  370. package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -366
  371. package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
  372. package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
  373. package/node_modules/@types/node/ts4.8/test.d.ts +0 -1465
  374. package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
  375. package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
  376. package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
  377. package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
  378. package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
  379. package/node_modules/@types/node/ts4.8/url.d.ts +0 -944
  380. package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
  381. package/node_modules/@types/node/ts4.8/v8.d.ts +0 -764
  382. package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
  383. package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -179
  384. package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
  385. package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
  386. package/node_modules/object-is/.eslintignore +0 -1
  387. package/node_modules/set-function-length/env.d.ts.map +0 -1
  388. package/node_modules/set-function-length/index.d.ts.map +0 -1
@@ -1,330 +1,520 @@
1
- // Axios v1.6.6 Copyright (c) 2024 Matt Zabriskie and contributors
1
+ // Axios v1.7.2 Copyright (c) 2024 Matt Zabriskie and contributors
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
5
5
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
6
6
  })(this, (function () { 'use strict';
7
7
 
8
- function ownKeys(object, enumerableOnly) {
9
- var keys = Object.keys(object);
8
+ function _AsyncGenerator(e) {
9
+ var r, t;
10
+ function resume(r, t) {
11
+ try {
12
+ var n = e[r](t),
13
+ o = n.value,
14
+ u = o instanceof _OverloadYield;
15
+ Promise.resolve(u ? o.v : o).then(function (t) {
16
+ if (u) {
17
+ var i = "return" === r ? "return" : "next";
18
+ if (!o.k || t.done) return resume(i, t);
19
+ t = e[i](t).value;
20
+ }
21
+ settle(n.done ? "return" : "normal", t);
22
+ }, function (e) {
23
+ resume("throw", e);
24
+ });
25
+ } catch (e) {
26
+ settle("throw", e);
27
+ }
28
+ }
29
+ function settle(e, n) {
30
+ switch (e) {
31
+ case "return":
32
+ r.resolve({
33
+ value: n,
34
+ done: !0
35
+ });
36
+ break;
37
+ case "throw":
38
+ r.reject(n);
39
+ break;
40
+ default:
41
+ r.resolve({
42
+ value: n,
43
+ done: !1
44
+ });
45
+ }
46
+ (r = r.next) ? resume(r.key, r.arg) : t = null;
47
+ }
48
+ this._invoke = function (e, n) {
49
+ return new Promise(function (o, u) {
50
+ var i = {
51
+ key: e,
52
+ arg: n,
53
+ resolve: o,
54
+ reject: u,
55
+ next: null
56
+ };
57
+ t ? t = t.next = i : (r = t = i, resume(e, n));
58
+ });
59
+ }, "function" != typeof e.return && (this.return = void 0);
60
+ }
61
+ _AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
62
+ return this;
63
+ }, _AsyncGenerator.prototype.next = function (e) {
64
+ return this._invoke("next", e);
65
+ }, _AsyncGenerator.prototype.throw = function (e) {
66
+ return this._invoke("throw", e);
67
+ }, _AsyncGenerator.prototype.return = function (e) {
68
+ return this._invoke("return", e);
69
+ };
70
+ function _OverloadYield(t, e) {
71
+ this.v = t, this.k = e;
72
+ }
73
+ function _asyncGeneratorDelegate(t) {
74
+ var e = {},
75
+ n = !1;
76
+ function pump(e, r) {
77
+ return n = !0, r = new Promise(function (n) {
78
+ n(t[e](r));
79
+ }), {
80
+ done: !1,
81
+ value: new _OverloadYield(r, 1)
82
+ };
83
+ }
84
+ return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
85
+ return this;
86
+ }, e.next = function (t) {
87
+ return n ? (n = !1, t) : pump("next", t);
88
+ }, "function" == typeof t.throw && (e.throw = function (t) {
89
+ if (n) throw n = !1, t;
90
+ return pump("throw", t);
91
+ }), "function" == typeof t.return && (e.return = function (t) {
92
+ return n ? (n = !1, t) : pump("return", t);
93
+ }), e;
94
+ }
95
+ function _asyncIterator(r) {
96
+ var n,
97
+ t,
98
+ o,
99
+ e = 2;
100
+ for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
101
+ if (t && null != (n = r[t])) return n.call(r);
102
+ if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
103
+ t = "@@asyncIterator", o = "@@iterator";
104
+ }
105
+ throw new TypeError("Object is not async iterable");
106
+ }
107
+ function AsyncFromSyncIterator(r) {
108
+ function AsyncFromSyncIteratorContinuation(r) {
109
+ if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
110
+ var n = r.done;
111
+ return Promise.resolve(r.value).then(function (r) {
112
+ return {
113
+ value: r,
114
+ done: n
115
+ };
116
+ });
117
+ }
118
+ return AsyncFromSyncIterator = function (r) {
119
+ this.s = r, this.n = r.next;
120
+ }, AsyncFromSyncIterator.prototype = {
121
+ s: null,
122
+ n: null,
123
+ next: function () {
124
+ return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
125
+ },
126
+ return: function (r) {
127
+ var n = this.s.return;
128
+ return void 0 === n ? Promise.resolve({
129
+ value: r,
130
+ done: !0
131
+ }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
132
+ },
133
+ throw: function (r) {
134
+ var n = this.s.return;
135
+ return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
136
+ }
137
+ }, new AsyncFromSyncIterator(r);
138
+ }
139
+ function _awaitAsyncGenerator(e) {
140
+ return new _OverloadYield(e, 0);
141
+ }
142
+ function _iterableToArrayLimit(r, l) {
143
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
144
+ if (null != t) {
145
+ var e,
146
+ n,
147
+ i,
148
+ u,
149
+ a = [],
150
+ f = !0,
151
+ o = !1;
152
+ try {
153
+ if (i = (t = t.call(r)).next, 0 === l) {
154
+ if (Object(t) !== t) return;
155
+ f = !1;
156
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
157
+ } catch (r) {
158
+ o = !0, n = r;
159
+ } finally {
160
+ try {
161
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
162
+ } finally {
163
+ if (o) throw n;
164
+ }
165
+ }
166
+ return a;
167
+ }
168
+ }
169
+ function ownKeys(e, r) {
170
+ var t = Object.keys(e);
10
171
  if (Object.getOwnPropertySymbols) {
11
- var symbols = Object.getOwnPropertySymbols(object);
12
- enumerableOnly && (symbols = symbols.filter(function (sym) {
13
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
14
- })), keys.push.apply(keys, symbols);
15
- }
16
- return keys;
17
- }
18
- function _objectSpread2(target) {
19
- for (var i = 1; i < arguments.length; i++) {
20
- var source = null != arguments[i] ? arguments[i] : {};
21
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
22
- _defineProperty(target, key, source[key]);
23
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
24
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
172
+ var o = Object.getOwnPropertySymbols(e);
173
+ r && (o = o.filter(function (r) {
174
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
175
+ })), t.push.apply(t, o);
176
+ }
177
+ return t;
178
+ }
179
+ function _objectSpread2(e) {
180
+ for (var r = 1; r < arguments.length; r++) {
181
+ var t = null != arguments[r] ? arguments[r] : {};
182
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
183
+ _defineProperty(e, r, t[r]);
184
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
185
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
25
186
  });
26
187
  }
27
- return target;
188
+ return e;
28
189
  }
29
190
  function _regeneratorRuntime() {
30
191
  _regeneratorRuntime = function () {
31
- return exports;
192
+ return e;
32
193
  };
33
- var exports = {},
34
- Op = Object.prototype,
35
- hasOwn = Op.hasOwnProperty,
36
- $Symbol = "function" == typeof Symbol ? Symbol : {},
37
- iteratorSymbol = $Symbol.iterator || "@@iterator",
38
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
39
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
40
- function define(obj, key, value) {
41
- return Object.defineProperty(obj, key, {
42
- value: value,
194
+ var t,
195
+ e = {},
196
+ r = Object.prototype,
197
+ n = r.hasOwnProperty,
198
+ o = Object.defineProperty || function (t, e, r) {
199
+ t[e] = r.value;
200
+ },
201
+ i = "function" == typeof Symbol ? Symbol : {},
202
+ a = i.iterator || "@@iterator",
203
+ c = i.asyncIterator || "@@asyncIterator",
204
+ u = i.toStringTag || "@@toStringTag";
205
+ function define(t, e, r) {
206
+ return Object.defineProperty(t, e, {
207
+ value: r,
43
208
  enumerable: !0,
44
209
  configurable: !0,
45
210
  writable: !0
46
- }), obj[key];
211
+ }), t[e];
47
212
  }
48
213
  try {
49
214
  define({}, "");
50
- } catch (err) {
51
- define = function (obj, key, value) {
52
- return obj[key] = value;
215
+ } catch (t) {
216
+ define = function (t, e, r) {
217
+ return t[e] = r;
53
218
  };
54
219
  }
55
- function wrap(innerFn, outerFn, self, tryLocsList) {
56
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
57
- generator = Object.create(protoGenerator.prototype),
58
- context = new Context(tryLocsList || []);
59
- return generator._invoke = function (innerFn, self, context) {
60
- var state = "suspendedStart";
61
- return function (method, arg) {
62
- if ("executing" === state) throw new Error("Generator is already running");
63
- if ("completed" === state) {
64
- if ("throw" === method) throw arg;
65
- return doneResult();
66
- }
67
- for (context.method = method, context.arg = arg;;) {
68
- var delegate = context.delegate;
69
- if (delegate) {
70
- var delegateResult = maybeInvokeDelegate(delegate, context);
71
- if (delegateResult) {
72
- if (delegateResult === ContinueSentinel) continue;
73
- return delegateResult;
74
- }
75
- }
76
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
77
- if ("suspendedStart" === state) throw state = "completed", context.arg;
78
- context.dispatchException(context.arg);
79
- } else "return" === context.method && context.abrupt("return", context.arg);
80
- state = "executing";
81
- var record = tryCatch(innerFn, self, context);
82
- if ("normal" === record.type) {
83
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
84
- return {
85
- value: record.arg,
86
- done: context.done
87
- };
88
- }
89
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
90
- }
91
- };
92
- }(innerFn, self, context), generator;
220
+ function wrap(t, e, r, n) {
221
+ var i = e && e.prototype instanceof Generator ? e : Generator,
222
+ a = Object.create(i.prototype),
223
+ c = new Context(n || []);
224
+ return o(a, "_invoke", {
225
+ value: makeInvokeMethod(t, r, c)
226
+ }), a;
93
227
  }
94
- function tryCatch(fn, obj, arg) {
228
+ function tryCatch(t, e, r) {
95
229
  try {
96
230
  return {
97
231
  type: "normal",
98
- arg: fn.call(obj, arg)
232
+ arg: t.call(e, r)
99
233
  };
100
- } catch (err) {
234
+ } catch (t) {
101
235
  return {
102
236
  type: "throw",
103
- arg: err
237
+ arg: t
104
238
  };
105
239
  }
106
240
  }
107
- exports.wrap = wrap;
108
- var ContinueSentinel = {};
241
+ e.wrap = wrap;
242
+ var h = "suspendedStart",
243
+ l = "suspendedYield",
244
+ f = "executing",
245
+ s = "completed",
246
+ y = {};
109
247
  function Generator() {}
110
248
  function GeneratorFunction() {}
111
249
  function GeneratorFunctionPrototype() {}
112
- var IteratorPrototype = {};
113
- define(IteratorPrototype, iteratorSymbol, function () {
250
+ var p = {};
251
+ define(p, a, function () {
114
252
  return this;
115
253
  });
116
- var getProto = Object.getPrototypeOf,
117
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
118
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
119
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
120
- function defineIteratorMethods(prototype) {
121
- ["next", "throw", "return"].forEach(function (method) {
122
- define(prototype, method, function (arg) {
123
- return this._invoke(method, arg);
254
+ var d = Object.getPrototypeOf,
255
+ v = d && d(d(values([])));
256
+ v && v !== r && n.call(v, a) && (p = v);
257
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
258
+ function defineIteratorMethods(t) {
259
+ ["next", "throw", "return"].forEach(function (e) {
260
+ define(t, e, function (t) {
261
+ return this._invoke(e, t);
124
262
  });
125
263
  });
126
264
  }
127
- function AsyncIterator(generator, PromiseImpl) {
128
- function invoke(method, arg, resolve, reject) {
129
- var record = tryCatch(generator[method], generator, arg);
130
- if ("throw" !== record.type) {
131
- var result = record.arg,
132
- value = result.value;
133
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
134
- invoke("next", value, resolve, reject);
135
- }, function (err) {
136
- invoke("throw", err, resolve, reject);
137
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
138
- result.value = unwrapped, resolve(result);
139
- }, function (error) {
140
- return invoke("throw", error, resolve, reject);
265
+ function AsyncIterator(t, e) {
266
+ function invoke(r, o, i, a) {
267
+ var c = tryCatch(t[r], t, o);
268
+ if ("throw" !== c.type) {
269
+ var u = c.arg,
270
+ h = u.value;
271
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
272
+ invoke("next", t, i, a);
273
+ }, function (t) {
274
+ invoke("throw", t, i, a);
275
+ }) : e.resolve(h).then(function (t) {
276
+ u.value = t, i(u);
277
+ }, function (t) {
278
+ return invoke("throw", t, i, a);
141
279
  });
142
280
  }
143
- reject(record.arg);
281
+ a(c.arg);
144
282
  }
145
- var previousPromise;
146
- this._invoke = function (method, arg) {
147
- function callInvokeWithMethodAndArg() {
148
- return new PromiseImpl(function (resolve, reject) {
149
- invoke(method, arg, resolve, reject);
150
- });
283
+ var r;
284
+ o(this, "_invoke", {
285
+ value: function (t, n) {
286
+ function callInvokeWithMethodAndArg() {
287
+ return new e(function (e, r) {
288
+ invoke(t, n, e, r);
289
+ });
290
+ }
291
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
151
292
  }
152
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
153
- };
293
+ });
154
294
  }
155
- function maybeInvokeDelegate(delegate, context) {
156
- var method = delegate.iterator[context.method];
157
- if (undefined === method) {
158
- if (context.delegate = null, "throw" === context.method) {
159
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
160
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
295
+ function makeInvokeMethod(e, r, n) {
296
+ var o = h;
297
+ return function (i, a) {
298
+ if (o === f) throw new Error("Generator is already running");
299
+ if (o === s) {
300
+ if ("throw" === i) throw a;
301
+ return {
302
+ value: t,
303
+ done: !0
304
+ };
161
305
  }
162
- return ContinueSentinel;
163
- }
164
- var record = tryCatch(method, delegate.iterator, context.arg);
165
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
166
- var info = record.arg;
167
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
306
+ for (n.method = i, n.arg = a;;) {
307
+ var c = n.delegate;
308
+ if (c) {
309
+ var u = maybeInvokeDelegate(c, n);
310
+ if (u) {
311
+ if (u === y) continue;
312
+ return u;
313
+ }
314
+ }
315
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
316
+ if (o === h) throw o = s, n.arg;
317
+ n.dispatchException(n.arg);
318
+ } else "return" === n.method && n.abrupt("return", n.arg);
319
+ o = f;
320
+ var p = tryCatch(e, r, n);
321
+ if ("normal" === p.type) {
322
+ if (o = n.done ? s : l, p.arg === y) continue;
323
+ return {
324
+ value: p.arg,
325
+ done: n.done
326
+ };
327
+ }
328
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
329
+ }
330
+ };
168
331
  }
169
- function pushTryEntry(locs) {
170
- var entry = {
171
- tryLoc: locs[0]
332
+ function maybeInvokeDelegate(e, r) {
333
+ var n = r.method,
334
+ o = e.iterator[n];
335
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
336
+ var i = tryCatch(o, e.iterator, r.arg);
337
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
338
+ var a = i.arg;
339
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
340
+ }
341
+ function pushTryEntry(t) {
342
+ var e = {
343
+ tryLoc: t[0]
172
344
  };
173
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
345
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
174
346
  }
175
- function resetTryEntry(entry) {
176
- var record = entry.completion || {};
177
- record.type = "normal", delete record.arg, entry.completion = record;
347
+ function resetTryEntry(t) {
348
+ var e = t.completion || {};
349
+ e.type = "normal", delete e.arg, t.completion = e;
178
350
  }
179
- function Context(tryLocsList) {
351
+ function Context(t) {
180
352
  this.tryEntries = [{
181
353
  tryLoc: "root"
182
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
183
- }
184
- function values(iterable) {
185
- if (iterable) {
186
- var iteratorMethod = iterable[iteratorSymbol];
187
- if (iteratorMethod) return iteratorMethod.call(iterable);
188
- if ("function" == typeof iterable.next) return iterable;
189
- if (!isNaN(iterable.length)) {
190
- var i = -1,
191
- next = function next() {
192
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
193
- return next.value = undefined, next.done = !0, next;
354
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
355
+ }
356
+ function values(e) {
357
+ if (e || "" === e) {
358
+ var r = e[a];
359
+ if (r) return r.call(e);
360
+ if ("function" == typeof e.next) return e;
361
+ if (!isNaN(e.length)) {
362
+ var o = -1,
363
+ i = function next() {
364
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
365
+ return next.value = t, next.done = !0, next;
194
366
  };
195
- return next.next = next;
367
+ return i.next = i;
196
368
  }
197
369
  }
198
- return {
199
- next: doneResult
200
- };
370
+ throw new TypeError(typeof e + " is not iterable");
201
371
  }
202
- function doneResult() {
372
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
373
+ value: GeneratorFunctionPrototype,
374
+ configurable: !0
375
+ }), o(GeneratorFunctionPrototype, "constructor", {
376
+ value: GeneratorFunction,
377
+ configurable: !0
378
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
379
+ var e = "function" == typeof t && t.constructor;
380
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
381
+ }, e.mark = function (t) {
382
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
383
+ }, e.awrap = function (t) {
203
384
  return {
204
- value: undefined,
205
- done: !0
385
+ __await: t
206
386
  };
207
- }
208
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
209
- var ctor = "function" == typeof genFun && genFun.constructor;
210
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
211
- }, exports.mark = function (genFun) {
212
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
213
- }, exports.awrap = function (arg) {
214
- return {
215
- __await: arg
216
- };
217
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
387
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
218
388
  return this;
219
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
220
- void 0 === PromiseImpl && (PromiseImpl = Promise);
221
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
222
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
223
- return result.done ? result.value : iter.next();
389
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
390
+ void 0 === i && (i = Promise);
391
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
392
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
393
+ return t.done ? t.value : a.next();
224
394
  });
225
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
395
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
226
396
  return this;
227
- }), define(Gp, "toString", function () {
397
+ }), define(g, "toString", function () {
228
398
  return "[object Generator]";
229
- }), exports.keys = function (object) {
230
- var keys = [];
231
- for (var key in object) keys.push(key);
232
- return keys.reverse(), function next() {
233
- for (; keys.length;) {
234
- var key = keys.pop();
235
- if (key in object) return next.value = key, next.done = !1, next;
399
+ }), e.keys = function (t) {
400
+ var e = Object(t),
401
+ r = [];
402
+ for (var n in e) r.push(n);
403
+ return r.reverse(), function next() {
404
+ for (; r.length;) {
405
+ var t = r.pop();
406
+ if (t in e) return next.value = t, next.done = !1, next;
236
407
  }
237
408
  return next.done = !0, next;
238
409
  };
239
- }, exports.values = values, Context.prototype = {
410
+ }, e.values = values, Context.prototype = {
240
411
  constructor: Context,
241
- reset: function (skipTempReset) {
242
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
412
+ reset: function (e) {
413
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
243
414
  },
244
415
  stop: function () {
245
416
  this.done = !0;
246
- var rootRecord = this.tryEntries[0].completion;
247
- if ("throw" === rootRecord.type) throw rootRecord.arg;
417
+ var t = this.tryEntries[0].completion;
418
+ if ("throw" === t.type) throw t.arg;
248
419
  return this.rval;
249
420
  },
250
- dispatchException: function (exception) {
251
- if (this.done) throw exception;
252
- var context = this;
253
- function handle(loc, caught) {
254
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
255
- }
256
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
257
- var entry = this.tryEntries[i],
258
- record = entry.completion;
259
- if ("root" === entry.tryLoc) return handle("end");
260
- if (entry.tryLoc <= this.prev) {
261
- var hasCatch = hasOwn.call(entry, "catchLoc"),
262
- hasFinally = hasOwn.call(entry, "finallyLoc");
263
- if (hasCatch && hasFinally) {
264
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
265
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
266
- } else if (hasCatch) {
267
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
421
+ dispatchException: function (e) {
422
+ if (this.done) throw e;
423
+ var r = this;
424
+ function handle(n, o) {
425
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
426
+ }
427
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
428
+ var i = this.tryEntries[o],
429
+ a = i.completion;
430
+ if ("root" === i.tryLoc) return handle("end");
431
+ if (i.tryLoc <= this.prev) {
432
+ var c = n.call(i, "catchLoc"),
433
+ u = n.call(i, "finallyLoc");
434
+ if (c && u) {
435
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
436
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
437
+ } else if (c) {
438
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
268
439
  } else {
269
- if (!hasFinally) throw new Error("try statement without catch or finally");
270
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
440
+ if (!u) throw new Error("try statement without catch or finally");
441
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
271
442
  }
272
443
  }
273
444
  }
274
445
  },
275
- abrupt: function (type, arg) {
276
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
277
- var entry = this.tryEntries[i];
278
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
279
- var finallyEntry = entry;
446
+ abrupt: function (t, e) {
447
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
448
+ var o = this.tryEntries[r];
449
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
450
+ var i = o;
280
451
  break;
281
452
  }
282
453
  }
283
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
284
- var record = finallyEntry ? finallyEntry.completion : {};
285
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
454
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
455
+ var a = i ? i.completion : {};
456
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
286
457
  },
287
- complete: function (record, afterLoc) {
288
- if ("throw" === record.type) throw record.arg;
289
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
458
+ complete: function (t, e) {
459
+ if ("throw" === t.type) throw t.arg;
460
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
290
461
  },
291
- finish: function (finallyLoc) {
292
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
293
- var entry = this.tryEntries[i];
294
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
462
+ finish: function (t) {
463
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
464
+ var r = this.tryEntries[e];
465
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
295
466
  }
296
467
  },
297
- catch: function (tryLoc) {
298
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
299
- var entry = this.tryEntries[i];
300
- if (entry.tryLoc === tryLoc) {
301
- var record = entry.completion;
302
- if ("throw" === record.type) {
303
- var thrown = record.arg;
304
- resetTryEntry(entry);
468
+ catch: function (t) {
469
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
470
+ var r = this.tryEntries[e];
471
+ if (r.tryLoc === t) {
472
+ var n = r.completion;
473
+ if ("throw" === n.type) {
474
+ var o = n.arg;
475
+ resetTryEntry(r);
305
476
  }
306
- return thrown;
477
+ return o;
307
478
  }
308
479
  }
309
480
  throw new Error("illegal catch attempt");
310
481
  },
311
- delegateYield: function (iterable, resultName, nextLoc) {
482
+ delegateYield: function (e, r, n) {
312
483
  return this.delegate = {
313
- iterator: values(iterable),
314
- resultName: resultName,
315
- nextLoc: nextLoc
316
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
484
+ iterator: values(e),
485
+ resultName: r,
486
+ nextLoc: n
487
+ }, "next" === this.method && (this.arg = t), y;
317
488
  }
318
- }, exports;
489
+ }, e;
319
490
  }
320
- function _typeof(obj) {
491
+ function _toPrimitive(t, r) {
492
+ if ("object" != typeof t || !t) return t;
493
+ var e = t[Symbol.toPrimitive];
494
+ if (void 0 !== e) {
495
+ var i = e.call(t, r || "default");
496
+ if ("object" != typeof i) return i;
497
+ throw new TypeError("@@toPrimitive must return a primitive value.");
498
+ }
499
+ return ("string" === r ? String : Number)(t);
500
+ }
501
+ function _toPropertyKey(t) {
502
+ var i = _toPrimitive(t, "string");
503
+ return "symbol" == typeof i ? i : String(i);
504
+ }
505
+ function _typeof(o) {
321
506
  "@babel/helpers - typeof";
322
507
 
323
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
324
- return typeof obj;
325
- } : function (obj) {
326
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
327
- }, _typeof(obj);
508
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
509
+ return typeof o;
510
+ } : function (o) {
511
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
512
+ }, _typeof(o);
513
+ }
514
+ function _wrapAsyncGenerator(fn) {
515
+ return function () {
516
+ return new _AsyncGenerator(fn.apply(this, arguments));
517
+ };
328
518
  }
329
519
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
330
520
  try {
@@ -367,7 +557,7 @@
367
557
  descriptor.enumerable = descriptor.enumerable || false;
368
558
  descriptor.configurable = true;
369
559
  if ("value" in descriptor) descriptor.writable = true;
370
- Object.defineProperty(target, descriptor.key, descriptor);
560
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
371
561
  }
372
562
  }
373
563
  function _createClass(Constructor, protoProps, staticProps) {
@@ -379,6 +569,7 @@
379
569
  return Constructor;
380
570
  }
381
571
  function _defineProperty(obj, key, value) {
572
+ key = _toPropertyKey(key);
382
573
  if (key in obj) {
383
574
  Object.defineProperty(obj, key, {
384
575
  value: value,
@@ -409,30 +600,6 @@
409
600
  function _iterableToArray(iter) {
410
601
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
411
602
  }
412
- function _iterableToArrayLimit(arr, i) {
413
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
414
- if (_i == null) return;
415
- var _arr = [];
416
- var _n = true;
417
- var _d = false;
418
- var _s, _e;
419
- try {
420
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
421
- _arr.push(_s.value);
422
- if (i && _arr.length === i) break;
423
- }
424
- } catch (err) {
425
- _d = true;
426
- _e = err;
427
- } finally {
428
- try {
429
- if (!_n && _i["return"] != null) _i["return"]();
430
- } finally {
431
- if (_d) throw _e;
432
- }
433
- }
434
- return _arr;
435
- }
436
603
  function _unsupportedIterableToArray(o, minLen) {
437
604
  if (!o) return;
438
605
  if (typeof o === "string") return _arrayLikeToArray(o, minLen);
@@ -452,6 +619,57 @@
452
619
  function _nonIterableRest() {
453
620
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
454
621
  }
622
+ function _createForOfIteratorHelper(o, allowArrayLike) {
623
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
624
+ if (!it) {
625
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
626
+ if (it) o = it;
627
+ var i = 0;
628
+ var F = function () {};
629
+ return {
630
+ s: F,
631
+ n: function () {
632
+ if (i >= o.length) return {
633
+ done: true
634
+ };
635
+ return {
636
+ done: false,
637
+ value: o[i++]
638
+ };
639
+ },
640
+ e: function (e) {
641
+ throw e;
642
+ },
643
+ f: F
644
+ };
645
+ }
646
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
647
+ }
648
+ var normalCompletion = true,
649
+ didErr = false,
650
+ err;
651
+ return {
652
+ s: function () {
653
+ it = it.call(o);
654
+ },
655
+ n: function () {
656
+ var step = it.next();
657
+ normalCompletion = step.done;
658
+ return step;
659
+ },
660
+ e: function (e) {
661
+ didErr = true;
662
+ err = e;
663
+ },
664
+ f: function () {
665
+ try {
666
+ if (!normalCompletion && it.return != null) it.return();
667
+ } finally {
668
+ if (didErr) throw err;
669
+ }
670
+ }
671
+ };
672
+ }
455
673
 
456
674
  function bind(fn, thisArg) {
457
675
  return function wrap() {
@@ -667,6 +885,12 @@
667
885
  * @returns {boolean} True if value is a URLSearchParams object, otherwise false
668
886
  */
669
887
  var isURLSearchParams = kindOfTest('URLSearchParams');
888
+ var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
889
+ _map2 = _slicedToArray(_map, 4),
890
+ isReadableStream = _map2[0],
891
+ isRequest = _map2[1],
892
+ isResponse = _map2[2],
893
+ isHeaders = _map2[3];
670
894
 
671
895
  /**
672
896
  * Trim excess whitespace off the beginning and end of a string
@@ -766,8 +990,8 @@
766
990
  *
767
991
  * @returns {Object} Result of all merge properties
768
992
  */
769
- function /* obj1, obj2, obj3, ... */
770
- merge() {
993
+ function merge( /* obj1, obj2, obj3, ... */
994
+ ) {
771
995
  var _ref2 = isContextDefined(this) && this || {},
772
996
  caseless = _ref2.caseless;
773
997
  var result = {};
@@ -1040,8 +1264,7 @@
1040
1264
  };
1041
1265
  var noop = function noop() {};
1042
1266
  var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
1043
- value = +value;
1044
- return Number.isFinite(value) ? value : defaultValue;
1267
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
1045
1268
  };
1046
1269
  var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
1047
1270
  var DIGIT = '0123456789';
@@ -1108,6 +1331,10 @@
1108
1331
  isBoolean: isBoolean,
1109
1332
  isObject: isObject,
1110
1333
  isPlainObject: isPlainObject,
1334
+ isReadableStream: isReadableStream,
1335
+ isRequest: isRequest,
1336
+ isResponse: isResponse,
1337
+ isHeaders: isHeaders,
1111
1338
  isUndefined: isUndefined,
1112
1339
  isDate: isDate,
1113
1340
  isFile: isFile,
@@ -1639,12 +1866,14 @@
1639
1866
  // eslint-disable-next-line no-undef
1640
1867
  self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
1641
1868
  }();
1869
+ var origin = hasBrowserEnv && window.location.href || 'http://localhost';
1642
1870
 
1643
1871
  var utils = /*#__PURE__*/Object.freeze({
1644
1872
  __proto__: null,
1645
1873
  hasBrowserEnv: hasBrowserEnv,
1646
1874
  hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1647
- hasStandardBrowserEnv: hasStandardBrowserEnv
1875
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
1876
+ origin: origin
1648
1877
  });
1649
1878
 
1650
1879
  var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
@@ -1764,7 +1993,7 @@
1764
1993
  }
1765
1994
  var defaults = {
1766
1995
  transitional: transitionalDefaults,
1767
- adapter: ['xhr', 'http'],
1996
+ adapter: ['xhr', 'http', 'fetch'],
1768
1997
  transformRequest: [function transformRequest(data, headers) {
1769
1998
  var contentType = headers.getContentType() || '';
1770
1999
  var hasJSONContentType = contentType.indexOf('application/json') > -1;
@@ -1774,12 +2003,9 @@
1774
2003
  }
1775
2004
  var isFormData = utils$1.isFormData(data);
1776
2005
  if (isFormData) {
1777
- if (!hasJSONContentType) {
1778
- return data;
1779
- }
1780
2006
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1781
2007
  }
1782
- if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
2008
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
1783
2009
  return data;
1784
2010
  }
1785
2011
  if (utils$1.isArrayBufferView(data)) {
@@ -1811,6 +2037,9 @@
1811
2037
  var transitional = this.transitional || defaults.transitional;
1812
2038
  var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1813
2039
  var JSONRequested = this.responseType === 'json';
2040
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
2041
+ return data;
2042
+ }
1814
2043
  if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
1815
2044
  var silentJSONParsing = transitional && transitional.silentJSONParsing;
1816
2045
  var strictJSONParsing = !silentJSONParsing && JSONRequested;
@@ -1979,6 +2208,21 @@
1979
2208
  setHeaders(header, valueOrRewrite);
1980
2209
  } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1981
2210
  setHeaders(parseHeaders(header), valueOrRewrite);
2211
+ } else if (utils$1.isHeaders(header)) {
2212
+ var _iterator = _createForOfIteratorHelper(header.entries()),
2213
+ _step;
2214
+ try {
2215
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
2216
+ var _step$value = _slicedToArray(_step.value, 2),
2217
+ key = _step$value[0],
2218
+ value = _step$value[1];
2219
+ setHeader(value, key, rewrite);
2220
+ }
2221
+ } catch (err) {
2222
+ _iterator.e(err);
2223
+ } finally {
2224
+ _iterator.f();
2225
+ }
1982
2226
  } else {
1983
2227
  header != null && setHeader(valueOrRewrite, header, rewrite);
1984
2228
  }
@@ -2230,6 +2474,164 @@
2230
2474
  }
2231
2475
  }
2232
2476
 
2477
+ function parseProtocol(url) {
2478
+ var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2479
+ return match && match[1] || '';
2480
+ }
2481
+
2482
+ /**
2483
+ * Calculate data maxRate
2484
+ * @param {Number} [samplesCount= 10]
2485
+ * @param {Number} [min= 1000]
2486
+ * @returns {Function}
2487
+ */
2488
+ function speedometer(samplesCount, min) {
2489
+ samplesCount = samplesCount || 10;
2490
+ var bytes = new Array(samplesCount);
2491
+ var timestamps = new Array(samplesCount);
2492
+ var head = 0;
2493
+ var tail = 0;
2494
+ var firstSampleTS;
2495
+ min = min !== undefined ? min : 1000;
2496
+ return function push(chunkLength) {
2497
+ var now = Date.now();
2498
+ var startedAt = timestamps[tail];
2499
+ if (!firstSampleTS) {
2500
+ firstSampleTS = now;
2501
+ }
2502
+ bytes[head] = chunkLength;
2503
+ timestamps[head] = now;
2504
+ var i = tail;
2505
+ var bytesCount = 0;
2506
+ while (i !== head) {
2507
+ bytesCount += bytes[i++];
2508
+ i = i % samplesCount;
2509
+ }
2510
+ head = (head + 1) % samplesCount;
2511
+ if (head === tail) {
2512
+ tail = (tail + 1) % samplesCount;
2513
+ }
2514
+ if (now - firstSampleTS < min) {
2515
+ return;
2516
+ }
2517
+ var passed = startedAt && now - startedAt;
2518
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2519
+ };
2520
+ }
2521
+
2522
+ /**
2523
+ * Throttle decorator
2524
+ * @param {Function} fn
2525
+ * @param {Number} freq
2526
+ * @return {Function}
2527
+ */
2528
+ function throttle(fn, freq) {
2529
+ var timestamp = 0;
2530
+ var threshold = 1000 / freq;
2531
+ var timer = null;
2532
+ return function throttled() {
2533
+ var _arguments = arguments;
2534
+ var force = this === true;
2535
+ var now = Date.now();
2536
+ if (force || now - timestamp > threshold) {
2537
+ if (timer) {
2538
+ clearTimeout(timer);
2539
+ timer = null;
2540
+ }
2541
+ timestamp = now;
2542
+ return fn.apply(null, arguments);
2543
+ }
2544
+ if (!timer) {
2545
+ timer = setTimeout(function () {
2546
+ timer = null;
2547
+ timestamp = Date.now();
2548
+ return fn.apply(null, _arguments);
2549
+ }, threshold - (now - timestamp));
2550
+ }
2551
+ };
2552
+ }
2553
+
2554
+ var progressEventReducer = (function (listener, isDownloadStream) {
2555
+ var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
2556
+ var bytesNotified = 0;
2557
+ var _speedometer = speedometer(50, 250);
2558
+ return throttle(function (e) {
2559
+ var loaded = e.loaded;
2560
+ var total = e.lengthComputable ? e.total : undefined;
2561
+ var progressBytes = loaded - bytesNotified;
2562
+ var rate = _speedometer(progressBytes);
2563
+ var inRange = loaded <= total;
2564
+ bytesNotified = loaded;
2565
+ var data = {
2566
+ loaded: loaded,
2567
+ total: total,
2568
+ progress: total ? loaded / total : undefined,
2569
+ bytes: progressBytes,
2570
+ rate: rate ? rate : undefined,
2571
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2572
+ event: e,
2573
+ lengthComputable: total != null
2574
+ };
2575
+ data[isDownloadStream ? 'download' : 'upload'] = true;
2576
+ listener(data);
2577
+ }, freq);
2578
+ });
2579
+
2580
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ?
2581
+ // Standard browser envs have full support of the APIs needed to test
2582
+ // whether the request URL is of the same origin as current location.
2583
+ function standardBrowserEnv() {
2584
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
2585
+ var urlParsingNode = document.createElement('a');
2586
+ var originURL;
2587
+
2588
+ /**
2589
+ * Parse a URL to discover its components
2590
+ *
2591
+ * @param {String} url The URL to be parsed
2592
+ * @returns {Object}
2593
+ */
2594
+ function resolveURL(url) {
2595
+ var href = url;
2596
+ if (msie) {
2597
+ // IE needs attribute set twice to normalize properties
2598
+ urlParsingNode.setAttribute('href', href);
2599
+ href = urlParsingNode.href;
2600
+ }
2601
+ urlParsingNode.setAttribute('href', href);
2602
+
2603
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2604
+ return {
2605
+ href: urlParsingNode.href,
2606
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2607
+ host: urlParsingNode.host,
2608
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2609
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2610
+ hostname: urlParsingNode.hostname,
2611
+ port: urlParsingNode.port,
2612
+ pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
2613
+ };
2614
+ }
2615
+ originURL = resolveURL(window.location.href);
2616
+
2617
+ /**
2618
+ * Determine if a URL shares the same origin as the current location
2619
+ *
2620
+ * @param {String} requestURL The URL to test
2621
+ * @returns {boolean} True if URL shares the same origin, otherwise false
2622
+ */
2623
+ return function isURLSameOrigin(requestURL) {
2624
+ var parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
2625
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
2626
+ };
2627
+ }() :
2628
+ // Non standard browser envs (web workers, react-native) lack needed support.
2629
+ function nonStandardBrowserEnv() {
2630
+ return function isURLSameOrigin() {
2631
+ return true;
2632
+ };
2633
+ }();
2634
+
2233
2635
  var cookies = platform.hasStandardBrowserEnv ?
2234
2636
  // Standard browser envs support document.cookie
2235
2637
  {
@@ -2301,173 +2703,179 @@
2301
2703
  return requestedURL;
2302
2704
  }
2303
2705
 
2304
- var isURLSameOrigin = platform.hasStandardBrowserEnv ?
2305
- // Standard browser envs have full support of the APIs needed to test
2306
- // whether the request URL is of the same origin as current location.
2307
- function standardBrowserEnv() {
2308
- var msie = /(msie|trident)/i.test(navigator.userAgent);
2309
- var urlParsingNode = document.createElement('a');
2310
- var originURL;
2706
+ var headersToObject = function headersToObject(thing) {
2707
+ return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing;
2708
+ };
2311
2709
 
2312
- /**
2313
- * Parse a URL to discover its components
2314
- *
2315
- * @param {String} url The URL to be parsed
2316
- * @returns {Object}
2317
- */
2318
- function resolveURL(url) {
2319
- var href = url;
2320
- if (msie) {
2321
- // IE needs attribute set twice to normalize properties
2322
- urlParsingNode.setAttribute('href', href);
2323
- href = urlParsingNode.href;
2324
- }
2325
- urlParsingNode.setAttribute('href', href);
2326
-
2327
- // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2328
- return {
2329
- href: urlParsingNode.href,
2330
- protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2331
- host: urlParsingNode.host,
2332
- search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2333
- hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2334
- hostname: urlParsingNode.hostname,
2335
- port: urlParsingNode.port,
2336
- pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
2337
- };
2710
+ /**
2711
+ * Config-specific merge-function which creates a new config-object
2712
+ * by merging two configuration objects together.
2713
+ *
2714
+ * @param {Object} config1
2715
+ * @param {Object} config2
2716
+ *
2717
+ * @returns {Object} New object resulting from merging config2 to config1
2718
+ */
2719
+ function mergeConfig(config1, config2) {
2720
+ // eslint-disable-next-line no-param-reassign
2721
+ config2 = config2 || {};
2722
+ var config = {};
2723
+ function getMergedValue(target, source, caseless) {
2724
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2725
+ return utils$1.merge.call({
2726
+ caseless: caseless
2727
+ }, target, source);
2728
+ } else if (utils$1.isPlainObject(source)) {
2729
+ return utils$1.merge({}, source);
2730
+ } else if (utils$1.isArray(source)) {
2731
+ return source.slice();
2732
+ }
2733
+ return source;
2338
2734
  }
2339
- originURL = resolveURL(window.location.href);
2340
-
2341
- /**
2342
- * Determine if a URL shares the same origin as the current location
2343
- *
2344
- * @param {String} requestURL The URL to test
2345
- * @returns {boolean} True if URL shares the same origin, otherwise false
2346
- */
2347
- return function isURLSameOrigin(requestURL) {
2348
- var parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
2349
- return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
2350
- };
2351
- }() :
2352
- // Non standard browser envs (web workers, react-native) lack needed support.
2353
- function nonStandardBrowserEnv() {
2354
- return function isURLSameOrigin() {
2355
- return true;
2356
- };
2357
- }();
2358
2735
 
2359
- function parseProtocol(url) {
2360
- var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2361
- return match && match[1] || '';
2362
- }
2736
+ // eslint-disable-next-line consistent-return
2737
+ function mergeDeepProperties(a, b, caseless) {
2738
+ if (!utils$1.isUndefined(b)) {
2739
+ return getMergedValue(a, b, caseless);
2740
+ } else if (!utils$1.isUndefined(a)) {
2741
+ return getMergedValue(undefined, a, caseless);
2742
+ }
2743
+ }
2363
2744
 
2364
- /**
2365
- * Calculate data maxRate
2366
- * @param {Number} [samplesCount= 10]
2367
- * @param {Number} [min= 1000]
2368
- * @returns {Function}
2369
- */
2370
- function speedometer(samplesCount, min) {
2371
- samplesCount = samplesCount || 10;
2372
- var bytes = new Array(samplesCount);
2373
- var timestamps = new Array(samplesCount);
2374
- var head = 0;
2375
- var tail = 0;
2376
- var firstSampleTS;
2377
- min = min !== undefined ? min : 1000;
2378
- return function push(chunkLength) {
2379
- var now = Date.now();
2380
- var startedAt = timestamps[tail];
2381
- if (!firstSampleTS) {
2382
- firstSampleTS = now;
2745
+ // eslint-disable-next-line consistent-return
2746
+ function valueFromConfig2(a, b) {
2747
+ if (!utils$1.isUndefined(b)) {
2748
+ return getMergedValue(undefined, b);
2383
2749
  }
2384
- bytes[head] = chunkLength;
2385
- timestamps[head] = now;
2386
- var i = tail;
2387
- var bytesCount = 0;
2388
- while (i !== head) {
2389
- bytesCount += bytes[i++];
2390
- i = i % samplesCount;
2750
+ }
2751
+
2752
+ // eslint-disable-next-line consistent-return
2753
+ function defaultToConfig2(a, b) {
2754
+ if (!utils$1.isUndefined(b)) {
2755
+ return getMergedValue(undefined, b);
2756
+ } else if (!utils$1.isUndefined(a)) {
2757
+ return getMergedValue(undefined, a);
2391
2758
  }
2392
- head = (head + 1) % samplesCount;
2393
- if (head === tail) {
2394
- tail = (tail + 1) % samplesCount;
2759
+ }
2760
+
2761
+ // eslint-disable-next-line consistent-return
2762
+ function mergeDirectKeys(a, b, prop) {
2763
+ if (prop in config2) {
2764
+ return getMergedValue(a, b);
2765
+ } else if (prop in config1) {
2766
+ return getMergedValue(undefined, a);
2395
2767
  }
2396
- if (now - firstSampleTS < min) {
2397
- return;
2768
+ }
2769
+ var mergeMap = {
2770
+ url: valueFromConfig2,
2771
+ method: valueFromConfig2,
2772
+ data: valueFromConfig2,
2773
+ baseURL: defaultToConfig2,
2774
+ transformRequest: defaultToConfig2,
2775
+ transformResponse: defaultToConfig2,
2776
+ paramsSerializer: defaultToConfig2,
2777
+ timeout: defaultToConfig2,
2778
+ timeoutMessage: defaultToConfig2,
2779
+ withCredentials: defaultToConfig2,
2780
+ withXSRFToken: defaultToConfig2,
2781
+ adapter: defaultToConfig2,
2782
+ responseType: defaultToConfig2,
2783
+ xsrfCookieName: defaultToConfig2,
2784
+ xsrfHeaderName: defaultToConfig2,
2785
+ onUploadProgress: defaultToConfig2,
2786
+ onDownloadProgress: defaultToConfig2,
2787
+ decompress: defaultToConfig2,
2788
+ maxContentLength: defaultToConfig2,
2789
+ maxBodyLength: defaultToConfig2,
2790
+ beforeRedirect: defaultToConfig2,
2791
+ transport: defaultToConfig2,
2792
+ httpAgent: defaultToConfig2,
2793
+ httpsAgent: defaultToConfig2,
2794
+ cancelToken: defaultToConfig2,
2795
+ socketPath: defaultToConfig2,
2796
+ responseEncoding: defaultToConfig2,
2797
+ validateStatus: mergeDirectKeys,
2798
+ headers: function headers(a, b) {
2799
+ return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
2398
2800
  }
2399
- var passed = startedAt && now - startedAt;
2400
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2401
2801
  };
2802
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2803
+ var merge = mergeMap[prop] || mergeDeepProperties;
2804
+ var configValue = merge(config1[prop], config2[prop], prop);
2805
+ utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
2806
+ });
2807
+ return config;
2402
2808
  }
2403
2809
 
2404
- function progressEventReducer(listener, isDownloadStream) {
2405
- var bytesNotified = 0;
2406
- var _speedometer = speedometer(50, 250);
2407
- return function (e) {
2408
- var loaded = e.loaded;
2409
- var total = e.lengthComputable ? e.total : undefined;
2410
- var progressBytes = loaded - bytesNotified;
2411
- var rate = _speedometer(progressBytes);
2412
- var inRange = loaded <= total;
2413
- bytesNotified = loaded;
2414
- var data = {
2415
- loaded: loaded,
2416
- total: total,
2417
- progress: total ? loaded / total : undefined,
2418
- bytes: progressBytes,
2419
- rate: rate ? rate : undefined,
2420
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2421
- event: e
2422
- };
2423
- data[isDownloadStream ? 'download' : 'upload'] = true;
2424
- listener(data);
2425
- };
2426
- }
2810
+ var resolveConfig = (function (config) {
2811
+ var newConfig = mergeConfig({}, config);
2812
+ var data = newConfig.data,
2813
+ withXSRFToken = newConfig.withXSRFToken,
2814
+ xsrfHeaderName = newConfig.xsrfHeaderName,
2815
+ xsrfCookieName = newConfig.xsrfCookieName,
2816
+ headers = newConfig.headers,
2817
+ auth = newConfig.auth;
2818
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
2819
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
2820
+
2821
+ // HTTP basic authentication
2822
+ if (auth) {
2823
+ headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
2824
+ }
2825
+ var contentType;
2826
+ if (utils$1.isFormData(data)) {
2827
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2828
+ headers.setContentType(undefined); // Let the browser set it
2829
+ } else if ((contentType = headers.getContentType()) !== false) {
2830
+ // fix semicolon duplication issue for ReactNative FormData implementation
2831
+ var _ref = contentType ? contentType.split(';').map(function (token) {
2832
+ return token.trim();
2833
+ }).filter(Boolean) : [],
2834
+ _ref2 = _toArray(_ref),
2835
+ type = _ref2[0],
2836
+ tokens = _ref2.slice(1);
2837
+ headers.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
2838
+ }
2839
+ }
2840
+
2841
+ // Add xsrf header
2842
+ // This is only done if running in a standard browser environment.
2843
+ // Specifically not if we're in a web worker, or react-native.
2844
+
2845
+ if (platform.hasStandardBrowserEnv) {
2846
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
2847
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
2848
+ // Add xsrf header
2849
+ var xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
2850
+ if (xsrfValue) {
2851
+ headers.set(xsrfHeaderName, xsrfValue);
2852
+ }
2853
+ }
2854
+ }
2855
+ return newConfig;
2856
+ });
2857
+
2427
2858
  var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2428
2859
  var xhrAdapter = isXHRAdapterSupported && function (config) {
2429
2860
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2430
- var requestData = config.data;
2431
- var requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
2432
- var responseType = config.responseType,
2433
- withXSRFToken = config.withXSRFToken;
2861
+ var _config = resolveConfig(config);
2862
+ var requestData = _config.data;
2863
+ var requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
2864
+ var responseType = _config.responseType;
2434
2865
  var onCanceled;
2435
2866
  function done() {
2436
- if (config.cancelToken) {
2437
- config.cancelToken.unsubscribe(onCanceled);
2438
- }
2439
- if (config.signal) {
2440
- config.signal.removeEventListener('abort', onCanceled);
2867
+ if (_config.cancelToken) {
2868
+ _config.cancelToken.unsubscribe(onCanceled);
2441
2869
  }
2442
- }
2443
- var contentType;
2444
- if (utils$1.isFormData(requestData)) {
2445
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2446
- requestHeaders.setContentType(false); // Let the browser set it
2447
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
2448
- // fix semicolon duplication issue for ReactNative FormData implementation
2449
- var _ref = contentType ? contentType.split(';').map(function (token) {
2450
- return token.trim();
2451
- }).filter(Boolean) : [],
2452
- _ref2 = _toArray(_ref),
2453
- type = _ref2[0],
2454
- tokens = _ref2.slice(1);
2455
- requestHeaders.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
2870
+ if (_config.signal) {
2871
+ _config.signal.removeEventListener('abort', onCanceled);
2456
2872
  }
2457
2873
  }
2458
2874
  var request = new XMLHttpRequest();
2459
-
2460
- // HTTP basic authentication
2461
- if (config.auth) {
2462
- var username = config.auth.username || '';
2463
- var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
2464
- requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
2465
- }
2466
- var fullPath = buildFullPath(config.baseURL, config.url);
2467
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
2875
+ request.open(_config.method.toUpperCase(), _config.url, true);
2468
2876
 
2469
2877
  // Set the request timeout in MS
2470
- request.timeout = config.timeout;
2878
+ request.timeout = _config.timeout;
2471
2879
  function onloadend() {
2472
2880
  if (!request) {
2473
2881
  return;
@@ -2522,7 +2930,7 @@
2522
2930
  if (!request) {
2523
2931
  return;
2524
2932
  }
2525
- reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
2933
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, _config, request));
2526
2934
 
2527
2935
  // Clean up request
2528
2936
  request = null;
@@ -2532,7 +2940,7 @@
2532
2940
  request.onerror = function handleError() {
2533
2941
  // Real errors are hidden from us by the browser
2534
2942
  // onerror should only fire if it's a network error
2535
- reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
2943
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, _config, request));
2536
2944
 
2537
2945
  // Clean up request
2538
2946
  request = null;
@@ -2540,31 +2948,17 @@
2540
2948
 
2541
2949
  // Handle timeout
2542
2950
  request.ontimeout = function handleTimeout() {
2543
- var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
2544
- var transitional = config.transitional || transitionalDefaults;
2545
- if (config.timeoutErrorMessage) {
2546
- timeoutErrorMessage = config.timeoutErrorMessage;
2951
+ var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
2952
+ var transitional = _config.transitional || transitionalDefaults;
2953
+ if (_config.timeoutErrorMessage) {
2954
+ timeoutErrorMessage = _config.timeoutErrorMessage;
2547
2955
  }
2548
- reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, request));
2956
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, _config, request));
2549
2957
 
2550
2958
  // Clean up request
2551
2959
  request = null;
2552
2960
  };
2553
2961
 
2554
- // Add xsrf header
2555
- // This is only done if running in a standard browser environment.
2556
- // Specifically not if we're in a web worker, or react-native.
2557
- if (platform.hasStandardBrowserEnv) {
2558
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
2559
- if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(fullPath)) {
2560
- // Add xsrf header
2561
- var xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2562
- if (xsrfValue) {
2563
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2564
- }
2565
- }
2566
- }
2567
-
2568
2962
  // Remove Content-Type if data is undefined
2569
2963
  requestData === undefined && requestHeaders.setContentType(null);
2570
2964
 
@@ -2576,25 +2970,25 @@
2576
2970
  }
2577
2971
 
2578
2972
  // Add withCredentials to request if needed
2579
- if (!utils$1.isUndefined(config.withCredentials)) {
2580
- request.withCredentials = !!config.withCredentials;
2973
+ if (!utils$1.isUndefined(_config.withCredentials)) {
2974
+ request.withCredentials = !!_config.withCredentials;
2581
2975
  }
2582
2976
 
2583
2977
  // Add responseType to request if needed
2584
2978
  if (responseType && responseType !== 'json') {
2585
- request.responseType = config.responseType;
2979
+ request.responseType = _config.responseType;
2586
2980
  }
2587
2981
 
2588
2982
  // Handle progress if needed
2589
- if (typeof config.onDownloadProgress === 'function') {
2590
- request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
2983
+ if (typeof _config.onDownloadProgress === 'function') {
2984
+ request.addEventListener('progress', progressEventReducer(_config.onDownloadProgress, true));
2591
2985
  }
2592
2986
 
2593
2987
  // Not all browsers support upload events
2594
- if (typeof config.onUploadProgress === 'function' && request.upload) {
2595
- request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
2988
+ if (typeof _config.onUploadProgress === 'function' && request.upload) {
2989
+ request.upload.addEventListener('progress', progressEventReducer(_config.onUploadProgress));
2596
2990
  }
2597
- if (config.cancelToken || config.signal) {
2991
+ if (_config.cancelToken || _config.signal) {
2598
2992
  // Handle cancellation
2599
2993
  // eslint-disable-next-line func-names
2600
2994
  onCanceled = function onCanceled(cancel) {
@@ -2605,12 +2999,12 @@
2605
2999
  request.abort();
2606
3000
  request = null;
2607
3001
  };
2608
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
2609
- if (config.signal) {
2610
- config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
3002
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
3003
+ if (_config.signal) {
3004
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
2611
3005
  }
2612
3006
  }
2613
- var protocol = parseProtocol(fullPath);
3007
+ var protocol = parseProtocol(_config.url);
2614
3008
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
2615
3009
  reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
2616
3010
  return;
@@ -2621,9 +3015,464 @@
2621
3015
  });
2622
3016
  };
2623
3017
 
3018
+ var composeSignals = function composeSignals(signals, timeout) {
3019
+ var controller = new AbortController();
3020
+ var aborted;
3021
+ var onabort = function onabort(cancel) {
3022
+ if (!aborted) {
3023
+ aborted = true;
3024
+ unsubscribe();
3025
+ var err = cancel instanceof Error ? cancel : this.reason;
3026
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
3027
+ }
3028
+ };
3029
+ var timer = timeout && setTimeout(function () {
3030
+ onabort(new AxiosError("timeout ".concat(timeout, " of ms exceeded"), AxiosError.ETIMEDOUT));
3031
+ }, timeout);
3032
+ var unsubscribe = function unsubscribe() {
3033
+ if (signals) {
3034
+ timer && clearTimeout(timer);
3035
+ timer = null;
3036
+ signals.forEach(function (signal) {
3037
+ signal && (signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort));
3038
+ });
3039
+ signals = null;
3040
+ }
3041
+ };
3042
+ signals.forEach(function (signal) {
3043
+ return signal && signal.addEventListener && signal.addEventListener('abort', onabort);
3044
+ });
3045
+ var signal = controller.signal;
3046
+ signal.unsubscribe = unsubscribe;
3047
+ return [signal, function () {
3048
+ timer && clearTimeout(timer);
3049
+ timer = null;
3050
+ }];
3051
+ };
3052
+ var composeSignals$1 = composeSignals;
3053
+
3054
+ var streamChunk = /*#__PURE__*/_regeneratorRuntime().mark(function streamChunk(chunk, chunkSize) {
3055
+ var len, pos, end;
3056
+ return _regeneratorRuntime().wrap(function streamChunk$(_context) {
3057
+ while (1) switch (_context.prev = _context.next) {
3058
+ case 0:
3059
+ len = chunk.byteLength;
3060
+ if (!(!chunkSize || len < chunkSize)) {
3061
+ _context.next = 5;
3062
+ break;
3063
+ }
3064
+ _context.next = 4;
3065
+ return chunk;
3066
+ case 4:
3067
+ return _context.abrupt("return");
3068
+ case 5:
3069
+ pos = 0;
3070
+ case 6:
3071
+ if (!(pos < len)) {
3072
+ _context.next = 13;
3073
+ break;
3074
+ }
3075
+ end = pos + chunkSize;
3076
+ _context.next = 10;
3077
+ return chunk.slice(pos, end);
3078
+ case 10:
3079
+ pos = end;
3080
+ _context.next = 6;
3081
+ break;
3082
+ case 13:
3083
+ case "end":
3084
+ return _context.stop();
3085
+ }
3086
+ }, streamChunk);
3087
+ });
3088
+ var readBytes = /*#__PURE__*/function () {
3089
+ var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize, encode) {
3090
+ var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
3091
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
3092
+ while (1) switch (_context2.prev = _context2.next) {
3093
+ case 0:
3094
+ _iteratorAbruptCompletion = false;
3095
+ _didIteratorError = false;
3096
+ _context2.prev = 2;
3097
+ _iterator = _asyncIterator(iterable);
3098
+ case 4:
3099
+ _context2.next = 6;
3100
+ return _awaitAsyncGenerator(_iterator.next());
3101
+ case 6:
3102
+ if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
3103
+ _context2.next = 27;
3104
+ break;
3105
+ }
3106
+ chunk = _step.value;
3107
+ _context2.t0 = _asyncGeneratorDelegate;
3108
+ _context2.t1 = _asyncIterator;
3109
+ _context2.t2 = streamChunk;
3110
+ if (!ArrayBuffer.isView(chunk)) {
3111
+ _context2.next = 15;
3112
+ break;
3113
+ }
3114
+ _context2.t3 = chunk;
3115
+ _context2.next = 18;
3116
+ break;
3117
+ case 15:
3118
+ _context2.next = 17;
3119
+ return _awaitAsyncGenerator(encode(String(chunk)));
3120
+ case 17:
3121
+ _context2.t3 = _context2.sent;
3122
+ case 18:
3123
+ _context2.t4 = _context2.t3;
3124
+ _context2.t5 = chunkSize;
3125
+ _context2.t6 = (0, _context2.t2)(_context2.t4, _context2.t5);
3126
+ _context2.t7 = (0, _context2.t1)(_context2.t6);
3127
+ _context2.t8 = _awaitAsyncGenerator;
3128
+ return _context2.delegateYield((0, _context2.t0)(_context2.t7, _context2.t8), "t9", 24);
3129
+ case 24:
3130
+ _iteratorAbruptCompletion = false;
3131
+ _context2.next = 4;
3132
+ break;
3133
+ case 27:
3134
+ _context2.next = 33;
3135
+ break;
3136
+ case 29:
3137
+ _context2.prev = 29;
3138
+ _context2.t10 = _context2["catch"](2);
3139
+ _didIteratorError = true;
3140
+ _iteratorError = _context2.t10;
3141
+ case 33:
3142
+ _context2.prev = 33;
3143
+ _context2.prev = 34;
3144
+ if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
3145
+ _context2.next = 38;
3146
+ break;
3147
+ }
3148
+ _context2.next = 38;
3149
+ return _awaitAsyncGenerator(_iterator["return"]());
3150
+ case 38:
3151
+ _context2.prev = 38;
3152
+ if (!_didIteratorError) {
3153
+ _context2.next = 41;
3154
+ break;
3155
+ }
3156
+ throw _iteratorError;
3157
+ case 41:
3158
+ return _context2.finish(38);
3159
+ case 42:
3160
+ return _context2.finish(33);
3161
+ case 43:
3162
+ case "end":
3163
+ return _context2.stop();
3164
+ }
3165
+ }, _callee, null, [[2, 29, 33, 43], [34,, 38, 42]]);
3166
+ }));
3167
+ return function readBytes(_x, _x2, _x3) {
3168
+ return _ref.apply(this, arguments);
3169
+ };
3170
+ }();
3171
+ var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish, encode) {
3172
+ var iterator = readBytes(stream, chunkSize, encode);
3173
+ var bytes = 0;
3174
+ return new ReadableStream({
3175
+ type: 'bytes',
3176
+ pull: function pull(controller) {
3177
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3178
+ var _yield$iterator$next, done, value, len;
3179
+ return _regeneratorRuntime().wrap(function _callee2$(_context3) {
3180
+ while (1) switch (_context3.prev = _context3.next) {
3181
+ case 0:
3182
+ _context3.next = 2;
3183
+ return iterator.next();
3184
+ case 2:
3185
+ _yield$iterator$next = _context3.sent;
3186
+ done = _yield$iterator$next.done;
3187
+ value = _yield$iterator$next.value;
3188
+ if (!done) {
3189
+ _context3.next = 9;
3190
+ break;
3191
+ }
3192
+ controller.close();
3193
+ onFinish();
3194
+ return _context3.abrupt("return");
3195
+ case 9:
3196
+ len = value.byteLength;
3197
+ onProgress && onProgress(bytes += len);
3198
+ controller.enqueue(new Uint8Array(value));
3199
+ case 12:
3200
+ case "end":
3201
+ return _context3.stop();
3202
+ }
3203
+ }, _callee2);
3204
+ }))();
3205
+ },
3206
+ cancel: function cancel(reason) {
3207
+ onFinish(reason);
3208
+ return iterator["return"]();
3209
+ }
3210
+ }, {
3211
+ highWaterMark: 2
3212
+ });
3213
+ };
3214
+
3215
+ var fetchProgressDecorator = function fetchProgressDecorator(total, fn) {
3216
+ var lengthComputable = total != null;
3217
+ return function (loaded) {
3218
+ return setTimeout(function () {
3219
+ return fn({
3220
+ lengthComputable: lengthComputable,
3221
+ total: total,
3222
+ loaded: loaded
3223
+ });
3224
+ });
3225
+ };
3226
+ };
3227
+ var isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
3228
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
3229
+
3230
+ // used only inside the fetch adapter
3231
+ var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
3232
+ return function (str) {
3233
+ return encoder.encode(str);
3234
+ };
3235
+ }(new TextEncoder()) : ( /*#__PURE__*/function () {
3236
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(str) {
3237
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3238
+ while (1) switch (_context.prev = _context.next) {
3239
+ case 0:
3240
+ _context.t0 = Uint8Array;
3241
+ _context.next = 3;
3242
+ return new Response(str).arrayBuffer();
3243
+ case 3:
3244
+ _context.t1 = _context.sent;
3245
+ return _context.abrupt("return", new _context.t0(_context.t1));
3246
+ case 5:
3247
+ case "end":
3248
+ return _context.stop();
3249
+ }
3250
+ }, _callee);
3251
+ }));
3252
+ return function (_x) {
3253
+ return _ref.apply(this, arguments);
3254
+ };
3255
+ }()));
3256
+ var supportsRequestStream = isReadableStreamSupported && function () {
3257
+ var duplexAccessed = false;
3258
+ var hasContentType = new Request(platform.origin, {
3259
+ body: new ReadableStream(),
3260
+ method: 'POST',
3261
+ get duplex() {
3262
+ duplexAccessed = true;
3263
+ return 'half';
3264
+ }
3265
+ }).headers.has('Content-Type');
3266
+ return duplexAccessed && !hasContentType;
3267
+ }();
3268
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
3269
+ var supportsResponseStream = isReadableStreamSupported && !!function () {
3270
+ try {
3271
+ return utils$1.isReadableStream(new Response('').body);
3272
+ } catch (err) {
3273
+ // return undefined
3274
+ }
3275
+ }();
3276
+ var resolvers = {
3277
+ stream: supportsResponseStream && function (res) {
3278
+ return res.body;
3279
+ }
3280
+ };
3281
+ isFetchSupported && function (res) {
3282
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) {
3283
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? function (res) {
3284
+ return res[type]();
3285
+ } : function (_, config) {
3286
+ throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config);
3287
+ });
3288
+ });
3289
+ }(new Response());
3290
+ var getBodyLength = /*#__PURE__*/function () {
3291
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) {
3292
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3293
+ while (1) switch (_context2.prev = _context2.next) {
3294
+ case 0:
3295
+ if (!(body == null)) {
3296
+ _context2.next = 2;
3297
+ break;
3298
+ }
3299
+ return _context2.abrupt("return", 0);
3300
+ case 2:
3301
+ if (!utils$1.isBlob(body)) {
3302
+ _context2.next = 4;
3303
+ break;
3304
+ }
3305
+ return _context2.abrupt("return", body.size);
3306
+ case 4:
3307
+ if (!utils$1.isSpecCompliantForm(body)) {
3308
+ _context2.next = 8;
3309
+ break;
3310
+ }
3311
+ _context2.next = 7;
3312
+ return new Request(body).arrayBuffer();
3313
+ case 7:
3314
+ return _context2.abrupt("return", _context2.sent.byteLength);
3315
+ case 8:
3316
+ if (!utils$1.isArrayBufferView(body)) {
3317
+ _context2.next = 10;
3318
+ break;
3319
+ }
3320
+ return _context2.abrupt("return", body.byteLength);
3321
+ case 10:
3322
+ if (utils$1.isURLSearchParams(body)) {
3323
+ body = body + '';
3324
+ }
3325
+ if (!utils$1.isString(body)) {
3326
+ _context2.next = 15;
3327
+ break;
3328
+ }
3329
+ _context2.next = 14;
3330
+ return encodeText(body);
3331
+ case 14:
3332
+ return _context2.abrupt("return", _context2.sent.byteLength);
3333
+ case 15:
3334
+ case "end":
3335
+ return _context2.stop();
3336
+ }
3337
+ }, _callee2);
3338
+ }));
3339
+ return function getBodyLength(_x2) {
3340
+ return _ref2.apply(this, arguments);
3341
+ };
3342
+ }();
3343
+ var resolveBodyLength = /*#__PURE__*/function () {
3344
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(headers, body) {
3345
+ var length;
3346
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3347
+ while (1) switch (_context3.prev = _context3.next) {
3348
+ case 0:
3349
+ length = utils$1.toFiniteNumber(headers.getContentLength());
3350
+ return _context3.abrupt("return", length == null ? getBodyLength(body) : length);
3351
+ case 2:
3352
+ case "end":
3353
+ return _context3.stop();
3354
+ }
3355
+ }, _callee3);
3356
+ }));
3357
+ return function resolveBodyLength(_x3, _x4) {
3358
+ return _ref3.apply(this, arguments);
3359
+ };
3360
+ }();
3361
+ var fetchAdapter = isFetchSupported && ( /*#__PURE__*/function () {
3362
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(config) {
3363
+ var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, _ref5, _ref6, composedSignal, stopTimeout, finished, request, onFinish, requestContentLength, _request, contentTypeHeader, response, isStreamResponse, options, responseContentLength, responseData;
3364
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3365
+ while (1) switch (_context4.prev = _context4.next) {
3366
+ case 0:
3367
+ _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
3368
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
3369
+ _ref5 = signal || cancelToken || timeout ? composeSignals$1([signal, cancelToken], timeout) : [], _ref6 = _slicedToArray(_ref5, 2), composedSignal = _ref6[0], stopTimeout = _ref6[1];
3370
+ onFinish = function onFinish() {
3371
+ !finished && setTimeout(function () {
3372
+ composedSignal && composedSignal.unsubscribe();
3373
+ });
3374
+ finished = true;
3375
+ };
3376
+ _context4.prev = 4;
3377
+ _context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
3378
+ if (!_context4.t0) {
3379
+ _context4.next = 11;
3380
+ break;
3381
+ }
3382
+ _context4.next = 9;
3383
+ return resolveBodyLength(headers, data);
3384
+ case 9:
3385
+ _context4.t1 = requestContentLength = _context4.sent;
3386
+ _context4.t0 = _context4.t1 !== 0;
3387
+ case 11:
3388
+ if (!_context4.t0) {
3389
+ _context4.next = 15;
3390
+ break;
3391
+ }
3392
+ _request = new Request(url, {
3393
+ method: 'POST',
3394
+ body: data,
3395
+ duplex: "half"
3396
+ });
3397
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
3398
+ headers.setContentType(contentTypeHeader);
3399
+ }
3400
+ if (_request.body) {
3401
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(requestContentLength, progressEventReducer(onUploadProgress)), null, encodeText);
3402
+ }
3403
+ case 15:
3404
+ if (!utils$1.isString(withCredentials)) {
3405
+ withCredentials = withCredentials ? 'cors' : 'omit';
3406
+ }
3407
+ request = new Request(url, _objectSpread2(_objectSpread2({}, fetchOptions), {}, {
3408
+ signal: composedSignal,
3409
+ method: method.toUpperCase(),
3410
+ headers: headers.normalize().toJSON(),
3411
+ body: data,
3412
+ duplex: "half",
3413
+ withCredentials: withCredentials
3414
+ }));
3415
+ _context4.next = 19;
3416
+ return fetch(request);
3417
+ case 19:
3418
+ response = _context4.sent;
3419
+ isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
3420
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
3421
+ options = {};
3422
+ ['status', 'statusText', 'headers'].forEach(function (prop) {
3423
+ options[prop] = response[prop];
3424
+ });
3425
+ responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
3426
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(responseContentLength, progressEventReducer(onDownloadProgress, true)), isStreamResponse && onFinish, encodeText), options);
3427
+ }
3428
+ responseType = responseType || 'text';
3429
+ _context4.next = 25;
3430
+ return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
3431
+ case 25:
3432
+ responseData = _context4.sent;
3433
+ !isStreamResponse && onFinish();
3434
+ stopTimeout && stopTimeout();
3435
+ _context4.next = 30;
3436
+ return new Promise(function (resolve, reject) {
3437
+ settle(resolve, reject, {
3438
+ data: responseData,
3439
+ headers: AxiosHeaders$1.from(response.headers),
3440
+ status: response.status,
3441
+ statusText: response.statusText,
3442
+ config: config,
3443
+ request: request
3444
+ });
3445
+ });
3446
+ case 30:
3447
+ return _context4.abrupt("return", _context4.sent);
3448
+ case 33:
3449
+ _context4.prev = 33;
3450
+ _context4.t2 = _context4["catch"](4);
3451
+ onFinish();
3452
+ if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /fetch/i.test(_context4.t2.message))) {
3453
+ _context4.next = 38;
3454
+ break;
3455
+ }
3456
+ throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
3457
+ cause: _context4.t2.cause || _context4.t2
3458
+ });
3459
+ case 38:
3460
+ throw AxiosError.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request);
3461
+ case 39:
3462
+ case "end":
3463
+ return _context4.stop();
3464
+ }
3465
+ }, _callee4, null, [[4, 33]]);
3466
+ }));
3467
+ return function (_x5) {
3468
+ return _ref4.apply(this, arguments);
3469
+ };
3470
+ }());
3471
+
2624
3472
  var knownAdapters = {
2625
3473
  http: httpAdapter,
2626
- xhr: xhrAdapter
3474
+ xhr: xhrAdapter,
3475
+ fetch: fetchAdapter
2627
3476
  };
2628
3477
  utils$1.forEach(knownAdapters, function (fn, value) {
2629
3478
  if (fn) {
@@ -2737,111 +3586,7 @@
2737
3586
  });
2738
3587
  }
2739
3588
 
2740
- var headersToObject = function headersToObject(thing) {
2741
- return thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
2742
- };
2743
-
2744
- /**
2745
- * Config-specific merge-function which creates a new config-object
2746
- * by merging two configuration objects together.
2747
- *
2748
- * @param {Object} config1
2749
- * @param {Object} config2
2750
- *
2751
- * @returns {Object} New object resulting from merging config2 to config1
2752
- */
2753
- function mergeConfig(config1, config2) {
2754
- // eslint-disable-next-line no-param-reassign
2755
- config2 = config2 || {};
2756
- var config = {};
2757
- function getMergedValue(target, source, caseless) {
2758
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2759
- return utils$1.merge.call({
2760
- caseless: caseless
2761
- }, target, source);
2762
- } else if (utils$1.isPlainObject(source)) {
2763
- return utils$1.merge({}, source);
2764
- } else if (utils$1.isArray(source)) {
2765
- return source.slice();
2766
- }
2767
- return source;
2768
- }
2769
-
2770
- // eslint-disable-next-line consistent-return
2771
- function mergeDeepProperties(a, b, caseless) {
2772
- if (!utils$1.isUndefined(b)) {
2773
- return getMergedValue(a, b, caseless);
2774
- } else if (!utils$1.isUndefined(a)) {
2775
- return getMergedValue(undefined, a, caseless);
2776
- }
2777
- }
2778
-
2779
- // eslint-disable-next-line consistent-return
2780
- function valueFromConfig2(a, b) {
2781
- if (!utils$1.isUndefined(b)) {
2782
- return getMergedValue(undefined, b);
2783
- }
2784
- }
2785
-
2786
- // eslint-disable-next-line consistent-return
2787
- function defaultToConfig2(a, b) {
2788
- if (!utils$1.isUndefined(b)) {
2789
- return getMergedValue(undefined, b);
2790
- } else if (!utils$1.isUndefined(a)) {
2791
- return getMergedValue(undefined, a);
2792
- }
2793
- }
2794
-
2795
- // eslint-disable-next-line consistent-return
2796
- function mergeDirectKeys(a, b, prop) {
2797
- if (prop in config2) {
2798
- return getMergedValue(a, b);
2799
- } else if (prop in config1) {
2800
- return getMergedValue(undefined, a);
2801
- }
2802
- }
2803
- var mergeMap = {
2804
- url: valueFromConfig2,
2805
- method: valueFromConfig2,
2806
- data: valueFromConfig2,
2807
- baseURL: defaultToConfig2,
2808
- transformRequest: defaultToConfig2,
2809
- transformResponse: defaultToConfig2,
2810
- paramsSerializer: defaultToConfig2,
2811
- timeout: defaultToConfig2,
2812
- timeoutMessage: defaultToConfig2,
2813
- withCredentials: defaultToConfig2,
2814
- withXSRFToken: defaultToConfig2,
2815
- adapter: defaultToConfig2,
2816
- responseType: defaultToConfig2,
2817
- xsrfCookieName: defaultToConfig2,
2818
- xsrfHeaderName: defaultToConfig2,
2819
- onUploadProgress: defaultToConfig2,
2820
- onDownloadProgress: defaultToConfig2,
2821
- decompress: defaultToConfig2,
2822
- maxContentLength: defaultToConfig2,
2823
- maxBodyLength: defaultToConfig2,
2824
- beforeRedirect: defaultToConfig2,
2825
- transport: defaultToConfig2,
2826
- httpAgent: defaultToConfig2,
2827
- httpsAgent: defaultToConfig2,
2828
- cancelToken: defaultToConfig2,
2829
- socketPath: defaultToConfig2,
2830
- responseEncoding: defaultToConfig2,
2831
- validateStatus: mergeDirectKeys,
2832
- headers: function headers(a, b) {
2833
- return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
2834
- }
2835
- };
2836
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2837
- var merge = mergeMap[prop] || mergeDeepProperties;
2838
- var configValue = merge(config1[prop], config2[prop], prop);
2839
- utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
2840
- });
2841
- return config;
2842
- }
2843
-
2844
- var VERSION = "1.6.6";
3589
+ var VERSION = "1.7.2";
2845
3590
 
2846
3591
  var validators$1 = {};
2847
3592
 
@@ -2947,38 +3692,40 @@
2947
3692
  */
2948
3693
  _createClass(Axios, [{
2949
3694
  key: "request",
2950
- value: function () {
3695
+ value: (function () {
2951
3696
  var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
2952
- var dummy;
3697
+ var dummy, stack;
2953
3698
  return _regeneratorRuntime().wrap(function _callee$(_context) {
2954
- while (1) {
2955
- switch (_context.prev = _context.next) {
2956
- case 0:
2957
- _context.prev = 0;
2958
- _context.next = 3;
2959
- return this._request(configOrUrl, config);
2960
- case 3:
2961
- return _context.abrupt("return", _context.sent);
2962
- case 6:
2963
- _context.prev = 6;
2964
- _context.t0 = _context["catch"](0);
2965
- dummy = {};
2966
- if (Error.captureStackTrace) {
2967
- Error.captureStackTrace(dummy);
2968
- } else {
2969
- dummy.stack = new Error().stack;
2970
- }
3699
+ while (1) switch (_context.prev = _context.next) {
3700
+ case 0:
3701
+ _context.prev = 0;
3702
+ _context.next = 3;
3703
+ return this._request(configOrUrl, config);
3704
+ case 3:
3705
+ return _context.abrupt("return", _context.sent);
3706
+ case 6:
3707
+ _context.prev = 6;
3708
+ _context.t0 = _context["catch"](0);
3709
+ if (_context.t0 instanceof Error) {
3710
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
3711
+
2971
3712
  // slice off the Error: ... line
2972
- dummy.stack = dummy.stack.replace(/^.+\n/, '');
2973
- // match without the 2 top stack lines
2974
- if (!_context.t0.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
2975
- _context.t0.stack += '\n' + dummy.stack;
3713
+ stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
3714
+ try {
3715
+ if (!_context.t0.stack) {
3716
+ _context.t0.stack = stack;
3717
+ // match without the 2 top stack lines
3718
+ } else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
3719
+ _context.t0.stack += '\n' + stack;
3720
+ }
3721
+ } catch (e) {
3722
+ // ignore the case where "stack" is an un-writable property
2976
3723
  }
2977
- throw _context.t0;
2978
- case 13:
2979
- case "end":
2980
- return _context.stop();
2981
- }
3724
+ }
3725
+ throw _context.t0;
3726
+ case 10:
3727
+ case "end":
3728
+ return _context.stop();
2982
3729
  }
2983
3730
  }, _callee, this, [[0, 6]]);
2984
3731
  }));
@@ -2986,7 +3733,7 @@
2986
3733
  return _request2.apply(this, arguments);
2987
3734
  }
2988
3735
  return request;
2989
- }()
3736
+ }())
2990
3737
  }, {
2991
3738
  key: "_request",
2992
3739
  value: function _request(configOrUrl, config) {