node-red-contrib-tak-registration 0.3.1 → 0.6.0

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 (412) hide show
  1. package/README.md +1 -1
  2. package/node_modules/@turf/along/package.json +41 -69
  3. package/node_modules/@turf/angle/package.json +44 -75
  4. package/node_modules/@turf/area/package.json +38 -68
  5. package/node_modules/@turf/bbox/package.json +37 -81
  6. package/node_modules/@turf/bbox-clip/package.json +44 -81
  7. package/node_modules/@turf/bbox-polygon/package.json +36 -66
  8. package/node_modules/@turf/bearing/package.json +36 -70
  9. package/node_modules/@turf/bezier-spline/package.json +39 -67
  10. package/node_modules/@turf/boolean-clockwise/package.json +42 -83
  11. package/node_modules/@turf/boolean-contains/package.json +46 -80
  12. package/node_modules/@turf/boolean-crosses/package.json +45 -79
  13. package/node_modules/@turf/boolean-disjoint/package.json +44 -79
  14. package/node_modules/@turf/boolean-equal/package.json +47 -84
  15. package/node_modules/@turf/boolean-intersects/package.json +42 -77
  16. package/node_modules/@turf/boolean-overlap/package.json +48 -82
  17. package/node_modules/@turf/boolean-parallel/package.json +42 -73
  18. package/node_modules/@turf/boolean-point-in-polygon/package.json +37 -77
  19. package/node_modules/@turf/boolean-point-on-line/package.json +39 -73
  20. package/node_modules/@turf/boolean-within/package.json +46 -79
  21. package/node_modules/@turf/buffer/package.json +47 -84
  22. package/node_modules/@turf/center/package.json +42 -73
  23. package/node_modules/@turf/center-mean/package.json +45 -78
  24. package/node_modules/@turf/center-median/package.json +45 -76
  25. package/node_modules/@turf/center-of-mass/package.json +40 -68
  26. package/node_modules/@turf/centroid/package.json +40 -74
  27. package/node_modules/@turf/circle/package.json +41 -71
  28. package/node_modules/@turf/clean-coords/package.json +40 -75
  29. package/node_modules/@turf/clone/package.json +36 -81
  30. package/node_modules/@turf/clusters/package.json +39 -70
  31. package/node_modules/@turf/clusters-dbscan/package.json +51 -88
  32. package/node_modules/@turf/clusters-kmeans/package.json +53 -90
  33. package/node_modules/@turf/collect/package.json +42 -73
  34. package/node_modules/@turf/combine/package.json +37 -65
  35. package/node_modules/@turf/concave/package.json +56 -111
  36. package/node_modules/@turf/convex/package.json +39 -68
  37. package/node_modules/@turf/destination/package.json +41 -75
  38. package/node_modules/@turf/difference/package.json +35 -63
  39. package/node_modules/@turf/dissolve/package.json +38 -66
  40. package/node_modules/@turf/distance/package.json +38 -83
  41. package/node_modules/@turf/distance-weight/package.json +40 -72
  42. package/node_modules/@turf/ellipse/package.json +43 -75
  43. package/node_modules/@turf/envelope/package.json +36 -65
  44. package/node_modules/@turf/explode/package.json +36 -67
  45. package/node_modules/@turf/flatten/package.json +39 -73
  46. package/node_modules/@turf/flip/package.json +36 -64
  47. package/node_modules/@turf/great-circle/package.json +41 -78
  48. package/node_modules/@turf/helpers/package.json +38 -184
  49. package/node_modules/@turf/hex-grid/package.json +50 -97
  50. package/node_modules/@turf/interpolate/package.json +47 -78
  51. package/node_modules/@turf/intersect/package.json +39 -69
  52. package/node_modules/@turf/invariant/package.json +36 -126
  53. package/node_modules/@turf/isobands/package.json +52 -83
  54. package/node_modules/@turf/isolines/package.json +48 -79
  55. package/node_modules/@turf/kinks/package.json +35 -63
  56. package/node_modules/@turf/length/package.json +43 -78
  57. package/node_modules/@turf/line-arc/package.json +36 -65
  58. package/node_modules/@turf/line-chunk/package.json +44 -84
  59. package/node_modules/@turf/line-intersect/package.json +46 -85
  60. package/node_modules/@turf/line-offset/package.json +41 -78
  61. package/node_modules/@turf/line-overlap/package.json +48 -80
  62. package/node_modules/@turf/line-segment/package.json +38 -70
  63. package/node_modules/@turf/line-slice/package.json +39 -67
  64. package/node_modules/@turf/line-slice-along/package.json +36 -65
  65. package/node_modules/@turf/line-split/package.json +46 -77
  66. package/node_modules/@turf/line-to-polygon/package.json +43 -74
  67. package/node_modules/@turf/mask/package.json +35 -63
  68. package/node_modules/@turf/meta/package.json +39 -128
  69. package/node_modules/@turf/midpoint/package.json +36 -64
  70. package/node_modules/@turf/moran-index/package.json +39 -70
  71. package/node_modules/@turf/nearest-point/package.json +39 -69
  72. package/node_modules/@turf/nearest-point-on-line/package.json +40 -71
  73. package/node_modules/@turf/nearest-point-to-line/package.json +47 -78
  74. package/node_modules/@turf/planepoint/package.json +34 -62
  75. package/node_modules/@turf/point-grid/package.json +45 -80
  76. package/node_modules/@turf/point-on-feature/package.json +40 -68
  77. package/node_modules/@turf/point-to-line-distance/package.json +46 -78
  78. package/node_modules/@turf/points-within-polygon/package.json +35 -64
  79. package/node_modules/@turf/polygon-smooth/package.json +37 -68
  80. package/node_modules/@turf/polygon-tangents/package.json +43 -77
  81. package/node_modules/@turf/polygon-to-line/package.json +39 -69
  82. package/node_modules/@turf/polygonize/package.json +43 -77
  83. package/node_modules/@turf/projection/package.json +44 -77
  84. package/node_modules/@turf/random/package.json +34 -62
  85. package/node_modules/@turf/rectangle-grid/package.json +43 -77
  86. package/node_modules/@turf/rewind/package.json +43 -83
  87. package/node_modules/@turf/rhumb-bearing/package.json +43 -85
  88. package/node_modules/@turf/rhumb-destination/package.json +44 -85
  89. package/node_modules/@turf/rhumb-distance/package.json +44 -84
  90. package/node_modules/@turf/sample/package.json +32 -60
  91. package/node_modules/@turf/sector/package.json +37 -65
  92. package/node_modules/@turf/shortest-path/package.json +45 -79
  93. package/node_modules/@turf/simplify/package.json +43 -77
  94. package/node_modules/@turf/square/package.json +33 -62
  95. package/node_modules/@turf/square-grid/package.json +40 -69
  96. package/node_modules/@turf/standard-deviational-ellipse/package.json +43 -74
  97. package/node_modules/@turf/tag/package.json +38 -66
  98. package/node_modules/@turf/tesselate/package.json +40 -80
  99. package/node_modules/@turf/tin/package.json +34 -63
  100. package/node_modules/@turf/transform-rotate/package.json +45 -80
  101. package/node_modules/@turf/transform-scale/package.json +51 -86
  102. package/node_modules/@turf/transform-translate/package.json +44 -78
  103. package/node_modules/@turf/triangle-grid/package.json +42 -71
  104. package/node_modules/@turf/truncate/package.json +40 -72
  105. package/node_modules/@turf/turf/package.json +74 -102
  106. package/node_modules/@turf/union/package.json +39 -67
  107. package/node_modules/@turf/unkink-polygon/package.json +40 -68
  108. package/node_modules/@turf/voronoi/package.json +43 -83
  109. package/node_modules/@types/geojson/package.json +42 -66
  110. package/node_modules/adm-zip/LICENSE +21 -21
  111. package/node_modules/adm-zip/adm-zip.js +25 -22
  112. package/node_modules/adm-zip/headers/mainHeader.js +2 -1
  113. package/node_modules/adm-zip/package.json +28 -57
  114. package/node_modules/adm-zip/util/utils.js +1 -0
  115. package/node_modules/asynckit/package.json +40 -68
  116. package/node_modules/axios/CHANGELOG.md +473 -837
  117. package/node_modules/axios/LICENSE +4 -16
  118. package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
  119. package/node_modules/axios/README.md +518 -114
  120. package/node_modules/axios/SECURITY.md +4 -3
  121. package/node_modules/axios/dist/axios.js +2759 -2070
  122. package/node_modules/axios/dist/axios.js.map +1 -0
  123. package/node_modules/axios/dist/axios.min.js +2 -2
  124. package/node_modules/axios/dist/axios.min.js.map +1 -0
  125. package/node_modules/axios/dist/browser/axios.cjs +3210 -0
  126. package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  127. package/node_modules/axios/dist/esm/axios.js +3232 -0
  128. package/node_modules/axios/dist/esm/axios.js.map +1 -0
  129. package/node_modules/axios/dist/esm/axios.min.js +2 -0
  130. package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  131. package/node_modules/axios/dist/node/axios.cjs +4237 -0
  132. package/node_modules/axios/dist/node/axios.cjs.map +1 -0
  133. package/node_modules/axios/index.d.cts +532 -0
  134. package/node_modules/axios/index.d.ts +398 -72
  135. package/node_modules/axios/index.js +41 -1
  136. package/node_modules/axios/lib/adapters/adapters.js +59 -0
  137. package/node_modules/axios/lib/adapters/http.js +479 -217
  138. package/node_modules/axios/lib/adapters/xhr.js +95 -54
  139. package/node_modules/axios/lib/axios.js +49 -20
  140. package/node_modules/axios/lib/cancel/CancelToken.js +91 -89
  141. package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
  142. package/node_modules/axios/lib/cancel/isCancel.js +2 -2
  143. package/node_modules/axios/lib/core/Axios.js +155 -100
  144. package/node_modules/axios/lib/core/AxiosError.js +100 -0
  145. package/node_modules/axios/lib/core/AxiosHeaders.js +288 -0
  146. package/node_modules/axios/lib/core/InterceptorManager.js +62 -45
  147. package/node_modules/axios/lib/core/buildFullPath.js +5 -4
  148. package/node_modules/axios/lib/core/dispatchRequest.js +27 -33
  149. package/node_modules/axios/lib/core/mergeConfig.js +58 -52
  150. package/node_modules/axios/lib/core/settle.js +8 -6
  151. package/node_modules/axios/lib/core/transformData.js +15 -9
  152. package/node_modules/axios/lib/defaults/index.js +76 -41
  153. package/node_modules/axios/lib/defaults/transitional.js +1 -1
  154. package/node_modules/axios/lib/env/classes/FormData.js +2 -0
  155. package/node_modules/axios/lib/env/data.js +1 -3
  156. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +191 -0
  157. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
  158. package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  159. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  160. package/node_modules/axios/lib/helpers/bind.js +3 -7
  161. package/node_modules/axios/lib/helpers/buildURL.js +26 -33
  162. package/node_modules/axios/lib/helpers/callbackify.js +16 -0
  163. package/node_modules/axios/lib/helpers/combineURLs.js +3 -2
  164. package/node_modules/axios/lib/helpers/cookies.js +43 -44
  165. package/node_modules/axios/lib/helpers/deprecatedMethod.js +4 -2
  166. package/node_modules/axios/lib/helpers/formDataToJSON.js +92 -0
  167. package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
  168. package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
  169. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +3 -2
  170. package/node_modules/axios/lib/helpers/isAxiosError.js +4 -3
  171. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +44 -45
  172. package/node_modules/axios/lib/helpers/null.js +2 -0
  173. package/node_modules/axios/lib/helpers/parseHeaders.js +24 -22
  174. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  175. package/node_modules/axios/lib/helpers/readBlob.js +15 -0
  176. package/node_modules/axios/lib/helpers/speedometer.js +55 -0
  177. package/node_modules/axios/lib/helpers/spread.js +3 -2
  178. package/node_modules/axios/lib/helpers/throttle.js +33 -0
  179. package/node_modules/axios/lib/helpers/toFormData.js +203 -39
  180. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
  181. package/node_modules/axios/lib/helpers/validator.js +27 -18
  182. package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  183. package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  184. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  185. package/node_modules/axios/lib/platform/browser/index.js +64 -0
  186. package/node_modules/axios/lib/platform/index.js +3 -0
  187. package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  188. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  189. package/node_modules/axios/lib/platform/node/index.js +12 -0
  190. package/node_modules/axios/lib/utils.js +517 -144
  191. package/node_modules/axios/package.json +194 -93
  192. package/node_modules/call-bind/package.json +78 -109
  193. package/node_modules/combined-stream/package.json +14 -46
  194. package/node_modules/commander/package.json +20 -53
  195. package/node_modules/concaveman/node_modules/quickselect/package.json +43 -0
  196. package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/README.md +22 -95
  197. package/node_modules/{@turf/unkink-polygon → concaveman}/node_modules/rbush/index.js +131 -181
  198. package/node_modules/concaveman/node_modules/rbush/package.json +56 -0
  199. package/node_modules/concaveman/node_modules/rbush/rbush.js +574 -0
  200. package/node_modules/concaveman/node_modules/rbush/rbush.min.js +1 -0
  201. package/node_modules/concaveman/package.json +15 -46
  202. package/node_modules/d3-array/package.json +19 -47
  203. package/node_modules/d3-geo/package.json +24 -52
  204. package/node_modules/d3-voronoi/package.json +19 -47
  205. package/node_modules/deep-equal/package.json +34 -64
  206. package/node_modules/define-properties/.eslintrc +10 -3
  207. package/node_modules/define-properties/.github/FUNDING.yml +12 -0
  208. package/node_modules/define-properties/.nycrc +9 -0
  209. package/node_modules/define-properties/CHANGELOG.md +39 -0
  210. package/node_modules/define-properties/README.md +11 -13
  211. package/node_modules/define-properties/index.js +12 -17
  212. package/node_modules/define-properties/package.json +85 -95
  213. package/node_modules/delayed-stream/package.json +14 -49
  214. package/node_modules/density-clustering/package.json +46 -70
  215. package/node_modules/earcut/README.md +12 -3
  216. package/node_modules/earcut/dist/earcut.dev.js +47 -50
  217. package/node_modules/earcut/dist/earcut.min.js +1 -1
  218. package/node_modules/earcut/package.json +26 -60
  219. package/node_modules/earcut/src/earcut.js +46 -49
  220. package/node_modules/follow-redirects/README.md +8 -1
  221. package/node_modules/follow-redirects/index.js +83 -36
  222. package/node_modules/follow-redirects/package.json +38 -74
  223. package/node_modules/form-data/package.json +37 -70
  224. package/node_modules/function-bind/package.json +23 -56
  225. package/node_modules/functions-have-names/.editorconfig +20 -0
  226. package/node_modules/functions-have-names/.eslintrc +19 -0
  227. package/node_modules/functions-have-names/.github/FUNDING.yml +12 -0
  228. package/node_modules/functions-have-names/.nycrc +9 -0
  229. package/node_modules/functions-have-names/CHANGELOG.md +89 -0
  230. package/node_modules/functions-have-names/LICENSE +21 -0
  231. package/node_modules/functions-have-names/README.md +40 -0
  232. package/node_modules/functions-have-names/index.js +31 -0
  233. package/node_modules/functions-have-names/package.json +55 -0
  234. package/node_modules/functions-have-names/test/index.js +65 -0
  235. package/node_modules/geojson-equality/package.json +23 -55
  236. package/node_modules/geojson-rbush/node_modules/quickselect/package.json +43 -0
  237. package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/README.md +22 -95
  238. package/node_modules/{@turf/collect → geojson-rbush}/node_modules/rbush/index.js +131 -181
  239. package/node_modules/geojson-rbush/node_modules/rbush/package.json +56 -0
  240. package/node_modules/geojson-rbush/node_modules/rbush/rbush.js +574 -0
  241. package/node_modules/geojson-rbush/node_modules/rbush/rbush.min.js +1 -0
  242. package/node_modules/geojson-rbush/package.json +32 -71
  243. package/node_modules/get-intrinsic/.eslintrc +3 -8
  244. package/node_modules/get-intrinsic/.nycrc +0 -4
  245. package/node_modules/get-intrinsic/CHANGELOG.md +53 -0
  246. package/node_modules/get-intrinsic/README.md +7 -1
  247. package/node_modules/get-intrinsic/index.js +29 -8
  248. package/node_modules/get-intrinsic/package.json +91 -104
  249. package/node_modules/get-intrinsic/test/GetIntrinsic.js +26 -12
  250. package/node_modules/has/package.json +21 -46
  251. package/node_modules/has-property-descriptors/.eslintrc +13 -0
  252. package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
  253. package/node_modules/has-property-descriptors/.nycrc +9 -0
  254. package/node_modules/has-property-descriptors/CHANGELOG.md +16 -0
  255. package/node_modules/has-property-descriptors/LICENSE +21 -0
  256. package/node_modules/has-property-descriptors/README.md +43 -0
  257. package/node_modules/has-property-descriptors/index.js +33 -0
  258. package/node_modules/has-property-descriptors/package.json +70 -0
  259. package/node_modules/has-property-descriptors/test/index.js +57 -0
  260. package/node_modules/has-proto/.eslintrc +5 -0
  261. package/node_modules/has-proto/.github/FUNDING.yml +12 -0
  262. package/node_modules/has-proto/CHANGELOG.md +23 -0
  263. package/node_modules/has-proto/LICENSE +21 -0
  264. package/node_modules/has-proto/README.md +38 -0
  265. package/node_modules/has-proto/index.js +11 -0
  266. package/node_modules/has-proto/package.json +74 -0
  267. package/node_modules/has-proto/test/index.js +19 -0
  268. package/node_modules/has-symbols/package.json +99 -125
  269. package/node_modules/has-tostringtag/package.json +82 -109
  270. package/node_modules/is-arguments/package.json +89 -114
  271. package/node_modules/is-date-object/package.json +77 -108
  272. package/node_modules/is-regex/package.json +84 -112
  273. package/node_modules/mime-db/HISTORY.md +8 -0
  274. package/node_modules/mime-db/LICENSE +19 -18
  275. package/node_modules/mime-db/README.md +1 -1
  276. package/node_modules/mime-db/db.json +54 -6
  277. package/node_modules/mime-db/index.js +1 -0
  278. package/node_modules/mime-db/package.json +24 -66
  279. package/node_modules/mime-types/HISTORY.md +9 -0
  280. package/node_modules/mime-types/README.md +1 -1
  281. package/node_modules/mime-types/package.json +19 -62
  282. package/node_modules/object-assign/package.json +15 -49
  283. package/node_modules/object-is/package.json +85 -112
  284. package/node_modules/object-keys/package.json +86 -116
  285. package/node_modules/point-in-polygon/package.json +19 -48
  286. package/node_modules/polygon-clipping/package.json +41 -80
  287. package/node_modules/proxy-from-env/.eslintrc +29 -0
  288. package/node_modules/proxy-from-env/.travis.yml +10 -0
  289. package/node_modules/proxy-from-env/LICENSE +20 -0
  290. package/node_modules/proxy-from-env/README.md +131 -0
  291. package/node_modules/proxy-from-env/index.js +108 -0
  292. package/node_modules/proxy-from-env/package.json +34 -0
  293. package/node_modules/proxy-from-env/test.js +483 -0
  294. package/node_modules/quickselect/package.json +13 -41
  295. package/node_modules/rbush/README.md +95 -22
  296. package/node_modules/rbush/index.js +181 -131
  297. package/node_modules/rbush/package.json +39 -71
  298. package/node_modules/rbush/rbush.js +412 -360
  299. package/node_modules/rbush/rbush.min.js +1 -1
  300. package/node_modules/regexp.prototype.flags/.eslintrc +1 -0
  301. package/node_modules/regexp.prototype.flags/CHANGELOG.md +19 -0
  302. package/node_modules/regexp.prototype.flags/implementation.js +9 -0
  303. package/node_modules/regexp.prototype.flags/package.json +98 -122
  304. package/node_modules/regexp.prototype.flags/test/shimmed.js +2 -1
  305. package/node_modules/regexp.prototype.flags/test/tests.js +7 -5
  306. package/node_modules/robust-predicates/package.json +25 -52
  307. package/node_modules/skmeans/package.json +18 -53
  308. package/node_modules/splaytree/Readme.md +58 -57
  309. package/node_modules/splaytree/dist/splay.esm.js +21 -8
  310. package/node_modules/splaytree/dist/splay.esm.js.map +1 -1
  311. package/node_modules/splaytree/dist/splay.js +21 -8
  312. package/node_modules/splaytree/dist/splay.js.map +1 -1
  313. package/node_modules/splaytree/package.json +36 -68
  314. package/node_modules/splaytree/src/index.ts +16 -4
  315. package/node_modules/tinyqueue/package.json +34 -59
  316. package/node_modules/topojson-client/package.json +28 -56
  317. package/node_modules/topojson-server/package.json +27 -55
  318. package/node_modules/turf-jsts/package.json +33 -68
  319. package/node_modules/uuid/CHANGELOG.md +39 -0
  320. package/node_modules/uuid/README.md +30 -73
  321. package/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
  322. package/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
  323. package/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
  324. package/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
  325. package/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
  326. package/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
  327. package/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
  328. package/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
  329. package/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
  330. package/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
  331. package/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
  332. package/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
  333. package/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
  334. package/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
  335. package/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
  336. package/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
  337. package/node_modules/uuid/dist/esm-browser/md5.js +23 -23
  338. package/node_modules/uuid/dist/esm-browser/native.js +4 -0
  339. package/node_modules/uuid/dist/esm-browser/parse.js +2 -2
  340. package/node_modules/uuid/dist/esm-browser/rng.js +4 -5
  341. package/node_modules/uuid/dist/esm-browser/sha1.js +26 -26
  342. package/node_modules/uuid/dist/esm-browser/stringify.js +9 -6
  343. package/node_modules/uuid/dist/esm-browser/v1.js +17 -17
  344. package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
  345. package/node_modules/uuid/dist/esm-browser/v35.js +12 -10
  346. package/node_modules/uuid/dist/esm-browser/v4.js +9 -4
  347. package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
  348. package/node_modules/uuid/dist/esm-browser/version.js +1 -1
  349. package/node_modules/uuid/dist/esm-node/native.js +4 -0
  350. package/node_modules/uuid/dist/esm-node/stringify.js +7 -3
  351. package/node_modules/uuid/dist/esm-node/v1.js +2 -2
  352. package/node_modules/uuid/dist/esm-node/v35.js +6 -4
  353. package/node_modules/uuid/dist/esm-node/v4.js +7 -2
  354. package/node_modules/uuid/dist/esm-node/version.js +1 -1
  355. package/node_modules/uuid/dist/index.js +18 -18
  356. package/node_modules/uuid/dist/native-browser.js +11 -0
  357. package/node_modules/uuid/dist/native.js +15 -0
  358. package/node_modules/uuid/dist/rng-browser.js +2 -3
  359. package/node_modules/uuid/dist/stringify.js +8 -3
  360. package/node_modules/uuid/dist/v1.js +2 -2
  361. package/node_modules/uuid/dist/v35.js +7 -5
  362. package/node_modules/uuid/dist/v4.js +8 -2
  363. package/node_modules/uuid/dist/version.js +1 -1
  364. package/node_modules/uuid/package.json +87 -120
  365. package/package.json +12 -8
  366. package/tak-ingest.html +40 -0
  367. package/tak-ingest.js +48 -0
  368. package/tak-registration.html +13 -2
  369. package/tak-registration.js +55 -7
  370. package/node_modules/@turf/collect/node_modules/quickselect/package.json +0 -69
  371. package/node_modules/@turf/collect/node_modules/rbush/package.json +0 -85
  372. package/node_modules/@turf/collect/node_modules/rbush/rbush.js +0 -626
  373. package/node_modules/@turf/collect/node_modules/rbush/rbush.min.js +0 -1
  374. package/node_modules/@turf/unkink-polygon/node_modules/quickselect/package.json +0 -69
  375. package/node_modules/@turf/unkink-polygon/node_modules/rbush/package.json +0 -85
  376. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.js +0 -626
  377. package/node_modules/@turf/unkink-polygon/node_modules/rbush/rbush.min.js +0 -1
  378. package/node_modules/axios/UPGRADE_GUIDE.md +0 -168
  379. package/node_modules/axios/dist/axios.map +0 -1
  380. package/node_modules/axios/dist/axios.min.map +0 -1
  381. package/node_modules/axios/lib/cancel/Cancel.js +0 -19
  382. package/node_modules/axios/lib/core/createError.js +0 -18
  383. package/node_modules/axios/lib/core/enhanceError.js +0 -43
  384. package/node_modules/axios/lib/helpers/normalizeHeaderName.js +0 -12
  385. package/node_modules/axios/tsconfig.json +0 -14
  386. package/node_modules/axios/tslint.json +0 -6
  387. package/node_modules/combined-stream/yarn.lock +0 -17
  388. package/node_modules/d3-array/yarn.lock +0 -939
  389. package/node_modules/define-properties/.jscs.json +0 -175
  390. package/node_modules/define-properties/.travis.yml +0 -233
  391. package/node_modules/define-properties/test/index.js +0 -125
  392. package/node_modules/get-intrinsic/.eslintignore +0 -1
  393. package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  394. package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  395. package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  396. package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  397. package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  398. package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  399. package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  400. package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  401. package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  402. package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  403. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/LICENSE +0 -0
  404. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/README.md +0 -0
  405. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/index.js +0 -0
  406. /package/node_modules/{@turf/collect → concaveman}/node_modules/quickselect/quickselect.js +0 -0
  407. /package/node_modules/{@turf/collect → concaveman}/node_modules/rbush/LICENSE +0 -0
  408. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/LICENSE +0 -0
  409. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/README.md +0 -0
  410. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/index.js +0 -0
  411. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/quickselect/quickselect.js +0 -0
  412. /package/node_modules/{@turf/unkink-polygon → geojson-rbush}/node_modules/rbush/LICENSE +0 -0
@@ -0,0 +1,3232 @@
1
+ // Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
2
+ function bind(fn, thisArg) {
3
+ return function wrap() {
4
+ return fn.apply(thisArg, arguments);
5
+ };
6
+ }
7
+
8
+ // utils is a library of generic helper functions non-specific to axios
9
+
10
+ const {toString} = Object.prototype;
11
+ const {getPrototypeOf} = Object;
12
+
13
+ const kindOf = (cache => thing => {
14
+ const str = toString.call(thing);
15
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
16
+ })(Object.create(null));
17
+
18
+ const kindOfTest = (type) => {
19
+ type = type.toLowerCase();
20
+ return (thing) => kindOf(thing) === type
21
+ };
22
+
23
+ const typeOfTest = type => thing => typeof thing === type;
24
+
25
+ /**
26
+ * Determine if a value is an Array
27
+ *
28
+ * @param {Object} val The value to test
29
+ *
30
+ * @returns {boolean} True if value is an Array, otherwise false
31
+ */
32
+ const {isArray} = Array;
33
+
34
+ /**
35
+ * Determine if a value is undefined
36
+ *
37
+ * @param {*} val The value to test
38
+ *
39
+ * @returns {boolean} True if the value is undefined, otherwise false
40
+ */
41
+ const isUndefined = typeOfTest('undefined');
42
+
43
+ /**
44
+ * Determine if a value is a Buffer
45
+ *
46
+ * @param {*} val The value to test
47
+ *
48
+ * @returns {boolean} True if value is a Buffer, otherwise false
49
+ */
50
+ function isBuffer(val) {
51
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
52
+ && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
53
+ }
54
+
55
+ /**
56
+ * Determine if a value is an ArrayBuffer
57
+ *
58
+ * @param {*} val The value to test
59
+ *
60
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
61
+ */
62
+ const isArrayBuffer = kindOfTest('ArrayBuffer');
63
+
64
+
65
+ /**
66
+ * Determine if a value is a view on an ArrayBuffer
67
+ *
68
+ * @param {*} val The value to test
69
+ *
70
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
71
+ */
72
+ function isArrayBufferView(val) {
73
+ let result;
74
+ if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
75
+ result = ArrayBuffer.isView(val);
76
+ } else {
77
+ result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
78
+ }
79
+ return result;
80
+ }
81
+
82
+ /**
83
+ * Determine if a value is a String
84
+ *
85
+ * @param {*} val The value to test
86
+ *
87
+ * @returns {boolean} True if value is a String, otherwise false
88
+ */
89
+ const isString = typeOfTest('string');
90
+
91
+ /**
92
+ * Determine if a value is a Function
93
+ *
94
+ * @param {*} val The value to test
95
+ * @returns {boolean} True if value is a Function, otherwise false
96
+ */
97
+ const isFunction = typeOfTest('function');
98
+
99
+ /**
100
+ * Determine if a value is a Number
101
+ *
102
+ * @param {*} val The value to test
103
+ *
104
+ * @returns {boolean} True if value is a Number, otherwise false
105
+ */
106
+ const isNumber = typeOfTest('number');
107
+
108
+ /**
109
+ * Determine if a value is an Object
110
+ *
111
+ * @param {*} thing The value to test
112
+ *
113
+ * @returns {boolean} True if value is an Object, otherwise false
114
+ */
115
+ const isObject = (thing) => thing !== null && typeof thing === 'object';
116
+
117
+ /**
118
+ * Determine if a value is a Boolean
119
+ *
120
+ * @param {*} thing The value to test
121
+ * @returns {boolean} True if value is a Boolean, otherwise false
122
+ */
123
+ const isBoolean = thing => thing === true || thing === false;
124
+
125
+ /**
126
+ * Determine if a value is a plain Object
127
+ *
128
+ * @param {*} val The value to test
129
+ *
130
+ * @returns {boolean} True if value is a plain Object, otherwise false
131
+ */
132
+ const isPlainObject = (val) => {
133
+ if (kindOf(val) !== 'object') {
134
+ return false;
135
+ }
136
+
137
+ const prototype = getPrototypeOf(val);
138
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
139
+ };
140
+
141
+ /**
142
+ * Determine if a value is a Date
143
+ *
144
+ * @param {*} val The value to test
145
+ *
146
+ * @returns {boolean} True if value is a Date, otherwise false
147
+ */
148
+ const isDate = kindOfTest('Date');
149
+
150
+ /**
151
+ * Determine if a value is a File
152
+ *
153
+ * @param {*} val The value to test
154
+ *
155
+ * @returns {boolean} True if value is a File, otherwise false
156
+ */
157
+ const isFile = kindOfTest('File');
158
+
159
+ /**
160
+ * Determine if a value is a Blob
161
+ *
162
+ * @param {*} val The value to test
163
+ *
164
+ * @returns {boolean} True if value is a Blob, otherwise false
165
+ */
166
+ const isBlob = kindOfTest('Blob');
167
+
168
+ /**
169
+ * Determine if a value is a FileList
170
+ *
171
+ * @param {*} val The value to test
172
+ *
173
+ * @returns {boolean} True if value is a File, otherwise false
174
+ */
175
+ const isFileList = kindOfTest('FileList');
176
+
177
+ /**
178
+ * Determine if a value is a Stream
179
+ *
180
+ * @param {*} val The value to test
181
+ *
182
+ * @returns {boolean} True if value is a Stream, otherwise false
183
+ */
184
+ const isStream = (val) => isObject(val) && isFunction(val.pipe);
185
+
186
+ /**
187
+ * Determine if a value is a FormData
188
+ *
189
+ * @param {*} thing The value to test
190
+ *
191
+ * @returns {boolean} True if value is an FormData, otherwise false
192
+ */
193
+ const isFormData = (thing) => {
194
+ let kind;
195
+ return thing && (
196
+ (typeof FormData === 'function' && thing instanceof FormData) || (
197
+ isFunction(thing.append) && (
198
+ (kind = kindOf(thing)) === 'formdata' ||
199
+ // detect form-data instance
200
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
201
+ )
202
+ )
203
+ )
204
+ };
205
+
206
+ /**
207
+ * Determine if a value is a URLSearchParams object
208
+ *
209
+ * @param {*} val The value to test
210
+ *
211
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
212
+ */
213
+ const isURLSearchParams = kindOfTest('URLSearchParams');
214
+
215
+ /**
216
+ * Trim excess whitespace off the beginning and end of a string
217
+ *
218
+ * @param {String} str The String to trim
219
+ *
220
+ * @returns {String} The String freed of excess whitespace
221
+ */
222
+ const trim = (str) => str.trim ?
223
+ str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
224
+
225
+ /**
226
+ * Iterate over an Array or an Object invoking a function for each item.
227
+ *
228
+ * If `obj` is an Array callback will be called passing
229
+ * the value, index, and complete array for each item.
230
+ *
231
+ * If 'obj' is an Object callback will be called passing
232
+ * the value, key, and complete object for each property.
233
+ *
234
+ * @param {Object|Array} obj The object to iterate
235
+ * @param {Function} fn The callback to invoke for each item
236
+ *
237
+ * @param {Boolean} [allOwnKeys = false]
238
+ * @returns {any}
239
+ */
240
+ function forEach(obj, fn, {allOwnKeys = false} = {}) {
241
+ // Don't bother if no value provided
242
+ if (obj === null || typeof obj === 'undefined') {
243
+ return;
244
+ }
245
+
246
+ let i;
247
+ let l;
248
+
249
+ // Force an array if not already something iterable
250
+ if (typeof obj !== 'object') {
251
+ /*eslint no-param-reassign:0*/
252
+ obj = [obj];
253
+ }
254
+
255
+ if (isArray(obj)) {
256
+ // Iterate over array values
257
+ for (i = 0, l = obj.length; i < l; i++) {
258
+ fn.call(null, obj[i], i, obj);
259
+ }
260
+ } else {
261
+ // Iterate over object keys
262
+ const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
263
+ const len = keys.length;
264
+ let key;
265
+
266
+ for (i = 0; i < len; i++) {
267
+ key = keys[i];
268
+ fn.call(null, obj[key], key, obj);
269
+ }
270
+ }
271
+ }
272
+
273
+ function findKey(obj, key) {
274
+ key = key.toLowerCase();
275
+ const keys = Object.keys(obj);
276
+ let i = keys.length;
277
+ let _key;
278
+ while (i-- > 0) {
279
+ _key = keys[i];
280
+ if (key === _key.toLowerCase()) {
281
+ return _key;
282
+ }
283
+ }
284
+ return null;
285
+ }
286
+
287
+ const _global = (() => {
288
+ /*eslint no-undef:0*/
289
+ if (typeof globalThis !== "undefined") return globalThis;
290
+ return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
291
+ })();
292
+
293
+ const isContextDefined = (context) => !isUndefined(context) && context !== _global;
294
+
295
+ /**
296
+ * Accepts varargs expecting each argument to be an object, then
297
+ * immutably merges the properties of each object and returns result.
298
+ *
299
+ * When multiple objects contain the same key the later object in
300
+ * the arguments list will take precedence.
301
+ *
302
+ * Example:
303
+ *
304
+ * ```js
305
+ * var result = merge({foo: 123}, {foo: 456});
306
+ * console.log(result.foo); // outputs 456
307
+ * ```
308
+ *
309
+ * @param {Object} obj1 Object to merge
310
+ *
311
+ * @returns {Object} Result of all merge properties
312
+ */
313
+ function merge(/* obj1, obj2, obj3, ... */) {
314
+ const {caseless} = isContextDefined(this) && this || {};
315
+ const result = {};
316
+ const assignValue = (val, key) => {
317
+ const targetKey = caseless && findKey(result, key) || key;
318
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
319
+ result[targetKey] = merge(result[targetKey], val);
320
+ } else if (isPlainObject(val)) {
321
+ result[targetKey] = merge({}, val);
322
+ } else if (isArray(val)) {
323
+ result[targetKey] = val.slice();
324
+ } else {
325
+ result[targetKey] = val;
326
+ }
327
+ };
328
+
329
+ for (let i = 0, l = arguments.length; i < l; i++) {
330
+ arguments[i] && forEach(arguments[i], assignValue);
331
+ }
332
+ return result;
333
+ }
334
+
335
+ /**
336
+ * Extends object a by mutably adding to it the properties of object b.
337
+ *
338
+ * @param {Object} a The object to be extended
339
+ * @param {Object} b The object to copy properties from
340
+ * @param {Object} thisArg The object to bind function to
341
+ *
342
+ * @param {Boolean} [allOwnKeys]
343
+ * @returns {Object} The resulting value of object a
344
+ */
345
+ const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
346
+ forEach(b, (val, key) => {
347
+ if (thisArg && isFunction(val)) {
348
+ a[key] = bind(val, thisArg);
349
+ } else {
350
+ a[key] = val;
351
+ }
352
+ }, {allOwnKeys});
353
+ return a;
354
+ };
355
+
356
+ /**
357
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
358
+ *
359
+ * @param {string} content with BOM
360
+ *
361
+ * @returns {string} content value without BOM
362
+ */
363
+ const stripBOM = (content) => {
364
+ if (content.charCodeAt(0) === 0xFEFF) {
365
+ content = content.slice(1);
366
+ }
367
+ return content;
368
+ };
369
+
370
+ /**
371
+ * Inherit the prototype methods from one constructor into another
372
+ * @param {function} constructor
373
+ * @param {function} superConstructor
374
+ * @param {object} [props]
375
+ * @param {object} [descriptors]
376
+ *
377
+ * @returns {void}
378
+ */
379
+ const inherits = (constructor, superConstructor, props, descriptors) => {
380
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
381
+ constructor.prototype.constructor = constructor;
382
+ Object.defineProperty(constructor, 'super', {
383
+ value: superConstructor.prototype
384
+ });
385
+ props && Object.assign(constructor.prototype, props);
386
+ };
387
+
388
+ /**
389
+ * Resolve object with deep prototype chain to a flat object
390
+ * @param {Object} sourceObj source object
391
+ * @param {Object} [destObj]
392
+ * @param {Function|Boolean} [filter]
393
+ * @param {Function} [propFilter]
394
+ *
395
+ * @returns {Object}
396
+ */
397
+ const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
398
+ let props;
399
+ let i;
400
+ let prop;
401
+ const merged = {};
402
+
403
+ destObj = destObj || {};
404
+ // eslint-disable-next-line no-eq-null,eqeqeq
405
+ if (sourceObj == null) return destObj;
406
+
407
+ do {
408
+ props = Object.getOwnPropertyNames(sourceObj);
409
+ i = props.length;
410
+ while (i-- > 0) {
411
+ prop = props[i];
412
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
413
+ destObj[prop] = sourceObj[prop];
414
+ merged[prop] = true;
415
+ }
416
+ }
417
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
418
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
419
+
420
+ return destObj;
421
+ };
422
+
423
+ /**
424
+ * Determines whether a string ends with the characters of a specified string
425
+ *
426
+ * @param {String} str
427
+ * @param {String} searchString
428
+ * @param {Number} [position= 0]
429
+ *
430
+ * @returns {boolean}
431
+ */
432
+ const endsWith = (str, searchString, position) => {
433
+ str = String(str);
434
+ if (position === undefined || position > str.length) {
435
+ position = str.length;
436
+ }
437
+ position -= searchString.length;
438
+ const lastIndex = str.indexOf(searchString, position);
439
+ return lastIndex !== -1 && lastIndex === position;
440
+ };
441
+
442
+
443
+ /**
444
+ * Returns new array from array like object or null if failed
445
+ *
446
+ * @param {*} [thing]
447
+ *
448
+ * @returns {?Array}
449
+ */
450
+ const toArray = (thing) => {
451
+ if (!thing) return null;
452
+ if (isArray(thing)) return thing;
453
+ let i = thing.length;
454
+ if (!isNumber(i)) return null;
455
+ const arr = new Array(i);
456
+ while (i-- > 0) {
457
+ arr[i] = thing[i];
458
+ }
459
+ return arr;
460
+ };
461
+
462
+ /**
463
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
464
+ * thing passed in is an instance of Uint8Array
465
+ *
466
+ * @param {TypedArray}
467
+ *
468
+ * @returns {Array}
469
+ */
470
+ // eslint-disable-next-line func-names
471
+ const isTypedArray = (TypedArray => {
472
+ // eslint-disable-next-line func-names
473
+ return thing => {
474
+ return TypedArray && thing instanceof TypedArray;
475
+ };
476
+ })(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
477
+
478
+ /**
479
+ * For each entry in the object, call the function with the key and value.
480
+ *
481
+ * @param {Object<any, any>} obj - The object to iterate over.
482
+ * @param {Function} fn - The function to call for each entry.
483
+ *
484
+ * @returns {void}
485
+ */
486
+ const forEachEntry = (obj, fn) => {
487
+ const generator = obj && obj[Symbol.iterator];
488
+
489
+ const iterator = generator.call(obj);
490
+
491
+ let result;
492
+
493
+ while ((result = iterator.next()) && !result.done) {
494
+ const pair = result.value;
495
+ fn.call(obj, pair[0], pair[1]);
496
+ }
497
+ };
498
+
499
+ /**
500
+ * It takes a regular expression and a string, and returns an array of all the matches
501
+ *
502
+ * @param {string} regExp - The regular expression to match against.
503
+ * @param {string} str - The string to search.
504
+ *
505
+ * @returns {Array<boolean>}
506
+ */
507
+ const matchAll = (regExp, str) => {
508
+ let matches;
509
+ const arr = [];
510
+
511
+ while ((matches = regExp.exec(str)) !== null) {
512
+ arr.push(matches);
513
+ }
514
+
515
+ return arr;
516
+ };
517
+
518
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
519
+ const isHTMLForm = kindOfTest('HTMLFormElement');
520
+
521
+ const toCamelCase = str => {
522
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
523
+ function replacer(m, p1, p2) {
524
+ return p1.toUpperCase() + p2;
525
+ }
526
+ );
527
+ };
528
+
529
+ /* Creating a function that will check if an object has a property. */
530
+ const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
531
+
532
+ /**
533
+ * Determine if a value is a RegExp object
534
+ *
535
+ * @param {*} val The value to test
536
+ *
537
+ * @returns {boolean} True if value is a RegExp object, otherwise false
538
+ */
539
+ const isRegExp = kindOfTest('RegExp');
540
+
541
+ const reduceDescriptors = (obj, reducer) => {
542
+ const descriptors = Object.getOwnPropertyDescriptors(obj);
543
+ const reducedDescriptors = {};
544
+
545
+ forEach(descriptors, (descriptor, name) => {
546
+ if (reducer(descriptor, name, obj) !== false) {
547
+ reducedDescriptors[name] = descriptor;
548
+ }
549
+ });
550
+
551
+ Object.defineProperties(obj, reducedDescriptors);
552
+ };
553
+
554
+ /**
555
+ * Makes all methods read-only
556
+ * @param {Object} obj
557
+ */
558
+
559
+ const freezeMethods = (obj) => {
560
+ reduceDescriptors(obj, (descriptor, name) => {
561
+ // skip restricted props in strict mode
562
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
563
+ return false;
564
+ }
565
+
566
+ const value = obj[name];
567
+
568
+ if (!isFunction(value)) return;
569
+
570
+ descriptor.enumerable = false;
571
+
572
+ if ('writable' in descriptor) {
573
+ descriptor.writable = false;
574
+ return;
575
+ }
576
+
577
+ if (!descriptor.set) {
578
+ descriptor.set = () => {
579
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
580
+ };
581
+ }
582
+ });
583
+ };
584
+
585
+ const toObjectSet = (arrayOrString, delimiter) => {
586
+ const obj = {};
587
+
588
+ const define = (arr) => {
589
+ arr.forEach(value => {
590
+ obj[value] = true;
591
+ });
592
+ };
593
+
594
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
595
+
596
+ return obj;
597
+ };
598
+
599
+ const noop = () => {};
600
+
601
+ const toFiniteNumber = (value, defaultValue) => {
602
+ value = +value;
603
+ return Number.isFinite(value) ? value : defaultValue;
604
+ };
605
+
606
+ const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
607
+
608
+ const DIGIT = '0123456789';
609
+
610
+ const ALPHABET = {
611
+ DIGIT,
612
+ ALPHA,
613
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
614
+ };
615
+
616
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
617
+ let str = '';
618
+ const {length} = alphabet;
619
+ while (size--) {
620
+ str += alphabet[Math.random() * length|0];
621
+ }
622
+
623
+ return str;
624
+ };
625
+
626
+ /**
627
+ * If the thing is a FormData object, return true, otherwise return false.
628
+ *
629
+ * @param {unknown} thing - The thing to check.
630
+ *
631
+ * @returns {boolean}
632
+ */
633
+ function isSpecCompliantForm(thing) {
634
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
635
+ }
636
+
637
+ const toJSONObject = (obj) => {
638
+ const stack = new Array(10);
639
+
640
+ const visit = (source, i) => {
641
+
642
+ if (isObject(source)) {
643
+ if (stack.indexOf(source) >= 0) {
644
+ return;
645
+ }
646
+
647
+ if(!('toJSON' in source)) {
648
+ stack[i] = source;
649
+ const target = isArray(source) ? [] : {};
650
+
651
+ forEach(source, (value, key) => {
652
+ const reducedValue = visit(value, i + 1);
653
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
654
+ });
655
+
656
+ stack[i] = undefined;
657
+
658
+ return target;
659
+ }
660
+ }
661
+
662
+ return source;
663
+ };
664
+
665
+ return visit(obj, 0);
666
+ };
667
+
668
+ const isAsyncFn = kindOfTest('AsyncFunction');
669
+
670
+ const isThenable = (thing) =>
671
+ thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
672
+
673
+ const utils = {
674
+ isArray,
675
+ isArrayBuffer,
676
+ isBuffer,
677
+ isFormData,
678
+ isArrayBufferView,
679
+ isString,
680
+ isNumber,
681
+ isBoolean,
682
+ isObject,
683
+ isPlainObject,
684
+ isUndefined,
685
+ isDate,
686
+ isFile,
687
+ isBlob,
688
+ isRegExp,
689
+ isFunction,
690
+ isStream,
691
+ isURLSearchParams,
692
+ isTypedArray,
693
+ isFileList,
694
+ forEach,
695
+ merge,
696
+ extend,
697
+ trim,
698
+ stripBOM,
699
+ inherits,
700
+ toFlatObject,
701
+ kindOf,
702
+ kindOfTest,
703
+ endsWith,
704
+ toArray,
705
+ forEachEntry,
706
+ matchAll,
707
+ isHTMLForm,
708
+ hasOwnProperty,
709
+ hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
710
+ reduceDescriptors,
711
+ freezeMethods,
712
+ toObjectSet,
713
+ toCamelCase,
714
+ noop,
715
+ toFiniteNumber,
716
+ findKey,
717
+ global: _global,
718
+ isContextDefined,
719
+ ALPHABET,
720
+ generateString,
721
+ isSpecCompliantForm,
722
+ toJSONObject,
723
+ isAsyncFn,
724
+ isThenable
725
+ };
726
+
727
+ /**
728
+ * Create an Error with the specified message, config, error code, request and response.
729
+ *
730
+ * @param {string} message The error message.
731
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
732
+ * @param {Object} [config] The config.
733
+ * @param {Object} [request] The request.
734
+ * @param {Object} [response] The response.
735
+ *
736
+ * @returns {Error} The created error.
737
+ */
738
+ function AxiosError$1(message, code, config, request, response) {
739
+ Error.call(this);
740
+
741
+ if (Error.captureStackTrace) {
742
+ Error.captureStackTrace(this, this.constructor);
743
+ } else {
744
+ this.stack = (new Error()).stack;
745
+ }
746
+
747
+ this.message = message;
748
+ this.name = 'AxiosError';
749
+ code && (this.code = code);
750
+ config && (this.config = config);
751
+ request && (this.request = request);
752
+ response && (this.response = response);
753
+ }
754
+
755
+ utils.inherits(AxiosError$1, Error, {
756
+ toJSON: function toJSON() {
757
+ return {
758
+ // Standard
759
+ message: this.message,
760
+ name: this.name,
761
+ // Microsoft
762
+ description: this.description,
763
+ number: this.number,
764
+ // Mozilla
765
+ fileName: this.fileName,
766
+ lineNumber: this.lineNumber,
767
+ columnNumber: this.columnNumber,
768
+ stack: this.stack,
769
+ // Axios
770
+ config: utils.toJSONObject(this.config),
771
+ code: this.code,
772
+ status: this.response && this.response.status ? this.response.status : null
773
+ };
774
+ }
775
+ });
776
+
777
+ const prototype$1 = AxiosError$1.prototype;
778
+ const descriptors = {};
779
+
780
+ [
781
+ 'ERR_BAD_OPTION_VALUE',
782
+ 'ERR_BAD_OPTION',
783
+ 'ECONNABORTED',
784
+ 'ETIMEDOUT',
785
+ 'ERR_NETWORK',
786
+ 'ERR_FR_TOO_MANY_REDIRECTS',
787
+ 'ERR_DEPRECATED',
788
+ 'ERR_BAD_RESPONSE',
789
+ 'ERR_BAD_REQUEST',
790
+ 'ERR_CANCELED',
791
+ 'ERR_NOT_SUPPORT',
792
+ 'ERR_INVALID_URL'
793
+ // eslint-disable-next-line func-names
794
+ ].forEach(code => {
795
+ descriptors[code] = {value: code};
796
+ });
797
+
798
+ Object.defineProperties(AxiosError$1, descriptors);
799
+ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
800
+
801
+ // eslint-disable-next-line func-names
802
+ AxiosError$1.from = (error, code, config, request, response, customProps) => {
803
+ const axiosError = Object.create(prototype$1);
804
+
805
+ utils.toFlatObject(error, axiosError, function filter(obj) {
806
+ return obj !== Error.prototype;
807
+ }, prop => {
808
+ return prop !== 'isAxiosError';
809
+ });
810
+
811
+ AxiosError$1.call(axiosError, error.message, code, config, request, response);
812
+
813
+ axiosError.cause = error;
814
+
815
+ axiosError.name = error.name;
816
+
817
+ customProps && Object.assign(axiosError, customProps);
818
+
819
+ return axiosError;
820
+ };
821
+
822
+ // eslint-disable-next-line strict
823
+ const httpAdapter = null;
824
+
825
+ /**
826
+ * Determines if the given thing is a array or js object.
827
+ *
828
+ * @param {string} thing - The object or array to be visited.
829
+ *
830
+ * @returns {boolean}
831
+ */
832
+ function isVisitable(thing) {
833
+ return utils.isPlainObject(thing) || utils.isArray(thing);
834
+ }
835
+
836
+ /**
837
+ * It removes the brackets from the end of a string
838
+ *
839
+ * @param {string} key - The key of the parameter.
840
+ *
841
+ * @returns {string} the key without the brackets.
842
+ */
843
+ function removeBrackets(key) {
844
+ return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
845
+ }
846
+
847
+ /**
848
+ * It takes a path, a key, and a boolean, and returns a string
849
+ *
850
+ * @param {string} path - The path to the current key.
851
+ * @param {string} key - The key of the current object being iterated over.
852
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
853
+ *
854
+ * @returns {string} The path to the current key.
855
+ */
856
+ function renderKey(path, key, dots) {
857
+ if (!path) return key;
858
+ return path.concat(key).map(function each(token, i) {
859
+ // eslint-disable-next-line no-param-reassign
860
+ token = removeBrackets(token);
861
+ return !dots && i ? '[' + token + ']' : token;
862
+ }).join(dots ? '.' : '');
863
+ }
864
+
865
+ /**
866
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
867
+ *
868
+ * @param {Array<any>} arr - The array to check
869
+ *
870
+ * @returns {boolean}
871
+ */
872
+ function isFlatArray(arr) {
873
+ return utils.isArray(arr) && !arr.some(isVisitable);
874
+ }
875
+
876
+ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
877
+ return /^is[A-Z]/.test(prop);
878
+ });
879
+
880
+ /**
881
+ * Convert a data object to FormData
882
+ *
883
+ * @param {Object} obj
884
+ * @param {?Object} [formData]
885
+ * @param {?Object} [options]
886
+ * @param {Function} [options.visitor]
887
+ * @param {Boolean} [options.metaTokens = true]
888
+ * @param {Boolean} [options.dots = false]
889
+ * @param {?Boolean} [options.indexes = false]
890
+ *
891
+ * @returns {Object}
892
+ **/
893
+
894
+ /**
895
+ * It converts an object into a FormData object
896
+ *
897
+ * @param {Object<any, any>} obj - The object to convert to form data.
898
+ * @param {string} formData - The FormData object to append to.
899
+ * @param {Object<string, any>} options
900
+ *
901
+ * @returns
902
+ */
903
+ function toFormData$1(obj, formData, options) {
904
+ if (!utils.isObject(obj)) {
905
+ throw new TypeError('target must be an object');
906
+ }
907
+
908
+ // eslint-disable-next-line no-param-reassign
909
+ formData = formData || new (FormData)();
910
+
911
+ // eslint-disable-next-line no-param-reassign
912
+ options = utils.toFlatObject(options, {
913
+ metaTokens: true,
914
+ dots: false,
915
+ indexes: false
916
+ }, false, function defined(option, source) {
917
+ // eslint-disable-next-line no-eq-null,eqeqeq
918
+ return !utils.isUndefined(source[option]);
919
+ });
920
+
921
+ const metaTokens = options.metaTokens;
922
+ // eslint-disable-next-line no-use-before-define
923
+ const visitor = options.visitor || defaultVisitor;
924
+ const dots = options.dots;
925
+ const indexes = options.indexes;
926
+ const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
927
+ const useBlob = _Blob && utils.isSpecCompliantForm(formData);
928
+
929
+ if (!utils.isFunction(visitor)) {
930
+ throw new TypeError('visitor must be a function');
931
+ }
932
+
933
+ function convertValue(value) {
934
+ if (value === null) return '';
935
+
936
+ if (utils.isDate(value)) {
937
+ return value.toISOString();
938
+ }
939
+
940
+ if (!useBlob && utils.isBlob(value)) {
941
+ throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
942
+ }
943
+
944
+ if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
945
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
946
+ }
947
+
948
+ return value;
949
+ }
950
+
951
+ /**
952
+ * Default visitor.
953
+ *
954
+ * @param {*} value
955
+ * @param {String|Number} key
956
+ * @param {Array<String|Number>} path
957
+ * @this {FormData}
958
+ *
959
+ * @returns {boolean} return true to visit the each prop of the value recursively
960
+ */
961
+ function defaultVisitor(value, key, path) {
962
+ let arr = value;
963
+
964
+ if (value && !path && typeof value === 'object') {
965
+ if (utils.endsWith(key, '{}')) {
966
+ // eslint-disable-next-line no-param-reassign
967
+ key = metaTokens ? key : key.slice(0, -2);
968
+ // eslint-disable-next-line no-param-reassign
969
+ value = JSON.stringify(value);
970
+ } else if (
971
+ (utils.isArray(value) && isFlatArray(value)) ||
972
+ ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
973
+ )) {
974
+ // eslint-disable-next-line no-param-reassign
975
+ key = removeBrackets(key);
976
+
977
+ arr.forEach(function each(el, index) {
978
+ !(utils.isUndefined(el) || el === null) && formData.append(
979
+ // eslint-disable-next-line no-nested-ternary
980
+ indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
981
+ convertValue(el)
982
+ );
983
+ });
984
+ return false;
985
+ }
986
+ }
987
+
988
+ if (isVisitable(value)) {
989
+ return true;
990
+ }
991
+
992
+ formData.append(renderKey(path, key, dots), convertValue(value));
993
+
994
+ return false;
995
+ }
996
+
997
+ const stack = [];
998
+
999
+ const exposedHelpers = Object.assign(predicates, {
1000
+ defaultVisitor,
1001
+ convertValue,
1002
+ isVisitable
1003
+ });
1004
+
1005
+ function build(value, path) {
1006
+ if (utils.isUndefined(value)) return;
1007
+
1008
+ if (stack.indexOf(value) !== -1) {
1009
+ throw Error('Circular reference detected in ' + path.join('.'));
1010
+ }
1011
+
1012
+ stack.push(value);
1013
+
1014
+ utils.forEach(value, function each(el, key) {
1015
+ const result = !(utils.isUndefined(el) || el === null) && visitor.call(
1016
+ formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
1017
+ );
1018
+
1019
+ if (result === true) {
1020
+ build(el, path ? path.concat(key) : [key]);
1021
+ }
1022
+ });
1023
+
1024
+ stack.pop();
1025
+ }
1026
+
1027
+ if (!utils.isObject(obj)) {
1028
+ throw new TypeError('data must be an object');
1029
+ }
1030
+
1031
+ build(obj);
1032
+
1033
+ return formData;
1034
+ }
1035
+
1036
+ /**
1037
+ * It encodes a string by replacing all characters that are not in the unreserved set with
1038
+ * their percent-encoded equivalents
1039
+ *
1040
+ * @param {string} str - The string to encode.
1041
+ *
1042
+ * @returns {string} The encoded string.
1043
+ */
1044
+ function encode$1(str) {
1045
+ const charMap = {
1046
+ '!': '%21',
1047
+ "'": '%27',
1048
+ '(': '%28',
1049
+ ')': '%29',
1050
+ '~': '%7E',
1051
+ '%20': '+',
1052
+ '%00': '\x00'
1053
+ };
1054
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1055
+ return charMap[match];
1056
+ });
1057
+ }
1058
+
1059
+ /**
1060
+ * It takes a params object and converts it to a FormData object
1061
+ *
1062
+ * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1063
+ * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1064
+ *
1065
+ * @returns {void}
1066
+ */
1067
+ function AxiosURLSearchParams(params, options) {
1068
+ this._pairs = [];
1069
+
1070
+ params && toFormData$1(params, this, options);
1071
+ }
1072
+
1073
+ const prototype = AxiosURLSearchParams.prototype;
1074
+
1075
+ prototype.append = function append(name, value) {
1076
+ this._pairs.push([name, value]);
1077
+ };
1078
+
1079
+ prototype.toString = function toString(encoder) {
1080
+ const _encode = encoder ? function(value) {
1081
+ return encoder.call(this, value, encode$1);
1082
+ } : encode$1;
1083
+
1084
+ return this._pairs.map(function each(pair) {
1085
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
1086
+ }, '').join('&');
1087
+ };
1088
+
1089
+ /**
1090
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1091
+ * URI encoded counterparts
1092
+ *
1093
+ * @param {string} val The value to be encoded.
1094
+ *
1095
+ * @returns {string} The encoded value.
1096
+ */
1097
+ function encode(val) {
1098
+ return encodeURIComponent(val).
1099
+ replace(/%3A/gi, ':').
1100
+ replace(/%24/g, '$').
1101
+ replace(/%2C/gi, ',').
1102
+ replace(/%20/g, '+').
1103
+ replace(/%5B/gi, '[').
1104
+ replace(/%5D/gi, ']');
1105
+ }
1106
+
1107
+ /**
1108
+ * Build a URL by appending params to the end
1109
+ *
1110
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1111
+ * @param {object} [params] The params to be appended
1112
+ * @param {?object} options
1113
+ *
1114
+ * @returns {string} The formatted url
1115
+ */
1116
+ function buildURL(url, params, options) {
1117
+ /*eslint no-param-reassign:0*/
1118
+ if (!params) {
1119
+ return url;
1120
+ }
1121
+
1122
+ const _encode = options && options.encode || encode;
1123
+
1124
+ const serializeFn = options && options.serialize;
1125
+
1126
+ let serializedParams;
1127
+
1128
+ if (serializeFn) {
1129
+ serializedParams = serializeFn(params, options);
1130
+ } else {
1131
+ serializedParams = utils.isURLSearchParams(params) ?
1132
+ params.toString() :
1133
+ new AxiosURLSearchParams(params, options).toString(_encode);
1134
+ }
1135
+
1136
+ if (serializedParams) {
1137
+ const hashmarkIndex = url.indexOf("#");
1138
+
1139
+ if (hashmarkIndex !== -1) {
1140
+ url = url.slice(0, hashmarkIndex);
1141
+ }
1142
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1143
+ }
1144
+
1145
+ return url;
1146
+ }
1147
+
1148
+ class InterceptorManager {
1149
+ constructor() {
1150
+ this.handlers = [];
1151
+ }
1152
+
1153
+ /**
1154
+ * Add a new interceptor to the stack
1155
+ *
1156
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1157
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1158
+ *
1159
+ * @return {Number} An ID used to remove interceptor later
1160
+ */
1161
+ use(fulfilled, rejected, options) {
1162
+ this.handlers.push({
1163
+ fulfilled,
1164
+ rejected,
1165
+ synchronous: options ? options.synchronous : false,
1166
+ runWhen: options ? options.runWhen : null
1167
+ });
1168
+ return this.handlers.length - 1;
1169
+ }
1170
+
1171
+ /**
1172
+ * Remove an interceptor from the stack
1173
+ *
1174
+ * @param {Number} id The ID that was returned by `use`
1175
+ *
1176
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1177
+ */
1178
+ eject(id) {
1179
+ if (this.handlers[id]) {
1180
+ this.handlers[id] = null;
1181
+ }
1182
+ }
1183
+
1184
+ /**
1185
+ * Clear all interceptors from the stack
1186
+ *
1187
+ * @returns {void}
1188
+ */
1189
+ clear() {
1190
+ if (this.handlers) {
1191
+ this.handlers = [];
1192
+ }
1193
+ }
1194
+
1195
+ /**
1196
+ * Iterate over all the registered interceptors
1197
+ *
1198
+ * This method is particularly useful for skipping over any
1199
+ * interceptors that may have become `null` calling `eject`.
1200
+ *
1201
+ * @param {Function} fn The function to call for each interceptor
1202
+ *
1203
+ * @returns {void}
1204
+ */
1205
+ forEach(fn) {
1206
+ utils.forEach(this.handlers, function forEachHandler(h) {
1207
+ if (h !== null) {
1208
+ fn(h);
1209
+ }
1210
+ });
1211
+ }
1212
+ }
1213
+
1214
+ const InterceptorManager$1 = InterceptorManager;
1215
+
1216
+ const transitionalDefaults = {
1217
+ silentJSONParsing: true,
1218
+ forcedJSONParsing: true,
1219
+ clarifyTimeoutError: false
1220
+ };
1221
+
1222
+ const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1223
+
1224
+ const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1225
+
1226
+ const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1227
+
1228
+ /**
1229
+ * Determine if we're running in a standard browser environment
1230
+ *
1231
+ * This allows axios to run in a web worker, and react-native.
1232
+ * Both environments support XMLHttpRequest, but not fully standard globals.
1233
+ *
1234
+ * web workers:
1235
+ * typeof window -> undefined
1236
+ * typeof document -> undefined
1237
+ *
1238
+ * react-native:
1239
+ * navigator.product -> 'ReactNative'
1240
+ * nativescript
1241
+ * navigator.product -> 'NativeScript' or 'NS'
1242
+ *
1243
+ * @returns {boolean}
1244
+ */
1245
+ const isStandardBrowserEnv = (() => {
1246
+ let product;
1247
+ if (typeof navigator !== 'undefined' && (
1248
+ (product = navigator.product) === 'ReactNative' ||
1249
+ product === 'NativeScript' ||
1250
+ product === 'NS')
1251
+ ) {
1252
+ return false;
1253
+ }
1254
+
1255
+ return typeof window !== 'undefined' && typeof document !== 'undefined';
1256
+ })();
1257
+
1258
+ /**
1259
+ * Determine if we're running in a standard browser webWorker environment
1260
+ *
1261
+ * Although the `isStandardBrowserEnv` method indicates that
1262
+ * `allows axios to run in a web worker`, the WebWorker will still be
1263
+ * filtered out due to its judgment standard
1264
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1265
+ * This leads to a problem when axios post `FormData` in webWorker
1266
+ */
1267
+ const isStandardBrowserWebWorkerEnv = (() => {
1268
+ return (
1269
+ typeof WorkerGlobalScope !== 'undefined' &&
1270
+ // eslint-disable-next-line no-undef
1271
+ self instanceof WorkerGlobalScope &&
1272
+ typeof self.importScripts === 'function'
1273
+ );
1274
+ })();
1275
+
1276
+
1277
+ const platform = {
1278
+ isBrowser: true,
1279
+ classes: {
1280
+ URLSearchParams: URLSearchParams$1,
1281
+ FormData: FormData$1,
1282
+ Blob: Blob$1
1283
+ },
1284
+ isStandardBrowserEnv,
1285
+ isStandardBrowserWebWorkerEnv,
1286
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1287
+ };
1288
+
1289
+ function toURLEncodedForm(data, options) {
1290
+ return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
1291
+ visitor: function(value, key, path, helpers) {
1292
+ if (platform.isNode && utils.isBuffer(value)) {
1293
+ this.append(key, value.toString('base64'));
1294
+ return false;
1295
+ }
1296
+
1297
+ return helpers.defaultVisitor.apply(this, arguments);
1298
+ }
1299
+ }, options));
1300
+ }
1301
+
1302
+ /**
1303
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
1304
+ *
1305
+ * @param {string} name - The name of the property to get.
1306
+ *
1307
+ * @returns An array of strings.
1308
+ */
1309
+ function parsePropPath(name) {
1310
+ // foo[x][y][z]
1311
+ // foo.x.y.z
1312
+ // foo-x-y-z
1313
+ // foo x y z
1314
+ return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
1315
+ return match[0] === '[]' ? '' : match[1] || match[0];
1316
+ });
1317
+ }
1318
+
1319
+ /**
1320
+ * Convert an array to an object.
1321
+ *
1322
+ * @param {Array<any>} arr - The array to convert to an object.
1323
+ *
1324
+ * @returns An object with the same keys and values as the array.
1325
+ */
1326
+ function arrayToObject(arr) {
1327
+ const obj = {};
1328
+ const keys = Object.keys(arr);
1329
+ let i;
1330
+ const len = keys.length;
1331
+ let key;
1332
+ for (i = 0; i < len; i++) {
1333
+ key = keys[i];
1334
+ obj[key] = arr[key];
1335
+ }
1336
+ return obj;
1337
+ }
1338
+
1339
+ /**
1340
+ * It takes a FormData object and returns a JavaScript object
1341
+ *
1342
+ * @param {string} formData The FormData object to convert to JSON.
1343
+ *
1344
+ * @returns {Object<string, any> | null} The converted object.
1345
+ */
1346
+ function formDataToJSON(formData) {
1347
+ function buildPath(path, value, target, index) {
1348
+ let name = path[index++];
1349
+ const isNumericKey = Number.isFinite(+name);
1350
+ const isLast = index >= path.length;
1351
+ name = !name && utils.isArray(target) ? target.length : name;
1352
+
1353
+ if (isLast) {
1354
+ if (utils.hasOwnProp(target, name)) {
1355
+ target[name] = [target[name], value];
1356
+ } else {
1357
+ target[name] = value;
1358
+ }
1359
+
1360
+ return !isNumericKey;
1361
+ }
1362
+
1363
+ if (!target[name] || !utils.isObject(target[name])) {
1364
+ target[name] = [];
1365
+ }
1366
+
1367
+ const result = buildPath(path, value, target[name], index);
1368
+
1369
+ if (result && utils.isArray(target[name])) {
1370
+ target[name] = arrayToObject(target[name]);
1371
+ }
1372
+
1373
+ return !isNumericKey;
1374
+ }
1375
+
1376
+ if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
1377
+ const obj = {};
1378
+
1379
+ utils.forEachEntry(formData, (name, value) => {
1380
+ buildPath(parsePropPath(name), value, obj, 0);
1381
+ });
1382
+
1383
+ return obj;
1384
+ }
1385
+
1386
+ return null;
1387
+ }
1388
+
1389
+ const DEFAULT_CONTENT_TYPE = {
1390
+ 'Content-Type': undefined
1391
+ };
1392
+
1393
+ /**
1394
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1395
+ * of the input
1396
+ *
1397
+ * @param {any} rawValue - The value to be stringified.
1398
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
1399
+ * @param {Function} encoder - A function that takes a value and returns a string.
1400
+ *
1401
+ * @returns {string} A stringified version of the rawValue.
1402
+ */
1403
+ function stringifySafely(rawValue, parser, encoder) {
1404
+ if (utils.isString(rawValue)) {
1405
+ try {
1406
+ (parser || JSON.parse)(rawValue);
1407
+ return utils.trim(rawValue);
1408
+ } catch (e) {
1409
+ if (e.name !== 'SyntaxError') {
1410
+ throw e;
1411
+ }
1412
+ }
1413
+ }
1414
+
1415
+ return (encoder || JSON.stringify)(rawValue);
1416
+ }
1417
+
1418
+ const defaults = {
1419
+
1420
+ transitional: transitionalDefaults,
1421
+
1422
+ adapter: ['xhr', 'http'],
1423
+
1424
+ transformRequest: [function transformRequest(data, headers) {
1425
+ const contentType = headers.getContentType() || '';
1426
+ const hasJSONContentType = contentType.indexOf('application/json') > -1;
1427
+ const isObjectPayload = utils.isObject(data);
1428
+
1429
+ if (isObjectPayload && utils.isHTMLForm(data)) {
1430
+ data = new FormData(data);
1431
+ }
1432
+
1433
+ const isFormData = utils.isFormData(data);
1434
+
1435
+ if (isFormData) {
1436
+ if (!hasJSONContentType) {
1437
+ return data;
1438
+ }
1439
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
1440
+ }
1441
+
1442
+ if (utils.isArrayBuffer(data) ||
1443
+ utils.isBuffer(data) ||
1444
+ utils.isStream(data) ||
1445
+ utils.isFile(data) ||
1446
+ utils.isBlob(data)
1447
+ ) {
1448
+ return data;
1449
+ }
1450
+ if (utils.isArrayBufferView(data)) {
1451
+ return data.buffer;
1452
+ }
1453
+ if (utils.isURLSearchParams(data)) {
1454
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
1455
+ return data.toString();
1456
+ }
1457
+
1458
+ let isFileList;
1459
+
1460
+ if (isObjectPayload) {
1461
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
1462
+ return toURLEncodedForm(data, this.formSerializer).toString();
1463
+ }
1464
+
1465
+ if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
1466
+ const _FormData = this.env && this.env.FormData;
1467
+
1468
+ return toFormData$1(
1469
+ isFileList ? {'files[]': data} : data,
1470
+ _FormData && new _FormData(),
1471
+ this.formSerializer
1472
+ );
1473
+ }
1474
+ }
1475
+
1476
+ if (isObjectPayload || hasJSONContentType ) {
1477
+ headers.setContentType('application/json', false);
1478
+ return stringifySafely(data);
1479
+ }
1480
+
1481
+ return data;
1482
+ }],
1483
+
1484
+ transformResponse: [function transformResponse(data) {
1485
+ const transitional = this.transitional || defaults.transitional;
1486
+ const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
1487
+ const JSONRequested = this.responseType === 'json';
1488
+
1489
+ if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
1490
+ const silentJSONParsing = transitional && transitional.silentJSONParsing;
1491
+ const strictJSONParsing = !silentJSONParsing && JSONRequested;
1492
+
1493
+ try {
1494
+ return JSON.parse(data);
1495
+ } catch (e) {
1496
+ if (strictJSONParsing) {
1497
+ if (e.name === 'SyntaxError') {
1498
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
1499
+ }
1500
+ throw e;
1501
+ }
1502
+ }
1503
+ }
1504
+
1505
+ return data;
1506
+ }],
1507
+
1508
+ /**
1509
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
1510
+ * timeout is not created.
1511
+ */
1512
+ timeout: 0,
1513
+
1514
+ xsrfCookieName: 'XSRF-TOKEN',
1515
+ xsrfHeaderName: 'X-XSRF-TOKEN',
1516
+
1517
+ maxContentLength: -1,
1518
+ maxBodyLength: -1,
1519
+
1520
+ env: {
1521
+ FormData: platform.classes.FormData,
1522
+ Blob: platform.classes.Blob
1523
+ },
1524
+
1525
+ validateStatus: function validateStatus(status) {
1526
+ return status >= 200 && status < 300;
1527
+ },
1528
+
1529
+ headers: {
1530
+ common: {
1531
+ 'Accept': 'application/json, text/plain, */*'
1532
+ }
1533
+ }
1534
+ };
1535
+
1536
+ utils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
1537
+ defaults.headers[method] = {};
1538
+ });
1539
+
1540
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
1541
+ defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);
1542
+ });
1543
+
1544
+ const defaults$1 = defaults;
1545
+
1546
+ // RawAxiosHeaders whose duplicates are ignored by node
1547
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
1548
+ const ignoreDuplicateOf = utils.toObjectSet([
1549
+ 'age', 'authorization', 'content-length', 'content-type', 'etag',
1550
+ 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
1551
+ 'last-modified', 'location', 'max-forwards', 'proxy-authorization',
1552
+ 'referer', 'retry-after', 'user-agent'
1553
+ ]);
1554
+
1555
+ /**
1556
+ * Parse headers into an object
1557
+ *
1558
+ * ```
1559
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
1560
+ * Content-Type: application/json
1561
+ * Connection: keep-alive
1562
+ * Transfer-Encoding: chunked
1563
+ * ```
1564
+ *
1565
+ * @param {String} rawHeaders Headers needing to be parsed
1566
+ *
1567
+ * @returns {Object} Headers parsed into an object
1568
+ */
1569
+ const parseHeaders = rawHeaders => {
1570
+ const parsed = {};
1571
+ let key;
1572
+ let val;
1573
+ let i;
1574
+
1575
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
1576
+ i = line.indexOf(':');
1577
+ key = line.substring(0, i).trim().toLowerCase();
1578
+ val = line.substring(i + 1).trim();
1579
+
1580
+ if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
1581
+ return;
1582
+ }
1583
+
1584
+ if (key === 'set-cookie') {
1585
+ if (parsed[key]) {
1586
+ parsed[key].push(val);
1587
+ } else {
1588
+ parsed[key] = [val];
1589
+ }
1590
+ } else {
1591
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
1592
+ }
1593
+ });
1594
+
1595
+ return parsed;
1596
+ };
1597
+
1598
+ const $internals = Symbol('internals');
1599
+
1600
+ function normalizeHeader(header) {
1601
+ return header && String(header).trim().toLowerCase();
1602
+ }
1603
+
1604
+ function normalizeValue(value) {
1605
+ if (value === false || value == null) {
1606
+ return value;
1607
+ }
1608
+
1609
+ return utils.isArray(value) ? value.map(normalizeValue) : String(value);
1610
+ }
1611
+
1612
+ function parseTokens(str) {
1613
+ const tokens = Object.create(null);
1614
+ const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
1615
+ let match;
1616
+
1617
+ while ((match = tokensRE.exec(str))) {
1618
+ tokens[match[1]] = match[2];
1619
+ }
1620
+
1621
+ return tokens;
1622
+ }
1623
+
1624
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1625
+
1626
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1627
+ if (utils.isFunction(filter)) {
1628
+ return filter.call(this, value, header);
1629
+ }
1630
+
1631
+ if (isHeaderNameFilter) {
1632
+ value = header;
1633
+ }
1634
+
1635
+ if (!utils.isString(value)) return;
1636
+
1637
+ if (utils.isString(filter)) {
1638
+ return value.indexOf(filter) !== -1;
1639
+ }
1640
+
1641
+ if (utils.isRegExp(filter)) {
1642
+ return filter.test(value);
1643
+ }
1644
+ }
1645
+
1646
+ function formatHeader(header) {
1647
+ return header.trim()
1648
+ .toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
1649
+ return char.toUpperCase() + str;
1650
+ });
1651
+ }
1652
+
1653
+ function buildAccessors(obj, header) {
1654
+ const accessorName = utils.toCamelCase(' ' + header);
1655
+
1656
+ ['get', 'set', 'has'].forEach(methodName => {
1657
+ Object.defineProperty(obj, methodName + accessorName, {
1658
+ value: function(arg1, arg2, arg3) {
1659
+ return this[methodName].call(this, header, arg1, arg2, arg3);
1660
+ },
1661
+ configurable: true
1662
+ });
1663
+ });
1664
+ }
1665
+
1666
+ class AxiosHeaders$1 {
1667
+ constructor(headers) {
1668
+ headers && this.set(headers);
1669
+ }
1670
+
1671
+ set(header, valueOrRewrite, rewrite) {
1672
+ const self = this;
1673
+
1674
+ function setHeader(_value, _header, _rewrite) {
1675
+ const lHeader = normalizeHeader(_header);
1676
+
1677
+ if (!lHeader) {
1678
+ throw new Error('header name must be a non-empty string');
1679
+ }
1680
+
1681
+ const key = utils.findKey(self, lHeader);
1682
+
1683
+ if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
1684
+ self[key || _header] = normalizeValue(_value);
1685
+ }
1686
+ }
1687
+
1688
+ const setHeaders = (headers, _rewrite) =>
1689
+ utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
1690
+
1691
+ if (utils.isPlainObject(header) || header instanceof this.constructor) {
1692
+ setHeaders(header, valueOrRewrite);
1693
+ } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
1694
+ setHeaders(parseHeaders(header), valueOrRewrite);
1695
+ } else {
1696
+ header != null && setHeader(valueOrRewrite, header, rewrite);
1697
+ }
1698
+
1699
+ return this;
1700
+ }
1701
+
1702
+ get(header, parser) {
1703
+ header = normalizeHeader(header);
1704
+
1705
+ if (header) {
1706
+ const key = utils.findKey(this, header);
1707
+
1708
+ if (key) {
1709
+ const value = this[key];
1710
+
1711
+ if (!parser) {
1712
+ return value;
1713
+ }
1714
+
1715
+ if (parser === true) {
1716
+ return parseTokens(value);
1717
+ }
1718
+
1719
+ if (utils.isFunction(parser)) {
1720
+ return parser.call(this, value, key);
1721
+ }
1722
+
1723
+ if (utils.isRegExp(parser)) {
1724
+ return parser.exec(value);
1725
+ }
1726
+
1727
+ throw new TypeError('parser must be boolean|regexp|function');
1728
+ }
1729
+ }
1730
+ }
1731
+
1732
+ has(header, matcher) {
1733
+ header = normalizeHeader(header);
1734
+
1735
+ if (header) {
1736
+ const key = utils.findKey(this, header);
1737
+
1738
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
1739
+ }
1740
+
1741
+ return false;
1742
+ }
1743
+
1744
+ delete(header, matcher) {
1745
+ const self = this;
1746
+ let deleted = false;
1747
+
1748
+ function deleteHeader(_header) {
1749
+ _header = normalizeHeader(_header);
1750
+
1751
+ if (_header) {
1752
+ const key = utils.findKey(self, _header);
1753
+
1754
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
1755
+ delete self[key];
1756
+
1757
+ deleted = true;
1758
+ }
1759
+ }
1760
+ }
1761
+
1762
+ if (utils.isArray(header)) {
1763
+ header.forEach(deleteHeader);
1764
+ } else {
1765
+ deleteHeader(header);
1766
+ }
1767
+
1768
+ return deleted;
1769
+ }
1770
+
1771
+ clear(matcher) {
1772
+ const keys = Object.keys(this);
1773
+ let i = keys.length;
1774
+ let deleted = false;
1775
+
1776
+ while (i--) {
1777
+ const key = keys[i];
1778
+ if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
1779
+ delete this[key];
1780
+ deleted = true;
1781
+ }
1782
+ }
1783
+
1784
+ return deleted;
1785
+ }
1786
+
1787
+ normalize(format) {
1788
+ const self = this;
1789
+ const headers = {};
1790
+
1791
+ utils.forEach(this, (value, header) => {
1792
+ const key = utils.findKey(headers, header);
1793
+
1794
+ if (key) {
1795
+ self[key] = normalizeValue(value);
1796
+ delete self[header];
1797
+ return;
1798
+ }
1799
+
1800
+ const normalized = format ? formatHeader(header) : String(header).trim();
1801
+
1802
+ if (normalized !== header) {
1803
+ delete self[header];
1804
+ }
1805
+
1806
+ self[normalized] = normalizeValue(value);
1807
+
1808
+ headers[normalized] = true;
1809
+ });
1810
+
1811
+ return this;
1812
+ }
1813
+
1814
+ concat(...targets) {
1815
+ return this.constructor.concat(this, ...targets);
1816
+ }
1817
+
1818
+ toJSON(asStrings) {
1819
+ const obj = Object.create(null);
1820
+
1821
+ utils.forEach(this, (value, header) => {
1822
+ value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
1823
+ });
1824
+
1825
+ return obj;
1826
+ }
1827
+
1828
+ [Symbol.iterator]() {
1829
+ return Object.entries(this.toJSON())[Symbol.iterator]();
1830
+ }
1831
+
1832
+ toString() {
1833
+ return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
1834
+ }
1835
+
1836
+ get [Symbol.toStringTag]() {
1837
+ return 'AxiosHeaders';
1838
+ }
1839
+
1840
+ static from(thing) {
1841
+ return thing instanceof this ? thing : new this(thing);
1842
+ }
1843
+
1844
+ static concat(first, ...targets) {
1845
+ const computed = new this(first);
1846
+
1847
+ targets.forEach((target) => computed.set(target));
1848
+
1849
+ return computed;
1850
+ }
1851
+
1852
+ static accessor(header) {
1853
+ const internals = this[$internals] = (this[$internals] = {
1854
+ accessors: {}
1855
+ });
1856
+
1857
+ const accessors = internals.accessors;
1858
+ const prototype = this.prototype;
1859
+
1860
+ function defineAccessor(_header) {
1861
+ const lHeader = normalizeHeader(_header);
1862
+
1863
+ if (!accessors[lHeader]) {
1864
+ buildAccessors(prototype, _header);
1865
+ accessors[lHeader] = true;
1866
+ }
1867
+ }
1868
+
1869
+ utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
1870
+
1871
+ return this;
1872
+ }
1873
+ }
1874
+
1875
+ AxiosHeaders$1.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
1876
+
1877
+ utils.freezeMethods(AxiosHeaders$1.prototype);
1878
+ utils.freezeMethods(AxiosHeaders$1);
1879
+
1880
+ const AxiosHeaders$2 = AxiosHeaders$1;
1881
+
1882
+ /**
1883
+ * Transform the data for a request or a response
1884
+ *
1885
+ * @param {Array|Function} fns A single function or Array of functions
1886
+ * @param {?Object} response The response object
1887
+ *
1888
+ * @returns {*} The resulting transformed data
1889
+ */
1890
+ function transformData(fns, response) {
1891
+ const config = this || defaults$1;
1892
+ const context = response || config;
1893
+ const headers = AxiosHeaders$2.from(context.headers);
1894
+ let data = context.data;
1895
+
1896
+ utils.forEach(fns, function transform(fn) {
1897
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
1898
+ });
1899
+
1900
+ headers.normalize();
1901
+
1902
+ return data;
1903
+ }
1904
+
1905
+ function isCancel$1(value) {
1906
+ return !!(value && value.__CANCEL__);
1907
+ }
1908
+
1909
+ /**
1910
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
1911
+ *
1912
+ * @param {string=} message The message.
1913
+ * @param {Object=} config The config.
1914
+ * @param {Object=} request The request.
1915
+ *
1916
+ * @returns {CanceledError} The created error.
1917
+ */
1918
+ function CanceledError$1(message, config, request) {
1919
+ // eslint-disable-next-line no-eq-null,eqeqeq
1920
+ AxiosError$1.call(this, message == null ? 'canceled' : message, AxiosError$1.ERR_CANCELED, config, request);
1921
+ this.name = 'CanceledError';
1922
+ }
1923
+
1924
+ utils.inherits(CanceledError$1, AxiosError$1, {
1925
+ __CANCEL__: true
1926
+ });
1927
+
1928
+ /**
1929
+ * Resolve or reject a Promise based on response status.
1930
+ *
1931
+ * @param {Function} resolve A function that resolves the promise.
1932
+ * @param {Function} reject A function that rejects the promise.
1933
+ * @param {object} response The response.
1934
+ *
1935
+ * @returns {object} The response.
1936
+ */
1937
+ function settle(resolve, reject, response) {
1938
+ const validateStatus = response.config.validateStatus;
1939
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
1940
+ resolve(response);
1941
+ } else {
1942
+ reject(new AxiosError$1(
1943
+ 'Request failed with status code ' + response.status,
1944
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
1945
+ response.config,
1946
+ response.request,
1947
+ response
1948
+ ));
1949
+ }
1950
+ }
1951
+
1952
+ const cookies = platform.isStandardBrowserEnv ?
1953
+
1954
+ // Standard browser envs support document.cookie
1955
+ (function standardBrowserEnv() {
1956
+ return {
1957
+ write: function write(name, value, expires, path, domain, secure) {
1958
+ const cookie = [];
1959
+ cookie.push(name + '=' + encodeURIComponent(value));
1960
+
1961
+ if (utils.isNumber(expires)) {
1962
+ cookie.push('expires=' + new Date(expires).toGMTString());
1963
+ }
1964
+
1965
+ if (utils.isString(path)) {
1966
+ cookie.push('path=' + path);
1967
+ }
1968
+
1969
+ if (utils.isString(domain)) {
1970
+ cookie.push('domain=' + domain);
1971
+ }
1972
+
1973
+ if (secure === true) {
1974
+ cookie.push('secure');
1975
+ }
1976
+
1977
+ document.cookie = cookie.join('; ');
1978
+ },
1979
+
1980
+ read: function read(name) {
1981
+ const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
1982
+ return (match ? decodeURIComponent(match[3]) : null);
1983
+ },
1984
+
1985
+ remove: function remove(name) {
1986
+ this.write(name, '', Date.now() - 86400000);
1987
+ }
1988
+ };
1989
+ })() :
1990
+
1991
+ // Non standard browser env (web workers, react-native) lack needed support.
1992
+ (function nonStandardBrowserEnv() {
1993
+ return {
1994
+ write: function write() {},
1995
+ read: function read() { return null; },
1996
+ remove: function remove() {}
1997
+ };
1998
+ })();
1999
+
2000
+ /**
2001
+ * Determines whether the specified URL is absolute
2002
+ *
2003
+ * @param {string} url The URL to test
2004
+ *
2005
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2006
+ */
2007
+ function isAbsoluteURL(url) {
2008
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2009
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2010
+ // by any combination of letters, digits, plus, period, or hyphen.
2011
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2012
+ }
2013
+
2014
+ /**
2015
+ * Creates a new URL by combining the specified URLs
2016
+ *
2017
+ * @param {string} baseURL The base URL
2018
+ * @param {string} relativeURL The relative URL
2019
+ *
2020
+ * @returns {string} The combined URL
2021
+ */
2022
+ function combineURLs(baseURL, relativeURL) {
2023
+ return relativeURL
2024
+ ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
2025
+ : baseURL;
2026
+ }
2027
+
2028
+ /**
2029
+ * Creates a new URL by combining the baseURL with the requestedURL,
2030
+ * only when the requestedURL is not already an absolute URL.
2031
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2032
+ *
2033
+ * @param {string} baseURL The base URL
2034
+ * @param {string} requestedURL Absolute or relative URL to combine
2035
+ *
2036
+ * @returns {string} The combined full path
2037
+ */
2038
+ function buildFullPath(baseURL, requestedURL) {
2039
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2040
+ return combineURLs(baseURL, requestedURL);
2041
+ }
2042
+ return requestedURL;
2043
+ }
2044
+
2045
+ const isURLSameOrigin = platform.isStandardBrowserEnv ?
2046
+
2047
+ // Standard browser envs have full support of the APIs needed to test
2048
+ // whether the request URL is of the same origin as current location.
2049
+ (function standardBrowserEnv() {
2050
+ const msie = /(msie|trident)/i.test(navigator.userAgent);
2051
+ const urlParsingNode = document.createElement('a');
2052
+ let originURL;
2053
+
2054
+ /**
2055
+ * Parse a URL to discover it's components
2056
+ *
2057
+ * @param {String} url The URL to be parsed
2058
+ * @returns {Object}
2059
+ */
2060
+ function resolveURL(url) {
2061
+ let href = url;
2062
+
2063
+ if (msie) {
2064
+ // IE needs attribute set twice to normalize properties
2065
+ urlParsingNode.setAttribute('href', href);
2066
+ href = urlParsingNode.href;
2067
+ }
2068
+
2069
+ urlParsingNode.setAttribute('href', href);
2070
+
2071
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2072
+ return {
2073
+ href: urlParsingNode.href,
2074
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2075
+ host: urlParsingNode.host,
2076
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2077
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2078
+ hostname: urlParsingNode.hostname,
2079
+ port: urlParsingNode.port,
2080
+ pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
2081
+ urlParsingNode.pathname :
2082
+ '/' + urlParsingNode.pathname
2083
+ };
2084
+ }
2085
+
2086
+ originURL = resolveURL(window.location.href);
2087
+
2088
+ /**
2089
+ * Determine if a URL shares the same origin as the current location
2090
+ *
2091
+ * @param {String} requestURL The URL to test
2092
+ * @returns {boolean} True if URL shares the same origin, otherwise false
2093
+ */
2094
+ return function isURLSameOrigin(requestURL) {
2095
+ const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
2096
+ return (parsed.protocol === originURL.protocol &&
2097
+ parsed.host === originURL.host);
2098
+ };
2099
+ })() :
2100
+
2101
+ // Non standard browser envs (web workers, react-native) lack needed support.
2102
+ (function nonStandardBrowserEnv() {
2103
+ return function isURLSameOrigin() {
2104
+ return true;
2105
+ };
2106
+ })();
2107
+
2108
+ function parseProtocol(url) {
2109
+ const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2110
+ return match && match[1] || '';
2111
+ }
2112
+
2113
+ /**
2114
+ * Calculate data maxRate
2115
+ * @param {Number} [samplesCount= 10]
2116
+ * @param {Number} [min= 1000]
2117
+ * @returns {Function}
2118
+ */
2119
+ function speedometer(samplesCount, min) {
2120
+ samplesCount = samplesCount || 10;
2121
+ const bytes = new Array(samplesCount);
2122
+ const timestamps = new Array(samplesCount);
2123
+ let head = 0;
2124
+ let tail = 0;
2125
+ let firstSampleTS;
2126
+
2127
+ min = min !== undefined ? min : 1000;
2128
+
2129
+ return function push(chunkLength) {
2130
+ const now = Date.now();
2131
+
2132
+ const startedAt = timestamps[tail];
2133
+
2134
+ if (!firstSampleTS) {
2135
+ firstSampleTS = now;
2136
+ }
2137
+
2138
+ bytes[head] = chunkLength;
2139
+ timestamps[head] = now;
2140
+
2141
+ let i = tail;
2142
+ let bytesCount = 0;
2143
+
2144
+ while (i !== head) {
2145
+ bytesCount += bytes[i++];
2146
+ i = i % samplesCount;
2147
+ }
2148
+
2149
+ head = (head + 1) % samplesCount;
2150
+
2151
+ if (head === tail) {
2152
+ tail = (tail + 1) % samplesCount;
2153
+ }
2154
+
2155
+ if (now - firstSampleTS < min) {
2156
+ return;
2157
+ }
2158
+
2159
+ const passed = startedAt && now - startedAt;
2160
+
2161
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2162
+ };
2163
+ }
2164
+
2165
+ function progressEventReducer(listener, isDownloadStream) {
2166
+ let bytesNotified = 0;
2167
+ const _speedometer = speedometer(50, 250);
2168
+
2169
+ return e => {
2170
+ const loaded = e.loaded;
2171
+ const total = e.lengthComputable ? e.total : undefined;
2172
+ const progressBytes = loaded - bytesNotified;
2173
+ const rate = _speedometer(progressBytes);
2174
+ const inRange = loaded <= total;
2175
+
2176
+ bytesNotified = loaded;
2177
+
2178
+ const data = {
2179
+ loaded,
2180
+ total,
2181
+ progress: total ? (loaded / total) : undefined,
2182
+ bytes: progressBytes,
2183
+ rate: rate ? rate : undefined,
2184
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2185
+ event: e
2186
+ };
2187
+
2188
+ data[isDownloadStream ? 'download' : 'upload'] = true;
2189
+
2190
+ listener(data);
2191
+ };
2192
+ }
2193
+
2194
+ const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2195
+
2196
+ const xhrAdapter = isXHRAdapterSupported && function (config) {
2197
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
2198
+ let requestData = config.data;
2199
+ const requestHeaders = AxiosHeaders$2.from(config.headers).normalize();
2200
+ const responseType = config.responseType;
2201
+ let onCanceled;
2202
+ function done() {
2203
+ if (config.cancelToken) {
2204
+ config.cancelToken.unsubscribe(onCanceled);
2205
+ }
2206
+
2207
+ if (config.signal) {
2208
+ config.signal.removeEventListener('abort', onCanceled);
2209
+ }
2210
+ }
2211
+
2212
+ if (utils.isFormData(requestData)) {
2213
+ if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
2214
+ requestHeaders.setContentType(false); // Let the browser set it
2215
+ } else {
2216
+ requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks
2217
+ }
2218
+ }
2219
+
2220
+ let request = new XMLHttpRequest();
2221
+
2222
+ // HTTP basic authentication
2223
+ if (config.auth) {
2224
+ const username = config.auth.username || '';
2225
+ const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
2226
+ requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
2227
+ }
2228
+
2229
+ const fullPath = buildFullPath(config.baseURL, config.url);
2230
+
2231
+ request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
2232
+
2233
+ // Set the request timeout in MS
2234
+ request.timeout = config.timeout;
2235
+
2236
+ function onloadend() {
2237
+ if (!request) {
2238
+ return;
2239
+ }
2240
+ // Prepare the response
2241
+ const responseHeaders = AxiosHeaders$2.from(
2242
+ 'getAllResponseHeaders' in request && request.getAllResponseHeaders()
2243
+ );
2244
+ const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
2245
+ request.responseText : request.response;
2246
+ const response = {
2247
+ data: responseData,
2248
+ status: request.status,
2249
+ statusText: request.statusText,
2250
+ headers: responseHeaders,
2251
+ config,
2252
+ request
2253
+ };
2254
+
2255
+ settle(function _resolve(value) {
2256
+ resolve(value);
2257
+ done();
2258
+ }, function _reject(err) {
2259
+ reject(err);
2260
+ done();
2261
+ }, response);
2262
+
2263
+ // Clean up request
2264
+ request = null;
2265
+ }
2266
+
2267
+ if ('onloadend' in request) {
2268
+ // Use onloadend if available
2269
+ request.onloadend = onloadend;
2270
+ } else {
2271
+ // Listen for ready state to emulate onloadend
2272
+ request.onreadystatechange = function handleLoad() {
2273
+ if (!request || request.readyState !== 4) {
2274
+ return;
2275
+ }
2276
+
2277
+ // The request errored out and we didn't get a response, this will be
2278
+ // handled by onerror instead
2279
+ // With one exception: request that using file: protocol, most browsers
2280
+ // will return status as 0 even though it's a successful request
2281
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
2282
+ return;
2283
+ }
2284
+ // readystate handler is calling before onerror or ontimeout handlers,
2285
+ // so we should call onloadend on the next 'tick'
2286
+ setTimeout(onloadend);
2287
+ };
2288
+ }
2289
+
2290
+ // Handle browser request cancellation (as opposed to a manual cancellation)
2291
+ request.onabort = function handleAbort() {
2292
+ if (!request) {
2293
+ return;
2294
+ }
2295
+
2296
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
2297
+
2298
+ // Clean up request
2299
+ request = null;
2300
+ };
2301
+
2302
+ // Handle low level network errors
2303
+ request.onerror = function handleError() {
2304
+ // Real errors are hidden from us by the browser
2305
+ // onerror should only fire if it's a network error
2306
+ reject(new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request));
2307
+
2308
+ // Clean up request
2309
+ request = null;
2310
+ };
2311
+
2312
+ // Handle timeout
2313
+ request.ontimeout = function handleTimeout() {
2314
+ let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
2315
+ const transitional = config.transitional || transitionalDefaults;
2316
+ if (config.timeoutErrorMessage) {
2317
+ timeoutErrorMessage = config.timeoutErrorMessage;
2318
+ }
2319
+ reject(new AxiosError$1(
2320
+ timeoutErrorMessage,
2321
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
2322
+ config,
2323
+ request));
2324
+
2325
+ // Clean up request
2326
+ request = null;
2327
+ };
2328
+
2329
+ // Add xsrf header
2330
+ // This is only done if running in a standard browser environment.
2331
+ // Specifically not if we're in a web worker, or react-native.
2332
+ if (platform.isStandardBrowserEnv) {
2333
+ // Add xsrf header
2334
+ const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
2335
+ && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
2336
+
2337
+ if (xsrfValue) {
2338
+ requestHeaders.set(config.xsrfHeaderName, xsrfValue);
2339
+ }
2340
+ }
2341
+
2342
+ // Remove Content-Type if data is undefined
2343
+ requestData === undefined && requestHeaders.setContentType(null);
2344
+
2345
+ // Add headers to the request
2346
+ if ('setRequestHeader' in request) {
2347
+ utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2348
+ request.setRequestHeader(key, val);
2349
+ });
2350
+ }
2351
+
2352
+ // Add withCredentials to request if needed
2353
+ if (!utils.isUndefined(config.withCredentials)) {
2354
+ request.withCredentials = !!config.withCredentials;
2355
+ }
2356
+
2357
+ // Add responseType to request if needed
2358
+ if (responseType && responseType !== 'json') {
2359
+ request.responseType = config.responseType;
2360
+ }
2361
+
2362
+ // Handle progress if needed
2363
+ if (typeof config.onDownloadProgress === 'function') {
2364
+ request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
2365
+ }
2366
+
2367
+ // Not all browsers support upload events
2368
+ if (typeof config.onUploadProgress === 'function' && request.upload) {
2369
+ request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
2370
+ }
2371
+
2372
+ if (config.cancelToken || config.signal) {
2373
+ // Handle cancellation
2374
+ // eslint-disable-next-line func-names
2375
+ onCanceled = cancel => {
2376
+ if (!request) {
2377
+ return;
2378
+ }
2379
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
2380
+ request.abort();
2381
+ request = null;
2382
+ };
2383
+
2384
+ config.cancelToken && config.cancelToken.subscribe(onCanceled);
2385
+ if (config.signal) {
2386
+ config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
2387
+ }
2388
+ }
2389
+
2390
+ const protocol = parseProtocol(fullPath);
2391
+
2392
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
2393
+ reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
2394
+ return;
2395
+ }
2396
+
2397
+
2398
+ // Send the request
2399
+ request.send(requestData || null);
2400
+ });
2401
+ };
2402
+
2403
+ const knownAdapters = {
2404
+ http: httpAdapter,
2405
+ xhr: xhrAdapter
2406
+ };
2407
+
2408
+ utils.forEach(knownAdapters, (fn, value) => {
2409
+ if(fn) {
2410
+ try {
2411
+ Object.defineProperty(fn, 'name', {value});
2412
+ } catch (e) {
2413
+ // eslint-disable-next-line no-empty
2414
+ }
2415
+ Object.defineProperty(fn, 'adapterName', {value});
2416
+ }
2417
+ });
2418
+
2419
+ const adapters = {
2420
+ getAdapter: (adapters) => {
2421
+ adapters = utils.isArray(adapters) ? adapters : [adapters];
2422
+
2423
+ const {length} = adapters;
2424
+ let nameOrAdapter;
2425
+ let adapter;
2426
+
2427
+ for (let i = 0; i < length; i++) {
2428
+ nameOrAdapter = adapters[i];
2429
+ if((adapter = utils.isString(nameOrAdapter) ? knownAdapters[nameOrAdapter.toLowerCase()] : nameOrAdapter)) {
2430
+ break;
2431
+ }
2432
+ }
2433
+
2434
+ if (!adapter) {
2435
+ if (adapter === false) {
2436
+ throw new AxiosError$1(
2437
+ `Adapter ${nameOrAdapter} is not supported by the environment`,
2438
+ 'ERR_NOT_SUPPORT'
2439
+ );
2440
+ }
2441
+
2442
+ throw new Error(
2443
+ utils.hasOwnProp(knownAdapters, nameOrAdapter) ?
2444
+ `Adapter '${nameOrAdapter}' is not available in the build` :
2445
+ `Unknown adapter '${nameOrAdapter}'`
2446
+ );
2447
+ }
2448
+
2449
+ if (!utils.isFunction(adapter)) {
2450
+ throw new TypeError('adapter is not a function');
2451
+ }
2452
+
2453
+ return adapter;
2454
+ },
2455
+ adapters: knownAdapters
2456
+ };
2457
+
2458
+ /**
2459
+ * Throws a `CanceledError` if cancellation has been requested.
2460
+ *
2461
+ * @param {Object} config The config that is to be used for the request
2462
+ *
2463
+ * @returns {void}
2464
+ */
2465
+ function throwIfCancellationRequested(config) {
2466
+ if (config.cancelToken) {
2467
+ config.cancelToken.throwIfRequested();
2468
+ }
2469
+
2470
+ if (config.signal && config.signal.aborted) {
2471
+ throw new CanceledError$1(null, config);
2472
+ }
2473
+ }
2474
+
2475
+ /**
2476
+ * Dispatch a request to the server using the configured adapter.
2477
+ *
2478
+ * @param {object} config The config that is to be used for the request
2479
+ *
2480
+ * @returns {Promise} The Promise to be fulfilled
2481
+ */
2482
+ function dispatchRequest(config) {
2483
+ throwIfCancellationRequested(config);
2484
+
2485
+ config.headers = AxiosHeaders$2.from(config.headers);
2486
+
2487
+ // Transform request data
2488
+ config.data = transformData.call(
2489
+ config,
2490
+ config.transformRequest
2491
+ );
2492
+
2493
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
2494
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
2495
+ }
2496
+
2497
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
2498
+
2499
+ return adapter(config).then(function onAdapterResolution(response) {
2500
+ throwIfCancellationRequested(config);
2501
+
2502
+ // Transform response data
2503
+ response.data = transformData.call(
2504
+ config,
2505
+ config.transformResponse,
2506
+ response
2507
+ );
2508
+
2509
+ response.headers = AxiosHeaders$2.from(response.headers);
2510
+
2511
+ return response;
2512
+ }, function onAdapterRejection(reason) {
2513
+ if (!isCancel$1(reason)) {
2514
+ throwIfCancellationRequested(config);
2515
+
2516
+ // Transform response data
2517
+ if (reason && reason.response) {
2518
+ reason.response.data = transformData.call(
2519
+ config,
2520
+ config.transformResponse,
2521
+ reason.response
2522
+ );
2523
+ reason.response.headers = AxiosHeaders$2.from(reason.response.headers);
2524
+ }
2525
+ }
2526
+
2527
+ return Promise.reject(reason);
2528
+ });
2529
+ }
2530
+
2531
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$2 ? thing.toJSON() : thing;
2532
+
2533
+ /**
2534
+ * Config-specific merge-function which creates a new config-object
2535
+ * by merging two configuration objects together.
2536
+ *
2537
+ * @param {Object} config1
2538
+ * @param {Object} config2
2539
+ *
2540
+ * @returns {Object} New object resulting from merging config2 to config1
2541
+ */
2542
+ function mergeConfig$1(config1, config2) {
2543
+ // eslint-disable-next-line no-param-reassign
2544
+ config2 = config2 || {};
2545
+ const config = {};
2546
+
2547
+ function getMergedValue(target, source, caseless) {
2548
+ if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
2549
+ return utils.merge.call({caseless}, target, source);
2550
+ } else if (utils.isPlainObject(source)) {
2551
+ return utils.merge({}, source);
2552
+ } else if (utils.isArray(source)) {
2553
+ return source.slice();
2554
+ }
2555
+ return source;
2556
+ }
2557
+
2558
+ // eslint-disable-next-line consistent-return
2559
+ function mergeDeepProperties(a, b, caseless) {
2560
+ if (!utils.isUndefined(b)) {
2561
+ return getMergedValue(a, b, caseless);
2562
+ } else if (!utils.isUndefined(a)) {
2563
+ return getMergedValue(undefined, a, caseless);
2564
+ }
2565
+ }
2566
+
2567
+ // eslint-disable-next-line consistent-return
2568
+ function valueFromConfig2(a, b) {
2569
+ if (!utils.isUndefined(b)) {
2570
+ return getMergedValue(undefined, b);
2571
+ }
2572
+ }
2573
+
2574
+ // eslint-disable-next-line consistent-return
2575
+ function defaultToConfig2(a, b) {
2576
+ if (!utils.isUndefined(b)) {
2577
+ return getMergedValue(undefined, b);
2578
+ } else if (!utils.isUndefined(a)) {
2579
+ return getMergedValue(undefined, a);
2580
+ }
2581
+ }
2582
+
2583
+ // eslint-disable-next-line consistent-return
2584
+ function mergeDirectKeys(a, b, prop) {
2585
+ if (prop in config2) {
2586
+ return getMergedValue(a, b);
2587
+ } else if (prop in config1) {
2588
+ return getMergedValue(undefined, a);
2589
+ }
2590
+ }
2591
+
2592
+ const mergeMap = {
2593
+ url: valueFromConfig2,
2594
+ method: valueFromConfig2,
2595
+ data: valueFromConfig2,
2596
+ baseURL: defaultToConfig2,
2597
+ transformRequest: defaultToConfig2,
2598
+ transformResponse: defaultToConfig2,
2599
+ paramsSerializer: defaultToConfig2,
2600
+ timeout: defaultToConfig2,
2601
+ timeoutMessage: defaultToConfig2,
2602
+ withCredentials: defaultToConfig2,
2603
+ adapter: defaultToConfig2,
2604
+ responseType: defaultToConfig2,
2605
+ xsrfCookieName: defaultToConfig2,
2606
+ xsrfHeaderName: defaultToConfig2,
2607
+ onUploadProgress: defaultToConfig2,
2608
+ onDownloadProgress: defaultToConfig2,
2609
+ decompress: defaultToConfig2,
2610
+ maxContentLength: defaultToConfig2,
2611
+ maxBodyLength: defaultToConfig2,
2612
+ beforeRedirect: defaultToConfig2,
2613
+ transport: defaultToConfig2,
2614
+ httpAgent: defaultToConfig2,
2615
+ httpsAgent: defaultToConfig2,
2616
+ cancelToken: defaultToConfig2,
2617
+ socketPath: defaultToConfig2,
2618
+ responseEncoding: defaultToConfig2,
2619
+ validateStatus: mergeDirectKeys,
2620
+ headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
2621
+ };
2622
+
2623
+ utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2624
+ const merge = mergeMap[prop] || mergeDeepProperties;
2625
+ const configValue = merge(config1[prop], config2[prop], prop);
2626
+ (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
2627
+ });
2628
+
2629
+ return config;
2630
+ }
2631
+
2632
+ const VERSION$1 = "1.4.0";
2633
+
2634
+ const validators$1 = {};
2635
+
2636
+ // eslint-disable-next-line func-names
2637
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
2638
+ validators$1[type] = function validator(thing) {
2639
+ return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
2640
+ };
2641
+ });
2642
+
2643
+ const deprecatedWarnings = {};
2644
+
2645
+ /**
2646
+ * Transitional option validator
2647
+ *
2648
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
2649
+ * @param {string?} version - deprecated version / removed since version
2650
+ * @param {string?} message - some message with additional info
2651
+ *
2652
+ * @returns {function}
2653
+ */
2654
+ validators$1.transitional = function transitional(validator, version, message) {
2655
+ function formatMessage(opt, desc) {
2656
+ return '[Axios v' + VERSION$1 + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
2657
+ }
2658
+
2659
+ // eslint-disable-next-line func-names
2660
+ return (value, opt, opts) => {
2661
+ if (validator === false) {
2662
+ throw new AxiosError$1(
2663
+ formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
2664
+ AxiosError$1.ERR_DEPRECATED
2665
+ );
2666
+ }
2667
+
2668
+ if (version && !deprecatedWarnings[opt]) {
2669
+ deprecatedWarnings[opt] = true;
2670
+ // eslint-disable-next-line no-console
2671
+ console.warn(
2672
+ formatMessage(
2673
+ opt,
2674
+ ' has been deprecated since v' + version + ' and will be removed in the near future'
2675
+ )
2676
+ );
2677
+ }
2678
+
2679
+ return validator ? validator(value, opt, opts) : true;
2680
+ };
2681
+ };
2682
+
2683
+ /**
2684
+ * Assert object's properties type
2685
+ *
2686
+ * @param {object} options
2687
+ * @param {object} schema
2688
+ * @param {boolean?} allowUnknown
2689
+ *
2690
+ * @returns {object}
2691
+ */
2692
+
2693
+ function assertOptions(options, schema, allowUnknown) {
2694
+ if (typeof options !== 'object') {
2695
+ throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
2696
+ }
2697
+ const keys = Object.keys(options);
2698
+ let i = keys.length;
2699
+ while (i-- > 0) {
2700
+ const opt = keys[i];
2701
+ const validator = schema[opt];
2702
+ if (validator) {
2703
+ const value = options[opt];
2704
+ const result = value === undefined || validator(value, opt, options);
2705
+ if (result !== true) {
2706
+ throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
2707
+ }
2708
+ continue;
2709
+ }
2710
+ if (allowUnknown !== true) {
2711
+ throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
2712
+ }
2713
+ }
2714
+ }
2715
+
2716
+ const validator = {
2717
+ assertOptions,
2718
+ validators: validators$1
2719
+ };
2720
+
2721
+ const validators = validator.validators;
2722
+
2723
+ /**
2724
+ * Create a new instance of Axios
2725
+ *
2726
+ * @param {Object} instanceConfig The default config for the instance
2727
+ *
2728
+ * @return {Axios} A new instance of Axios
2729
+ */
2730
+ class Axios$1 {
2731
+ constructor(instanceConfig) {
2732
+ this.defaults = instanceConfig;
2733
+ this.interceptors = {
2734
+ request: new InterceptorManager$1(),
2735
+ response: new InterceptorManager$1()
2736
+ };
2737
+ }
2738
+
2739
+ /**
2740
+ * Dispatch a request
2741
+ *
2742
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
2743
+ * @param {?Object} config
2744
+ *
2745
+ * @returns {Promise} The Promise to be fulfilled
2746
+ */
2747
+ request(configOrUrl, config) {
2748
+ /*eslint no-param-reassign:0*/
2749
+ // Allow for axios('example/url'[, config]) a la fetch API
2750
+ if (typeof configOrUrl === 'string') {
2751
+ config = config || {};
2752
+ config.url = configOrUrl;
2753
+ } else {
2754
+ config = configOrUrl || {};
2755
+ }
2756
+
2757
+ config = mergeConfig$1(this.defaults, config);
2758
+
2759
+ const {transitional, paramsSerializer, headers} = config;
2760
+
2761
+ if (transitional !== undefined) {
2762
+ validator.assertOptions(transitional, {
2763
+ silentJSONParsing: validators.transitional(validators.boolean),
2764
+ forcedJSONParsing: validators.transitional(validators.boolean),
2765
+ clarifyTimeoutError: validators.transitional(validators.boolean)
2766
+ }, false);
2767
+ }
2768
+
2769
+ if (paramsSerializer != null) {
2770
+ if (utils.isFunction(paramsSerializer)) {
2771
+ config.paramsSerializer = {
2772
+ serialize: paramsSerializer
2773
+ };
2774
+ } else {
2775
+ validator.assertOptions(paramsSerializer, {
2776
+ encode: validators.function,
2777
+ serialize: validators.function
2778
+ }, true);
2779
+ }
2780
+ }
2781
+
2782
+ // Set config.method
2783
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
2784
+
2785
+ let contextHeaders;
2786
+
2787
+ // Flatten headers
2788
+ contextHeaders = headers && utils.merge(
2789
+ headers.common,
2790
+ headers[config.method]
2791
+ );
2792
+
2793
+ contextHeaders && utils.forEach(
2794
+ ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
2795
+ (method) => {
2796
+ delete headers[method];
2797
+ }
2798
+ );
2799
+
2800
+ config.headers = AxiosHeaders$2.concat(contextHeaders, headers);
2801
+
2802
+ // filter out skipped interceptors
2803
+ const requestInterceptorChain = [];
2804
+ let synchronousRequestInterceptors = true;
2805
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
2806
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
2807
+ return;
2808
+ }
2809
+
2810
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
2811
+
2812
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
2813
+ });
2814
+
2815
+ const responseInterceptorChain = [];
2816
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
2817
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
2818
+ });
2819
+
2820
+ let promise;
2821
+ let i = 0;
2822
+ let len;
2823
+
2824
+ if (!synchronousRequestInterceptors) {
2825
+ const chain = [dispatchRequest.bind(this), undefined];
2826
+ chain.unshift.apply(chain, requestInterceptorChain);
2827
+ chain.push.apply(chain, responseInterceptorChain);
2828
+ len = chain.length;
2829
+
2830
+ promise = Promise.resolve(config);
2831
+
2832
+ while (i < len) {
2833
+ promise = promise.then(chain[i++], chain[i++]);
2834
+ }
2835
+
2836
+ return promise;
2837
+ }
2838
+
2839
+ len = requestInterceptorChain.length;
2840
+
2841
+ let newConfig = config;
2842
+
2843
+ i = 0;
2844
+
2845
+ while (i < len) {
2846
+ const onFulfilled = requestInterceptorChain[i++];
2847
+ const onRejected = requestInterceptorChain[i++];
2848
+ try {
2849
+ newConfig = onFulfilled(newConfig);
2850
+ } catch (error) {
2851
+ onRejected.call(this, error);
2852
+ break;
2853
+ }
2854
+ }
2855
+
2856
+ try {
2857
+ promise = dispatchRequest.call(this, newConfig);
2858
+ } catch (error) {
2859
+ return Promise.reject(error);
2860
+ }
2861
+
2862
+ i = 0;
2863
+ len = responseInterceptorChain.length;
2864
+
2865
+ while (i < len) {
2866
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
2867
+ }
2868
+
2869
+ return promise;
2870
+ }
2871
+
2872
+ getUri(config) {
2873
+ config = mergeConfig$1(this.defaults, config);
2874
+ const fullPath = buildFullPath(config.baseURL, config.url);
2875
+ return buildURL(fullPath, config.params, config.paramsSerializer);
2876
+ }
2877
+ }
2878
+
2879
+ // Provide aliases for supported request methods
2880
+ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
2881
+ /*eslint func-names:0*/
2882
+ Axios$1.prototype[method] = function(url, config) {
2883
+ return this.request(mergeConfig$1(config || {}, {
2884
+ method,
2885
+ url,
2886
+ data: (config || {}).data
2887
+ }));
2888
+ };
2889
+ });
2890
+
2891
+ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
2892
+ /*eslint func-names:0*/
2893
+
2894
+ function generateHTTPMethod(isForm) {
2895
+ return function httpMethod(url, data, config) {
2896
+ return this.request(mergeConfig$1(config || {}, {
2897
+ method,
2898
+ headers: isForm ? {
2899
+ 'Content-Type': 'multipart/form-data'
2900
+ } : {},
2901
+ url,
2902
+ data
2903
+ }));
2904
+ };
2905
+ }
2906
+
2907
+ Axios$1.prototype[method] = generateHTTPMethod();
2908
+
2909
+ Axios$1.prototype[method + 'Form'] = generateHTTPMethod(true);
2910
+ });
2911
+
2912
+ const Axios$2 = Axios$1;
2913
+
2914
+ /**
2915
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
2916
+ *
2917
+ * @param {Function} executor The executor function.
2918
+ *
2919
+ * @returns {CancelToken}
2920
+ */
2921
+ class CancelToken$1 {
2922
+ constructor(executor) {
2923
+ if (typeof executor !== 'function') {
2924
+ throw new TypeError('executor must be a function.');
2925
+ }
2926
+
2927
+ let resolvePromise;
2928
+
2929
+ this.promise = new Promise(function promiseExecutor(resolve) {
2930
+ resolvePromise = resolve;
2931
+ });
2932
+
2933
+ const token = this;
2934
+
2935
+ // eslint-disable-next-line func-names
2936
+ this.promise.then(cancel => {
2937
+ if (!token._listeners) return;
2938
+
2939
+ let i = token._listeners.length;
2940
+
2941
+ while (i-- > 0) {
2942
+ token._listeners[i](cancel);
2943
+ }
2944
+ token._listeners = null;
2945
+ });
2946
+
2947
+ // eslint-disable-next-line func-names
2948
+ this.promise.then = onfulfilled => {
2949
+ let _resolve;
2950
+ // eslint-disable-next-line func-names
2951
+ const promise = new Promise(resolve => {
2952
+ token.subscribe(resolve);
2953
+ _resolve = resolve;
2954
+ }).then(onfulfilled);
2955
+
2956
+ promise.cancel = function reject() {
2957
+ token.unsubscribe(_resolve);
2958
+ };
2959
+
2960
+ return promise;
2961
+ };
2962
+
2963
+ executor(function cancel(message, config, request) {
2964
+ if (token.reason) {
2965
+ // Cancellation has already been requested
2966
+ return;
2967
+ }
2968
+
2969
+ token.reason = new CanceledError$1(message, config, request);
2970
+ resolvePromise(token.reason);
2971
+ });
2972
+ }
2973
+
2974
+ /**
2975
+ * Throws a `CanceledError` if cancellation has been requested.
2976
+ */
2977
+ throwIfRequested() {
2978
+ if (this.reason) {
2979
+ throw this.reason;
2980
+ }
2981
+ }
2982
+
2983
+ /**
2984
+ * Subscribe to the cancel signal
2985
+ */
2986
+
2987
+ subscribe(listener) {
2988
+ if (this.reason) {
2989
+ listener(this.reason);
2990
+ return;
2991
+ }
2992
+
2993
+ if (this._listeners) {
2994
+ this._listeners.push(listener);
2995
+ } else {
2996
+ this._listeners = [listener];
2997
+ }
2998
+ }
2999
+
3000
+ /**
3001
+ * Unsubscribe from the cancel signal
3002
+ */
3003
+
3004
+ unsubscribe(listener) {
3005
+ if (!this._listeners) {
3006
+ return;
3007
+ }
3008
+ const index = this._listeners.indexOf(listener);
3009
+ if (index !== -1) {
3010
+ this._listeners.splice(index, 1);
3011
+ }
3012
+ }
3013
+
3014
+ /**
3015
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
3016
+ * cancels the `CancelToken`.
3017
+ */
3018
+ static source() {
3019
+ let cancel;
3020
+ const token = new CancelToken$1(function executor(c) {
3021
+ cancel = c;
3022
+ });
3023
+ return {
3024
+ token,
3025
+ cancel
3026
+ };
3027
+ }
3028
+ }
3029
+
3030
+ const CancelToken$2 = CancelToken$1;
3031
+
3032
+ /**
3033
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
3034
+ *
3035
+ * Common use case would be to use `Function.prototype.apply`.
3036
+ *
3037
+ * ```js
3038
+ * function f(x, y, z) {}
3039
+ * var args = [1, 2, 3];
3040
+ * f.apply(null, args);
3041
+ * ```
3042
+ *
3043
+ * With `spread` this example can be re-written.
3044
+ *
3045
+ * ```js
3046
+ * spread(function(x, y, z) {})([1, 2, 3]);
3047
+ * ```
3048
+ *
3049
+ * @param {Function} callback
3050
+ *
3051
+ * @returns {Function}
3052
+ */
3053
+ function spread$1(callback) {
3054
+ return function wrap(arr) {
3055
+ return callback.apply(null, arr);
3056
+ };
3057
+ }
3058
+
3059
+ /**
3060
+ * Determines whether the payload is an error thrown by Axios
3061
+ *
3062
+ * @param {*} payload The value to test
3063
+ *
3064
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
3065
+ */
3066
+ function isAxiosError$1(payload) {
3067
+ return utils.isObject(payload) && (payload.isAxiosError === true);
3068
+ }
3069
+
3070
+ const HttpStatusCode$1 = {
3071
+ Continue: 100,
3072
+ SwitchingProtocols: 101,
3073
+ Processing: 102,
3074
+ EarlyHints: 103,
3075
+ Ok: 200,
3076
+ Created: 201,
3077
+ Accepted: 202,
3078
+ NonAuthoritativeInformation: 203,
3079
+ NoContent: 204,
3080
+ ResetContent: 205,
3081
+ PartialContent: 206,
3082
+ MultiStatus: 207,
3083
+ AlreadyReported: 208,
3084
+ ImUsed: 226,
3085
+ MultipleChoices: 300,
3086
+ MovedPermanently: 301,
3087
+ Found: 302,
3088
+ SeeOther: 303,
3089
+ NotModified: 304,
3090
+ UseProxy: 305,
3091
+ Unused: 306,
3092
+ TemporaryRedirect: 307,
3093
+ PermanentRedirect: 308,
3094
+ BadRequest: 400,
3095
+ Unauthorized: 401,
3096
+ PaymentRequired: 402,
3097
+ Forbidden: 403,
3098
+ NotFound: 404,
3099
+ MethodNotAllowed: 405,
3100
+ NotAcceptable: 406,
3101
+ ProxyAuthenticationRequired: 407,
3102
+ RequestTimeout: 408,
3103
+ Conflict: 409,
3104
+ Gone: 410,
3105
+ LengthRequired: 411,
3106
+ PreconditionFailed: 412,
3107
+ PayloadTooLarge: 413,
3108
+ UriTooLong: 414,
3109
+ UnsupportedMediaType: 415,
3110
+ RangeNotSatisfiable: 416,
3111
+ ExpectationFailed: 417,
3112
+ ImATeapot: 418,
3113
+ MisdirectedRequest: 421,
3114
+ UnprocessableEntity: 422,
3115
+ Locked: 423,
3116
+ FailedDependency: 424,
3117
+ TooEarly: 425,
3118
+ UpgradeRequired: 426,
3119
+ PreconditionRequired: 428,
3120
+ TooManyRequests: 429,
3121
+ RequestHeaderFieldsTooLarge: 431,
3122
+ UnavailableForLegalReasons: 451,
3123
+ InternalServerError: 500,
3124
+ NotImplemented: 501,
3125
+ BadGateway: 502,
3126
+ ServiceUnavailable: 503,
3127
+ GatewayTimeout: 504,
3128
+ HttpVersionNotSupported: 505,
3129
+ VariantAlsoNegotiates: 506,
3130
+ InsufficientStorage: 507,
3131
+ LoopDetected: 508,
3132
+ NotExtended: 510,
3133
+ NetworkAuthenticationRequired: 511,
3134
+ };
3135
+
3136
+ Object.entries(HttpStatusCode$1).forEach(([key, value]) => {
3137
+ HttpStatusCode$1[value] = key;
3138
+ });
3139
+
3140
+ const HttpStatusCode$2 = HttpStatusCode$1;
3141
+
3142
+ /**
3143
+ * Create an instance of Axios
3144
+ *
3145
+ * @param {Object} defaultConfig The default config for the instance
3146
+ *
3147
+ * @returns {Axios} A new instance of Axios
3148
+ */
3149
+ function createInstance(defaultConfig) {
3150
+ const context = new Axios$2(defaultConfig);
3151
+ const instance = bind(Axios$2.prototype.request, context);
3152
+
3153
+ // Copy axios.prototype to instance
3154
+ utils.extend(instance, Axios$2.prototype, context, {allOwnKeys: true});
3155
+
3156
+ // Copy context to instance
3157
+ utils.extend(instance, context, null, {allOwnKeys: true});
3158
+
3159
+ // Factory for creating new instances
3160
+ instance.create = function create(instanceConfig) {
3161
+ return createInstance(mergeConfig$1(defaultConfig, instanceConfig));
3162
+ };
3163
+
3164
+ return instance;
3165
+ }
3166
+
3167
+ // Create the default instance to be exported
3168
+ const axios = createInstance(defaults$1);
3169
+
3170
+ // Expose Axios class to allow class inheritance
3171
+ axios.Axios = Axios$2;
3172
+
3173
+ // Expose Cancel & CancelToken
3174
+ axios.CanceledError = CanceledError$1;
3175
+ axios.CancelToken = CancelToken$2;
3176
+ axios.isCancel = isCancel$1;
3177
+ axios.VERSION = VERSION$1;
3178
+ axios.toFormData = toFormData$1;
3179
+
3180
+ // Expose AxiosError class
3181
+ axios.AxiosError = AxiosError$1;
3182
+
3183
+ // alias for CanceledError for backward compatibility
3184
+ axios.Cancel = axios.CanceledError;
3185
+
3186
+ // Expose all/spread
3187
+ axios.all = function all(promises) {
3188
+ return Promise.all(promises);
3189
+ };
3190
+
3191
+ axios.spread = spread$1;
3192
+
3193
+ // Expose isAxiosError
3194
+ axios.isAxiosError = isAxiosError$1;
3195
+
3196
+ // Expose mergeConfig
3197
+ axios.mergeConfig = mergeConfig$1;
3198
+
3199
+ axios.AxiosHeaders = AxiosHeaders$2;
3200
+
3201
+ axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
3202
+
3203
+ axios.HttpStatusCode = HttpStatusCode$2;
3204
+
3205
+ axios.default = axios;
3206
+
3207
+ // this module should only have a default export
3208
+ const axios$1 = axios;
3209
+
3210
+ // This module is intended to unwrap Axios default export as named.
3211
+ // Keep top-level export same with static properties
3212
+ // so that it can keep same with es module or cjs
3213
+ const {
3214
+ Axios,
3215
+ AxiosError,
3216
+ CanceledError,
3217
+ isCancel,
3218
+ CancelToken,
3219
+ VERSION,
3220
+ all,
3221
+ Cancel,
3222
+ isAxiosError,
3223
+ spread,
3224
+ toFormData,
3225
+ AxiosHeaders,
3226
+ HttpStatusCode,
3227
+ formToJSON,
3228
+ mergeConfig
3229
+ } = axios$1;
3230
+
3231
+ export { Axios, AxiosError, AxiosHeaders, Cancel, CancelToken, CanceledError, HttpStatusCode, VERSION, all, axios$1 as default, formToJSON, isAxiosError, isCancel, mergeConfig, spread, toFormData };
3232
+ //# sourceMappingURL=axios.js.map