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,4 +1,4 @@
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 bind(fn, thisArg) {
3
3
  return function wrap() {
4
4
  return fn.apply(thisArg, arguments);
@@ -212,6 +212,8 @@ const isFormData = (thing) => {
212
212
  */
213
213
  const isURLSearchParams = kindOfTest('URLSearchParams');
214
214
 
215
+ const [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);
216
+
215
217
  /**
216
218
  * Trim excess whitespace off the beginning and end of a string
217
219
  *
@@ -600,8 +602,7 @@ const toObjectSet = (arrayOrString, delimiter) => {
600
602
  const noop = () => {};
601
603
 
602
604
  const toFiniteNumber = (value, defaultValue) => {
603
- value = +value;
604
- return Number.isFinite(value) ? value : defaultValue;
605
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
605
606
  };
606
607
 
607
608
  const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
@@ -682,6 +683,10 @@ const utils$1 = {
682
683
  isBoolean,
683
684
  isObject,
684
685
  isPlainObject,
686
+ isReadableStream,
687
+ isRequest,
688
+ isResponse,
689
+ isHeaders,
685
690
  isUndefined,
686
691
  isDate,
687
692
  isFile,
@@ -1278,11 +1283,14 @@ const hasStandardBrowserWebWorkerEnv = (() => {
1278
1283
  );
1279
1284
  })();
1280
1285
 
1286
+ const origin = hasBrowserEnv && window.location.href || 'http://localhost';
1287
+
1281
1288
  const utils = /*#__PURE__*/Object.freeze({
1282
1289
  __proto__: null,
1283
1290
  hasBrowserEnv: hasBrowserEnv,
1284
1291
  hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1285
- hasStandardBrowserEnv: hasStandardBrowserEnv
1292
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
1293
+ origin: origin
1286
1294
  });
1287
1295
 
1288
1296
  const platform = {
@@ -1422,7 +1430,7 @@ const defaults = {
1422
1430
 
1423
1431
  transitional: transitionalDefaults,
1424
1432
 
1425
- adapter: ['xhr', 'http'],
1433
+ adapter: ['xhr', 'http', 'fetch'],
1426
1434
 
1427
1435
  transformRequest: [function transformRequest(data, headers) {
1428
1436
  const contentType = headers.getContentType() || '';
@@ -1436,9 +1444,6 @@ const defaults = {
1436
1444
  const isFormData = utils$1.isFormData(data);
1437
1445
 
1438
1446
  if (isFormData) {
1439
- if (!hasJSONContentType) {
1440
- return data;
1441
- }
1442
1447
  return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1443
1448
  }
1444
1449
 
@@ -1446,7 +1451,8 @@ const defaults = {
1446
1451
  utils$1.isBuffer(data) ||
1447
1452
  utils$1.isStream(data) ||
1448
1453
  utils$1.isFile(data) ||
1449
- utils$1.isBlob(data)
1454
+ utils$1.isBlob(data) ||
1455
+ utils$1.isReadableStream(data)
1450
1456
  ) {
1451
1457
  return data;
1452
1458
  }
@@ -1489,6 +1495,10 @@ const defaults = {
1489
1495
  const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1490
1496
  const JSONRequested = this.responseType === 'json';
1491
1497
 
1498
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
1499
+ return data;
1500
+ }
1501
+
1492
1502
  if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1493
1503
  const silentJSONParsing = transitional && transitional.silentJSONParsing;
1494
1504
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
@@ -1692,6 +1702,10 @@ class AxiosHeaders$1 {
1692
1702
  setHeaders(header, valueOrRewrite);
1693
1703
  } else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1694
1704
  setHeaders(parseHeaders(header), valueOrRewrite);
1705
+ } else if (utils$1.isHeaders(header)) {
1706
+ for (const [key, value] of header.entries()) {
1707
+ setHeader(value, key, rewrite);
1708
+ }
1695
1709
  } else {
1696
1710
  header != null && setHeader(valueOrRewrite, header, rewrite);
1697
1711
  }
@@ -1959,90 +1973,125 @@ function settle(resolve, reject, response) {
1959
1973
  }
1960
1974
  }
1961
1975
 
1962
- const cookies = platform.hasStandardBrowserEnv ?
1976
+ function parseProtocol(url) {
1977
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
1978
+ return match && match[1] || '';
1979
+ }
1963
1980
 
1964
- // Standard browser envs support document.cookie
1965
- {
1966
- write(name, value, expires, path, domain, secure) {
1967
- const cookie = [name + '=' + encodeURIComponent(value)];
1981
+ /**
1982
+ * Calculate data maxRate
1983
+ * @param {Number} [samplesCount= 10]
1984
+ * @param {Number} [min= 1000]
1985
+ * @returns {Function}
1986
+ */
1987
+ function speedometer(samplesCount, min) {
1988
+ samplesCount = samplesCount || 10;
1989
+ const bytes = new Array(samplesCount);
1990
+ const timestamps = new Array(samplesCount);
1991
+ let head = 0;
1992
+ let tail = 0;
1993
+ let firstSampleTS;
1968
1994
 
1969
- utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
1995
+ min = min !== undefined ? min : 1000;
1970
1996
 
1971
- utils$1.isString(path) && cookie.push('path=' + path);
1997
+ return function push(chunkLength) {
1998
+ const now = Date.now();
1972
1999
 
1973
- utils$1.isString(domain) && cookie.push('domain=' + domain);
2000
+ const startedAt = timestamps[tail];
1974
2001
 
1975
- secure === true && cookie.push('secure');
2002
+ if (!firstSampleTS) {
2003
+ firstSampleTS = now;
2004
+ }
1976
2005
 
1977
- document.cookie = cookie.join('; ');
1978
- },
2006
+ bytes[head] = chunkLength;
2007
+ timestamps[head] = now;
1979
2008
 
1980
- read(name) {
1981
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1982
- return (match ? decodeURIComponent(match[3]) : null);
1983
- },
2009
+ let i = tail;
2010
+ let bytesCount = 0;
1984
2011
 
1985
- remove(name) {
1986
- this.write(name, '', Date.now() - 86400000);
2012
+ while (i !== head) {
2013
+ bytesCount += bytes[i++];
2014
+ i = i % samplesCount;
1987
2015
  }
1988
- }
1989
2016
 
1990
- :
2017
+ head = (head + 1) % samplesCount;
1991
2018
 
1992
- // Non-standard browser env (web workers, react-native) lack needed support.
1993
- {
1994
- write() {},
1995
- read() {
1996
- return null;
1997
- },
1998
- remove() {}
1999
- };
2019
+ if (head === tail) {
2020
+ tail = (tail + 1) % samplesCount;
2021
+ }
2000
2022
 
2001
- /**
2002
- * Determines whether the specified URL is absolute
2003
- *
2004
- * @param {string} url The URL to test
2005
- *
2006
- * @returns {boolean} True if the specified URL is absolute, otherwise false
2007
- */
2008
- function isAbsoluteURL(url) {
2009
- // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2010
- // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2011
- // by any combination of letters, digits, plus, period, or hyphen.
2012
- return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2013
- }
2023
+ if (now - firstSampleTS < min) {
2024
+ return;
2025
+ }
2014
2026
 
2015
- /**
2016
- * Creates a new URL by combining the specified URLs
2017
- *
2018
- * @param {string} baseURL The base URL
2019
- * @param {string} relativeURL The relative URL
2020
- *
2021
- * @returns {string} The combined URL
2022
- */
2023
- function combineURLs(baseURL, relativeURL) {
2024
- return relativeURL
2025
- ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2026
- : baseURL;
2027
+ const passed = startedAt && now - startedAt;
2028
+
2029
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2030
+ };
2027
2031
  }
2028
2032
 
2029
2033
  /**
2030
- * Creates a new URL by combining the baseURL with the requestedURL,
2031
- * only when the requestedURL is not already an absolute URL.
2032
- * If the requestURL is absolute, this function returns the requestedURL untouched.
2033
- *
2034
- * @param {string} baseURL The base URL
2035
- * @param {string} requestedURL Absolute or relative URL to combine
2036
- *
2037
- * @returns {string} The combined full path
2034
+ * Throttle decorator
2035
+ * @param {Function} fn
2036
+ * @param {Number} freq
2037
+ * @return {Function}
2038
2038
  */
2039
- function buildFullPath(baseURL, requestedURL) {
2040
- if (baseURL && !isAbsoluteURL(requestedURL)) {
2041
- return combineURLs(baseURL, requestedURL);
2042
- }
2043
- return requestedURL;
2039
+ function throttle(fn, freq) {
2040
+ let timestamp = 0;
2041
+ const threshold = 1000 / freq;
2042
+ let timer = null;
2043
+ return function throttled() {
2044
+ const force = this === true;
2045
+
2046
+ const now = Date.now();
2047
+ if (force || now - timestamp > threshold) {
2048
+ if (timer) {
2049
+ clearTimeout(timer);
2050
+ timer = null;
2051
+ }
2052
+ timestamp = now;
2053
+ return fn.apply(null, arguments);
2054
+ }
2055
+ if (!timer) {
2056
+ timer = setTimeout(() => {
2057
+ timer = null;
2058
+ timestamp = Date.now();
2059
+ return fn.apply(null, arguments);
2060
+ }, threshold - (now - timestamp));
2061
+ }
2062
+ };
2044
2063
  }
2045
2064
 
2065
+ const progressEventReducer = (listener, isDownloadStream, freq = 3) => {
2066
+ let bytesNotified = 0;
2067
+ const _speedometer = speedometer(50, 250);
2068
+
2069
+ return throttle(e => {
2070
+ const loaded = e.loaded;
2071
+ const total = e.lengthComputable ? e.total : undefined;
2072
+ const progressBytes = loaded - bytesNotified;
2073
+ const rate = _speedometer(progressBytes);
2074
+ const inRange = loaded <= total;
2075
+
2076
+ bytesNotified = loaded;
2077
+
2078
+ const data = {
2079
+ loaded,
2080
+ total,
2081
+ progress: total ? (loaded / total) : undefined,
2082
+ bytes: progressBytes,
2083
+ rate: rate ? rate : undefined,
2084
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2085
+ event: e,
2086
+ lengthComputable: total != null
2087
+ };
2088
+
2089
+ data[isDownloadStream ? 'download' : 'upload'] = true;
2090
+
2091
+ listener(data);
2092
+ }, freq);
2093
+ };
2094
+
2046
2095
  const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2047
2096
 
2048
2097
  // Standard browser envs have full support of the APIs needed to test
@@ -2106,137 +2155,265 @@ const isURLSameOrigin = platform.hasStandardBrowserEnv ?
2106
2155
  };
2107
2156
  })();
2108
2157
 
2109
- function parseProtocol(url) {
2110
- const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2111
- return match && match[1] || '';
2112
- }
2158
+ const cookies = platform.hasStandardBrowserEnv ?
2113
2159
 
2114
- /**
2115
- * Calculate data maxRate
2116
- * @param {Number} [samplesCount= 10]
2117
- * @param {Number} [min= 1000]
2118
- * @returns {Function}
2119
- */
2120
- function speedometer(samplesCount, min) {
2121
- samplesCount = samplesCount || 10;
2122
- const bytes = new Array(samplesCount);
2123
- const timestamps = new Array(samplesCount);
2124
- let head = 0;
2125
- let tail = 0;
2126
- let firstSampleTS;
2160
+ // Standard browser envs support document.cookie
2161
+ {
2162
+ write(name, value, expires, path, domain, secure) {
2163
+ const cookie = [name + '=' + encodeURIComponent(value)];
2127
2164
 
2128
- min = min !== undefined ? min : 1000;
2165
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
2129
2166
 
2130
- return function push(chunkLength) {
2131
- const now = Date.now();
2167
+ utils$1.isString(path) && cookie.push('path=' + path);
2132
2168
 
2133
- const startedAt = timestamps[tail];
2169
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
2134
2170
 
2135
- if (!firstSampleTS) {
2136
- firstSampleTS = now;
2137
- }
2171
+ secure === true && cookie.push('secure');
2138
2172
 
2139
- bytes[head] = chunkLength;
2140
- timestamps[head] = now;
2173
+ document.cookie = cookie.join('; ');
2174
+ },
2141
2175
 
2142
- let i = tail;
2143
- let bytesCount = 0;
2176
+ read(name) {
2177
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2178
+ return (match ? decodeURIComponent(match[3]) : null);
2179
+ },
2144
2180
 
2145
- while (i !== head) {
2146
- bytesCount += bytes[i++];
2147
- i = i % samplesCount;
2181
+ remove(name) {
2182
+ this.write(name, '', Date.now() - 86400000);
2148
2183
  }
2184
+ }
2149
2185
 
2150
- head = (head + 1) % samplesCount;
2186
+ :
2151
2187
 
2152
- if (head === tail) {
2153
- tail = (tail + 1) % samplesCount;
2154
- }
2188
+ // Non-standard browser env (web workers, react-native) lack needed support.
2189
+ {
2190
+ write() {},
2191
+ read() {
2192
+ return null;
2193
+ },
2194
+ remove() {}
2195
+ };
2155
2196
 
2156
- if (now - firstSampleTS < min) {
2157
- return;
2158
- }
2197
+ /**
2198
+ * Determines whether the specified URL is absolute
2199
+ *
2200
+ * @param {string} url The URL to test
2201
+ *
2202
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2203
+ */
2204
+ function isAbsoluteURL(url) {
2205
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2206
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2207
+ // by any combination of letters, digits, plus, period, or hyphen.
2208
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2209
+ }
2159
2210
 
2160
- const passed = startedAt && now - startedAt;
2211
+ /**
2212
+ * Creates a new URL by combining the specified URLs
2213
+ *
2214
+ * @param {string} baseURL The base URL
2215
+ * @param {string} relativeURL The relative URL
2216
+ *
2217
+ * @returns {string} The combined URL
2218
+ */
2219
+ function combineURLs(baseURL, relativeURL) {
2220
+ return relativeURL
2221
+ ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2222
+ : baseURL;
2223
+ }
2161
2224
 
2162
- return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2163
- };
2225
+ /**
2226
+ * Creates a new URL by combining the baseURL with the requestedURL,
2227
+ * only when the requestedURL is not already an absolute URL.
2228
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2229
+ *
2230
+ * @param {string} baseURL The base URL
2231
+ * @param {string} requestedURL Absolute or relative URL to combine
2232
+ *
2233
+ * @returns {string} The combined full path
2234
+ */
2235
+ function buildFullPath(baseURL, requestedURL) {
2236
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2237
+ return combineURLs(baseURL, requestedURL);
2238
+ }
2239
+ return requestedURL;
2164
2240
  }
2165
2241
 
2166
- function progressEventReducer(listener, isDownloadStream) {
2167
- let bytesNotified = 0;
2168
- const _speedometer = speedometer(50, 250);
2242
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? { ...thing } : thing;
2169
2243
 
2170
- return e => {
2171
- const loaded = e.loaded;
2172
- const total = e.lengthComputable ? e.total : undefined;
2173
- const progressBytes = loaded - bytesNotified;
2174
- const rate = _speedometer(progressBytes);
2175
- const inRange = loaded <= total;
2244
+ /**
2245
+ * Config-specific merge-function which creates a new config-object
2246
+ * by merging two configuration objects together.
2247
+ *
2248
+ * @param {Object} config1
2249
+ * @param {Object} config2
2250
+ *
2251
+ * @returns {Object} New object resulting from merging config2 to config1
2252
+ */
2253
+ function mergeConfig$1(config1, config2) {
2254
+ // eslint-disable-next-line no-param-reassign
2255
+ config2 = config2 || {};
2256
+ const config = {};
2176
2257
 
2177
- bytesNotified = loaded;
2258
+ function getMergedValue(target, source, caseless) {
2259
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2260
+ return utils$1.merge.call({caseless}, target, source);
2261
+ } else if (utils$1.isPlainObject(source)) {
2262
+ return utils$1.merge({}, source);
2263
+ } else if (utils$1.isArray(source)) {
2264
+ return source.slice();
2265
+ }
2266
+ return source;
2267
+ }
2178
2268
 
2179
- const data = {
2180
- loaded,
2181
- total,
2182
- progress: total ? (loaded / total) : undefined,
2183
- bytes: progressBytes,
2184
- rate: rate ? rate : undefined,
2185
- estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2186
- event: e
2187
- };
2269
+ // eslint-disable-next-line consistent-return
2270
+ function mergeDeepProperties(a, b, caseless) {
2271
+ if (!utils$1.isUndefined(b)) {
2272
+ return getMergedValue(a, b, caseless);
2273
+ } else if (!utils$1.isUndefined(a)) {
2274
+ return getMergedValue(undefined, a, caseless);
2275
+ }
2276
+ }
2188
2277
 
2189
- data[isDownloadStream ? 'download' : 'upload'] = true;
2278
+ // eslint-disable-next-line consistent-return
2279
+ function valueFromConfig2(a, b) {
2280
+ if (!utils$1.isUndefined(b)) {
2281
+ return getMergedValue(undefined, b);
2282
+ }
2283
+ }
2190
2284
 
2191
- listener(data);
2285
+ // eslint-disable-next-line consistent-return
2286
+ function defaultToConfig2(a, b) {
2287
+ if (!utils$1.isUndefined(b)) {
2288
+ return getMergedValue(undefined, b);
2289
+ } else if (!utils$1.isUndefined(a)) {
2290
+ return getMergedValue(undefined, a);
2291
+ }
2292
+ }
2293
+
2294
+ // eslint-disable-next-line consistent-return
2295
+ function mergeDirectKeys(a, b, prop) {
2296
+ if (prop in config2) {
2297
+ return getMergedValue(a, b);
2298
+ } else if (prop in config1) {
2299
+ return getMergedValue(undefined, a);
2300
+ }
2301
+ }
2302
+
2303
+ const mergeMap = {
2304
+ url: valueFromConfig2,
2305
+ method: valueFromConfig2,
2306
+ data: valueFromConfig2,
2307
+ baseURL: defaultToConfig2,
2308
+ transformRequest: defaultToConfig2,
2309
+ transformResponse: defaultToConfig2,
2310
+ paramsSerializer: defaultToConfig2,
2311
+ timeout: defaultToConfig2,
2312
+ timeoutMessage: defaultToConfig2,
2313
+ withCredentials: defaultToConfig2,
2314
+ withXSRFToken: defaultToConfig2,
2315
+ adapter: defaultToConfig2,
2316
+ responseType: defaultToConfig2,
2317
+ xsrfCookieName: defaultToConfig2,
2318
+ xsrfHeaderName: defaultToConfig2,
2319
+ onUploadProgress: defaultToConfig2,
2320
+ onDownloadProgress: defaultToConfig2,
2321
+ decompress: defaultToConfig2,
2322
+ maxContentLength: defaultToConfig2,
2323
+ maxBodyLength: defaultToConfig2,
2324
+ beforeRedirect: defaultToConfig2,
2325
+ transport: defaultToConfig2,
2326
+ httpAgent: defaultToConfig2,
2327
+ httpsAgent: defaultToConfig2,
2328
+ cancelToken: defaultToConfig2,
2329
+ socketPath: defaultToConfig2,
2330
+ responseEncoding: defaultToConfig2,
2331
+ validateStatus: mergeDirectKeys,
2332
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
2192
2333
  };
2334
+
2335
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2336
+ const merge = mergeMap[prop] || mergeDeepProperties;
2337
+ const configValue = merge(config1[prop], config2[prop], prop);
2338
+ (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
2339
+ });
2340
+
2341
+ return config;
2193
2342
  }
2194
2343
 
2344
+ const resolveConfig = (config) => {
2345
+ const newConfig = mergeConfig$1({}, config);
2346
+
2347
+ let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
2348
+
2349
+ newConfig.headers = headers = AxiosHeaders$2.from(headers);
2350
+
2351
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
2352
+
2353
+ // HTTP basic authentication
2354
+ if (auth) {
2355
+ headers.set('Authorization', 'Basic ' +
2356
+ btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))
2357
+ );
2358
+ }
2359
+
2360
+ let contentType;
2361
+
2362
+ if (utils$1.isFormData(data)) {
2363
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2364
+ headers.setContentType(undefined); // Let the browser set it
2365
+ } else if ((contentType = headers.getContentType()) !== false) {
2366
+ // fix semicolon duplication issue for ReactNative FormData implementation
2367
+ const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2368
+ headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
2369
+ }
2370
+ }
2371
+
2372
+ // Add xsrf header
2373
+ // This is only done if running in a standard browser environment.
2374
+ // Specifically not if we're in a web worker, or react-native.
2375
+
2376
+ if (platform.hasStandardBrowserEnv) {
2377
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
2378
+
2379
+ if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {
2380
+ // Add xsrf header
2381
+ const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
2382
+
2383
+ if (xsrfValue) {
2384
+ headers.set(xsrfHeaderName, xsrfValue);
2385
+ }
2386
+ }
2387
+ }
2388
+
2389
+ return newConfig;
2390
+ };
2391
+
2195
2392
  const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2196
2393
 
2197
2394
  const xhrAdapter = isXHRAdapterSupported && function (config) {
2198
2395
  return new Promise(function dispatchXhrRequest(resolve, reject) {
2199
- let requestData = config.data;
2200
- const requestHeaders = AxiosHeaders$2.from(config.headers).normalize();
2201
- let {responseType, withXSRFToken} = config;
2396
+ const _config = resolveConfig(config);
2397
+ let requestData = _config.data;
2398
+ const requestHeaders = AxiosHeaders$2.from(_config.headers).normalize();
2399
+ let {responseType} = _config;
2202
2400
  let onCanceled;
2203
2401
  function done() {
2204
- if (config.cancelToken) {
2205
- config.cancelToken.unsubscribe(onCanceled);
2402
+ if (_config.cancelToken) {
2403
+ _config.cancelToken.unsubscribe(onCanceled);
2206
2404
  }
2207
2405
 
2208
- if (config.signal) {
2209
- config.signal.removeEventListener('abort', onCanceled);
2210
- }
2211
- }
2212
-
2213
- let contentType;
2214
-
2215
- if (utils$1.isFormData(requestData)) {
2216
- if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2217
- requestHeaders.setContentType(false); // Let the browser set it
2218
- } else if ((contentType = requestHeaders.getContentType()) !== false) {
2219
- // fix semicolon duplication issue for ReactNative FormData implementation
2220
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2221
- requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
2406
+ if (_config.signal) {
2407
+ _config.signal.removeEventListener('abort', onCanceled);
2222
2408
  }
2223
2409
  }
2224
2410
 
2225
2411
  let request = new XMLHttpRequest();
2226
2412
 
2227
- // HTTP basic authentication
2228
- if (config.auth) {
2229
- const username = config.auth.username || '';
2230
- const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
2231
- requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
2232
- }
2233
-
2234
- const fullPath = buildFullPath(config.baseURL, config.url);
2235
-
2236
- request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
2413
+ request.open(_config.method.toUpperCase(), _config.url, true);
2237
2414
 
2238
2415
  // Set the request timeout in MS
2239
- request.timeout = config.timeout;
2416
+ request.timeout = _config.timeout;
2240
2417
 
2241
2418
  function onloadend() {
2242
2419
  if (!request) {
@@ -2298,7 +2475,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2298
2475
  return;
2299
2476
  }
2300
2477
 
2301
- reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
2478
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, _config, request));
2302
2479
 
2303
2480
  // Clean up request
2304
2481
  request = null;
@@ -2308,7 +2485,7 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2308
2485
  request.onerror = function handleError() {
2309
2486
  // Real errors are hidden from us by the browser
2310
2487
  // onerror should only fire if it's a network error
2311
- reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request));
2488
+ reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, _config, request));
2312
2489
 
2313
2490
  // Clean up request
2314
2491
  request = null;
@@ -2316,37 +2493,21 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2316
2493
 
2317
2494
  // Handle timeout
2318
2495
  request.ontimeout = function handleTimeout() {
2319
- let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
2320
- const transitional = config.transitional || transitionalDefaults;
2321
- if (config.timeoutErrorMessage) {
2322
- timeoutErrorMessage = config.timeoutErrorMessage;
2496
+ let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
2497
+ const transitional = _config.transitional || transitionalDefaults;
2498
+ if (_config.timeoutErrorMessage) {
2499
+ timeoutErrorMessage = _config.timeoutErrorMessage;
2323
2500
  }
2324
2501
  reject(new AxiosError$1(
2325
2502
  timeoutErrorMessage,
2326
2503
  transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
2327
- config,
2504
+ _config,
2328
2505
  request));
2329
2506
 
2330
2507
  // Clean up request
2331
2508
  request = null;
2332
2509
  };
2333
2510
 
2334
- // Add xsrf header
2335
- // This is only done if running in a standard browser environment.
2336
- // Specifically not if we're in a web worker, or react-native.
2337
- if(platform.hasStandardBrowserEnv) {
2338
- withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
2339
-
2340
- if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
2341
- // Add xsrf header
2342
- const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2343
-
2344
- if (xsrfValue) {
2345
- requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2346
- }
2347
- }
2348
- }
2349
-
2350
2511
  // Remove Content-Type if data is undefined
2351
2512
  requestData === undefined && requestHeaders.setContentType(null);
2352
2513
 
@@ -2358,26 +2519,26 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2358
2519
  }
2359
2520
 
2360
2521
  // Add withCredentials to request if needed
2361
- if (!utils$1.isUndefined(config.withCredentials)) {
2362
- request.withCredentials = !!config.withCredentials;
2522
+ if (!utils$1.isUndefined(_config.withCredentials)) {
2523
+ request.withCredentials = !!_config.withCredentials;
2363
2524
  }
2364
2525
 
2365
2526
  // Add responseType to request if needed
2366
2527
  if (responseType && responseType !== 'json') {
2367
- request.responseType = config.responseType;
2528
+ request.responseType = _config.responseType;
2368
2529
  }
2369
2530
 
2370
2531
  // Handle progress if needed
2371
- if (typeof config.onDownloadProgress === 'function') {
2372
- request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
2532
+ if (typeof _config.onDownloadProgress === 'function') {
2533
+ request.addEventListener('progress', progressEventReducer(_config.onDownloadProgress, true));
2373
2534
  }
2374
2535
 
2375
2536
  // Not all browsers support upload events
2376
- if (typeof config.onUploadProgress === 'function' && request.upload) {
2377
- request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
2537
+ if (typeof _config.onUploadProgress === 'function' && request.upload) {
2538
+ request.upload.addEventListener('progress', progressEventReducer(_config.onUploadProgress));
2378
2539
  }
2379
2540
 
2380
- if (config.cancelToken || config.signal) {
2541
+ if (_config.cancelToken || _config.signal) {
2381
2542
  // Handle cancellation
2382
2543
  // eslint-disable-next-line func-names
2383
2544
  onCanceled = cancel => {
@@ -2389,13 +2550,13 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2389
2550
  request = null;
2390
2551
  };
2391
2552
 
2392
- config.cancelToken && config.cancelToken.subscribe(onCanceled);
2393
- if (config.signal) {
2394
- config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
2553
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
2554
+ if (_config.signal) {
2555
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
2395
2556
  }
2396
2557
  }
2397
2558
 
2398
- const protocol = parseProtocol(fullPath);
2559
+ const protocol = parseProtocol(_config.url);
2399
2560
 
2400
2561
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
2401
2562
  reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
@@ -2408,9 +2569,324 @@ const xhrAdapter = isXHRAdapterSupported && function (config) {
2408
2569
  });
2409
2570
  };
2410
2571
 
2572
+ const composeSignals = (signals, timeout) => {
2573
+ let controller = new AbortController();
2574
+
2575
+ let aborted;
2576
+
2577
+ const onabort = function (cancel) {
2578
+ if (!aborted) {
2579
+ aborted = true;
2580
+ unsubscribe();
2581
+ const err = cancel instanceof Error ? cancel : this.reason;
2582
+ controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
2583
+ }
2584
+ };
2585
+
2586
+ let timer = timeout && setTimeout(() => {
2587
+ onabort(new AxiosError$1(`timeout ${timeout} of ms exceeded`, AxiosError$1.ETIMEDOUT));
2588
+ }, timeout);
2589
+
2590
+ const unsubscribe = () => {
2591
+ if (signals) {
2592
+ timer && clearTimeout(timer);
2593
+ timer = null;
2594
+ signals.forEach(signal => {
2595
+ signal &&
2596
+ (signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort));
2597
+ });
2598
+ signals = null;
2599
+ }
2600
+ };
2601
+
2602
+ signals.forEach((signal) => signal && signal.addEventListener && signal.addEventListener('abort', onabort));
2603
+
2604
+ const {signal} = controller;
2605
+
2606
+ signal.unsubscribe = unsubscribe;
2607
+
2608
+ return [signal, () => {
2609
+ timer && clearTimeout(timer);
2610
+ timer = null;
2611
+ }];
2612
+ };
2613
+
2614
+ const composeSignals$1 = composeSignals;
2615
+
2616
+ const streamChunk = function* (chunk, chunkSize) {
2617
+ let len = chunk.byteLength;
2618
+
2619
+ if (!chunkSize || len < chunkSize) {
2620
+ yield chunk;
2621
+ return;
2622
+ }
2623
+
2624
+ let pos = 0;
2625
+ let end;
2626
+
2627
+ while (pos < len) {
2628
+ end = pos + chunkSize;
2629
+ yield chunk.slice(pos, end);
2630
+ pos = end;
2631
+ }
2632
+ };
2633
+
2634
+ const readBytes = async function* (iterable, chunkSize, encode) {
2635
+ for await (const chunk of iterable) {
2636
+ yield* streamChunk(ArrayBuffer.isView(chunk) ? chunk : (await encode(String(chunk))), chunkSize);
2637
+ }
2638
+ };
2639
+
2640
+ const trackStream = (stream, chunkSize, onProgress, onFinish, encode) => {
2641
+ const iterator = readBytes(stream, chunkSize, encode);
2642
+
2643
+ let bytes = 0;
2644
+
2645
+ return new ReadableStream({
2646
+ type: 'bytes',
2647
+
2648
+ async pull(controller) {
2649
+ const {done, value} = await iterator.next();
2650
+
2651
+ if (done) {
2652
+ controller.close();
2653
+ onFinish();
2654
+ return;
2655
+ }
2656
+
2657
+ let len = value.byteLength;
2658
+ onProgress && onProgress(bytes += len);
2659
+ controller.enqueue(new Uint8Array(value));
2660
+ },
2661
+ cancel(reason) {
2662
+ onFinish(reason);
2663
+ return iterator.return();
2664
+ }
2665
+ }, {
2666
+ highWaterMark: 2
2667
+ })
2668
+ };
2669
+
2670
+ const fetchProgressDecorator = (total, fn) => {
2671
+ const lengthComputable = total != null;
2672
+ return (loaded) => setTimeout(() => fn({
2673
+ lengthComputable,
2674
+ total,
2675
+ loaded
2676
+ }));
2677
+ };
2678
+
2679
+ const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
2680
+ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
2681
+
2682
+ // used only inside the fetch adapter
2683
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
2684
+ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
2685
+ async (str) => new Uint8Array(await new Response(str).arrayBuffer())
2686
+ );
2687
+
2688
+ const supportsRequestStream = isReadableStreamSupported && (() => {
2689
+ let duplexAccessed = false;
2690
+
2691
+ const hasContentType = new Request(platform.origin, {
2692
+ body: new ReadableStream(),
2693
+ method: 'POST',
2694
+ get duplex() {
2695
+ duplexAccessed = true;
2696
+ return 'half';
2697
+ },
2698
+ }).headers.has('Content-Type');
2699
+
2700
+ return duplexAccessed && !hasContentType;
2701
+ })();
2702
+
2703
+ const DEFAULT_CHUNK_SIZE = 64 * 1024;
2704
+
2705
+ const supportsResponseStream = isReadableStreamSupported && !!(()=> {
2706
+ try {
2707
+ return utils$1.isReadableStream(new Response('').body);
2708
+ } catch(err) {
2709
+ // return undefined
2710
+ }
2711
+ })();
2712
+
2713
+ const resolvers = {
2714
+ stream: supportsResponseStream && ((res) => res.body)
2715
+ };
2716
+
2717
+ isFetchSupported && (((res) => {
2718
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
2719
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
2720
+ (_, config) => {
2721
+ throw new AxiosError$1(`Response type '${type}' is not supported`, AxiosError$1.ERR_NOT_SUPPORT, config);
2722
+ });
2723
+ });
2724
+ })(new Response));
2725
+
2726
+ const getBodyLength = async (body) => {
2727
+ if (body == null) {
2728
+ return 0;
2729
+ }
2730
+
2731
+ if(utils$1.isBlob(body)) {
2732
+ return body.size;
2733
+ }
2734
+
2735
+ if(utils$1.isSpecCompliantForm(body)) {
2736
+ return (await new Request(body).arrayBuffer()).byteLength;
2737
+ }
2738
+
2739
+ if(utils$1.isArrayBufferView(body)) {
2740
+ return body.byteLength;
2741
+ }
2742
+
2743
+ if(utils$1.isURLSearchParams(body)) {
2744
+ body = body + '';
2745
+ }
2746
+
2747
+ if(utils$1.isString(body)) {
2748
+ return (await encodeText(body)).byteLength;
2749
+ }
2750
+ };
2751
+
2752
+ const resolveBodyLength = async (headers, body) => {
2753
+ const length = utils$1.toFiniteNumber(headers.getContentLength());
2754
+
2755
+ return length == null ? getBodyLength(body) : length;
2756
+ };
2757
+
2758
+ const fetchAdapter = isFetchSupported && (async (config) => {
2759
+ let {
2760
+ url,
2761
+ method,
2762
+ data,
2763
+ signal,
2764
+ cancelToken,
2765
+ timeout,
2766
+ onDownloadProgress,
2767
+ onUploadProgress,
2768
+ responseType,
2769
+ headers,
2770
+ withCredentials = 'same-origin',
2771
+ fetchOptions
2772
+ } = resolveConfig(config);
2773
+
2774
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
2775
+
2776
+ let [composedSignal, stopTimeout] = (signal || cancelToken || timeout) ?
2777
+ composeSignals$1([signal, cancelToken], timeout) : [];
2778
+
2779
+ let finished, request;
2780
+
2781
+ const onFinish = () => {
2782
+ !finished && setTimeout(() => {
2783
+ composedSignal && composedSignal.unsubscribe();
2784
+ });
2785
+
2786
+ finished = true;
2787
+ };
2788
+
2789
+ let requestContentLength;
2790
+
2791
+ try {
2792
+ if (
2793
+ onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
2794
+ (requestContentLength = await resolveBodyLength(headers, data)) !== 0
2795
+ ) {
2796
+ let _request = new Request(url, {
2797
+ method: 'POST',
2798
+ body: data,
2799
+ duplex: "half"
2800
+ });
2801
+
2802
+ let contentTypeHeader;
2803
+
2804
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
2805
+ headers.setContentType(contentTypeHeader);
2806
+ }
2807
+
2808
+ if (_request.body) {
2809
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(
2810
+ requestContentLength,
2811
+ progressEventReducer(onUploadProgress)
2812
+ ), null, encodeText);
2813
+ }
2814
+ }
2815
+
2816
+ if (!utils$1.isString(withCredentials)) {
2817
+ withCredentials = withCredentials ? 'cors' : 'omit';
2818
+ }
2819
+
2820
+ request = new Request(url, {
2821
+ ...fetchOptions,
2822
+ signal: composedSignal,
2823
+ method: method.toUpperCase(),
2824
+ headers: headers.normalize().toJSON(),
2825
+ body: data,
2826
+ duplex: "half",
2827
+ withCredentials
2828
+ });
2829
+
2830
+ let response = await fetch(request);
2831
+
2832
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
2833
+
2834
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
2835
+ const options = {};
2836
+
2837
+ ['status', 'statusText', 'headers'].forEach(prop => {
2838
+ options[prop] = response[prop];
2839
+ });
2840
+
2841
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
2842
+
2843
+ response = new Response(
2844
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(
2845
+ responseContentLength,
2846
+ progressEventReducer(onDownloadProgress, true)
2847
+ ), isStreamResponse && onFinish, encodeText),
2848
+ options
2849
+ );
2850
+ }
2851
+
2852
+ responseType = responseType || 'text';
2853
+
2854
+ let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
2855
+
2856
+ !isStreamResponse && onFinish();
2857
+
2858
+ stopTimeout && stopTimeout();
2859
+
2860
+ return await new Promise((resolve, reject) => {
2861
+ settle(resolve, reject, {
2862
+ data: responseData,
2863
+ headers: AxiosHeaders$2.from(response.headers),
2864
+ status: response.status,
2865
+ statusText: response.statusText,
2866
+ config,
2867
+ request
2868
+ });
2869
+ })
2870
+ } catch (err) {
2871
+ onFinish();
2872
+
2873
+ if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
2874
+ throw Object.assign(
2875
+ new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
2876
+ {
2877
+ cause: err.cause || err
2878
+ }
2879
+ )
2880
+ }
2881
+
2882
+ throw AxiosError$1.from(err, err && err.code, config, request);
2883
+ }
2884
+ });
2885
+
2411
2886
  const knownAdapters = {
2412
2887
  http: httpAdapter,
2413
- xhr: xhrAdapter
2888
+ xhr: xhrAdapter,
2889
+ fetch: fetchAdapter
2414
2890
  };
2415
2891
 
2416
2892
  utils$1.forEach(knownAdapters, (fn, value) => {
@@ -2554,109 +3030,7 @@ function dispatchRequest(config) {
2554
3030
  });
2555
3031
  }
2556
3032
 
2557
- const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? thing.toJSON() : thing;
2558
-
2559
- /**
2560
- * Config-specific merge-function which creates a new config-object
2561
- * by merging two configuration objects together.
2562
- *
2563
- * @param {Object} config1
2564
- * @param {Object} config2
2565
- *
2566
- * @returns {Object} New object resulting from merging config2 to config1
2567
- */
2568
- function mergeConfig$1(config1, config2) {
2569
- // eslint-disable-next-line no-param-reassign
2570
- config2 = config2 || {};
2571
- const config = {};
2572
-
2573
- function getMergedValue(target, source, caseless) {
2574
- if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2575
- return utils$1.merge.call({caseless}, target, source);
2576
- } else if (utils$1.isPlainObject(source)) {
2577
- return utils$1.merge({}, source);
2578
- } else if (utils$1.isArray(source)) {
2579
- return source.slice();
2580
- }
2581
- return source;
2582
- }
2583
-
2584
- // eslint-disable-next-line consistent-return
2585
- function mergeDeepProperties(a, b, caseless) {
2586
- if (!utils$1.isUndefined(b)) {
2587
- return getMergedValue(a, b, caseless);
2588
- } else if (!utils$1.isUndefined(a)) {
2589
- return getMergedValue(undefined, a, caseless);
2590
- }
2591
- }
2592
-
2593
- // eslint-disable-next-line consistent-return
2594
- function valueFromConfig2(a, b) {
2595
- if (!utils$1.isUndefined(b)) {
2596
- return getMergedValue(undefined, b);
2597
- }
2598
- }
2599
-
2600
- // eslint-disable-next-line consistent-return
2601
- function defaultToConfig2(a, b) {
2602
- if (!utils$1.isUndefined(b)) {
2603
- return getMergedValue(undefined, b);
2604
- } else if (!utils$1.isUndefined(a)) {
2605
- return getMergedValue(undefined, a);
2606
- }
2607
- }
2608
-
2609
- // eslint-disable-next-line consistent-return
2610
- function mergeDirectKeys(a, b, prop) {
2611
- if (prop in config2) {
2612
- return getMergedValue(a, b);
2613
- } else if (prop in config1) {
2614
- return getMergedValue(undefined, a);
2615
- }
2616
- }
2617
-
2618
- const mergeMap = {
2619
- url: valueFromConfig2,
2620
- method: valueFromConfig2,
2621
- data: valueFromConfig2,
2622
- baseURL: defaultToConfig2,
2623
- transformRequest: defaultToConfig2,
2624
- transformResponse: defaultToConfig2,
2625
- paramsSerializer: defaultToConfig2,
2626
- timeout: defaultToConfig2,
2627
- timeoutMessage: defaultToConfig2,
2628
- withCredentials: defaultToConfig2,
2629
- withXSRFToken: defaultToConfig2,
2630
- adapter: defaultToConfig2,
2631
- responseType: defaultToConfig2,
2632
- xsrfCookieName: defaultToConfig2,
2633
- xsrfHeaderName: defaultToConfig2,
2634
- onUploadProgress: defaultToConfig2,
2635
- onDownloadProgress: defaultToConfig2,
2636
- decompress: defaultToConfig2,
2637
- maxContentLength: defaultToConfig2,
2638
- maxBodyLength: defaultToConfig2,
2639
- beforeRedirect: defaultToConfig2,
2640
- transport: defaultToConfig2,
2641
- httpAgent: defaultToConfig2,
2642
- httpsAgent: defaultToConfig2,
2643
- cancelToken: defaultToConfig2,
2644
- socketPath: defaultToConfig2,
2645
- responseEncoding: defaultToConfig2,
2646
- validateStatus: mergeDirectKeys,
2647
- headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
2648
- };
2649
-
2650
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2651
- const merge = mergeMap[prop] || mergeDeepProperties;
2652
- const configValue = merge(config1[prop], config2[prop], prop);
2653
- (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
2654
- });
2655
-
2656
- return config;
2657
- }
2658
-
2659
- const VERSION$1 = "1.6.6";
3033
+ const VERSION$1 = "1.7.2";
2660
3034
 
2661
3035
  const validators$1 = {};
2662
3036
 
@@ -2775,17 +3149,23 @@ class Axios$1 {
2775
3149
  try {
2776
3150
  return await this._request(configOrUrl, config);
2777
3151
  } catch (err) {
2778
- const dummy = {};
2779
- if (Error.captureStackTrace) {
2780
- Error.captureStackTrace(dummy);
2781
- } else {
2782
- dummy.stack = new Error().stack;
2783
- }
2784
- // slice off the Error: ... line
2785
- dummy.stack = dummy.stack.replace(/^.+\n/, '');
2786
- // match without the 2 top stack lines
2787
- if (!err.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
2788
- err.stack += '\n' + dummy.stack;
3152
+ if (err instanceof Error) {
3153
+ let dummy;
3154
+
3155
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
3156
+
3157
+ // slice off the Error: ... line
3158
+ const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
3159
+ try {
3160
+ if (!err.stack) {
3161
+ err.stack = stack;
3162
+ // match without the 2 top stack lines
3163
+ } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
3164
+ err.stack += '\n' + stack;
3165
+ }
3166
+ } catch (e) {
3167
+ // ignore the case where "stack" is an un-writable property
3168
+ }
2789
3169
  }
2790
3170
 
2791
3171
  throw err;