@wopee-io/wopee.wdio 4.0.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 (561) hide show
  1. package/README.md +5 -0
  2. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts +5 -0
  3. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.d.ts.map +1 -0
  4. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js +48 -0
  5. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getDocumentScrollHeight.js.map +1 -0
  6. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts +9 -0
  7. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.d.ts.map +1 -0
  8. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js +20 -0
  9. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopDom.js.map +1 -0
  10. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts +9 -0
  11. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.d.ts.map +1 -0
  12. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js +22 -0
  13. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getElementPositionTopWindow.js.map +1 -0
  14. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts +8 -0
  15. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.d.ts.map +1 -0
  16. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js +39 -0
  17. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/getScreenDimensions.js.map +1 -0
  18. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts +85 -0
  19. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.d.ts.map +1 -0
  20. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js +2 -0
  21. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/screenDimensions.interfaces.js.map +1 -0
  22. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts +8 -0
  23. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.d.ts.map +1 -0
  24. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js +35 -0
  25. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollElementIntoView.js.map +1 -0
  26. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts +8 -0
  27. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.d.ts.map +1 -0
  28. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js +27 -0
  29. package/build/adapter/desktopBrowserClientOperationAdapter/clientSideScripts/scrollToPosition.js.map +1 -0
  30. package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts +13 -0
  31. package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.d.ts.map +1 -0
  32. package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js +27 -0
  33. package/build/adapter/desktopBrowserClientOperationAdapter/desktopBrowserClientOperationAdapter.js.map +1 -0
  34. package/build/adapter/driven/localSaveScreenshot/default.d.ts +14 -0
  35. package/build/adapter/driven/localSaveScreenshot/default.d.ts.map +1 -0
  36. package/build/adapter/driven/localSaveScreenshot/default.js +20 -0
  37. package/build/adapter/driven/localSaveScreenshot/default.js.map +1 -0
  38. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.d.ts +42 -0
  39. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.d.ts.map +1 -0
  40. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.d.ts +43 -0
  41. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.d.ts.map +1 -0
  42. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js +2 -0
  43. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.interface.js.map +1 -0
  44. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.js +76 -0
  45. package/build/adapter/driven/localSaveScreenshot/localSaveScreenshot.js.map +1 -0
  46. package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.d.ts +10 -0
  47. package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +1 -0
  48. package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.js +20 -0
  49. package/build/adapter/driven/wdioLoggerAdapter/wdioLoggerAdapter.js.map +1 -0
  50. package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.d.ts +31 -0
  51. package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.d.ts.map +1 -0
  52. package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.js +138 -0
  53. package/build/adapter/fullPageScreenshotAdapter/fullPageScreenshotAdapter.js.map +1 -0
  54. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.d.ts +10 -0
  55. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.d.ts.map +1 -0
  56. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.interface.d.ts +28 -0
  57. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.interface.d.ts.map +1 -0
  58. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.interface.js +12 -0
  59. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.interface.js.map +1 -0
  60. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.js +57 -0
  61. package/build/adapter/wdioConfigAdapter/wdioConfigAdapter.js.map +1 -0
  62. package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.d.ts +10 -0
  63. package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.d.ts.map +1 -0
  64. package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.js +20 -0
  65. package/build/adapter/wdioLoggerAdapter/wdioLoggerAdapter.js.map +1 -0
  66. package/build/core/domain/valueObjects/elementPosition.interface.d.ts +7 -0
  67. package/build/core/domain/valueObjects/elementPosition.interface.d.ts.map +1 -0
  68. package/build/core/domain/valueObjects/elementPosition.interface.js +2 -0
  69. package/build/core/domain/valueObjects/elementPosition.interface.js.map +1 -0
  70. package/build/core/domain/valueObjects/index.d.ts +4 -0
  71. package/build/core/domain/valueObjects/index.d.ts.map +1 -0
  72. package/build/core/domain/valueObjects/index.js +2 -0
  73. package/build/core/domain/valueObjects/index.js.map +1 -0
  74. package/build/core/domain/valueObjects/track.interface.d.ts +22 -0
  75. package/build/core/domain/valueObjects/track.interface.d.ts.map +1 -0
  76. package/build/core/domain/valueObjects/track.interface.js +2 -0
  77. package/build/core/domain/valueObjects/track.interface.js.map +1 -0
  78. package/build/desktopBrowser/clientSideScript/screenDimensions.interfaces.d.ts +85 -0
  79. package/build/desktopBrowser/clientSideScript/screenDimensions.interfaces.d.ts.map +1 -0
  80. package/build/desktopBrowser/clientSideScript/screenDimensions.interfaces.js +2 -0
  81. package/build/desktopBrowser/clientSideScript/screenDimensions.interfaces.js.map +1 -0
  82. package/build/desktopBrowser/commands/element.interfaces.d.ts +11 -0
  83. package/build/desktopBrowser/commands/element.interfaces.d.ts.map +1 -0
  84. package/build/desktopBrowser/commands/element.interfaces.js +2 -0
  85. package/build/desktopBrowser/commands/element.interfaces.js.map +1 -0
  86. package/build/desktopBrowser/commands/fullPage.interfaces.d.ts +11 -0
  87. package/build/desktopBrowser/commands/fullPage.interfaces.d.ts.map +1 -0
  88. package/build/desktopBrowser/commands/fullPage.interfaces.js +2 -0
  89. package/build/desktopBrowser/commands/fullPage.interfaces.js.map +1 -0
  90. package/build/desktopBrowser/commands/screen.interfaces.d.ts +8 -0
  91. package/build/desktopBrowser/commands/screen.interfaces.d.ts.map +1 -0
  92. package/build/desktopBrowser/commands/screen.interfaces.js +2 -0
  93. package/build/desktopBrowser/commands/screen.interfaces.js.map +1 -0
  94. package/build/desktopBrowser/commands/trackElement.d.ts +7 -0
  95. package/build/desktopBrowser/commands/trackElement.d.ts.map +1 -0
  96. package/build/desktopBrowser/commands/trackElement.js +63 -0
  97. package/build/desktopBrowser/commands/trackElement.js.map +1 -0
  98. package/build/desktopBrowser/commands/trackFullPageScreen.d.ts +7 -0
  99. package/build/desktopBrowser/commands/trackFullPageScreen.d.ts.map +1 -0
  100. package/build/desktopBrowser/commands/trackFullPageScreen.js +49 -0
  101. package/build/desktopBrowser/commands/trackFullPageScreen.js.map +1 -0
  102. package/build/desktopBrowser/commands/trackImage.d.ts +6 -0
  103. package/build/desktopBrowser/commands/trackImage.d.ts.map +1 -0
  104. package/build/desktopBrowser/commands/trackImage.interface.d.ts +8 -0
  105. package/build/desktopBrowser/commands/trackImage.interface.d.ts.map +1 -0
  106. package/build/desktopBrowser/commands/trackImage.interface.js +2 -0
  107. package/build/desktopBrowser/commands/trackImage.interface.js.map +1 -0
  108. package/build/desktopBrowser/commands/trackImage.js +27 -0
  109. package/build/desktopBrowser/commands/trackImage.js.map +1 -0
  110. package/build/desktopBrowser/commands/trackScreen.d.ts +7 -0
  111. package/build/desktopBrowser/commands/trackScreen.d.ts.map +1 -0
  112. package/build/desktopBrowser/commands/trackScreen.js +52 -0
  113. package/build/desktopBrowser/commands/trackScreen.js.map +1 -0
  114. package/build/desktopBrowser/helpers/utils.d.ts +33 -0
  115. package/build/desktopBrowser/helpers/utils.d.ts.map +1 -0
  116. package/build/desktopBrowser/helpers/utils.js +77 -0
  117. package/build/desktopBrowser/helpers/utils.js.map +1 -0
  118. package/build/desktopBrowser/index.d.ts +8 -0
  119. package/build/desktopBrowser/index.d.ts.map +1 -0
  120. package/build/desktopBrowser/index.js +6 -0
  121. package/build/desktopBrowser/index.js.map +1 -0
  122. package/build/desktopBrowser/methods/elementPosition.d.ts +23 -0
  123. package/build/desktopBrowser/methods/elementPosition.d.ts.map +1 -0
  124. package/build/desktopBrowser/methods/elementPosition.js +26 -0
  125. package/build/desktopBrowser/methods/elementPosition.js.map +1 -0
  126. package/build/desktopBrowser/methods/images.d.ts +27 -0
  127. package/build/desktopBrowser/methods/images.d.ts.map +1 -0
  128. package/build/desktopBrowser/methods/images.interfaces.d.ts +31 -0
  129. package/build/desktopBrowser/methods/images.interfaces.d.ts.map +1 -0
  130. package/build/desktopBrowser/methods/images.interfaces.js +2 -0
  131. package/build/desktopBrowser/methods/images.interfaces.js.map +1 -0
  132. package/build/desktopBrowser/methods/images.js +109 -0
  133. package/build/desktopBrowser/methods/images.js.map +1 -0
  134. package/build/desktopBrowser/methods/instanceData.interfaces.d.ts +10 -0
  135. package/build/desktopBrowser/methods/instanceData.interfaces.d.ts.map +1 -0
  136. package/build/desktopBrowser/methods/instanceData.interfaces.js +2 -0
  137. package/build/desktopBrowser/methods/instanceData.interfaces.js.map +1 -0
  138. package/build/desktopBrowser/methods/methods.interface.d.ts +13 -0
  139. package/build/desktopBrowser/methods/methods.interface.d.ts.map +1 -0
  140. package/build/desktopBrowser/methods/methods.interface.js +2 -0
  141. package/build/desktopBrowser/methods/methods.interface.js.map +1 -0
  142. package/build/desktopBrowser/methods/rectangles.d.ts +23 -0
  143. package/build/desktopBrowser/methods/rectangles.d.ts.map +1 -0
  144. package/build/desktopBrowser/methods/rectangles.interfaces.d.ts +23 -0
  145. package/build/desktopBrowser/methods/rectangles.interfaces.d.ts.map +1 -0
  146. package/build/desktopBrowser/methods/rectangles.interfaces.js +2 -0
  147. package/build/desktopBrowser/methods/rectangles.interfaces.js.map +1 -0
  148. package/build/desktopBrowser/methods/rectangles.js +51 -0
  149. package/build/desktopBrowser/methods/rectangles.js.map +1 -0
  150. package/build/desktopBrowser/methods/screenshots.d.ts +29 -0
  151. package/build/desktopBrowser/methods/screenshots.d.ts.map +1 -0
  152. package/build/desktopBrowser/methods/screenshots.interfaces.d.ts +27 -0
  153. package/build/desktopBrowser/methods/screenshots.interfaces.d.ts.map +1 -0
  154. package/build/desktopBrowser/methods/screenshots.interfaces.js +2 -0
  155. package/build/desktopBrowser/methods/screenshots.interfaces.js.map +1 -0
  156. package/build/desktopBrowser/methods/screenshots.js +91 -0
  157. package/build/desktopBrowser/methods/screenshots.js.map +1 -0
  158. package/build/domain/model/afterScreenshotOptions.interface.d.ts +11 -0
  159. package/build/domain/model/afterScreenshotOptions.interface.d.ts.map +1 -0
  160. package/build/domain/model/afterScreenshotOptions.interface.js +2 -0
  161. package/build/domain/model/afterScreenshotOptions.interface.js.map +1 -0
  162. package/build/domain/model/beforeScreenshotOptions.interface.d.ts +7 -0
  163. package/build/domain/model/beforeScreenshotOptions.interface.d.ts.map +1 -0
  164. package/build/domain/model/beforeScreenshotOptions.interface.js +2 -0
  165. package/build/domain/model/beforeScreenshotOptions.interface.js.map +1 -0
  166. package/build/domain/model/config.interface.d.ts +19 -0
  167. package/build/domain/model/config.interface.d.ts.map +1 -0
  168. package/build/domain/model/config.interface.js +2 -0
  169. package/build/domain/model/config.interface.js.map +1 -0
  170. package/build/domain/model/constants.d.ts +9 -0
  171. package/build/domain/model/constants.d.ts.map +1 -0
  172. package/build/domain/model/constants.js +9 -0
  173. package/build/domain/model/constants.js.map +1 -0
  174. package/build/domain/model/croppingOptions.interface.d.ts +8 -0
  175. package/build/domain/model/croppingOptions.interface.d.ts.map +1 -0
  176. package/build/domain/model/croppingOptions.interface.js +12 -0
  177. package/build/domain/model/croppingOptions.interface.js.map +1 -0
  178. package/build/domain/model/instances.interface.d.ts +16 -0
  179. package/build/domain/model/instances.interface.d.ts.map +1 -0
  180. package/build/domain/model/instances.interface.js +2 -0
  181. package/build/domain/model/instances.interface.js.map +1 -0
  182. package/build/domain/model/instancesOptions.interface.d.ts +7 -0
  183. package/build/domain/model/instancesOptions.interface.d.ts.map +1 -0
  184. package/build/domain/model/instancesOptions.interface.js +10 -0
  185. package/build/domain/model/instancesOptions.interface.js.map +1 -0
  186. package/build/domain/model/methods.interface.d.ts +17 -0
  187. package/build/domain/model/methods.interface.d.ts.map +1 -0
  188. package/build/domain/model/methods.interface.js +2 -0
  189. package/build/domain/model/methods.interface.js.map +1 -0
  190. package/build/domain/model/permanentStorageResult.interface.d.ts +14 -0
  191. package/build/domain/model/permanentStorageResult.interface.d.ts.map +1 -0
  192. package/build/domain/model/permanentStorageResult.interface.js +2 -0
  193. package/build/domain/model/permanentStorageResult.interface.js.map +1 -0
  194. package/build/domain/model/saveBase64ImageOptions.interface.d.ts +54 -0
  195. package/build/domain/model/saveBase64ImageOptions.interface.d.ts.map +1 -0
  196. package/build/domain/model/saveBase64ImageOptions.interface.js +2 -0
  197. package/build/domain/model/saveBase64ImageOptions.interface.js.map +1 -0
  198. package/build/domain/model/screenshotOutput.interface.d.ts +16 -0
  199. package/build/domain/model/screenshotOutput.interface.d.ts.map +1 -0
  200. package/build/domain/model/screenshotOutput.interface.js +2 -0
  201. package/build/domain/model/screenshotOutput.interface.js.map +1 -0
  202. package/build/domain/model/screenshotSize.interface.d.ts +14 -0
  203. package/build/domain/model/screenshotSize.interface.d.ts.map +1 -0
  204. package/build/domain/model/screenshotSize.interface.js +2 -0
  205. package/build/domain/model/screenshotSize.interface.js.map +1 -0
  206. package/build/domain/model/screenshotValidationPayload.interface.d.ts +47 -0
  207. package/build/domain/model/screenshotValidationPayload.interface.d.ts.map +1 -0
  208. package/build/domain/model/screenshotValidationPayload.interface.js +2 -0
  209. package/build/domain/model/screenshotValidationPayload.interface.js.map +1 -0
  210. package/build/domain/model/screenshotValidationResult.interface.d.ts +23 -0
  211. package/build/domain/model/screenshotValidationResult.interface.d.ts.map +1 -0
  212. package/build/domain/model/screenshotValidationResult.interface.js +11 -0
  213. package/build/domain/model/screenshotValidationResult.interface.js.map +1 -0
  214. package/build/domain/model/service.interface.d.ts +33 -0
  215. package/build/domain/model/service.interface.d.ts.map +1 -0
  216. package/build/domain/model/service.interface.js +2 -0
  217. package/build/domain/model/service.interface.js.map +1 -0
  218. package/build/domain/model/trackImage.interface.d.ts +17 -0
  219. package/build/domain/model/trackImage.interface.d.ts.map +1 -0
  220. package/build/domain/model/trackImage.interface.js +2 -0
  221. package/build/domain/model/trackImage.interface.js.map +1 -0
  222. package/build/domain/service/afterScreenshot.d.ts +11 -0
  223. package/build/domain/service/afterScreenshot.d.ts.map +1 -0
  224. package/build/domain/service/afterScreenshot.js +15 -0
  225. package/build/domain/service/afterScreenshot.js.map +1 -0
  226. package/build/domain/service/beforeScreenshot.d.ts +12 -0
  227. package/build/domain/service/beforeScreenshot.d.ts.map +1 -0
  228. package/build/domain/service/beforeScreenshot.js +41 -0
  229. package/build/domain/service/beforeScreenshot.js.map +1 -0
  230. package/build/domain/service/webdriverService.d.ts +19 -0
  231. package/build/domain/service/webdriverService.d.ts.map +1 -0
  232. package/build/domain/service/webdriverService.js +98 -0
  233. package/build/domain/service/webdriverService.js.map +1 -0
  234. package/build/domain/service/wopeeService.d.ts +37 -0
  235. package/build/domain/service/wopeeService.d.ts.map +1 -0
  236. package/build/domain/service/wopeeService.js +83 -0
  237. package/build/domain/service/wopeeService.js.map +1 -0
  238. package/build/index.d.ts +59 -0
  239. package/build/index.d.ts.map +1 -0
  240. package/build/index.js +4 -0
  241. package/build/index.js.map +1 -0
  242. package/build/port/clientSideOperationPort/clientSideOperationPort.d.ts +12 -0
  243. package/build/port/clientSideOperationPort/clientSideOperationPort.d.ts.map +1 -0
  244. package/build/port/clientSideOperationPort/clientSideOperationPort.js +3 -0
  245. package/build/port/clientSideOperationPort/clientSideOperationPort.js.map +1 -0
  246. package/build/port/driven/configDrivingPort/configDrivingPort.d.ts +9 -0
  247. package/build/port/driven/configDrivingPort/configDrivingPort.d.ts.map +1 -0
  248. package/build/port/driven/configDrivingPort/configDrivingPort.js +15 -0
  249. package/build/port/driven/configDrivingPort/configDrivingPort.js.map +1 -0
  250. package/build/port/driven/configDrivingPort/configDrivingPortDefaults.d.ts +6 -0
  251. package/build/port/driven/configDrivingPort/configDrivingPortDefaults.d.ts.map +1 -0
  252. package/build/port/driven/configDrivingPort/configDrivingPortDefaults.js +36 -0
  253. package/build/port/driven/configDrivingPort/configDrivingPortDefaults.js.map +1 -0
  254. package/build/port/driven/permanentStoragePort.d.ts +15 -0
  255. package/build/port/driven/permanentStoragePort.d.ts.map +1 -0
  256. package/build/port/driven/permanentStoragePort.js +6 -0
  257. package/build/port/driven/permanentStoragePort.js.map +1 -0
  258. package/build/port/driven/screenshotValidationPort.d.ts +28 -0
  259. package/build/port/driven/screenshotValidationPort.d.ts.map +1 -0
  260. package/build/port/driven/screenshotValidationPort.js +6 -0
  261. package/build/port/driven/screenshotValidationPort.js.map +1 -0
  262. package/build/types.d.ts +1 -0
  263. package/build/types.d.ts.map +1 -0
  264. package/build/types.js +2 -0
  265. package/build/types.js.map +1 -0
  266. package/build/utils/versionMetadata.d.ts +10 -0
  267. package/build/utils/versionMetadata.d.ts.map +1 -0
  268. package/build/utils/versionMetadata.js +26 -0
  269. package/build/utils/versionMetadata.js.map +1 -0
  270. package/build/utils/wopeeError.d.ts +4 -0
  271. package/build/utils/wopeeError.d.ts.map +1 -0
  272. package/build/utils/wopeeError.js +8 -0
  273. package/build/utils/wopeeError.js.map +1 -0
  274. package/build/utils.d.ts +34 -0
  275. package/build/utils.d.ts.map +1 -0
  276. package/build/utils.js +57 -0
  277. package/build/utils.js.map +1 -0
  278. package/docs/commands.md +37 -0
  279. package/docs/configuration.md +241 -0
  280. package/docs/mobile_native.md +31 -0
  281. package/node_modules/@autonomous-testing/sdk/.commitlintrc.json +3 -0
  282. package/node_modules/@autonomous-testing/sdk/.eslintignore +2 -0
  283. package/node_modules/@autonomous-testing/sdk/.eslintrc +21 -0
  284. package/node_modules/@autonomous-testing/sdk/.github/actions/npm_clean_install/action.yaml +35 -0
  285. package/node_modules/@autonomous-testing/sdk/.github/workflows/ci_cd.yaml +137 -0
  286. package/node_modules/@autonomous-testing/sdk/.prettierignore +3 -0
  287. package/node_modules/@autonomous-testing/sdk/.prettierrc +12 -0
  288. package/node_modules/@autonomous-testing/sdk/README.md +57 -0
  289. package/node_modules/@autonomous-testing/sdk/build/core/domain/index.d.ts +2 -0
  290. package/node_modules/@autonomous-testing/sdk/build/core/domain/index.js +18 -0
  291. package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/imageTrackingResult.interface.d.ts +3 -0
  292. package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/imageTrackingResult.interface.js +3 -0
  293. package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/index.d.ts +4 -0
  294. package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/index.js +3 -0
  295. package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/trackPayload.interface.d.ts +3 -0
  296. package/node_modules/@autonomous-testing/sdk/build/core/domain/valueObjects/trackPayload.interface.js +3 -0
  297. package/node_modules/@autonomous-testing/sdk/build/core/index.d.ts +3 -0
  298. package/node_modules/@autonomous-testing/sdk/build/core/index.js +19 -0
  299. package/node_modules/@autonomous-testing/sdk/build/core/ports/imageTracker.d.ts +6 -0
  300. package/node_modules/@autonomous-testing/sdk/build/core/ports/imageTracker.js +7 -0
  301. package/node_modules/@autonomous-testing/sdk/build/core/ports/index.d.ts +4 -0
  302. package/node_modules/@autonomous-testing/sdk/build/core/ports/index.js +8 -0
  303. package/node_modules/@autonomous-testing/sdk/build/core/ports/logger.d.ts +7 -0
  304. package/node_modules/@autonomous-testing/sdk/build/core/ports/logger.js +7 -0
  305. package/node_modules/@autonomous-testing/sdk/build/index.d.ts +4 -0
  306. package/node_modules/@autonomous-testing/sdk/build/index.js +20 -0
  307. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.d.ts +39 -0
  308. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.default.d.ts +16 -0
  309. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.default.js +31 -0
  310. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.interface.d.ts +93 -0
  311. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.interface.js +14 -0
  312. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapter.js +153 -0
  313. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterQueries.d.ts +5 -0
  314. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterQueries.js +102 -0
  315. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterUtils.d.ts +9 -0
  316. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/apolloTrackAdapterUtils.js +26 -0
  317. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/index.d.ts +7 -0
  318. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/apolloTrackAdapter/index.js +8 -0
  319. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.d.ts +36 -0
  320. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/consoleLogger.js +49 -0
  321. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.d.ts +3 -0
  322. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/consoleLogger/index.js +6 -0
  323. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.d.ts +4 -0
  324. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/index.js +20 -0
  325. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.d.ts +3 -0
  326. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/index.js +6 -0
  327. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.d.ts +31 -0
  328. package/node_modules/@autonomous-testing/sdk/build/infrastructure/adapters/noLogger/noLogger.js +34 -0
  329. package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.d.ts +3 -0
  330. package/node_modules/@autonomous-testing/sdk/build/infrastructure/index.js +19 -0
  331. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.d.ts +4 -0
  332. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.interface.d.ts +51 -0
  333. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.interface.js +24 -0
  334. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/apolloTrackAdapterService.js +13 -0
  335. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/index.d.ts +4 -0
  336. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/apolloTrackAdapterService/index.js +6 -0
  337. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.d.ts +3 -0
  338. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/index.js +19 -0
  339. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/consoleLoggerOptions.interface.d.ts +4 -0
  340. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/consoleLoggerOptions.interface.js +3 -0
  341. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/index.d.ts +4 -0
  342. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/index.js +6 -0
  343. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.d.ts +8 -0
  344. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerOptions.interface.js +3 -0
  345. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.d.ts +4 -0
  346. package/node_modules/@autonomous-testing/sdk/build/infrastructure/services/loggerService/loggerService.js +24 -0
  347. package/node_modules/@autonomous-testing/sdk/build/shared/index.d.ts +3 -0
  348. package/node_modules/@autonomous-testing/sdk/build/shared/index.js +19 -0
  349. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/index.d.ts +3 -0
  350. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/index.js +7 -0
  351. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.d.ts +3 -0
  352. package/node_modules/@autonomous-testing/sdk/build/shared/metadata/versionMetadata.js +6 -0
  353. package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.d.ts +4 -0
  354. package/node_modules/@autonomous-testing/sdk/build/shared/utils/error.interface.js +12 -0
  355. package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.d.ts +4 -0
  356. package/node_modules/@autonomous-testing/sdk/build/shared/utils/index.js +21 -0
  357. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.d.ts +3 -0
  358. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/index.js +6 -0
  359. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.d.ts +14 -0
  360. package/node_modules/@autonomous-testing/sdk/build/shared/utils/zodHelper/zodHelper.js +39 -0
  361. package/node_modules/@autonomous-testing/sdk/package.json +53 -0
  362. package/node_modules/asynckit/LICENSE +21 -0
  363. package/node_modules/asynckit/README.md +233 -0
  364. package/node_modules/asynckit/bench.js +76 -0
  365. package/node_modules/asynckit/index.js +6 -0
  366. package/node_modules/asynckit/lib/abort.js +29 -0
  367. package/node_modules/asynckit/lib/async.js +34 -0
  368. package/node_modules/asynckit/lib/defer.js +26 -0
  369. package/node_modules/asynckit/lib/iterate.js +75 -0
  370. package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
  371. package/node_modules/asynckit/lib/readable_parallel.js +25 -0
  372. package/node_modules/asynckit/lib/readable_serial.js +25 -0
  373. package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
  374. package/node_modules/asynckit/lib/state.js +37 -0
  375. package/node_modules/asynckit/lib/streamify.js +141 -0
  376. package/node_modules/asynckit/lib/terminator.js +29 -0
  377. package/node_modules/asynckit/package.json +63 -0
  378. package/node_modules/asynckit/parallel.js +43 -0
  379. package/node_modules/asynckit/serial.js +17 -0
  380. package/node_modules/asynckit/serialOrdered.js +75 -0
  381. package/node_modules/asynckit/stream.js +21 -0
  382. package/node_modules/axios/CHANGELOG.md +952 -0
  383. package/node_modules/axios/LICENSE +7 -0
  384. package/node_modules/axios/MIGRATION_GUIDE.md +3 -0
  385. package/node_modules/axios/README.md +1695 -0
  386. package/node_modules/axios/SECURITY.md +6 -0
  387. package/node_modules/axios/dist/axios.js +4172 -0
  388. package/node_modules/axios/dist/axios.js.map +1 -0
  389. package/node_modules/axios/dist/axios.min.js +2 -0
  390. package/node_modules/axios/dist/axios.min.js.map +1 -0
  391. package/node_modules/axios/dist/browser/axios.cjs +3638 -0
  392. package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
  393. package/node_modules/axios/dist/esm/axios.js +3661 -0
  394. package/node_modules/axios/dist/esm/axios.js.map +1 -0
  395. package/node_modules/axios/dist/esm/axios.min.js +2 -0
  396. package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
  397. package/node_modules/axios/dist/node/axios.cjs +4705 -0
  398. package/node_modules/axios/dist/node/axios.cjs.map +1 -0
  399. package/node_modules/axios/index.d.cts +545 -0
  400. package/node_modules/axios/index.d.ts +562 -0
  401. package/node_modules/axios/index.js +43 -0
  402. package/node_modules/axios/lib/adapters/README.md +37 -0
  403. package/node_modules/axios/lib/adapters/adapters.js +79 -0
  404. package/node_modules/axios/lib/adapters/fetch.js +227 -0
  405. package/node_modules/axios/lib/adapters/http.js +685 -0
  406. package/node_modules/axios/lib/adapters/xhr.js +190 -0
  407. package/node_modules/axios/lib/axios.js +89 -0
  408. package/node_modules/axios/lib/cancel/CancelToken.js +121 -0
  409. package/node_modules/axios/lib/cancel/CanceledError.js +25 -0
  410. package/node_modules/axios/lib/cancel/isCancel.js +5 -0
  411. package/node_modules/axios/lib/core/Axios.js +228 -0
  412. package/node_modules/axios/lib/core/AxiosError.js +100 -0
  413. package/node_modules/axios/lib/core/AxiosHeaders.js +302 -0
  414. package/node_modules/axios/lib/core/InterceptorManager.js +71 -0
  415. package/node_modules/axios/lib/core/README.md +8 -0
  416. package/node_modules/axios/lib/core/buildFullPath.js +21 -0
  417. package/node_modules/axios/lib/core/dispatchRequest.js +81 -0
  418. package/node_modules/axios/lib/core/mergeConfig.js +106 -0
  419. package/node_modules/axios/lib/core/settle.js +27 -0
  420. package/node_modules/axios/lib/core/transformData.js +28 -0
  421. package/node_modules/axios/lib/defaults/index.js +161 -0
  422. package/node_modules/axios/lib/defaults/transitional.js +7 -0
  423. package/node_modules/axios/lib/env/README.md +3 -0
  424. package/node_modules/axios/lib/env/classes/FormData.js +2 -0
  425. package/node_modules/axios/lib/env/data.js +1 -0
  426. package/node_modules/axios/lib/helpers/AxiosTransformStream.js +192 -0
  427. package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +58 -0
  428. package/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
  429. package/node_modules/axios/lib/helpers/README.md +7 -0
  430. package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +28 -0
  431. package/node_modules/axios/lib/helpers/bind.js +7 -0
  432. package/node_modules/axios/lib/helpers/buildURL.js +63 -0
  433. package/node_modules/axios/lib/helpers/callbackify.js +16 -0
  434. package/node_modules/axios/lib/helpers/combineURLs.js +15 -0
  435. package/node_modules/axios/lib/helpers/composeSignals.js +46 -0
  436. package/node_modules/axios/lib/helpers/cookies.js +42 -0
  437. package/node_modules/axios/lib/helpers/deprecatedMethod.js +26 -0
  438. package/node_modules/axios/lib/helpers/formDataToJSON.js +95 -0
  439. package/node_modules/axios/lib/helpers/formDataToStream.js +111 -0
  440. package/node_modules/axios/lib/helpers/fromDataURI.js +53 -0
  441. package/node_modules/axios/lib/helpers/isAbsoluteURL.js +15 -0
  442. package/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
  443. package/node_modules/axios/lib/helpers/isURLSameOrigin.js +67 -0
  444. package/node_modules/axios/lib/helpers/null.js +2 -0
  445. package/node_modules/axios/lib/helpers/parseHeaders.js +55 -0
  446. package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
  447. package/node_modules/axios/lib/helpers/progressEventReducer.js +32 -0
  448. package/node_modules/axios/lib/helpers/readBlob.js +15 -0
  449. package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
  450. package/node_modules/axios/lib/helpers/speedometer.js +55 -0
  451. package/node_modules/axios/lib/helpers/spread.js +28 -0
  452. package/node_modules/axios/lib/helpers/throttle.js +35 -0
  453. package/node_modules/axios/lib/helpers/toFormData.js +219 -0
  454. package/node_modules/axios/lib/helpers/toURLEncodedForm.js +18 -0
  455. package/node_modules/axios/lib/helpers/trackStream.js +55 -0
  456. package/node_modules/axios/lib/helpers/validator.js +91 -0
  457. package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
  458. package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
  459. package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
  460. package/node_modules/axios/lib/platform/browser/index.js +13 -0
  461. package/node_modules/axios/lib/platform/common/utils.js +50 -0
  462. package/node_modules/axios/lib/platform/index.js +7 -0
  463. package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
  464. package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
  465. package/node_modules/axios/lib/platform/node/index.js +12 -0
  466. package/node_modules/axios/lib/utils.js +728 -0
  467. package/node_modules/axios/package.json +219 -0
  468. package/node_modules/combined-stream/License +19 -0
  469. package/node_modules/combined-stream/Readme.md +138 -0
  470. package/node_modules/combined-stream/lib/combined_stream.js +208 -0
  471. package/node_modules/combined-stream/package.json +25 -0
  472. package/node_modules/delayed-stream/.npmignore +1 -0
  473. package/node_modules/delayed-stream/License +19 -0
  474. package/node_modules/delayed-stream/Makefile +7 -0
  475. package/node_modules/delayed-stream/Readme.md +141 -0
  476. package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
  477. package/node_modules/delayed-stream/package.json +27 -0
  478. package/node_modules/follow-redirects/LICENSE +18 -0
  479. package/node_modules/follow-redirects/README.md +155 -0
  480. package/node_modules/follow-redirects/debug.js +15 -0
  481. package/node_modules/follow-redirects/http.js +1 -0
  482. package/node_modules/follow-redirects/https.js +1 -0
  483. package/node_modules/follow-redirects/index.js +672 -0
  484. package/node_modules/follow-redirects/package.json +58 -0
  485. package/node_modules/form-data/License +19 -0
  486. package/node_modules/form-data/README.md.bak +358 -0
  487. package/node_modules/form-data/Readme.md +358 -0
  488. package/node_modules/form-data/index.d.ts +62 -0
  489. package/node_modules/form-data/lib/browser.js +2 -0
  490. package/node_modules/form-data/lib/form_data.js +501 -0
  491. package/node_modules/form-data/lib/populate.js +10 -0
  492. package/node_modules/form-data/package.json +68 -0
  493. package/node_modules/mime-db/HISTORY.md +507 -0
  494. package/node_modules/mime-db/LICENSE +23 -0
  495. package/node_modules/mime-db/README.md +100 -0
  496. package/node_modules/mime-db/db.json +8519 -0
  497. package/node_modules/mime-db/index.js +12 -0
  498. package/node_modules/mime-db/package.json +60 -0
  499. package/node_modules/mime-types/HISTORY.md +397 -0
  500. package/node_modules/mime-types/LICENSE +23 -0
  501. package/node_modules/mime-types/README.md +113 -0
  502. package/node_modules/mime-types/index.js +188 -0
  503. package/node_modules/mime-types/package.json +44 -0
  504. package/node_modules/proxy-from-env/.eslintrc +29 -0
  505. package/node_modules/proxy-from-env/.travis.yml +10 -0
  506. package/node_modules/proxy-from-env/LICENSE +20 -0
  507. package/node_modules/proxy-from-env/README.md +131 -0
  508. package/node_modules/proxy-from-env/index.js +108 -0
  509. package/node_modules/proxy-from-env/package.json +34 -0
  510. package/node_modules/proxy-from-env/test.js +483 -0
  511. package/node_modules/zod/LICENSE +21 -0
  512. package/node_modules/zod/README.md +2876 -0
  513. package/node_modules/zod/index.d.ts +2 -0
  514. package/node_modules/zod/lib/ZodError.d.ts +164 -0
  515. package/node_modules/zod/lib/ZodError.js +137 -0
  516. package/node_modules/zod/lib/__tests__/Mocker.d.ts +17 -0
  517. package/node_modules/zod/lib/__tests__/Mocker.js +57 -0
  518. package/node_modules/zod/lib/benchmarks/datetime.d.ts +5 -0
  519. package/node_modules/zod/lib/benchmarks/datetime.js +54 -0
  520. package/node_modules/zod/lib/benchmarks/discriminatedUnion.d.ts +5 -0
  521. package/node_modules/zod/lib/benchmarks/discriminatedUnion.js +79 -0
  522. package/node_modules/zod/lib/benchmarks/index.d.ts +1 -0
  523. package/node_modules/zod/lib/benchmarks/index.js +59 -0
  524. package/node_modules/zod/lib/benchmarks/ipv4.d.ts +5 -0
  525. package/node_modules/zod/lib/benchmarks/ipv4.js +54 -0
  526. package/node_modules/zod/lib/benchmarks/object.d.ts +5 -0
  527. package/node_modules/zod/lib/benchmarks/object.js +70 -0
  528. package/node_modules/zod/lib/benchmarks/primitives.d.ts +5 -0
  529. package/node_modules/zod/lib/benchmarks/primitives.js +170 -0
  530. package/node_modules/zod/lib/benchmarks/realworld.d.ts +5 -0
  531. package/node_modules/zod/lib/benchmarks/realworld.js +56 -0
  532. package/node_modules/zod/lib/benchmarks/string.d.ts +5 -0
  533. package/node_modules/zod/lib/benchmarks/string.js +55 -0
  534. package/node_modules/zod/lib/benchmarks/union.d.ts +5 -0
  535. package/node_modules/zod/lib/benchmarks/union.js +79 -0
  536. package/node_modules/zod/lib/errors.d.ts +5 -0
  537. package/node_modules/zod/lib/errors.js +17 -0
  538. package/node_modules/zod/lib/external.d.ts +6 -0
  539. package/node_modules/zod/lib/external.js +18 -0
  540. package/node_modules/zod/lib/helpers/enumUtil.d.ts +8 -0
  541. package/node_modules/zod/lib/helpers/enumUtil.js +2 -0
  542. package/node_modules/zod/lib/helpers/errorUtil.d.ts +9 -0
  543. package/node_modules/zod/lib/helpers/errorUtil.js +8 -0
  544. package/node_modules/zod/lib/helpers/parseUtil.d.ts +78 -0
  545. package/node_modules/zod/lib/helpers/parseUtil.js +125 -0
  546. package/node_modules/zod/lib/helpers/partialUtil.d.ts +8 -0
  547. package/node_modules/zod/lib/helpers/partialUtil.js +2 -0
  548. package/node_modules/zod/lib/helpers/typeAliases.d.ts +2 -0
  549. package/node_modules/zod/lib/helpers/typeAliases.js +2 -0
  550. package/node_modules/zod/lib/helpers/util.d.ts +82 -0
  551. package/node_modules/zod/lib/helpers/util.js +142 -0
  552. package/node_modules/zod/lib/index.d.ts +4 -0
  553. package/node_modules/zod/lib/index.js +29 -0
  554. package/node_modules/zod/lib/index.mjs +4236 -0
  555. package/node_modules/zod/lib/index.umd.js +4351 -0
  556. package/node_modules/zod/lib/locales/en.d.ts +3 -0
  557. package/node_modules/zod/lib/locales/en.js +129 -0
  558. package/node_modules/zod/lib/types.d.ts +1127 -0
  559. package/node_modules/zod/lib/types.js +3677 -0
  560. package/node_modules/zod/package.json +119 -0
  561. package/package.json +79 -0
@@ -0,0 +1,4172 @@
1
+ // Axios v1.7.2 Copyright (c) 2024 Matt Zabriskie and contributors
2
+ (function (global, factory) {
3
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
+ typeof define === 'function' && define.amd ? define(factory) :
5
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
6
+ })(this, (function () { 'use strict';
7
+
8
+ function _AsyncGenerator(e) {
9
+ var r, t;
10
+ function resume(r, t) {
11
+ try {
12
+ var n = e[r](t),
13
+ o = n.value,
14
+ u = o instanceof _OverloadYield;
15
+ Promise.resolve(u ? o.v : o).then(function (t) {
16
+ if (u) {
17
+ var i = "return" === r ? "return" : "next";
18
+ if (!o.k || t.done) return resume(i, t);
19
+ t = e[i](t).value;
20
+ }
21
+ settle(n.done ? "return" : "normal", t);
22
+ }, function (e) {
23
+ resume("throw", e);
24
+ });
25
+ } catch (e) {
26
+ settle("throw", e);
27
+ }
28
+ }
29
+ function settle(e, n) {
30
+ switch (e) {
31
+ case "return":
32
+ r.resolve({
33
+ value: n,
34
+ done: !0
35
+ });
36
+ break;
37
+ case "throw":
38
+ r.reject(n);
39
+ break;
40
+ default:
41
+ r.resolve({
42
+ value: n,
43
+ done: !1
44
+ });
45
+ }
46
+ (r = r.next) ? resume(r.key, r.arg) : t = null;
47
+ }
48
+ this._invoke = function (e, n) {
49
+ return new Promise(function (o, u) {
50
+ var i = {
51
+ key: e,
52
+ arg: n,
53
+ resolve: o,
54
+ reject: u,
55
+ next: null
56
+ };
57
+ t ? t = t.next = i : (r = t = i, resume(e, n));
58
+ });
59
+ }, "function" != typeof e.return && (this.return = void 0);
60
+ }
61
+ _AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () {
62
+ return this;
63
+ }, _AsyncGenerator.prototype.next = function (e) {
64
+ return this._invoke("next", e);
65
+ }, _AsyncGenerator.prototype.throw = function (e) {
66
+ return this._invoke("throw", e);
67
+ }, _AsyncGenerator.prototype.return = function (e) {
68
+ return this._invoke("return", e);
69
+ };
70
+ function _OverloadYield(t, e) {
71
+ this.v = t, this.k = e;
72
+ }
73
+ function _asyncGeneratorDelegate(t) {
74
+ var e = {},
75
+ n = !1;
76
+ function pump(e, r) {
77
+ return n = !0, r = new Promise(function (n) {
78
+ n(t[e](r));
79
+ }), {
80
+ done: !1,
81
+ value: new _OverloadYield(r, 1)
82
+ };
83
+ }
84
+ return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () {
85
+ return this;
86
+ }, e.next = function (t) {
87
+ return n ? (n = !1, t) : pump("next", t);
88
+ }, "function" == typeof t.throw && (e.throw = function (t) {
89
+ if (n) throw n = !1, t;
90
+ return pump("throw", t);
91
+ }), "function" == typeof t.return && (e.return = function (t) {
92
+ return n ? (n = !1, t) : pump("return", t);
93
+ }), e;
94
+ }
95
+ function _asyncIterator(r) {
96
+ var n,
97
+ t,
98
+ o,
99
+ e = 2;
100
+ for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) {
101
+ if (t && null != (n = r[t])) return n.call(r);
102
+ if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r));
103
+ t = "@@asyncIterator", o = "@@iterator";
104
+ }
105
+ throw new TypeError("Object is not async iterable");
106
+ }
107
+ function AsyncFromSyncIterator(r) {
108
+ function AsyncFromSyncIteratorContinuation(r) {
109
+ if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
110
+ var n = r.done;
111
+ return Promise.resolve(r.value).then(function (r) {
112
+ return {
113
+ value: r,
114
+ done: n
115
+ };
116
+ });
117
+ }
118
+ return AsyncFromSyncIterator = function (r) {
119
+ this.s = r, this.n = r.next;
120
+ }, AsyncFromSyncIterator.prototype = {
121
+ s: null,
122
+ n: null,
123
+ next: function () {
124
+ return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
125
+ },
126
+ return: function (r) {
127
+ var n = this.s.return;
128
+ return void 0 === n ? Promise.resolve({
129
+ value: r,
130
+ done: !0
131
+ }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
132
+ },
133
+ throw: function (r) {
134
+ var n = this.s.return;
135
+ return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments));
136
+ }
137
+ }, new AsyncFromSyncIterator(r);
138
+ }
139
+ function _awaitAsyncGenerator(e) {
140
+ return new _OverloadYield(e, 0);
141
+ }
142
+ function _iterableToArrayLimit(r, l) {
143
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
144
+ if (null != t) {
145
+ var e,
146
+ n,
147
+ i,
148
+ u,
149
+ a = [],
150
+ f = !0,
151
+ o = !1;
152
+ try {
153
+ if (i = (t = t.call(r)).next, 0 === l) {
154
+ if (Object(t) !== t) return;
155
+ f = !1;
156
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
157
+ } catch (r) {
158
+ o = !0, n = r;
159
+ } finally {
160
+ try {
161
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
162
+ } finally {
163
+ if (o) throw n;
164
+ }
165
+ }
166
+ return a;
167
+ }
168
+ }
169
+ function ownKeys(e, r) {
170
+ var t = Object.keys(e);
171
+ if (Object.getOwnPropertySymbols) {
172
+ var o = Object.getOwnPropertySymbols(e);
173
+ r && (o = o.filter(function (r) {
174
+ return Object.getOwnPropertyDescriptor(e, r).enumerable;
175
+ })), t.push.apply(t, o);
176
+ }
177
+ return t;
178
+ }
179
+ function _objectSpread2(e) {
180
+ for (var r = 1; r < arguments.length; r++) {
181
+ var t = null != arguments[r] ? arguments[r] : {};
182
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
183
+ _defineProperty(e, r, t[r]);
184
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
185
+ Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
186
+ });
187
+ }
188
+ return e;
189
+ }
190
+ function _regeneratorRuntime() {
191
+ _regeneratorRuntime = function () {
192
+ return e;
193
+ };
194
+ var t,
195
+ e = {},
196
+ r = Object.prototype,
197
+ n = r.hasOwnProperty,
198
+ o = Object.defineProperty || function (t, e, r) {
199
+ t[e] = r.value;
200
+ },
201
+ i = "function" == typeof Symbol ? Symbol : {},
202
+ a = i.iterator || "@@iterator",
203
+ c = i.asyncIterator || "@@asyncIterator",
204
+ u = i.toStringTag || "@@toStringTag";
205
+ function define(t, e, r) {
206
+ return Object.defineProperty(t, e, {
207
+ value: r,
208
+ enumerable: !0,
209
+ configurable: !0,
210
+ writable: !0
211
+ }), t[e];
212
+ }
213
+ try {
214
+ define({}, "");
215
+ } catch (t) {
216
+ define = function (t, e, r) {
217
+ return t[e] = r;
218
+ };
219
+ }
220
+ function wrap(t, e, r, n) {
221
+ var i = e && e.prototype instanceof Generator ? e : Generator,
222
+ a = Object.create(i.prototype),
223
+ c = new Context(n || []);
224
+ return o(a, "_invoke", {
225
+ value: makeInvokeMethod(t, r, c)
226
+ }), a;
227
+ }
228
+ function tryCatch(t, e, r) {
229
+ try {
230
+ return {
231
+ type: "normal",
232
+ arg: t.call(e, r)
233
+ };
234
+ } catch (t) {
235
+ return {
236
+ type: "throw",
237
+ arg: t
238
+ };
239
+ }
240
+ }
241
+ e.wrap = wrap;
242
+ var h = "suspendedStart",
243
+ l = "suspendedYield",
244
+ f = "executing",
245
+ s = "completed",
246
+ y = {};
247
+ function Generator() {}
248
+ function GeneratorFunction() {}
249
+ function GeneratorFunctionPrototype() {}
250
+ var p = {};
251
+ define(p, a, function () {
252
+ return this;
253
+ });
254
+ var d = Object.getPrototypeOf,
255
+ v = d && d(d(values([])));
256
+ v && v !== r && n.call(v, a) && (p = v);
257
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
258
+ function defineIteratorMethods(t) {
259
+ ["next", "throw", "return"].forEach(function (e) {
260
+ define(t, e, function (t) {
261
+ return this._invoke(e, t);
262
+ });
263
+ });
264
+ }
265
+ function AsyncIterator(t, e) {
266
+ function invoke(r, o, i, a) {
267
+ var c = tryCatch(t[r], t, o);
268
+ if ("throw" !== c.type) {
269
+ var u = c.arg,
270
+ h = u.value;
271
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
272
+ invoke("next", t, i, a);
273
+ }, function (t) {
274
+ invoke("throw", t, i, a);
275
+ }) : e.resolve(h).then(function (t) {
276
+ u.value = t, i(u);
277
+ }, function (t) {
278
+ return invoke("throw", t, i, a);
279
+ });
280
+ }
281
+ a(c.arg);
282
+ }
283
+ var r;
284
+ o(this, "_invoke", {
285
+ value: function (t, n) {
286
+ function callInvokeWithMethodAndArg() {
287
+ return new e(function (e, r) {
288
+ invoke(t, n, e, r);
289
+ });
290
+ }
291
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
292
+ }
293
+ });
294
+ }
295
+ function makeInvokeMethod(e, r, n) {
296
+ var o = h;
297
+ return function (i, a) {
298
+ if (o === f) throw new Error("Generator is already running");
299
+ if (o === s) {
300
+ if ("throw" === i) throw a;
301
+ return {
302
+ value: t,
303
+ done: !0
304
+ };
305
+ }
306
+ for (n.method = i, n.arg = a;;) {
307
+ var c = n.delegate;
308
+ if (c) {
309
+ var u = maybeInvokeDelegate(c, n);
310
+ if (u) {
311
+ if (u === y) continue;
312
+ return u;
313
+ }
314
+ }
315
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
316
+ if (o === h) throw o = s, n.arg;
317
+ n.dispatchException(n.arg);
318
+ } else "return" === n.method && n.abrupt("return", n.arg);
319
+ o = f;
320
+ var p = tryCatch(e, r, n);
321
+ if ("normal" === p.type) {
322
+ if (o = n.done ? s : l, p.arg === y) continue;
323
+ return {
324
+ value: p.arg,
325
+ done: n.done
326
+ };
327
+ }
328
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
329
+ }
330
+ };
331
+ }
332
+ function maybeInvokeDelegate(e, r) {
333
+ var n = r.method,
334
+ o = e.iterator[n];
335
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
336
+ var i = tryCatch(o, e.iterator, r.arg);
337
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
338
+ var a = i.arg;
339
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
340
+ }
341
+ function pushTryEntry(t) {
342
+ var e = {
343
+ tryLoc: t[0]
344
+ };
345
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
346
+ }
347
+ function resetTryEntry(t) {
348
+ var e = t.completion || {};
349
+ e.type = "normal", delete e.arg, t.completion = e;
350
+ }
351
+ function Context(t) {
352
+ this.tryEntries = [{
353
+ tryLoc: "root"
354
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
355
+ }
356
+ function values(e) {
357
+ if (e || "" === e) {
358
+ var r = e[a];
359
+ if (r) return r.call(e);
360
+ if ("function" == typeof e.next) return e;
361
+ if (!isNaN(e.length)) {
362
+ var o = -1,
363
+ i = function next() {
364
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
365
+ return next.value = t, next.done = !0, next;
366
+ };
367
+ return i.next = i;
368
+ }
369
+ }
370
+ throw new TypeError(typeof e + " is not iterable");
371
+ }
372
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
373
+ value: GeneratorFunctionPrototype,
374
+ configurable: !0
375
+ }), o(GeneratorFunctionPrototype, "constructor", {
376
+ value: GeneratorFunction,
377
+ configurable: !0
378
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
379
+ var e = "function" == typeof t && t.constructor;
380
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
381
+ }, e.mark = function (t) {
382
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
383
+ }, e.awrap = function (t) {
384
+ return {
385
+ __await: t
386
+ };
387
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
388
+ return this;
389
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
390
+ void 0 === i && (i = Promise);
391
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
392
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
393
+ return t.done ? t.value : a.next();
394
+ });
395
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
396
+ return this;
397
+ }), define(g, "toString", function () {
398
+ return "[object Generator]";
399
+ }), e.keys = function (t) {
400
+ var e = Object(t),
401
+ r = [];
402
+ for (var n in e) r.push(n);
403
+ return r.reverse(), function next() {
404
+ for (; r.length;) {
405
+ var t = r.pop();
406
+ if (t in e) return next.value = t, next.done = !1, next;
407
+ }
408
+ return next.done = !0, next;
409
+ };
410
+ }, e.values = values, Context.prototype = {
411
+ constructor: Context,
412
+ reset: function (e) {
413
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
414
+ },
415
+ stop: function () {
416
+ this.done = !0;
417
+ var t = this.tryEntries[0].completion;
418
+ if ("throw" === t.type) throw t.arg;
419
+ return this.rval;
420
+ },
421
+ dispatchException: function (e) {
422
+ if (this.done) throw e;
423
+ var r = this;
424
+ function handle(n, o) {
425
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
426
+ }
427
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
428
+ var i = this.tryEntries[o],
429
+ a = i.completion;
430
+ if ("root" === i.tryLoc) return handle("end");
431
+ if (i.tryLoc <= this.prev) {
432
+ var c = n.call(i, "catchLoc"),
433
+ u = n.call(i, "finallyLoc");
434
+ if (c && u) {
435
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
436
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
437
+ } else if (c) {
438
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
439
+ } else {
440
+ if (!u) throw new Error("try statement without catch or finally");
441
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
442
+ }
443
+ }
444
+ }
445
+ },
446
+ abrupt: function (t, e) {
447
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
448
+ var o = this.tryEntries[r];
449
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
450
+ var i = o;
451
+ break;
452
+ }
453
+ }
454
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
455
+ var a = i ? i.completion : {};
456
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
457
+ },
458
+ complete: function (t, e) {
459
+ if ("throw" === t.type) throw t.arg;
460
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
461
+ },
462
+ finish: function (t) {
463
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
464
+ var r = this.tryEntries[e];
465
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
466
+ }
467
+ },
468
+ catch: function (t) {
469
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
470
+ var r = this.tryEntries[e];
471
+ if (r.tryLoc === t) {
472
+ var n = r.completion;
473
+ if ("throw" === n.type) {
474
+ var o = n.arg;
475
+ resetTryEntry(r);
476
+ }
477
+ return o;
478
+ }
479
+ }
480
+ throw new Error("illegal catch attempt");
481
+ },
482
+ delegateYield: function (e, r, n) {
483
+ return this.delegate = {
484
+ iterator: values(e),
485
+ resultName: r,
486
+ nextLoc: n
487
+ }, "next" === this.method && (this.arg = t), y;
488
+ }
489
+ }, e;
490
+ }
491
+ function _toPrimitive(t, r) {
492
+ if ("object" != typeof t || !t) return t;
493
+ var e = t[Symbol.toPrimitive];
494
+ if (void 0 !== e) {
495
+ var i = e.call(t, r || "default");
496
+ if ("object" != typeof i) return i;
497
+ throw new TypeError("@@toPrimitive must return a primitive value.");
498
+ }
499
+ return ("string" === r ? String : Number)(t);
500
+ }
501
+ function _toPropertyKey(t) {
502
+ var i = _toPrimitive(t, "string");
503
+ return "symbol" == typeof i ? i : String(i);
504
+ }
505
+ function _typeof(o) {
506
+ "@babel/helpers - typeof";
507
+
508
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
509
+ return typeof o;
510
+ } : function (o) {
511
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
512
+ }, _typeof(o);
513
+ }
514
+ function _wrapAsyncGenerator(fn) {
515
+ return function () {
516
+ return new _AsyncGenerator(fn.apply(this, arguments));
517
+ };
518
+ }
519
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
520
+ try {
521
+ var info = gen[key](arg);
522
+ var value = info.value;
523
+ } catch (error) {
524
+ reject(error);
525
+ return;
526
+ }
527
+ if (info.done) {
528
+ resolve(value);
529
+ } else {
530
+ Promise.resolve(value).then(_next, _throw);
531
+ }
532
+ }
533
+ function _asyncToGenerator(fn) {
534
+ return function () {
535
+ var self = this,
536
+ args = arguments;
537
+ return new Promise(function (resolve, reject) {
538
+ var gen = fn.apply(self, args);
539
+ function _next(value) {
540
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
541
+ }
542
+ function _throw(err) {
543
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
544
+ }
545
+ _next(undefined);
546
+ });
547
+ };
548
+ }
549
+ function _classCallCheck(instance, Constructor) {
550
+ if (!(instance instanceof Constructor)) {
551
+ throw new TypeError("Cannot call a class as a function");
552
+ }
553
+ }
554
+ function _defineProperties(target, props) {
555
+ for (var i = 0; i < props.length; i++) {
556
+ var descriptor = props[i];
557
+ descriptor.enumerable = descriptor.enumerable || false;
558
+ descriptor.configurable = true;
559
+ if ("value" in descriptor) descriptor.writable = true;
560
+ Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
561
+ }
562
+ }
563
+ function _createClass(Constructor, protoProps, staticProps) {
564
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
565
+ if (staticProps) _defineProperties(Constructor, staticProps);
566
+ Object.defineProperty(Constructor, "prototype", {
567
+ writable: false
568
+ });
569
+ return Constructor;
570
+ }
571
+ function _defineProperty(obj, key, value) {
572
+ key = _toPropertyKey(key);
573
+ if (key in obj) {
574
+ Object.defineProperty(obj, key, {
575
+ value: value,
576
+ enumerable: true,
577
+ configurable: true,
578
+ writable: true
579
+ });
580
+ } else {
581
+ obj[key] = value;
582
+ }
583
+ return obj;
584
+ }
585
+ function _slicedToArray(arr, i) {
586
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
587
+ }
588
+ function _toArray(arr) {
589
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
590
+ }
591
+ function _toConsumableArray(arr) {
592
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
593
+ }
594
+ function _arrayWithoutHoles(arr) {
595
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
596
+ }
597
+ function _arrayWithHoles(arr) {
598
+ if (Array.isArray(arr)) return arr;
599
+ }
600
+ function _iterableToArray(iter) {
601
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
602
+ }
603
+ function _unsupportedIterableToArray(o, minLen) {
604
+ if (!o) return;
605
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
606
+ var n = Object.prototype.toString.call(o).slice(8, -1);
607
+ if (n === "Object" && o.constructor) n = o.constructor.name;
608
+ if (n === "Map" || n === "Set") return Array.from(o);
609
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
610
+ }
611
+ function _arrayLikeToArray(arr, len) {
612
+ if (len == null || len > arr.length) len = arr.length;
613
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
614
+ return arr2;
615
+ }
616
+ function _nonIterableSpread() {
617
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
618
+ }
619
+ function _nonIterableRest() {
620
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
621
+ }
622
+ function _createForOfIteratorHelper(o, allowArrayLike) {
623
+ var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"];
624
+ if (!it) {
625
+ if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
626
+ if (it) o = it;
627
+ var i = 0;
628
+ var F = function () {};
629
+ return {
630
+ s: F,
631
+ n: function () {
632
+ if (i >= o.length) return {
633
+ done: true
634
+ };
635
+ return {
636
+ done: false,
637
+ value: o[i++]
638
+ };
639
+ },
640
+ e: function (e) {
641
+ throw e;
642
+ },
643
+ f: F
644
+ };
645
+ }
646
+ throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
647
+ }
648
+ var normalCompletion = true,
649
+ didErr = false,
650
+ err;
651
+ return {
652
+ s: function () {
653
+ it = it.call(o);
654
+ },
655
+ n: function () {
656
+ var step = it.next();
657
+ normalCompletion = step.done;
658
+ return step;
659
+ },
660
+ e: function (e) {
661
+ didErr = true;
662
+ err = e;
663
+ },
664
+ f: function () {
665
+ try {
666
+ if (!normalCompletion && it.return != null) it.return();
667
+ } finally {
668
+ if (didErr) throw err;
669
+ }
670
+ }
671
+ };
672
+ }
673
+
674
+ function bind(fn, thisArg) {
675
+ return function wrap() {
676
+ return fn.apply(thisArg, arguments);
677
+ };
678
+ }
679
+
680
+ // utils is a library of generic helper functions non-specific to axios
681
+
682
+ var toString = Object.prototype.toString;
683
+ var getPrototypeOf = Object.getPrototypeOf;
684
+ var kindOf = function (cache) {
685
+ return function (thing) {
686
+ var str = toString.call(thing);
687
+ return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
688
+ };
689
+ }(Object.create(null));
690
+ var kindOfTest = function kindOfTest(type) {
691
+ type = type.toLowerCase();
692
+ return function (thing) {
693
+ return kindOf(thing) === type;
694
+ };
695
+ };
696
+ var typeOfTest = function typeOfTest(type) {
697
+ return function (thing) {
698
+ return _typeof(thing) === type;
699
+ };
700
+ };
701
+
702
+ /**
703
+ * Determine if a value is an Array
704
+ *
705
+ * @param {Object} val The value to test
706
+ *
707
+ * @returns {boolean} True if value is an Array, otherwise false
708
+ */
709
+ var isArray = Array.isArray;
710
+
711
+ /**
712
+ * Determine if a value is undefined
713
+ *
714
+ * @param {*} val The value to test
715
+ *
716
+ * @returns {boolean} True if the value is undefined, otherwise false
717
+ */
718
+ var isUndefined = typeOfTest('undefined');
719
+
720
+ /**
721
+ * Determine if a value is a Buffer
722
+ *
723
+ * @param {*} val The value to test
724
+ *
725
+ * @returns {boolean} True if value is a Buffer, otherwise false
726
+ */
727
+ function isBuffer(val) {
728
+ return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
729
+ }
730
+
731
+ /**
732
+ * Determine if a value is an ArrayBuffer
733
+ *
734
+ * @param {*} val The value to test
735
+ *
736
+ * @returns {boolean} True if value is an ArrayBuffer, otherwise false
737
+ */
738
+ var isArrayBuffer = kindOfTest('ArrayBuffer');
739
+
740
+ /**
741
+ * Determine if a value is a view on an ArrayBuffer
742
+ *
743
+ * @param {*} val The value to test
744
+ *
745
+ * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
746
+ */
747
+ function isArrayBufferView(val) {
748
+ var result;
749
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
750
+ result = ArrayBuffer.isView(val);
751
+ } else {
752
+ result = val && val.buffer && isArrayBuffer(val.buffer);
753
+ }
754
+ return result;
755
+ }
756
+
757
+ /**
758
+ * Determine if a value is a String
759
+ *
760
+ * @param {*} val The value to test
761
+ *
762
+ * @returns {boolean} True if value is a String, otherwise false
763
+ */
764
+ var isString = typeOfTest('string');
765
+
766
+ /**
767
+ * Determine if a value is a Function
768
+ *
769
+ * @param {*} val The value to test
770
+ * @returns {boolean} True if value is a Function, otherwise false
771
+ */
772
+ var isFunction = typeOfTest('function');
773
+
774
+ /**
775
+ * Determine if a value is a Number
776
+ *
777
+ * @param {*} val The value to test
778
+ *
779
+ * @returns {boolean} True if value is a Number, otherwise false
780
+ */
781
+ var isNumber = typeOfTest('number');
782
+
783
+ /**
784
+ * Determine if a value is an Object
785
+ *
786
+ * @param {*} thing The value to test
787
+ *
788
+ * @returns {boolean} True if value is an Object, otherwise false
789
+ */
790
+ var isObject = function isObject(thing) {
791
+ return thing !== null && _typeof(thing) === 'object';
792
+ };
793
+
794
+ /**
795
+ * Determine if a value is a Boolean
796
+ *
797
+ * @param {*} thing The value to test
798
+ * @returns {boolean} True if value is a Boolean, otherwise false
799
+ */
800
+ var isBoolean = function isBoolean(thing) {
801
+ return thing === true || thing === false;
802
+ };
803
+
804
+ /**
805
+ * Determine if a value is a plain Object
806
+ *
807
+ * @param {*} val The value to test
808
+ *
809
+ * @returns {boolean} True if value is a plain Object, otherwise false
810
+ */
811
+ var isPlainObject = function isPlainObject(val) {
812
+ if (kindOf(val) !== 'object') {
813
+ return false;
814
+ }
815
+ var prototype = getPrototypeOf(val);
816
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
817
+ };
818
+
819
+ /**
820
+ * Determine if a value is a Date
821
+ *
822
+ * @param {*} val The value to test
823
+ *
824
+ * @returns {boolean} True if value is a Date, otherwise false
825
+ */
826
+ var isDate = kindOfTest('Date');
827
+
828
+ /**
829
+ * Determine if a value is a File
830
+ *
831
+ * @param {*} val The value to test
832
+ *
833
+ * @returns {boolean} True if value is a File, otherwise false
834
+ */
835
+ var isFile = kindOfTest('File');
836
+
837
+ /**
838
+ * Determine if a value is a Blob
839
+ *
840
+ * @param {*} val The value to test
841
+ *
842
+ * @returns {boolean} True if value is a Blob, otherwise false
843
+ */
844
+ var isBlob = kindOfTest('Blob');
845
+
846
+ /**
847
+ * Determine if a value is a FileList
848
+ *
849
+ * @param {*} val The value to test
850
+ *
851
+ * @returns {boolean} True if value is a File, otherwise false
852
+ */
853
+ var isFileList = kindOfTest('FileList');
854
+
855
+ /**
856
+ * Determine if a value is a Stream
857
+ *
858
+ * @param {*} val The value to test
859
+ *
860
+ * @returns {boolean} True if value is a Stream, otherwise false
861
+ */
862
+ var isStream = function isStream(val) {
863
+ return isObject(val) && isFunction(val.pipe);
864
+ };
865
+
866
+ /**
867
+ * Determine if a value is a FormData
868
+ *
869
+ * @param {*} thing The value to test
870
+ *
871
+ * @returns {boolean} True if value is an FormData, otherwise false
872
+ */
873
+ var isFormData = function isFormData(thing) {
874
+ var kind;
875
+ return thing && (typeof FormData === 'function' && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === 'formdata' ||
876
+ // detect form-data instance
877
+ kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]'));
878
+ };
879
+
880
+ /**
881
+ * Determine if a value is a URLSearchParams object
882
+ *
883
+ * @param {*} val The value to test
884
+ *
885
+ * @returns {boolean} True if value is a URLSearchParams object, otherwise false
886
+ */
887
+ var isURLSearchParams = kindOfTest('URLSearchParams');
888
+ var _map = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest),
889
+ _map2 = _slicedToArray(_map, 4),
890
+ isReadableStream = _map2[0],
891
+ isRequest = _map2[1],
892
+ isResponse = _map2[2],
893
+ isHeaders = _map2[3];
894
+
895
+ /**
896
+ * Trim excess whitespace off the beginning and end of a string
897
+ *
898
+ * @param {String} str The String to trim
899
+ *
900
+ * @returns {String} The String freed of excess whitespace
901
+ */
902
+ var trim = function trim(str) {
903
+ return str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
904
+ };
905
+
906
+ /**
907
+ * Iterate over an Array or an Object invoking a function for each item.
908
+ *
909
+ * If `obj` is an Array callback will be called passing
910
+ * the value, index, and complete array for each item.
911
+ *
912
+ * If 'obj' is an Object callback will be called passing
913
+ * the value, key, and complete object for each property.
914
+ *
915
+ * @param {Object|Array} obj The object to iterate
916
+ * @param {Function} fn The callback to invoke for each item
917
+ *
918
+ * @param {Boolean} [allOwnKeys = false]
919
+ * @returns {any}
920
+ */
921
+ function forEach(obj, fn) {
922
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
923
+ _ref$allOwnKeys = _ref.allOwnKeys,
924
+ allOwnKeys = _ref$allOwnKeys === void 0 ? false : _ref$allOwnKeys;
925
+ // Don't bother if no value provided
926
+ if (obj === null || typeof obj === 'undefined') {
927
+ return;
928
+ }
929
+ var i;
930
+ var l;
931
+
932
+ // Force an array if not already something iterable
933
+ if (_typeof(obj) !== 'object') {
934
+ /*eslint no-param-reassign:0*/
935
+ obj = [obj];
936
+ }
937
+ if (isArray(obj)) {
938
+ // Iterate over array values
939
+ for (i = 0, l = obj.length; i < l; i++) {
940
+ fn.call(null, obj[i], i, obj);
941
+ }
942
+ } else {
943
+ // Iterate over object keys
944
+ var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
945
+ var len = keys.length;
946
+ var key;
947
+ for (i = 0; i < len; i++) {
948
+ key = keys[i];
949
+ fn.call(null, obj[key], key, obj);
950
+ }
951
+ }
952
+ }
953
+ function findKey(obj, key) {
954
+ key = key.toLowerCase();
955
+ var keys = Object.keys(obj);
956
+ var i = keys.length;
957
+ var _key;
958
+ while (i-- > 0) {
959
+ _key = keys[i];
960
+ if (key === _key.toLowerCase()) {
961
+ return _key;
962
+ }
963
+ }
964
+ return null;
965
+ }
966
+ var _global = function () {
967
+ /*eslint no-undef:0*/
968
+ if (typeof globalThis !== "undefined") return globalThis;
969
+ return typeof self !== "undefined" ? self : typeof window !== 'undefined' ? window : global;
970
+ }();
971
+ var isContextDefined = function isContextDefined(context) {
972
+ return !isUndefined(context) && context !== _global;
973
+ };
974
+
975
+ /**
976
+ * Accepts varargs expecting each argument to be an object, then
977
+ * immutably merges the properties of each object and returns result.
978
+ *
979
+ * When multiple objects contain the same key the later object in
980
+ * the arguments list will take precedence.
981
+ *
982
+ * Example:
983
+ *
984
+ * ```js
985
+ * var result = merge({foo: 123}, {foo: 456});
986
+ * console.log(result.foo); // outputs 456
987
+ * ```
988
+ *
989
+ * @param {Object} obj1 Object to merge
990
+ *
991
+ * @returns {Object} Result of all merge properties
992
+ */
993
+ function merge( /* obj1, obj2, obj3, ... */
994
+ ) {
995
+ var _ref2 = isContextDefined(this) && this || {},
996
+ caseless = _ref2.caseless;
997
+ var result = {};
998
+ var assignValue = function assignValue(val, key) {
999
+ var targetKey = caseless && findKey(result, key) || key;
1000
+ if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
1001
+ result[targetKey] = merge(result[targetKey], val);
1002
+ } else if (isPlainObject(val)) {
1003
+ result[targetKey] = merge({}, val);
1004
+ } else if (isArray(val)) {
1005
+ result[targetKey] = val.slice();
1006
+ } else {
1007
+ result[targetKey] = val;
1008
+ }
1009
+ };
1010
+ for (var i = 0, l = arguments.length; i < l; i++) {
1011
+ arguments[i] && forEach(arguments[i], assignValue);
1012
+ }
1013
+ return result;
1014
+ }
1015
+
1016
+ /**
1017
+ * Extends object a by mutably adding to it the properties of object b.
1018
+ *
1019
+ * @param {Object} a The object to be extended
1020
+ * @param {Object} b The object to copy properties from
1021
+ * @param {Object} thisArg The object to bind function to
1022
+ *
1023
+ * @param {Boolean} [allOwnKeys]
1024
+ * @returns {Object} The resulting value of object a
1025
+ */
1026
+ var extend = function extend(a, b, thisArg) {
1027
+ var _ref3 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
1028
+ allOwnKeys = _ref3.allOwnKeys;
1029
+ forEach(b, function (val, key) {
1030
+ if (thisArg && isFunction(val)) {
1031
+ a[key] = bind(val, thisArg);
1032
+ } else {
1033
+ a[key] = val;
1034
+ }
1035
+ }, {
1036
+ allOwnKeys: allOwnKeys
1037
+ });
1038
+ return a;
1039
+ };
1040
+
1041
+ /**
1042
+ * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
1043
+ *
1044
+ * @param {string} content with BOM
1045
+ *
1046
+ * @returns {string} content value without BOM
1047
+ */
1048
+ var stripBOM = function stripBOM(content) {
1049
+ if (content.charCodeAt(0) === 0xFEFF) {
1050
+ content = content.slice(1);
1051
+ }
1052
+ return content;
1053
+ };
1054
+
1055
+ /**
1056
+ * Inherit the prototype methods from one constructor into another
1057
+ * @param {function} constructor
1058
+ * @param {function} superConstructor
1059
+ * @param {object} [props]
1060
+ * @param {object} [descriptors]
1061
+ *
1062
+ * @returns {void}
1063
+ */
1064
+ var inherits = function inherits(constructor, superConstructor, props, descriptors) {
1065
+ constructor.prototype = Object.create(superConstructor.prototype, descriptors);
1066
+ constructor.prototype.constructor = constructor;
1067
+ Object.defineProperty(constructor, 'super', {
1068
+ value: superConstructor.prototype
1069
+ });
1070
+ props && Object.assign(constructor.prototype, props);
1071
+ };
1072
+
1073
+ /**
1074
+ * Resolve object with deep prototype chain to a flat object
1075
+ * @param {Object} sourceObj source object
1076
+ * @param {Object} [destObj]
1077
+ * @param {Function|Boolean} [filter]
1078
+ * @param {Function} [propFilter]
1079
+ *
1080
+ * @returns {Object}
1081
+ */
1082
+ var toFlatObject = function toFlatObject(sourceObj, destObj, filter, propFilter) {
1083
+ var props;
1084
+ var i;
1085
+ var prop;
1086
+ var merged = {};
1087
+ destObj = destObj || {};
1088
+ // eslint-disable-next-line no-eq-null,eqeqeq
1089
+ if (sourceObj == null) return destObj;
1090
+ do {
1091
+ props = Object.getOwnPropertyNames(sourceObj);
1092
+ i = props.length;
1093
+ while (i-- > 0) {
1094
+ prop = props[i];
1095
+ if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
1096
+ destObj[prop] = sourceObj[prop];
1097
+ merged[prop] = true;
1098
+ }
1099
+ }
1100
+ sourceObj = filter !== false && getPrototypeOf(sourceObj);
1101
+ } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
1102
+ return destObj;
1103
+ };
1104
+
1105
+ /**
1106
+ * Determines whether a string ends with the characters of a specified string
1107
+ *
1108
+ * @param {String} str
1109
+ * @param {String} searchString
1110
+ * @param {Number} [position= 0]
1111
+ *
1112
+ * @returns {boolean}
1113
+ */
1114
+ var endsWith = function endsWith(str, searchString, position) {
1115
+ str = String(str);
1116
+ if (position === undefined || position > str.length) {
1117
+ position = str.length;
1118
+ }
1119
+ position -= searchString.length;
1120
+ var lastIndex = str.indexOf(searchString, position);
1121
+ return lastIndex !== -1 && lastIndex === position;
1122
+ };
1123
+
1124
+ /**
1125
+ * Returns new array from array like object or null if failed
1126
+ *
1127
+ * @param {*} [thing]
1128
+ *
1129
+ * @returns {?Array}
1130
+ */
1131
+ var toArray = function toArray(thing) {
1132
+ if (!thing) return null;
1133
+ if (isArray(thing)) return thing;
1134
+ var i = thing.length;
1135
+ if (!isNumber(i)) return null;
1136
+ var arr = new Array(i);
1137
+ while (i-- > 0) {
1138
+ arr[i] = thing[i];
1139
+ }
1140
+ return arr;
1141
+ };
1142
+
1143
+ /**
1144
+ * Checking if the Uint8Array exists and if it does, it returns a function that checks if the
1145
+ * thing passed in is an instance of Uint8Array
1146
+ *
1147
+ * @param {TypedArray}
1148
+ *
1149
+ * @returns {Array}
1150
+ */
1151
+ // eslint-disable-next-line func-names
1152
+ var isTypedArray = function (TypedArray) {
1153
+ // eslint-disable-next-line func-names
1154
+ return function (thing) {
1155
+ return TypedArray && thing instanceof TypedArray;
1156
+ };
1157
+ }(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
1158
+
1159
+ /**
1160
+ * For each entry in the object, call the function with the key and value.
1161
+ *
1162
+ * @param {Object<any, any>} obj - The object to iterate over.
1163
+ * @param {Function} fn - The function to call for each entry.
1164
+ *
1165
+ * @returns {void}
1166
+ */
1167
+ var forEachEntry = function forEachEntry(obj, fn) {
1168
+ var generator = obj && obj[Symbol.iterator];
1169
+ var iterator = generator.call(obj);
1170
+ var result;
1171
+ while ((result = iterator.next()) && !result.done) {
1172
+ var pair = result.value;
1173
+ fn.call(obj, pair[0], pair[1]);
1174
+ }
1175
+ };
1176
+
1177
+ /**
1178
+ * It takes a regular expression and a string, and returns an array of all the matches
1179
+ *
1180
+ * @param {string} regExp - The regular expression to match against.
1181
+ * @param {string} str - The string to search.
1182
+ *
1183
+ * @returns {Array<boolean>}
1184
+ */
1185
+ var matchAll = function matchAll(regExp, str) {
1186
+ var matches;
1187
+ var arr = [];
1188
+ while ((matches = regExp.exec(str)) !== null) {
1189
+ arr.push(matches);
1190
+ }
1191
+ return arr;
1192
+ };
1193
+
1194
+ /* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
1195
+ var isHTMLForm = kindOfTest('HTMLFormElement');
1196
+ var toCamelCase = function toCamelCase(str) {
1197
+ return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function replacer(m, p1, p2) {
1198
+ return p1.toUpperCase() + p2;
1199
+ });
1200
+ };
1201
+
1202
+ /* Creating a function that will check if an object has a property. */
1203
+ var hasOwnProperty = function (_ref4) {
1204
+ var hasOwnProperty = _ref4.hasOwnProperty;
1205
+ return function (obj, prop) {
1206
+ return hasOwnProperty.call(obj, prop);
1207
+ };
1208
+ }(Object.prototype);
1209
+
1210
+ /**
1211
+ * Determine if a value is a RegExp object
1212
+ *
1213
+ * @param {*} val The value to test
1214
+ *
1215
+ * @returns {boolean} True if value is a RegExp object, otherwise false
1216
+ */
1217
+ var isRegExp = kindOfTest('RegExp');
1218
+ var reduceDescriptors = function reduceDescriptors(obj, reducer) {
1219
+ var descriptors = Object.getOwnPropertyDescriptors(obj);
1220
+ var reducedDescriptors = {};
1221
+ forEach(descriptors, function (descriptor, name) {
1222
+ var ret;
1223
+ if ((ret = reducer(descriptor, name, obj)) !== false) {
1224
+ reducedDescriptors[name] = ret || descriptor;
1225
+ }
1226
+ });
1227
+ Object.defineProperties(obj, reducedDescriptors);
1228
+ };
1229
+
1230
+ /**
1231
+ * Makes all methods read-only
1232
+ * @param {Object} obj
1233
+ */
1234
+
1235
+ var freezeMethods = function freezeMethods(obj) {
1236
+ reduceDescriptors(obj, function (descriptor, name) {
1237
+ // skip restricted props in strict mode
1238
+ if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
1239
+ return false;
1240
+ }
1241
+ var value = obj[name];
1242
+ if (!isFunction(value)) return;
1243
+ descriptor.enumerable = false;
1244
+ if ('writable' in descriptor) {
1245
+ descriptor.writable = false;
1246
+ return;
1247
+ }
1248
+ if (!descriptor.set) {
1249
+ descriptor.set = function () {
1250
+ throw Error('Can not rewrite read-only method \'' + name + '\'');
1251
+ };
1252
+ }
1253
+ });
1254
+ };
1255
+ var toObjectSet = function toObjectSet(arrayOrString, delimiter) {
1256
+ var obj = {};
1257
+ var define = function define(arr) {
1258
+ arr.forEach(function (value) {
1259
+ obj[value] = true;
1260
+ });
1261
+ };
1262
+ isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
1263
+ return obj;
1264
+ };
1265
+ var noop = function noop() {};
1266
+ var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
1267
+ return value != null && Number.isFinite(value = +value) ? value : defaultValue;
1268
+ };
1269
+ var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
1270
+ var DIGIT = '0123456789';
1271
+ var ALPHABET = {
1272
+ DIGIT: DIGIT,
1273
+ ALPHA: ALPHA,
1274
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
1275
+ };
1276
+ var generateString = function generateString() {
1277
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
1278
+ var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
1279
+ var str = '';
1280
+ var length = alphabet.length;
1281
+ while (size--) {
1282
+ str += alphabet[Math.random() * length | 0];
1283
+ }
1284
+ return str;
1285
+ };
1286
+
1287
+ /**
1288
+ * If the thing is a FormData object, return true, otherwise return false.
1289
+ *
1290
+ * @param {unknown} thing - The thing to check.
1291
+ *
1292
+ * @returns {boolean}
1293
+ */
1294
+ function isSpecCompliantForm(thing) {
1295
+ return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
1296
+ }
1297
+ var toJSONObject = function toJSONObject(obj) {
1298
+ var stack = new Array(10);
1299
+ var visit = function visit(source, i) {
1300
+ if (isObject(source)) {
1301
+ if (stack.indexOf(source) >= 0) {
1302
+ return;
1303
+ }
1304
+ if (!('toJSON' in source)) {
1305
+ stack[i] = source;
1306
+ var target = isArray(source) ? [] : {};
1307
+ forEach(source, function (value, key) {
1308
+ var reducedValue = visit(value, i + 1);
1309
+ !isUndefined(reducedValue) && (target[key] = reducedValue);
1310
+ });
1311
+ stack[i] = undefined;
1312
+ return target;
1313
+ }
1314
+ }
1315
+ return source;
1316
+ };
1317
+ return visit(obj, 0);
1318
+ };
1319
+ var isAsyncFn = kindOfTest('AsyncFunction');
1320
+ var isThenable = function isThenable(thing) {
1321
+ return thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing["catch"]);
1322
+ };
1323
+ var utils$1 = {
1324
+ isArray: isArray,
1325
+ isArrayBuffer: isArrayBuffer,
1326
+ isBuffer: isBuffer,
1327
+ isFormData: isFormData,
1328
+ isArrayBufferView: isArrayBufferView,
1329
+ isString: isString,
1330
+ isNumber: isNumber,
1331
+ isBoolean: isBoolean,
1332
+ isObject: isObject,
1333
+ isPlainObject: isPlainObject,
1334
+ isReadableStream: isReadableStream,
1335
+ isRequest: isRequest,
1336
+ isResponse: isResponse,
1337
+ isHeaders: isHeaders,
1338
+ isUndefined: isUndefined,
1339
+ isDate: isDate,
1340
+ isFile: isFile,
1341
+ isBlob: isBlob,
1342
+ isRegExp: isRegExp,
1343
+ isFunction: isFunction,
1344
+ isStream: isStream,
1345
+ isURLSearchParams: isURLSearchParams,
1346
+ isTypedArray: isTypedArray,
1347
+ isFileList: isFileList,
1348
+ forEach: forEach,
1349
+ merge: merge,
1350
+ extend: extend,
1351
+ trim: trim,
1352
+ stripBOM: stripBOM,
1353
+ inherits: inherits,
1354
+ toFlatObject: toFlatObject,
1355
+ kindOf: kindOf,
1356
+ kindOfTest: kindOfTest,
1357
+ endsWith: endsWith,
1358
+ toArray: toArray,
1359
+ forEachEntry: forEachEntry,
1360
+ matchAll: matchAll,
1361
+ isHTMLForm: isHTMLForm,
1362
+ hasOwnProperty: hasOwnProperty,
1363
+ hasOwnProp: hasOwnProperty,
1364
+ // an alias to avoid ESLint no-prototype-builtins detection
1365
+ reduceDescriptors: reduceDescriptors,
1366
+ freezeMethods: freezeMethods,
1367
+ toObjectSet: toObjectSet,
1368
+ toCamelCase: toCamelCase,
1369
+ noop: noop,
1370
+ toFiniteNumber: toFiniteNumber,
1371
+ findKey: findKey,
1372
+ global: _global,
1373
+ isContextDefined: isContextDefined,
1374
+ ALPHABET: ALPHABET,
1375
+ generateString: generateString,
1376
+ isSpecCompliantForm: isSpecCompliantForm,
1377
+ toJSONObject: toJSONObject,
1378
+ isAsyncFn: isAsyncFn,
1379
+ isThenable: isThenable
1380
+ };
1381
+
1382
+ /**
1383
+ * Create an Error with the specified message, config, error code, request and response.
1384
+ *
1385
+ * @param {string} message The error message.
1386
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
1387
+ * @param {Object} [config] The config.
1388
+ * @param {Object} [request] The request.
1389
+ * @param {Object} [response] The response.
1390
+ *
1391
+ * @returns {Error} The created error.
1392
+ */
1393
+ function AxiosError(message, code, config, request, response) {
1394
+ Error.call(this);
1395
+ if (Error.captureStackTrace) {
1396
+ Error.captureStackTrace(this, this.constructor);
1397
+ } else {
1398
+ this.stack = new Error().stack;
1399
+ }
1400
+ this.message = message;
1401
+ this.name = 'AxiosError';
1402
+ code && (this.code = code);
1403
+ config && (this.config = config);
1404
+ request && (this.request = request);
1405
+ response && (this.response = response);
1406
+ }
1407
+ utils$1.inherits(AxiosError, Error, {
1408
+ toJSON: function toJSON() {
1409
+ return {
1410
+ // Standard
1411
+ message: this.message,
1412
+ name: this.name,
1413
+ // Microsoft
1414
+ description: this.description,
1415
+ number: this.number,
1416
+ // Mozilla
1417
+ fileName: this.fileName,
1418
+ lineNumber: this.lineNumber,
1419
+ columnNumber: this.columnNumber,
1420
+ stack: this.stack,
1421
+ // Axios
1422
+ config: utils$1.toJSONObject(this.config),
1423
+ code: this.code,
1424
+ status: this.response && this.response.status ? this.response.status : null
1425
+ };
1426
+ }
1427
+ });
1428
+ var prototype$1 = AxiosError.prototype;
1429
+ var descriptors = {};
1430
+ ['ERR_BAD_OPTION_VALUE', 'ERR_BAD_OPTION', 'ECONNABORTED', 'ETIMEDOUT', 'ERR_NETWORK', 'ERR_FR_TOO_MANY_REDIRECTS', 'ERR_DEPRECATED', 'ERR_BAD_RESPONSE', 'ERR_BAD_REQUEST', 'ERR_CANCELED', 'ERR_NOT_SUPPORT', 'ERR_INVALID_URL'
1431
+ // eslint-disable-next-line func-names
1432
+ ].forEach(function (code) {
1433
+ descriptors[code] = {
1434
+ value: code
1435
+ };
1436
+ });
1437
+ Object.defineProperties(AxiosError, descriptors);
1438
+ Object.defineProperty(prototype$1, 'isAxiosError', {
1439
+ value: true
1440
+ });
1441
+
1442
+ // eslint-disable-next-line func-names
1443
+ AxiosError.from = function (error, code, config, request, response, customProps) {
1444
+ var axiosError = Object.create(prototype$1);
1445
+ utils$1.toFlatObject(error, axiosError, function filter(obj) {
1446
+ return obj !== Error.prototype;
1447
+ }, function (prop) {
1448
+ return prop !== 'isAxiosError';
1449
+ });
1450
+ AxiosError.call(axiosError, error.message, code, config, request, response);
1451
+ axiosError.cause = error;
1452
+ axiosError.name = error.name;
1453
+ customProps && Object.assign(axiosError, customProps);
1454
+ return axiosError;
1455
+ };
1456
+
1457
+ // eslint-disable-next-line strict
1458
+ var httpAdapter = null;
1459
+
1460
+ /**
1461
+ * Determines if the given thing is a array or js object.
1462
+ *
1463
+ * @param {string} thing - The object or array to be visited.
1464
+ *
1465
+ * @returns {boolean}
1466
+ */
1467
+ function isVisitable(thing) {
1468
+ return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
1469
+ }
1470
+
1471
+ /**
1472
+ * It removes the brackets from the end of a string
1473
+ *
1474
+ * @param {string} key - The key of the parameter.
1475
+ *
1476
+ * @returns {string} the key without the brackets.
1477
+ */
1478
+ function removeBrackets(key) {
1479
+ return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
1480
+ }
1481
+
1482
+ /**
1483
+ * It takes a path, a key, and a boolean, and returns a string
1484
+ *
1485
+ * @param {string} path - The path to the current key.
1486
+ * @param {string} key - The key of the current object being iterated over.
1487
+ * @param {string} dots - If true, the key will be rendered with dots instead of brackets.
1488
+ *
1489
+ * @returns {string} The path to the current key.
1490
+ */
1491
+ function renderKey(path, key, dots) {
1492
+ if (!path) return key;
1493
+ return path.concat(key).map(function each(token, i) {
1494
+ // eslint-disable-next-line no-param-reassign
1495
+ token = removeBrackets(token);
1496
+ return !dots && i ? '[' + token + ']' : token;
1497
+ }).join(dots ? '.' : '');
1498
+ }
1499
+
1500
+ /**
1501
+ * If the array is an array and none of its elements are visitable, then it's a flat array.
1502
+ *
1503
+ * @param {Array<any>} arr - The array to check
1504
+ *
1505
+ * @returns {boolean}
1506
+ */
1507
+ function isFlatArray(arr) {
1508
+ return utils$1.isArray(arr) && !arr.some(isVisitable);
1509
+ }
1510
+ var predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
1511
+ return /^is[A-Z]/.test(prop);
1512
+ });
1513
+
1514
+ /**
1515
+ * Convert a data object to FormData
1516
+ *
1517
+ * @param {Object} obj
1518
+ * @param {?Object} [formData]
1519
+ * @param {?Object} [options]
1520
+ * @param {Function} [options.visitor]
1521
+ * @param {Boolean} [options.metaTokens = true]
1522
+ * @param {Boolean} [options.dots = false]
1523
+ * @param {?Boolean} [options.indexes = false]
1524
+ *
1525
+ * @returns {Object}
1526
+ **/
1527
+
1528
+ /**
1529
+ * It converts an object into a FormData object
1530
+ *
1531
+ * @param {Object<any, any>} obj - The object to convert to form data.
1532
+ * @param {string} formData - The FormData object to append to.
1533
+ * @param {Object<string, any>} options
1534
+ *
1535
+ * @returns
1536
+ */
1537
+ function toFormData(obj, formData, options) {
1538
+ if (!utils$1.isObject(obj)) {
1539
+ throw new TypeError('target must be an object');
1540
+ }
1541
+
1542
+ // eslint-disable-next-line no-param-reassign
1543
+ formData = formData || new (FormData)();
1544
+
1545
+ // eslint-disable-next-line no-param-reassign
1546
+ options = utils$1.toFlatObject(options, {
1547
+ metaTokens: true,
1548
+ dots: false,
1549
+ indexes: false
1550
+ }, false, function defined(option, source) {
1551
+ // eslint-disable-next-line no-eq-null,eqeqeq
1552
+ return !utils$1.isUndefined(source[option]);
1553
+ });
1554
+ var metaTokens = options.metaTokens;
1555
+ // eslint-disable-next-line no-use-before-define
1556
+ var visitor = options.visitor || defaultVisitor;
1557
+ var dots = options.dots;
1558
+ var indexes = options.indexes;
1559
+ var _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
1560
+ var useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
1561
+ if (!utils$1.isFunction(visitor)) {
1562
+ throw new TypeError('visitor must be a function');
1563
+ }
1564
+ function convertValue(value) {
1565
+ if (value === null) return '';
1566
+ if (utils$1.isDate(value)) {
1567
+ return value.toISOString();
1568
+ }
1569
+ if (!useBlob && utils$1.isBlob(value)) {
1570
+ throw new AxiosError('Blob is not supported. Use a Buffer instead.');
1571
+ }
1572
+ if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
1573
+ return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
1574
+ }
1575
+ return value;
1576
+ }
1577
+
1578
+ /**
1579
+ * Default visitor.
1580
+ *
1581
+ * @param {*} value
1582
+ * @param {String|Number} key
1583
+ * @param {Array<String|Number>} path
1584
+ * @this {FormData}
1585
+ *
1586
+ * @returns {boolean} return true to visit the each prop of the value recursively
1587
+ */
1588
+ function defaultVisitor(value, key, path) {
1589
+ var arr = value;
1590
+ if (value && !path && _typeof(value) === 'object') {
1591
+ if (utils$1.endsWith(key, '{}')) {
1592
+ // eslint-disable-next-line no-param-reassign
1593
+ key = metaTokens ? key : key.slice(0, -2);
1594
+ // eslint-disable-next-line no-param-reassign
1595
+ value = JSON.stringify(value);
1596
+ } else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))) {
1597
+ // eslint-disable-next-line no-param-reassign
1598
+ key = removeBrackets(key);
1599
+ arr.forEach(function each(el, index) {
1600
+ !(utils$1.isUndefined(el) || el === null) && formData.append(
1601
+ // eslint-disable-next-line no-nested-ternary
1602
+ indexes === true ? renderKey([key], index, dots) : indexes === null ? key : key + '[]', convertValue(el));
1603
+ });
1604
+ return false;
1605
+ }
1606
+ }
1607
+ if (isVisitable(value)) {
1608
+ return true;
1609
+ }
1610
+ formData.append(renderKey(path, key, dots), convertValue(value));
1611
+ return false;
1612
+ }
1613
+ var stack = [];
1614
+ var exposedHelpers = Object.assign(predicates, {
1615
+ defaultVisitor: defaultVisitor,
1616
+ convertValue: convertValue,
1617
+ isVisitable: isVisitable
1618
+ });
1619
+ function build(value, path) {
1620
+ if (utils$1.isUndefined(value)) return;
1621
+ if (stack.indexOf(value) !== -1) {
1622
+ throw Error('Circular reference detected in ' + path.join('.'));
1623
+ }
1624
+ stack.push(value);
1625
+ utils$1.forEach(value, function each(el, key) {
1626
+ var result = !(utils$1.isUndefined(el) || el === null) && visitor.call(formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers);
1627
+ if (result === true) {
1628
+ build(el, path ? path.concat(key) : [key]);
1629
+ }
1630
+ });
1631
+ stack.pop();
1632
+ }
1633
+ if (!utils$1.isObject(obj)) {
1634
+ throw new TypeError('data must be an object');
1635
+ }
1636
+ build(obj);
1637
+ return formData;
1638
+ }
1639
+
1640
+ /**
1641
+ * It encodes a string by replacing all characters that are not in the unreserved set with
1642
+ * their percent-encoded equivalents
1643
+ *
1644
+ * @param {string} str - The string to encode.
1645
+ *
1646
+ * @returns {string} The encoded string.
1647
+ */
1648
+ function encode$1(str) {
1649
+ var charMap = {
1650
+ '!': '%21',
1651
+ "'": '%27',
1652
+ '(': '%28',
1653
+ ')': '%29',
1654
+ '~': '%7E',
1655
+ '%20': '+',
1656
+ '%00': '\x00'
1657
+ };
1658
+ return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
1659
+ return charMap[match];
1660
+ });
1661
+ }
1662
+
1663
+ /**
1664
+ * It takes a params object and converts it to a FormData object
1665
+ *
1666
+ * @param {Object<string, any>} params - The parameters to be converted to a FormData object.
1667
+ * @param {Object<string, any>} options - The options object passed to the Axios constructor.
1668
+ *
1669
+ * @returns {void}
1670
+ */
1671
+ function AxiosURLSearchParams(params, options) {
1672
+ this._pairs = [];
1673
+ params && toFormData(params, this, options);
1674
+ }
1675
+ var prototype = AxiosURLSearchParams.prototype;
1676
+ prototype.append = function append(name, value) {
1677
+ this._pairs.push([name, value]);
1678
+ };
1679
+ prototype.toString = function toString(encoder) {
1680
+ var _encode = encoder ? function (value) {
1681
+ return encoder.call(this, value, encode$1);
1682
+ } : encode$1;
1683
+ return this._pairs.map(function each(pair) {
1684
+ return _encode(pair[0]) + '=' + _encode(pair[1]);
1685
+ }, '').join('&');
1686
+ };
1687
+
1688
+ /**
1689
+ * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
1690
+ * URI encoded counterparts
1691
+ *
1692
+ * @param {string} val The value to be encoded.
1693
+ *
1694
+ * @returns {string} The encoded value.
1695
+ */
1696
+ function encode(val) {
1697
+ return encodeURIComponent(val).replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');
1698
+ }
1699
+
1700
+ /**
1701
+ * Build a URL by appending params to the end
1702
+ *
1703
+ * @param {string} url The base of the url (e.g., http://www.google.com)
1704
+ * @param {object} [params] The params to be appended
1705
+ * @param {?object} options
1706
+ *
1707
+ * @returns {string} The formatted url
1708
+ */
1709
+ function buildURL(url, params, options) {
1710
+ /*eslint no-param-reassign:0*/
1711
+ if (!params) {
1712
+ return url;
1713
+ }
1714
+ var _encode = options && options.encode || encode;
1715
+ var serializeFn = options && options.serialize;
1716
+ var serializedParams;
1717
+ if (serializeFn) {
1718
+ serializedParams = serializeFn(params, options);
1719
+ } else {
1720
+ serializedParams = utils$1.isURLSearchParams(params) ? params.toString() : new AxiosURLSearchParams(params, options).toString(_encode);
1721
+ }
1722
+ if (serializedParams) {
1723
+ var hashmarkIndex = url.indexOf("#");
1724
+ if (hashmarkIndex !== -1) {
1725
+ url = url.slice(0, hashmarkIndex);
1726
+ }
1727
+ url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
1728
+ }
1729
+ return url;
1730
+ }
1731
+
1732
+ var InterceptorManager = /*#__PURE__*/function () {
1733
+ function InterceptorManager() {
1734
+ _classCallCheck(this, InterceptorManager);
1735
+ this.handlers = [];
1736
+ }
1737
+
1738
+ /**
1739
+ * Add a new interceptor to the stack
1740
+ *
1741
+ * @param {Function} fulfilled The function to handle `then` for a `Promise`
1742
+ * @param {Function} rejected The function to handle `reject` for a `Promise`
1743
+ *
1744
+ * @return {Number} An ID used to remove interceptor later
1745
+ */
1746
+ _createClass(InterceptorManager, [{
1747
+ key: "use",
1748
+ value: function use(fulfilled, rejected, options) {
1749
+ this.handlers.push({
1750
+ fulfilled: fulfilled,
1751
+ rejected: rejected,
1752
+ synchronous: options ? options.synchronous : false,
1753
+ runWhen: options ? options.runWhen : null
1754
+ });
1755
+ return this.handlers.length - 1;
1756
+ }
1757
+
1758
+ /**
1759
+ * Remove an interceptor from the stack
1760
+ *
1761
+ * @param {Number} id The ID that was returned by `use`
1762
+ *
1763
+ * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1764
+ */
1765
+ }, {
1766
+ key: "eject",
1767
+ value: function eject(id) {
1768
+ if (this.handlers[id]) {
1769
+ this.handlers[id] = null;
1770
+ }
1771
+ }
1772
+
1773
+ /**
1774
+ * Clear all interceptors from the stack
1775
+ *
1776
+ * @returns {void}
1777
+ */
1778
+ }, {
1779
+ key: "clear",
1780
+ value: function clear() {
1781
+ if (this.handlers) {
1782
+ this.handlers = [];
1783
+ }
1784
+ }
1785
+
1786
+ /**
1787
+ * Iterate over all the registered interceptors
1788
+ *
1789
+ * This method is particularly useful for skipping over any
1790
+ * interceptors that may have become `null` calling `eject`.
1791
+ *
1792
+ * @param {Function} fn The function to call for each interceptor
1793
+ *
1794
+ * @returns {void}
1795
+ */
1796
+ }, {
1797
+ key: "forEach",
1798
+ value: function forEach(fn) {
1799
+ utils$1.forEach(this.handlers, function forEachHandler(h) {
1800
+ if (h !== null) {
1801
+ fn(h);
1802
+ }
1803
+ });
1804
+ }
1805
+ }]);
1806
+ return InterceptorManager;
1807
+ }();
1808
+ var InterceptorManager$1 = InterceptorManager;
1809
+
1810
+ var transitionalDefaults = {
1811
+ silentJSONParsing: true,
1812
+ forcedJSONParsing: true,
1813
+ clarifyTimeoutError: false
1814
+ };
1815
+
1816
+ var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
1817
+
1818
+ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1819
+
1820
+ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1821
+
1822
+ var platform$1 = {
1823
+ isBrowser: true,
1824
+ classes: {
1825
+ URLSearchParams: URLSearchParams$1,
1826
+ FormData: FormData$1,
1827
+ Blob: Blob$1
1828
+ },
1829
+ protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
1830
+ };
1831
+
1832
+ var hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
1833
+
1834
+ /**
1835
+ * Determine if we're running in a standard browser environment
1836
+ *
1837
+ * This allows axios to run in a web worker, and react-native.
1838
+ * Both environments support XMLHttpRequest, but not fully standard globals.
1839
+ *
1840
+ * web workers:
1841
+ * typeof window -> undefined
1842
+ * typeof document -> undefined
1843
+ *
1844
+ * react-native:
1845
+ * navigator.product -> 'ReactNative'
1846
+ * nativescript
1847
+ * navigator.product -> 'NativeScript' or 'NS'
1848
+ *
1849
+ * @returns {boolean}
1850
+ */
1851
+ var hasStandardBrowserEnv = function (product) {
1852
+ return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0;
1853
+ }(typeof navigator !== 'undefined' && navigator.product);
1854
+
1855
+ /**
1856
+ * Determine if we're running in a standard browser webWorker environment
1857
+ *
1858
+ * Although the `isStandardBrowserEnv` method indicates that
1859
+ * `allows axios to run in a web worker`, the WebWorker will still be
1860
+ * filtered out due to its judgment standard
1861
+ * `typeof window !== 'undefined' && typeof document !== 'undefined'`.
1862
+ * This leads to a problem when axios post `FormData` in webWorker
1863
+ */
1864
+ var hasStandardBrowserWebWorkerEnv = function () {
1865
+ return typeof WorkerGlobalScope !== 'undefined' &&
1866
+ // eslint-disable-next-line no-undef
1867
+ self instanceof WorkerGlobalScope && typeof self.importScripts === 'function';
1868
+ }();
1869
+ var origin = hasBrowserEnv && window.location.href || 'http://localhost';
1870
+
1871
+ var utils = /*#__PURE__*/Object.freeze({
1872
+ __proto__: null,
1873
+ hasBrowserEnv: hasBrowserEnv,
1874
+ hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
1875
+ hasStandardBrowserEnv: hasStandardBrowserEnv,
1876
+ origin: origin
1877
+ });
1878
+
1879
+ var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
1880
+
1881
+ function toURLEncodedForm(data, options) {
1882
+ return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1883
+ visitor: function visitor(value, key, path, helpers) {
1884
+ if (platform.isNode && utils$1.isBuffer(value)) {
1885
+ this.append(key, value.toString('base64'));
1886
+ return false;
1887
+ }
1888
+ return helpers.defaultVisitor.apply(this, arguments);
1889
+ }
1890
+ }, options));
1891
+ }
1892
+
1893
+ /**
1894
+ * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
1895
+ *
1896
+ * @param {string} name - The name of the property to get.
1897
+ *
1898
+ * @returns An array of strings.
1899
+ */
1900
+ function parsePropPath(name) {
1901
+ // foo[x][y][z]
1902
+ // foo.x.y.z
1903
+ // foo-x-y-z
1904
+ // foo x y z
1905
+ return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(function (match) {
1906
+ return match[0] === '[]' ? '' : match[1] || match[0];
1907
+ });
1908
+ }
1909
+
1910
+ /**
1911
+ * Convert an array to an object.
1912
+ *
1913
+ * @param {Array<any>} arr - The array to convert to an object.
1914
+ *
1915
+ * @returns An object with the same keys and values as the array.
1916
+ */
1917
+ function arrayToObject(arr) {
1918
+ var obj = {};
1919
+ var keys = Object.keys(arr);
1920
+ var i;
1921
+ var len = keys.length;
1922
+ var key;
1923
+ for (i = 0; i < len; i++) {
1924
+ key = keys[i];
1925
+ obj[key] = arr[key];
1926
+ }
1927
+ return obj;
1928
+ }
1929
+
1930
+ /**
1931
+ * It takes a FormData object and returns a JavaScript object
1932
+ *
1933
+ * @param {string} formData The FormData object to convert to JSON.
1934
+ *
1935
+ * @returns {Object<string, any> | null} The converted object.
1936
+ */
1937
+ function formDataToJSON(formData) {
1938
+ function buildPath(path, value, target, index) {
1939
+ var name = path[index++];
1940
+ if (name === '__proto__') return true;
1941
+ var isNumericKey = Number.isFinite(+name);
1942
+ var isLast = index >= path.length;
1943
+ name = !name && utils$1.isArray(target) ? target.length : name;
1944
+ if (isLast) {
1945
+ if (utils$1.hasOwnProp(target, name)) {
1946
+ target[name] = [target[name], value];
1947
+ } else {
1948
+ target[name] = value;
1949
+ }
1950
+ return !isNumericKey;
1951
+ }
1952
+ if (!target[name] || !utils$1.isObject(target[name])) {
1953
+ target[name] = [];
1954
+ }
1955
+ var result = buildPath(path, value, target[name], index);
1956
+ if (result && utils$1.isArray(target[name])) {
1957
+ target[name] = arrayToObject(target[name]);
1958
+ }
1959
+ return !isNumericKey;
1960
+ }
1961
+ if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
1962
+ var obj = {};
1963
+ utils$1.forEachEntry(formData, function (name, value) {
1964
+ buildPath(parsePropPath(name), value, obj, 0);
1965
+ });
1966
+ return obj;
1967
+ }
1968
+ return null;
1969
+ }
1970
+
1971
+ /**
1972
+ * It takes a string, tries to parse it, and if it fails, it returns the stringified version
1973
+ * of the input
1974
+ *
1975
+ * @param {any} rawValue - The value to be stringified.
1976
+ * @param {Function} parser - A function that parses a string into a JavaScript object.
1977
+ * @param {Function} encoder - A function that takes a value and returns a string.
1978
+ *
1979
+ * @returns {string} A stringified version of the rawValue.
1980
+ */
1981
+ function stringifySafely(rawValue, parser, encoder) {
1982
+ if (utils$1.isString(rawValue)) {
1983
+ try {
1984
+ (parser || JSON.parse)(rawValue);
1985
+ return utils$1.trim(rawValue);
1986
+ } catch (e) {
1987
+ if (e.name !== 'SyntaxError') {
1988
+ throw e;
1989
+ }
1990
+ }
1991
+ }
1992
+ return (encoder || JSON.stringify)(rawValue);
1993
+ }
1994
+ var defaults = {
1995
+ transitional: transitionalDefaults,
1996
+ adapter: ['xhr', 'http', 'fetch'],
1997
+ transformRequest: [function transformRequest(data, headers) {
1998
+ var contentType = headers.getContentType() || '';
1999
+ var hasJSONContentType = contentType.indexOf('application/json') > -1;
2000
+ var isObjectPayload = utils$1.isObject(data);
2001
+ if (isObjectPayload && utils$1.isHTMLForm(data)) {
2002
+ data = new FormData(data);
2003
+ }
2004
+ var isFormData = utils$1.isFormData(data);
2005
+ if (isFormData) {
2006
+ return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
2007
+ }
2008
+ if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data) || utils$1.isReadableStream(data)) {
2009
+ return data;
2010
+ }
2011
+ if (utils$1.isArrayBufferView(data)) {
2012
+ return data.buffer;
2013
+ }
2014
+ if (utils$1.isURLSearchParams(data)) {
2015
+ headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
2016
+ return data.toString();
2017
+ }
2018
+ var isFileList;
2019
+ if (isObjectPayload) {
2020
+ if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
2021
+ return toURLEncodedForm(data, this.formSerializer).toString();
2022
+ }
2023
+ if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
2024
+ var _FormData = this.env && this.env.FormData;
2025
+ return toFormData(isFileList ? {
2026
+ 'files[]': data
2027
+ } : data, _FormData && new _FormData(), this.formSerializer);
2028
+ }
2029
+ }
2030
+ if (isObjectPayload || hasJSONContentType) {
2031
+ headers.setContentType('application/json', false);
2032
+ return stringifySafely(data);
2033
+ }
2034
+ return data;
2035
+ }],
2036
+ transformResponse: [function transformResponse(data) {
2037
+ var transitional = this.transitional || defaults.transitional;
2038
+ var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
2039
+ var JSONRequested = this.responseType === 'json';
2040
+ if (utils$1.isResponse(data) || utils$1.isReadableStream(data)) {
2041
+ return data;
2042
+ }
2043
+ if (data && utils$1.isString(data) && (forcedJSONParsing && !this.responseType || JSONRequested)) {
2044
+ var silentJSONParsing = transitional && transitional.silentJSONParsing;
2045
+ var strictJSONParsing = !silentJSONParsing && JSONRequested;
2046
+ try {
2047
+ return JSON.parse(data);
2048
+ } catch (e) {
2049
+ if (strictJSONParsing) {
2050
+ if (e.name === 'SyntaxError') {
2051
+ throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
2052
+ }
2053
+ throw e;
2054
+ }
2055
+ }
2056
+ }
2057
+ return data;
2058
+ }],
2059
+ /**
2060
+ * A timeout in milliseconds to abort a request. If set to 0 (default) a
2061
+ * timeout is not created.
2062
+ */
2063
+ timeout: 0,
2064
+ xsrfCookieName: 'XSRF-TOKEN',
2065
+ xsrfHeaderName: 'X-XSRF-TOKEN',
2066
+ maxContentLength: -1,
2067
+ maxBodyLength: -1,
2068
+ env: {
2069
+ FormData: platform.classes.FormData,
2070
+ Blob: platform.classes.Blob
2071
+ },
2072
+ validateStatus: function validateStatus(status) {
2073
+ return status >= 200 && status < 300;
2074
+ },
2075
+ headers: {
2076
+ common: {
2077
+ 'Accept': 'application/json, text/plain, */*',
2078
+ 'Content-Type': undefined
2079
+ }
2080
+ }
2081
+ };
2082
+ utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], function (method) {
2083
+ defaults.headers[method] = {};
2084
+ });
2085
+ var defaults$1 = defaults;
2086
+
2087
+ // RawAxiosHeaders whose duplicates are ignored by node
2088
+ // c.f. https://nodejs.org/api/http.html#http_message_headers
2089
+ var ignoreDuplicateOf = utils$1.toObjectSet(['age', 'authorization', 'content-length', 'content-type', 'etag', 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since', 'last-modified', 'location', 'max-forwards', 'proxy-authorization', 'referer', 'retry-after', 'user-agent']);
2090
+
2091
+ /**
2092
+ * Parse headers into an object
2093
+ *
2094
+ * ```
2095
+ * Date: Wed, 27 Aug 2014 08:58:49 GMT
2096
+ * Content-Type: application/json
2097
+ * Connection: keep-alive
2098
+ * Transfer-Encoding: chunked
2099
+ * ```
2100
+ *
2101
+ * @param {String} rawHeaders Headers needing to be parsed
2102
+ *
2103
+ * @returns {Object} Headers parsed into an object
2104
+ */
2105
+ var parseHeaders = (function (rawHeaders) {
2106
+ var parsed = {};
2107
+ var key;
2108
+ var val;
2109
+ var i;
2110
+ rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
2111
+ i = line.indexOf(':');
2112
+ key = line.substring(0, i).trim().toLowerCase();
2113
+ val = line.substring(i + 1).trim();
2114
+ if (!key || parsed[key] && ignoreDuplicateOf[key]) {
2115
+ return;
2116
+ }
2117
+ if (key === 'set-cookie') {
2118
+ if (parsed[key]) {
2119
+ parsed[key].push(val);
2120
+ } else {
2121
+ parsed[key] = [val];
2122
+ }
2123
+ } else {
2124
+ parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
2125
+ }
2126
+ });
2127
+ return parsed;
2128
+ });
2129
+
2130
+ var $internals = Symbol('internals');
2131
+ function normalizeHeader(header) {
2132
+ return header && String(header).trim().toLowerCase();
2133
+ }
2134
+ function normalizeValue(value) {
2135
+ if (value === false || value == null) {
2136
+ return value;
2137
+ }
2138
+ return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
2139
+ }
2140
+ function parseTokens(str) {
2141
+ var tokens = Object.create(null);
2142
+ var tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
2143
+ var match;
2144
+ while (match = tokensRE.exec(str)) {
2145
+ tokens[match[1]] = match[2];
2146
+ }
2147
+ return tokens;
2148
+ }
2149
+ var isValidHeaderName = function isValidHeaderName(str) {
2150
+ return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
2151
+ };
2152
+ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
2153
+ if (utils$1.isFunction(filter)) {
2154
+ return filter.call(this, value, header);
2155
+ }
2156
+ if (isHeaderNameFilter) {
2157
+ value = header;
2158
+ }
2159
+ if (!utils$1.isString(value)) return;
2160
+ if (utils$1.isString(filter)) {
2161
+ return value.indexOf(filter) !== -1;
2162
+ }
2163
+ if (utils$1.isRegExp(filter)) {
2164
+ return filter.test(value);
2165
+ }
2166
+ }
2167
+ function formatHeader(header) {
2168
+ return header.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (w, _char, str) {
2169
+ return _char.toUpperCase() + str;
2170
+ });
2171
+ }
2172
+ function buildAccessors(obj, header) {
2173
+ var accessorName = utils$1.toCamelCase(' ' + header);
2174
+ ['get', 'set', 'has'].forEach(function (methodName) {
2175
+ Object.defineProperty(obj, methodName + accessorName, {
2176
+ value: function value(arg1, arg2, arg3) {
2177
+ return this[methodName].call(this, header, arg1, arg2, arg3);
2178
+ },
2179
+ configurable: true
2180
+ });
2181
+ });
2182
+ }
2183
+ var AxiosHeaders = /*#__PURE__*/function (_Symbol$iterator, _Symbol$toStringTag) {
2184
+ function AxiosHeaders(headers) {
2185
+ _classCallCheck(this, AxiosHeaders);
2186
+ headers && this.set(headers);
2187
+ }
2188
+ _createClass(AxiosHeaders, [{
2189
+ key: "set",
2190
+ value: function set(header, valueOrRewrite, rewrite) {
2191
+ var self = this;
2192
+ function setHeader(_value, _header, _rewrite) {
2193
+ var lHeader = normalizeHeader(_header);
2194
+ if (!lHeader) {
2195
+ throw new Error('header name must be a non-empty string');
2196
+ }
2197
+ var key = utils$1.findKey(self, lHeader);
2198
+ if (!key || self[key] === undefined || _rewrite === true || _rewrite === undefined && self[key] !== false) {
2199
+ self[key || _header] = normalizeValue(_value);
2200
+ }
2201
+ }
2202
+ var setHeaders = function setHeaders(headers, _rewrite) {
2203
+ return utils$1.forEach(headers, function (_value, _header) {
2204
+ return setHeader(_value, _header, _rewrite);
2205
+ });
2206
+ };
2207
+ if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
2208
+ setHeaders(header, valueOrRewrite);
2209
+ } else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
2210
+ setHeaders(parseHeaders(header), valueOrRewrite);
2211
+ } else if (utils$1.isHeaders(header)) {
2212
+ var _iterator = _createForOfIteratorHelper(header.entries()),
2213
+ _step;
2214
+ try {
2215
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
2216
+ var _step$value = _slicedToArray(_step.value, 2),
2217
+ key = _step$value[0],
2218
+ value = _step$value[1];
2219
+ setHeader(value, key, rewrite);
2220
+ }
2221
+ } catch (err) {
2222
+ _iterator.e(err);
2223
+ } finally {
2224
+ _iterator.f();
2225
+ }
2226
+ } else {
2227
+ header != null && setHeader(valueOrRewrite, header, rewrite);
2228
+ }
2229
+ return this;
2230
+ }
2231
+ }, {
2232
+ key: "get",
2233
+ value: function get(header, parser) {
2234
+ header = normalizeHeader(header);
2235
+ if (header) {
2236
+ var key = utils$1.findKey(this, header);
2237
+ if (key) {
2238
+ var value = this[key];
2239
+ if (!parser) {
2240
+ return value;
2241
+ }
2242
+ if (parser === true) {
2243
+ return parseTokens(value);
2244
+ }
2245
+ if (utils$1.isFunction(parser)) {
2246
+ return parser.call(this, value, key);
2247
+ }
2248
+ if (utils$1.isRegExp(parser)) {
2249
+ return parser.exec(value);
2250
+ }
2251
+ throw new TypeError('parser must be boolean|regexp|function');
2252
+ }
2253
+ }
2254
+ }
2255
+ }, {
2256
+ key: "has",
2257
+ value: function has(header, matcher) {
2258
+ header = normalizeHeader(header);
2259
+ if (header) {
2260
+ var key = utils$1.findKey(this, header);
2261
+ return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
2262
+ }
2263
+ return false;
2264
+ }
2265
+ }, {
2266
+ key: "delete",
2267
+ value: function _delete(header, matcher) {
2268
+ var self = this;
2269
+ var deleted = false;
2270
+ function deleteHeader(_header) {
2271
+ _header = normalizeHeader(_header);
2272
+ if (_header) {
2273
+ var key = utils$1.findKey(self, _header);
2274
+ if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
2275
+ delete self[key];
2276
+ deleted = true;
2277
+ }
2278
+ }
2279
+ }
2280
+ if (utils$1.isArray(header)) {
2281
+ header.forEach(deleteHeader);
2282
+ } else {
2283
+ deleteHeader(header);
2284
+ }
2285
+ return deleted;
2286
+ }
2287
+ }, {
2288
+ key: "clear",
2289
+ value: function clear(matcher) {
2290
+ var keys = Object.keys(this);
2291
+ var i = keys.length;
2292
+ var deleted = false;
2293
+ while (i--) {
2294
+ var key = keys[i];
2295
+ if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
2296
+ delete this[key];
2297
+ deleted = true;
2298
+ }
2299
+ }
2300
+ return deleted;
2301
+ }
2302
+ }, {
2303
+ key: "normalize",
2304
+ value: function normalize(format) {
2305
+ var self = this;
2306
+ var headers = {};
2307
+ utils$1.forEach(this, function (value, header) {
2308
+ var key = utils$1.findKey(headers, header);
2309
+ if (key) {
2310
+ self[key] = normalizeValue(value);
2311
+ delete self[header];
2312
+ return;
2313
+ }
2314
+ var normalized = format ? formatHeader(header) : String(header).trim();
2315
+ if (normalized !== header) {
2316
+ delete self[header];
2317
+ }
2318
+ self[normalized] = normalizeValue(value);
2319
+ headers[normalized] = true;
2320
+ });
2321
+ return this;
2322
+ }
2323
+ }, {
2324
+ key: "concat",
2325
+ value: function concat() {
2326
+ var _this$constructor;
2327
+ for (var _len = arguments.length, targets = new Array(_len), _key = 0; _key < _len; _key++) {
2328
+ targets[_key] = arguments[_key];
2329
+ }
2330
+ return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(targets));
2331
+ }
2332
+ }, {
2333
+ key: "toJSON",
2334
+ value: function toJSON(asStrings) {
2335
+ var obj = Object.create(null);
2336
+ utils$1.forEach(this, function (value, header) {
2337
+ value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
2338
+ });
2339
+ return obj;
2340
+ }
2341
+ }, {
2342
+ key: _Symbol$iterator,
2343
+ value: function value() {
2344
+ return Object.entries(this.toJSON())[Symbol.iterator]();
2345
+ }
2346
+ }, {
2347
+ key: "toString",
2348
+ value: function toString() {
2349
+ return Object.entries(this.toJSON()).map(function (_ref) {
2350
+ var _ref2 = _slicedToArray(_ref, 2),
2351
+ header = _ref2[0],
2352
+ value = _ref2[1];
2353
+ return header + ': ' + value;
2354
+ }).join('\n');
2355
+ }
2356
+ }, {
2357
+ key: _Symbol$toStringTag,
2358
+ get: function get() {
2359
+ return 'AxiosHeaders';
2360
+ }
2361
+ }], [{
2362
+ key: "from",
2363
+ value: function from(thing) {
2364
+ return thing instanceof this ? thing : new this(thing);
2365
+ }
2366
+ }, {
2367
+ key: "concat",
2368
+ value: function concat(first) {
2369
+ var computed = new this(first);
2370
+ for (var _len2 = arguments.length, targets = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2371
+ targets[_key2 - 1] = arguments[_key2];
2372
+ }
2373
+ targets.forEach(function (target) {
2374
+ return computed.set(target);
2375
+ });
2376
+ return computed;
2377
+ }
2378
+ }, {
2379
+ key: "accessor",
2380
+ value: function accessor(header) {
2381
+ var internals = this[$internals] = this[$internals] = {
2382
+ accessors: {}
2383
+ };
2384
+ var accessors = internals.accessors;
2385
+ var prototype = this.prototype;
2386
+ function defineAccessor(_header) {
2387
+ var lHeader = normalizeHeader(_header);
2388
+ if (!accessors[lHeader]) {
2389
+ buildAccessors(prototype, _header);
2390
+ accessors[lHeader] = true;
2391
+ }
2392
+ }
2393
+ utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
2394
+ return this;
2395
+ }
2396
+ }]);
2397
+ return AxiosHeaders;
2398
+ }(Symbol.iterator, Symbol.toStringTag);
2399
+ AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
2400
+
2401
+ // reserved names hotfix
2402
+ utils$1.reduceDescriptors(AxiosHeaders.prototype, function (_ref3, key) {
2403
+ var value = _ref3.value;
2404
+ var mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
2405
+ return {
2406
+ get: function get() {
2407
+ return value;
2408
+ },
2409
+ set: function set(headerValue) {
2410
+ this[mapped] = headerValue;
2411
+ }
2412
+ };
2413
+ });
2414
+ utils$1.freezeMethods(AxiosHeaders);
2415
+ var AxiosHeaders$1 = AxiosHeaders;
2416
+
2417
+ /**
2418
+ * Transform the data for a request or a response
2419
+ *
2420
+ * @param {Array|Function} fns A single function or Array of functions
2421
+ * @param {?Object} response The response object
2422
+ *
2423
+ * @returns {*} The resulting transformed data
2424
+ */
2425
+ function transformData(fns, response) {
2426
+ var config = this || defaults$1;
2427
+ var context = response || config;
2428
+ var headers = AxiosHeaders$1.from(context.headers);
2429
+ var data = context.data;
2430
+ utils$1.forEach(fns, function transform(fn) {
2431
+ data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
2432
+ });
2433
+ headers.normalize();
2434
+ return data;
2435
+ }
2436
+
2437
+ function isCancel(value) {
2438
+ return !!(value && value.__CANCEL__);
2439
+ }
2440
+
2441
+ /**
2442
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
2443
+ *
2444
+ * @param {string=} message The message.
2445
+ * @param {Object=} config The config.
2446
+ * @param {Object=} request The request.
2447
+ *
2448
+ * @returns {CanceledError} The created error.
2449
+ */
2450
+ function CanceledError(message, config, request) {
2451
+ // eslint-disable-next-line no-eq-null,eqeqeq
2452
+ AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
2453
+ this.name = 'CanceledError';
2454
+ }
2455
+ utils$1.inherits(CanceledError, AxiosError, {
2456
+ __CANCEL__: true
2457
+ });
2458
+
2459
+ /**
2460
+ * Resolve or reject a Promise based on response status.
2461
+ *
2462
+ * @param {Function} resolve A function that resolves the promise.
2463
+ * @param {Function} reject A function that rejects the promise.
2464
+ * @param {object} response The response.
2465
+ *
2466
+ * @returns {object} The response.
2467
+ */
2468
+ function settle(resolve, reject, response) {
2469
+ var validateStatus = response.config.validateStatus;
2470
+ if (!response.status || !validateStatus || validateStatus(response.status)) {
2471
+ resolve(response);
2472
+ } else {
2473
+ reject(new AxiosError('Request failed with status code ' + response.status, [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4], response.config, response.request, response));
2474
+ }
2475
+ }
2476
+
2477
+ function parseProtocol(url) {
2478
+ var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
2479
+ return match && match[1] || '';
2480
+ }
2481
+
2482
+ /**
2483
+ * Calculate data maxRate
2484
+ * @param {Number} [samplesCount= 10]
2485
+ * @param {Number} [min= 1000]
2486
+ * @returns {Function}
2487
+ */
2488
+ function speedometer(samplesCount, min) {
2489
+ samplesCount = samplesCount || 10;
2490
+ var bytes = new Array(samplesCount);
2491
+ var timestamps = new Array(samplesCount);
2492
+ var head = 0;
2493
+ var tail = 0;
2494
+ var firstSampleTS;
2495
+ min = min !== undefined ? min : 1000;
2496
+ return function push(chunkLength) {
2497
+ var now = Date.now();
2498
+ var startedAt = timestamps[tail];
2499
+ if (!firstSampleTS) {
2500
+ firstSampleTS = now;
2501
+ }
2502
+ bytes[head] = chunkLength;
2503
+ timestamps[head] = now;
2504
+ var i = tail;
2505
+ var bytesCount = 0;
2506
+ while (i !== head) {
2507
+ bytesCount += bytes[i++];
2508
+ i = i % samplesCount;
2509
+ }
2510
+ head = (head + 1) % samplesCount;
2511
+ if (head === tail) {
2512
+ tail = (tail + 1) % samplesCount;
2513
+ }
2514
+ if (now - firstSampleTS < min) {
2515
+ return;
2516
+ }
2517
+ var passed = startedAt && now - startedAt;
2518
+ return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
2519
+ };
2520
+ }
2521
+
2522
+ /**
2523
+ * Throttle decorator
2524
+ * @param {Function} fn
2525
+ * @param {Number} freq
2526
+ * @return {Function}
2527
+ */
2528
+ function throttle(fn, freq) {
2529
+ var timestamp = 0;
2530
+ var threshold = 1000 / freq;
2531
+ var timer = null;
2532
+ return function throttled() {
2533
+ var _arguments = arguments;
2534
+ var force = this === true;
2535
+ var now = Date.now();
2536
+ if (force || now - timestamp > threshold) {
2537
+ if (timer) {
2538
+ clearTimeout(timer);
2539
+ timer = null;
2540
+ }
2541
+ timestamp = now;
2542
+ return fn.apply(null, arguments);
2543
+ }
2544
+ if (!timer) {
2545
+ timer = setTimeout(function () {
2546
+ timer = null;
2547
+ timestamp = Date.now();
2548
+ return fn.apply(null, _arguments);
2549
+ }, threshold - (now - timestamp));
2550
+ }
2551
+ };
2552
+ }
2553
+
2554
+ var progressEventReducer = (function (listener, isDownloadStream) {
2555
+ var freq = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
2556
+ var bytesNotified = 0;
2557
+ var _speedometer = speedometer(50, 250);
2558
+ return throttle(function (e) {
2559
+ var loaded = e.loaded;
2560
+ var total = e.lengthComputable ? e.total : undefined;
2561
+ var progressBytes = loaded - bytesNotified;
2562
+ var rate = _speedometer(progressBytes);
2563
+ var inRange = loaded <= total;
2564
+ bytesNotified = loaded;
2565
+ var data = {
2566
+ loaded: loaded,
2567
+ total: total,
2568
+ progress: total ? loaded / total : undefined,
2569
+ bytes: progressBytes,
2570
+ rate: rate ? rate : undefined,
2571
+ estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
2572
+ event: e,
2573
+ lengthComputable: total != null
2574
+ };
2575
+ data[isDownloadStream ? 'download' : 'upload'] = true;
2576
+ listener(data);
2577
+ }, freq);
2578
+ });
2579
+
2580
+ var isURLSameOrigin = platform.hasStandardBrowserEnv ?
2581
+ // Standard browser envs have full support of the APIs needed to test
2582
+ // whether the request URL is of the same origin as current location.
2583
+ function standardBrowserEnv() {
2584
+ var msie = /(msie|trident)/i.test(navigator.userAgent);
2585
+ var urlParsingNode = document.createElement('a');
2586
+ var originURL;
2587
+
2588
+ /**
2589
+ * Parse a URL to discover its components
2590
+ *
2591
+ * @param {String} url The URL to be parsed
2592
+ * @returns {Object}
2593
+ */
2594
+ function resolveURL(url) {
2595
+ var href = url;
2596
+ if (msie) {
2597
+ // IE needs attribute set twice to normalize properties
2598
+ urlParsingNode.setAttribute('href', href);
2599
+ href = urlParsingNode.href;
2600
+ }
2601
+ urlParsingNode.setAttribute('href', href);
2602
+
2603
+ // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
2604
+ return {
2605
+ href: urlParsingNode.href,
2606
+ protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
2607
+ host: urlParsingNode.host,
2608
+ search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
2609
+ hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
2610
+ hostname: urlParsingNode.hostname,
2611
+ port: urlParsingNode.port,
2612
+ pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname
2613
+ };
2614
+ }
2615
+ originURL = resolveURL(window.location.href);
2616
+
2617
+ /**
2618
+ * Determine if a URL shares the same origin as the current location
2619
+ *
2620
+ * @param {String} requestURL The URL to test
2621
+ * @returns {boolean} True if URL shares the same origin, otherwise false
2622
+ */
2623
+ return function isURLSameOrigin(requestURL) {
2624
+ var parsed = utils$1.isString(requestURL) ? resolveURL(requestURL) : requestURL;
2625
+ return parsed.protocol === originURL.protocol && parsed.host === originURL.host;
2626
+ };
2627
+ }() :
2628
+ // Non standard browser envs (web workers, react-native) lack needed support.
2629
+ function nonStandardBrowserEnv() {
2630
+ return function isURLSameOrigin() {
2631
+ return true;
2632
+ };
2633
+ }();
2634
+
2635
+ var cookies = platform.hasStandardBrowserEnv ?
2636
+ // Standard browser envs support document.cookie
2637
+ {
2638
+ write: function write(name, value, expires, path, domain, secure) {
2639
+ var cookie = [name + '=' + encodeURIComponent(value)];
2640
+ utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
2641
+ utils$1.isString(path) && cookie.push('path=' + path);
2642
+ utils$1.isString(domain) && cookie.push('domain=' + domain);
2643
+ secure === true && cookie.push('secure');
2644
+ document.cookie = cookie.join('; ');
2645
+ },
2646
+ read: function read(name) {
2647
+ var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2648
+ return match ? decodeURIComponent(match[3]) : null;
2649
+ },
2650
+ remove: function remove(name) {
2651
+ this.write(name, '', Date.now() - 86400000);
2652
+ }
2653
+ } :
2654
+ // Non-standard browser env (web workers, react-native) lack needed support.
2655
+ {
2656
+ write: function write() {},
2657
+ read: function read() {
2658
+ return null;
2659
+ },
2660
+ remove: function remove() {}
2661
+ };
2662
+
2663
+ /**
2664
+ * Determines whether the specified URL is absolute
2665
+ *
2666
+ * @param {string} url The URL to test
2667
+ *
2668
+ * @returns {boolean} True if the specified URL is absolute, otherwise false
2669
+ */
2670
+ function isAbsoluteURL(url) {
2671
+ // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
2672
+ // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
2673
+ // by any combination of letters, digits, plus, period, or hyphen.
2674
+ return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
2675
+ }
2676
+
2677
+ /**
2678
+ * Creates a new URL by combining the specified URLs
2679
+ *
2680
+ * @param {string} baseURL The base URL
2681
+ * @param {string} relativeURL The relative URL
2682
+ *
2683
+ * @returns {string} The combined URL
2684
+ */
2685
+ function combineURLs(baseURL, relativeURL) {
2686
+ return relativeURL ? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '') : baseURL;
2687
+ }
2688
+
2689
+ /**
2690
+ * Creates a new URL by combining the baseURL with the requestedURL,
2691
+ * only when the requestedURL is not already an absolute URL.
2692
+ * If the requestURL is absolute, this function returns the requestedURL untouched.
2693
+ *
2694
+ * @param {string} baseURL The base URL
2695
+ * @param {string} requestedURL Absolute or relative URL to combine
2696
+ *
2697
+ * @returns {string} The combined full path
2698
+ */
2699
+ function buildFullPath(baseURL, requestedURL) {
2700
+ if (baseURL && !isAbsoluteURL(requestedURL)) {
2701
+ return combineURLs(baseURL, requestedURL);
2702
+ }
2703
+ return requestedURL;
2704
+ }
2705
+
2706
+ var headersToObject = function headersToObject(thing) {
2707
+ return thing instanceof AxiosHeaders$1 ? _objectSpread2({}, thing) : thing;
2708
+ };
2709
+
2710
+ /**
2711
+ * Config-specific merge-function which creates a new config-object
2712
+ * by merging two configuration objects together.
2713
+ *
2714
+ * @param {Object} config1
2715
+ * @param {Object} config2
2716
+ *
2717
+ * @returns {Object} New object resulting from merging config2 to config1
2718
+ */
2719
+ function mergeConfig(config1, config2) {
2720
+ // eslint-disable-next-line no-param-reassign
2721
+ config2 = config2 || {};
2722
+ var config = {};
2723
+ function getMergedValue(target, source, caseless) {
2724
+ if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2725
+ return utils$1.merge.call({
2726
+ caseless: caseless
2727
+ }, target, source);
2728
+ } else if (utils$1.isPlainObject(source)) {
2729
+ return utils$1.merge({}, source);
2730
+ } else if (utils$1.isArray(source)) {
2731
+ return source.slice();
2732
+ }
2733
+ return source;
2734
+ }
2735
+
2736
+ // eslint-disable-next-line consistent-return
2737
+ function mergeDeepProperties(a, b, caseless) {
2738
+ if (!utils$1.isUndefined(b)) {
2739
+ return getMergedValue(a, b, caseless);
2740
+ } else if (!utils$1.isUndefined(a)) {
2741
+ return getMergedValue(undefined, a, caseless);
2742
+ }
2743
+ }
2744
+
2745
+ // eslint-disable-next-line consistent-return
2746
+ function valueFromConfig2(a, b) {
2747
+ if (!utils$1.isUndefined(b)) {
2748
+ return getMergedValue(undefined, b);
2749
+ }
2750
+ }
2751
+
2752
+ // eslint-disable-next-line consistent-return
2753
+ function defaultToConfig2(a, b) {
2754
+ if (!utils$1.isUndefined(b)) {
2755
+ return getMergedValue(undefined, b);
2756
+ } else if (!utils$1.isUndefined(a)) {
2757
+ return getMergedValue(undefined, a);
2758
+ }
2759
+ }
2760
+
2761
+ // eslint-disable-next-line consistent-return
2762
+ function mergeDirectKeys(a, b, prop) {
2763
+ if (prop in config2) {
2764
+ return getMergedValue(a, b);
2765
+ } else if (prop in config1) {
2766
+ return getMergedValue(undefined, a);
2767
+ }
2768
+ }
2769
+ var mergeMap = {
2770
+ url: valueFromConfig2,
2771
+ method: valueFromConfig2,
2772
+ data: valueFromConfig2,
2773
+ baseURL: defaultToConfig2,
2774
+ transformRequest: defaultToConfig2,
2775
+ transformResponse: defaultToConfig2,
2776
+ paramsSerializer: defaultToConfig2,
2777
+ timeout: defaultToConfig2,
2778
+ timeoutMessage: defaultToConfig2,
2779
+ withCredentials: defaultToConfig2,
2780
+ withXSRFToken: defaultToConfig2,
2781
+ adapter: defaultToConfig2,
2782
+ responseType: defaultToConfig2,
2783
+ xsrfCookieName: defaultToConfig2,
2784
+ xsrfHeaderName: defaultToConfig2,
2785
+ onUploadProgress: defaultToConfig2,
2786
+ onDownloadProgress: defaultToConfig2,
2787
+ decompress: defaultToConfig2,
2788
+ maxContentLength: defaultToConfig2,
2789
+ maxBodyLength: defaultToConfig2,
2790
+ beforeRedirect: defaultToConfig2,
2791
+ transport: defaultToConfig2,
2792
+ httpAgent: defaultToConfig2,
2793
+ httpsAgent: defaultToConfig2,
2794
+ cancelToken: defaultToConfig2,
2795
+ socketPath: defaultToConfig2,
2796
+ responseEncoding: defaultToConfig2,
2797
+ validateStatus: mergeDirectKeys,
2798
+ headers: function headers(a, b) {
2799
+ return mergeDeepProperties(headersToObject(a), headersToObject(b), true);
2800
+ }
2801
+ };
2802
+ utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2803
+ var merge = mergeMap[prop] || mergeDeepProperties;
2804
+ var configValue = merge(config1[prop], config2[prop], prop);
2805
+ utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
2806
+ });
2807
+ return config;
2808
+ }
2809
+
2810
+ var resolveConfig = (function (config) {
2811
+ var newConfig = mergeConfig({}, config);
2812
+ var data = newConfig.data,
2813
+ withXSRFToken = newConfig.withXSRFToken,
2814
+ xsrfHeaderName = newConfig.xsrfHeaderName,
2815
+ xsrfCookieName = newConfig.xsrfCookieName,
2816
+ headers = newConfig.headers,
2817
+ auth = newConfig.auth;
2818
+ newConfig.headers = headers = AxiosHeaders$1.from(headers);
2819
+ newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
2820
+
2821
+ // HTTP basic authentication
2822
+ if (auth) {
2823
+ headers.set('Authorization', 'Basic ' + btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : '')));
2824
+ }
2825
+ var contentType;
2826
+ if (utils$1.isFormData(data)) {
2827
+ if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2828
+ headers.setContentType(undefined); // Let the browser set it
2829
+ } else if ((contentType = headers.getContentType()) !== false) {
2830
+ // fix semicolon duplication issue for ReactNative FormData implementation
2831
+ var _ref = contentType ? contentType.split(';').map(function (token) {
2832
+ return token.trim();
2833
+ }).filter(Boolean) : [],
2834
+ _ref2 = _toArray(_ref),
2835
+ type = _ref2[0],
2836
+ tokens = _ref2.slice(1);
2837
+ headers.setContentType([type || 'multipart/form-data'].concat(_toConsumableArray(tokens)).join('; '));
2838
+ }
2839
+ }
2840
+
2841
+ // Add xsrf header
2842
+ // This is only done if running in a standard browser environment.
2843
+ // Specifically not if we're in a web worker, or react-native.
2844
+
2845
+ if (platform.hasStandardBrowserEnv) {
2846
+ withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));
2847
+ if (withXSRFToken || withXSRFToken !== false && isURLSameOrigin(newConfig.url)) {
2848
+ // Add xsrf header
2849
+ var xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);
2850
+ if (xsrfValue) {
2851
+ headers.set(xsrfHeaderName, xsrfValue);
2852
+ }
2853
+ }
2854
+ }
2855
+ return newConfig;
2856
+ });
2857
+
2858
+ var isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
2859
+ var xhrAdapter = isXHRAdapterSupported && function (config) {
2860
+ return new Promise(function dispatchXhrRequest(resolve, reject) {
2861
+ var _config = resolveConfig(config);
2862
+ var requestData = _config.data;
2863
+ var requestHeaders = AxiosHeaders$1.from(_config.headers).normalize();
2864
+ var responseType = _config.responseType;
2865
+ var onCanceled;
2866
+ function done() {
2867
+ if (_config.cancelToken) {
2868
+ _config.cancelToken.unsubscribe(onCanceled);
2869
+ }
2870
+ if (_config.signal) {
2871
+ _config.signal.removeEventListener('abort', onCanceled);
2872
+ }
2873
+ }
2874
+ var request = new XMLHttpRequest();
2875
+ request.open(_config.method.toUpperCase(), _config.url, true);
2876
+
2877
+ // Set the request timeout in MS
2878
+ request.timeout = _config.timeout;
2879
+ function onloadend() {
2880
+ if (!request) {
2881
+ return;
2882
+ }
2883
+ // Prepare the response
2884
+ var responseHeaders = AxiosHeaders$1.from('getAllResponseHeaders' in request && request.getAllResponseHeaders());
2885
+ var responseData = !responseType || responseType === 'text' || responseType === 'json' ? request.responseText : request.response;
2886
+ var response = {
2887
+ data: responseData,
2888
+ status: request.status,
2889
+ statusText: request.statusText,
2890
+ headers: responseHeaders,
2891
+ config: config,
2892
+ request: request
2893
+ };
2894
+ settle(function _resolve(value) {
2895
+ resolve(value);
2896
+ done();
2897
+ }, function _reject(err) {
2898
+ reject(err);
2899
+ done();
2900
+ }, response);
2901
+
2902
+ // Clean up request
2903
+ request = null;
2904
+ }
2905
+ if ('onloadend' in request) {
2906
+ // Use onloadend if available
2907
+ request.onloadend = onloadend;
2908
+ } else {
2909
+ // Listen for ready state to emulate onloadend
2910
+ request.onreadystatechange = function handleLoad() {
2911
+ if (!request || request.readyState !== 4) {
2912
+ return;
2913
+ }
2914
+
2915
+ // The request errored out and we didn't get a response, this will be
2916
+ // handled by onerror instead
2917
+ // With one exception: request that using file: protocol, most browsers
2918
+ // will return status as 0 even though it's a successful request
2919
+ if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
2920
+ return;
2921
+ }
2922
+ // readystate handler is calling before onerror or ontimeout handlers,
2923
+ // so we should call onloadend on the next 'tick'
2924
+ setTimeout(onloadend);
2925
+ };
2926
+ }
2927
+
2928
+ // Handle browser request cancellation (as opposed to a manual cancellation)
2929
+ request.onabort = function handleAbort() {
2930
+ if (!request) {
2931
+ return;
2932
+ }
2933
+ reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, _config, request));
2934
+
2935
+ // Clean up request
2936
+ request = null;
2937
+ };
2938
+
2939
+ // Handle low level network errors
2940
+ request.onerror = function handleError() {
2941
+ // Real errors are hidden from us by the browser
2942
+ // onerror should only fire if it's a network error
2943
+ reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, _config, request));
2944
+
2945
+ // Clean up request
2946
+ request = null;
2947
+ };
2948
+
2949
+ // Handle timeout
2950
+ request.ontimeout = function handleTimeout() {
2951
+ var timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
2952
+ var transitional = _config.transitional || transitionalDefaults;
2953
+ if (_config.timeoutErrorMessage) {
2954
+ timeoutErrorMessage = _config.timeoutErrorMessage;
2955
+ }
2956
+ reject(new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, _config, request));
2957
+
2958
+ // Clean up request
2959
+ request = null;
2960
+ };
2961
+
2962
+ // Remove Content-Type if data is undefined
2963
+ requestData === undefined && requestHeaders.setContentType(null);
2964
+
2965
+ // Add headers to the request
2966
+ if ('setRequestHeader' in request) {
2967
+ utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
2968
+ request.setRequestHeader(key, val);
2969
+ });
2970
+ }
2971
+
2972
+ // Add withCredentials to request if needed
2973
+ if (!utils$1.isUndefined(_config.withCredentials)) {
2974
+ request.withCredentials = !!_config.withCredentials;
2975
+ }
2976
+
2977
+ // Add responseType to request if needed
2978
+ if (responseType && responseType !== 'json') {
2979
+ request.responseType = _config.responseType;
2980
+ }
2981
+
2982
+ // Handle progress if needed
2983
+ if (typeof _config.onDownloadProgress === 'function') {
2984
+ request.addEventListener('progress', progressEventReducer(_config.onDownloadProgress, true));
2985
+ }
2986
+
2987
+ // Not all browsers support upload events
2988
+ if (typeof _config.onUploadProgress === 'function' && request.upload) {
2989
+ request.upload.addEventListener('progress', progressEventReducer(_config.onUploadProgress));
2990
+ }
2991
+ if (_config.cancelToken || _config.signal) {
2992
+ // Handle cancellation
2993
+ // eslint-disable-next-line func-names
2994
+ onCanceled = function onCanceled(cancel) {
2995
+ if (!request) {
2996
+ return;
2997
+ }
2998
+ reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
2999
+ request.abort();
3000
+ request = null;
3001
+ };
3002
+ _config.cancelToken && _config.cancelToken.subscribe(onCanceled);
3003
+ if (_config.signal) {
3004
+ _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);
3005
+ }
3006
+ }
3007
+ var protocol = parseProtocol(_config.url);
3008
+ if (protocol && platform.protocols.indexOf(protocol) === -1) {
3009
+ reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
3010
+ return;
3011
+ }
3012
+
3013
+ // Send the request
3014
+ request.send(requestData || null);
3015
+ });
3016
+ };
3017
+
3018
+ var composeSignals = function composeSignals(signals, timeout) {
3019
+ var controller = new AbortController();
3020
+ var aborted;
3021
+ var onabort = function onabort(cancel) {
3022
+ if (!aborted) {
3023
+ aborted = true;
3024
+ unsubscribe();
3025
+ var err = cancel instanceof Error ? cancel : this.reason;
3026
+ controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
3027
+ }
3028
+ };
3029
+ var timer = timeout && setTimeout(function () {
3030
+ onabort(new AxiosError("timeout ".concat(timeout, " of ms exceeded"), AxiosError.ETIMEDOUT));
3031
+ }, timeout);
3032
+ var unsubscribe = function unsubscribe() {
3033
+ if (signals) {
3034
+ timer && clearTimeout(timer);
3035
+ timer = null;
3036
+ signals.forEach(function (signal) {
3037
+ signal && (signal.removeEventListener ? signal.removeEventListener('abort', onabort) : signal.unsubscribe(onabort));
3038
+ });
3039
+ signals = null;
3040
+ }
3041
+ };
3042
+ signals.forEach(function (signal) {
3043
+ return signal && signal.addEventListener && signal.addEventListener('abort', onabort);
3044
+ });
3045
+ var signal = controller.signal;
3046
+ signal.unsubscribe = unsubscribe;
3047
+ return [signal, function () {
3048
+ timer && clearTimeout(timer);
3049
+ timer = null;
3050
+ }];
3051
+ };
3052
+ var composeSignals$1 = composeSignals;
3053
+
3054
+ var streamChunk = /*#__PURE__*/_regeneratorRuntime().mark(function streamChunk(chunk, chunkSize) {
3055
+ var len, pos, end;
3056
+ return _regeneratorRuntime().wrap(function streamChunk$(_context) {
3057
+ while (1) switch (_context.prev = _context.next) {
3058
+ case 0:
3059
+ len = chunk.byteLength;
3060
+ if (!(!chunkSize || len < chunkSize)) {
3061
+ _context.next = 5;
3062
+ break;
3063
+ }
3064
+ _context.next = 4;
3065
+ return chunk;
3066
+ case 4:
3067
+ return _context.abrupt("return");
3068
+ case 5:
3069
+ pos = 0;
3070
+ case 6:
3071
+ if (!(pos < len)) {
3072
+ _context.next = 13;
3073
+ break;
3074
+ }
3075
+ end = pos + chunkSize;
3076
+ _context.next = 10;
3077
+ return chunk.slice(pos, end);
3078
+ case 10:
3079
+ pos = end;
3080
+ _context.next = 6;
3081
+ break;
3082
+ case 13:
3083
+ case "end":
3084
+ return _context.stop();
3085
+ }
3086
+ }, streamChunk);
3087
+ });
3088
+ var readBytes = /*#__PURE__*/function () {
3089
+ var _ref = _wrapAsyncGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(iterable, chunkSize, encode) {
3090
+ var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, chunk;
3091
+ return _regeneratorRuntime().wrap(function _callee$(_context2) {
3092
+ while (1) switch (_context2.prev = _context2.next) {
3093
+ case 0:
3094
+ _iteratorAbruptCompletion = false;
3095
+ _didIteratorError = false;
3096
+ _context2.prev = 2;
3097
+ _iterator = _asyncIterator(iterable);
3098
+ case 4:
3099
+ _context2.next = 6;
3100
+ return _awaitAsyncGenerator(_iterator.next());
3101
+ case 6:
3102
+ if (!(_iteratorAbruptCompletion = !(_step = _context2.sent).done)) {
3103
+ _context2.next = 27;
3104
+ break;
3105
+ }
3106
+ chunk = _step.value;
3107
+ _context2.t0 = _asyncGeneratorDelegate;
3108
+ _context2.t1 = _asyncIterator;
3109
+ _context2.t2 = streamChunk;
3110
+ if (!ArrayBuffer.isView(chunk)) {
3111
+ _context2.next = 15;
3112
+ break;
3113
+ }
3114
+ _context2.t3 = chunk;
3115
+ _context2.next = 18;
3116
+ break;
3117
+ case 15:
3118
+ _context2.next = 17;
3119
+ return _awaitAsyncGenerator(encode(String(chunk)));
3120
+ case 17:
3121
+ _context2.t3 = _context2.sent;
3122
+ case 18:
3123
+ _context2.t4 = _context2.t3;
3124
+ _context2.t5 = chunkSize;
3125
+ _context2.t6 = (0, _context2.t2)(_context2.t4, _context2.t5);
3126
+ _context2.t7 = (0, _context2.t1)(_context2.t6);
3127
+ _context2.t8 = _awaitAsyncGenerator;
3128
+ return _context2.delegateYield((0, _context2.t0)(_context2.t7, _context2.t8), "t9", 24);
3129
+ case 24:
3130
+ _iteratorAbruptCompletion = false;
3131
+ _context2.next = 4;
3132
+ break;
3133
+ case 27:
3134
+ _context2.next = 33;
3135
+ break;
3136
+ case 29:
3137
+ _context2.prev = 29;
3138
+ _context2.t10 = _context2["catch"](2);
3139
+ _didIteratorError = true;
3140
+ _iteratorError = _context2.t10;
3141
+ case 33:
3142
+ _context2.prev = 33;
3143
+ _context2.prev = 34;
3144
+ if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
3145
+ _context2.next = 38;
3146
+ break;
3147
+ }
3148
+ _context2.next = 38;
3149
+ return _awaitAsyncGenerator(_iterator["return"]());
3150
+ case 38:
3151
+ _context2.prev = 38;
3152
+ if (!_didIteratorError) {
3153
+ _context2.next = 41;
3154
+ break;
3155
+ }
3156
+ throw _iteratorError;
3157
+ case 41:
3158
+ return _context2.finish(38);
3159
+ case 42:
3160
+ return _context2.finish(33);
3161
+ case 43:
3162
+ case "end":
3163
+ return _context2.stop();
3164
+ }
3165
+ }, _callee, null, [[2, 29, 33, 43], [34,, 38, 42]]);
3166
+ }));
3167
+ return function readBytes(_x, _x2, _x3) {
3168
+ return _ref.apply(this, arguments);
3169
+ };
3170
+ }();
3171
+ var trackStream = function trackStream(stream, chunkSize, onProgress, onFinish, encode) {
3172
+ var iterator = readBytes(stream, chunkSize, encode);
3173
+ var bytes = 0;
3174
+ return new ReadableStream({
3175
+ type: 'bytes',
3176
+ pull: function pull(controller) {
3177
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3178
+ var _yield$iterator$next, done, value, len;
3179
+ return _regeneratorRuntime().wrap(function _callee2$(_context3) {
3180
+ while (1) switch (_context3.prev = _context3.next) {
3181
+ case 0:
3182
+ _context3.next = 2;
3183
+ return iterator.next();
3184
+ case 2:
3185
+ _yield$iterator$next = _context3.sent;
3186
+ done = _yield$iterator$next.done;
3187
+ value = _yield$iterator$next.value;
3188
+ if (!done) {
3189
+ _context3.next = 9;
3190
+ break;
3191
+ }
3192
+ controller.close();
3193
+ onFinish();
3194
+ return _context3.abrupt("return");
3195
+ case 9:
3196
+ len = value.byteLength;
3197
+ onProgress && onProgress(bytes += len);
3198
+ controller.enqueue(new Uint8Array(value));
3199
+ case 12:
3200
+ case "end":
3201
+ return _context3.stop();
3202
+ }
3203
+ }, _callee2);
3204
+ }))();
3205
+ },
3206
+ cancel: function cancel(reason) {
3207
+ onFinish(reason);
3208
+ return iterator["return"]();
3209
+ }
3210
+ }, {
3211
+ highWaterMark: 2
3212
+ });
3213
+ };
3214
+
3215
+ var fetchProgressDecorator = function fetchProgressDecorator(total, fn) {
3216
+ var lengthComputable = total != null;
3217
+ return function (loaded) {
3218
+ return setTimeout(function () {
3219
+ return fn({
3220
+ lengthComputable: lengthComputable,
3221
+ total: total,
3222
+ loaded: loaded
3223
+ });
3224
+ });
3225
+ };
3226
+ };
3227
+ var isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
3228
+ var isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
3229
+
3230
+ // used only inside the fetch adapter
3231
+ var encodeText = isFetchSupported && (typeof TextEncoder === 'function' ? function (encoder) {
3232
+ return function (str) {
3233
+ return encoder.encode(str);
3234
+ };
3235
+ }(new TextEncoder()) : ( /*#__PURE__*/function () {
3236
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(str) {
3237
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3238
+ while (1) switch (_context.prev = _context.next) {
3239
+ case 0:
3240
+ _context.t0 = Uint8Array;
3241
+ _context.next = 3;
3242
+ return new Response(str).arrayBuffer();
3243
+ case 3:
3244
+ _context.t1 = _context.sent;
3245
+ return _context.abrupt("return", new _context.t0(_context.t1));
3246
+ case 5:
3247
+ case "end":
3248
+ return _context.stop();
3249
+ }
3250
+ }, _callee);
3251
+ }));
3252
+ return function (_x) {
3253
+ return _ref.apply(this, arguments);
3254
+ };
3255
+ }()));
3256
+ var supportsRequestStream = isReadableStreamSupported && function () {
3257
+ var duplexAccessed = false;
3258
+ var hasContentType = new Request(platform.origin, {
3259
+ body: new ReadableStream(),
3260
+ method: 'POST',
3261
+ get duplex() {
3262
+ duplexAccessed = true;
3263
+ return 'half';
3264
+ }
3265
+ }).headers.has('Content-Type');
3266
+ return duplexAccessed && !hasContentType;
3267
+ }();
3268
+ var DEFAULT_CHUNK_SIZE = 64 * 1024;
3269
+ var supportsResponseStream = isReadableStreamSupported && !!function () {
3270
+ try {
3271
+ return utils$1.isReadableStream(new Response('').body);
3272
+ } catch (err) {
3273
+ // return undefined
3274
+ }
3275
+ }();
3276
+ var resolvers = {
3277
+ stream: supportsResponseStream && function (res) {
3278
+ return res.body;
3279
+ }
3280
+ };
3281
+ isFetchSupported && function (res) {
3282
+ ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(function (type) {
3283
+ !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? function (res) {
3284
+ return res[type]();
3285
+ } : function (_, config) {
3286
+ throw new AxiosError("Response type '".concat(type, "' is not supported"), AxiosError.ERR_NOT_SUPPORT, config);
3287
+ });
3288
+ });
3289
+ }(new Response());
3290
+ var getBodyLength = /*#__PURE__*/function () {
3291
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(body) {
3292
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3293
+ while (1) switch (_context2.prev = _context2.next) {
3294
+ case 0:
3295
+ if (!(body == null)) {
3296
+ _context2.next = 2;
3297
+ break;
3298
+ }
3299
+ return _context2.abrupt("return", 0);
3300
+ case 2:
3301
+ if (!utils$1.isBlob(body)) {
3302
+ _context2.next = 4;
3303
+ break;
3304
+ }
3305
+ return _context2.abrupt("return", body.size);
3306
+ case 4:
3307
+ if (!utils$1.isSpecCompliantForm(body)) {
3308
+ _context2.next = 8;
3309
+ break;
3310
+ }
3311
+ _context2.next = 7;
3312
+ return new Request(body).arrayBuffer();
3313
+ case 7:
3314
+ return _context2.abrupt("return", _context2.sent.byteLength);
3315
+ case 8:
3316
+ if (!utils$1.isArrayBufferView(body)) {
3317
+ _context2.next = 10;
3318
+ break;
3319
+ }
3320
+ return _context2.abrupt("return", body.byteLength);
3321
+ case 10:
3322
+ if (utils$1.isURLSearchParams(body)) {
3323
+ body = body + '';
3324
+ }
3325
+ if (!utils$1.isString(body)) {
3326
+ _context2.next = 15;
3327
+ break;
3328
+ }
3329
+ _context2.next = 14;
3330
+ return encodeText(body);
3331
+ case 14:
3332
+ return _context2.abrupt("return", _context2.sent.byteLength);
3333
+ case 15:
3334
+ case "end":
3335
+ return _context2.stop();
3336
+ }
3337
+ }, _callee2);
3338
+ }));
3339
+ return function getBodyLength(_x2) {
3340
+ return _ref2.apply(this, arguments);
3341
+ };
3342
+ }();
3343
+ var resolveBodyLength = /*#__PURE__*/function () {
3344
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(headers, body) {
3345
+ var length;
3346
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3347
+ while (1) switch (_context3.prev = _context3.next) {
3348
+ case 0:
3349
+ length = utils$1.toFiniteNumber(headers.getContentLength());
3350
+ return _context3.abrupt("return", length == null ? getBodyLength(body) : length);
3351
+ case 2:
3352
+ case "end":
3353
+ return _context3.stop();
3354
+ }
3355
+ }, _callee3);
3356
+ }));
3357
+ return function resolveBodyLength(_x3, _x4) {
3358
+ return _ref3.apply(this, arguments);
3359
+ };
3360
+ }();
3361
+ var fetchAdapter = isFetchSupported && ( /*#__PURE__*/function () {
3362
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(config) {
3363
+ var _resolveConfig, url, method, data, signal, cancelToken, timeout, onDownloadProgress, onUploadProgress, responseType, headers, _resolveConfig$withCr, withCredentials, fetchOptions, _ref5, _ref6, composedSignal, stopTimeout, finished, request, onFinish, requestContentLength, _request, contentTypeHeader, response, isStreamResponse, options, responseContentLength, responseData;
3364
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3365
+ while (1) switch (_context4.prev = _context4.next) {
3366
+ case 0:
3367
+ _resolveConfig = resolveConfig(config), url = _resolveConfig.url, method = _resolveConfig.method, data = _resolveConfig.data, signal = _resolveConfig.signal, cancelToken = _resolveConfig.cancelToken, timeout = _resolveConfig.timeout, onDownloadProgress = _resolveConfig.onDownloadProgress, onUploadProgress = _resolveConfig.onUploadProgress, responseType = _resolveConfig.responseType, headers = _resolveConfig.headers, _resolveConfig$withCr = _resolveConfig.withCredentials, withCredentials = _resolveConfig$withCr === void 0 ? 'same-origin' : _resolveConfig$withCr, fetchOptions = _resolveConfig.fetchOptions;
3368
+ responseType = responseType ? (responseType + '').toLowerCase() : 'text';
3369
+ _ref5 = signal || cancelToken || timeout ? composeSignals$1([signal, cancelToken], timeout) : [], _ref6 = _slicedToArray(_ref5, 2), composedSignal = _ref6[0], stopTimeout = _ref6[1];
3370
+ onFinish = function onFinish() {
3371
+ !finished && setTimeout(function () {
3372
+ composedSignal && composedSignal.unsubscribe();
3373
+ });
3374
+ finished = true;
3375
+ };
3376
+ _context4.prev = 4;
3377
+ _context4.t0 = onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head';
3378
+ if (!_context4.t0) {
3379
+ _context4.next = 11;
3380
+ break;
3381
+ }
3382
+ _context4.next = 9;
3383
+ return resolveBodyLength(headers, data);
3384
+ case 9:
3385
+ _context4.t1 = requestContentLength = _context4.sent;
3386
+ _context4.t0 = _context4.t1 !== 0;
3387
+ case 11:
3388
+ if (!_context4.t0) {
3389
+ _context4.next = 15;
3390
+ break;
3391
+ }
3392
+ _request = new Request(url, {
3393
+ method: 'POST',
3394
+ body: data,
3395
+ duplex: "half"
3396
+ });
3397
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
3398
+ headers.setContentType(contentTypeHeader);
3399
+ }
3400
+ if (_request.body) {
3401
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, fetchProgressDecorator(requestContentLength, progressEventReducer(onUploadProgress)), null, encodeText);
3402
+ }
3403
+ case 15:
3404
+ if (!utils$1.isString(withCredentials)) {
3405
+ withCredentials = withCredentials ? 'cors' : 'omit';
3406
+ }
3407
+ request = new Request(url, _objectSpread2(_objectSpread2({}, fetchOptions), {}, {
3408
+ signal: composedSignal,
3409
+ method: method.toUpperCase(),
3410
+ headers: headers.normalize().toJSON(),
3411
+ body: data,
3412
+ duplex: "half",
3413
+ withCredentials: withCredentials
3414
+ }));
3415
+ _context4.next = 19;
3416
+ return fetch(request);
3417
+ case 19:
3418
+ response = _context4.sent;
3419
+ isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
3420
+ if (supportsResponseStream && (onDownloadProgress || isStreamResponse)) {
3421
+ options = {};
3422
+ ['status', 'statusText', 'headers'].forEach(function (prop) {
3423
+ options[prop] = response[prop];
3424
+ });
3425
+ responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
3426
+ response = new Response(trackStream(response.body, DEFAULT_CHUNK_SIZE, onDownloadProgress && fetchProgressDecorator(responseContentLength, progressEventReducer(onDownloadProgress, true)), isStreamResponse && onFinish, encodeText), options);
3427
+ }
3428
+ responseType = responseType || 'text';
3429
+ _context4.next = 25;
3430
+ return resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
3431
+ case 25:
3432
+ responseData = _context4.sent;
3433
+ !isStreamResponse && onFinish();
3434
+ stopTimeout && stopTimeout();
3435
+ _context4.next = 30;
3436
+ return new Promise(function (resolve, reject) {
3437
+ settle(resolve, reject, {
3438
+ data: responseData,
3439
+ headers: AxiosHeaders$1.from(response.headers),
3440
+ status: response.status,
3441
+ statusText: response.statusText,
3442
+ config: config,
3443
+ request: request
3444
+ });
3445
+ });
3446
+ case 30:
3447
+ return _context4.abrupt("return", _context4.sent);
3448
+ case 33:
3449
+ _context4.prev = 33;
3450
+ _context4.t2 = _context4["catch"](4);
3451
+ onFinish();
3452
+ if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /fetch/i.test(_context4.t2.message))) {
3453
+ _context4.next = 38;
3454
+ break;
3455
+ }
3456
+ throw Object.assign(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request), {
3457
+ cause: _context4.t2.cause || _context4.t2
3458
+ });
3459
+ case 38:
3460
+ throw AxiosError.from(_context4.t2, _context4.t2 && _context4.t2.code, config, request);
3461
+ case 39:
3462
+ case "end":
3463
+ return _context4.stop();
3464
+ }
3465
+ }, _callee4, null, [[4, 33]]);
3466
+ }));
3467
+ return function (_x5) {
3468
+ return _ref4.apply(this, arguments);
3469
+ };
3470
+ }());
3471
+
3472
+ var knownAdapters = {
3473
+ http: httpAdapter,
3474
+ xhr: xhrAdapter,
3475
+ fetch: fetchAdapter
3476
+ };
3477
+ utils$1.forEach(knownAdapters, function (fn, value) {
3478
+ if (fn) {
3479
+ try {
3480
+ Object.defineProperty(fn, 'name', {
3481
+ value: value
3482
+ });
3483
+ } catch (e) {
3484
+ // eslint-disable-next-line no-empty
3485
+ }
3486
+ Object.defineProperty(fn, 'adapterName', {
3487
+ value: value
3488
+ });
3489
+ }
3490
+ });
3491
+ var renderReason = function renderReason(reason) {
3492
+ return "- ".concat(reason);
3493
+ };
3494
+ var isResolvedHandle = function isResolvedHandle(adapter) {
3495
+ return utils$1.isFunction(adapter) || adapter === null || adapter === false;
3496
+ };
3497
+ var adapters = {
3498
+ getAdapter: function getAdapter(adapters) {
3499
+ adapters = utils$1.isArray(adapters) ? adapters : [adapters];
3500
+ var _adapters = adapters,
3501
+ length = _adapters.length;
3502
+ var nameOrAdapter;
3503
+ var adapter;
3504
+ var rejectedReasons = {};
3505
+ for (var i = 0; i < length; i++) {
3506
+ nameOrAdapter = adapters[i];
3507
+ var id = void 0;
3508
+ adapter = nameOrAdapter;
3509
+ if (!isResolvedHandle(nameOrAdapter)) {
3510
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
3511
+ if (adapter === undefined) {
3512
+ throw new AxiosError("Unknown adapter '".concat(id, "'"));
3513
+ }
3514
+ }
3515
+ if (adapter) {
3516
+ break;
3517
+ }
3518
+ rejectedReasons[id || '#' + i] = adapter;
3519
+ }
3520
+ if (!adapter) {
3521
+ var reasons = Object.entries(rejectedReasons).map(function (_ref) {
3522
+ var _ref2 = _slicedToArray(_ref, 2),
3523
+ id = _ref2[0],
3524
+ state = _ref2[1];
3525
+ return "adapter ".concat(id, " ") + (state === false ? 'is not supported by the environment' : 'is not available in the build');
3526
+ });
3527
+ var s = length ? reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0]) : 'as no adapter specified';
3528
+ throw new AxiosError("There is no suitable adapter to dispatch the request " + s, 'ERR_NOT_SUPPORT');
3529
+ }
3530
+ return adapter;
3531
+ },
3532
+ adapters: knownAdapters
3533
+ };
3534
+
3535
+ /**
3536
+ * Throws a `CanceledError` if cancellation has been requested.
3537
+ *
3538
+ * @param {Object} config The config that is to be used for the request
3539
+ *
3540
+ * @returns {void}
3541
+ */
3542
+ function throwIfCancellationRequested(config) {
3543
+ if (config.cancelToken) {
3544
+ config.cancelToken.throwIfRequested();
3545
+ }
3546
+ if (config.signal && config.signal.aborted) {
3547
+ throw new CanceledError(null, config);
3548
+ }
3549
+ }
3550
+
3551
+ /**
3552
+ * Dispatch a request to the server using the configured adapter.
3553
+ *
3554
+ * @param {object} config The config that is to be used for the request
3555
+ *
3556
+ * @returns {Promise} The Promise to be fulfilled
3557
+ */
3558
+ function dispatchRequest(config) {
3559
+ throwIfCancellationRequested(config);
3560
+ config.headers = AxiosHeaders$1.from(config.headers);
3561
+
3562
+ // Transform request data
3563
+ config.data = transformData.call(config, config.transformRequest);
3564
+ if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
3565
+ config.headers.setContentType('application/x-www-form-urlencoded', false);
3566
+ }
3567
+ var adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
3568
+ return adapter(config).then(function onAdapterResolution(response) {
3569
+ throwIfCancellationRequested(config);
3570
+
3571
+ // Transform response data
3572
+ response.data = transformData.call(config, config.transformResponse, response);
3573
+ response.headers = AxiosHeaders$1.from(response.headers);
3574
+ return response;
3575
+ }, function onAdapterRejection(reason) {
3576
+ if (!isCancel(reason)) {
3577
+ throwIfCancellationRequested(config);
3578
+
3579
+ // Transform response data
3580
+ if (reason && reason.response) {
3581
+ reason.response.data = transformData.call(config, config.transformResponse, reason.response);
3582
+ reason.response.headers = AxiosHeaders$1.from(reason.response.headers);
3583
+ }
3584
+ }
3585
+ return Promise.reject(reason);
3586
+ });
3587
+ }
3588
+
3589
+ var VERSION = "1.7.2";
3590
+
3591
+ var validators$1 = {};
3592
+
3593
+ // eslint-disable-next-line func-names
3594
+ ['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function (type, i) {
3595
+ validators$1[type] = function validator(thing) {
3596
+ return _typeof(thing) === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
3597
+ };
3598
+ });
3599
+ var deprecatedWarnings = {};
3600
+
3601
+ /**
3602
+ * Transitional option validator
3603
+ *
3604
+ * @param {function|boolean?} validator - set to false if the transitional option has been removed
3605
+ * @param {string?} version - deprecated version / removed since version
3606
+ * @param {string?} message - some message with additional info
3607
+ *
3608
+ * @returns {function}
3609
+ */
3610
+ validators$1.transitional = function transitional(validator, version, message) {
3611
+ function formatMessage(opt, desc) {
3612
+ return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
3613
+ }
3614
+
3615
+ // eslint-disable-next-line func-names
3616
+ return function (value, opt, opts) {
3617
+ if (validator === false) {
3618
+ throw new AxiosError(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')), AxiosError.ERR_DEPRECATED);
3619
+ }
3620
+ if (version && !deprecatedWarnings[opt]) {
3621
+ deprecatedWarnings[opt] = true;
3622
+ // eslint-disable-next-line no-console
3623
+ console.warn(formatMessage(opt, ' has been deprecated since v' + version + ' and will be removed in the near future'));
3624
+ }
3625
+ return validator ? validator(value, opt, opts) : true;
3626
+ };
3627
+ };
3628
+
3629
+ /**
3630
+ * Assert object's properties type
3631
+ *
3632
+ * @param {object} options
3633
+ * @param {object} schema
3634
+ * @param {boolean?} allowUnknown
3635
+ *
3636
+ * @returns {object}
3637
+ */
3638
+
3639
+ function assertOptions(options, schema, allowUnknown) {
3640
+ if (_typeof(options) !== 'object') {
3641
+ throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
3642
+ }
3643
+ var keys = Object.keys(options);
3644
+ var i = keys.length;
3645
+ while (i-- > 0) {
3646
+ var opt = keys[i];
3647
+ var validator = schema[opt];
3648
+ if (validator) {
3649
+ var value = options[opt];
3650
+ var result = value === undefined || validator(value, opt, options);
3651
+ if (result !== true) {
3652
+ throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
3653
+ }
3654
+ continue;
3655
+ }
3656
+ if (allowUnknown !== true) {
3657
+ throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
3658
+ }
3659
+ }
3660
+ }
3661
+ var validator = {
3662
+ assertOptions: assertOptions,
3663
+ validators: validators$1
3664
+ };
3665
+
3666
+ var validators = validator.validators;
3667
+
3668
+ /**
3669
+ * Create a new instance of Axios
3670
+ *
3671
+ * @param {Object} instanceConfig The default config for the instance
3672
+ *
3673
+ * @return {Axios} A new instance of Axios
3674
+ */
3675
+ var Axios = /*#__PURE__*/function () {
3676
+ function Axios(instanceConfig) {
3677
+ _classCallCheck(this, Axios);
3678
+ this.defaults = instanceConfig;
3679
+ this.interceptors = {
3680
+ request: new InterceptorManager$1(),
3681
+ response: new InterceptorManager$1()
3682
+ };
3683
+ }
3684
+
3685
+ /**
3686
+ * Dispatch a request
3687
+ *
3688
+ * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
3689
+ * @param {?Object} config
3690
+ *
3691
+ * @returns {Promise} The Promise to be fulfilled
3692
+ */
3693
+ _createClass(Axios, [{
3694
+ key: "request",
3695
+ value: (function () {
3696
+ var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
3697
+ var dummy, stack;
3698
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3699
+ while (1) switch (_context.prev = _context.next) {
3700
+ case 0:
3701
+ _context.prev = 0;
3702
+ _context.next = 3;
3703
+ return this._request(configOrUrl, config);
3704
+ case 3:
3705
+ return _context.abrupt("return", _context.sent);
3706
+ case 6:
3707
+ _context.prev = 6;
3708
+ _context.t0 = _context["catch"](0);
3709
+ if (_context.t0 instanceof Error) {
3710
+ Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
3711
+
3712
+ // slice off the Error: ... line
3713
+ stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
3714
+ try {
3715
+ if (!_context.t0.stack) {
3716
+ _context.t0.stack = stack;
3717
+ // match without the 2 top stack lines
3718
+ } else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
3719
+ _context.t0.stack += '\n' + stack;
3720
+ }
3721
+ } catch (e) {
3722
+ // ignore the case where "stack" is an un-writable property
3723
+ }
3724
+ }
3725
+ throw _context.t0;
3726
+ case 10:
3727
+ case "end":
3728
+ return _context.stop();
3729
+ }
3730
+ }, _callee, this, [[0, 6]]);
3731
+ }));
3732
+ function request(_x, _x2) {
3733
+ return _request2.apply(this, arguments);
3734
+ }
3735
+ return request;
3736
+ }())
3737
+ }, {
3738
+ key: "_request",
3739
+ value: function _request(configOrUrl, config) {
3740
+ /*eslint no-param-reassign:0*/
3741
+ // Allow for axios('example/url'[, config]) a la fetch API
3742
+ if (typeof configOrUrl === 'string') {
3743
+ config = config || {};
3744
+ config.url = configOrUrl;
3745
+ } else {
3746
+ config = configOrUrl || {};
3747
+ }
3748
+ config = mergeConfig(this.defaults, config);
3749
+ var _config = config,
3750
+ transitional = _config.transitional,
3751
+ paramsSerializer = _config.paramsSerializer,
3752
+ headers = _config.headers;
3753
+ if (transitional !== undefined) {
3754
+ validator.assertOptions(transitional, {
3755
+ silentJSONParsing: validators.transitional(validators["boolean"]),
3756
+ forcedJSONParsing: validators.transitional(validators["boolean"]),
3757
+ clarifyTimeoutError: validators.transitional(validators["boolean"])
3758
+ }, false);
3759
+ }
3760
+ if (paramsSerializer != null) {
3761
+ if (utils$1.isFunction(paramsSerializer)) {
3762
+ config.paramsSerializer = {
3763
+ serialize: paramsSerializer
3764
+ };
3765
+ } else {
3766
+ validator.assertOptions(paramsSerializer, {
3767
+ encode: validators["function"],
3768
+ serialize: validators["function"]
3769
+ }, true);
3770
+ }
3771
+ }
3772
+
3773
+ // Set config.method
3774
+ config.method = (config.method || this.defaults.method || 'get').toLowerCase();
3775
+
3776
+ // Flatten headers
3777
+ var contextHeaders = headers && utils$1.merge(headers.common, headers[config.method]);
3778
+ headers && utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function (method) {
3779
+ delete headers[method];
3780
+ });
3781
+ config.headers = AxiosHeaders$1.concat(contextHeaders, headers);
3782
+
3783
+ // filter out skipped interceptors
3784
+ var requestInterceptorChain = [];
3785
+ var synchronousRequestInterceptors = true;
3786
+ this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
3787
+ if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
3788
+ return;
3789
+ }
3790
+ synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
3791
+ requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
3792
+ });
3793
+ var responseInterceptorChain = [];
3794
+ this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
3795
+ responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
3796
+ });
3797
+ var promise;
3798
+ var i = 0;
3799
+ var len;
3800
+ if (!synchronousRequestInterceptors) {
3801
+ var chain = [dispatchRequest.bind(this), undefined];
3802
+ chain.unshift.apply(chain, requestInterceptorChain);
3803
+ chain.push.apply(chain, responseInterceptorChain);
3804
+ len = chain.length;
3805
+ promise = Promise.resolve(config);
3806
+ while (i < len) {
3807
+ promise = promise.then(chain[i++], chain[i++]);
3808
+ }
3809
+ return promise;
3810
+ }
3811
+ len = requestInterceptorChain.length;
3812
+ var newConfig = config;
3813
+ i = 0;
3814
+ while (i < len) {
3815
+ var onFulfilled = requestInterceptorChain[i++];
3816
+ var onRejected = requestInterceptorChain[i++];
3817
+ try {
3818
+ newConfig = onFulfilled(newConfig);
3819
+ } catch (error) {
3820
+ onRejected.call(this, error);
3821
+ break;
3822
+ }
3823
+ }
3824
+ try {
3825
+ promise = dispatchRequest.call(this, newConfig);
3826
+ } catch (error) {
3827
+ return Promise.reject(error);
3828
+ }
3829
+ i = 0;
3830
+ len = responseInterceptorChain.length;
3831
+ while (i < len) {
3832
+ promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
3833
+ }
3834
+ return promise;
3835
+ }
3836
+ }, {
3837
+ key: "getUri",
3838
+ value: function getUri(config) {
3839
+ config = mergeConfig(this.defaults, config);
3840
+ var fullPath = buildFullPath(config.baseURL, config.url);
3841
+ return buildURL(fullPath, config.params, config.paramsSerializer);
3842
+ }
3843
+ }]);
3844
+ return Axios;
3845
+ }(); // Provide aliases for supported request methods
3846
+ utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
3847
+ /*eslint func-names:0*/
3848
+ Axios.prototype[method] = function (url, config) {
3849
+ return this.request(mergeConfig(config || {}, {
3850
+ method: method,
3851
+ url: url,
3852
+ data: (config || {}).data
3853
+ }));
3854
+ };
3855
+ });
3856
+ utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
3857
+ /*eslint func-names:0*/
3858
+
3859
+ function generateHTTPMethod(isForm) {
3860
+ return function httpMethod(url, data, config) {
3861
+ return this.request(mergeConfig(config || {}, {
3862
+ method: method,
3863
+ headers: isForm ? {
3864
+ 'Content-Type': 'multipart/form-data'
3865
+ } : {},
3866
+ url: url,
3867
+ data: data
3868
+ }));
3869
+ };
3870
+ }
3871
+ Axios.prototype[method] = generateHTTPMethod();
3872
+ Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
3873
+ });
3874
+ var Axios$1 = Axios;
3875
+
3876
+ /**
3877
+ * A `CancelToken` is an object that can be used to request cancellation of an operation.
3878
+ *
3879
+ * @param {Function} executor The executor function.
3880
+ *
3881
+ * @returns {CancelToken}
3882
+ */
3883
+ var CancelToken = /*#__PURE__*/function () {
3884
+ function CancelToken(executor) {
3885
+ _classCallCheck(this, CancelToken);
3886
+ if (typeof executor !== 'function') {
3887
+ throw new TypeError('executor must be a function.');
3888
+ }
3889
+ var resolvePromise;
3890
+ this.promise = new Promise(function promiseExecutor(resolve) {
3891
+ resolvePromise = resolve;
3892
+ });
3893
+ var token = this;
3894
+
3895
+ // eslint-disable-next-line func-names
3896
+ this.promise.then(function (cancel) {
3897
+ if (!token._listeners) return;
3898
+ var i = token._listeners.length;
3899
+ while (i-- > 0) {
3900
+ token._listeners[i](cancel);
3901
+ }
3902
+ token._listeners = null;
3903
+ });
3904
+
3905
+ // eslint-disable-next-line func-names
3906
+ this.promise.then = function (onfulfilled) {
3907
+ var _resolve;
3908
+ // eslint-disable-next-line func-names
3909
+ var promise = new Promise(function (resolve) {
3910
+ token.subscribe(resolve);
3911
+ _resolve = resolve;
3912
+ }).then(onfulfilled);
3913
+ promise.cancel = function reject() {
3914
+ token.unsubscribe(_resolve);
3915
+ };
3916
+ return promise;
3917
+ };
3918
+ executor(function cancel(message, config, request) {
3919
+ if (token.reason) {
3920
+ // Cancellation has already been requested
3921
+ return;
3922
+ }
3923
+ token.reason = new CanceledError(message, config, request);
3924
+ resolvePromise(token.reason);
3925
+ });
3926
+ }
3927
+
3928
+ /**
3929
+ * Throws a `CanceledError` if cancellation has been requested.
3930
+ */
3931
+ _createClass(CancelToken, [{
3932
+ key: "throwIfRequested",
3933
+ value: function throwIfRequested() {
3934
+ if (this.reason) {
3935
+ throw this.reason;
3936
+ }
3937
+ }
3938
+
3939
+ /**
3940
+ * Subscribe to the cancel signal
3941
+ */
3942
+ }, {
3943
+ key: "subscribe",
3944
+ value: function subscribe(listener) {
3945
+ if (this.reason) {
3946
+ listener(this.reason);
3947
+ return;
3948
+ }
3949
+ if (this._listeners) {
3950
+ this._listeners.push(listener);
3951
+ } else {
3952
+ this._listeners = [listener];
3953
+ }
3954
+ }
3955
+
3956
+ /**
3957
+ * Unsubscribe from the cancel signal
3958
+ */
3959
+ }, {
3960
+ key: "unsubscribe",
3961
+ value: function unsubscribe(listener) {
3962
+ if (!this._listeners) {
3963
+ return;
3964
+ }
3965
+ var index = this._listeners.indexOf(listener);
3966
+ if (index !== -1) {
3967
+ this._listeners.splice(index, 1);
3968
+ }
3969
+ }
3970
+
3971
+ /**
3972
+ * Returns an object that contains a new `CancelToken` and a function that, when called,
3973
+ * cancels the `CancelToken`.
3974
+ */
3975
+ }], [{
3976
+ key: "source",
3977
+ value: function source() {
3978
+ var cancel;
3979
+ var token = new CancelToken(function executor(c) {
3980
+ cancel = c;
3981
+ });
3982
+ return {
3983
+ token: token,
3984
+ cancel: cancel
3985
+ };
3986
+ }
3987
+ }]);
3988
+ return CancelToken;
3989
+ }();
3990
+ var CancelToken$1 = CancelToken;
3991
+
3992
+ /**
3993
+ * Syntactic sugar for invoking a function and expanding an array for arguments.
3994
+ *
3995
+ * Common use case would be to use `Function.prototype.apply`.
3996
+ *
3997
+ * ```js
3998
+ * function f(x, y, z) {}
3999
+ * var args = [1, 2, 3];
4000
+ * f.apply(null, args);
4001
+ * ```
4002
+ *
4003
+ * With `spread` this example can be re-written.
4004
+ *
4005
+ * ```js
4006
+ * spread(function(x, y, z) {})([1, 2, 3]);
4007
+ * ```
4008
+ *
4009
+ * @param {Function} callback
4010
+ *
4011
+ * @returns {Function}
4012
+ */
4013
+ function spread(callback) {
4014
+ return function wrap(arr) {
4015
+ return callback.apply(null, arr);
4016
+ };
4017
+ }
4018
+
4019
+ /**
4020
+ * Determines whether the payload is an error thrown by Axios
4021
+ *
4022
+ * @param {*} payload The value to test
4023
+ *
4024
+ * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
4025
+ */
4026
+ function isAxiosError(payload) {
4027
+ return utils$1.isObject(payload) && payload.isAxiosError === true;
4028
+ }
4029
+
4030
+ var HttpStatusCode = {
4031
+ Continue: 100,
4032
+ SwitchingProtocols: 101,
4033
+ Processing: 102,
4034
+ EarlyHints: 103,
4035
+ Ok: 200,
4036
+ Created: 201,
4037
+ Accepted: 202,
4038
+ NonAuthoritativeInformation: 203,
4039
+ NoContent: 204,
4040
+ ResetContent: 205,
4041
+ PartialContent: 206,
4042
+ MultiStatus: 207,
4043
+ AlreadyReported: 208,
4044
+ ImUsed: 226,
4045
+ MultipleChoices: 300,
4046
+ MovedPermanently: 301,
4047
+ Found: 302,
4048
+ SeeOther: 303,
4049
+ NotModified: 304,
4050
+ UseProxy: 305,
4051
+ Unused: 306,
4052
+ TemporaryRedirect: 307,
4053
+ PermanentRedirect: 308,
4054
+ BadRequest: 400,
4055
+ Unauthorized: 401,
4056
+ PaymentRequired: 402,
4057
+ Forbidden: 403,
4058
+ NotFound: 404,
4059
+ MethodNotAllowed: 405,
4060
+ NotAcceptable: 406,
4061
+ ProxyAuthenticationRequired: 407,
4062
+ RequestTimeout: 408,
4063
+ Conflict: 409,
4064
+ Gone: 410,
4065
+ LengthRequired: 411,
4066
+ PreconditionFailed: 412,
4067
+ PayloadTooLarge: 413,
4068
+ UriTooLong: 414,
4069
+ UnsupportedMediaType: 415,
4070
+ RangeNotSatisfiable: 416,
4071
+ ExpectationFailed: 417,
4072
+ ImATeapot: 418,
4073
+ MisdirectedRequest: 421,
4074
+ UnprocessableEntity: 422,
4075
+ Locked: 423,
4076
+ FailedDependency: 424,
4077
+ TooEarly: 425,
4078
+ UpgradeRequired: 426,
4079
+ PreconditionRequired: 428,
4080
+ TooManyRequests: 429,
4081
+ RequestHeaderFieldsTooLarge: 431,
4082
+ UnavailableForLegalReasons: 451,
4083
+ InternalServerError: 500,
4084
+ NotImplemented: 501,
4085
+ BadGateway: 502,
4086
+ ServiceUnavailable: 503,
4087
+ GatewayTimeout: 504,
4088
+ HttpVersionNotSupported: 505,
4089
+ VariantAlsoNegotiates: 506,
4090
+ InsufficientStorage: 507,
4091
+ LoopDetected: 508,
4092
+ NotExtended: 510,
4093
+ NetworkAuthenticationRequired: 511
4094
+ };
4095
+ Object.entries(HttpStatusCode).forEach(function (_ref) {
4096
+ var _ref2 = _slicedToArray(_ref, 2),
4097
+ key = _ref2[0],
4098
+ value = _ref2[1];
4099
+ HttpStatusCode[value] = key;
4100
+ });
4101
+ var HttpStatusCode$1 = HttpStatusCode;
4102
+
4103
+ /**
4104
+ * Create an instance of Axios
4105
+ *
4106
+ * @param {Object} defaultConfig The default config for the instance
4107
+ *
4108
+ * @returns {Axios} A new instance of Axios
4109
+ */
4110
+ function createInstance(defaultConfig) {
4111
+ var context = new Axios$1(defaultConfig);
4112
+ var instance = bind(Axios$1.prototype.request, context);
4113
+
4114
+ // Copy axios.prototype to instance
4115
+ utils$1.extend(instance, Axios$1.prototype, context, {
4116
+ allOwnKeys: true
4117
+ });
4118
+
4119
+ // Copy context to instance
4120
+ utils$1.extend(instance, context, null, {
4121
+ allOwnKeys: true
4122
+ });
4123
+
4124
+ // Factory for creating new instances
4125
+ instance.create = function create(instanceConfig) {
4126
+ return createInstance(mergeConfig(defaultConfig, instanceConfig));
4127
+ };
4128
+ return instance;
4129
+ }
4130
+
4131
+ // Create the default instance to be exported
4132
+ var axios = createInstance(defaults$1);
4133
+
4134
+ // Expose Axios class to allow class inheritance
4135
+ axios.Axios = Axios$1;
4136
+
4137
+ // Expose Cancel & CancelToken
4138
+ axios.CanceledError = CanceledError;
4139
+ axios.CancelToken = CancelToken$1;
4140
+ axios.isCancel = isCancel;
4141
+ axios.VERSION = VERSION;
4142
+ axios.toFormData = toFormData;
4143
+
4144
+ // Expose AxiosError class
4145
+ axios.AxiosError = AxiosError;
4146
+
4147
+ // alias for CanceledError for backward compatibility
4148
+ axios.Cancel = axios.CanceledError;
4149
+
4150
+ // Expose all/spread
4151
+ axios.all = function all(promises) {
4152
+ return Promise.all(promises);
4153
+ };
4154
+ axios.spread = spread;
4155
+
4156
+ // Expose isAxiosError
4157
+ axios.isAxiosError = isAxiosError;
4158
+
4159
+ // Expose mergeConfig
4160
+ axios.mergeConfig = mergeConfig;
4161
+ axios.AxiosHeaders = AxiosHeaders$1;
4162
+ axios.formToJSON = function (thing) {
4163
+ return formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
4164
+ };
4165
+ axios.getAdapter = adapters.getAdapter;
4166
+ axios.HttpStatusCode = HttpStatusCode$1;
4167
+ axios["default"] = axios;
4168
+
4169
+ return axios;
4170
+
4171
+ }));
4172
+ //# sourceMappingURL=axios.js.map