@salla.sa/twilight-components 2.14.313 → 2.14.339

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 (255) hide show
  1. package/dist/cjs/{filepond-Cb19kTbw.js → filepond-hpLROc_m.js} +1 -1
  2. package/dist/cjs/{filepond-plugin-file-poster-DVc66rcg.js → filepond-plugin-file-poster-C8gskRGl.js} +1 -1
  3. package/dist/cjs/{filepond-plugin-file-validate-size-BC6y9Sv3.js → filepond-plugin-file-validate-size-CaO6qVs6.js} +1 -1
  4. package/dist/cjs/{filepond-plugin-file-validate-type-npctEnon.js → filepond-plugin-file-validate-type-mUUtcgCs.js} +1 -1
  5. package/dist/cjs/{filepond-plugin-image-edit-CJrWzKcr.js → filepond-plugin-image-edit-rptDhPuc.js} +1 -1
  6. package/dist/cjs/{filepond-plugin-image-exif-orientation-CEZiujht.js → filepond-plugin-image-exif-orientation-B6L8W0Qe.js} +1 -1
  7. package/dist/cjs/{filepond-plugin-image-preview-Bk5_ED_I.js → filepond-plugin-image-preview-BoqOfOki.js} +1 -1
  8. package/dist/cjs/{index-DCJLMRDw.js → index-2liYDuhx.js} +583 -420
  9. package/dist/cjs/{index-CeCbuoue.js → index-ChHHnqio.js} +1 -1
  10. package/dist/cjs/loader.cjs.js +2 -2
  11. package/dist/cjs/salla-accordion_62.cjs.entry.js +164 -93
  12. package/dist/cjs/salla-advertisement.cjs.entry.js +1 -1
  13. package/dist/cjs/salla-app-install-alert.cjs.entry.js +1 -1
  14. package/dist/cjs/salla-apps-icons.cjs.entry.js +2 -2
  15. package/dist/cjs/salla-cart-item-offers.cjs.entry.js +1 -1
  16. package/dist/cjs/salla-conditional-offer.cjs.entry.js +1 -1
  17. package/dist/cjs/salla-contacts.cjs.entry.js +1 -1
  18. package/dist/cjs/salla-custom-fields.cjs.entry.js +1 -1
  19. package/dist/cjs/salla-filters-widget.cjs.entry.js +60 -12
  20. package/dist/cjs/salla-filters.cjs.entry.js +1 -1
  21. package/dist/cjs/salla-hook.cjs.entry.js +2 -2
  22. package/dist/cjs/salla-installment.cjs.entry.js +1 -1
  23. package/dist/cjs/salla-loyalty-prize-item.cjs.entry.js +2 -2
  24. package/dist/cjs/salla-loyalty-program.cjs.entry.js +2 -2
  25. package/dist/cjs/salla-metadata.cjs.entry.js +1 -1
  26. package/dist/cjs/salla-notification-item.cjs.entry.js +2 -2
  27. package/dist/cjs/salla-notifications.cjs.entry.js +1 -1
  28. package/dist/cjs/salla-offer.cjs.entry.js +1 -1
  29. package/dist/cjs/salla-order-details-multiple-bundle-product.cjs.entry.js +2 -2
  30. package/dist/cjs/salla-order-details-options.cjs.entry.js +1 -1
  31. package/dist/cjs/salla-order-details.cjs.entry.js +2 -2
  32. package/dist/cjs/salla-order-summary.cjs.entry.js +2 -2
  33. package/dist/cjs/salla-order-totals-card.cjs.entry.js +1 -1
  34. package/dist/cjs/salla-orders.cjs.entry.js +1 -1
  35. package/dist/cjs/salla-payments.cjs.entry.js +3 -3
  36. package/dist/cjs/salla-price-range.cjs.entry.js +3 -3
  37. package/dist/cjs/salla-review-card.cjs.entry.js +2 -2
  38. package/dist/cjs/salla-reviews-page.cjs.entry.js +2 -2
  39. package/dist/cjs/salla-reviews.cjs.entry.js +2 -2
  40. package/dist/cjs/salla-social.cjs.entry.js +2 -2
  41. package/dist/cjs/salla-tiered-offer.cjs.entry.js +1 -1
  42. package/dist/cjs/salla-tooltip.cjs.entry.js +2 -2
  43. package/dist/cjs/salla-trust-badges.cjs.entry.js +1 -1
  44. package/dist/cjs/salla-verify.cjs.entry.js +1 -1
  45. package/dist/cjs/salla-wallet.cjs.entry.js +1 -1
  46. package/dist/cjs/twilight.cjs.js +2 -2
  47. package/dist/collection/components/salla-apps-icons/salla-apps-icons.js +1 -1
  48. package/dist/collection/components/salla-button/salla-button.js +29 -13
  49. package/dist/collection/components/salla-comments/salla-comment-item.js +8 -3
  50. package/dist/collection/components/salla-comments/salla-comments.js +1 -1
  51. package/dist/collection/components/salla-filters-widget/salla-filters-widget.js +62 -12
  52. package/dist/collection/components/salla-gifting/salla-gifting.js +3 -3
  53. package/dist/collection/components/salla-hook/salla-hook.js +1 -1
  54. package/dist/collection/components/salla-list-tile/salla-list-tile.js +1 -1
  55. package/dist/collection/components/salla-loading/salla-loading.js +1 -1
  56. package/dist/collection/components/salla-localization-modal/salla-localization-modal.js +1 -1
  57. package/dist/collection/components/salla-login-modal/salla-login-modal.js +15 -2
  58. package/dist/collection/components/salla-loyalty/salla-loyalty-prize-item.js +1 -1
  59. package/dist/collection/components/salla-loyalty-program/salla-loyalty-program.js +1 -1
  60. package/dist/collection/components/salla-maintenance-alert/salla-maintenance-alert.js +1 -1
  61. package/dist/collection/components/salla-map/salla-map.js +3 -3
  62. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-cart.js +1 -1
  63. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-details.js +2 -2
  64. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-options-modal.js +4 -4
  65. package/dist/collection/components/salla-multiple-bundle-product/components/salla-multiple-bundle-product-slider.js +2 -2
  66. package/dist/collection/components/salla-multiple-bundle-product/salla-multiple-bundle-product.js +1 -1
  67. package/dist/collection/components/salla-notifications/salla-notification-item.js +1 -1
  68. package/dist/collection/components/salla-offer-modal/salla-offer-modal.js +1 -1
  69. package/dist/collection/components/salla-order-details/salla-order-details-multiple-bundle-product.js +1 -1
  70. package/dist/collection/components/salla-order-details/salla-order-details.js +1 -1
  71. package/dist/collection/components/salla-order-summary/salla-order-summary.js +1 -1
  72. package/dist/collection/components/salla-payments/salla-payments.js +2 -2
  73. package/dist/collection/components/salla-placeholder/salla-placeholder.js +1 -1
  74. package/dist/collection/components/salla-price-range/salla-price-range.js +2 -2
  75. package/dist/collection/components/salla-product-availability/salla-product-availability.js +1 -1
  76. package/dist/collection/components/salla-product-card/salla-product-card.js +5 -5
  77. package/dist/collection/components/salla-product-options/salla-product-options.js +37 -16
  78. package/dist/collection/components/salla-product-size-guide/salla-product-size-guide.js +2 -2
  79. package/dist/collection/components/salla-quantity-input/salla-quantity-input.js +13 -2
  80. package/dist/collection/components/salla-quick-buy/salla-quick-buy.js +2 -2
  81. package/dist/collection/components/salla-review-card/salla-review-card.js +1 -1
  82. package/dist/collection/components/salla-reviews/salla-reviews.js +1 -1
  83. package/dist/collection/components/salla-reviews-page/salla-reviews-page.js +1 -1
  84. package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
  85. package/dist/collection/components/salla-search/salla-search.js +3 -3
  86. package/dist/collection/components/salla-skeleton/salla-skeleton.js +1 -1
  87. package/dist/collection/components/salla-slider/salla-slider.js +2 -2
  88. package/dist/collection/components/salla-social/salla-social.js +1 -1
  89. package/dist/collection/components/salla-social-share/salla-social-share.js +5 -1
  90. package/dist/collection/components/salla-tabs/salla-tab-content.js +1 -1
  91. package/dist/collection/components/salla-tabs/salla-tab-header.js +1 -1
  92. package/dist/collection/components/salla-tabs/salla-tabs.js +1 -1
  93. package/dist/collection/components/salla-tel-input/salla-tel-input.js +1 -1
  94. package/dist/collection/components/salla-tooltip/salla-tooltip.js +1 -1
  95. package/dist/collection/components/salla-user-settings/salla-user-settings.js +1 -1
  96. package/dist/collection/plugins/commonjs-cache-fix.js +21 -0
  97. package/dist/components/axios.js +583 -420
  98. package/dist/components/index.js +2 -2
  99. package/dist/components/salla-apps-icons.js +1 -1
  100. package/dist/components/salla-button2.js +29 -13
  101. package/dist/components/salla-comment-item2.js +8 -3
  102. package/dist/components/salla-comments.js +1 -1
  103. package/dist/components/salla-filters-widget2.js +61 -11
  104. package/dist/components/salla-gifting.js +3 -3
  105. package/dist/components/salla-hook.js +1 -1
  106. package/dist/components/salla-list-tile2.js +1 -1
  107. package/dist/components/salla-loading2.js +1 -1
  108. package/dist/components/salla-localization-modal.js +1 -1
  109. package/dist/components/salla-login-modal.js +15 -2
  110. package/dist/components/salla-loyalty-prize-item.js +1 -1
  111. package/dist/components/salla-loyalty-program.js +1 -1
  112. package/dist/components/salla-maintenance-alert.js +1 -1
  113. package/dist/components/salla-map2.js +3 -3
  114. package/dist/components/salla-multiple-bundle-product-cart2.js +1 -1
  115. package/dist/components/salla-multiple-bundle-product-details2.js +2 -2
  116. package/dist/components/salla-multiple-bundle-product-options-modal2.js +4 -4
  117. package/dist/components/salla-multiple-bundle-product-slider2.js +2 -2
  118. package/dist/components/salla-multiple-bundle-product.js +1 -1
  119. package/dist/components/salla-notification-item2.js +1 -1
  120. package/dist/components/salla-offer-modal.js +1 -1
  121. package/dist/components/salla-order-details-multiple-bundle-product2.js +1 -1
  122. package/dist/components/salla-order-details.js +1 -1
  123. package/dist/components/salla-order-summary.js +1 -1
  124. package/dist/components/salla-payments.js +2 -2
  125. package/dist/components/salla-placeholder2.js +1 -1
  126. package/dist/components/salla-price-range2.js +2 -2
  127. package/dist/components/salla-product-availability2.js +1 -1
  128. package/dist/components/salla-product-card2.js +5 -5
  129. package/dist/components/salla-product-options2.js +37 -16
  130. package/dist/components/salla-product-size-guide.js +2 -2
  131. package/dist/components/salla-quantity-input.js +13 -2
  132. package/dist/components/salla-quick-buy2.js +6 -4
  133. package/dist/components/salla-review-card2.js +1 -1
  134. package/dist/components/salla-reviews-page.js +1 -1
  135. package/dist/components/salla-reviews.js +1 -1
  136. package/dist/components/salla-scopes.js +1 -1
  137. package/dist/components/salla-search.js +3 -3
  138. package/dist/components/salla-skeleton2.js +1 -1
  139. package/dist/components/salla-slider2.js +2 -2
  140. package/dist/components/salla-social-share.js +5 -1
  141. package/dist/components/salla-social.js +1 -1
  142. package/dist/components/salla-tab-content2.js +1 -1
  143. package/dist/components/salla-tab-header2.js +1 -1
  144. package/dist/components/salla-tabs2.js +1 -1
  145. package/dist/components/salla-tel-input2.js +1 -1
  146. package/dist/components/salla-tooltip2.js +1 -1
  147. package/dist/components/salla-user-settings.js +1 -1
  148. package/dist/esm/{filepond-9b3kZc-1.js → filepond-CwjnR_95.js} +1 -1
  149. package/dist/esm/{filepond-plugin-file-poster-CUQ3777V.js → filepond-plugin-file-poster-DES9KQfe.js} +1 -1
  150. package/dist/esm/{filepond-plugin-file-validate-size-Dfk5mlDB.js → filepond-plugin-file-validate-size-BcloWdhO.js} +1 -1
  151. package/dist/esm/{filepond-plugin-file-validate-type-BPui8oQ-.js → filepond-plugin-file-validate-type-CbjGxksB.js} +1 -1
  152. package/dist/esm/{filepond-plugin-image-edit-BHp0JfV4.js → filepond-plugin-image-edit-BtZ6aJg8.js} +1 -1
  153. package/dist/esm/{filepond-plugin-image-exif-orientation-BZ-x6UNo.js → filepond-plugin-image-exif-orientation-BVNb0UTU.js} +1 -1
  154. package/dist/esm/{filepond-plugin-image-preview-D_CJzbI7.js → filepond-plugin-image-preview-t1v2q4Jq.js} +1 -1
  155. package/dist/esm/{index-CtDnNMoY.js → index-CRmtzwUF.js} +583 -420
  156. package/dist/esm/{index-90xXQpPV.js → index-HmYGeOpS.js} +1 -1
  157. package/dist/esm/loader.js +3 -3
  158. package/dist/esm/salla-accordion_62.entry.js +164 -93
  159. package/dist/esm/salla-advertisement.entry.js +1 -1
  160. package/dist/esm/salla-app-install-alert.entry.js +1 -1
  161. package/dist/esm/salla-apps-icons.entry.js +2 -2
  162. package/dist/esm/salla-cart-item-offers.entry.js +1 -1
  163. package/dist/esm/salla-conditional-offer.entry.js +1 -1
  164. package/dist/esm/salla-contacts.entry.js +1 -1
  165. package/dist/esm/salla-custom-fields.entry.js +1 -1
  166. package/dist/esm/salla-filters-widget.entry.js +60 -12
  167. package/dist/esm/salla-filters.entry.js +1 -1
  168. package/dist/esm/salla-hook.entry.js +2 -2
  169. package/dist/esm/salla-installment.entry.js +1 -1
  170. package/dist/esm/salla-loyalty-prize-item.entry.js +2 -2
  171. package/dist/esm/salla-loyalty-program.entry.js +2 -2
  172. package/dist/esm/salla-metadata.entry.js +1 -1
  173. package/dist/esm/salla-notification-item.entry.js +2 -2
  174. package/dist/esm/salla-notifications.entry.js +1 -1
  175. package/dist/esm/salla-offer.entry.js +1 -1
  176. package/dist/esm/salla-order-details-multiple-bundle-product.entry.js +2 -2
  177. package/dist/esm/salla-order-details-options.entry.js +1 -1
  178. package/dist/esm/salla-order-details.entry.js +2 -2
  179. package/dist/esm/salla-order-summary.entry.js +2 -2
  180. package/dist/esm/salla-order-totals-card.entry.js +1 -1
  181. package/dist/esm/salla-orders.entry.js +1 -1
  182. package/dist/esm/salla-payments.entry.js +3 -3
  183. package/dist/esm/salla-price-range.entry.js +3 -3
  184. package/dist/esm/salla-review-card.entry.js +2 -2
  185. package/dist/esm/salla-reviews-page.entry.js +2 -2
  186. package/dist/esm/salla-reviews.entry.js +2 -2
  187. package/dist/esm/salla-social.entry.js +2 -2
  188. package/dist/esm/salla-tiered-offer.entry.js +1 -1
  189. package/dist/esm/salla-tooltip.entry.js +2 -2
  190. package/dist/esm/salla-trust-badges.entry.js +1 -1
  191. package/dist/esm/salla-verify.entry.js +1 -1
  192. package/dist/esm/salla-wallet.entry.js +1 -1
  193. package/dist/esm/twilight.js +3 -3
  194. package/dist/twilight/p-057e38a1.entry.js +4 -0
  195. package/dist/twilight/p-19f40612.entry.js +4 -0
  196. package/dist/twilight/{p-10c954ff.entry.js → p-1c31f335.entry.js} +1 -1
  197. package/dist/twilight/{p-6baecf00.entry.js → p-1f31af27.entry.js} +1 -1
  198. package/dist/twilight/{p-bcae2015.entry.js → p-21ced14f.entry.js} +1 -1
  199. package/dist/twilight/{p-edc30e8d.entry.js → p-2bb93ed0.entry.js} +1 -1
  200. package/dist/twilight/{p-751f8d64.entry.js → p-3862a37f.entry.js} +1 -1
  201. package/dist/twilight/{p-9006bd13.entry.js → p-3f45a06b.entry.js} +1 -1
  202. package/dist/twilight/{p-77dbe4d3.entry.js → p-403bef37.entry.js} +1 -1
  203. package/dist/twilight/{p-6a6ca941.entry.js → p-4317d018.entry.js} +1 -1
  204. package/dist/twilight/{p-6f1bf015.entry.js → p-45053a9b.entry.js} +1 -1
  205. package/dist/twilight/{p-90f48bbc.entry.js → p-48d76aa7.entry.js} +1 -1
  206. package/dist/twilight/{p-abb6acb7.entry.js → p-56d3794f.entry.js} +1 -1
  207. package/dist/twilight/{p-cfd1bd43.entry.js → p-69600ceb.entry.js} +1 -1
  208. package/dist/twilight/{p-257c97c7.entry.js → p-817fca09.entry.js} +1 -1
  209. package/dist/twilight/{p-7da316d9.entry.js → p-877ee446.entry.js} +1 -1
  210. package/dist/twilight/p-878f405f.entry.js +4 -0
  211. package/dist/twilight/{p-aad5ea17.entry.js → p-88c9cdc0.entry.js} +1 -1
  212. package/dist/twilight/p-8d231ba5.entry.js +4 -0
  213. package/dist/twilight/p-9108e972.entry.js +4 -0
  214. package/dist/twilight/p-95f3e7ea.entry.js +4 -0
  215. package/dist/twilight/{p-C99niCgx.js → p-BgkeXrDK.js} +1 -1
  216. package/dist/twilight/{p-Cu8zDA0W.js → p-BxtqlawD.js} +1 -1
  217. package/dist/twilight/p-CRmtzwUF.js +5 -0
  218. package/dist/twilight/{p-VBs0_gXo.js → p-DTy6dAEi.js} +1 -1
  219. package/dist/twilight/{p-RIImqj-k.js → p-DdMTtNYY.js} +1 -1
  220. package/dist/twilight/{p-ChN2gm1a.js → p-VCBBJkYb.js} +1 -1
  221. package/dist/twilight/{p-B3B6KApY.js → p-YYVkPdoE.js} +1 -1
  222. package/dist/twilight/{p-81cb2ef8.entry.js → p-a3ae644b.entry.js} +1 -1
  223. package/dist/twilight/{p-a0720857.entry.js → p-a4ad6d0b.entry.js} +1 -1
  224. package/dist/twilight/{p-66e73a02.entry.js → p-a665ff5d.entry.js} +1 -1
  225. package/dist/twilight/{p-95e20ce6.entry.js → p-a9bec6cf.entry.js} +1 -1
  226. package/dist/twilight/{p-b6834fe3.entry.js → p-b7f1e672.entry.js} +1 -1
  227. package/dist/twilight/p-c0f8d377.entry.js +11 -0
  228. package/dist/twilight/{p-2f30b7d6.entry.js → p-e98f8bae.entry.js} +1 -1
  229. package/dist/twilight/{p-23b0afa5.entry.js → p-eb6378eb.entry.js} +1 -1
  230. package/dist/twilight/{p-4cb3c829.entry.js → p-ef827c32.entry.js} +1 -1
  231. package/dist/twilight/{p-fdda110d.entry.js → p-f01949b5.entry.js} +1 -1
  232. package/dist/twilight/{p-9f895d32.entry.js → p-f10087fd.entry.js} +1 -1
  233. package/dist/twilight/{p-a48db011.entry.js → p-f33a5658.entry.js} +1 -1
  234. package/dist/twilight/p-f4dc16e8.entry.js +4 -0
  235. package/dist/twilight/{p-c1f93ef4.entry.js → p-f6a7b2cf.entry.js} +1 -1
  236. package/dist/twilight/{p-my_auvQd.js → p-sFNa2aTl.js} +1 -1
  237. package/dist/twilight/{p-CSuYUYU-.js → p-xAxNmkBV.js} +1 -1
  238. package/dist/twilight/twilight.esm.js +1 -1
  239. package/dist/types/components/salla-button/salla-button.d.ts +0 -1
  240. package/dist/types/components/salla-comments/interfaces.d.ts +1 -0
  241. package/dist/types/components/salla-comments/salla-comment-item.d.ts +1 -0
  242. package/dist/types/components/salla-filters-widget/salla-filters-widget.d.ts +7 -2
  243. package/dist/types/components/salla-product-options/salla-product-options.d.ts +8 -0
  244. package/dist/types/components/salla-quantity-input/salla-quantity-input.d.ts +5 -1
  245. package/dist/types/components/salla-social-share/salla-social-share.d.ts +1 -0
  246. package/package.json +5 -5
  247. package/dist/twilight/p-44c0c27c.entry.js +0 -4
  248. package/dist/twilight/p-742e5dad.entry.js +0 -4
  249. package/dist/twilight/p-7b38bcfd.entry.js +0 -4
  250. package/dist/twilight/p-98dc3c50.entry.js +0 -4
  251. package/dist/twilight/p-CtDnNMoY.js +0 -5
  252. package/dist/twilight/p-a93459da.entry.js +0 -4
  253. package/dist/twilight/p-b3299eeb.entry.js +0 -4
  254. package/dist/twilight/p-e32ffd30.entry.js +0 -11
  255. package/dist/twilight/p-e47e36d7.entry.js +0 -4
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers.js';
5
5
 
6
- /*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */
6
+ /*! Axios v1.13.3 Copyright (c) 2026 Matt Zabriskie and contributors */
7
7
 
8
8
  var axios_1;
9
9
  var hasRequiredAxios;
@@ -12,6 +12,13 @@ function requireAxios () {
12
12
  if (hasRequiredAxios) return axios_1;
13
13
  hasRequiredAxios = 1;
14
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
+ */
15
22
  function bind(fn, thisArg) {
16
23
  return function wrap() {
17
24
  return fn.apply(thisArg, arguments);
@@ -63,7 +70,7 @@ function requireAxios () {
63
70
  */
64
71
  function isBuffer(val) {
65
72
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
66
- && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
73
+ && isFunction$1(val.constructor.isBuffer) && val.constructor.isBuffer(val);
67
74
  }
68
75
 
69
76
  /**
@@ -108,7 +115,7 @@ function requireAxios () {
108
115
  * @param {*} val The value to test
109
116
  * @returns {boolean} True if value is a Function, otherwise false
110
117
  */
111
- const isFunction = typeOfTest('function');
118
+ const isFunction$1 = typeOfTest('function');
112
119
 
113
120
  /**
114
121
  * Determine if a value is a Number
@@ -152,6 +159,27 @@ function requireAxios () {
152
159
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
153
160
  };
154
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
+
155
183
  /**
156
184
  * Determine if a value is a Date
157
185
  *
@@ -195,7 +223,7 @@ function requireAxios () {
195
223
  *
196
224
  * @returns {boolean} True if value is a Stream, otherwise false
197
225
  */
198
- const isStream = (val) => isObject(val) && isFunction(val.pipe);
226
+ const isStream = (val) => isObject(val) && isFunction$1(val.pipe);
199
227
 
200
228
  /**
201
229
  * Determine if a value is a FormData
@@ -208,10 +236,10 @@ function requireAxios () {
208
236
  let kind;
209
237
  return thing && (
210
238
  (typeof FormData === 'function' && thing instanceof FormData) || (
211
- isFunction(thing.append) && (
239
+ isFunction$1(thing.append) && (
212
240
  (kind = kindOf(thing)) === 'formdata' ||
213
241
  // detect form-data instance
214
- (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
242
+ (kind === 'object' && isFunction$1(thing.toString) && thing.toString() === '[object FormData]')
215
243
  )
216
244
  )
217
245
  )
@@ -247,10 +275,11 @@ function requireAxios () {
247
275
  * If 'obj' is an Object callback will be called passing
248
276
  * the value, key, and complete object for each property.
249
277
  *
250
- * @param {Object|Array} obj The object to iterate
278
+ * @param {Object|Array<unknown>} obj The object to iterate
251
279
  * @param {Function} fn The callback to invoke for each item
252
280
  *
253
- * @param {Boolean} [allOwnKeys = false]
281
+ * @param {Object} [options]
282
+ * @param {Boolean} [options.allOwnKeys = false]
254
283
  * @returns {any}
255
284
  */
256
285
  function forEach(obj, fn, {allOwnKeys = false} = {}) {
@@ -274,6 +303,11 @@ function requireAxios () {
274
303
  fn.call(null, obj[i], i, obj);
275
304
  }
276
305
  } else {
306
+ // Buffer check
307
+ if (isBuffer(obj)) {
308
+ return;
309
+ }
310
+
277
311
  // Iterate over object keys
278
312
  const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
279
313
  const len = keys.length;
@@ -287,6 +321,10 @@ function requireAxios () {
287
321
  }
288
322
 
289
323
  function findKey(obj, key) {
324
+ if (isBuffer(obj)){
325
+ return null;
326
+ }
327
+
290
328
  key = key.toLowerCase();
291
329
  const keys = Object.keys(obj);
292
330
  let i = keys.length;
@@ -318,7 +356,7 @@ function requireAxios () {
318
356
  * Example:
319
357
  *
320
358
  * ```js
321
- * var result = merge({foo: 123}, {foo: 456});
359
+ * const result = merge({foo: 123}, {foo: 456});
322
360
  * console.log(result.foo); // outputs 456
323
361
  * ```
324
362
  *
@@ -327,7 +365,7 @@ function requireAxios () {
327
365
  * @returns {Object} Result of all merge properties
328
366
  */
329
367
  function merge(/* obj1, obj2, obj3, ... */) {
330
- const {caseless} = isContextDefined(this) && this || {};
368
+ const {caseless, skipUndefined} = isContextDefined(this) && this || {};
331
369
  const result = {};
332
370
  const assignValue = (val, key) => {
333
371
  const targetKey = caseless && findKey(result, key) || key;
@@ -337,7 +375,7 @@ function requireAxios () {
337
375
  result[targetKey] = merge({}, val);
338
376
  } else if (isArray(val)) {
339
377
  result[targetKey] = val.slice();
340
- } else {
378
+ } else if (!skipUndefined || !isUndefined(val)) {
341
379
  result[targetKey] = val;
342
380
  }
343
381
  };
@@ -355,15 +393,26 @@ function requireAxios () {
355
393
  * @param {Object} b The object to copy properties from
356
394
  * @param {Object} thisArg The object to bind function to
357
395
  *
358
- * @param {Boolean} [allOwnKeys]
396
+ * @param {Object} [options]
397
+ * @param {Boolean} [options.allOwnKeys]
359
398
  * @returns {Object} The resulting value of object a
360
399
  */
361
400
  const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
362
401
  forEach(b, (val, key) => {
363
- if (thisArg && isFunction(val)) {
364
- a[key] = bind(val, thisArg);
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
+ });
365
409
  } else {
366
- a[key] = val;
410
+ Object.defineProperty(a, key, {
411
+ value: val,
412
+ writable: true,
413
+ enumerable: true,
414
+ configurable: true
415
+ });
367
416
  }
368
417
  }, {allOwnKeys});
369
418
  return a;
@@ -394,7 +443,12 @@ function requireAxios () {
394
443
  */
395
444
  const inherits = (constructor, superConstructor, props, descriptors) => {
396
445
  constructor.prototype = Object.create(superConstructor.prototype, descriptors);
397
- constructor.prototype.constructor = constructor;
446
+ Object.defineProperty(constructor.prototype, 'constructor', {
447
+ value: constructor,
448
+ writable: true,
449
+ enumerable: false,
450
+ configurable: true
451
+ });
398
452
  Object.defineProperty(constructor, 'super', {
399
453
  value: superConstructor.prototype
400
454
  });
@@ -576,13 +630,13 @@ function requireAxios () {
576
630
  const freezeMethods = (obj) => {
577
631
  reduceDescriptors(obj, (descriptor, name) => {
578
632
  // skip restricted props in strict mode
579
- if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
633
+ if (isFunction$1(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
580
634
  return false;
581
635
  }
582
636
 
583
637
  const value = obj[name];
584
638
 
585
- if (!isFunction(value)) return;
639
+ if (!isFunction$1(value)) return;
586
640
 
587
641
  descriptor.enumerable = false;
588
642
 
@@ -619,6 +673,8 @@ function requireAxios () {
619
673
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
620
674
  };
621
675
 
676
+
677
+
622
678
  /**
623
679
  * If the thing is a FormData object, return true, otherwise return false.
624
680
  *
@@ -627,7 +683,7 @@ function requireAxios () {
627
683
  * @returns {boolean}
628
684
  */
629
685
  function isSpecCompliantForm(thing) {
630
- return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
686
+ return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
631
687
  }
632
688
 
633
689
  const toJSONObject = (obj) => {
@@ -640,6 +696,11 @@ function requireAxios () {
640
696
  return;
641
697
  }
642
698
 
699
+ //Buffer check
700
+ if (isBuffer(source)) {
701
+ return source;
702
+ }
703
+
643
704
  if(!('toJSON' in source)) {
644
705
  stack[i] = source;
645
706
  const target = isArray(source) ? [] : {};
@@ -664,7 +725,7 @@ function requireAxios () {
664
725
  const isAsyncFn = kindOfTest('AsyncFunction');
665
726
 
666
727
  const isThenable = (thing) =>
667
- thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
728
+ thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
668
729
 
669
730
  // original code
670
731
  // https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34
@@ -688,7 +749,7 @@ function requireAxios () {
688
749
  })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
689
750
  })(
690
751
  typeof setImmediate === 'function',
691
- isFunction(_global.postMessage)
752
+ isFunction$1(_global.postMessage)
692
753
  );
693
754
 
694
755
  const asap = typeof queueMicrotask !== 'undefined' ?
@@ -697,7 +758,7 @@ function requireAxios () {
697
758
  // *********************
698
759
 
699
760
 
700
- const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
761
+ const isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
701
762
 
702
763
 
703
764
  var utils$1 = {
@@ -711,6 +772,7 @@ function requireAxios () {
711
772
  isBoolean,
712
773
  isObject,
713
774
  isPlainObject,
775
+ isEmptyObject,
714
776
  isReadableStream,
715
777
  isRequest,
716
778
  isResponse,
@@ -720,7 +782,7 @@ function requireAxios () {
720
782
  isFile,
721
783
  isBlob,
722
784
  isRegExp,
723
- isFunction,
785
+ isFunction: isFunction$1,
724
786
  isStream,
725
787
  isURLSearchParams,
726
788
  isTypedArray,
@@ -759,103 +821,75 @@ function requireAxios () {
759
821
  isIterable
760
822
  };
761
823
 
762
- /**
763
- * Create an Error with the specified message, config, error code, request and response.
764
- *
765
- * @param {string} message The error message.
766
- * @param {string} [code] The error code (for example, 'ECONNABORTED').
767
- * @param {Object} [config] The config.
768
- * @param {Object} [request] The request.
769
- * @param {Object} [response] The response.
770
- *
771
- * @returns {Error} The created error.
772
- */
773
- function AxiosError(message, code, config, request, response) {
774
- Error.call(this);
775
-
776
- if (Error.captureStackTrace) {
777
- Error.captureStackTrace(this, this.constructor);
778
- } else {
779
- this.stack = (new Error()).stack;
780
- }
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
+ }
781
856
 
782
- this.message = message;
783
- this.name = 'AxiosError';
784
- code && (this.code = code);
785
- config && (this.config = config);
786
- request && (this.request = request);
787
- if (response) {
788
- this.response = response;
789
- this.status = response.status ? response.status : null;
790
- }
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
+ }
791
876
  }
792
877
 
793
- utils$1.inherits(AxiosError, Error, {
794
- toJSON: function toJSON() {
795
- return {
796
- // Standard
797
- message: this.message,
798
- name: this.name,
799
- // Microsoft
800
- description: this.description,
801
- number: this.number,
802
- // Mozilla
803
- fileName: this.fileName,
804
- lineNumber: this.lineNumber,
805
- columnNumber: this.columnNumber,
806
- stack: this.stack,
807
- // Axios
808
- config: utils$1.toJSONObject(this.config),
809
- code: this.code,
810
- status: this.status
811
- };
812
- }
813
- });
814
-
815
- const prototype$1 = AxiosError.prototype;
816
- const descriptors = {};
817
-
818
- [
819
- 'ERR_BAD_OPTION_VALUE',
820
- 'ERR_BAD_OPTION',
821
- 'ECONNABORTED',
822
- 'ETIMEDOUT',
823
- 'ERR_NETWORK',
824
- 'ERR_FR_TOO_MANY_REDIRECTS',
825
- 'ERR_DEPRECATED',
826
- 'ERR_BAD_RESPONSE',
827
- 'ERR_BAD_REQUEST',
828
- 'ERR_CANCELED',
829
- 'ERR_NOT_SUPPORT',
830
- 'ERR_INVALID_URL'
831
- // eslint-disable-next-line func-names
832
- ].forEach(code => {
833
- descriptors[code] = {value: code};
834
- });
835
-
836
- Object.defineProperties(AxiosError, descriptors);
837
- Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
838
-
839
- // eslint-disable-next-line func-names
840
- AxiosError.from = (error, code, config, request, response, customProps) => {
841
- const axiosError = Object.create(prototype$1);
842
-
843
- utils$1.toFlatObject(error, axiosError, function filter(obj) {
844
- return obj !== Error.prototype;
845
- }, prop => {
846
- return prop !== 'isAxiosError';
847
- });
848
-
849
- AxiosError.call(axiosError, error.message, code, config, request, response);
850
-
851
- axiosError.cause = error;
852
-
853
- axiosError.name = error.name;
854
-
855
- customProps && Object.assign(axiosError, customProps);
856
-
857
- return axiosError;
858
- };
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;
859
893
 
860
894
  // eslint-disable-next-line strict
861
895
  var httpAdapter = null;
@@ -980,7 +1014,7 @@ function requireAxios () {
980
1014
  }
981
1015
 
982
1016
  if (!useBlob && utils$1.isBlob(value)) {
983
- throw new AxiosError('Blob is not supported. Use a Buffer instead.');
1017
+ throw new AxiosError$1('Blob is not supported. Use a Buffer instead.');
984
1018
  }
985
1019
 
986
1020
  if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
@@ -1141,9 +1175,7 @@ function requireAxios () {
1141
1175
  replace(/%3A/gi, ':').
1142
1176
  replace(/%24/g, '$').
1143
1177
  replace(/%2C/gi, ',').
1144
- replace(/%20/g, '+').
1145
- replace(/%5B/gi, '[').
1146
- replace(/%5D/gi, ']');
1178
+ replace(/%20/g, '+');
1147
1179
  }
1148
1180
 
1149
1181
  /**
@@ -1156,29 +1188,26 @@ function requireAxios () {
1156
1188
  * @returns {string} The formatted url
1157
1189
  */
1158
1190
  function buildURL(url, params, options) {
1159
- /*eslint no-param-reassign:0*/
1160
1191
  if (!params) {
1161
1192
  return url;
1162
1193
  }
1163
-
1194
+
1164
1195
  const _encode = options && options.encode || encode;
1165
1196
 
1166
- if (utils$1.isFunction(options)) {
1167
- options = {
1168
- serialize: options
1169
- };
1170
- }
1197
+ const _options = utils$1.isFunction(options) ? {
1198
+ serialize: options
1199
+ } : options;
1171
1200
 
1172
- const serializeFn = options && options.serialize;
1201
+ const serializeFn = _options && _options.serialize;
1173
1202
 
1174
1203
  let serializedParams;
1175
1204
 
1176
1205
  if (serializeFn) {
1177
- serializedParams = serializeFn(params, options);
1206
+ serializedParams = serializeFn(params, _options);
1178
1207
  } else {
1179
1208
  serializedParams = utils$1.isURLSearchParams(params) ?
1180
1209
  params.toString() :
1181
- new AxiosURLSearchParams(params, options).toString(_encode);
1210
+ new AxiosURLSearchParams(params, _options).toString(_encode);
1182
1211
  }
1183
1212
 
1184
1213
  if (serializedParams) {
@@ -1203,6 +1232,7 @@ function requireAxios () {
1203
1232
  *
1204
1233
  * @param {Function} fulfilled The function to handle `then` for a `Promise`
1205
1234
  * @param {Function} rejected The function to handle `reject` for a `Promise`
1235
+ * @param {Object} options The options for the interceptor, synchronous and runWhen
1206
1236
  *
1207
1237
  * @return {Number} An ID used to remove interceptor later
1208
1238
  */
@@ -1221,7 +1251,7 @@ function requireAxios () {
1221
1251
  *
1222
1252
  * @param {Number} id The ID that was returned by `use`
1223
1253
  *
1224
- * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
1254
+ * @returns {void}
1225
1255
  */
1226
1256
  eject(id) {
1227
1257
  if (this.handlers[id]) {
@@ -1342,7 +1372,7 @@ function requireAxios () {
1342
1372
  };
1343
1373
 
1344
1374
  function toURLEncodedForm(data, options) {
1345
- return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
1375
+ return toFormData(data, new platform.classes.URLSearchParams(), {
1346
1376
  visitor: function(value, key, path, helpers) {
1347
1377
  if (platform.isNode && utils$1.isBuffer(value)) {
1348
1378
  this.append(key, value.toString('base64'));
@@ -1350,8 +1380,9 @@ function requireAxios () {
1350
1380
  }
1351
1381
 
1352
1382
  return helpers.defaultVisitor.apply(this, arguments);
1353
- }
1354
- }, options));
1383
+ },
1384
+ ...options
1385
+ });
1355
1386
  }
1356
1387
 
1357
1388
  /**
@@ -1547,11 +1578,11 @@ function requireAxios () {
1547
1578
  const strictJSONParsing = !silentJSONParsing && JSONRequested;
1548
1579
 
1549
1580
  try {
1550
- return JSON.parse(data);
1581
+ return JSON.parse(data, this.parseReviver);
1551
1582
  } catch (e) {
1552
1583
  if (strictJSONParsing) {
1553
1584
  if (e.name === 'SyntaxError') {
1554
- throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);
1585
+ throw AxiosError$1.from(e, AxiosError$1.ERR_BAD_RESPONSE, this, null, this.response);
1555
1586
  }
1556
1587
  throw e;
1557
1588
  }
@@ -1985,24 +2016,24 @@ function requireAxios () {
1985
2016
  return !!(value && value.__CANCEL__);
1986
2017
  }
1987
2018
 
1988
- /**
1989
- * A `CanceledError` is an object that is thrown when an operation is canceled.
1990
- *
1991
- * @param {string=} message The message.
1992
- * @param {Object=} config The config.
1993
- * @param {Object=} request The request.
1994
- *
1995
- * @returns {CanceledError} The created error.
1996
- */
1997
- function CanceledError(message, config, request) {
1998
- // eslint-disable-next-line no-eq-null,eqeqeq
1999
- AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);
2000
- this.name = 'CanceledError';
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
+ }
2001
2034
  }
2002
2035
 
2003
- utils$1.inherits(CanceledError, AxiosError, {
2004
- __CANCEL__: true
2005
- });
2036
+ var CanceledError$1 = CanceledError;
2006
2037
 
2007
2038
  /**
2008
2039
  * Resolve or reject a Promise based on response status.
@@ -2018,9 +2049,9 @@ function requireAxios () {
2018
2049
  if (!response.status || !validateStatus || validateStatus(response.status)) {
2019
2050
  resolve(response);
2020
2051
  } else {
2021
- reject(new AxiosError(
2052
+ reject(new AxiosError$1(
2022
2053
  'Request failed with status code ' + response.status,
2023
- [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
2054
+ [AxiosError$1.ERR_BAD_REQUEST, AxiosError$1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
2024
2055
  response.config,
2025
2056
  response.request,
2026
2057
  response
@@ -2104,7 +2135,7 @@ function requireAxios () {
2104
2135
  clearTimeout(timer);
2105
2136
  timer = null;
2106
2137
  }
2107
- fn.apply(null, args);
2138
+ fn(...args);
2108
2139
  };
2109
2140
 
2110
2141
  const throttled = (...args) => {
@@ -2186,27 +2217,38 @@ function requireAxios () {
2186
2217
 
2187
2218
  // Standard browser envs support document.cookie
2188
2219
  {
2189
- write(name, value, expires, path, domain, secure) {
2190
- const cookie = [name + '=' + encodeURIComponent(value)];
2220
+ write(name, value, expires, path, domain, secure, sameSite) {
2221
+ if (typeof document === 'undefined') return;
2191
2222
 
2192
- utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
2223
+ const cookie = [`${name}=${encodeURIComponent(value)}`];
2193
2224
 
2194
- utils$1.isString(path) && cookie.push('path=' + path);
2195
-
2196
- utils$1.isString(domain) && cookie.push('domain=' + domain);
2197
-
2198
- secure === true && cookie.push('secure');
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
+ }
2199
2240
 
2200
2241
  document.cookie = cookie.join('; ');
2201
2242
  },
2202
2243
 
2203
2244
  read(name) {
2204
- const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
2205
- return (match ? decodeURIComponent(match[3]) : null);
2245
+ if (typeof document === 'undefined') return null;
2246
+ const match = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
2247
+ return match ? decodeURIComponent(match[1]) : null;
2206
2248
  },
2207
2249
 
2208
2250
  remove(name) {
2209
- this.write(name, '', Date.now() - 86400000);
2251
+ this.write(name, '', Date.now() - 86400000, '/');
2210
2252
  }
2211
2253
  }
2212
2254
 
@@ -2285,7 +2327,7 @@ function requireAxios () {
2285
2327
 
2286
2328
  function getMergedValue(target, source, prop, caseless) {
2287
2329
  if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
2288
- return utils$1.merge.call({caseless}, target, source);
2330
+ return utils$1.merge.call({ caseless }, target, source);
2289
2331
  } else if (utils$1.isPlainObject(source)) {
2290
2332
  return utils$1.merge({}, source);
2291
2333
  } else if (utils$1.isArray(source)) {
@@ -2294,12 +2336,11 @@ function requireAxios () {
2294
2336
  return source;
2295
2337
  }
2296
2338
 
2297
- // eslint-disable-next-line consistent-return
2298
- function mergeDeepProperties(a, b, prop , caseless) {
2339
+ function mergeDeepProperties(a, b, prop, caseless) {
2299
2340
  if (!utils$1.isUndefined(b)) {
2300
- return getMergedValue(a, b, prop , caseless);
2341
+ return getMergedValue(a, b, prop, caseless);
2301
2342
  } else if (!utils$1.isUndefined(a)) {
2302
- return getMergedValue(undefined, a, prop , caseless);
2343
+ return getMergedValue(undefined, a, prop, caseless);
2303
2344
  }
2304
2345
  }
2305
2346
 
@@ -2357,10 +2398,10 @@ function requireAxios () {
2357
2398
  socketPath: defaultToConfig2,
2358
2399
  responseEncoding: defaultToConfig2,
2359
2400
  validateStatus: mergeDirectKeys,
2360
- headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
2401
+ headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
2361
2402
  };
2362
2403
 
2363
- utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
2404
+ utils$1.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
2364
2405
  const merge = mergeMap[prop] || mergeDeepProperties;
2365
2406
  const configValue = merge(config1[prop], config2[prop], prop);
2366
2407
  (utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
@@ -2372,7 +2413,7 @@ function requireAxios () {
2372
2413
  var resolveConfig = (config) => {
2373
2414
  const newConfig = mergeConfig({}, config);
2374
2415
 
2375
- let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;
2416
+ let { data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth } = newConfig;
2376
2417
 
2377
2418
  newConfig.headers = headers = AxiosHeaders$1.from(headers);
2378
2419
 
@@ -2385,17 +2426,21 @@ function requireAxios () {
2385
2426
  );
2386
2427
  }
2387
2428
 
2388
- let contentType;
2389
-
2390
2429
  if (utils$1.isFormData(data)) {
2391
2430
  if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
2392
- headers.setContentType(undefined); // Let the browser set it
2393
- } else if ((contentType = headers.getContentType()) !== false) {
2394
- // fix semicolon duplication issue for ReactNative FormData implementation
2395
- const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
2396
- headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
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
+ });
2397
2442
  }
2398
- }
2443
+ }
2399
2444
 
2400
2445
  // Add xsrf header
2401
2446
  // This is only done if running in a standard browser environment.
@@ -2505,22 +2550,25 @@ function requireAxios () {
2505
2550
  return;
2506
2551
  }
2507
2552
 
2508
- reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));
2553
+ reject(new AxiosError$1('Request aborted', AxiosError$1.ECONNABORTED, config, request));
2509
2554
 
2510
2555
  // Clean up request
2511
2556
  request = null;
2512
2557
  };
2513
2558
 
2514
2559
  // Handle low level network errors
2515
- request.onerror = function handleError() {
2516
- // Real errors are hidden from us by the browser
2517
- // onerror should only fire if it's a network error
2518
- reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));
2519
-
2520
- // Clean up request
2521
- request = null;
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;
2522
2570
  };
2523
-
2571
+
2524
2572
  // Handle timeout
2525
2573
  request.ontimeout = function handleTimeout() {
2526
2574
  let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';
@@ -2528,9 +2576,9 @@ function requireAxios () {
2528
2576
  if (_config.timeoutErrorMessage) {
2529
2577
  timeoutErrorMessage = _config.timeoutErrorMessage;
2530
2578
  }
2531
- reject(new AxiosError(
2579
+ reject(new AxiosError$1(
2532
2580
  timeoutErrorMessage,
2533
- transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,
2581
+ transitional.clarifyTimeoutError ? AxiosError$1.ETIMEDOUT : AxiosError$1.ECONNABORTED,
2534
2582
  config,
2535
2583
  request));
2536
2584
 
@@ -2580,7 +2628,7 @@ function requireAxios () {
2580
2628
  if (!request) {
2581
2629
  return;
2582
2630
  }
2583
- reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);
2631
+ reject(!cancel || cancel.type ? new CanceledError$1(null, config, request) : cancel);
2584
2632
  request.abort();
2585
2633
  request = null;
2586
2634
  };
@@ -2594,7 +2642,7 @@ function requireAxios () {
2594
2642
  const protocol = parseProtocol(_config.url);
2595
2643
 
2596
2644
  if (protocol && platform.protocols.indexOf(protocol) === -1) {
2597
- reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));
2645
+ reject(new AxiosError$1('Unsupported protocol ' + protocol + ':', AxiosError$1.ERR_BAD_REQUEST, config));
2598
2646
  return;
2599
2647
  }
2600
2648
 
@@ -2617,13 +2665,13 @@ function requireAxios () {
2617
2665
  aborted = true;
2618
2666
  unsubscribe();
2619
2667
  const err = reason instanceof Error ? reason : this.reason;
2620
- controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
2668
+ controller.abort(err instanceof AxiosError$1 ? err : new CanceledError$1(err instanceof Error ? err.message : err));
2621
2669
  }
2622
2670
  };
2623
2671
 
2624
2672
  let timer = timeout && setTimeout(() => {
2625
2673
  timer = null;
2626
- onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT));
2674
+ onabort(new AxiosError$1(`timeout of ${timeout}ms exceeded`, AxiosError$1.ETIMEDOUT));
2627
2675
  }, timeout);
2628
2676
 
2629
2677
  const unsubscribe = () => {
@@ -2736,14 +2784,18 @@ function requireAxios () {
2736
2784
  })
2737
2785
  };
2738
2786
 
2739
- const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
2740
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
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;
2741
2798
 
2742
- // used only inside the fetch adapter
2743
- const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
2744
- ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
2745
- async (str) => new Uint8Array(await new Response(str).arrayBuffer())
2746
- );
2747
2799
 
2748
2800
  const test = (fn, ...args) => {
2749
2801
  try {
@@ -2753,278 +2805,380 @@ function requireAxios () {
2753
2805
  }
2754
2806
  };
2755
2807
 
2756
- const supportsRequestStream = isReadableStreamSupported && test(() => {
2757
- let duplexAccessed = false;
2808
+ const factory = (env) => {
2809
+ env = utils$1.merge.call({
2810
+ skipUndefined: true
2811
+ }, globalFetchAPI, env);
2758
2812
 
2759
- const hasContentType = new Request(platform.origin, {
2760
- body: new ReadableStream(),
2761
- method: 'POST',
2762
- get duplex() {
2763
- duplexAccessed = true;
2764
- return 'half';
2765
- },
2766
- }).headers.has('Content-Type');
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);
2767
2817
 
2768
- return duplexAccessed && !hasContentType;
2769
- });
2818
+ if (!isFetchSupported) {
2819
+ return false;
2820
+ }
2770
2821
 
2771
- const DEFAULT_CHUNK_SIZE = 64 * 1024;
2822
+ const isReadableStreamSupported = isFetchSupported && isFunction(ReadableStream$1);
2772
2823
 
2773
- const supportsResponseStream = isReadableStreamSupported &&
2774
- test(() => utils$1.isReadableStream(new Response('').body));
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
+ );
2775
2828
 
2829
+ const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
2830
+ let duplexAccessed = false;
2776
2831
 
2777
- const resolvers = {
2778
- stream: supportsResponseStream && ((res) => res.body)
2779
- };
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');
2780
2840
 
2781
- isFetchSupported && (((res) => {
2782
- ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {
2783
- !resolvers[type] && (resolvers[type] = utils$1.isFunction(res[type]) ? (res) => res[type]() :
2784
- (_, config) => {
2785
- throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);
2786
- });
2841
+ return duplexAccessed && !hasContentType;
2787
2842
  });
2788
- })(new Response));
2789
2843
 
2790
- const getBodyLength = async (body) => {
2791
- if (body == null) {
2792
- return 0;
2793
- }
2844
+ const supportsResponseStream = isResponseSupported && isReadableStreamSupported &&
2845
+ test(() => utils$1.isReadableStream(new Response('').body));
2794
2846
 
2795
- if(utils$1.isBlob(body)) {
2796
- return body.size;
2797
- }
2847
+ const resolvers = {
2848
+ stream: supportsResponseStream && ((res) => res.body)
2849
+ };
2798
2850
 
2799
- if(utils$1.isSpecCompliantForm(body)) {
2800
- const _request = new Request(platform.origin, {
2801
- method: 'POST',
2802
- body,
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
+ });
2803
2862
  });
2804
- return (await _request.arrayBuffer()).byteLength;
2805
- }
2863
+ })());
2806
2864
 
2807
- if(utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
2808
- return body.byteLength;
2809
- }
2865
+ const getBodyLength = async (body) => {
2866
+ if (body == null) {
2867
+ return 0;
2868
+ }
2810
2869
 
2811
- if(utils$1.isURLSearchParams(body)) {
2812
- body = body + '';
2813
- }
2870
+ if (utils$1.isBlob(body)) {
2871
+ return body.size;
2872
+ }
2814
2873
 
2815
- if(utils$1.isString(body)) {
2816
- return (await encodeText(body)).byteLength;
2817
- }
2818
- };
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
+ }
2819
2881
 
2820
- const resolveBodyLength = async (headers, body) => {
2821
- const length = utils$1.toFiniteNumber(headers.getContentLength());
2882
+ if (utils$1.isArrayBufferView(body) || utils$1.isArrayBuffer(body)) {
2883
+ return body.byteLength;
2884
+ }
2822
2885
 
2823
- return length == null ? getBodyLength(body) : length;
2824
- };
2886
+ if (utils$1.isURLSearchParams(body)) {
2887
+ body = body + '';
2888
+ }
2825
2889
 
2826
- var fetchAdapter = isFetchSupported && (async (config) => {
2827
- let {
2828
- url,
2829
- method,
2830
- data,
2831
- signal,
2832
- cancelToken,
2833
- timeout,
2834
- onDownloadProgress,
2835
- onUploadProgress,
2836
- responseType,
2837
- headers,
2838
- withCredentials = 'same-origin',
2839
- fetchOptions
2840
- } = resolveConfig(config);
2841
-
2842
- responseType = responseType ? (responseType + '').toLowerCase() : 'text';
2843
-
2844
- let composedSignal = composeSignals$1([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
2845
-
2846
- let request;
2847
-
2848
- const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {
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 && (() => {
2849
2926
  composedSignal.unsubscribe();
2850
- });
2927
+ });
2851
2928
 
2852
- let requestContentLength;
2929
+ let requestContentLength;
2853
2930
 
2854
- try {
2855
- if (
2856
- onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&
2857
- (requestContentLength = await resolveBodyLength(headers, data)) !== 0
2858
- ) {
2859
- let _request = new Request(url, {
2860
- method: 'POST',
2861
- body: data,
2862
- duplex: "half"
2863
- });
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
+ });
2864
2941
 
2865
- let contentTypeHeader;
2942
+ let contentTypeHeader;
2866
2943
 
2867
- if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
2868
- headers.setContentType(contentTypeHeader);
2869
- }
2944
+ if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {
2945
+ headers.setContentType(contentTypeHeader);
2946
+ }
2870
2947
 
2871
- if (_request.body) {
2872
- const [onProgress, flush] = progressEventDecorator(
2873
- requestContentLength,
2874
- progressEventReducer(asyncDecorator(onUploadProgress))
2875
- );
2948
+ if (_request.body) {
2949
+ const [onProgress, flush] = progressEventDecorator(
2950
+ requestContentLength,
2951
+ progressEventReducer(asyncDecorator(onUploadProgress))
2952
+ );
2876
2953
 
2877
- data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
2954
+ data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);
2955
+ }
2878
2956
  }
2879
- }
2880
2957
 
2881
- if (!utils$1.isString(withCredentials)) {
2882
- withCredentials = withCredentials ? 'include' : 'omit';
2883
- }
2958
+ if (!utils$1.isString(withCredentials)) {
2959
+ withCredentials = withCredentials ? 'include' : 'omit';
2960
+ }
2884
2961
 
2885
- // Cloudflare Workers throws when credentials are defined
2886
- // see https://github.com/cloudflare/workerd/issues/902
2887
- const isCredentialsSupported = "credentials" in Request.prototype;
2888
- request = new Request(url, {
2889
- ...fetchOptions,
2890
- signal: composedSignal,
2891
- method: method.toUpperCase(),
2892
- headers: headers.normalize().toJSON(),
2893
- body: data,
2894
- duplex: "half",
2895
- credentials: isCredentialsSupported ? withCredentials : undefined
2896
- });
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;
2897
2965
 
2898
- let response = await fetch(request, fetchOptions);
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
+ };
2899
2975
 
2900
- const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
2976
+ request = isRequestSupported && new Request(url, resolvedOptions);
2901
2977
 
2902
- if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
2903
- const options = {};
2978
+ let response = await (isRequestSupported ? _fetch(request, fetchOptions) : _fetch(url, resolvedOptions));
2904
2979
 
2905
- ['status', 'statusText', 'headers'].forEach(prop => {
2906
- options[prop] = response[prop];
2907
- });
2980
+ const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');
2908
2981
 
2909
- const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
2982
+ if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {
2983
+ const options = {};
2910
2984
 
2911
- const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
2912
- responseContentLength,
2913
- progressEventReducer(asyncDecorator(onDownloadProgress), true)
2914
- ) || [];
2985
+ ['status', 'statusText', 'headers'].forEach(prop => {
2986
+ options[prop] = response[prop];
2987
+ });
2915
2988
 
2916
- response = new Response(
2917
- trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
2918
- flush && flush();
2919
- unsubscribe && unsubscribe();
2920
- }),
2921
- options
2922
- );
2923
- }
2989
+ const responseContentLength = utils$1.toFiniteNumber(response.headers.get('content-length'));
2924
2990
 
2925
- responseType = responseType || 'text';
2991
+ const [onProgress, flush] = onDownloadProgress && progressEventDecorator(
2992
+ responseContentLength,
2993
+ progressEventReducer(asyncDecorator(onDownloadProgress), true)
2994
+ ) || [];
2926
2995
 
2927
- let responseData = await resolvers[utils$1.findKey(resolvers, responseType) || 'text'](response, config);
2996
+ response = new Response(
2997
+ trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {
2998
+ flush && flush();
2999
+ unsubscribe && unsubscribe();
3000
+ }),
3001
+ options
3002
+ );
3003
+ }
2928
3004
 
2929
- !isStreamResponse && unsubscribe && unsubscribe();
3005
+ responseType = responseType || 'text';
2930
3006
 
2931
- return await new Promise((resolve, reject) => {
2932
- settle(resolve, reject, {
2933
- data: responseData,
2934
- headers: AxiosHeaders$1.from(response.headers),
2935
- status: response.status,
2936
- statusText: response.statusText,
2937
- config,
2938
- request
2939
- });
2940
- })
2941
- } catch (err) {
2942
- unsubscribe && unsubscribe();
2943
-
2944
- if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
2945
- throw Object.assign(
2946
- new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
2947
- {
2948
- cause: err.cause || err
2949
- }
2950
- )
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);
2951
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;
2952
3049
 
2953
- throw AxiosError.from(err, err && err.code, config, request);
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;
2954
3057
  }
2955
- });
2956
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
+ */
2957
3073
  const knownAdapters = {
2958
3074
  http: httpAdapter,
2959
3075
  xhr: xhrAdapter,
2960
- fetch: fetchAdapter
3076
+ fetch: {
3077
+ get: getFetch,
3078
+ }
2961
3079
  };
2962
3080
 
3081
+ // Assign adapter names for easier debugging and identification
2963
3082
  utils$1.forEach(knownAdapters, (fn, value) => {
2964
3083
  if (fn) {
2965
3084
  try {
2966
- Object.defineProperty(fn, 'name', {value});
3085
+ Object.defineProperty(fn, 'name', { value });
2967
3086
  } catch (e) {
2968
3087
  // eslint-disable-next-line no-empty
2969
3088
  }
2970
- Object.defineProperty(fn, 'adapterName', {value});
3089
+ Object.defineProperty(fn, 'adapterName', { value });
2971
3090
  }
2972
3091
  });
2973
3092
 
3093
+ /**
3094
+ * Render a rejection reason string for unknown or unsupported adapters
3095
+ *
3096
+ * @param {string} reason
3097
+ * @returns {string}
3098
+ */
2974
3099
  const renderReason = (reason) => `- ${reason}`;
2975
3100
 
3101
+ /**
3102
+ * Check if the adapter is resolved (function, null, or false)
3103
+ *
3104
+ * @param {Function|null|false} adapter
3105
+ * @returns {boolean}
3106
+ */
2976
3107
  const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
2977
3108
 
2978
- var adapters = {
2979
- getAdapter: (adapters) => {
2980
- adapters = utils$1.isArray(adapters) ? adapters : [adapters];
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];
2981
3121
 
2982
- const {length} = adapters;
2983
- let nameOrAdapter;
2984
- let adapter;
3122
+ const { length } = adapters;
3123
+ let nameOrAdapter;
3124
+ let adapter;
2985
3125
 
2986
- const rejectedReasons = {};
3126
+ const rejectedReasons = {};
2987
3127
 
2988
- for (let i = 0; i < length; i++) {
2989
- nameOrAdapter = adapters[i];
2990
- let id;
3128
+ for (let i = 0; i < length; i++) {
3129
+ nameOrAdapter = adapters[i];
3130
+ let id;
2991
3131
 
2992
- adapter = nameOrAdapter;
3132
+ adapter = nameOrAdapter;
2993
3133
 
2994
- if (!isResolvedHandle(nameOrAdapter)) {
2995
- adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
3134
+ if (!isResolvedHandle(nameOrAdapter)) {
3135
+ adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
2996
3136
 
2997
- if (adapter === undefined) {
2998
- throw new AxiosError(`Unknown adapter '${id}'`);
2999
- }
3000
- }
3001
-
3002
- if (adapter) {
3003
- break;
3137
+ if (adapter === undefined) {
3138
+ throw new AxiosError$1(`Unknown adapter '${id}'`);
3004
3139
  }
3140
+ }
3005
3141
 
3006
- rejectedReasons[id || '#' + i] = adapter;
3142
+ if (adapter && (utils$1.isFunction(adapter) || (adapter = adapter.get(config)))) {
3143
+ break;
3007
3144
  }
3008
3145
 
3009
- if (!adapter) {
3146
+ rejectedReasons[id || '#' + i] = adapter;
3147
+ }
3010
3148
 
3011
- const reasons = Object.entries(rejectedReasons)
3012
- .map(([id, state]) => `adapter ${id} ` +
3013
- (state === false ? 'is not supported by the environment' : 'is not available in the build')
3014
- );
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
+ );
3015
3154
 
3016
- let s = length ?
3017
- (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
3018
- 'as no adapter specified';
3155
+ let s = length ?
3156
+ (reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
3157
+ 'as no adapter specified';
3019
3158
 
3020
- throw new AxiosError(
3021
- `There is no suitable adapter to dispatch the request ` + s,
3022
- 'ERR_NOT_SUPPORT'
3023
- );
3024
- }
3159
+ throw new AxiosError$1(
3160
+ `There is no suitable adapter to dispatch the request ` + s,
3161
+ 'ERR_NOT_SUPPORT'
3162
+ );
3163
+ }
3025
3164
 
3026
- return adapter;
3027
- },
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
+ */
3028
3182
  adapters: knownAdapters
3029
3183
  };
3030
3184
 
@@ -3041,7 +3195,7 @@ function requireAxios () {
3041
3195
  }
3042
3196
 
3043
3197
  if (config.signal && config.signal.aborted) {
3044
- throw new CanceledError(null, config);
3198
+ throw new CanceledError$1(null, config);
3045
3199
  }
3046
3200
  }
3047
3201
 
@@ -3067,7 +3221,7 @@ function requireAxios () {
3067
3221
  config.headers.setContentType('application/x-www-form-urlencoded', false);
3068
3222
  }
3069
3223
 
3070
- const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter);
3224
+ const adapter = adapters.getAdapter(config.adapter || defaults$1.adapter, config);
3071
3225
 
3072
3226
  return adapter(config).then(function onAdapterResolution(response) {
3073
3227
  throwIfCancellationRequested(config);
@@ -3101,7 +3255,7 @@ function requireAxios () {
3101
3255
  });
3102
3256
  }
3103
3257
 
3104
- const VERSION = "1.10.0";
3258
+ const VERSION = "1.13.3";
3105
3259
 
3106
3260
  const validators$1 = {};
3107
3261
 
@@ -3131,9 +3285,9 @@ function requireAxios () {
3131
3285
  // eslint-disable-next-line func-names
3132
3286
  return (value, opt, opts) => {
3133
3287
  if (validator === false) {
3134
- throw new AxiosError(
3288
+ throw new AxiosError$1(
3135
3289
  formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
3136
- AxiosError.ERR_DEPRECATED
3290
+ AxiosError$1.ERR_DEPRECATED
3137
3291
  );
3138
3292
  }
3139
3293
 
@@ -3172,7 +3326,7 @@ function requireAxios () {
3172
3326
 
3173
3327
  function assertOptions(options, schema, allowUnknown) {
3174
3328
  if (typeof options !== 'object') {
3175
- throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);
3329
+ throw new AxiosError$1('options must be an object', AxiosError$1.ERR_BAD_OPTION_VALUE);
3176
3330
  }
3177
3331
  const keys = Object.keys(options);
3178
3332
  let i = keys.length;
@@ -3183,12 +3337,12 @@ function requireAxios () {
3183
3337
  const value = options[opt];
3184
3338
  const result = value === undefined || validator(value, opt, options);
3185
3339
  if (result !== true) {
3186
- throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);
3340
+ throw new AxiosError$1('option ' + opt + ' must be ' + result, AxiosError$1.ERR_BAD_OPTION_VALUE);
3187
3341
  }
3188
3342
  continue;
3189
3343
  }
3190
3344
  if (allowUnknown !== true) {
3191
- throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);
3345
+ throw new AxiosError$1('Unknown option ' + opt, AxiosError$1.ERR_BAD_OPTION);
3192
3346
  }
3193
3347
  }
3194
3348
  }
@@ -3340,14 +3494,19 @@ function requireAxios () {
3340
3494
 
3341
3495
  if (!synchronousRequestInterceptors) {
3342
3496
  const chain = [dispatchRequest.bind(this), undefined];
3343
- chain.unshift.apply(chain, requestInterceptorChain);
3344
- chain.push.apply(chain, responseInterceptorChain);
3497
+ chain.unshift(...requestInterceptorChain);
3498
+ chain.push(...responseInterceptorChain);
3345
3499
  len = chain.length;
3346
3500
 
3347
3501
  promise = Promise.resolve(config);
3348
3502
 
3503
+ let prevResult = config;
3349
3504
  while (i < len) {
3350
- promise = promise.then(chain[i++], chain[i++]);
3505
+ promise = promise
3506
+ .then(chain[i++])
3507
+ .then(result => { prevResult = result !== undefined ? result : prevResult; })
3508
+ .catch(chain[i++])
3509
+ .then(() => prevResult);
3351
3510
  }
3352
3511
 
3353
3512
  return promise;
@@ -3357,8 +3516,6 @@ function requireAxios () {
3357
3516
 
3358
3517
  let newConfig = config;
3359
3518
 
3360
- i = 0;
3361
-
3362
3519
  while (i < len) {
3363
3520
  const onFulfilled = requestInterceptorChain[i++];
3364
3521
  const onRejected = requestInterceptorChain[i++];
@@ -3380,7 +3537,7 @@ function requireAxios () {
3380
3537
  len = responseInterceptorChain.length;
3381
3538
 
3382
3539
  while (i < len) {
3383
- promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
3540
+ promise = promise.then(responseInterceptorChain[i++]).catch(responseInterceptorChain[i++]);
3384
3541
  }
3385
3542
 
3386
3543
  return promise;
@@ -3483,7 +3640,7 @@ function requireAxios () {
3483
3640
  return;
3484
3641
  }
3485
3642
 
3486
- token.reason = new CanceledError(message, config, request);
3643
+ token.reason = new CanceledError$1(message, config, request);
3487
3644
  resolvePromise(token.reason);
3488
3645
  });
3489
3646
  }
@@ -3567,7 +3724,7 @@ function requireAxios () {
3567
3724
  *
3568
3725
  * ```js
3569
3726
  * function f(x, y, z) {}
3570
- * var args = [1, 2, 3];
3727
+ * const args = [1, 2, 3];
3571
3728
  * f.apply(null, args);
3572
3729
  * ```
3573
3730
  *
@@ -3662,6 +3819,12 @@ function requireAxios () {
3662
3819
  LoopDetected: 508,
3663
3820
  NotExtended: 510,
3664
3821
  NetworkAuthenticationRequired: 511,
3822
+ WebServerIsDown: 521,
3823
+ ConnectionTimedOut: 522,
3824
+ OriginIsUnreachable: 523,
3825
+ TimeoutOccurred: 524,
3826
+ SslHandshakeFailed: 525,
3827
+ InvalidSslCertificate: 526,
3665
3828
  };
3666
3829
 
3667
3830
  Object.entries(HttpStatusCode).forEach(([key, value]) => {
@@ -3702,14 +3865,14 @@ function requireAxios () {
3702
3865
  axios.Axios = Axios$1;
3703
3866
 
3704
3867
  // Expose Cancel & CancelToken
3705
- axios.CanceledError = CanceledError;
3868
+ axios.CanceledError = CanceledError$1;
3706
3869
  axios.CancelToken = CancelToken$1;
3707
3870
  axios.isCancel = isCancel;
3708
3871
  axios.VERSION = VERSION;
3709
3872
  axios.toFormData = toFormData;
3710
3873
 
3711
3874
  // Expose AxiosError class
3712
- axios.AxiosError = AxiosError;
3875
+ axios.AxiosError = AxiosError$1;
3713
3876
 
3714
3877
  // alias for CanceledError for backward compatibility
3715
3878
  axios.Cancel = axios.CanceledError;