@salla.sa/twilight-components 2.14.391 → 2.14.393

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