ebay-api 9.2.1 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/README.md +103 -80
  2. package/dist/ebay-api.min.mjs +1 -1
  3. package/dist/types/index.d.ts +1 -0
  4. package/dist/types/index.js +1 -0
  5. package/dist/types/traditional/add-fixed-price-item-response.d.ts +30 -0
  6. package/dist/types/traditional/add-fixed-price-item-response.js +1 -0
  7. package/dist/types/traditional/add-item-response.d.ts +29 -0
  8. package/dist/types/traditional/add-item-response.js +1 -0
  9. package/dist/types/traditional/add-items-response.d.ts +37 -0
  10. package/dist/types/traditional/add-items-response.js +1 -0
  11. package/dist/types/traditional/add-member-message-a-a-q-to-partner-response.d.ts +3 -0
  12. package/dist/types/traditional/add-member-message-a-a-q-to-partner-response.js +1 -0
  13. package/dist/types/traditional/add-member-message-r-t-q-response.d.ts +3 -0
  14. package/dist/types/traditional/add-member-message-r-t-q-response.js +1 -0
  15. package/dist/types/traditional/add-member-messages-a-a-q-to-bidder-response.d.ts +7 -0
  16. package/dist/types/traditional/add-member-messages-a-a-q-to-bidder-response.js +1 -0
  17. package/dist/types/traditional/add-order-response.d.ts +4 -0
  18. package/dist/types/traditional/add-order-response.js +1 -0
  19. package/dist/types/traditional/add-second-chance-item-response.d.ts +5 -0
  20. package/dist/types/traditional/add-second-chance-item-response.js +1 -0
  21. package/dist/types/traditional/add-to-item-description-response.d.ts +9 -0
  22. package/dist/types/traditional/add-to-item-description-response.js +1 -0
  23. package/dist/types/traditional/add-to-watch-list-response.d.ts +4 -0
  24. package/dist/types/traditional/add-to-watch-list-response.js +1 -0
  25. package/dist/types/traditional/common.d.ts +58 -0
  26. package/dist/types/traditional/common.js +1 -0
  27. package/dist/types/traditional/complete-sale-response.d.ts +3 -0
  28. package/dist/types/traditional/complete-sale-response.js +1 -0
  29. package/dist/types/traditional/delete-my-messages-response.d.ts +3 -0
  30. package/dist/types/traditional/delete-my-messages-response.js +1 -0
  31. package/dist/types/traditional/end-fixed-price-item-response.d.ts +4 -0
  32. package/dist/types/traditional/end-fixed-price-item-response.js +1 -0
  33. package/dist/types/traditional/end-items-response.d.ts +17 -0
  34. package/dist/types/traditional/end-items-response.js +1 -0
  35. package/dist/types/traditional/fetch-token-response.d.ts +5 -0
  36. package/dist/types/traditional/fetch-token-response.js +1 -0
  37. package/dist/types/traditional/get-account-response.d.ts +114 -0
  38. package/dist/types/traditional/get-account-response.js +1 -0
  39. package/dist/types/traditional/get-ad-format-leads-response.d.ts +41 -0
  40. package/dist/types/traditional/get-ad-format-leads-response.js +1 -0
  41. package/dist/types/traditional/get-all-bidders-response.d.ts +75 -0
  42. package/dist/types/traditional/get-all-bidders-response.js +1 -0
  43. package/dist/types/traditional/get-best-offers-response.d.ts +79 -0
  44. package/dist/types/traditional/get-best-offers-response.js +1 -0
  45. package/dist/types/traditional/get-bidder-list-response.d.ts +292 -0
  46. package/dist/types/traditional/get-bidder-list-response.js +1 -0
  47. package/dist/types/traditional/get-categories-response.d.ts +26 -0
  48. package/dist/types/traditional/get-categories-response.js +1 -0
  49. package/dist/types/traditional/get-category-features-response.d.ts +494 -0
  50. package/dist/types/traditional/get-category-features-response.js +1 -0
  51. package/dist/types/traditional/get-description-templates-response.d.ts +21 -0
  52. package/dist/types/traditional/get-description-templates-response.js +1 -0
  53. package/dist/types/traditional/get-feedback-response.d.ts +101 -0
  54. package/dist/types/traditional/get-feedback-response.js +1 -0
  55. package/dist/types/traditional/get-item-response.d.ts +855 -0
  56. package/dist/types/traditional/get-item-response.js +1 -0
  57. package/dist/types/traditional/get-items-awaiting-feedback-response.d.ts +66 -0
  58. package/dist/types/traditional/get-items-awaiting-feedback-response.js +1 -0
  59. package/dist/types/traditional/get-member-messages-response.d.ts +47 -0
  60. package/dist/types/traditional/get-member-messages-response.js +1 -0
  61. package/dist/types/traditional/get-message-preferences-response.d.ts +6 -0
  62. package/dist/types/traditional/get-message-preferences-response.js +1 -0
  63. package/dist/types/traditional/get-my-messages-response.d.ts +53 -0
  64. package/dist/types/traditional/get-my-messages-response.js +1 -0
  65. package/dist/types/traditional/get-seller-list-response.d.ts +456 -0
  66. package/dist/types/traditional/get-seller-list-response.js +1 -0
  67. package/dist/types/traditional/get-seller-transactions-response.d.ts +499 -0
  68. package/dist/types/traditional/get-seller-transactions-response.js +1 -0
  69. package/dist/types/traditional/get-shipping-discount-profiles-response.d.ts +63 -0
  70. package/dist/types/traditional/get-shipping-discount-profiles-response.js +1 -0
  71. package/dist/types/traditional/get-store-response.d.ts +31 -0
  72. package/dist/types/traditional/get-store-response.js +1 -0
  73. package/dist/types/traditional/get-tax-table-response.d.ts +10 -0
  74. package/dist/types/traditional/get-tax-table-response.js +1 -0
  75. package/dist/types/traditional/get-token-status-response.d.ts +9 -0
  76. package/dist/types/traditional/get-token-status-response.js +1 -0
  77. package/dist/types/traditional/get-user-contact-details-response.d.ts +13 -0
  78. package/dist/types/traditional/get-user-contact-details-response.js +1 -0
  79. package/dist/types/traditional/get-user-preferences-response.d.ts +91 -0
  80. package/dist/types/traditional/get-user-preferences-response.js +1 -0
  81. package/dist/types/traditional/get-user-response.d.ts +111 -0
  82. package/dist/types/traditional/get-user-response.js +1 -0
  83. package/dist/types/traditional/get-ve-r-o-reason-code-details-response.d.ts +12 -0
  84. package/dist/types/traditional/get-ve-r-o-reason-code-details-response.js +1 -0
  85. package/dist/types/traditional/get-ve-r-o-report-status-response.d.ts +18 -0
  86. package/dist/types/traditional/get-ve-r-o-report-status-response.js +1 -0
  87. package/dist/types/traditional/gete-bay-details-response.d.ts +230 -0
  88. package/dist/types/traditional/gete-bay-details-response.js +1 -0
  89. package/dist/types/traditional/index.d.ts +68 -0
  90. package/dist/types/traditional/index.js +68 -0
  91. package/dist/types/traditional/place-offer-response.d.ts +33 -0
  92. package/dist/types/traditional/place-offer-response.js +1 -0
  93. package/dist/types/traditional/relist-fixed-price-item-response.d.ts +30 -0
  94. package/dist/types/traditional/relist-fixed-price-item-response.js +1 -0
  95. package/dist/types/traditional/relist-item-response.d.ts +29 -0
  96. package/dist/types/traditional/relist-item-response.js +1 -0
  97. package/dist/types/traditional/remove-from-watch-list-response.d.ts +4 -0
  98. package/dist/types/traditional/remove-from-watch-list-response.js +1 -0
  99. package/dist/types/traditional/respond-to-best-offer-response.d.ts +8 -0
  100. package/dist/types/traditional/respond-to-best-offer-response.js +1 -0
  101. package/dist/types/traditional/respond-to-feedback-response.d.ts +3 -0
  102. package/dist/types/traditional/respond-to-feedback-response.js +1 -0
  103. package/dist/types/traditional/revise-fixed-price-item-response.d.ts +30 -0
  104. package/dist/types/traditional/revise-fixed-price-item-response.js +1 -0
  105. package/dist/types/traditional/revise-inventory-status-response.d.ts +21 -0
  106. package/dist/types/traditional/revise-inventory-status-response.js +1 -0
  107. package/dist/types/traditional/revise-item-response.d.ts +30 -0
  108. package/dist/types/traditional/revise-item-response.js +1 -0
  109. package/dist/types/traditional/revise-my-messages-folders-response.d.ts +3 -0
  110. package/dist/types/traditional/revise-my-messages-folders-response.js +1 -0
  111. package/dist/types/traditional/revise-my-messages-response.d.ts +3 -0
  112. package/dist/types/traditional/revise-my-messages-response.js +1 -0
  113. package/dist/types/traditional/revoke-token-response.d.ts +3 -0
  114. package/dist/types/traditional/revoke-token-response.js +1 -0
  115. package/dist/types/traditional/send-invoice-response.d.ts +3 -0
  116. package/dist/types/traditional/send-invoice-response.js +1 -0
  117. package/dist/types/traditional/set-message-preferences-response.d.ts +3 -0
  118. package/dist/types/traditional/set-message-preferences-response.js +1 -0
  119. package/dist/types/traditional/set-notification-preferences-response.d.ts +3 -0
  120. package/dist/types/traditional/set-notification-preferences-response.js +1 -0
  121. package/dist/types/traditional/set-shipping-discount-profiles-response.d.ts +3 -0
  122. package/dist/types/traditional/set-shipping-discount-profiles-response.js +1 -0
  123. package/dist/types/traditional/set-store-categories-response.d.ts +5 -0
  124. package/dist/types/traditional/set-store-categories-response.js +1 -0
  125. package/dist/types/traditional/set-tax-table-response.d.ts +3 -0
  126. package/dist/types/traditional/set-tax-table-response.js +1 -0
  127. package/dist/types/traditional/set-user-notes-response.d.ts +3 -0
  128. package/dist/types/traditional/set-user-notes-response.js +1 -0
  129. package/dist/types/traditional/set-user-preferences-response.d.ts +3 -0
  130. package/dist/types/traditional/set-user-preferences-response.js +1 -0
  131. package/dist/types/traditional/upload-site-hosted-pictures-response.d.ts +17 -0
  132. package/dist/types/traditional/upload-site-hosted-pictures-response.js +1 -0
  133. package/dist/types/traditional/ve-r-o-report-items-response.d.ts +4 -0
  134. package/dist/types/traditional/ve-r-o-report-items-response.js +1 -0
  135. package/dist/types/traditional/verify-add-fixed-price-item-response.d.ts +20 -0
  136. package/dist/types/traditional/verify-add-fixed-price-item-response.js +1 -0
  137. package/dist/types/traditional/verify-add-item-response.d.ts +27 -0
  138. package/dist/types/traditional/verify-add-item-response.js +1 -0
  139. package/dist/types/traditional/verify-add-second-chance-item-response.d.ts +4 -0
  140. package/dist/types/traditional/verify-add-second-chance-item-response.js +1 -0
  141. package/dist/types/traditional/verify-relist-item-response.d.ts +27 -0
  142. package/dist/types/traditional/verify-relist-item-response.js +1 -0
  143. package/dist/types/traditonalTypes.d.ts +72 -2
  144. package/lib/ebay-api.min.js +3 -1
  145. package/lib/types/index.d.ts +1 -0
  146. package/lib/types/index.js +1 -0
  147. package/lib/types/traditional/add-fixed-price-item-response.d.ts +30 -0
  148. package/lib/types/traditional/add-fixed-price-item-response.js +2 -0
  149. package/lib/types/traditional/add-item-response.d.ts +29 -0
  150. package/lib/types/traditional/add-item-response.js +2 -0
  151. package/lib/types/traditional/add-items-response.d.ts +37 -0
  152. package/lib/types/traditional/add-items-response.js +2 -0
  153. package/lib/types/traditional/add-member-message-a-a-q-to-partner-response.d.ts +3 -0
  154. package/lib/types/traditional/add-member-message-a-a-q-to-partner-response.js +2 -0
  155. package/lib/types/traditional/add-member-message-r-t-q-response.d.ts +3 -0
  156. package/lib/types/traditional/add-member-message-r-t-q-response.js +2 -0
  157. package/lib/types/traditional/add-member-messages-a-a-q-to-bidder-response.d.ts +7 -0
  158. package/lib/types/traditional/add-member-messages-a-a-q-to-bidder-response.js +2 -0
  159. package/lib/types/traditional/add-order-response.d.ts +4 -0
  160. package/lib/types/traditional/add-order-response.js +2 -0
  161. package/lib/types/traditional/add-second-chance-item-response.d.ts +5 -0
  162. package/lib/types/traditional/add-second-chance-item-response.js +2 -0
  163. package/lib/types/traditional/add-to-item-description-response.d.ts +9 -0
  164. package/lib/types/traditional/add-to-item-description-response.js +2 -0
  165. package/lib/types/traditional/add-to-watch-list-response.d.ts +4 -0
  166. package/lib/types/traditional/add-to-watch-list-response.js +2 -0
  167. package/lib/types/traditional/common.d.ts +58 -0
  168. package/lib/types/traditional/common.js +2 -0
  169. package/lib/types/traditional/complete-sale-response.d.ts +3 -0
  170. package/lib/types/traditional/complete-sale-response.js +2 -0
  171. package/lib/types/traditional/delete-my-messages-response.d.ts +3 -0
  172. package/lib/types/traditional/delete-my-messages-response.js +2 -0
  173. package/lib/types/traditional/end-fixed-price-item-response.d.ts +4 -0
  174. package/lib/types/traditional/end-fixed-price-item-response.js +2 -0
  175. package/lib/types/traditional/end-items-response.d.ts +17 -0
  176. package/lib/types/traditional/end-items-response.js +2 -0
  177. package/lib/types/traditional/fetch-token-response.d.ts +5 -0
  178. package/lib/types/traditional/fetch-token-response.js +2 -0
  179. package/lib/types/traditional/get-account-response.d.ts +114 -0
  180. package/lib/types/traditional/get-account-response.js +2 -0
  181. package/lib/types/traditional/get-ad-format-leads-response.d.ts +41 -0
  182. package/lib/types/traditional/get-ad-format-leads-response.js +2 -0
  183. package/lib/types/traditional/get-all-bidders-response.d.ts +75 -0
  184. package/lib/types/traditional/get-all-bidders-response.js +2 -0
  185. package/lib/types/traditional/get-best-offers-response.d.ts +79 -0
  186. package/lib/types/traditional/get-best-offers-response.js +2 -0
  187. package/lib/types/traditional/get-bidder-list-response.d.ts +292 -0
  188. package/lib/types/traditional/get-bidder-list-response.js +2 -0
  189. package/lib/types/traditional/get-categories-response.d.ts +26 -0
  190. package/lib/types/traditional/get-categories-response.js +2 -0
  191. package/lib/types/traditional/get-category-features-response.d.ts +494 -0
  192. package/lib/types/traditional/get-category-features-response.js +2 -0
  193. package/lib/types/traditional/get-description-templates-response.d.ts +21 -0
  194. package/lib/types/traditional/get-description-templates-response.js +2 -0
  195. package/lib/types/traditional/get-feedback-response.d.ts +101 -0
  196. package/lib/types/traditional/get-feedback-response.js +2 -0
  197. package/lib/types/traditional/get-item-response.d.ts +855 -0
  198. package/lib/types/traditional/get-item-response.js +2 -0
  199. package/lib/types/traditional/get-items-awaiting-feedback-response.d.ts +66 -0
  200. package/lib/types/traditional/get-items-awaiting-feedback-response.js +2 -0
  201. package/lib/types/traditional/get-member-messages-response.d.ts +47 -0
  202. package/lib/types/traditional/get-member-messages-response.js +2 -0
  203. package/lib/types/traditional/get-message-preferences-response.d.ts +6 -0
  204. package/lib/types/traditional/get-message-preferences-response.js +2 -0
  205. package/lib/types/traditional/get-my-messages-response.d.ts +53 -0
  206. package/lib/types/traditional/get-my-messages-response.js +2 -0
  207. package/lib/types/traditional/get-seller-list-response.d.ts +456 -0
  208. package/lib/types/traditional/get-seller-list-response.js +2 -0
  209. package/lib/types/traditional/get-seller-transactions-response.d.ts +499 -0
  210. package/lib/types/traditional/get-seller-transactions-response.js +2 -0
  211. package/lib/types/traditional/get-shipping-discount-profiles-response.d.ts +63 -0
  212. package/lib/types/traditional/get-shipping-discount-profiles-response.js +2 -0
  213. package/lib/types/traditional/get-store-response.d.ts +31 -0
  214. package/lib/types/traditional/get-store-response.js +2 -0
  215. package/lib/types/traditional/get-tax-table-response.d.ts +10 -0
  216. package/lib/types/traditional/get-tax-table-response.js +2 -0
  217. package/lib/types/traditional/get-token-status-response.d.ts +9 -0
  218. package/lib/types/traditional/get-token-status-response.js +2 -0
  219. package/lib/types/traditional/get-user-contact-details-response.d.ts +13 -0
  220. package/lib/types/traditional/get-user-contact-details-response.js +2 -0
  221. package/lib/types/traditional/get-user-preferences-response.d.ts +91 -0
  222. package/lib/types/traditional/get-user-preferences-response.js +2 -0
  223. package/lib/types/traditional/get-user-response.d.ts +111 -0
  224. package/lib/types/traditional/get-user-response.js +2 -0
  225. package/lib/types/traditional/get-ve-r-o-reason-code-details-response.d.ts +12 -0
  226. package/lib/types/traditional/get-ve-r-o-reason-code-details-response.js +2 -0
  227. package/lib/types/traditional/get-ve-r-o-report-status-response.d.ts +18 -0
  228. package/lib/types/traditional/get-ve-r-o-report-status-response.js +2 -0
  229. package/lib/types/traditional/gete-bay-details-response.d.ts +230 -0
  230. package/lib/types/traditional/gete-bay-details-response.js +2 -0
  231. package/lib/types/traditional/index.d.ts +68 -0
  232. package/lib/types/traditional/index.js +84 -0
  233. package/lib/types/traditional/place-offer-response.d.ts +33 -0
  234. package/lib/types/traditional/place-offer-response.js +2 -0
  235. package/lib/types/traditional/relist-fixed-price-item-response.d.ts +30 -0
  236. package/lib/types/traditional/relist-fixed-price-item-response.js +2 -0
  237. package/lib/types/traditional/relist-item-response.d.ts +29 -0
  238. package/lib/types/traditional/relist-item-response.js +2 -0
  239. package/lib/types/traditional/remove-from-watch-list-response.d.ts +4 -0
  240. package/lib/types/traditional/remove-from-watch-list-response.js +2 -0
  241. package/lib/types/traditional/respond-to-best-offer-response.d.ts +8 -0
  242. package/lib/types/traditional/respond-to-best-offer-response.js +2 -0
  243. package/lib/types/traditional/respond-to-feedback-response.d.ts +3 -0
  244. package/lib/types/traditional/respond-to-feedback-response.js +2 -0
  245. package/lib/types/traditional/revise-fixed-price-item-response.d.ts +30 -0
  246. package/lib/types/traditional/revise-fixed-price-item-response.js +2 -0
  247. package/lib/types/traditional/revise-inventory-status-response.d.ts +21 -0
  248. package/lib/types/traditional/revise-inventory-status-response.js +2 -0
  249. package/lib/types/traditional/revise-item-response.d.ts +30 -0
  250. package/lib/types/traditional/revise-item-response.js +2 -0
  251. package/lib/types/traditional/revise-my-messages-folders-response.d.ts +3 -0
  252. package/lib/types/traditional/revise-my-messages-folders-response.js +2 -0
  253. package/lib/types/traditional/revise-my-messages-response.d.ts +3 -0
  254. package/lib/types/traditional/revise-my-messages-response.js +2 -0
  255. package/lib/types/traditional/revoke-token-response.d.ts +3 -0
  256. package/lib/types/traditional/revoke-token-response.js +2 -0
  257. package/lib/types/traditional/send-invoice-response.d.ts +3 -0
  258. package/lib/types/traditional/send-invoice-response.js +2 -0
  259. package/lib/types/traditional/set-message-preferences-response.d.ts +3 -0
  260. package/lib/types/traditional/set-message-preferences-response.js +2 -0
  261. package/lib/types/traditional/set-notification-preferences-response.d.ts +3 -0
  262. package/lib/types/traditional/set-notification-preferences-response.js +2 -0
  263. package/lib/types/traditional/set-shipping-discount-profiles-response.d.ts +3 -0
  264. package/lib/types/traditional/set-shipping-discount-profiles-response.js +2 -0
  265. package/lib/types/traditional/set-store-categories-response.d.ts +5 -0
  266. package/lib/types/traditional/set-store-categories-response.js +2 -0
  267. package/lib/types/traditional/set-tax-table-response.d.ts +3 -0
  268. package/lib/types/traditional/set-tax-table-response.js +2 -0
  269. package/lib/types/traditional/set-user-notes-response.d.ts +3 -0
  270. package/lib/types/traditional/set-user-notes-response.js +2 -0
  271. package/lib/types/traditional/set-user-preferences-response.d.ts +3 -0
  272. package/lib/types/traditional/set-user-preferences-response.js +2 -0
  273. package/lib/types/traditional/upload-site-hosted-pictures-response.d.ts +17 -0
  274. package/lib/types/traditional/upload-site-hosted-pictures-response.js +2 -0
  275. package/lib/types/traditional/ve-r-o-report-items-response.d.ts +4 -0
  276. package/lib/types/traditional/ve-r-o-report-items-response.js +2 -0
  277. package/lib/types/traditional/verify-add-fixed-price-item-response.d.ts +20 -0
  278. package/lib/types/traditional/verify-add-fixed-price-item-response.js +2 -0
  279. package/lib/types/traditional/verify-add-item-response.d.ts +27 -0
  280. package/lib/types/traditional/verify-add-item-response.js +2 -0
  281. package/lib/types/traditional/verify-add-second-chance-item-response.d.ts +4 -0
  282. package/lib/types/traditional/verify-add-second-chance-item-response.js +2 -0
  283. package/lib/types/traditional/verify-relist-item-response.d.ts +27 -0
  284. package/lib/types/traditional/verify-relist-item-response.js +2 -0
  285. package/lib/types/traditonalTypes.d.ts +72 -2
  286. package/package.json +4 -3
@@ -1 +1 @@
1
- function bind$2(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,r=(n=Object.create(null),t=>{const r=e.call(t);return n[r]||(n[r]=r.slice(8,-1).toLowerCase())});var n;const kindOfTest=e=>(e=e.toLowerCase(),t=>r(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:o}=Array,i=typeOfTest("undefined");const s=kindOfTest("ArrayBuffer");const c=typeOfTest("string"),u=typeOfTest("function"),l=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==r(e))return!1;const n=t(e);return!(null!==n&&n!==Object.prototype&&null!==Object.getPrototypeOf(n)||Symbol.toStringTag in e||Symbol.iterator in e)},p=kindOfTest("Date"),d=kindOfTest("File"),E=kindOfTest("Blob"),f=kindOfTest("FileList"),g=kindOfTest("URLSearchParams");function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,i;if("object"!=typeof e&&(e=[e]),o(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function findKey(e,t){t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const _="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!i(e)&&e!==_;const h=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&t(Uint8Array)),m=kindOfTest("HTMLFormElement"),R=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),A=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)},y="abcdefghijklmnopqrstuvwxyz",I="0123456789",T={DIGIT:I,ALPHA:y,ALPHA_DIGIT:y+y.toUpperCase()+I};const S=kindOfTest("AsyncFunction");var C={isArray:o,isArrayBuffer:s,isBuffer:function isBuffer$1(e){return null!==e&&!i(e)&&null!==e.constructor&&!i(e.constructor)&&u(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||u(e.append)&&("formdata"===(t=r(e))||"object"===t&&u(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&s(e.buffer),t},isString:c,isNumber:l,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isUndefined:i,isDate:p,isFile:d,isBlob:E,isRegExp:A,isFunction:u,isStream:e=>isObject(e)&&u(e.pipe),isURLSearchParams:g,isTypedArray:h,isFileList:f,forEach:forEach,merge:function merge$1(){const{caseless:e}=isContextDefined(this)&&this||{},t={},assignValue=(r,n)=>{const i=e&&findKey(t,n)||n;isPlainObject(t[i])&&isPlainObject(r)?t[i]=merge$1(t[i],r):isPlainObject(r)?t[i]=merge$1({},r):o(r)?t[i]=r.slice():t[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return t},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&u(t)?e[n]=bind$2(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,r,n,o)=>{let i,s,c;const u={};if(r=r||{},null==e)return r;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)c=i[s],o&&!o(c,e,r)||u[c]||(r[c]=e[c],u[c]=!0);e=!1!==n&&t(e)}while(e&&(!n||n(e,r))&&e!==Object.prototype);return r},kindOf:r,kindOfTest:kindOfTest,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(o(e))return e;let t=e.length;if(!l(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:m,hasOwnProperty:R,hasOwnProp:R,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,((t,r)=>{if(u(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];u(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},define=e=>{e.forEach((e=>{r[e]=!0}))};return o(e)?define(e):define(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function replacer(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:findKey,global:_,isContextDefined:isContextDefined,ALPHABET:T,generateString:(e=16,t=T.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r},isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&u(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const n=o(e)?[]:{};return forEach(e,((e,t)=>{const o=visit(e,r+1);!i(o)&&(n[t]=o)})),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:S,isThenable:e=>e&&(isObject(e)||u(e))&&u(e.then)&&u(e.catch)};function AxiosError(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}C.inherits(AxiosError,Error,{toJSON:function 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:C.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const N=AxiosError.prototype,O={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{O[e]={value:e}})),Object.defineProperties(AxiosError,O),Object.defineProperty(N,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,i)=>{const s=Object.create(N);return C.toFlatObject(e,s,(function filter(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),AxiosError.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function isVisitable(e){return C.isPlainObject(e)||C.isArray(e)}function removeBrackets(e){return C.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function each(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const P=C.toFlatObject(C,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!C.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=C.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(e,t){return!C.isUndefined(t[e])}))).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&C.isSpecCompliantForm(t);if(!C.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(C.isDate(e))return e.toISOString();if(!c&&C.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return C.isArrayBuffer(e)||C.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let c=e;if(e&&!o&&"object"==typeof e)if(C.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(C.isArray(e)&&function isFlatArray(e){return C.isArray(e)&&!e.some(isVisitable)}(e)||(C.isFileList(e)||C.endsWith(r,"[]"))&&(c=C.toArray(e)))return r=removeBrackets(r),c.forEach((function each(e,n){!C.isUndefined(e)&&null!==e&&t.append(!0===s?renderKey([r],n,i):null===s?r:r+"[]",convertValue(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),convertValue(e)),!1)}const u=[],l=Object.assign(P,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!C.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!C.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));u.push(e),C.forEach(e,(function each(e,n){!0===(!(C.isUndefined(e)||null===e)&&o.call(t,e,C.isString(n)?n.trim():n,r,l))&&build(e,r?r.concat(n):[n])})),u.pop()}}(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function replacer(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const b=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode$1,o=r&&r.serialize;let i;if(i=o?o(t,r):C.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}b.append=function append(e,t){this._pairs.push([e,t])},b.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$2)}:encode$2;return this._pairs.map((function each(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var U=class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){C.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))}},D={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},L={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const B="undefined"!=typeof window&&"undefined"!=typeof document,M=(v="undefined"!=typeof navigator&&navigator.product,B&&["ReactNative","NativeScript","NS"].indexOf(v)<0);var v;const F="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var x={...Object.freeze({__proto__:null,hasBrowserEnv:B,hasStandardBrowserWebWorkerEnv:F,hasStandardBrowserEnv:M}),...L};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&C.isArray(r)?r.length:o,s)return C.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&C.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&C.isArray(r[o])&&(r[o]=function arrayToObject$1(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(r[o])),!i}if(C.isFormData(e)&&C.isFunction(e.entries)){const t={};return C.forEachEntry(e,((e,r)=>{buildPath(function parsePropPath(e){return C.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,t,0)})),t}return null}const w={transitional:D,adapter:["xhr","http"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=C.isObject(e);o&&C.isHTMLForm(e)&&(e=new FormData(e));if(C.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(C.isArrayBuffer(e)||C.isBuffer(e)||C.isStream(e)||C.isFile(e)||C.isBlob(e))return e;if(C.isArrayBufferView(e))return e.buffer;if(C.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData(e,new x.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return x.isNode&&C.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=C.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(C.isString(e))try{return(t||JSON.parse)(e),C.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function transformResponse(e){const t=this.transitional||w.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(e&&C.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:x.classes.FormData,Blob:x.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};C.forEach(["delete","get","head","post","put","patch"],(e=>{w.headers[e]={}}));var k=w;const G=C.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"]);const Y=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:C.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n,o){return C.isFunction(n)?n.call(this,t,r):(o&&(t=r),C.isString(t)?C.isString(n)?-1!==t.indexOf(n):C.isRegExp(n)?n.test(t):void 0:void 0)}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function setHeader(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=C.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const setHeaders=(e,t)=>C.forEach(e,((e,r)=>setHeader(e,r,t)));return C.isPlainObject(e)||e instanceof this.constructor?setHeaders(e,t):C.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim())?setHeaders((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function parser(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&G[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t):null!=e&&setHeader(t,e,r),this}get(e,t){if(e=normalizeHeader(e)){const r=C.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(C.isFunction(t))return t.call(this,e,r);if(C.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=C.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function deleteHeader(e){if(e=normalizeHeader(e)){const o=C.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return C.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return C.forEach(this,((n,o)=>{const i=C.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const s=e?function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=normalizeValue(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return C.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&C.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[Y]=this[Y]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=C.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return C.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),C.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),C.freezeMethods(AxiosHeaders);var $=AxiosHeaders;function transformData(e,t){const r=this||k,n=t||r,o=$.from(n.headers);let i=n.data;return C.forEach(e,(function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}C.inherits(CanceledError,AxiosError,{__CANCEL__:!0});var H=x.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];C.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),C.isString(n)&&s.push("path="+n),C.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function buildFullPath(e,t){return e&&!function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var j=x.hasStandardBrowserEnv?function standardBrowserEnv(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let r;function resolveURL(r){let n=r;return e&&(t.setAttribute("href",n),n=t.href),t.setAttribute("href",n),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return r=resolveURL(window.location.href),function isURLSameOrigin(e){const t=C.isString(e)?resolveURL(e):e;return t.protocol===r.protocol&&t.host===r.host}}():function isURLSameOrigin(){return!0};function progressEventReducer(e,t){let r=0;const n=function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function push(c){const u=Date.now(),l=n[s];o||(o=u),r[i]=c,n[i]=u;let p=s,d=0;for(;p!==i;)d+=r[p++],p%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const E=l&&u-l;return E?Math.round(1e3*d/E):void 0}}(50,250);return o=>{const i=o.loaded,s=o.lengthComputable?o.total:void 0,c=i-r,u=n(c);r=i;const l={loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:o};l[t?"download":"upload"]=!0,e(l)}}const V={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function dispatchXhrRequest(t,r){let n=e.data;const o=$.from(e.headers).normalize();let i,s,{responseType:c,withXSRFToken:u}=e;function done(){e.cancelToken&&e.cancelToken.unsubscribe(i),e.signal&&e.signal.removeEventListener("abort",i)}if(C.isFormData(n))if(x.hasStandardBrowserEnv||x.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",r=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+r))}const p=buildFullPath(e.baseURL,e.url);function onloadend(){if(!l)return;const n=$.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}((function _resolve(e){t(e),done()}),(function _reject(e){r(e),done()}),{data:c&&"text"!==c&&"json"!==c?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:n,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),buildURL(p,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=onloadend:l.onreadystatechange=function handleLoad(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(onloadend)},l.onabort=function handleAbort(){l&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,l)),l=null)},l.onerror=function handleError(){r(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,l)),l=null},l.ontimeout=function handleTimeout(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const n=e.transitional||D;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(new AxiosError(t,n.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,l)),l=null},x.hasStandardBrowserEnv&&(u&&C.isFunction(u)&&(u=u(e)),u||!1!==u&&j(p))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&H.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===n&&o.setContentType(null),"setRequestHeader"in l&&C.forEach(o.toJSON(),(function setRequestHeader(e,t){l.setRequestHeader(t,e)})),C.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),c&&"json"!==c&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",progressEventReducer(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",progressEventReducer(e.onUploadProgress)),(e.cancelToken||e.signal)&&(i=t=>{l&&(r(!t||t.type?new CanceledError(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(i),e.signal&&(e.signal.aborted?i():e.signal.addEventListener("abort",i)));const d=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(p);d&&-1===x.protocols.indexOf(d)?r(new AxiosError("Unsupported protocol "+d+":",AxiosError.ERR_BAD_REQUEST,e)):l.send(n||null)}))}};C.forEach(V,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>`- ${e}`,isResolvedHandle=e=>C.isFunction(e)||null===e||!1===e;var adapters_getAdapter=e=>{e=C.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!isResolvedHandle(r)&&(n=V[(t=String(r)).toLowerCase()],void 0===n))throw new AxiosError(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new AxiosError("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=$.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters_getAdapter(e.adapter||k.adapter)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=$.from(t.headers),t}),(function onAdapterRejection(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=$.from(t.response.headers))),Promise.reject(t)}))}const headersToObject=e=>e instanceof $?{...e}:e;function mergeConfig(e,t){t=t||{};const r={};function getMergedValue(e,t,r){return C.isPlainObject(e)&&C.isPlainObject(t)?C.merge.call({caseless:r},e,t):C.isPlainObject(t)?C.merge({},t):C.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r){return C.isUndefined(t)?C.isUndefined(e)?void 0:getMergedValue(void 0,e,r):getMergedValue(e,t,r)}function valueFromConfig2(e,t){if(!C.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return C.isUndefined(t)?C.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,o){return o in t?getMergedValue(r,n):o in e?getMergedValue(void 0,r):void 0}const n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t)=>mergeDeepProperties(headersToObject(e),headersToObject(t),!0)};return C.forEach(Object.keys(Object.assign({},e,t)),(function computeConfigValue(o){const i=n[o]||mergeDeepProperties,s=i(e[o],t[o],o);C.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)})),r}const K="1.6.8",W={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{W[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const q={};W.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v1.6.8] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new AxiosError(formatMessage(n," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!q[n]&&(q[n]=!0,console.warn(formatMessage(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}};var X={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new AxiosError("option "+i+" must be "+r,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError("Unknown option "+i,AxiosError.ERR_BAD_OPTION)}},validators:W};const J=X.validators;class Axios{constructor(e){this.defaults=e,this.interceptors={request:new U,response:new U}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t;Error.captureStackTrace?Error.captureStackTrace(t={}):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&X.assertOptions(r,{silentJSONParsing:J.transitional(J.boolean),forcedJSONParsing:J.transitional(J.boolean),clarifyTimeoutError:J.transitional(J.boolean)},!1),null!=n&&(C.isFunction(n)?t.paramsSerializer={serialize:n}:X.assertOptions(n,{encode:J.function,serialize:J.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&C.merge(o.common,o[t.method]);o&&C.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=$.concat(i,o);const s=[];let c=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function pushResponseInterceptors(e){u.push(e.fulfilled,e.rejected)}));let p,d=0;if(!c){const e=[dispatchRequest.bind(this),void 0];for(e.unshift.apply(e,s),e.push.apply(e,u),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let E=t;for(d=0;d<p;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}C.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(mergeConfig(r||{},{method:e,url:t,data:(r||{}).data}))}})),C.forEach(["post","put","patch"],(function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios.prototype[e]=generateHTTPMethod(),Axios.prototype[e+"Form"]=generateHTTPMethod(!0)}));var z=Axios;class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function promiseExecutor(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function reject(){r.unsubscribe(t)},n},e((function cancel(e,n,o){r.reason||(r.reason=new CanceledError(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}}}var Q=CancelToken;const Z={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};Object.entries(Z).forEach((([e,t])=>{Z[t]=e}));var ee=Z;const te=function createInstance(e){const t=new z(e),r=bind$2(z.prototype.request,t);return C.extend(r,z.prototype,t,{allOwnKeys:!0}),C.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig(e,t))},r}(k);te.Axios=z,te.CanceledError=CanceledError,te.CancelToken=Q,te.isCancel=isCancel,te.VERSION=K,te.toFormData=toFormData,te.AxiosError=AxiosError,te.Cancel=te.CanceledError,te.all=function all(e){return Promise.all(e)},te.spread=function spread(e){return function wrap(t){return e.apply(null,t)}},te.isAxiosError=function isAxiosError(e){return C.isObject(e)&&!0===e.isAxiosError},te.mergeConfig=mergeConfig,te.AxiosHeaders=$,te.formToJSON=e=>formDataToJSON(C.isHTMLForm(e)?new FormData(e):e),te.getAdapter=adapters_getAdapter,te.HttpStatusCode=ee,te.default=te;var re=te;function getAugmentedNamespace(e){var t=e.default;if("function"==typeof t){var r=function a(){if(this instanceof a){var e=[null];e.push.apply(e,arguments);var r=Function.bind.apply(t,e);return new r}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var ne,oe,ie={exports:{}};function requireMs(){if(oe)return ne;oe=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function plural(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return ne=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function parse(s){if((s=String(s)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function fmtLong(o){var i=Math.abs(o);if(i>=n)return plural(o,i,n,"day");if(i>=r)return plural(o,i,r,"hour");if(i>=t)return plural(o,i,t,"minute");if(i>=e)return plural(o,i,e,"second");return o+" ms"}(s):function fmtShort(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))}}var se=function setup(e){function createDebug(e){let t,r,n,o=null;function debug(...e){if(!debug.enabled)return;const r=debug,n=Number(new Date),o=n-(t||n);r.diff=o,r.prev=t,r.curr=n,t=n,e[0]=createDebug.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";i++;const o=createDebug.formatters[n];if("function"==typeof o){const n=e[i];t=o.call(r,n),e.splice(i,1),i--}return t})),createDebug.formatArgs.call(r,e);(r.log||createDebug.log).apply(r,e)}return debug.namespace=e,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(e),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==createDebug.namespaces&&(r=createDebug.namespaces,n=createDebug.enabled(e)),n),set:e=>{o=e}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(e,t){const r=createDebug(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function toNamespace(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){if(e instanceof Error)return e.stack||e.message;return e},createDebug.disable=function disable(){const e=[...createDebug.names.map(toNamespace),...createDebug.skips.map(toNamespace).map((e=>"-"+e))].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){let t;createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),n=r.length;for(t=0;t<n;t++)r[t]&&("-"===(e=r[t].replace(/\*/g,".*?"))[0]?createDebug.skips.push(new RegExp("^"+e.slice(1)+"$")):createDebug.names.push(new RegExp("^"+e+"$")))},createDebug.enabled=function enabled(e){if("*"===e[e.length-1])return!0;let t,r;for(t=0,r=createDebug.skips.length;t<r;t++)if(createDebug.skips[t].test(e))return!1;for(t=0,r=createDebug.names.length;t<r;t++)if(createDebug.names[t].test(e))return!0;return!1},createDebug.humanize=requireMs(),createDebug.destroy=function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((t=>{createDebug[t]=e[t]})),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function selectColor(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return createDebug.colors[Math.abs(t)%createDebug.colors.length]},createDebug.enable(createDebug.load()),createDebug};!function(e,t){t.formatArgs=function formatArgs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function save(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function load(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function useColors(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function localstorage(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=se(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ie,ie.exports);var ae,ce=ie.exports,ue="undefined"!=typeof Symbol&&Symbol,le=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},pe="Function.prototype.bind called on incompatible ",de=Array.prototype.slice,Ee=Object.prototype.toString,fe="[object Function]",ge=function bind(e){var t=this;if("function"!=typeof t||Ee.call(t)!==fe)throw new TypeError(pe+t);for(var r,n=de.call(arguments,1),binder=function(){if(this instanceof r){var o=t.apply(this,n.concat(de.call(arguments)));return Object(o)===o?o:this}return t.apply(e,n.concat(de.call(arguments)))},o=Math.max(0,t.length-n.length),i=[],s=0;s<o;s++)i.push("$"+s);if(r=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this,arguments); }")(binder),t.prototype){var c=function Empty(){};c.prototype=t.prototype,r.prototype=new c,c.prototype=null}return r},_e=Function.prototype.bind||ge,he=_e.call(Function.call,Object.prototype.hasOwnProperty),me=SyntaxError,Re=Function,Ae=TypeError,getEvalledConstructor=function(e){try{return Re('"use strict"; return ('+e+").constructor;")()}catch(e){}},ye=Object.getOwnPropertyDescriptor;if(ye)try{ye({},"")}catch(e){ye=null}var throwTypeError=function(){throw new Ae},Ie=ye?function(){try{return throwTypeError}catch(e){try{return ye(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,Te=function hasNativeSymbols(){return"function"==typeof ue&&("function"==typeof Symbol&&("symbol"==typeof ue("foo")&&("symbol"==typeof Symbol("bar")&&le())))}(),Se=Object.getPrototypeOf||function(e){return e.__proto__},Ce={},Ne="undefined"==typeof Uint8Array?ae:Se(Uint8Array),Oe={"%AggregateError%":"undefined"==typeof AggregateError?ae:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ae:ArrayBuffer,"%ArrayIteratorPrototype%":Te?Se([][Symbol.iterator]()):ae,"%AsyncFromSyncIteratorPrototype%":ae,"%AsyncFunction%":Ce,"%AsyncGenerator%":Ce,"%AsyncGeneratorFunction%":Ce,"%AsyncIteratorPrototype%":Ce,"%Atomics%":"undefined"==typeof Atomics?ae:Atomics,"%BigInt%":"undefined"==typeof BigInt?ae:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ae:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?ae:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ae:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ae:FinalizationRegistry,"%Function%":Re,"%GeneratorFunction%":Ce,"%Int8Array%":"undefined"==typeof Int8Array?ae:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ae:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ae:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Te?Se(Se([][Symbol.iterator]())):ae,"%JSON%":"object"==typeof JSON?JSON:ae,"%Map%":"undefined"==typeof Map?ae:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Te?Se((new Map)[Symbol.iterator]()):ae,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ae:Promise,"%Proxy%":"undefined"==typeof Proxy?ae:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?ae:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ae:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Te?Se((new Set)[Symbol.iterator]()):ae,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ae:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Te?Se(""[Symbol.iterator]()):ae,"%Symbol%":Te?Symbol:ae,"%SyntaxError%":me,"%ThrowTypeError%":Ie,"%TypedArray%":Ne,"%TypeError%":Ae,"%Uint8Array%":"undefined"==typeof Uint8Array?ae:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ae:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ae:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ae:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?ae:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ae:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ae:WeakSet},Pe=function doEval(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var r=doEval("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=doEval("%AsyncGenerator%");n&&(t=Se(n.prototype))}return Oe[e]=t,t},be={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Ue=_e,De=he,Le=Ue.call(Function.call,Array.prototype.concat),Be=Ue.call(Function.apply,Array.prototype.splice),Me=Ue.call(Function.call,String.prototype.replace),ve=Ue.call(Function.call,String.prototype.slice),Fe=Ue.call(Function.call,RegExp.prototype.exec),xe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,we=/\\(\\)?/g,ke=function stringToPath(e){var t=ve(e,0,1),r=ve(e,-1);if("%"===t&&"%"!==r)throw new me("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new me("invalid intrinsic syntax, expected opening `%`");var n=[];return Me(e,xe,(function(e,t,r,o){n[n.length]=r?Me(o,we,"$1"):t||e})),n},Ge=function getBaseIntrinsic(e,t){var r,n=e;if(De(be,n)&&(n="%"+(r=be[n])[0]+"%"),De(Oe,n)){var o=Oe[n];if(o===Ce&&(o=Pe(n)),void 0===o&&!t)throw new Ae("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new me("intrinsic "+e+" does not exist!")},Ye=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new Ae("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Ae('"allowMissing" argument must be a boolean');if(null===Fe(/^%?[^%]*%?$/,e))throw new me("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=ke(e),n=r.length>0?r[0]:"",o=Ge("%"+n+"%",t),i=o.name,s=o.value,c=!1,u=o.alias;u&&(n=u[0],Be(r,Le([0,1],u)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],E=ve(d,0,1),f=ve(d,-1);if(('"'===E||"'"===E||"`"===E||'"'===f||"'"===f||"`"===f)&&E!==f)throw new me("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),De(Oe,i="%"+(n+="."+d)+"%"))s=Oe[i];else if(null!=s){if(!(d in s)){if(!t)throw new Ae("base intrinsic for "+e+" exists, but the property is not available.");return}if(ye&&l+1>=r.length){var g=ye(s,d);s=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[d]}else p=De(s,d),s=s[d];p&&!c&&(Oe[i]=s)}}return s},$e={exports:{}};!function(e){var t=_e,r=Ye,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),s=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function callBind(e){var r=i(t,o,arguments);if(s&&c){var n=s(r,"length");n.configurable&&c(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var l=function applyBind(){return i(t,n,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l}($e);var He=Ye,je=$e.exports,Ve=je(He("String.prototype.indexOf")),Ke=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}})),We="function"==typeof Map&&Map.prototype,qe=Object.getOwnPropertyDescriptor&&We?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Xe=We&&qe&&"function"==typeof qe.get?qe.get:null,Je=We&&Map.prototype.forEach,ze="function"==typeof Set&&Set.prototype,Qe=Object.getOwnPropertyDescriptor&&ze?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ze=ze&&Qe&&"function"==typeof Qe.get?Qe.get:null,et=ze&&Set.prototype.forEach,tt="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,rt="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,nt="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,ot=Boolean.prototype.valueOf,it=Object.prototype.toString,st=Function.prototype.toString,at=String.prototype.match,ct=String.prototype.slice,ut=String.prototype.replace,lt=String.prototype.toUpperCase,pt=String.prototype.toLowerCase,dt=RegExp.prototype.test,Et=Array.prototype.concat,ft=Array.prototype.join,gt=Array.prototype.slice,_t=Math.floor,ht="function"==typeof BigInt?BigInt.prototype.valueOf:null,mt=Object.getOwnPropertySymbols,Rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,At="function"==typeof Symbol&&"object"==typeof Symbol.iterator,yt="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===At||"symbol")?Symbol.toStringTag:null,It=Object.prototype.propertyIsEnumerable,Tt=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||dt.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-_t(-e):_t(e);if(n!==e){var o=String(n),i=ct.call(t,o.length+1);return ut.call(o,r,"$&_")+"."+ut.call(ut.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return ut.call(t,r,"$&_")}var St=Ke,Ct=St.custom,Nt=isSymbol(Ct)?Ct:null;function wrapQuotes(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function quote(e){return ut.call(String(e),/"/g,"&quot;")}function isArray$3(e){return!("[object Array]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}function isRegExp$1(e){return!("[object RegExp]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}function isSymbol(e){if(At)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!Rt)return!1;try{return Rt.call(e),!0}catch(e){}return!1}var Ot=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return Ot.call(e,t)}function toStr(e){return it.call(e)}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function inspectString(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString(ct.call(e,0,t.maxStringLength),t)+n}return wrapQuotes(ut.call(ut.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+lt.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,r,n){return e+" ("+t+") {"+(n?indentedJoin(r,n):ft.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+ft.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray$3(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has$3(e,o)?t(e[o],e):""}var i,s="function"==typeof mt?mt(e):[];if(At){i={};for(var c=0;c<s.length;c++)i["$"+s[c]]=s[c]}for(var u in e)has$3(e,u)&&(r&&String(Number(u))===u&&u<e.length||At&&i["$"+u]instanceof Symbol||(dt.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof mt)for(var l=0;l<s.length;l++)It.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}var Pt=Ye,bt=function callBoundIntrinsic(e,t){var r=He(e,!!t);return"function"==typeof r&&Ve(e,".prototype.")>-1?je(r):r},Ut=function inspect_(e,t,r,n){var o=t||{};if(has$3(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has$3(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return inspectString(e,o);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var c=String(e);return s?addNumericSeparator(e,c):c}if("bigint"==typeof e){var u=String(e)+"n";return s?addNumericSeparator(e,u):u}var l=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=l&&l>0&&"object"==typeof e)return isArray$3(e)?"[Array]":"[Object]";var p=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=ft.call(Array(e.indent+1)," ")}return{base:r,prev:ft.call(Array(t+1),r)}}(o,r);if(void 0===n)n=[];else if(indexOf(n,e)>=0)return"[Circular]";function inspect(e,t,i){if(t&&(n=gt.call(n)).push(t),i){var s={depth:o.depth};return has$3(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),inspect_(e,s,r+1,n)}return inspect_(e,o,r+1,n)}if("function"==typeof e&&!isRegExp$1(e)){var d=function nameOf(e){if(e.name)return e.name;var t=at.call(st.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),E=arrObjKeys(e,inspect);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(E.length>0?" { "+ft.call(E,", ")+" }":"")}if(isSymbol(e)){var f=At?ut.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Rt.call(e);return"object"!=typeof e||At?f:markBoxed(f)}if(function isElement$1(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(e)){for(var g="<"+pt.call(String(e.nodeName)),_=e.attributes||[],h=0;h<_.length;h++)g+=" "+_[h].name+"="+wrapQuotes(quote(_[h].value),"double",o);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+pt.call(String(e.nodeName))+">"}if(isArray$3(e)){if(0===e.length)return"[]";var m=arrObjKeys(e,inspect);return p&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(m)?"["+indentedJoin(m,p)+"]":"[ "+ft.call(m,", ")+" ]"}if(function isError(e){return!("[object Error]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e)){var R=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||It.call(e,"cause")?0===R.length?"["+String(e)+"]":"{ ["+String(e)+"] "+ft.call(R,", ")+" }":"{ ["+String(e)+"] "+ft.call(Et.call("[cause]: "+inspect(e.cause),R),", ")+" }"}if("object"==typeof e&&i){if(Nt&&"function"==typeof e[Nt]&&St)return St(e,{depth:l-r});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!Xe||!e||"object"!=typeof e)return!1;try{Xe.call(e);try{Ze.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var A=[];return Je.call(e,(function(t,r){A.push(inspect(r,e,!0)+" => "+inspect(t,e))})),collectionOf("Map",Xe.call(e),A,p)}if(function isSet(e){if(!Ze||!e||"object"!=typeof e)return!1;try{Ze.call(e);try{Xe.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var y=[];return et.call(e,(function(t){y.push(inspect(t,e))})),collectionOf("Set",Ze.call(e),y,p)}if(function isWeakMap(e){if(!tt||!e||"object"!=typeof e)return!1;try{tt.call(e,tt);try{rt.call(e,rt)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!rt||!e||"object"!=typeof e)return!1;try{rt.call(e,rt);try{tt.call(e,tt)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!nt||!e||"object"!=typeof e)return!1;try{return nt.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return!("[object Number]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!ht)return!1;try{return ht.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(ht.call(e)));if(function isBoolean(e){return!("[object Boolean]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e))return markBoxed(ot.call(e));if(function isString(e){return!("[object String]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e))return markBoxed(inspect(String(e)));if(!function isDate(e){return!("[object Date]"!==toStr(e)||yt&&"object"==typeof e&&yt in e)}(e)&&!isRegExp$1(e)){var I=arrObjKeys(e,inspect),T=Tt?Tt(e)===Object.prototype:e instanceof Object||e.constructor===Object,S=e instanceof Object?"":"null prototype",C=!T&&yt&&Object(e)===e&&yt in e?ct.call(toStr(e),8,-1):S?"Object":"",N=(T||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(C||S?"["+ft.call(Et.call([],C||[],S||[]),": ")+"] ":"");return 0===I.length?N+"{}":p?N+"{"+indentedJoin(I,p)+"}":N+"{ "+ft.call(I,", ")+" }"}return String(e)},Dt=Pt("%TypeError%"),Lt=Pt("%WeakMap%",!0),Bt=Pt("%Map%",!0),Mt=bt("WeakMap.prototype.get",!0),vt=bt("WeakMap.prototype.set",!0),Ft=bt("WeakMap.prototype.has",!0),xt=bt("Map.prototype.get",!0),wt=bt("Map.prototype.set",!0),kt=bt("Map.prototype.has",!0),listGetNode=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},Gt=String.prototype.replace,Yt=/%20/g,$t="RFC3986",Ht={default:$t,formatters:{RFC1738:function(e){return Gt.call(e,Yt,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:$t},jt=Ht,Vt=Object.prototype.hasOwnProperty,Kt=Array.isArray,Wt=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),qt=function arrayToObject(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},Xt={arrayToObject:qt,assign:function assignSingleSource(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function combine(e,t){return[].concat(e,t)},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=i[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:u}),r.push(l))}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(Kt(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function encode(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var s="",c=0;c<i.length;++c){var u=i.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===jt.RFC1738&&(40===u||41===u)?s+=i.charAt(c):u<128?s+=Wt[u]:u<2048?s+=Wt[192|u>>6]+Wt[128|63&u]:u<55296||u>=57344?s+=Wt[224|u>>12]+Wt[128|u>>6&63]+Wt[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(c)),s+=Wt[240|u>>18]+Wt[128|u>>12&63]+Wt[128|u>>6&63]+Wt[128|63&u])}return s},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function maybeMap(e,t){if(Kt(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function merge(e,t,r){if(!t)return e;if("object"!=typeof t){if(Kt(e))e.push(t);else{if(!e||"object"!=typeof e)return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!Vt.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(t);var n=e;return Kt(e)&&!Kt(t)&&(n=qt(e,r)),Kt(e)&&Kt(t)?(t.forEach((function(t,n){if(Vt.call(e,n)){var o=e[n];o&&"object"==typeof o&&t&&"object"==typeof t?e[n]=merge(o,t,r):e.push(t)}else e[n]=t})),e):Object.keys(t).reduce((function(e,n){var o=t[n];return Vt.call(e,n)?e[n]=merge(e[n],o,r):e[n]=o,e}),n)}},Jt=function getSideChannel(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Dt("Side channel does not contain "+Ut(e))},get:function(n){if(Lt&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Mt(e,n)}else if(Bt){if(t)return xt(t,n)}else if(r)return function(e,t){var r=listGetNode(e,t);return r&&r.value}(r,n)},has:function(n){if(Lt&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Ft(e,n)}else if(Bt){if(t)return kt(t,n)}else if(r)return function(e,t){return!!listGetNode(e,t)}(r,n);return!1},set:function(n,o){Lt&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new Lt),vt(e,n,o)):Bt?(t||(t=new Bt),wt(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},zt=Xt,Qt=Ht,Zt=Object.prototype.hasOwnProperty,er={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},tr=Array.isArray,rr=String.prototype.split,nr=Array.prototype.push,pushToArray=function(e,t){nr.apply(e,tr(t)?t:[t])},or=Date.prototype.toISOString,ir=Qt.default,sr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:zt.encode,encodeValuesOnly:!1,format:ir,formatter:Qt.formatters[ir],indices:!1,serializeDate:function serializeDate(e){return or.call(e)},skipNulls:!1,strictNullHandling:!1},ar={},cr=function stringify(e,t,r,n,o,i,s,c,u,l,p,d,E,f,g,_){for(var h=e,m=_,R=0,A=!1;void 0!==(m=m.get(ar))&&!A;){var y=m.get(e);if(R+=1,void 0!==y){if(y===R)throw new RangeError("Cyclic object value");A=!0}void 0===m.get(ar)&&(R=0)}if("function"==typeof c?h=c(t,h):h instanceof Date?h=p(h):"comma"===r&&tr(h)&&(h=zt.maybeMap(h,(function(e){return e instanceof Date?p(e):e}))),null===h){if(o)return s&&!f?s(t,sr.encoder,g,"key",d):t;h=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(h)||zt.isBuffer(h)){if(s){var I=f?t:s(t,sr.encoder,g,"key",d);if("comma"===r&&f){for(var T=rr.call(String(h),","),S="",C=0;C<T.length;++C)S+=(0===C?"":",")+E(s(T[C],sr.encoder,g,"value",d));return[E(I)+(n&&tr(h)&&1===T.length?"[]":"")+"="+S]}return[E(I)+"="+E(s(h,sr.encoder,g,"value",d))]}return[E(t)+"="+E(String(h))]}var N,O=[];if(void 0===h)return O;if("comma"===r&&tr(h))N=[{value:h.length>0?h.join(",")||null:void 0}];else if(tr(c))N=c;else{var P=Object.keys(h);N=u?P.sort(u):P}for(var b=n&&tr(h)&&1===h.length?t+"[]":t,U=0;U<N.length;++U){var D=N[U],L="object"==typeof D&&void 0!==D.value?D.value:h[D];if(!i||null!==L){var B=tr(h)?"function"==typeof r?r(b,D):b:b+(l?"."+D:"["+D+"]");_.set(e,R);var M=Jt();M.set(ar,_),pushToArray(O,stringify(L,B,r,n,o,i,s,c,u,l,p,d,E,f,g,M))}}return O},ur=Xt,lr=Object.prototype.hasOwnProperty,pr=Array.isArray,dr={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ur.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Er=function parseQueryStringKeys(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&lr.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var l=0;r.depth>0&&null!==(s=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&lr.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:parseArrayValue(t,r),i=e.length-1;i>=0;--i){var s,c=e[i];if("[]"===c&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:"__proto__"!==u&&(s[u]=o):s={0:o}}o=s}return o}(u,t,r,n)}},stringify=function(e,t){var r,n=e,o=function normalizeStringifyOptions(e){if(!e)return sr;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||sr.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=Qt.default;if(void 0!==e.format){if(!Zt.call(Qt.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=Qt.formatters[r],o=sr.filter;return("function"==typeof e.filter||tr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:sr.addQueryPrefix,allowDots:void 0===e.allowDots?sr.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:sr.charsetSentinel,delimiter:void 0===e.delimiter?sr.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:sr.encode,encoder:"function"==typeof e.encoder?e.encoder:sr.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:sr.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:sr.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:sr.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:sr.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):tr(o.filter)&&(r=o.filter);var i,s=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in er?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=er[i];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===c&&t&&t.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var l=Jt(),p=0;p<r.length;++p){var d=r[p];o.skipNulls&&null===n[d]||pushToArray(s,cr(n[d],d,c,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var E=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),E.length>0?f+E:""},fr={formats:Ht,parse:function(e,t){var r=function normalizeParseOptions(e){if(!e)return dr;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?dr.charset:e.charset;return{allowDots:void 0===e.allowDots?dr.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:dr.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:dr.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:dr.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:dr.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:dr.comma,decoder:"function"==typeof e.decoder?e.decoder:dr.decoder,delimiter:"string"==typeof e.delimiter||ur.isRegExp(e.delimiter)?e.delimiter:dr.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:dr.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:dr.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:dr.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:dr.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:dr.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function parseQueryStringValues(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?u="utf-8":"utf8=%26%2310003%3B"===s[r]&&(u="iso-8859-1"),c=r,r=s.length);for(r=0;r<s.length;++r)if(r!==c){var l,p,d=s[r],E=d.indexOf("]="),f=-1===E?d.indexOf("="):E+1;-1===f?(l=t.decoder(d,dr.decoder,u,"key"),p=t.strictNullHandling?null:""):(l=t.decoder(d.slice(0,f),dr.decoder,u,"key"),p=ur.maybeMap(parseArrayValue(d.slice(f+1),t),(function(e){return t.decoder(e,dr.decoder,u,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===u&&(p=interpretNumericEntities(p)),d.indexOf("[]=")>-1&&(p=pr(p)?[p]:p),lr.call(n,l)?n[l]=ur.combine(n[l],p):n[l]=p}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var c=i[s],u=Er(c,n[c],r,"string"==typeof e);o=ur.merge(o,u,r)}return!0===r.allowSparse?o:ur.compact(o)},stringify:stringify};const gr=ce("ebay:request"),_r={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"X-Requested-With, Origin, Content-Type, X-Auth-Token","Access-Control-Allow-Methods":"GET, PUT, POST, DELETE"},hr={"Content-Type":"multipart/form-data"},mr={paramsSerializer:{indexes:null}};class AxiosRequest{constructor(e={}){this.instance=re.create({headers:{..._r},...mr,...e})}get(e,t){return gr("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return gr("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return gr("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return gr("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){gr("postForm: "+e);const n=fr.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}var Rr={},Ar={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},e.nameRegexp=r}(Ar);const yr=Ar,Ir={allowBooleanAttributes:!1,unpairedTags:[]};function isWhiteSpace(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function readPI(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function readCommentAndCDATA(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}Rr.validate=function(e,t){t=Object.assign({},Ir,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=readPI(e,s),s.err)return s}else{if("<"!==e[s]){if(isWhiteSpace(e[s]))continue;return getErrorObject("InvalidChar","char '"+e[s]+"' is not expected.",getLineNumberForPosition(e,s))}{let c=s;if(s++,"!"===e[s]){s=readCommentAndCDATA(e,s);continue}{let u=!1;"/"===e[s]&&(u=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),i=l,!yr.isName(i)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,s))}const p=readAttributeStr(e,s);if(!1===p)return getErrorObject("InvalidAttr","Attributes for '"+l+"' have open quote.",getLineNumberForPosition(e,s));let d=p.value;if(s=p.index,"/"===d[d.length-1]){const r=s-d.length;d=d.substring(0,d.length-1);const o=validateAttributeString(d,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!p.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",getLineNumberForPosition(e,s));if(d.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,c));if(0===r.length)return getErrorObject("InvalidTag","Closing tag '"+l+"' has not been opened.",getLineNumberForPosition(e,c));{const t=r.pop();if(l!==t.tagName){let r=getLineNumberForPosition(e,t.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+l+"'.",getLineNumberForPosition(e,c))}0==r.length&&(o=!0)}}else{const i=validateAttributeString(d,t);if(!0!==i)return getErrorObject(i.err.code,i.err.msg,getLineNumberForPosition(e,s-d.length+i.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,s));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:c}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=readCommentAndCDATA(e,s);continue}if("?"!==e[s+1])break;if(s=readPI(e,++s),s.err)return s}else if("&"===e[s]){const t=validateAmpersand(e,s);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,s));s=t}else if(!0===o&&!isWhiteSpace(e[s]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,s));"<"===e[s]&&s--}}}var i;return n?1==r.length?getErrorObject("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",getLineNumberForPosition(e,r[0].tagStartPos)):!(r.length>0)||getErrorObject("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):getErrorObject("InvalidXml","Start tag expected.",1)};function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const Tr=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=yr.getAllMatches(e,Tr),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",getPositionFromMatch(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",getPositionFromMatch(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",getPositionFromMatch(r[e]));const o=r[e][2];if(!validateAttrName(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is an invalid name.",getPositionFromMatch(r[e]));if(n.hasOwnProperty(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is repeated.",getPositionFromMatch(r[e]));n[o]=1}return!0}function validateAmpersand(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function validateNumberAmpersand(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function getErrorObject(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function validateAttrName(e){return yr.isName(e)}function getLineNumberForPosition(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function getPositionFromMatch(e){return e.startIndex+e[1].length}var Sr={};const Cr={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};Sr.buildOptions=function(e){return Object.assign({},Cr,e)},Sr.defaultOptions=Cr;var Nr=class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}};const Or=Ar;function readEntityExp(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let o="";for(;t<e.length&&e[t]!==n;t++)o+=e[t];return[r,o,t]}function isComment(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function isEntity(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function isElement(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function isAttlist(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function isNotation(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function validateEntityName(e){if(Or.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}var Pr=function readDocType$1(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,o=!1,i=!1,s="";for(;t<e.length;t++)if("<"!==e[t]||i)if(">"===e[t]){if(i?"-"===e[t-1]&&"-"===e[t-2]&&(i=!1,n--):n--,0===n)break}else"["===e[t]?o=!0:s+=e[t];else{if(o&&isEntity(e,t))t+=7,[entityName,val,t]=readEntityExp(e,t+1),-1===val.indexOf("&")&&(r[validateEntityName(entityName)]={regx:RegExp(`&${entityName};`,"g"),val:val});else if(o&&isElement(e,t))t+=8;else if(o&&isAttlist(e,t))t+=8;else if(o&&isNotation(e,t))t+=9;else{if(!isComment)throw new Error("Invalid DOCTYPE");i=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}};const br=/^[-+]?0x[a-fA-F0-9]+$/,Ur=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const Dr={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};var Lr=function toNumber$1(e,t={}){if(t=Object.assign({},Dr,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if(t.hex&&br.test(r))return Number.parseInt(r,16);{const n=Ur.exec(r);if(n){const o=n[1],i=n[2];let s=function trimZeros(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(n[3]);const c=n[4]||n[6];if(!t.leadingZeros&&i.length>0&&o&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!o&&"."!==r[1])return e;{const n=Number(r),u=""+n;return-1!==u.search(/[eE]/)||c?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===u&&""===s||u===s||o&&u==="-"+s?n:e:i?s===u||o+s===u?n:e:r===u||r===o+u?n:e}}return e}};const Br=Ar,Mr=Nr,vr=Pr,Fr=Lr;function addExternalEntities(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function parseTextData(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return parseValue(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?parseValue(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function resolveNameSpace(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const xr=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=Br.getAllMatches(e,xr),n=r.length,o={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(r[e][1]);let i=r[e][4],s=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(n,i,t);o[s]=null==e?i:typeof e!=typeof i||e!==i?e:parseValue(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new Mr("!xml");let r=t,n="",o="";for(let i=0;i<e.length;i++){if("<"===e[i])if("/"===e[i+1]){const t=findClosingIndex(e,">",i,"Closing Tag is not closed.");let s=e.substring(i+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o));const c=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let u=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(u=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=o.lastIndexOf("."),o=o.substring(0,u),r=this.tagsNodeStack.pop(),n="",i=t}else if("?"===e[i+1]){let t=readTagExp(e,i,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new Mr(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(r,e,o)}i=t.closeIndex+1}else if("!--"===e.substr(i+1,3)){const t=findClosingIndex(e,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(i+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}i=t}else if("!D"===e.substr(i+1,2)){const t=vr(e,i);this.docTypeEntities=t.entities,i=t.i}else if("!["===e.substr(i+1,2)){const t=findClosingIndex(e,"]]>",i,"CDATA is not closed.")-2,s=e.substring(i+9,t);n=this.saveTextToParentTag(n,r,o);let c=this.parseTextData(s,r.tagname,o,!0,!1,!0,!0);null==c&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):r.add(this.options.textNodeName,c),i=t+2}else{let s=readTagExp(e,i,this.options.removeNSPrefix),c=s.tagName;const u=s.rawTagName;let l=s.tagExp,p=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const E=r;if(E&&-1!==this.options.unpairedTags.indexOf(E.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),i=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))i=s.closeIndex;else{const r=this.readStopNodeData(e,u,d+1);if(!r)throw new Error(`Unexpected end of ${u}`);i=r.i,t=r.tagContent}const n=new Mr(c);c!==l&&p&&(n[":@"]=this.buildAttributesMap(l,o,c)),t&&(t=this.parseTextData(t,c,o,!0,p,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new Mr(c);c!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(r,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new Mr(c);this.tagsNodeStack.push(r),c!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(r,e,o),r=e}n="",i=d}}else n+=e[i]}return t.child};function addChild(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const replaceEntitiesValue$1=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function isItStopNode(e,t,r){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}function findClosingIndex(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function readTagExp(e,t,r,n=">"){const o=function tagExpWithClosingIndex(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,c=i.search(/\s/);let u=i,l=!0;-1!==c&&(u=i.substring(0,c),i=i.substring(c+1).trimStart());const p=u;if(r){const e=u.indexOf(":");-1!==e&&(u=u.substr(e+1),l=u!==o.data.substr(e+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:p}}function readStopNodeData(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=findClosingIndex(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2}else{const n=readTagExp(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function parseValue(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&Fr(e,r)}return Br.isExist(e)?e:""}var wr=class OrderedObjParser{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild}},kr={};function compress(e,t,r){let n;const o={};for(let i=0;i<e.length;i++){const s=e[i],c=propName$1(s);let u="";if(u=void 0===r?c:r+"."+c,c===t.textNodeName)void 0===n?n=s[c]:n+=""+s[c];else{if(void 0===c)continue;if(s[c]){let e=compress(s[c],t,u);const r=isLeafTag(e,t);s[":@"]?assignAttributes(e,s[":@"],u,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==o[c]&&o.hasOwnProperty(c)?(Array.isArray(o[c])||(o[c]=[o[c]]),o[c].push(e)):t.isArray(c,u,r)?o[c]=[e]:o[c]=e}}}return"string"==typeof n?n.length>0&&(o[t.textNodeName]=n):void 0!==n&&(o[t.textNodeName]=n),o}function propName$1(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function assignAttributes(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function isLeafTag(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}kr.prettify=function prettify$1(e,t){return compress(e,t)};const{buildOptions:Gr}=Sr,Yr=wr,{prettify:$r}=kr,Hr=Rr;var jr=class XMLParser{constructor(e){this.externalEntities={},this.options=Gr(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=Hr.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new Yr(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:$r(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}};function arrToStr(e,t,r,n){let o="",i=!1;for(let s=0;s<e.length;s++){const c=e[s],u=propName(c);if(void 0===u)continue;let l="";if(l=0===r.length?u:`${r}.${u}`,u===t.textNodeName){let e=c[u];isStopNode(l,t)||(e=t.tagValueProcessor(u,e),e=replaceEntitiesValue(e,t)),i&&(o+=n),o+=e,i=!1;continue}if(u===t.cdataPropName){i&&(o+=n),o+=`<![CDATA[${c[u][0][t.textNodeName]}]]>`,i=!1;continue}if(u===t.commentPropName){o+=n+`\x3c!--${c[u][0][t.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const e=attr_to_str(c[":@"],t),r="?xml"===u?"":n;let s=c[u][0][t.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${u}${s}${e}?>`,i=!0;continue}let p=n;""!==p&&(p+=t.indentBy);const d=n+`<${u}${attr_to_str(c[":@"],t)}`,E=arrToStr(c[u],t,l,p);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?o+=d+">":o+=d+"/>":E&&0!==E.length||!t.suppressEmptyNode?E&&E.endsWith(">")?o+=d+`>${E}${n}</${u}>`:(o+=d+">",E&&""!==n&&(E.includes("/>")||E.includes("</"))?o+=n+t.indentBy+E+n:o+=E,o+=`</${u}>`):o+=d+"/>",i=!0}return o}function propName(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let o=t.attributeValueProcessor(n,e[n]);o=replaceEntitiesValue(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function isStopNode(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function replaceEntitiesValue(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const Vr=function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),arrToStr(e,t,"",r)},Kr={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(e){this.options=Object.assign({},Kr,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function processTextOrObjNode(e,t,r){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?Vr(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},Builder.prototype.j2x=function(e,t){let r="",n="";for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(n+="");else if(null===e[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let i="";for(let s=0;s<r;s++){const r=e[o][s];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,o,t):i+=this.buildTextValNode(r,o,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",t)),n+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}},Builder.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Builder.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},Builder.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Builder.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Builder.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};var Wr={XMLParser:jr,XMLValidator:Rr,XMLBuilder:Builder};const qr=ce("ebay:error"),Xr=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),this.name=this.constructor.name,this.description=t,this.meta=r,Object.setPrototypeOf(this,new.target.prototype)}}class EBayNoCallError extends EBayError{constructor(e="No eBay API call defined, please invoke one."){super(e)}}class ApiEnvError extends EBayError{constructor(e){super(`Could not find ${e} in process.env.`)}}class EbayApiError extends EBayError{constructor(e,t,r,n,o){super(e,t,r),this.errorCode=n,this.firstError=o}}class EBayApiError extends EbayApiError{}class EBayAccessDenied extends EBayApiError{}class EBayInvalidGrant extends EBayApiError{}class EBayNotFound extends EBayApiError{}EBayNotFound.code=11001;class EBayInvalidAccessToken extends EBayApiError{}class EBayIAFTokenExpired extends EBayApiError{}EBayIAFTokenExpired.code=21917053;class EBayAuthTokenIsInvalid extends EBayApiError{}EBayAuthTokenIsInvalid.code=931;class EBayAuthTokenIsHardExpired extends EBayApiError{}EBayAuthTokenIsHardExpired.code=932;class EBayIAFTokenInvalid extends EBayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EBayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EBayApiError{}const getErrorMessage=e=>"message"in e?e.message:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ShortMessage:e.Errors.ShortMessage:"eBay API request error",getErrorDescription=(e,t)=>"description"in e?e.description:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].LongMessage:e.Errors.LongMessage:"longMessage"in e?e.longMessage:(200!==t?.status?t?.statusText:"")||"",getErrorCode=e=>"errorId"in e?e.errorId:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ErrorCode:e.Errors.ErrorCode:void 0,extractEBayError=(e,t)=>{const r=function getEBayError(e){return e?"string"==typeof e?{message:e}:"Errors"in e?e:"error"in e&&"string"==typeof e.error?{message:e.error,description:e.error_description||""}:"errors"in e&&Array.isArray(e.errors)?e.errors[0]:"errorMessage"in e?Array.isArray(e.errorMessage?.error)?e.errorMessage.error[0]:e.errorMessage.error:{message:"Unknown eBay API Error",description:'This error response is not known. You should investigate the "meta.res.data" for more information.'}:{message:"eBay API Error",description:"No data is set in response result."}}(t||e.response?.data),n={...r,[Xr]:e},o="Errors"in r?Array.isArray(r.Errors)?r.Errors[0]:r.Errors:r;return e?.response&&(n.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e?.config&&(n.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),{message:getErrorMessage(r),description:getErrorDescription(r,e?.response),errorCode:getErrorCode(r),meta:n,firstError:o}},handleEBayError=e=>{if(qr("handleEBayError",e),e instanceof EBayError||!e.response)throw e;if("object"!=typeof e)throw new EBayError(e);const{message:t,meta:r,description:n,errorCode:o,firstError:i}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o,i);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o,i);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o,i);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o,i);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o,i);throw new EBayApiError(t,n,r,o,i)},checkEBayTraditionalResponse=(e,t)=>{if(!t)return void qr("checkEBayTraditionalResponse: No data found in response.");if(!("Errors"in t)&&!("errorMessage"in t))return;if("Errors"in t&&"Failure"!==t.Ack)return void qr(`checkEBayTraditionalResponse: eBay API returned ${t.Ack}`);const{message:r,meta:n,description:o,errorCode:i,firstError:s}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i,s);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i,s);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i,s);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i,s);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i,s);case EBayAuthTokenIsInvalid.code:throw new EBayAuthTokenIsInvalid(r,o,n,i,s)}throw new EBayApiError(r,o,n,i,s)};var Jr=Object.freeze({__proto__:null,rawError:Xr,EBayError:EBayError,EBayNoCallError:EBayNoCallError,ApiEnvError:ApiEnvError,EbayApiError:EbayApiError,EBayApiError:EBayApiError,EBayAccessDenied:EBayAccessDenied,EBayInvalidGrant:EBayInvalidGrant,EBayNotFound:EBayNotFound,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayAuthTokenIsInvalid:EBayAuthTokenIsInvalid,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayTokenRequired:EBayTokenRequired,EBayInvalidScope:EBayInvalidScope,extractEBayError:extractEBayError,handleEBayError:handleEBayError,checkEBayTraditionalResponse:checkEBayTraditionalResponse});const zr=ce("ebay:xml:request"),Qr={attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,cdataTagName:"__cdata",cdataPositionChar:"\\c",format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"},Zr={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseNodeValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},en={raw:!1,parseOptions:Zr,xmlBuilderOptions:Qr,useIaf:!0,sign:!1,headers:{},returnResponse:!1},tn={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.config={...en,...r},this.j2x=new Wr.XMLBuilder({...Qr,...this.config.xmlBuilderOptions}),this.callName=e,this.fields=t||{},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...Zr,...this.config.parseOptions}}getHeaders(){return{...tn,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return zr("parseOption",t),new Wr.XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+this.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);zr("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...this.config.digitalSignatureHeaders?this.config.digitalSignatureHeaders(t):{},...r||{}}};zr("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(zr("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayTraditionalResponse(o,s),s}catch(e){if(zr("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e,t[this.callName+"Response"])}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}const rn=ce("ebay:authNAuth");class AuthNAuth extends Base{static generateAuthUrl(e,t,r,n=!1){return[e?AuthNAuth.SIGNIN_ENDPOINT.sandbox:AuthNAuth.SIGNIN_ENDPOINT.production,"?SignIn","&RuName=",encodeURIComponent(t),"&SessID=",encodeURIComponent(r),n?"&prompt=login":""].join("")}constructor(e,t){super(e,t),this.authToken=null,this.config.authToken&&this.setAuthToken(this.config.authToken)}get apiEndpoint(){return this.config.sandbox?AuthNAuth.API_ENDPOINT.sandbox:AuthNAuth.API_ENDPOINT.production}async getSessionIdAndAuthUrl(e){if(!this.config.devId)throw new Error("DevId is required.");if(!(e=e||this.config.ruName))throw new Error("RuName is required.");const t=new XMLRequest("GetSessionID",{RuName:e},this.getRequestConfig("GetSessionID"),this.req),r=await t.request();return rn("GetSessionID data",r),{sessionId:r.SessionID,url:AuthNAuth.generateAuthUrl(this.config.sandbox,e,r.SessionID)}}async mintToken(e){if(!this.config.devId)throw new Error("DevId is required.");const t=new XMLRequest("FetchToken",{SessionID:e},this.getRequestConfig("FetchToken"),this.req);try{return await t.request()}catch(e){throw rn("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return rn("Obtain auth token",t),this.setAuthToken(t),t}setAuthToken(e){this.authToken="string"==typeof e?{eBayAuthToken:e}:e}getAuthToken(){return this.authToken?{...this.authToken}:null}get eBayAuthToken(){return this.authToken?.eBayAuthToken??null}getRequestConfig(e){if("number"!=typeof this.config.siteId)throw new Error("\"siteId\" is required for Auth'n'Auth.");return{useIaf:!1,xmlns:"urn:ebay:apis:eBLBaseComponents",endpoint:this.apiEndpoint,headers:{"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967}}}}AuthNAuth.SIGNIN_ENDPOINT={sandbox:"https://signin.sandbox.ebay.com/ws/eBayISAPI.dll",production:"https://signin.ebay.com/ws/eBayISAPI.dll"},AuthNAuth.API_ENDPOINT={production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"};let createNanoEvents=()=>({events:{},emit(e,...t){const r=this.events[e]||[];for(let e=0,n=r.length;e<n;e++)r[e](...t)},on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter((e=>t!==e))}}});const nn=ce("ebay:oauth2");class OAuth2 extends Base{constructor(e,t){super(e,t),this.emitter=createNanoEvents(),this.scope=this.config.scope||OAuth2.defaultScopes}on(e,t){return this.emitter.on(e,t)}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}static generateAuthUrl(e,t,r,n,o=""){return[e?OAuth2.AUTHORIZE_ENDPOINT.sandbox:OAuth2.AUTHORIZE_ENDPOINT.production,"?client_id=",encodeURIComponent(t),"&redirect_uri=",encodeURIComponent(r),"&response_type=code","&state=",encodeURIComponent(o),"&scope=",encodeURIComponent(n.join(" "))].join("")}generateAuthUrl(e,t=this.scope,r=""){if(!(e=e||this.config.ruName))throw new Error("RuName is required.");return OAuth2.generateAuthUrl(this.config.sandbox,this.config.appId,e,t,r)}async getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return nn("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}getScope(){return[...this.scope]}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}async mintApplicationAccessToken(){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{return(await this.req.postForm(this.identityEndpoint,{scope:this.scope.join(" "),grant_type:"client_credentials"},{auth:{username:this.config.appId,password:this.config.certId}})).data}catch(e){throw nn("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){nn("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return nn("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw nn("Failed to obtain application token",e),e}}async mintUserAccessToken(e,t=this.config.ruName){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{const r=(await this.req.postForm(this.identityEndpoint,{grant_type:"authorization_code",code:e,redirect_uri:t},{auth:{username:this.config.appId,password:this.config.certId}})).data;return nn("User Access Token",r),r}catch(e){throw nn("Failed to get the token",e),e}}async getToken(e,t=this.config.ruName){return await this.mintUserAccessToken(e,t)}async refreshUserAccessToken(){if(!this._authToken||!this._authToken.refresh_token)throw nn("Tried to refresh user access token before it was set."),new Error("Failed to refresh the user access token. Token or refresh_token is not set.");try{const e=(await this.req.postForm(this.identityEndpoint,{grant_type:"refresh_token",refresh_token:this._authToken.refresh_token,scope:this.scope.join(" ")},{auth:{username:this.config.appId,password:this.config.certId}})).data;nn("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw nn("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return nn("Obtain user access token",t),this.setCredentials(t),t}getCredentials(){return this._authToken?{...this._authToken}:this._clientToken?{...this._clientToken}:null}setCredentials(e){this._authToken="string"==typeof e?{refresh_token:"",expires_in:7200,refresh_token_expires_in:47304e3,token_type:"User Access Token",access_token:e}:e}async refreshToken(){if(this._authToken)return await this.refreshUserAccessToken();if(this._clientToken)return await this.obtainApplicationAccessToken();throw new Error("Missing credentials. To refresh a token an application access token or user access token must be already set.")}}OAuth2.IDENTITY_ENDPOINT={production:"https://api.ebay.com/identity/v1/oauth2/token",sandbox:"https://api.sandbox.ebay.com/identity/v1/oauth2/token"},OAuth2.AUTHORIZE_ENDPOINT={production:"https://auth.ebay.com/oauth2/authorize",sandbox:"https://auth.sandbox.ebay.com/oauth2/authorize"},OAuth2.defaultScopes=["https://api.ebay.com/oauth/api_scope"];class Auth extends Base{constructor(e,t){super(e,t),this.authNAuth=new AuthNAuth(this.config,this.req),this.OAuth2=new OAuth2(this.config,this.req),this.oAuth2=this.OAuth2}async getHeaderAuthorization(e){if(this.authNAuth.eBayAuthToken)return{Authorization:"Token "+this.authNAuth.eBayAuthToken};return{Authorization:(e?"IAF ":"Bearer ")+await this.OAuth2.getAccessToken()}}}const on="-----BEGIN PRIVATE KEY-----",getUnixTimestamp=()=>Math.floor(Date.now()/1e3),getSignatureParams=e=>[...e?["content-digest"]:[],"x-ebay-signature-key","@method","@path","@authority"],getSignatureParamsValue=e=>getSignatureParams(e).map((e=>`"${e}"`)).join(" "),generateContentDigestValue=(e,t="sha256")=>{const r=Buffer.from("string"==typeof e?e:JSON.stringify(e));return`${"sha512"===t?"sha-512":"sha-256"}=:${function createHash(){throw Error("crypto.createHash is not supported in browser.")}().update(r).digest("base64")}:`};const generateSignatureInput=(e,t=getUnixTimestamp())=>`sig1=(${getSignatureParamsValue(e)});created=${t}`;function generateSignature(e,t,r,n,o=getUnixTimestamp()){const i=function generateBaseString(e,t,r,n=getUnixTimestamp()){try{let o="";return getSignatureParams(r).forEach((r=>{if(o+=`"${r.toLowerCase()}": `,r.startsWith("@"))switch(r.toLowerCase()){case"@method":o+=t.method;break;case"@authority":o+=t.authority;break;case"@path":o+=t.path;break;default:throw new Error("Unknown pseudo header "+r)}else{if(!e[r])throw new Error("Header "+r+" not included in message");o+=e[r]}o+="\n"})),o+=`"@signature-params": (${getSignatureParamsValue(r)});created=${n}`,o}catch(e){throw new EBayError(`Error calculating signature base: ${e.message}`)}}(e,r,n,o);(t=t.trim()).startsWith(on)||(t=on+"\n"+t+"\n-----END PRIVATE KEY-----");return`sig1=:${function sign(){throw Error("crypto.sign is not supported in browser.")}(Buffer.from(i)).toString("base64")}:`}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}getDigitalSignatureHeaders(e,t){if(!this.config.signature)return{};const r=getUnixTimestamp(),n={"x-ebay-enforce-signature":!0,"x-ebay-signature-key":this.config.signature.jwe,...t?{"content-digest":generateContentDigestValue(t,this.config.signature.cipher??"sha256")}:{},"signature-input":generateSignatureInput(t,r)};return{...n,signature:generateSignature(n,this.config.signature.privateKey,e,t,r)}}}const sn={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},an={marketplaceId:"X-EBAY-C-MARKETPLACE-ID",endUserCtx:"X-EBAY-C-ENDUSERCTX",acceptLanguage:"Accept-Language",contentLanguage:"Content-Language"};class Restful extends Api{constructor(e,t,r,n={}){super(e,t,r),this.apiConfig={...this.getApiConfig(),...n}}static buildServerUrl(e,t,r,n){return`${e}${t}.${r?"sandbox.":""}${n}`}get useIaf(){return!1}get schema(){return"https://"}get subdomain(){return"api"}get apiVersionPath(){return""}getServerUrl({schema:e,subdomain:t,apiVersion:r,basePath:n,sandbox:o,tld:i}){return Restful.buildServerUrl(e,t,o,i)+r+n}getApiConfig(){return{subdomain:this.subdomain,useIaf:this.useIaf,apiVersion:this.apiVersionPath,basePath:this.basePath,schema:this.schema,sandbox:this.config.sandbox,tld:"ebay.com",headers:{},returnResponse:!1,sign:!1}}get baseUrl(){return this.getServerUrl(this.apiConfig)}api(e){return new this.constructor(this.config,this.req,this.auth,e)}get apix(){return this.api({subdomain:"apix"})}get apiz(){return this.api({subdomain:"apiz"})}get sign(){return this.api({sign:!0})}async get(e,t={},r){return this.doRequest({method:"get",path:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",path:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",path:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",path:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(an).filter((e=>void 0!==this.config[e])).reduce(((e,t)=>(e[an[t]]=this.config[t],e)),{})}async enrichRequestConfig(e,t=null,r=this.apiConfig){const n=await this.auth.getHeaderAuthorization(r.useIaf),o=r.sign?this.getDigitalSignatureHeaders({method:e.method.toUpperCase(),authority:Restful.buildServerUrl("",r.subdomain,r.sandbox,r.tld),path:r.apiVersion+r.basePath+e.path},t):{},i={...sn,...this.additionalHeaders,...n,...r.headers,...o};return{...e.config,headers:{...e.config.headers||{},...i}}}async doRequest(e,t){try{return await this.request(e,t)}catch(r){if(this.shouldRefreshToken(r))return await this.request(e,t,!0);throw r}}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayInvalidAccessToken.name||(403===e?.meta?.res?.status&&"/sell/inventory/v1"===this.apiConfig.basePath||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath))}async request(e,t=this.apiConfig,r=!1){const{path:n,method:o,data:i}=e,s={...this.apiConfig,...t},c=this.getServerUrl(s)+n;try{r&&await this.auth.OAuth2.refreshToken();const t=await this.enrichRequestConfig(e,i,s),n=["get","delete"].includes(o)?[t]:[i,t],u=await this.req[o](c,...n);return this.apiConfig.returnResponse?u:u.data}catch(e){handleEBayError(e)}}}class Browse extends Restful{get basePath(){return"/buy/browse/v1"}search(e){return this.get("/item_summary/search",{params:e})}searchByImage(e,t){return this.post("/item_summary/search_by_image",t,{params:e})}getItems(e){return this.get("/item/",{params:e})}getItem(e,t){const r=encodeURIComponent(e);return this.get(`/item/${r}`,{params:{fieldgroups:t}})}getItemByLegacyId(e){return this.get("/item/get_item_by_legacy_id",{params:e})}getItemsByItemGroup(e){return this.get("/item/get_items_by_item_group",{params:{item_group_id:e}})}checkCompatibility(e,t){const r=encodeURIComponent(e);return this.post(`/item/${r}/check_compatibility`,t)}addItem(e){return this.post("/shopping_cart/add_item",e)}getShoppingCart(){return this.get("/shopping_cart/")}removeItem(e){return this.post("/shopping_cart/remove_item",e)}updateQuantity(e){return this.post("/shopping_cart/update_quantity",e)}}Browse.id="Browse";let cn=class Feed extends Restful{get basePath(){return"/buy/feed/v1_beta"}getItemFeed(e,t){return this.get("/item",{params:e,headers:{Range:t}})}getItemGroupFeed(e,t){return this.get("/item_group",{params:e,headers:{Range:t}})}getItemSnapshotFeed(e,t,r){return this.get("/item_snapshot",{params:{...e,snapshot_date:t},headers:{Range:r}})}getProductFeed(e,t,r){return this.get("/product",{params:{...e,snapshot_date:t},headers:{Range:r}})}};cn.id="Feed";let un=class Marketing extends Restful{get basePath(){return"/buy/marketing/v1_beta"}getAlsoBoughtByProduct(e){return this.get("/merchandised_product/get_also_bought_products",{params:e})}getAlsoViewedByProduct(e){return this.get("/merchandised_product/get_also_viewed_products",{params:e})}getMerchandisedProducts(e){return this.get("/merchandised_product",{params:e})}};un.id="Marketing";class Offer extends Restful{get basePath(){return"/buy/offer/v1_beta"}getBidding(e){const t=encodeURIComponent(e);return this.get(`/bidding/${t}`)}placeProxyBid(e,t){const r=encodeURIComponent(e);return this.post(`/bidding/${r}/place_proxy_bid`,t)}}Offer.id="Offer";class Order extends Restful{get basePath(){return"/buy/order/v1"}applyCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/apply_coupon`,t)}getCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/checkout_session/${e}`)}initiateCheckoutSession(e){return this.post("/checkout_session/initiate",e)}placeOrder(e){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/place_order`)}removeCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/remove_coupon`,t)}updatePaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_payment_info`,t)}updateQuantity(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}checkoutSessionId(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}updateShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_address`,t)}updateShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_option`,t)}applyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/apply_coupon`,t)}getGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/guest_checkout_session/${e}`)}initiateGuestCheckoutSession(e){return this.post("/guest_checkout_session/initiate",e)}initiateGuestPayment(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/initiate_payment`,t)}placeGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/place_order`,t)}removeGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/remove_coupon`,t)}updateGuestPaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_payment_info`,t)}updateGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_quantity`,t)}updateGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_address`,t)}updateGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_option`,t)}applyProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/apply_coupon`,t)}getProxyGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/proxy_guest_checkout_session/${e}`)}initiateProxyGuestCheckoutSession(e){return this.post("/proxy_guest_checkout_session/initiate",e)}placeProxyGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/place_order`,t)}removeProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/remove_coupon`,t)}updateProxyGuestPaymentInfo(e,t,r,n,o,i){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_payment_info`,i,{headers:{Authorization:t,"X-EBAY-C-DATE":r,"X-EBAY-C-REQUEST-NONCE":n,"X-EBAY-C-SIGNATURE":o}})}updateProxyGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_quantity`,t)}updateProxyGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_address`,t)}updateProxyGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_option`,t)}getGuestPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/guest_purchase_order/${e}`)}getPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/purchase_order/${e}`)}}Order.id="Order";class Deal extends Restful{get basePath(){return"/buy/deal/v1"}getDealItems({categoryIds:e,commissionable:t,deliveryCountry:r,limit:n,offset:o}){return this.get("/deal_item",{params:{category_ids:e,commissionable:t,delivery_country:r,limit:n,offset:o}})}getEvent(e){return e=encodeURIComponent(e),this.get(`/event/${e}`)}getEvents({limit:e,offset:t}){return this.get("/event",{params:{limit:e,offset:t}})}getEventItems(e,{categoryIds:t,deliveryCountry:r,limit:n,offset:o}={}){return this.get("/event_item",{params:{event_ids:e,limit:n,offset:o,category_ids:t,delivery_country:r}})}}Deal.id="Deal";class MarketplaceInsights extends Restful{get basePath(){return"/buy/marketplace_insights/v1_beta"}search({aspectFilter:e,categoryIds:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}){return this.get("/item_sales/search",{params:{aspect_filter:e,category_ids:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}})}}MarketplaceInsights.id="MarketplaceInsights";class Catalog extends Restful{get basePath(){return"/commerce/catalog/v1_beta"}getChangeRequest(e){return this.get(`/change_request/${e}`)}getChangeRequests({filter:e,limit:t,offset:r}={}){return this.get("/change_request",{params:{filter:e,limit:t,offset:r}})}getProduct(e){const t=encodeURIComponent(e);return this.get(`/product/${t}`)}search(e){return this.get("/product_summary/search",{params:e})}getProductMetadata(e,{otherApplicableCategoryIds:t,primaryCategoryId:r}={}){return this.get("/get_product_metadata",{params:{epid:e,other_applicable_category_ids:t,primary_category_id:r}})}getProductMetadataForCategories(e,t){return this.get("/get_product_metadata_for_categories",{params:{primary_category_id:e,other_applicable_category_ids:t}})}}Catalog.id="Catalog";class Charity extends Restful{get basePath(){return"/commerce/charity/v1"}getCharityOrg(e){return e=encodeURIComponent(e),this.get(`/charity_org/${e}`)}getCharityOrgs({limit:e,offset:t,q:r,registrationIds:n}){return this.get("/charity_org",{params:{limit:e,offset:t,q:r,registration_ids:n}})}getCharityOrgByLegacyId(e){return this.get("/charity_org/get_charity_org_by_legacy_id",{params:{legacy_charity_org_id:e}})}}Charity.id="Charity";class Identity extends Restful{get basePath(){return"/commerce/identity/v1"}get subdomain(){return"apiz"}getUser(){return this.get("/user/")}}Identity.id="Identity";class Media extends Restful{get basePath(){return"/commerce/media/v1_beta"}get subdomain(){return"apim"}async createVideo(e){return this.post("/video",e)}async getVideo(e){return e=encodeURIComponent(e),this.get(`/video/${e}`)}async uploadVideo(e,t){return e=encodeURIComponent(e),this.post(`/video/${e}/upload`,t)}}Media.id="Media";class Notification extends Restful{get basePath(){return"/commerce/notification/v1"}getPublicKey(e){return e=encodeURIComponent(e),this.get(`/public_key/${e}`)}getTopic(e){return e=encodeURIComponent(e),this.get(`/topic/${e}`)}getTopics({limit:e,continuationToken:t}){return this.get("/topic",{params:{limit:e,continuation_token:t}})}getSubscriptions({limit:e,continuationToken:t}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}createSubscription(e){return this.post("/subscription",e)}getSubscription(e){return e=encodeURIComponent(e),this.get(`/subscription/${e}`)}updateSubscription(e,t){return e=encodeURIComponent(e),this.put(`/subscription/${e}`,t)}deleteSubscription(e){return e=encodeURIComponent(e),this.delete(`/subscription/${e}`)}enableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/enable`)}disableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/disable`)}test(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/test`)}getDestinations({limit:e,continuationToken:t}){return this.get("/destination",{params:{limit:e,continuation_token:t}})}createDestination(e){return this.post("/destination",e)}getDestination(e){return e=encodeURIComponent(e),this.get(`/destination/${e}`)}updateDestination(e,t){return e=encodeURIComponent(e),this.put(`/destination/${e}`,t)}deleteDestination(e){return e=encodeURIComponent(e),this.delete(`/destination/${e}`)}getConfig(){return this.get("/config")}updateConfig(e){return this.put("/config",e)}}Notification.id="Notification";class Taxonomy extends Restful{get basePath(){return"/commerce/taxonomy/v1"}getDefaultCategoryTreeId(e){return this.get("/get_default_category_tree_id",{params:{marketplace_id:e}})}getCategoryTree(e){const t=encodeURIComponent(e);return this.get(`/category_tree/${t}`)}getCategorySubtree(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_category_subtree`,{params:{category_id:t}})}getCategorySuggestions(e,t){return this.get(`/category_tree/${e}/get_category_suggestions`,{params:{q:t}})}getItemAspectsForCategory(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_item_aspects_for_category`,{params:{category_id:t}})}getCompatibilityProperties(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_properties`,{params:{category_id:t}})}getCompatibilityPropertyValues(e,t,r){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r}})}fetchItemAspects(e){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/fetch_item_aspects`,{responseType:"arraybuffer"})}}Taxonomy.id="Taxonomy";class Translation extends Restful{get basePath(){return"/commerce/translation/v1_beta"}translate(e){return this.post("/translate",e)}}Translation.id="Translation";let ln=class Analytics extends Restful{get basePath(){return"/developer/analytics/v1_beta"}getRateLimits(e,t){return this.get("/rate_limit/",{params:{api_context:e,api_name:t}})}getUserRateLimits(e,t){return this.get("/user_rate_limit/",{params:{api_context:e,api_name:t}})}};ln.id="Analytics";class KeyManagement extends Restful{get subdomain(){return"apiz"}get basePath(){return"/developer/key_management/v1"}getSigningKeys(){return this.get("/signing_key")}createSigningKey(e){return this.post("/signing_key",{signingKeyCipher:e})}getSigningKey(e){return this.get(`/signing_key/${e}`)}}KeyManagement.id="KeyManagement";class Cancellation extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}approveCancellationRequest(e){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/approve`)}checkCancellationEligibility(e){return this.post("/cancellation/check_eligibility",{legacyOrderId:e})}confirmRefundReceived(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/confirm`,t)}createCancellation(e){return this.post("/cancellation",e)}getCancellation(e,t){return e=encodeURIComponent(e),this.get(`/cancellation/${e}`,{params:{fieldgroups:t}})}rejectCancellationRequest(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/reject`,t)}search(e){return this.get("/cancellation/search",{params:e})}}Cancellation.id="Cancellation";class Case extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}appealCaseDecision(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/appeal`,t)}closeCase(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/close`,t)}getCase(e){const t=encodeURIComponent(e);return this.get(`/casemanagement/${t}`)}issueCaseRefund(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/issue_refund`,t)}provideReturnShipmentInfo(e,{shippingCarrierName:t,trackingNumber:r}){const n=encodeURIComponent(e);return this.post(`/casemanagement/${n}/provide_shipment_info`,{shippingCarrierName:t,trackingNumber:r})}providesReturnAddress(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/provide_return_address`,t)}search(e){return this.get("/casemanagement/search",{params:e})}}Case.id="Case";class Inquiry extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}checkInquiryEligibility(e){return this.post("/inquiry/check_eligibility",e)}closeInquiry(e,t){return e=encodeURIComponent(e),"string"==typeof t?.closeReason&&(t.closeReason=t.closeReason.trim()),this.post(`/inquiry/${e}/close`,t)}confirmInquiryRefund(e){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/confirm_refund`)}createInquiry(e){return"string"==typeof e.desiredOutcome&&(e.desiredOutcome=e.desiredOutcome.trim()),this.post("/inquiry",e)}escalateInquiry(e,t){return e=encodeURIComponent(e),t.escalateInquiryReason=t.escalateInquiryReason.trim(),this.post(`/inquiry/${e}/escalate`,t)}getInquiry(e){return e=encodeURIComponent(e),this.get(`/inquiry/${e}`)}issueInquiryRefund(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/issue_refund`,t)}provideInquiryRefundInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_refund_info`,t)}provideInquiryShipmentInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_shipment_info`,t)}search(e){return this.get("/inquiry/search",{params:e})}sendInquiryMessage(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/send_message`,t)}}Inquiry.id="Inquiry";class Return extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}addShippingLabelInfo(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/add_shipping_label`,t)}cancelReturnRequest(e,t){const r=encodeURIComponent(e);return t&&t.buyerCloseReason&&(t.buyerCloseReason=t.buyerCloseReason.trim()),this.post(`/return/${r}/cancel`,t)}checkReturnEligibility(e){return this.post("/return/check_eligibility",e)}checkShippingLabelEligibility(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/check_label_print_eligibility`)}createReturnDraft(e){return this.post("/return/draft",e)}createReturnRequest(e,t){return this.post("/return",e,{params:{fieldgroups:t}})}createReturnShippingLabel(e){const t=encodeURIComponent(e);return this.post(`/return/${t}/initiate_shipping_label`)}deleteReturnDraftFile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/return/draft/${e}/file/${t}`)}escalateReturn(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/escalate`,t)}getReturn(e,t){return e=encodeURIComponent(e),this.get(`/return/${e}`,{params:{fieldgroups:t}})}getReturnDraft(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}`)}getReturnDraftFiles(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}/files`)}getReturnEstimate(e){return this.post("/return/estimate",e)}getReturnFiles(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/files`)}getReturnPreferences(){return this.get("/return/preference")}getReturnShippingLabel(e){return e=encodeURIComponent(e),this.get(`/return/${e}/get_shipping_label`)}getShipmentTrackingInfo(e,t,r){return e=encodeURIComponent(e),this.get(`/return/${e}/tracking`,{params:{carrier_used:t,tracking_number:r}})}issueReturnRefund(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/issue_refund`,t)}markReturnReceived(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_received`,t)}markReturnRefundReceived(e){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_received`)}markReturnRefundSent(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_sent`,t)}markReturnShipped(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_shipped`,t)}processReturnRequest(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/decide`,t)}search(e){return this.get("/return/search",{params:e})}sendReturnMessage(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_message`,t)}sendReturnShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_shipping_label`,{},{params:{to_email_address:t}})}setReturnPreferences(e){return this.post("/return/preference",{rmaRequired:e})}submitReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/submit`,{filePurpose:t})}updateReturnDraft(e,t){return e=encodeURIComponent(e),this.put(`/return/draft/${e}`,{returnRequest:t})}updateShipmentTrackingInfo(e,t){return e=encodeURIComponent(e),this.put(`/return/${e}/update_tracking`,t)}uploadReturnDraftFile(e,t){return e=encodeURIComponent(e),this.post(`/return/draft/${e}/file/upload`,t)}uploadReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/upload`,t)}voidShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/void_shipping_label`,t)}}Return.id="Return";class AccountV1 extends Restful{get basePath(){return"/sell/account/v1"}getCustomPolicies(e){return this.get("/custom_policy/",{params:{policy_types:e}})}createCustomPolicy(e){return this.post("/custom_policy/",e)}getCustomPolicy(e){return e=encodeURIComponent(e),this.get(`/custom_policy/${e}`)}updateCustomPolicy(e,t){return e=encodeURIComponent(e),this.put(`/custom_policy/${e}`,t)}getFulfillmentPolicies(e){return this.get("/fulfillment_policy",{params:{marketplace_id:e}})}createFulfillmentPolicy(e){return this.post("/fulfillment_policy/",e)}updateFulfillmentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/fulfillment_policy/${e}`,t)}deleteFulfillmentPolicy(e){return e=encodeURIComponent(e),this.delete(`/fulfillment_policy/${e}`)}getFulfillmentPolicy(e){return this.get(`/fulfillment_policy/${e}`)}getFulfillmentPolicyByName(e,t){return this.get("/fulfillment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentPolicies(e){return this.get("/payment_policy",{params:{marketplace_id:e}})}getPaymentPolicy(e){return e=encodeURIComponent(e),this.get(`/payment_policy/${e}`)}createPaymentPolicy(e){return this.post("/payment_policy",e)}updatePaymentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/payment_policy/${e}`,t)}deletePaymentPolicy(e){return e=encodeURIComponent(e),this.delete(`/payment_policy/${e}`)}getPaymentPolicyByName(e,t){return this.get("/payment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentsProgram(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}`)}getPaymentsProgramOnboarding(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}/onboarding`)}getPrivileges(){return this.get("/privilege")}getOptedInPrograms(){return this.get("/program/get_opted_in_programs")}optInToProgram(e){return this.post("/program/opt_in",e)}optOutOfProgram(e){return this.post("/program/opt_out",e)}getRateTables(e){return this.get("/rate_table",{params:{country_code:e}})}getReturnPolicies(e){return this.get("/return_policy",{params:{marketplace_id:e}})}getReturnPolicy(e){return e=encodeURIComponent(e),this.get(`/return_policy/${e}`)}createReturnPolicy(e){return this.post("/return_policy",e)}updateReturnPolicy(e,t){return e=encodeURIComponent(e),this.put(`/return_policy/${e}`,t)}deleteReturnPolicy(e){return e=encodeURIComponent(e),this.delete(`/return_policy/${e}`)}getReturnPolicyByName(e,t){return this.get("/return_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/sales_tax/${e}/${t}`)}createOrReplaceSalesTax(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/sales_tax/${e}/${t}`,r)}deleteSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/sales_tax/${e}/${t}`)}getSalesTaxes(e){return this.get("/sales_tax",{params:{country_code:e}})}getSubscription({limit:e,continuationToken:t}={}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}getKYC(){return this.get("/kyc")}getAdvertisingEligibility(e){return this.get("/advertising_eligibility",{params:{program_types:e}})}getInventoryLocation(e){return e=encodeURIComponent(e),this.get(`/location/${e}`)}createInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}`,t)}deleteInventoryLocation(e){return e=encodeURIComponent(e),this.delete(`/location/${e}`)}disableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/disable`)}enableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}updateInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}/update_location_details`,t)}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}}AccountV1.id="AccountV1";class AccountV2 extends Restful{get basePath(){return"/sell/account/v2"}getRateTable(e){return e=encodeURIComponent(e),this.get(`/rate_table/${e}`)}updateShippingCost(e,t){return e=encodeURIComponent(e),this.post(`/rate_table/${e}/update_shipping_cost`,t)}getPayoutSettings(){return this.get("/payout_settings")}updatePayoutPercentage(e){return this.post("/payout_settings/update_percentage",e)}}AccountV2.id="AccountV2";class Analytics extends Restful{get basePath(){return"/sell/analytics/v1"}findSellerStandardsProfiles(){return this.get("/seller_standards_profile")}getSellerStandardsProfile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/seller_standards_profile/${e}/${t}`)}getTrafficReport({dimension:e,filter:t,metric:r,sort:n}={}){return this.get("/traffic_report",{params:{dimension:e,filter:t,metric:r,sort:n}})}getCustomerServiceMetric(e,t){return this.get(`/customer_service_metric/${e}/${t}`)}}Analytics.id="Analytics";class Compliance extends Restful{get basePath(){return"/sell/compliance/v1"}getListingViolationsSummary(e){return this.get("/listing_violation_summary",{params:{compliance_type:e}})}getListingViolations({complianceType:e,offset:t,listingId:r,limit:n}={}){return this.get("/listing_violation",{params:{compliance_type:e,offset:t,listing_id:r,limit:n}})}suppressViolation(e){return this.post("/suppress_listing_violation",e)}}Compliance.id="Compliance";class Finances extends Restful{get basePath(){return"/sell/finances/v1"}get subdomain(){return"apiz"}getPayout(e){return e=encodeURIComponent(e),this.get(`/payout/${e}`)}getPayouts({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/payout",{params:{filter:e,limit:t,offset:r,sort:n}})}getPayoutSummary({filter:e}={}){return this.get("/payout_summary",{params:{filter:e}})}getTransactions({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/transaction",{params:{filter:e,limit:t,offset:r,sort:n}})}getTransactionSummary({filter:e}={}){return this.get("/transaction_summary",{params:{filter:e}})}getTransfer(e){return e=encodeURIComponent(e),this.get(`/transfer/${e}`)}getSellerFundsSummary(){return this.get("/seller_funds_summary")}}Finances.id="Finances";class Fulfillment extends Restful{get basePath(){return"/sell/fulfillment/v1"}getOrder(e,{fieldGroups:t}={}){return this.get(`/order/${e}`,{params:{fieldGroups:t}})}getOrders({filter:e,limit:t,offset:r,orderIds:n,fieldGroups:o}={}){return this.get("/order",{params:{filter:e,limit:t,offset:r,orderIds:Array.isArray(n)?n.join():n,fieldGroups:o}})}issueRefund(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/issue_refund`,t)}getShippingFulfillments(e){return e=encodeURIComponent(e),this.get(`/order/${e}/shipping_fulfillment`)}createShippingFulfillment(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/shipping_fulfillment`,t)}getShippingFulfillment(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/order/${e}/shipping_fulfillment/${t}`)}getPaymentDispute(e){return this.get(`/payment_dispute/${e}`)}fetchEvidenceContent(e){return this.get(`/payment_dispute/${e}/fetch_evidence_content`)}getActivities(e){return this.get(`/payment_dispute/${e}/activity`)}getPaymentDisputeSummaries({orderId:e,buyerUsername:t,openDateFrom:r,openDateTo:n,paymentDisputeStatus:o,limit:i,offset:s}){return this.get("/payment_dispute_summary",{params:{order_id:e,buyer_username:t,open_date_from:r,open_date_to:n,payment_dispute_status:o,limit:i,offset:s}})}contestPaymentDispute(e,t){return this.post(`/payment_dispute/${e}/contest`,t)}acceptPaymentDispute(e){return this.post(`/payment_dispute/${e}/accept`)}uploadEvidenceFile(e,t){return this.post(`/payment_dispute/${e}/upload_evidence_file`,t,{headers:{...hr}})}addEvidence(e,t){return this.post(`/payment_dispute/${e}/add_evidence`,t)}updateEvidence(e,t){return this.post(`/payment_dispute/${e}/update_evidence`,t)}}Fulfillment.id="Fulfillment";class Inventory extends Restful{get basePath(){return"/sell/inventory/v1"}getInventoryLocation(e){const t=encodeURIComponent(e);return this.get(`/location/${t}`)}disableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/disable`)}enableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}createInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}`,t)}deleteInventoryLocation(e){const t=encodeURIComponent(e);return this.delete(`/location/${t}`)}updateInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}/update_location_details`,t)}getInventoryItem(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}`)}createOrReplaceInventoryItem(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}`,t)}deleteInventoryItem(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}`)}getInventoryItems({limit:e,offset:t}={}){return this.get("/inventory_item",{params:{limit:e,offset:t}})}bulkUpdatePriceQuantity(e){return this.post("/bulk_update_price_quantity",e)}bulkCreateOrReplaceInventoryItem(e){return this.post("/bulk_create_or_replace_inventory_item",e)}bulkGetInventoryItem(e){return this.post("/bulk_get_inventory_item",e)}getProductCompatibility(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}/product_compatibility`)}createOrReplaceProductCompatibility(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}/product_compatibility`,t)}deleteProductCompatibility(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}/product_compatibility`)}getOffers({sku:e,marketplaceId:t,format:r,limit:n,offset:o}={}){return this.get("/offer",{params:{sku:e,marketplace_id:t,format:r,limit:n,offset:o}})}getOffer(e){return e=encodeURIComponent(e),this.get(`/offer/${e}`)}createOffer(e){return this.post("/offer",e)}updateOffer(e,t){return e=encodeURIComponent(e),this.put(`/offer/${e}`,t)}deleteOffer(e){return this.delete(`/offer/${e}`)}publishOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/publish`)}publishOfferByInventoryItemGroup(e){return this.post("/offer/publish_by_inventory_item_group",e)}withdrawOfferByInventoryItemGroup(e){return this.post("/offer/withdraw_by_inventory_item_group",e)}getListingFees(e){return this.post("/offer/get_listing_fees",e)}bulkCreateOffer(e){return this.post("/bulk_create_offer",e)}bulkPublishOffer(e){return this.post("/bulk_publish_offer",e)}withdrawOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/withdraw`)}getInventoryItemGroup(e){return e=encodeURIComponent(e),this.get(`/inventory_item_group/${e}`)}createOrReplaceInventoryItemGroup(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item_group/${e}`,t)}deleteInventoryItemGroup(e){return this.delete(`/inventory_item_group/${e}`)}bulkMigrateListing(e){return this.post("/bulk_migrate_listing",e)}getSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/listing/${e}/sku/${t}/locations`)}createOrReplaceSkuLocationMapping(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/listing/${e}/sku/${t}/locations`,r)}deleteSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.delete(`/listing/${e}/sku/${t}/locations`)}}Inventory.id="Inventory";class Marketing extends Restful{get basePath(){return"/sell/marketing/v1"}bulkCreateAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_inventory_reference`,t)}bulkCreateAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_listing_id`,t)}bulkDeleteAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_inventory_reference`,t)}bulkDeleteAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_listing_id`,t)}bulkUpdateAdsBidByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_inventory_reference`,t)}bulkUpdateAdsBidByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_listing_id`,t)}bulkUpdateAdsStatus(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status`,t)}bulkUpdateAdsStatusByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status_by_listing_id`,t)}launchCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/launch`)}setupQuickCampaign(e){return this.post("/ad_campaign/setup_quick_campaign",e)}getAds(e,{limit:t,listingIds:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad`,{params:{limit:t,listing_ids:r,offset:n}})}createAdByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad`,t)}createAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/create_ads_by_inventory_reference`,t)}getAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/ad/${t}`)}deleteAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/ad_campaign/${e}/ad/${t}`)}deleteAdsByInventoryReference(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/delete_ads_by_inventory_reference`)}getAdsByInventoryReference(e,t,r){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/get_ads_by_inventory_reference`,{params:{inventory_reference_id:t,inventory_reference_type:r}})}updateBid(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.post(`/ad_campaign/${e}/ad/${t}/update_bid`,r)}getAdGroups(e,{adGroupStatus:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group`,{params:{ad_group_status:t,limit:r,offset:n}})}createAdGroup(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group`,t)}getAdGroup(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group/${t}`)}updateAdGroup(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/ad_campaign/${e}/ad_group/${t}`,r)}suggestBids(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_bids`,r)}suggestKeywords(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_keywords`,r)}cloneCampaign(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/clone`,t)}getCampaigns({campaignName:e,campaignStatus:t,endDateRange:r,limit:n,offset:o,startDateRange:i}={}){return this.get("/ad_campaign",{params:{campaign_name:e,campaign_status:t,end_date_range:r,limit:n,offset:o,start_date_range:i}})}getCampaign(e){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}`)}createCampaign(e){return this.post("/ad_campaign",e)}deleteCampaign(e){return e=encodeURIComponent(e),this.delete(`/ad_campaign/${e}`)}endCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/end`)}findCampaignByAdReference({inventoryReferenceId:e,inventoryReferenceType:t,listingId:r}={}){return this.get("/ad_campaign/find_campaign_by_ad_reference",{params:{inventory_reference_id:e,inventory_reference_type:t,listing_id:r}})}getCampaignByName(e){return this.get("/ad_campaign/get_campaign_by_name",{params:{campaign_name:e}})}pauseCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/pause`)}resumeCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/resume`)}suggestItems(e,{categoryIds:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/suggest_items`,{params:{category_ids:t,limit:r,offset:n}})}updateAdRateStrategy(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_ad_rate_strategy`,t)}updateCampaignBudget(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_budget`,t)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}bulkCreateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_keyword`,t)}bulkUpdateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_keyword`,t)}getKeywords(e,{adGroupIds:t,keywordStatus:r,limit:n,offset:o}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/keyword`,{params:{ad_group_ids:t,keyword_status:r,limit:n,offset:o}})}createKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/keyword`,t)}getKeyword(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/keyword/${t}`)}updateKeyword(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/ad_campaign/${e}/keyword/${t}`,r)}bulkCreateNegativeKeyword(e){return this.post("/bulk_create_negative_keyword",e)}bulkUpdateNegativeKeyword(e){return this.post("/bulk_update_negative_keyword",e)}getNegativeKeywords({adGroupIds:e,campaignIds:t,limit:r,negativeKeywordStatus:n,offset:o}={}){return this.get("/negative_keyword",{params:{ad_group_ids:e,campaign_ids:t,limit:r,negative_keyword_status:n,offset:o}})}createNegativeKeyword(e){return this.post("/negative_keyword",e)}getNegativeKeyword(e){return e=encodeURIComponent(e),this.get(`/negative_keyword/${e}`)}updateNegativeKeyword(e,t){return e=encodeURIComponent(e),this.put(`/negative_keyword/${e}`,t)}getReport(e){return e=encodeURIComponent(e),this.get(`/ad_report/${e}`)}getReportMetadata(){return this.get("/ad_report_metadata")}getReportMetadataForReportType(e){return e=encodeURIComponent(e),this.get(`/ad_report_metadata/${e}`)}getReportTasks({limit:e,offset:t,reportTaskStatuses:r}={}){return this.get("/ad_report_task",{params:{limit:e,offset:t,report_task_statuses:r}})}getReportTask(e){return e=encodeURIComponent(e),this.get(`/ad_report_task/${e}`)}createReportTask(e){return this.post("/ad_report_task",e)}deleteReportTask(e){return e=encodeURIComponent(e),this.delete(`/ad_report_task/${e}`)}createItemPriceMarkdownPromotion(e){return this.post("/item_price_markdown",e)}updateItemPriceMarkdownPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_price_markdown/${e}`,t)}deleteItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_price_markdown/${e}`)}getItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.get(`/item_price_markdown/${e}`)}createItemPromotion(e){return this.post("/item_promotion",e)}updateItemPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_promotion/${e}`,t)}deleteItemPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_promotion/${e}`)}getItemPromotion(e){return e=encodeURIComponent(e),this.get(`/item_promotion/${e}`)}getListingSet(e,{limit:t,offset:r,q:n,sort:o,status:i}={}){return e=encodeURIComponent(e),this.get(`/promotion/${e}/get_listing_set`,{params:{limit:t,offset:r,q:n,sort:o,status:i}})}getPromotions(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i,sort:s}={}){return this.get("/promotion",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i,sort:s}})}pausePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/pause`)}resumePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/resume`)}getPromotionReports(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i}={}){return this.get("/promotion_report",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i}})}getPromotionSummaryReport(e){return this.get("/promotion_summary_report",{params:{marketplace_id:e}})}getEmailCampaign(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}`)}getEmailCampaigns({limit:e,q:t,offset:r,sort:n}={}){return this.get("/email_campaign",{params:{limit:e,offset:r,q:t,sort:n}})}createEmailCampaign(e){return this.post("/email_campaign",e)}updateEmailCampaign(e,t){return e=encodeURIComponent(e),this.put(`/email_campaign/${e}`,t)}deleteEmailCampaign(e){return e=encodeURIComponent(e),this.delete(`/email_campaign/${e}`)}getEmailPreview(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}/email_preview`)}getAudiences(){return this.get("/email_campaign/audience")}getEmailReport(e,t){return this.get("/email_campaign/report",{params:{startDate:e,endDate:t}})}}Marketing.id="Marketing";class Metadata extends Restful{get basePath(){return"/sell/metadata/v1"}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}getAutomotivePartsCompatibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_automotive_parts_compatibility_policies`,{params:{filter:t}})}getExtendedProducerResponsibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_extended_producer_responsibility_policies`,{params:{filter:t}})}getItemConditionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_item_condition_policies`,{params:{filter:t}})}getListingStructurePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_listing_structure_policies`,{params:{filter:t}})}getNegotiatedPricePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_negotiated_price_policies`,{params:{filter:t}})}getProductAdoptionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_product_adoption_policies`,{params:{filter:t}})}getReturnPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_return_policies`,{params:{filter:t}})}getHazardousMaterialsLabels(e){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_hazardous_materials_labels`)}}Metadata.id="Metadata";class Recommendation extends Restful{get basePath(){return"/sell/recommendation/v1"}findListingRecommendations({filter:e,limit:t,offset:r}={},n){return this.post("/find",{data:n,params:{filter:e,limit:t,offset:r}})}}Recommendation.id="Recommendation";class Feed extends Restful{get basePath(){return"/sell/feed/v1"}getOrderTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/order_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createOrderTask(e){return this.post("/order_task",e)}getOrderTask(e){return e=encodeURIComponent(e),this.get(`/order_task/${e}`)}getInventoryTasks({feedType:e,scheduleId:t,lookBackDays:r,dateRange:n,limit:o,offset:i}={}){return this.get("/inventory_task",{params:{feed_type:e,schedule_id:t,look_back_days:r,date_range:n,limit:o,offset:i}})}createInventoryTask(e){return this.post("/inventory_task",e)}getInventoryTask(e){return e=encodeURIComponent(e),this.get(`/inventory_task/${e}`)}getSchedules({feedType:e,limit:t,offset:r}={}){return this.get("/schedule",{params:{feed_type:e,limit:t,offset:r}})}createSchedule(e){return this.post("/schedule",e)}getSchedule(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}`)}updateSchedule(e,t){return e=encodeURIComponent(e),this.put(`/schedule/${e}`,t)}deleteSchedule(e){return e=encodeURIComponent(e),this.delete(`/schedule/${e}`)}getLatestResultFile(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getScheduleTemplate(e){return e=encodeURIComponent(e),this.get(`/schedule_template/${e}`)}getScheduleTemplates({feedType:e,limit:t,offset:r}={}){return this.get("/schedule_template",{params:{feed_type:e,limit:t,offset:r}})}getTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createTask(e){return this.post("/task",e)}getInputFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_input_file`)}getResultFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getTask(e){return e=encodeURIComponent(e),this.get(`/task/${e}`)}uploadFile(e,t){return e=encodeURIComponent(e),this.post(`/task/${e}/upload_file`,t,{headers:hr})}getCustomerServiceMetricTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o}={}){return this.get("/customer_service_metric_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o}})}createCustomerServiceMetricTask(e,t){return this.post("/customer_service_metric_task",t,{headers:{"accept-language":e}})}getCustomerServiceMetricTask(e){return e=encodeURIComponent(e),this.get(`/customer_service_metric_task/${e}`)}}Feed.id="Feed";class Logistics extends Restful{get basePath(){return"/sell/logistics/v1_beta"}createShippingQuote(e){return this.post("/shipping_quote",e)}getShippingQuote(e){return e=encodeURIComponent(e),this.get(`/shipping_quote/${e}`)}createFromShippingQuote(e){return this.post("/shipment/create_from_shipping_quote",e)}getShipment(e){return this.get(`/shipment/${e}`)}downloadLabelFile(e){return this.get(`/shipment/${e}/download_label_file`)}cancelShipment(e){return this.post(`/shipment/${e}/cancel`)}}Logistics.id="Logistics";class Negotiation extends Restful{get basePath(){return"/sell/negotiation/v1"}findEligibleItems({limit:e,offset:t}={}){return this.get("/find_eligible_items",{params:{limit:e,offset:t}})}sendOfferToInterestedBuyers(e){return this.post("/send_offer_to_interested_buyers",e)}}Negotiation.id="Negotiation";class Listing extends Restful{get basePath(){return"/sell/listing/v1_beta"}createItemDraft(e){return this.post("/item_draft/",e)}}var pn,dn;Listing.id="Listing",function(e){e.AskSellerQuestion="AskSellerQuestion",e.BestOffer="BestOffer",e.BestOfferDeclined="BestOfferDeclined",e.BestOfferPlaced="BestOfferPlaced",e.BidPlaced="BidPlaced",e.BidReceived="BidReceived",e.CounterOfferReceived="CounterOfferReceived",e.CustomCode="CustomCode",e.EndOfAuction="EndOfAuction",e.FeedbackLeft="FeedbackLeft",e.FeedbackReceived="FeedbackReceived",e.FeedbackStarChanged="FeedbackStarChanged",e.FixedPriceEndOfTransaction="FixedPriceEndOfTransaction",e.FixedPriceTransaction="FixedPriceTransaction",e.ItemAddedToWatchList="ItemAddedToWatchList",e.ItemEnded="ItemEnded",e.ItemListed="ItemListed",e.ItemLost="ItemLost",e.ItemMarkedPaid="ItemMarkedPaid",e.ItemMarkedShipped="ItemMarkedShipped",e.ItemRemovedFromWatchList="ItemRemovedFromWatchList",e.ItemSold="ItemSold",e.ItemUnsold="ItemUnsold",e.ItemWon="ItemWon",e.OutBid="OutBid",e.PriceChange="PriceChange",e.SecondChanceOffer="SecondChanceOffer",e.WatchedItemEndingSoon="WatchedItemEndingSoon"}(pn||(pn={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(dn||(dn={}));var En,fn=dn;!function(e){e[e.findCompletedItems=0]="findCompletedItems",e[e.findItemsAdvanced=1]="findItemsAdvanced",e[e.findItemsByCategory=2]="findItemsByCategory",e[e.findItemsByKeywords=3]="findItemsByKeywords",e[e.findItemsByProduct=4]="findItemsByProduct",e[e.findItemsIneBayStores=5]="findItemsIneBayStores",e[e.getHistograms=6]="getHistograms",e[e.getSearchKeywordsRecommendation=7]="getSearchKeywordsRecommendation",e[e.getVersion=8]="getVersion"}(En||(En={}));var gn,_n=En;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(gn||(gn={}));var hn,mn=gn;!function(e){e[e.FindProducts=0]="FindProducts",e[e.GetCategoryInfo=1]="GetCategoryInfo",e[e.GeteBayTime=2]="GeteBayTime",e[e.GetItemStatus=3]="GetItemStatus",e[e.GetMultipleItems=4]="GetMultipleItems",e[e.GetShippingCosts=5]="GetShippingCosts",e[e.GetSingleItem=6]="GetSingleItem",e[e.GetUserProfile=7]="GetUserProfile"}(hn||(hn={}));var Rn,An=hn;!function(e){e[e.AddDispute=0]="AddDispute",e[e.AddDisputeResponse=1]="AddDisputeResponse",e[e.AddFixedPriceItem=2]="AddFixedPriceItem",e[e.AddItem=3]="AddItem",e[e.AddItemFromSellingManagerTemplate=4]="AddItemFromSellingManagerTemplate",e[e.AddItems=5]="AddItems",e[e.AddMemberMessageAAQToPartner=6]="AddMemberMessageAAQToPartner",e[e.AddMemberMessageRTQ=7]="AddMemberMessageRTQ",e[e.AddMemberMessagesAAQToBidder=8]="AddMemberMessagesAAQToBidder",e[e.AddOrder=9]="AddOrder",e[e.AddSecondChanceItem=10]="AddSecondChanceItem",e[e.AddSellingManagerInventoryFolder=11]="AddSellingManagerInventoryFolder",e[e.AddSellingManagerProduct=12]="AddSellingManagerProduct",e[e.AddSellingManagerTemplate=13]="AddSellingManagerTemplate",e[e.AddToItemDescription=14]="AddToItemDescription",e[e.AddToWatchList=15]="AddToWatchList",e[e.AddTransactionConfirmationItem=16]="AddTransactionConfirmationItem",e[e.CompleteSale=17]="CompleteSale",e[e.ConfirmIdentity=18]="ConfirmIdentity",e[e.DeleteMyMessages=19]="DeleteMyMessages",e[e.DeleteSellingManagerInventoryFolder=20]="DeleteSellingManagerInventoryFolder",e[e.DeleteSellingManagerItemAutomationRule=21]="DeleteSellingManagerItemAutomationRule",e[e.DeleteSellingManagerProduct=22]="DeleteSellingManagerProduct",e[e.DeleteSellingManagerTemplate=23]="DeleteSellingManagerTemplate",e[e.DeleteSellingManagerTemplateAutomationRule=24]="DeleteSellingManagerTemplateAutomationRule",e[e.DisableUnpaidItemAssistance=25]="DisableUnpaidItemAssistance",e[e.EndFixedPriceItem=26]="EndFixedPriceItem",e[e.EndItem=27]="EndItem",e[e.EndItems=28]="EndItems",e[e.ExtendSiteHostedPictures=29]="ExtendSiteHostedPictures",e[e.FetchToken=30]="FetchToken",e[e.GetAccount=31]="GetAccount",e[e.GetAdFormatLeads=32]="GetAdFormatLeads",e[e.GetAllBidders=33]="GetAllBidders",e[e.GetApiAccessRules=34]="GetApiAccessRules",e[e.GetBestOffers=35]="GetBestOffers",e[e.GetBidderList=36]="GetBidderList",e[e.GetCategories=37]="GetCategories",e[e.GetCategoryFeatures=38]="GetCategoryFeatures",e[e.GetCategoryMappings=39]="GetCategoryMappings",e[e.GetCategorySpecifics=40]="GetCategorySpecifics",e[e.GetChallengeToken=41]="GetChallengeToken",e[e.GetCharities=42]="GetCharities",e[e.GetClientAlertsAuthToken=43]="GetClientAlertsAuthToken",e[e.GetContextualKeywords=44]="GetContextualKeywords",e[e.GetDescriptionTemplates=45]="GetDescriptionTemplates",e[e.GetDispute=46]="GetDispute",e[e.GeteBayDetails=47]="GeteBayDetails",e[e.GeteBayOfficialTime=48]="GeteBayOfficialTime",e[e.GetFeedback=49]="GetFeedback",e[e.GetItem=50]="GetItem",e[e.GetItemsAwaitingFeedback=51]="GetItemsAwaitingFeedback",e[e.GetItemShipping=52]="GetItemShipping",e[e.GetItemTransactions=53]="GetItemTransactions",e[e.GetMemberMessages=54]="GetMemberMessages",e[e.GetMessagePreferences=55]="GetMessagePreferences",e[e.GetMyeBayBuying=56]="GetMyeBayBuying",e[e.GetMyeBayReminders=57]="GetMyeBayReminders",e[e.GetMyeBaySelling=58]="GetMyeBaySelling",e[e.GetMyMessages=59]="GetMyMessages",e[e.GetNotificationPreferences=60]="GetNotificationPreferences",e[e.GetNotificationsUsage=61]="GetNotificationsUsage",e[e.GetOrders=62]="GetOrders",e[e.GetOrderTransactions=63]="GetOrderTransactions",e[e.GetPromotionalSaleDetails=64]="GetPromotionalSaleDetails",e[e.GetSellerDashboard=65]="GetSellerDashboard",e[e.GetSellerEvents=66]="GetSellerEvents",e[e.GetSellerList=67]="GetSellerList",e[e.GetSellerTransactions=68]="GetSellerTransactions",e[e.GetSellingManagerAlerts=69]="GetSellingManagerAlerts",e[e.GetSellingManagerEmailLog=70]="GetSellingManagerEmailLog",e[e.GetSellingManagerInventory=71]="GetSellingManagerInventory",e[e.GetSellingManagerInventoryFolder=72]="GetSellingManagerInventoryFolder",e[e.GetSellingManagerItemAutomationRule=73]="GetSellingManagerItemAutomationRule",e[e.GetSellingManagerSaleRecord=74]="GetSellingManagerSaleRecord",e[e.GetSellingManagerSoldListings=75]="GetSellingManagerSoldListings",e[e.GetSellingManagerTemplateAutomationRule=76]="GetSellingManagerTemplateAutomationRule",e[e.GetSellingManagerTemplates=77]="GetSellingManagerTemplates",e[e.GetSessionID=78]="GetSessionID",e[e.GetShippingDiscountProfiles=79]="GetShippingDiscountProfiles",e[e.GetStore=80]="GetStore",e[e.GetStoreCategoryUpdateStatus=81]="GetStoreCategoryUpdateStatus",e[e.GetStoreCustomPage=82]="GetStoreCustomPage",e[e.GetStoreOptions=83]="GetStoreOptions",e[e.GetStorePreferences=84]="GetStorePreferences",e[e.GetSuggestedCategories=85]="GetSuggestedCategories",e[e.GetTaxTable=86]="GetTaxTable",e[e.GetTokenStatus=87]="GetTokenStatus",e[e.GetUser=88]="GetUser",e[e.GetUserContactDetails=89]="GetUserContactDetails",e[e.GetUserDisputes=90]="GetUserDisputes",e[e.GetUserPreferences=91]="GetUserPreferences",e[e.GetVeROReasonCodeDetails=92]="GetVeROReasonCodeDetails",e[e.GetVeROReportStatus=93]="GetVeROReportStatus",e[e.LeaveFeedback=94]="LeaveFeedback",e[e.MoveSellingManagerInventoryFolder=95]="MoveSellingManagerInventoryFolder",e[e.PlaceOffer=96]="PlaceOffer",e[e.RelistFixedPriceItem=97]="RelistFixedPriceItem",e[e.RelistItem=98]="RelistItem",e[e.RemoveFromWatchList=99]="RemoveFromWatchList",e[e.RespondToBestOffer=100]="RespondToBestOffer",e[e.RespondToFeedback=101]="RespondToFeedback",e[e.ReviseCheckoutStatus=102]="ReviseCheckoutStatus",e[e.ReviseFixedPriceItem=103]="ReviseFixedPriceItem",e[e.ReviseInventoryStatus=104]="ReviseInventoryStatus",e[e.ReviseItem=105]="ReviseItem",e[e.ReviseMyMessages=106]="ReviseMyMessages",e[e.ReviseMyMessagesFolders=107]="ReviseMyMessagesFolders",e[e.ReviseSellingManagerInventoryFolder=108]="ReviseSellingManagerInventoryFolder",e[e.ReviseSellingManagerProduct=109]="ReviseSellingManagerProduct",e[e.ReviseSellingManagerSaleRecord=110]="ReviseSellingManagerSaleRecord",e[e.ReviseSellingManagerTemplate=111]="ReviseSellingManagerTemplate",e[e.RevokeToken=112]="RevokeToken",e[e.SaveItemToSellingManagerTemplate=113]="SaveItemToSellingManagerTemplate",e[e.SellerReverseDispute=114]="SellerReverseDispute",e[e.SendInvoice=115]="SendInvoice",e[e.SetMessagePreferences=116]="SetMessagePreferences",e[e.SetNotificationPreferences=117]="SetNotificationPreferences",e[e.SetPromotionalSale=118]="SetPromotionalSale",e[e.SetPromotionalSaleListings=119]="SetPromotionalSaleListings",e[e.SetSellingManagerFeedbackOptions=120]="SetSellingManagerFeedbackOptions",e[e.SetSellingManagerItemAutomationRule=121]="SetSellingManagerItemAutomationRule",e[e.SetSellingManagerTemplateAutomationRule=122]="SetSellingManagerTemplateAutomationRule",e[e.SetShippingDiscountProfiles=123]="SetShippingDiscountProfiles",e[e.SetStore=124]="SetStore",e[e.SetStoreCategories=125]="SetStoreCategories",e[e.SetStoreCustomPage=126]="SetStoreCustomPage",e[e.SetStorePreferences=127]="SetStorePreferences",e[e.SetTaxTable=128]="SetTaxTable",e[e.SetUserNotes=129]="SetUserNotes",e[e.SetUserPreferences=130]="SetUserPreferences",e[e.UploadSiteHostedPictures=131]="UploadSiteHostedPictures",e[e.ValidateChallengeInput=132]="ValidateChallengeInput",e[e.ValidateTestUserRegistration=133]="ValidateTestUserRegistration",e[e.VerifyAddFixedPriceItem=134]="VerifyAddFixedPriceItem",e[e.VerifyAddItem=135]="VerifyAddItem",e[e.VerifyAddSecondChanceItem=136]="VerifyAddSecondChanceItem",e[e.VerifyRelistItem=137]="VerifyRelistItem",e[e.VeROReportItems=138]="VeROReportItems"}(Rn||(Rn={}));var yn,In,Tn,Sn,Cn,Nn,On,Pn,bn,Un,Dn,Ln,Bn,Mn,vn,Fn,xn,wn,kn,Gn,Yn,$n,Hn,jn,Vn,Kn,Wn,qn,Xn,Jn,zn,Qn,Zn,eo,to,ro,no,oo,io,so,ao,co,uo,lo,po,Eo=Rn;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...en,...n};try{return await this.request(o,t,e,r)}catch(n){if(this.shouldRefreshToken(n))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"api.ebay.com",sandbox:"api.sandbox.ebay.com"},path:"/ws/api.dll",calls:Eo,xmlns:"urn:ebay:apis:eBLBaseComponents",headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967,...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createShoppingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for shopping API.");return this.createTraditionalXMLApi({endpoint:{production:"open.api.ebay.com",sandbox:"open.api.sandbox.ebay.com"},path:"/shopping",xmlns:"urn:ebay:apis:eBLBaseComponents",calls:An,headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-SITE-ID":this.config.siteId,"X-EBAY-API-VERSION":863,"X-EBAY-API-REQUEST-ENCODING":"xml",...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createFindingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/services/search/FindingService/v1",xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:_n,headers:e=>({"X-EBAY-SOA-SECURITY-APPNAME":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createClientAlertsApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for client alerts API.");const e={endpoint:{production:"clientalerts.ebay.com",sandbox:"clientalerts.sandbox.ebay.com"},path:"/ws/ecasvc/ClientAlerts",calls:fn},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>fr.stringify(e,{allowDots:!0}).replace(/%5B/gi,"(").replace(/%5D/gi,")"),r={appid:this.config.appId,siteid:this.config.siteId,version:643},n={};return Object.keys(e.calls).forEach((e=>{n[e]=async n=>this.req.get(t,{paramsSerializer:{serialize:paramsSerializer},params:{...r,...n,callname:e}})})),n}createMerchandisingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/MerchandisingService",xmlns:"http://www.ebay.com/marketplace/services",calls:mn,headers:e=>({"EBAY-SOA-CONSUMER-ID":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createBusinessPolicyManagementApi(){throw new Error("Important! This API is deprecated and will be decommissioned on January 31, 2022. We recommend that you migrate to the fulfillment_policy, payment_policy, and return_policy resources of the Account API to set up and manage all of your fulfillment, payment, and return business policies.")}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayIAFTokenExpired.name||e.name===EBayIAFTokenInvalid.name||e.name===EBayAuthTokenIsHardExpired.name||e.name===EBayAuthTokenIsInvalid.name)}async request(e,t,r,n,o=!1){try{o&&await this.auth.OAuth2.refreshToken();const i=await this.getConfig(t,r,e),s=new XMLRequest(r,n,i,this.req);return await s.request()}catch(e){handleEBayError(e)}}async getConfig(e,t,r){const n=this.auth.authNAuth.eBayAuthToken,o=!n&&r.useIaf?await this.auth.OAuth2.getAccessToken():null,i=!n&&o,s=this.config.sandbox?e.endpoint.sandbox:e.endpoint.production;return{...r,xmlns:e.xmlns,endpoint:`https://${s}${e.path}`,headers:{...e.headers(t,i?o:null),...r.headers},digitalSignatureHeaders:t=>r.sign?this.getDigitalSignatureHeaders({method:"POST",authority:s,path:e.path},t):{},...i?{}:{eBayAuthToken:n}}}createTraditionalXMLApi(e){const t={};return Object.keys(e.calls).forEach((r=>{t[r]=this.createXMLRequest(r,e)})),t}}class ApiFactory extends Api{constructor(){super(...arguments),this._restful={}}createBuyApi(){return{browse:this.createRestfulApi(Browse),feed:this.createRestfulApi(cn),marketing:this.createRestfulApi(un),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),charity:this.createRestfulApi(Charity),identity:this.createRestfulApi(Identity),notification:this.createRestfulApi(Notification),media:this.createRestfulApi(Media),translation:this.createRestfulApi(Translation),taxonomy:this.createRestfulApi(Taxonomy)}}createDeveloperApi(){return{analytics:this.createRestfulApi(ln),keyManagement:this.createRestfulApi(KeyManagement)}}createPostOrderApi(){return{cancellation:this.createRestfulApi(Cancellation),case:this.createRestfulApi(Case),inquiry:this.createRestfulApi(Inquiry),return:this.createRestfulApi(Return)}}createSellApi(){return{account:this.createRestfulApi(AccountV1),accountV2:this.createRestfulApi(AccountV2),analytics:this.createRestfulApi(Analytics),compliance:this.createRestfulApi(Compliance),fulfillment:this.createRestfulApi(Fulfillment),inventory:this.createRestfulApi(Inventory),marketing:this.createRestfulApi(Marketing),metadata:this.createRestfulApi(Metadata),recommendation:this.createRestfulApi(Recommendation),finances:this.createRestfulApi(Finances),feed:this.createRestfulApi(Feed),logistics:this.createRestfulApi(Logistics),negotiation:this.createRestfulApi(Negotiation),listing:this.createRestfulApi(Listing)}}get traditional(){return this._traditional?this._traditional:this._traditional=new Traditional(this.config,this.req,this.auth)}createTradingApi(){return this.traditional.createTradingApi()}createShoppingApi(){return this.traditional.createShoppingApi()}createFindingApi(){return this.traditional.createFindingApi()}createClientAlertsApi(){return this.traditional.createClientAlertsApi()}createMerchandisingApi(){return this.traditional.createMerchandisingApi()}createRestfulApi(e){const t=e.id;return this._restful[t]||(this._restful[t]=new e(this.config,this.req,this.auth))}}!function(e){e[e.EBAY_US=0]="EBAY_US",e[e.EBAY_ENCA=2]="EBAY_ENCA",e[e.EBAY_GB=3]="EBAY_GB",e[e.EBAY_AU=15]="EBAY_AU",e[e.EBAY_AT=16]="EBAY_AT",e[e.EBAY_FRBE=23]="EBAY_FRBE",e[e.EBAY_FR=71]="EBAY_FR",e[e.EBAY_DE=77]="EBAY_DE",e[e.EBAY_MOTOR=100]="EBAY_MOTOR",e[e.EBAY_IT=101]="EBAY_IT",e[e.EBAY_NLBE=123]="EBAY_NLBE",e[e.EBAY_NL=146]="EBAY_NL",e[e.EBAY_ES=186]="EBAY_ES",e[e.EBAY_CH=193]="EBAY_CH",e[e.EBAY_HK=201]="EBAY_HK",e[e.EBAY_IN=203]="EBAY_IN",e[e.EBAY_IE=205]="EBAY_IE",e[e.EBAY_MY=207]="EBAY_MY",e[e.EBAY_FRCA=210]="EBAY_FRCA",e[e.EBAY_PH=211]="EBAY_PH",e[e.EBAY_PL=212]="EBAY_PL",e[e.EBAY_SG=216]="EBAY_SG"}(yn||(yn={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_AT="EBAY_AT",e.EBAY_AU="EBAY_AU",e.EBAY_BE="EBAY_BE",e.EBAY_CA="EBAY_CA",e.EBAY_CH="EBAY_CH",e.EBAY_DE="EBAY_DE",e.EBAY_ES="EBAY_ES",e.EBAY_FR="EBAY_FR",e.EBAY_GB="EBAY_GB",e.EBAY_HK="EBAY_HK",e.EBAY_IE="EBAY_IE",e.EBAY_IN="EBAY_IN",e.EBAY_IT="EBAY_IT",e.EBAY_MY="EBAY_MY",e.EBAY_NL="EBAY_NL",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_SG="EBAY_SG",e.EBAY_TH="EBAY_TH",e.EBAY_TW="EBAY_TW",e.EBAY_VN="EBAY_VN",e.EBAY_MOTORS_US="EBAY_MOTORS_US"}(In||(In={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Tn||(Tn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(Sn||(Sn={})),function(e){e.CLOSED="CLOSED",e.CS_CLOSED="CS_CLOSED",e.ON_HOLD="ON_HOLD",e.OPEN="OPEN",e.OTHER="OTHER",e.REFUND_AGREED_BUT_FAILED="REFUND_AGREED_BUT_FAILED",e.WAITING_CS="WAITING_CS",e.WAITING_DELIVERY="WAITING_DELIVERY"}(Cn||(Cn={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(Nn||(Nn={})),function(e){e.CLOSED="CLOSED",e.CLOSED_WITH_ESCALATION="CLOSED_WITH_ESCALATION",e.CS_CLOSED="CS_CLOSED",e.OPEN="OPEN",e.OTHER="OTHER",e.PENDING="PENDING",e.WAITING_BUYER_RESPONSE="WAITING_BUYER_RESPONSE",e.WAITING_SELLER_RESPONSE="WAITING_SELLER_RESPONSE"}(On||(On={})),function(e){e.AUSTRALIA_POST="AUSTRALIA_POST",e.BARTOLINI="BARTOLINI",e.CANADA_POST="CANADA_POST",e.COLISSIMO="COLISSIMO",e.COLLECT_PLUS="COLLECT_PLUS",e.CORREOS="CORREOS",e.DEUTSCHE_POST="DEUTSCHE_POST",e.DHL="DHL",e.FEDEX="FEDEX",e.HERMES="HERMES",e.LA_POSTE="LA_POSTE",e.MONDIAL_RELAY="MONDIAL_RELAY",e.MRW="MRW",e.NEXIVE="NEXIVE",e.OTHER="OTHER",e.PARCEL_FORCE="PARCEL_FORCE",e.POSTE="POSTE",e.ROYAL_MAIL="ROYAL_MAIL",e.SEUR="SEUR",e.UNKNOWN="UNKNOWN",e.UPS="UPS",e.USPS="USPS"}(Pn||(Pn={})),function(e){e.ARRIVED_DAMAGED="ARRIVED_DAMAGED",e.ARRIVED_LATE="ARRIVED_LATE",e.BUYER_CANCEL_ORDER="BUYER_CANCEL_ORDER",e.BUYER_NO_SHOW="BUYER_NO_SHOW",e.BUYER_NOT_SCHEDULED="BUYER_NOT_SCHEDULED",e.BUYER_REFUSED_TO_PICKUP="BUYER_REFUSED_TO_PICKUP",e.DEFECTIVE_ITEM="DEFECTIVE_ITEM",e.DIFFERENT_FROM_LISTING="DIFFERENT_FROM_LISTING",e.EXPIRED_ITEM="EXPIRED_ITEM",e.FAKE_OR_COUNTERFEIT="FAKE_OR_COUNTERFEIT",e.FOUND_BETTER_PRICE="FOUND_BETTER_PRICE",e.IN_STORE_RETURN="IN_STORE_RETURN",e.MISSING_PARTS="MISSING_PARTS",e.NO_LONGER_NEED_ITEM="NO_LONGER_NEED_ITEM",e.NO_REASON="NO_REASON",e.NOT_AS_DESCRIBED="NOT_AS_DESCRIBED",e.ORDERED_ACCIDENTALLY="ORDERED_ACCIDENTALLY",e.ORDERED_DIFFERENT_ITEM="ORDERED_DIFFERENT_ITEM",e.ORDERED_WRONG_ITEM="ORDERED_WRONG_ITEM",e.OTHER="OTHER",e.OUT_OF_STOCK="OUT_OF_STOCK",e.RETURNING_GIFT="RETURNING_GIFT",e.VALET_DELIVERY_ISSUES="VALET_DELIVERY_ISSUES",e.VALET_UNAVAILABLE="VALET_UNAVAILABLE",e.WRONG_SIZE="WRONG_SIZE"}(bn||(bn={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(Un||(Un={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(Dn||(Dn={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(Ln||(Ln={})),function(e){e.BUYER_NORESPONSE="BUYER_NORESPONSE",e.BUYER_RETURNED_WRONG_ITEM="BUYER_RETURNED_WRONG_ITEM",e.DISAGREE_WITH_RETURN_REASON="DISAGREE_WITH_RETURN_REASON",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.ITEM_RECEIVED_IN_DIFFERENT_CONDITION="ITEM_RECEIVED_IN_DIFFERENT_CONDITION",e.NEW_ITEM_NOT_RECEIVED="NEW_ITEM_NOT_RECEIVED",e.NO_REFUND_FOR_RETURN_SHIPPING="NO_REFUND_FOR_RETURN_SHIPPING",e.NO_REFUND_RECEIVED="NO_REFUND_RECEIVED",e.OTHER="OTHER",e.RECEIVED_WRONG_ITEM="RECEIVED_WRONG_ITEM",e.SELLER_NO_RESPONSE="SELLER_NO_RESPONSE",e.TROUBLE_COMMUNICATION_WITH_BUYER="TROUBLE_COMMUNICATION_WITH_BUYER",e.TROUBLE_COMMUNICATION_WITH_SELLER="TROUBLE_COMMUNICATION_WITH_SELLER"}(Bn||(Bn={})),function(e){e.ACCEPT_PARTIAL_REFUND="ACCEPT_PARTIAL_REFUND",e.ACCEPT_REPLACEMENT_OFFER="ACCEPT_REPLACEMENT_OFFER",e.APPROVE="APPROVE",e.APPROVE_WITHOUT_EBAY_LABEL="APPROVE_WITHOUT_EBAY_LABEL",e.DECLINE="DECLINE",e.DECLINE_PARTIAL_REFUND="DECLINE_PARTIAL_REFUND",e.DECLINE_REPLACEMENT_OFFER="DECLINE_REPLACEMENT_OFFER",e.OFFER_PARTIAL_REFUND="OFFER_PARTIAL_REFUND",e.OFFER_REPLACEMENT="OFFER_REPLACEMENT",e.OFFER_RETURN="OFFER_RETURN",e.OFFER_RETURN_WITHOUT_LABEL="OFFER_RETURN_WITHOUT_LABEL",e.PROVIDE_RMA="PROVIDE_RMA",e.UNKNOWN="UNKNOWN"}(Mn||(Mn={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(vn||(vn={})),function(e){e.ALL_OPEN="ALL_OPEN",e.ALL_OPEN_REPLACEMENT="ALL_OPEN_REPLACEMENT",e.ALL_OPEN_RETURN="ALL_OPEN_RETURN",e.CLOSED="CLOSED",e.EBAY_PLUS="EBAY_PLUS",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_SHIPPED="ITEM_SHIPPED",e.RETURN_STARTED="RETURN_STARTED",e.SELLER_ACTION_DUE="SELLER_ACTION_DUE",e.SELLER_ACTION_OVERDUE="SELLER_ACTION_OVERDUE",e.SELLER_NO_ACTION="SELLER_NO_ACTION",e.UNKNOWN="UNKNOWN"}(Fn||(Fn={})),function(e){e.AUTO_REFUND_INITIATED="AUTO_REFUND_INITIATED",e.CLOSED="CLOSED",e.INITIAL="INITIAL",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_KEPT="ITEM_KEPT",e.ITEM_READY_TO_SHIP="ITEM_READY_TO_SHIP",e.ITEM_SHIPPED="ITEM_SHIPPED",e.LESS_THAN_A_FULL_REFUND_ISSUED="LESS_THAN_A_FULL_REFUND_ISSUED",e.PARTIAL_REFUND_AS_PAYOUT_INITIATED="PARTIAL_REFUND_AS_PAYOUT_INITIATED",e.PARTIAL_REFUND_DECLINED="PARTIAL_REFUND_DECLINED",e.PARTIAL_REFUND_FAILED="PARTIAL_REFUND_FAILED",e.PARTIAL_REFUND_INITIATED="PARTIAL_REFUND_INITIATED",e.PARTIAL_REFUND_NON_PAYPAL_INITIATED="PARTIAL_REFUND_NON_PAYPAL_INITIATED",e.PARTIAL_REFUND_REQUESTED="PARTIAL_REFUND_REQUESTED",e.PARTIAL_REFUNDED="PARTIAL_REFUNDED",e.PAYOUT_INITIATED="PAYOUT_INITIATED",e.REFUND_AS_PAYOUT_INITIATED="REFUND_AS_PAYOUT_INITIATED",e.REFUND_FAILED="REFUND_FAILED",e.REFUND_INITIATED="REFUND_INITIATED",e.REFUND_SENT_PENDING_CONFIRMATION="REFUND_SENT_PENDING_CONFIRMATION",e.REFUND_TIMEOUT="REFUND_TIMEOUT",e.REPLACED="REPLACED",e.REPLACEMENT_CLOSED="REPLACEMENT_CLOSED",e.REPLACEMENT_DELIVERED="REPLACEMENT_DELIVERED",e.REPLACEMENT_LABEL_PENDING="REPLACEMENT_LABEL_PENDING",e.REPLACEMENT_LABEL_PENDING_TIMEOUT="REPLACEMENT_LABEL_PENDING_TIMEOUT",e.REPLACEMENT_LABEL_REQUESTED="REPLACEMENT_LABEL_REQUESTED",e.REPLACEMENT_LABEL_REQUESTED_TIMEOUT="REPLACEMENT_LABEL_REQUESTED_TIMEOUT",e.REPLACEMENT_OFFER_PENDING="REPLACEMENT_OFFER_PENDING",e.REPLACEMENT_REQUEST_TIMEOUT="REPLACEMENT_REQUEST_TIMEOUT",e.REPLACEMENT_REQUESTED="REPLACEMENT_REQUESTED",e.REPLACEMENT_RMA_PENDING="REPLACEMENT_RMA_PENDING",e.REPLACEMENT_SHIPPED="REPLACEMENT_SHIPPED",e.REPLACEMENT_STARTED="REPLACEMENT_STARTED",e.RETURN_LABEL_PENDING="RETURN_LABEL_PENDING",e.RETURN_LABEL_PENDING_TIMEOUT="RETURN_LABEL_PENDING_TIMEOUT",e.RETURN_LABEL_REQUESTED="RETURN_LABEL_REQUESTED",e.RETURN_LABEL_REQUESTED_TIMEOUT="RETURN_LABEL_REQUESTED_TIMEOUT",e.RETURN_REJECTED="RETURN_REJECTED",e.RETURN_REQUEST_TIMEOUT="RETURN_REQUEST_TIMEOUT",e.RETURN_REQUESTED="RETURN_REQUESTED",e.RMA_PENDING="RMA_PENDING",e.UNKNOWN="UNKNOWN"}(xn||(xn={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(wn||(wn={})),function(e){e.DOMESTIC_SHIPPING="DOMESTIC_SHIPPING",e.IMPORT_CHARGE="IMPORT_CHARGE",e.INTERNATIONAL_SHIPPING="INTERNATIONAL_SHIPPING",e.ITEM_IMPORT_TAX="ITEM_IMPORT_TAX",e.ITEM_TAX="ITEM_TAX",e.ORDER_ADJUSTMENT="ORDER_ADJUSTMENT",e.ORIGINAL_SHIPPING="ORIGINAL_SHIPPING",e.OTHER="OTHER",e.PURCHASE_PRICE="PURCHASE_PRICE",e.REFUND_FROM_PAYPAL="REFUND_FROM_PAYPAL",e.RETURN_SHIPPING="RETURN_SHIPPING",e.SHIPPING_IMPORT_TAX="SHIPPING_IMPORT_TAX",e.SHIPPING_TAX="SHIPPING_TAX"}(kn||(kn={})),function(e){e.AUTO_APPROVE_REMORSE="AUTO_APPROVE_REMORSE",e.BUYER_ACCEPT_REPLACEMENT_OFFER="BUYER_ACCEPT_REPLACEMENT_OFFER",e.BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND="BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND",e.BUYER_ACCEPTS_PARTIAL_REFUND="BUYER_ACCEPTS_PARTIAL_REFUND",e.BUYER_CLOSE_RETURN="BUYER_CLOSE_RETURN",e.BUYER_CREATE_RETURN="BUYER_CREATE_RETURN",e.BUYER_DECLINE_PARTIAL_REFUND="BUYER_DECLINE_PARTIAL_REFUND",e.BUYER_DECLINE_REPLACEMENT_OFFER="BUYER_DECLINE_REPLACEMENT_OFFER",e.BUYER_ESCALATE="BUYER_ESCALATE",e.BUYER_MARK_AS_RECEIVED="BUYER_MARK_AS_RECEIVED",e.BUYER_MARK_REFUND_RECEIVED="BUYER_MARK_REFUND_RECEIVED",e.BUYER_MARK_RETURN_SHIPPED="BUYER_MARK_RETURN_SHIPPED",e.BUYER_PRINT_SHIPPING_LABEL="BUYER_PRINT_SHIPPING_LABEL",e.BUYER_PROVIDE_LABEL="BUYER_PROVIDE_LABEL",e.BUYER_PROVIDE_TRACKING_INFO="BUYER_PROVIDE_TRACKING_INFO",e.BUYER_SEND_MESSAGE="BUYER_SEND_MESSAGE",e.BUYER_UPDATE_TRACKING="BUYER_UPDATE_TRACKING",e.BUYER_VOID_LABEL="BUYER_VOID_LABEL",e.CHARGEBACK_OPEN="CHARGEBACK_OPEN",e.DELETE_FILE="DELETE_FILE",e.EMAIL_SHIPPING_LABEL="EMAIL_SHIPPING_LABEL",e.EXTERNAL_CLAIM_OPENED="EXTERNAL_CLAIM_OPENED",e.GENERAL_TIME_OUT="GENERAL_TIME_OUT",e.NOTIFIED_DELIVERED="NOTIFIED_DELIVERED",e.NOTIFIED_SHIPPED="NOTIFIED_SHIPPED",e.NOTIFY_REPLACEMENT_DELIVERED="NOTIFY_REPLACEMENT_DELIVERED",e.NOTIFY_REPLACEMENT_SHIPPED="NOTIFY_REPLACEMENT_SHIPPED",e.NOTIFY_UPDATE_REFUND_STATUS="NOTIFY_UPDATE_REFUND_STATUS",e.OTHER="OTHER",e.REMINDER_BUYER_TO_RESPOND_RE_OFFER="REMINDER_BUYER_TO_RESPOND_RE_OFFER",e.REMINDER_BUYER_TO_SHIP="REMINDER_BUYER_TO_SHIP",e.REMINDER_FOR_REFUND="REMINDER_FOR_REFUND",e.REMINDER_FOR_REFUND_NO_SHIPPING="REMINDER_FOR_REFUND_NO_SHIPPING",e.REMINDER_FOR_RMA="REMINDER_FOR_RMA",e.REMINDER_FOR_SHIPPING="REMINDER_FOR_SHIPPING",e.REMINDER_SELLER_TO_RESPOND="REMINDER_SELLER_TO_RESPOND",e.REMINDER_SELLER_TO_SHIP="REMINDER_SELLER_TO_SHIP",e.SELLER_APPROVE_REQUEST="SELLER_APPROVE_REQUEST",e.SELLER_DECLINE_REQUEST="SELLER_DECLINE_REQUEST",e.SELLER_ESCALATE="SELLER_ESCALATE",e.SELLER_ISSUE_REFUND="SELLER_ISSUE_REFUND",e.SELLER_ISSUE_STORE_CREDIT_REFUND="SELLER_ISSUE_STORE_CREDIT_REFUND",e.SELLER_MARK_AS_RECEIVED="SELLER_MARK_AS_RECEIVED",e.SELLER_MARK_REFUND_SENT="SELLER_MARK_REFUND_SENT",e.SELLER_MARK_REPLACEMENT_SHIPPED="SELLER_MARK_REPLACEMENT_SHIPPED",e.SELLER_OFFER_PARTIAL_REFUND="SELLER_OFFER_PARTIAL_REFUND",e.SELLER_OFFER_REPLACEMENT="SELLER_OFFER_REPLACEMENT",e.SELLER_OFFER_RETURNS="SELLER_OFFER_RETURNS",e.SELLER_PRINT_SHIPPING_LABEL="SELLER_PRINT_SHIPPING_LABEL",e.SELLER_PROVIDE_LABEL="SELLER_PROVIDE_LABEL",e.SELLER_PROVIDE_RMA="SELLER_PROVIDE_RMA",e.SELLER_PROVIDE_TRACKING_INFO="SELLER_PROVIDE_TRACKING_INFO",e.SELLER_RETRY_REFUND="SELLER_RETRY_REFUND",e.SELLER_SEND_MESSAGE="SELLER_SEND_MESSAGE",e.SELLER_UPDATE_TRACKING="SELLER_UPDATE_TRACKING",e.SELLER_VOID_LABEL="SELLER_VOID_LABEL",e.SUBMIT_FILE="SUBMIT_FILE",e.SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT="SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT",e.SYSTEM_BUYER_REFUND_AS_PAYOUT="SYSTEM_BUYER_REFUND_AS_PAYOUT",e.SYSTEM_CLOSE_RETURN="SYSTEM_CLOSE_RETURN",e.SYSTEM_CREATE_RETURN="SYSTEM_CREATE_RETURN",e.SYSTEM_IMMEDIATE_REFUND="SYSTEM_IMMEDIATE_REFUND",e.TIME_OUT_AFTER_DECLINE="TIME_OUT_AFTER_DECLINE",e.TIME_OUT_AFTER_REFUNDED="TIME_OUT_AFTER_REFUNDED",e.TIME_OUT_AFTER_REFUNDED_AS_PAYOUT="TIME_OUT_AFTER_REFUNDED_AS_PAYOUT",e.TIME_OUT_AFTER_REPLACED="TIME_OUT_AFTER_REPLACED",e.TIME_OUT_FOR_AUTHORIZE="TIME_OUT_FOR_AUTHORIZE",e.TIME_OUT_FOR_AUTO_REFUND="TIME_OUT_FOR_AUTO_REFUND",e.TIME_OUT_FOR_BUYER_RECOUP="TIME_OUT_FOR_BUYER_RECOUP",e.TIME_OUT_FOR_DELIVERY="TIME_OUT_FOR_DELIVERY",e.TIME_OUT_FOR_ESCALATION="TIME_OUT_FOR_ESCALATION",e.TIME_OUT_FOR_ESCALATION_AFTER_SMIR="TIME_OUT_FOR_ESCALATION_AFTER_SMIR",e.TIME_OUT_FOR_ITEM_REPLACED="TIME_OUT_FOR_ITEM_REPLACED",e.TIME_OUT_FOR_MARK_REFUND_RECEIVED="TIME_OUT_FOR_MARK_REFUND_RECEIVED",e.TIME_OUT_FOR_MARK_REFUND_SENT="TIME_OUT_FOR_MARK_REFUND_SENT",e.TIME_OUT_FOR_MASS_PAYOUT="TIME_OUT_FOR_MASS_PAYOUT",e.TIME_OUT_FOR_PAYOUT="TIME_OUT_FOR_PAYOUT",e.TIME_OUT_FOR_PROVIDE_LABEL="TIME_OUT_FOR_PROVIDE_LABEL",e.TIME_OUT_FOR_REFUND="TIME_OUT_FOR_REFUND",e.TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED="TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED",e.TIME_OUT_FOR_REPLACEMENT_SHIPPED="TIME_OUT_FOR_REPLACEMENT_SHIPPED",e.TIME_OUT_FOR_RETURN_SHIPPING="TIME_OUT_FOR_RETURN_SHIPPING",e.TIME_OUT_FOR_RMA="TIME_OUT_FOR_RMA",e.TIME_OUT_FOR_SELLER_INVOICE="TIME_OUT_FOR_SELLER_INVOICE",e.TIME_OUT_FOR_SELLER_PAYOUT="TIME_OUT_FOR_SELLER_PAYOUT",e.TIME_OUT_FOR_SHIPMENT_TRACKING="TIME_OUT_FOR_SHIPMENT_TRACKING",e.TIME_OUT_FOR_SHIPPING="TIME_OUT_FOR_SHIPPING",e.TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE="TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE"}(Gn||(Gn={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(Yn||(Yn={})),function(e){e.YEAR="YEAR",e.MONTH="MONTH",e.DAY="DAY",e.HOUR="HOUR",e.CALENDAR_DAY="CALENDAR_DAY",e.BUSINESS_DAY="BUSINESS_DAY",e.MINUTE="MINUTE",e.SECOND="SECOND",e.MILLISECOND="MILLISECOND"}($n||($n={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(Hn||(Hn={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(jn||(jn={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(Vn||(Vn={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(Kn||(Kn={})),function(e){e.CASH_IN_PERSON="CASH_IN_PERSON",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CASH_ON_PICKUP="CASH_ON_PICKUP",e.CASHIER_CHECK="CASHIER_CHECK",e.CREDIT_CARD="CREDIT_CARD",e.ESCROW="ESCROW",e.INTEGRATED_MERCHANT_CREDIT_CARD="INTEGRATED_MERCHANT_CREDIT_CARD",e.LOAN_CHECK="LOAN_CHECK",e.MONEY_ORDER="MONEY_ORDER",e.PAISA_PAY="PAISA_PAY",e.PAISA_PAY_ESCROW="PAISA_PAY_ESCROW",e.PAISA_PAY_ESCROW_EMI="PAISA_PAY_ESCROW_EMI",e.PAYPAL="PAYPAL",e.PERSONAL_CHECK="PERSONAL_CHECK",e.OTHER="OTHER"}(Wn||(Wn={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(qn||(qn={})),function(e){e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AN="AN",e.AO="AO",e.AQ="AQ",e.AR="AR",e.AS="AS",e.AT="AT",e.AU="AU",e.AW="AW",e.AX="AX",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BV="BV",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CC="CC",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CK="CK",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CX="CX",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.EH="EH",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FO="FO",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GG="GG",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GS="GS",e.GT="GT",e.GU="GU",e.GW="GW",e.GY="GY",e.HK="HK",e.HM="HM",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IM="IM",e.IN="IN",e.IO="IO",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JE="JE",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KI="KI",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MH="MH",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MP="MP",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NF="NF",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NR="NR",e.NU="NU",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PM="PM",e.PN="PN",e.PR="PR",e.PS="PS",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SJ="SJ",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TF="TF",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TK="TK",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TV="TV",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.UM="UM",e.US="US",e.UY="UY",e.UZ="UZ",e.VA="VA",e.VC="VC",e.VE="VE",e.VG="VG",e.VI="VI",e.VN="VN",e.VU="VU",e.WF="WF",e.WS="WS",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW"}(Xn||(Xn={})),function(e){e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYR="BYR",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LTL="LTL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRO="MRO",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.STD="STD",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL"}(Jn||(Jn={})),function(e){e.de_AT="de-AT",e.de_CH="de-CH",e.de_DE="de-DE",e.en_AU="en-AU",e.en_CA="en-CA",e.en_GB="en-GB",e.en_IE="en-IE",e.en_PH="en-PH",e.en_US="en-US",e.es_ES="es-ES",e.fr_BE="fr-BE",e.fr_CA="fr-CA",e.fr_FR="fr-FR",e.it_IT="it-IT",e.nl_BE="nl-BE",e.nl_NL="nl-NL",e.pl_PL="pl-PL",e.th_TH="th-TH",e.zh_HK="zh-HK",e.zh_TW="zh-TW"}(zn||(zn={})),function(e){e.NEW="NEW",e.LIKE_NEW="LIKE_NEW",e.NEW_OTHER="NEW_OTHER",e.NEW_WITH_DEFECTS="NEW_WITH_DEFECTS",e.MANUFACTURER_REFURBISHED="MANUFACTURER_REFURBISHED",e.SELLER_REFURBISHED="SELLER_REFURBISHED",e.USED_EXCELLENT="USED_EXCELLENT",e.USED_VERY_GOOD="USED_VERY_GOOD",e.USED_GOOD="USED_GOOD",e.USED_ACCEPTABLE="USED_ACCEPTABLE",e.FOR_PARTS_OR_NOT_WORKING="FOR_PARTS_OR_NOT_WORKING"}(Qn||(Qn={})),function(e){e.en_US="en_US",e.en_CA="en_CA",e.fr_CA="fr_CA",e.en_GB="en_GB",e.en_AU="en_AU",e.en_IN="en_IN",e.de_AT="de_AT",e.fr_BE="fr_BE",e.fr_FR="fr_FR",e.de_DE="de_DE",e.it_IT="it_IT",e.nl_BE="nl_BE",e.nl_NL="nl_NL",e.es_ES="es_ES",e.de_CH="de_CH",e.fi_FI="fi_FI",e.zh_HK="zh_HK",e.hu_HU="hu_HU",e.en_PH="en_PH",e.pl_PL="pl_PL",e.pt_PT="pt_PT",e.ru_RU="ru_RU",e.en_SG="en_SG",e.en_IE="en_IE",e.en_MY="en_MY"}(Zn||(Zn={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_MOTORS="EBAY_MOTORS",e.EBAY_CA="EBAY_CA",e.EBAY_GB="EBAY_GB",e.EBAY_AU="EBAY_AU",e.EBAY_AT="EBAY_AT",e.EBAY_BE="EBAY_BE",e.EBAY_FR="EBAY_FR",e.EBAY_DE="EBAY_DE",e.EBAY_IT="EBAY_IT",e.EBAY_NL="EBAY_NL",e.EBAY_ES="EBAY_ES",e.EBAY_CH="EBAY_CH",e.EBAY_TW="EBAY_TW",e.EBAY_CZ="EBAY_CZ",e.EBAY_DK="EBAY_DK",e.EBAY_FI="EBAY_FI",e.EBAY_GR="EBAY_GR",e.EBAY_HK="EBAY_HK",e.EBAY_HU="EBAY_HU",e.EBAY_IN="EBAY_IN",e.EBAY_ID="EBAY_ID",e.EBAY_IE="EBAY_IE",e.EBAY_IL="EBAY_IL",e.EBAY_MY="EBAY_MY",e.EBAY_NZ="EBAY_NZ",e.EBAY_NO="EBAY_NO",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_PT="EBAY_PT",e.EBAY_PR="EBAY_PR",e.EBAY_RU="EBAY_RU",e.EBAY_SG="EBAY_SG",e.EBAY_ZA="EBAY_ZA",e.EBAY_SE="EBAY_SE",e.EBAY_TH="EBAY_TH",e.EBAY_VN="EBAY_VN",e.EBAY_CN="EBAY_CN",e.EBAY_PE="EBAY_PE",e.EBAY_JP="EBAY_JP"}(eo||(eo={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(to||(to={})),function(e){e.CLICK_THROUGH_RATE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_SEARCH_RESULTS_PAGE="LISTING_IMPRESSION_SEARCH_RESULTS_PAGE",e.LISTING_IMPRESSION_STORE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_TOTAL="LISTING_IMPRESSION_TOTAL",e.LISTING_VIEWS_SOURCE_DIRECT="LISTING_VIEWS_SOURCE_DIRECT",e.LISTING_VIEWS_SOURCE_OFF_EBAY="LISTING_VIEWS_SOURCE_OFF_EBAY",e.LISTING_VIEWS_SOURCE_OTHER_EBAY="LISTING_VIEWS_SOURCE_OTHER_EBAY",e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e.LISTING_VIEWS_SOURCE_STORE="LISTING_VIEWS_SOURCE_STORE",e.LISTING_VIEWS_TOTAL="LISTING_VIEWS_TOTAL",e.SALES_CONVERSION_RATE="SALES_CONVERSION_RATE",e.TOTAL_IMPRESSION_TOTAL="TOTAL_IMPRESSION_TOTAL",e.TRANSACTION="TRANSACTION"}(ro||(ro={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(no||(no={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(oo||(oo={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(io||(io={})),function(e){e.COUNTRY="COUNTRY",e.COUNTRY_REGION="COUNTRY_REGION",e.STATE_OR_PROVINCE="STATE_OR_PROVINCE",e.WORLD_REGION="WORLD_REGION",e.WORLDWIDE="WORLDWIDE"}(so||(so={})),function(e){e.BUYER_CANCEL="BUYER_CANCEL",e.SELLER_CANCEL="SELLER_CANCEL",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.BUYER_RETURN="BUYER_RETURN",e.ITEM_NOT_AS_DESCRIBED="ITEM_NOT_AS_DESCRIBED",e.OTHER_ADJUSTMENT="OTHER_ADJUSTMENT",e.SHIPPING_DISCOUNT="SHIPPING_DISCOUNT"}(ao||(ao={})),function(e){e.ADDRESS_ISSUES="ADDRESS_ISSUES",e.BUYER_ASKED_CANCEL="BUYER_ASKED_CANCEL",e.BUYER_CANCEL_OR_ADDRESS_ISSUE="BUYER_CANCEL_OR_ADDRESS_ISSUE",e.FOUND_CHEAPER_PRICE="FOUND_CHEAPER_PRICE",e.ORDER_MISTAKE="ORDER_MISTAKE",e.ORDER_UNPAID="ORDER_UNPAID",e.OTHER="OTHER",e.OUT_OF_STOCK_OR_CANNOT_FULFILL="OUT_OF_STOCK_OR_CANNOT_FULFILL",e.PRICE_TOO_HIGH="PRICE_TOO_HIGH",e.UNKNOWN="UNKNOWN",e.WONT_ARRIVE_IN_TIME="WONT_ARRIVE_IN_TIME",e.WRONG_PAYMENT_METHOD="WRONG_PAYMENT_METHOD",e.WRONG_SHIPPING_ADDRESS="WRONG_SHIPPING_ADDRESS",e.WRONG_SHIPPING_METHOD="WRONG_SHIPPING_METHOD"}(co||(co={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(uo||(uo={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(lo||(lo={})),function(e){e.LETTER="LETTER",e.BULKY_GOODS="BULKY_GOODS",e.CARAVAN="CARAVAN",e.CARS="CARS",e.EUROPALLET="EUROPALLET",e.EXPANDABLE_TOUGH_BAGS="EXPANDABLE_TOUGH_BAGS",e.EXTRA_LARGE_PACK="EXTRA_LARGE_PACK",e.FURNITURE="FURNITURE",e.INDUSTRY_VEHICLES="INDUSTRY_VEHICLES",e.LARGE_CANADA_POSTBOX="LARGE_CANADA_POSTBOX",e.LARGE_CANADA_POST_BUBBLE_MAILER="LARGE_CANADA_POST_BUBBLE_MAILER",e.LARGE_ENVELOPE="LARGE_ENVELOPE",e.MAILING_BOX="MAILING_BOX",e.MEDIUM_CANADA_POST_BOX="MEDIUM_CANADA_POST_BOX",e.MEDIUM_CANADA_POST_BUBBLE_MAILER="MEDIUM_CANADA_POST_BUBBLE_MAILER",e.MOTORBIKES="MOTORBIKES",e.ONE_WAY_PALLET="ONE_WAY_PALLET",e.PACKAGE_THICK_ENVELOPE="PACKAGE_THICK_ENVELOPE",e.PADDED_BAGS="PADDED_BAGS",e.PARCEL_OR_PADDED_ENVELOPE="PARCEL_OR_PADDED_ENVELOPE",e.ROLL="ROLL",e.SMALL_CANADA_POST_BOX="SMALL_CANADA_POST_BOX",e.SMALL_CANADA_POST_BUBBLE_MAILER="SMALL_CANADA_POST_BUBBLE_MAILER",e.TOUGH_BAGS="TOUGH_BAGS",e.UPS_LETTER="UPS_LETTER",e.USPS_FLAT_RATE_ENVELOPE="USPS_FLAT_RATE_ENVELOPE",e.USPS_LARGE_PACK="USPS_LARGE_PACK",e.VERY_LARGE_PACK="VERY_LARGE_PACK",e.WINE_PAK="WINE_PAK"}(po||(po={}));var fo=Object.freeze({__proto__:null,get SiteId(){return yn},get MarketplaceId(){return In},get UserRoleFilter(){return Tn},get InquirySearchFieldGroup(){return Sn},get CaseStatusFilter(){return Cn},get CaseSearchFieldGroup(){return Nn},get InquiryStatusFilter(){return On},get ShippingCarrier(){return Pn},get ReturnReason(){return bn},get RequestType(){return Un},get ReturnType(){return Dn},get GetReturnFieldGroupEnum(){return Ln},get EscalateReason(){return Bn},get Decision(){return Mn},get CategoryType(){return vn},get ReturnCountFilter(){return Fn},get ReturnState(){return xn},get FilePurpose(){return wn},get RefundFeeType(){return kn},get ActivityOption(){return Gn},get StoreType(){return Yn},get TimeDurationUnit(){return $n},get ShippingOptionType(){return Hn},get ShippingCostType(){return jn},get PaymentsProgramType(){return Vn},get PaymentsProgramStatus(){return Kn},get PaymentMethodType(){return Wn},get RecipientAccountReferenceType(){return qn},get CountryCode(){return Xn},get CurrencyCode(){return Jn},get Locale(){return zn},get ContentLanguage(){return zn},get Condition(){return Qn},get LocaleEnum(){return Zn},get Marketplace(){return eo},get FormatType(){return to},get Metric(){return ro},get RefundMethod(){return no},get ReturnMethod(){return oo},get ReturnShippingCostPayer(){return io},get RegionType(){return so},get ReasonForRefund(){return ao},get CancelReason(){return co},get LengthUnitOfMeasure(){return uo},get WeightUnitOfMeasure(){return lo},get PackageType(){return po}}),go=Object.freeze({__proto__:null});const _o={sandbox:!1,autoRefreshToken:!0,siteId:yn.EBAY_US,marketplaceId:In.EBAY_US,acceptLanguage:zn.en_US,contentLanguage:zn.en_US};class eBayApi extends Api{static fromEnv(e){if(!process.env.EBAY_APP_ID)throw new ApiEnvError("EBAY_APP_ID");if(!process.env.EBAY_CERT_ID)throw new ApiEnvError("EBAY_CERT_ID");let t=null;return process.env.EBAY_JWE&&process.env.EBAY_PRIVATE_KEY&&(t={jwe:process.env.EBAY_JWE,privateKey:process.env.EBAY_PRIVATE_KEY}),new eBayApi({appId:process.env.EBAY_APP_ID,certId:process.env.EBAY_CERT_ID,devId:process.env.EBAY_DEV_ID,authToken:process.env.EBAY_AUTH_TOKEN,siteId:process.env.EBAY_SITE_ID?parseInt(process.env.EBAY_SITE_ID,10):yn.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in In?In[process.env.EBAY_MARKETPLACE_ID]:In.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({..._o,...e},t),this.factory=new ApiFactory(this.config,this.req,this.auth),this.authNAuth=this.auth.authNAuth,this.OAuth2=this.auth.OAuth2,this.oAuth2=this.OAuth2}get buy(){return this._buy||(this._buy=this.factory.createBuyApi())}get commerce(){return this._commerce||(this._commerce=this.factory.createCommerceApi())}get developer(){return this._developer||(this._developer=this.factory.createDeveloperApi())}get postOrder(){return this._postOrder||(this._postOrder=this.factory.createPostOrderApi())}get sell(){return this._sell||(this._sell=this.factory.createSellApi())}get trading(){return this._trading||(this._trading=this.factory.createTradingApi())}get finding(){return this._finding||(this._finding=this.factory.createFindingApi())}get shopping(){return this._shopping||(this._shopping=this.factory.createShoppingApi())}get merchandising(){return this._merchandising||(this._merchandising=this.factory.createMerchandisingApi())}get clientAlerts(){return this._clientAlerts||(this._clientAlerts=this.factory.createClientAlertsApi())}setSignature(e){this.config.signature=e}}eBayApi.SiteId=yn,eBayApi.MarketplaceId=In,eBayApi.ContentLanguage=zn,eBayApi.Locale=zn;export{zn as ContentLanguage,zn as Locale,In as MarketplaceId,yn as SiteId,eBayApi as default,eBayApi,fo as enums,Jr as errors,go as types};
1
+ function bind$1(e,t){return function wrap(){return e.apply(t,arguments)}}const{toString:e}=Object.prototype,{getPrototypeOf:t}=Object,{iterator:r,toStringTag:n}=Symbol,o=(i=Object.create(null),t=>{const r=e.call(t);return i[r]||(i[r]=r.slice(8,-1).toLowerCase())});var i;const kindOfTest=e=>(e=e.toLowerCase(),t=>o(t)===e),typeOfTest=e=>t=>typeof t===e,{isArray:s}=Array,c=typeOfTest("undefined");function isBuffer$1(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const u=kindOfTest("ArrayBuffer");const l=typeOfTest("string"),p=typeOfTest("function"),d=typeOfTest("number"),isObject=e=>null!==e&&"object"==typeof e,isPlainObject=e=>{if("object"!==o(e))return!1;const i=t(e);return!(null!==i&&i!==Object.prototype&&null!==Object.getPrototypeOf(i)||n in e||r in e)},E=kindOfTest("Date"),f=kindOfTest("File"),g=kindOfTest("Blob"),h=kindOfTest("FileList"),_=kindOfTest("URLSearchParams"),[m,R,A,y]=["ReadableStream","Request","Response","Headers"].map(kindOfTest);function forEach(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),s(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(isBuffer$1(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function findKey(e,t){if(isBuffer$1(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const I="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,isContextDefined=e=>!c(e)&&e!==I;const T=(e=>t=>e&&t instanceof e)("undefined"!=typeof Uint8Array&&t(Uint8Array)),S=kindOfTest("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),N=kindOfTest("RegExp"),reduceDescriptors=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};forEach(r,((r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)})),Object.defineProperties(e,n)};const O=kindOfTest("AsyncFunction"),b=(P="function"==typeof setImmediate,U=p(I.postMessage),P?setImmediate:U?(L=`axios@${Math.random()}`,D=[],I.addEventListener("message",(({source:e,data:t})=>{e===I&&t===L&&D.length&&D.shift()()}),!1),e=>{D.push(e),I.postMessage(L,"*")}):e=>setTimeout(e));var P,U,L,D;const B="undefined"!=typeof queueMicrotask?queueMicrotask.bind(I):"undefined"!=typeof process&&process.nextTick||b;var M={isArray:s,isArrayBuffer:u,isBuffer:isBuffer$1,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||p(e.append)&&("formdata"===(t=o(e))||"object"===t&&p(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function isArrayBufferView(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer),t},isString:l,isNumber:d,isBoolean:e=>!0===e||!1===e,isObject:isObject,isPlainObject:isPlainObject,isEmptyObject:e=>{if(!isObject(e)||isBuffer$1(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:m,isRequest:R,isResponse:A,isHeaders:y,isUndefined:c,isDate:E,isFile:f,isBlob:g,isRegExp:N,isFunction:p,isStream:e=>isObject(e)&&p(e.pipe),isURLSearchParams:_,isTypedArray:T,isFileList:h,forEach:forEach,merge:function merge$1(){const{caseless:e,skipUndefined:t}=isContextDefined(this)&&this||{},r={},assignValue=(n,o)=>{const i=e&&findKey(r,o)||o;isPlainObject(r[i])&&isPlainObject(n)?r[i]=merge$1(r[i],n):isPlainObject(n)?r[i]=merge$1({},n):s(n)?r[i]=n.slice():t&&c(n)||(r[i]=n)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&forEach(arguments[e],assignValue);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(forEach(t,((t,n)=>{r&&p(t)?e[n]=bind$1(t,r):e[n]=t}),{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,r,n,o)=>{let i,s,c;const u={};if(r=r||{},null==e)return r;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)c=i[s],o&&!o(c,e,r)||u[c]||(r[c]=e[c],u[c]=!0);e=!1!==n&&t(e)}while(e&&(!n||n(e,r))&&e!==Object.prototype);return r},kindOf:o,kindOfTest:kindOfTest,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(s(e))return e;let t=e.length;if(!d(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const n=(e&&e[r]).call(e);let o;for(;(o=n.next())&&!o.done;){const r=o.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:S,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:reduceDescriptors,freezeMethods:e=>{reduceDescriptors(e,((t,r)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];p(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(e,t)=>{const r={},define=e=>{e.forEach((e=>{r[e]=!0}))};return s(e)?define(e):define(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function replacer(e,t,r){return t.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:findKey,global:I,isContextDefined:isContextDefined,isSpecCompliantForm:function isSpecCompliantForm(e){return!!(e&&p(e.append)&&"FormData"===e[n]&&e[r])},toJSONObject:e=>{const t=new Array(10),visit=(e,r)=>{if(isObject(e)){if(t.indexOf(e)>=0)return;if(isBuffer$1(e))return e;if(!("toJSON"in e)){t[r]=e;const n=s(e)?[]:{};return forEach(e,((e,t)=>{const o=visit(e,r+1);!c(o)&&(n[t]=o)})),t[r]=void 0,n}}return e};return visit(e,0)},isAsyncFn:O,isThenable:e=>e&&(isObject(e)||p(e))&&p(e.then)&&p(e.catch),setImmediate:b,asap:B,isIterable:e=>null!=e&&p(e[r])};function AxiosError(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}M.inherits(AxiosError,Error,{toJSON:function 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:M.toJSONObject(this.config),code:this.code,status:this.status}}});const v=AxiosError.prototype,F={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{F[e]={value:e}})),Object.defineProperties(AxiosError,F),Object.defineProperty(v,"isAxiosError",{value:!0}),AxiosError.from=(e,t,r,n,o,i)=>{const s=Object.create(v);M.toFlatObject(e,s,(function filter(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e));const c=e&&e.message?e.message:"Error",u=null==t&&e?e.code:t;return AxiosError.call(s,c,u,r,n,o),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};function isVisitable(e){return M.isPlainObject(e)||M.isArray(e)}function removeBrackets(e){return M.endsWith(e,"[]")?e.slice(0,-2):e}function renderKey(e,t,r){return e?e.concat(t).map((function each(e,t){return e=removeBrackets(e),!r&&t?"["+e+"]":e})).join(r?".":""):t}const x=M.toFlatObject(M,{},null,(function filter(e){return/^is[A-Z]/.test(e)}));function toFormData(e,t,r){if(!M.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=M.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function defined(e,t){return!M.isUndefined(t[e])}))).metaTokens,o=r.visitor||defaultVisitor,i=r.dots,s=r.indexes,c=(r.Blob||"undefined"!=typeof Blob&&Blob)&&M.isSpecCompliantForm(t);if(!M.isFunction(o))throw new TypeError("visitor must be a function");function convertValue(e){if(null===e)return"";if(M.isDate(e))return e.toISOString();if(M.isBoolean(e))return e.toString();if(!c&&M.isBlob(e))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return M.isArrayBuffer(e)||M.isTypedArray(e)?c&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function defaultVisitor(e,r,o){let c=e;if(e&&!o&&"object"==typeof e)if(M.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(M.isArray(e)&&function isFlatArray(e){return M.isArray(e)&&!e.some(isVisitable)}(e)||(M.isFileList(e)||M.endsWith(r,"[]"))&&(c=M.toArray(e)))return r=removeBrackets(r),c.forEach((function each(e,n){!M.isUndefined(e)&&null!==e&&t.append(!0===s?renderKey([r],n,i):null===s?r:r+"[]",convertValue(e))})),!1;return!!isVisitable(e)||(t.append(renderKey(o,r,i),convertValue(e)),!1)}const u=[],l=Object.assign(x,{defaultVisitor:defaultVisitor,convertValue:convertValue,isVisitable:isVisitable});if(!M.isObject(e))throw new TypeError("data must be an object");return function build(e,r){if(!M.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+r.join("."));u.push(e),M.forEach(e,(function each(e,n){!0===(!(M.isUndefined(e)||null===e)&&o.call(t,e,M.isString(n)?n.trim():n,r,l))&&build(e,r?r.concat(n):[n])})),u.pop()}}(e),t}function encode$2(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function replacer(e){return t[e]}))}function AxiosURLSearchParams(e,t){this._pairs=[],e&&toFormData(e,this,t)}const w=AxiosURLSearchParams.prototype;function encode$1(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(e,t,r){if(!t)return e;const n=r&&r.encode||encode$1;M.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):M.isURLSearchParams(t)?t.toString():new AxiosURLSearchParams(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}w.append=function append(e,t){this._pairs.push([e,t])},w.toString=function toString(e){const t=e?function(t){return e.call(this,t,encode$2)}:encode$2;return this._pairs.map((function each(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var k=class InterceptorManager{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){M.forEach(this.handlers,(function forEachHandler(t){null!==t&&e(t)}))}},G={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:AxiosURLSearchParams,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const $="undefined"!=typeof window&&"undefined"!=typeof document,H="object"==typeof navigator&&navigator||void 0,j=$&&(!H||["ReactNative","NativeScript","NS"].indexOf(H.product)<0),V="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,K=$&&window.location.href||"http://localhost";var q={...Object.freeze({__proto__:null,hasBrowserEnv:$,hasStandardBrowserEnv:j,hasStandardBrowserWebWorkerEnv:V,navigator:H,origin:K}),...Y};function formDataToJSON(e){function buildPath(e,t,r,n){let o=e[n++];if("__proto__"===o)return!0;const i=Number.isFinite(+o),s=n>=e.length;if(o=!o&&M.isArray(r)?r.length:o,s)return M.hasOwnProp(r,o)?r[o]=[r[o],t]:r[o]=t,!i;r[o]&&M.isObject(r[o])||(r[o]=[]);return buildPath(e,t,r[o],n)&&M.isArray(r[o])&&(r[o]=function arrayToObject$1(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(r[o])),!i}if(M.isFormData(e)&&M.isFunction(e.entries)){const t={};return M.forEachEntry(e,((e,r)=>{buildPath(function parsePropPath(e){return M.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,t,0)})),t}return null}const W={transitional:G,adapter:["xhr","http","fetch"],transformRequest:[function transformRequest(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=M.isObject(e);o&&M.isHTMLForm(e)&&(e=new FormData(e));if(M.isFormData(e))return n?JSON.stringify(formDataToJSON(e)):e;if(M.isArrayBuffer(e)||M.isBuffer(e)||M.isStream(e)||M.isFile(e)||M.isBlob(e)||M.isReadableStream(e))return e;if(M.isArrayBufferView(e))return e.buffer;if(M.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function toURLEncodedForm(e,t){return toFormData(e,new q.classes.URLSearchParams,{visitor:function(e,t,r,n){return q.isNode&&M.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=M.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return toFormData(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function stringifySafely(e,t,r){if(M.isString(e))try{return(t||JSON.parse)(e),M.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function transformResponse(e){const t=this.transitional||W.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(M.isResponse(e)||M.isReadableStream(e))return e;if(e&&M.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw AxiosError.from(e,AxiosError.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:q.classes.FormData,Blob:q.classes.Blob},validateStatus:function validateStatus(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};M.forEach(["delete","get","head","post","put","patch"],(e=>{W.headers[e]={}}));var X=W;const z=M.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"]);const J=Symbol("internals");function normalizeHeader(e){return e&&String(e).trim().toLowerCase()}function normalizeValue(e){return!1===e||null==e?e:M.isArray(e)?e.map(normalizeValue):String(e)}function matchHeaderValue(e,t,r,n,o){return M.isFunction(n)?n.call(this,t,r):(o&&(t=r),M.isString(t)?M.isString(n)?-1!==t.indexOf(n):M.isRegExp(n)?n.test(t):void 0:void 0)}class AxiosHeaders{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function setHeader(e,t,r){const o=normalizeHeader(t);if(!o)throw new Error("header name must be a non-empty string");const i=M.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=normalizeValue(e))}const setHeaders=(e,t)=>M.forEach(e,((e,r)=>setHeader(e,r,t)));if(M.isPlainObject(e)||e instanceof this.constructor)setHeaders(e,t);else if(M.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))setHeaders((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach((function parser(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&z[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)})),t})(e),t);else if(M.isObject(e)&&M.isIterable(e)){let r,n,o={};for(const t of e){if(!M.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?M.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}setHeaders(o,t)}else null!=e&&setHeader(t,e,r);return this}get(e,t){if(e=normalizeHeader(e)){const r=M.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function parseTokens(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(M.isFunction(t))return t.call(this,e,r);if(M.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=normalizeHeader(e)){const r=M.findKey(this,e);return!(!r||void 0===this[r]||t&&!matchHeaderValue(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function deleteHeader(e){if(e=normalizeHeader(e)){const o=M.findKey(r,e);!o||t&&!matchHeaderValue(0,r[o],o,t)||(delete r[o],n=!0)}}return M.isArray(e)?e.forEach(deleteHeader):deleteHeader(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!matchHeaderValue(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return M.forEach(this,((n,o)=>{const i=M.findKey(r,o);if(i)return t[i]=normalizeValue(n),void delete t[o];const s=e?function formatHeader(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,r)=>t.toUpperCase()+r))}(o):String(o).trim();s!==o&&delete t[o],t[s]=normalizeValue(n),r[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return M.forEach(this,((r,n)=>{null!=r&&!1!==r&&(t[n]=e&&M.isArray(r)?r.join(", "):r)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach((e=>r.set(e))),r}static accessor(e){const t=(this[J]=this[J]={accessors:{}}).accessors,r=this.prototype;function defineAccessor(e){const n=normalizeHeader(e);t[n]||(!function buildAccessors(e,t){const r=M.toCamelCase(" "+t);["get","set","has"].forEach((n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})}))}(r,e),t[n]=!0)}return M.isArray(e)?e.forEach(defineAccessor):defineAccessor(e),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),M.reduceDescriptors(AxiosHeaders.prototype,(({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}})),M.freezeMethods(AxiosHeaders);var Q=AxiosHeaders;function transformData(e,t){const r=this||X,n=t||r,o=Q.from(n.headers);let i=n.data;return M.forEach(e,(function transform(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)})),o.normalize(),i}function isCancel(e){return!(!e||!e.__CANCEL__)}function CanceledError(e,t,r){AxiosError.call(this,null==e?"canceled":e,AxiosError.ERR_CANCELED,t,r),this.name="CanceledError"}function settle(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new AxiosError("Request failed with status code "+r.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}M.inherits(CanceledError,AxiosError,{__CANCEL__:!0});const progressEventReducer=(e,t,r=3)=>{let n=0;const o=function speedometer(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,s=0;return t=void 0!==t?t:1e3,function push(c){const u=Date.now(),l=n[s];o||(o=u),r[i]=c,n[i]=u;let p=s,d=0;for(;p!==i;)d+=r[p++],p%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),u-o<t)return;const E=l&&u-l;return E?Math.round(1e3*d/E):void 0}}(50,250);return function throttle(e,t){let r,n,o=0,i=1e3/t;const invoke=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?invoke(e,t):(r=e,n||(n=setTimeout((()=>{n=null,invoke(r)}),i-s)))},()=>r&&invoke(r)]}((r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,c=i-n,u=o(c);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:c,rate:u||void 0,estimated:u&&s&&i<=s?(s-i)/u:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})}),r)},progressEventDecorator=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},asyncDecorator=e=>(...t)=>M.asap((()=>e(...t)));var Z=q.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,q.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(q.origin),q.navigator&&/(msie|trident)/i.test(q.navigator.userAgent)):()=>!0,ee=q.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];M.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),M.isString(n)&&s.push("path="+n),M.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function buildFullPath(e,t,r){let n=!function isAbsoluteURL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function combineURLs(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const headersToObject=e=>e instanceof Q?{...e}:e;function mergeConfig(e,t){t=t||{};const r={};function getMergedValue(e,t,r,n){return M.isPlainObject(e)&&M.isPlainObject(t)?M.merge.call({caseless:n},e,t):M.isPlainObject(t)?M.merge({},t):M.isArray(t)?t.slice():t}function mergeDeepProperties(e,t,r,n){return M.isUndefined(t)?M.isUndefined(e)?void 0:getMergedValue(void 0,e,0,n):getMergedValue(e,t,0,n)}function valueFromConfig2(e,t){if(!M.isUndefined(t))return getMergedValue(void 0,t)}function defaultToConfig2(e,t){return M.isUndefined(t)?M.isUndefined(e)?void 0:getMergedValue(void 0,e):getMergedValue(void 0,t)}function mergeDirectKeys(r,n,o){return o in t?getMergedValue(r,n):o in e?getMergedValue(void 0,r):void 0}const n={url:valueFromConfig2,method:valueFromConfig2,data:valueFromConfig2,baseURL:defaultToConfig2,transformRequest:defaultToConfig2,transformResponse:defaultToConfig2,paramsSerializer:defaultToConfig2,timeout:defaultToConfig2,timeoutMessage:defaultToConfig2,withCredentials:defaultToConfig2,withXSRFToken:defaultToConfig2,adapter:defaultToConfig2,responseType:defaultToConfig2,xsrfCookieName:defaultToConfig2,xsrfHeaderName:defaultToConfig2,onUploadProgress:defaultToConfig2,onDownloadProgress:defaultToConfig2,decompress:defaultToConfig2,maxContentLength:defaultToConfig2,maxBodyLength:defaultToConfig2,beforeRedirect:defaultToConfig2,transport:defaultToConfig2,httpAgent:defaultToConfig2,httpsAgent:defaultToConfig2,cancelToken:defaultToConfig2,socketPath:defaultToConfig2,responseEncoding:defaultToConfig2,validateStatus:mergeDirectKeys,headers:(e,t,r)=>mergeDeepProperties(headersToObject(e),headersToObject(t),0,!0)};return M.forEach(Object.keys({...e,...t}),(function computeConfigValue(o){const i=n[o]||mergeDeepProperties,s=i(e[o],t[o],o);M.isUndefined(s)&&i!==mergeDirectKeys||(r[o]=s)})),r}var resolveConfig=e=>{const t=mergeConfig({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:s,auth:c}=t;if(t.headers=s=Q.from(s),t.url=buildURL(buildFullPath(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),M.isFormData(r))if(q.hasStandardBrowserEnv||q.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(M.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach((([e,r])=>{t.includes(e.toLowerCase())&&s.set(e,r)}))}if(q.hasStandardBrowserEnv&&(n&&M.isFunction(n)&&(n=n(t)),n||!1!==n&&Z(t.url))){const e=o&&i&&ee.read(i);e&&s.set(o,e)}return t};var te="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function dispatchXhrRequest(t,r){const n=resolveConfig(e);let o=n.data;const i=Q.from(n.headers).normalize();let s,c,u,l,p,{responseType:d,onUploadProgress:E,onDownloadProgress:f}=n;function done(){l&&l(),p&&p(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let g=new XMLHttpRequest;function onloadend(){if(!g)return;const n=Q.from("getAllResponseHeaders"in g&&g.getAllResponseHeaders());settle((function _resolve(e){t(e),done()}),(function _reject(e){r(e),done()}),{data:d&&"text"!==d&&"json"!==d?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:n,config:e,request:g}),g=null}g.open(n.method.toUpperCase(),n.url,!0),g.timeout=n.timeout,"onloadend"in g?g.onloadend=onloadend:g.onreadystatechange=function handleLoad(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(onloadend)},g.onabort=function handleAbort(){g&&(r(new AxiosError("Request aborted",AxiosError.ECONNABORTED,e,g)),g=null)},g.onerror=function handleError(t){const n=new AxiosError(t&&t.message?t.message:"Network Error",AxiosError.ERR_NETWORK,e,g);n.event=t||null,r(n),g=null},g.ontimeout=function handleTimeout(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||G;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new AxiosError(t,o.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,e,g)),g=null},void 0===o&&i.setContentType(null),"setRequestHeader"in g&&M.forEach(i.toJSON(),(function setRequestHeader(e,t){g.setRequestHeader(t,e)})),M.isUndefined(n.withCredentials)||(g.withCredentials=!!n.withCredentials),d&&"json"!==d&&(g.responseType=n.responseType),f&&([u,p]=progressEventReducer(f,!0),g.addEventListener("progress",u)),E&&g.upload&&([c,l]=progressEventReducer(E),g.upload.addEventListener("progress",c),g.upload.addEventListener("loadend",l)),(n.cancelToken||n.signal)&&(s=t=>{g&&(r(!t||t.type?new CanceledError(null,e,g):t),g.abort(),g=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const h=function parseProtocol(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);h&&-1===q.protocols.indexOf(h)?r(new AxiosError("Unsupported protocol "+h+":",AxiosError.ERR_BAD_REQUEST,e)):g.send(o||null)}))};var composeSignals$1=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const onabort=function(e){if(!r){r=!0,unsubscribe();const t=e instanceof Error?e:this.reason;n.abort(t instanceof AxiosError?t:new CanceledError(t instanceof Error?t.message:t))}};let o=t&&setTimeout((()=>{o=null,onabort(new AxiosError(`timeout ${t} of ms exceeded`,AxiosError.ETIMEDOUT))}),t);const unsubscribe=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach((e=>{e.unsubscribe?e.unsubscribe(onabort):e.removeEventListener("abort",onabort)})),e=null)};e.forEach((e=>e.addEventListener("abort",onabort)));const{signal:i}=n;return i.unsubscribe=()=>M.asap(unsubscribe),i}};const streamChunk=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},readStream=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},trackStream=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of readStream(e))yield*streamChunk(r,t)}(e,t);let i,s=0,_onFinish=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return _onFinish(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw _onFinish(e),e}},cancel:e=>(_onFinish(e),o.return())},{highWaterMark:2})},{isFunction:re}=M,ne=(({Request:e,Response:t})=>({Request:e,Response:t}))(M.global),{ReadableStream:oe,TextEncoder:ie}=M.global,test=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},factory=e=>{e=M.merge.call({skipUndefined:!0},ne,e);const{fetch:t,Request:r,Response:n}=e,o=t?re(t):"function"==typeof fetch,i=re(r),s=re(n);if(!o)return!1;const c=o&&re(oe),u=o&&("function"==typeof ie?(l=new ie,e=>l.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var l;const p=i&&c&&test((()=>{let e=!1;const t=new r(q.origin,{body:new oe,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})),d=s&&c&&test((()=>M.isReadableStream(new n("").body))),E={stream:d&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach((e=>{!E[e]&&(E[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new AxiosError(`Response type '${e}' is not supported`,AxiosError.ERR_NOT_SUPPORT,r)})}));const resolveBodyLength=async(e,t)=>{const n=M.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(M.isBlob(e))return e.size;if(M.isSpecCompliantForm(e)){const t=new r(q.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return M.isArrayBufferView(e)||M.isArrayBuffer(e)?e.byteLength:(M.isURLSearchParams(e)&&(e+=""),M.isString(e)?(await u(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:s,data:c,signal:u,cancelToken:l,timeout:f,onDownloadProgress:g,onUploadProgress:h,responseType:_,headers:m,withCredentials:R="same-origin",fetchOptions:A}=resolveConfig(e),y=t||fetch;_=_?(_+"").toLowerCase():"text";let I=composeSignals$1([u,l&&l.toAbortSignal()],f),T=null;const S=I&&I.unsubscribe&&(()=>{I.unsubscribe()});let C;try{if(h&&p&&"get"!==s&&"head"!==s&&0!==(C=await resolveBodyLength(m,c))){let e,t=new r(o,{method:"POST",body:c,duplex:"half"});if(M.isFormData(c)&&(e=t.headers.get("content-type"))&&m.setContentType(e),t.body){const[e,r]=progressEventDecorator(C,progressEventReducer(asyncDecorator(h)));c=trackStream(t.body,65536,e,r)}}M.isString(R)||(R=R?"include":"omit");const t=i&&"credentials"in r.prototype,u={...A,signal:I,method:s.toUpperCase(),headers:m.normalize().toJSON(),body:c,duplex:"half",credentials:t?R:void 0};T=i&&new r(o,u);let l=await(i?y(T,A):y(o,u));const f=d&&("stream"===_||"response"===_);if(d&&(g||f&&S)){const e={};["status","statusText","headers"].forEach((t=>{e[t]=l[t]}));const t=M.toFiniteNumber(l.headers.get("content-length")),[r,o]=g&&progressEventDecorator(t,progressEventReducer(asyncDecorator(g),!0))||[];l=new n(trackStream(l.body,65536,r,(()=>{o&&o(),S&&S()})),e)}_=_||"text";let N=await E[M.findKey(E,_)||"text"](l,e);return!f&&S&&S(),await new Promise(((t,r)=>{settle(t,r,{data:N,headers:Q.from(l.headers),status:l.status,statusText:l.statusText,config:e,request:T})}))}catch(t){if(S&&S(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,e,T),{cause:t.cause||t});throw AxiosError.from(t,t&&t.code,e,T)}}},se=new Map,getFetch=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let s,c,u=i.length,l=se;for(;u--;)s=i[u],c=l.get(s),void 0===c&&l.set(s,c=u?new Map:factory(t)),l=c;return c};getFetch();const ae={http:null,xhr:te,fetch:{get:getFetch}};M.forEach(ae,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));const renderReason=e=>`- ${e}`,isResolvedHandle=e=>M.isFunction(e)||null===e||!1===e;var adapters_getAdapter=(e,t)=>{e=M.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let s=0;s<r;s++){let r;if(n=e[s],o=n,!isResolvedHandle(n)&&(o=ae[(r=String(n)).toLowerCase()],void 0===o))throw new AxiosError(`Unknown adapter '${r}'`);if(o&&(M.isFunction(o)||(o=o.get(t))))break;i[r||"#"+s]=o}if(!o){const e=Object.entries(i).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));throw new AxiosError("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(renderReason).join("\n"):" "+renderReason(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function throwIfCancellationRequested(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new CanceledError(null,e)}function dispatchRequest(e){throwIfCancellationRequested(e),e.headers=Q.from(e.headers),e.data=transformData.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return adapters_getAdapter(e.adapter||X.adapter,e)(e).then((function onAdapterResolution(t){return throwIfCancellationRequested(e),t.data=transformData.call(e,e.transformResponse,t),t.headers=Q.from(t.headers),t}),(function onAdapterRejection(t){return isCancel(t)||(throwIfCancellationRequested(e),t&&t.response&&(t.response.data=transformData.call(e,e.transformResponse,t.response),t.response.headers=Q.from(t.response.headers))),Promise.reject(t)}))}const ce="1.12.2",ue={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{ue[e]=function validator(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}}));const le={};ue.transitional=function transitional(e,t,r){function formatMessage(e,t){return"[Axios v"+ce+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,n,o)=>{if(!1===e)throw new AxiosError(formatMessage(n," has been removed"+(t?" in "+t:"")),AxiosError.ERR_DEPRECATED);return t&&!le[n]&&(le[n]=!0,console.warn(formatMessage(n," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,n,o)}},ue.spelling=function spelling(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var pe={assertOptions:function assertOptions(e,t,r){if("object"!=typeof e)throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new AxiosError("option "+i+" must be "+r,AxiosError.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new AxiosError("Unknown option "+i,AxiosError.ERR_BAD_OPTION)}},validators:ue};const de=pe.validators;class Axios{constructor(e){this.defaults=e||{},this.interceptors={request:new k,response:new k}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=mergeConfig(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&pe.assertOptions(r,{silentJSONParsing:de.transitional(de.boolean),forcedJSONParsing:de.transitional(de.boolean),clarifyTimeoutError:de.transitional(de.boolean)},!1),null!=n&&(M.isFunction(n)?t.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:de.function,serialize:de.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),pe.assertOptions(t,{baseUrl:de.spelling("baseURL"),withXsrfToken:de.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&M.merge(o.common,o[t.method]);o&&M.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=Q.concat(i,o);const s=[];let c=!0;this.interceptors.request.forEach((function unshiftRequestInterceptors(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(c=c&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const u=[];let l;this.interceptors.response.forEach((function pushResponseInterceptors(e){u.push(e.fulfilled,e.rejected)}));let p,d=0;if(!c){const e=[dispatchRequest.bind(this),void 0];for(e.unshift(...s),e.push(...u),p=e.length,l=Promise.resolve(t);d<p;)l=l.then(e[d++],e[d++]);return l}p=s.length;let E=t;for(;d<p;){const e=s[d++],t=s[d++];try{E=e(E)}catch(e){t.call(this,e);break}}try{l=dispatchRequest.call(this,E)}catch(e){return Promise.reject(e)}for(d=0,p=u.length;d<p;)l=l.then(u[d++],u[d++]);return l}getUri(e){return buildURL(buildFullPath((e=mergeConfig(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}M.forEach(["delete","get","head","options"],(function forEachMethodNoData(e){Axios.prototype[e]=function(t,r){return this.request(mergeConfig(r||{},{method:e,url:t,data:(r||{}).data}))}})),M.forEach(["post","put","patch"],(function forEachMethodWithData(e){function generateHTTPMethod(t){return function httpMethod(r,n,o){return this.request(mergeConfig(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Axios.prototype[e]=generateHTTPMethod(),Axios.prototype[e+"Form"]=generateHTTPMethod(!0)}));var Ee=Axios;class CancelToken{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function promiseExecutor(e){t=e}));const r=this;this.promise.then((e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null})),this.promise.then=e=>{let t;const n=new Promise((e=>{r.subscribe(e),t=e})).then(e);return n.cancel=function reject(){r.unsubscribe(t)},n},e((function cancel(e,n,o){r.reason||(r.reason=new CanceledError(e,n,o),t(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,abort=t=>{e.abort(t)};return this.subscribe(abort),e.signal.unsubscribe=()=>this.unsubscribe(abort),e.signal}static source(){let e;return{token:new CancelToken((function executor(t){e=t})),cancel:e}}}var fe=CancelToken;const ge={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};Object.entries(ge).forEach((([e,t])=>{ge[t]=e}));var he=ge;const _e=function createInstance(e){const t=new Ee(e),r=bind$1(Ee.prototype.request,t);return M.extend(r,Ee.prototype,t,{allOwnKeys:!0}),M.extend(r,t,null,{allOwnKeys:!0}),r.create=function create(t){return createInstance(mergeConfig(e,t))},r}(X);_e.Axios=Ee,_e.CanceledError=CanceledError,_e.CancelToken=fe,_e.isCancel=isCancel,_e.VERSION=ce,_e.toFormData=toFormData,_e.AxiosError=AxiosError,_e.Cancel=_e.CanceledError,_e.all=function all(e){return Promise.all(e)},_e.spread=function spread(e){return function wrap(t){return e.apply(null,t)}},_e.isAxiosError=function isAxiosError(e){return M.isObject(e)&&!0===e.isAxiosError},_e.mergeConfig=mergeConfig,_e.AxiosHeaders=Q,_e.formToJSON=e=>formDataToJSON(M.isHTMLForm(e)?new FormData(e):e),_e.getAdapter=adapters_getAdapter,_e.HttpStatusCode=he,_e.default=_e;var me=_e;function getAugmentedNamespace(e){var t=e.default;if("function"==typeof t){var r=function a(){if(this instanceof a){var e=[null];e.push.apply(e,arguments);var r=Function.bind.apply(t,e);return new r}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var Re,Ae,ye={exports:{}};function requireMs(){if(Ae)return Re;Ae=1;var e=1e3,t=60*e,r=60*t,n=24*r,o=7*n,i=365.25*n;function plural(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}return Re=function(s,c){c=c||{};var u=typeof s;if("string"===u&&s.length>0)return function parse(s){if((s=String(s)).length>100)return;var c=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(s);if(!c)return;var u=parseFloat(c[1]);switch((c[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return u*i;case"weeks":case"week":case"w":return u*o;case"days":case"day":case"d":return u*n;case"hours":case"hour":case"hrs":case"hr":case"h":return u*r;case"minutes":case"minute":case"mins":case"min":case"m":return u*t;case"seconds":case"second":case"secs":case"sec":case"s":return u*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return u;default:return}}(s);if("number"===u&&isFinite(s))return c.long?function fmtLong(o){var i=Math.abs(o);if(i>=n)return plural(o,i,n,"day");if(i>=r)return plural(o,i,r,"hour");if(i>=t)return plural(o,i,t,"minute");if(i>=e)return plural(o,i,e,"second");return o+" ms"}(s):function fmtShort(o){var i=Math.abs(o);if(i>=n)return Math.round(o/n)+"d";if(i>=r)return Math.round(o/r)+"h";if(i>=t)return Math.round(o/t)+"m";if(i>=e)return Math.round(o/e)+"s";return o+"ms"}(s);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(s))},Re}var Ie=function setup(e){function createDebug(e){let t,r,n,o=null;function debug(...e){if(!debug.enabled)return;const r=debug,n=Number(new Date),o=n-(t||n);r.diff=o,r.prev=t,r.curr=n,t=n,e[0]=createDebug.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let i=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((t,n)=>{if("%%"===t)return"%";i++;const o=createDebug.formatters[n];if("function"==typeof o){const n=e[i];t=o.call(r,n),e.splice(i,1),i--}return t})),createDebug.formatArgs.call(r,e);(r.log||createDebug.log).apply(r,e)}return debug.namespace=e,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(e),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==o?o:(r!==createDebug.namespaces&&(r=createDebug.namespaces,n=createDebug.enabled(e)),n),set:e=>{o=e}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(e,t){const r=createDebug(this.namespace+(void 0===t?":":t)+e);return r.log=this.log,r}function matchesTemplate(e,t){let r=0,n=0,o=-1,i=0;for(;r<e.length;)if(n<t.length&&(t[n]===e[r]||"*"===t[n]))"*"===t[n]?(o=n,i=r,n++):(r++,n++);else{if(-1===o)return!1;n=o+1,i++,r=i}for(;n<t.length&&"*"===t[n];)n++;return n===t.length}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=function coerce(e){if(e instanceof Error)return e.stack||e.message;return e},createDebug.disable=function disable(){const e=[...createDebug.names,...createDebug.skips.map((e=>"-"+e))].join(",");return createDebug.enable(""),e},createDebug.enable=function enable(e){createDebug.save(e),createDebug.namespaces=e,createDebug.names=[],createDebug.skips=[];const t=("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(const e of t)"-"===e[0]?createDebug.skips.push(e.slice(1)):createDebug.names.push(e)},createDebug.enabled=function enabled(e){for(const t of createDebug.skips)if(matchesTemplate(e,t))return!1;for(const t of createDebug.names)if(matchesTemplate(e,t))return!0;return!1},createDebug.humanize=requireMs(),createDebug.destroy=function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((t=>{createDebug[t]=e[t]})),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=function selectColor(e){let t=0;for(let r=0;r<e.length;r++)t=(t<<5)-t+e.charCodeAt(r),t|=0;return createDebug.colors[Math.abs(t)%createDebug.colors.length]},createDebug.enable(createDebug.load()),createDebug};!function(e,t){t.formatArgs=function formatArgs(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function save(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function load(){let e;try{e=t.storage.getItem("debug")||t.storage.getItem("DEBUG")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG);return e},t.useColors=function useColors(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function localstorage(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=Ie(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}(ye,ye.exports);var Te=ye.exports,Se=Object,Ce=Error,Ne=EvalError,Oe=RangeError,be=ReferenceError,Pe=SyntaxError,Ue=TypeError,Le=URIError,De=Math.abs,Be=Math.floor,Me=Math.max,ve=Math.min,Fe=Math.pow,xe=Math.round,we=Number.isNaN||function isNaN(e){return e!=e},ke=Object.getOwnPropertyDescriptor;if(ke)try{ke([],"length")}catch(e){ke=null}var Ge,Ye,$e,He,je,Ve,Ke,qe,We,Xe,ze,Je,Qe,Ze,et,tt,rt,nt,ot,it,st,at,ct,ut,lt,pt,dt,Et,ft,gt=ke,ht=Object.defineProperty||!1;if(ht)try{ht({},"a",{value:1})}catch(e){ht=!1}function requireReflect_getPrototypeOf(){return Ve?je:(Ve=1,je="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null)}function requireObject_getPrototypeOf(){return qe?Ke:(qe=1,Ke=Se.getPrototypeOf||null)}function requireImplementation(){if(Xe)return We;Xe=1;var e="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,r=Math.max,n="[object Function]",o=function concatty(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r},i=function slicy(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r},joiny=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r};return We=function bind(s){var c=this;if("function"!=typeof c||t.apply(c)!==n)throw new TypeError(e+c);for(var u,l=i(arguments,1),binder=function(){if(this instanceof u){var e=c.apply(this,o(l,arguments));return Object(e)===e?e:this}return c.apply(s,o(l,arguments))},p=r(0,c.length-l.length),d=[],E=0;E<p;E++)d[E]="$"+E;if(u=Function("binder","return function ("+joiny(d,",")+"){ return binder.apply(this,arguments); }")(binder),c.prototype){var f=function Empty(){};f.prototype=c.prototype,u.prototype=new f,f.prototype=null}return u},We}function requireFunctionBind(){if(Je)return ze;Je=1;var e=requireImplementation();return ze=Function.prototype.bind||e}function requireFunctionCall(){return Ze?Qe:(Ze=1,Qe=Function.prototype.call)}function requireFunctionApply(){return tt?et:(tt=1,et=Function.prototype.apply)}function requireActualApply(){if(it)return ot;it=1;var e=requireFunctionBind(),t=requireFunctionApply(),r=requireFunctionCall(),n=function requireReflectApply(){return nt?rt:(nt=1,rt="undefined"!=typeof Reflect&&Reflect&&Reflect.apply)}();return ot=n||e.call(r,t)}function requireGet(){if(ut)return ct;ut=1;var e,t=function requireCallBindApplyHelpers(){if(at)return st;at=1;var e=requireFunctionBind(),t=Ue,r=requireFunctionCall(),n=requireActualApply();return st=function callBindBasic(o){if(o.length<1||"function"!=typeof o[0])throw new t("a function is required");return n(e,r,o)}}(),r=gt;try{e=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var n=!!e&&r&&r(Object.prototype,"__proto__"),o=Object,i=o.getPrototypeOf;return ct=n&&"function"==typeof n.get?t([n.get]):"function"==typeof i&&function getDunder(e){return i(null==e?e:o(e))}}var _t=Se,mt=Ce,Rt=Ne,At=Oe,yt=be,It=Pe,Tt=Ue,St=Le,Ct=De,Nt=Be,Ot=Me,bt=ve,Pt=Fe,Ut=xe,Lt=function sign(e){return we(e)||0===e?e:e<0?-1:1},Dt=Function,getEvalledConstructor=function(e){try{return Dt('"use strict"; return ('+e+").constructor;")()}catch(e){}},Bt=gt,Mt=ht,throwTypeError=function(){throw new Tt},vt=Bt?function(){try{return throwTypeError}catch(e){try{return Bt(arguments,"callee").get}catch(e){return throwTypeError}}}():throwTypeError,Ft=function requireHasSymbols(){if(He)return $e;He=1;var e="undefined"!=typeof Symbol&&Symbol,t=function requireShams(){return Ye?Ge:(Ye=1,Ge=function hasSymbols(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var o=Object.getOwnPropertySymbols(e);if(1!==o.length||o[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0})}();return $e=function hasNativeSymbols(){return"function"==typeof e&&("function"==typeof Symbol&&("symbol"==typeof e("foo")&&("symbol"==typeof Symbol("bar")&&t())))}}()(),xt=function requireGetProto(){if(pt)return lt;pt=1;var e=requireReflect_getPrototypeOf(),t=requireObject_getPrototypeOf(),r=requireGet();return lt=e?function getProto(t){return e(t)}:t?function getProto(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return t(e)}:r?function getProto(e){return r(e)}:null}(),wt=requireObject_getPrototypeOf(),kt=requireReflect_getPrototypeOf(),Gt=requireFunctionApply(),Yt=requireFunctionCall(),$t={},Ht="undefined"!=typeof Uint8Array&&xt?xt(Uint8Array):ft,jt={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?ft:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ft:ArrayBuffer,"%ArrayIteratorPrototype%":Ft&&xt?xt([][Symbol.iterator]()):ft,"%AsyncFromSyncIteratorPrototype%":ft,"%AsyncFunction%":$t,"%AsyncGenerator%":$t,"%AsyncGeneratorFunction%":$t,"%AsyncIteratorPrototype%":$t,"%Atomics%":"undefined"==typeof Atomics?ft:Atomics,"%BigInt%":"undefined"==typeof BigInt?ft:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?ft:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?ft:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ft:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":mt,"%eval%":eval,"%EvalError%":Rt,"%Float16Array%":"undefined"==typeof Float16Array?ft:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?ft:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ft:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ft:FinalizationRegistry,"%Function%":Dt,"%GeneratorFunction%":$t,"%Int8Array%":"undefined"==typeof Int8Array?ft:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ft:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ft:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ft&&xt?xt(xt([][Symbol.iterator]())):ft,"%JSON%":"object"==typeof JSON?JSON:ft,"%Map%":"undefined"==typeof Map?ft:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&Ft&&xt?xt((new Map)[Symbol.iterator]()):ft,"%Math%":Math,"%Number%":Number,"%Object%":_t,"%Object.getOwnPropertyDescriptor%":Bt,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ft:Promise,"%Proxy%":"undefined"==typeof Proxy?ft:Proxy,"%RangeError%":At,"%ReferenceError%":yt,"%Reflect%":"undefined"==typeof Reflect?ft:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ft:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&Ft&&xt?xt((new Set)[Symbol.iterator]()):ft,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ft:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ft&&xt?xt(""[Symbol.iterator]()):ft,"%Symbol%":Ft?Symbol:ft,"%SyntaxError%":It,"%ThrowTypeError%":vt,"%TypedArray%":Ht,"%TypeError%":Tt,"%Uint8Array%":"undefined"==typeof Uint8Array?ft:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ft:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ft:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ft:Uint32Array,"%URIError%":St,"%WeakMap%":"undefined"==typeof WeakMap?ft:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ft:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ft:WeakSet,"%Function.prototype.call%":Yt,"%Function.prototype.apply%":Gt,"%Object.defineProperty%":Mt,"%Object.getPrototypeOf%":wt,"%Math.abs%":Ct,"%Math.floor%":Nt,"%Math.max%":Ot,"%Math.min%":bt,"%Math.pow%":Pt,"%Math.round%":Ut,"%Math.sign%":Lt,"%Reflect.getPrototypeOf%":kt};if(xt)try{null.error}catch(e){var Vt=xt(xt(e));jt["%Error.prototype%"]=Vt}var Kt=function doEval(e){var t;if("%AsyncFunction%"===e)t=getEvalledConstructor("async function () {}");else if("%GeneratorFunction%"===e)t=getEvalledConstructor("function* () {}");else if("%AsyncGeneratorFunction%"===e)t=getEvalledConstructor("async function* () {}");else if("%AsyncGenerator%"===e){var r=doEval("%AsyncGeneratorFunction%");r&&(t=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var n=doEval("%AsyncGenerator%");n&&xt&&(t=xt(n.prototype))}return jt[e]=t,t},qt={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Wt=requireFunctionBind(),Xt=function requireHasown(){if(Et)return dt;Et=1;var e=Function.prototype.call,t=Object.prototype.hasOwnProperty,r=requireFunctionBind();return dt=r.call(e,t)}(),zt=Wt.call(Yt,Array.prototype.concat),Jt=Wt.call(Gt,Array.prototype.splice),Qt=Wt.call(Yt,String.prototype.replace),Zt=Wt.call(Yt,String.prototype.slice),er=Wt.call(Yt,RegExp.prototype.exec),tr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,rr=/\\(\\)?/g,nr=function stringToPath(e){var t=Zt(e,0,1),r=Zt(e,-1);if("%"===t&&"%"!==r)throw new It("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new It("invalid intrinsic syntax, expected opening `%`");var n=[];return Qt(e,tr,(function(e,t,r,o){n[n.length]=r?Qt(o,rr,"$1"):t||e})),n},or=function getBaseIntrinsic(e,t){var r,n=e;if(Xt(qt,n)&&(n="%"+(r=qt[n])[0]+"%"),Xt(jt,n)){var o=jt[n];if(o===$t&&(o=Kt(n)),void 0===o&&!t)throw new Tt("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new It("intrinsic "+e+" does not exist!")},ir=function GetIntrinsic(e,t){if("string"!=typeof e||0===e.length)throw new Tt("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Tt('"allowMissing" argument must be a boolean');if(null===er(/^%?[^%]*%?$/,e))throw new It("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=nr(e),n=r.length>0?r[0]:"",o=or("%"+n+"%",t),i=o.name,s=o.value,c=!1,u=o.alias;u&&(n=u[0],Jt(r,zt([0,1],u)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],E=Zt(d,0,1),f=Zt(d,-1);if(('"'===E||"'"===E||"`"===E||'"'===f||"'"===f||"`"===f)&&E!==f)throw new It("property names with quotes must have matching quotes");if("constructor"!==d&&p||(c=!0),Xt(jt,i="%"+(n+="."+d)+"%"))s=jt[i];else if(null!=s){if(!(d in s)){if(!t)throw new Tt("base intrinsic for "+e+" exists, but the property is not available.");return}if(Bt&&l+1>=r.length){var g=Bt(s,d);s=(p=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:s[d]}else p=Xt(s,d),s=s[d];p&&!c&&(jt[i]=s)}}return s},sr={exports:{}};!function(e){var t=requireFunctionBind(),r=ir,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),s=r("%Object.getOwnPropertyDescriptor%",!0),c=r("%Object.defineProperty%",!0),u=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function callBind(e){var r=i(t,o,arguments);if(s&&c){var n=s(r,"length");n.configurable&&c(r,"length",{value:1+u(0,e.length-(arguments.length-1))})}return r};var l=function applyBind(){return i(t,n,arguments)};c?c(e.exports,"apply",{value:l}):e.exports.apply=l}(sr);var ar=ir,cr=sr.exports,ur=cr(ar("String.prototype.indexOf")),lr=getAugmentedNamespace(Object.freeze({__proto__:null,default:{}})),pr="function"==typeof Map&&Map.prototype,dr=Object.getOwnPropertyDescriptor&&pr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Er=pr&&dr&&"function"==typeof dr.get?dr.get:null,fr=pr&&Map.prototype.forEach,gr="function"==typeof Set&&Set.prototype,hr=Object.getOwnPropertyDescriptor&&gr?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,_r=gr&&hr&&"function"==typeof hr.get?hr.get:null,mr=gr&&Set.prototype.forEach,Rr="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,Ar="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,yr="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Ir=Boolean.prototype.valueOf,Tr=Object.prototype.toString,Sr=Function.prototype.toString,Cr=String.prototype.match,Nr=String.prototype.slice,Or=String.prototype.replace,br=String.prototype.toUpperCase,Pr=String.prototype.toLowerCase,Ur=RegExp.prototype.test,Lr=Array.prototype.concat,Dr=Array.prototype.join,Br=Array.prototype.slice,Mr=Math.floor,vr="function"==typeof BigInt?BigInt.prototype.valueOf:null,Fr=Object.getOwnPropertySymbols,xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,wr="function"==typeof Symbol&&"object"==typeof Symbol.iterator,kr="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===wr||"symbol")?Symbol.toStringTag:null,Gr=Object.prototype.propertyIsEnumerable,Yr=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function addNumericSeparator(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Ur.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-Mr(-e):Mr(e);if(n!==e){var o=String(n),i=Nr.call(t,o.length+1);return Or.call(o,r,"$&_")+"."+Or.call(Or.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Or.call(t,r,"$&_")}var $r=lr,Hr=$r.custom,jr=isSymbol(Hr)?Hr:null;function wrapQuotes(e,t,r){var n="double"===(r.quoteStyle||t)?'"':"'";return n+e+n}function quote(e){return Or.call(String(e),/"/g,"&quot;")}function isArray$3(e){return!("[object Array]"!==toStr(e)||kr&&"object"==typeof e&&kr in e)}function isRegExp$1(e){return!("[object RegExp]"!==toStr(e)||kr&&"object"==typeof e&&kr in e)}function isSymbol(e){if(wr)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!xr)return!1;try{return xr.call(e),!0}catch(e){}return!1}var Vr=Object.prototype.hasOwnProperty||function(e){return e in this};function has$3(e,t){return Vr.call(e,t)}function toStr(e){return Tr.call(e)}function indexOf(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function inspectString(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return inspectString(Nr.call(e,0,t.maxStringLength),t)+n}return wrapQuotes(Or.call(Or.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,lowbyte),"single",t)}function lowbyte(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+br.call(t.toString(16))}function markBoxed(e){return"Object("+e+")"}function weakCollectionOf(e){return e+" { ? }"}function collectionOf(e,t,r,n){return e+" ("+t+") {"+(n?indentedJoin(r,n):Dr.call(r,", "))+"}"}function indentedJoin(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+Dr.call(e,","+r)+"\n"+t.prev}function arrObjKeys(e,t){var r=isArray$3(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=has$3(e,o)?t(e[o],e):""}var i,s="function"==typeof Fr?Fr(e):[];if(wr){i={};for(var c=0;c<s.length;c++)i["$"+s[c]]=s[c]}for(var u in e)has$3(e,u)&&(r&&String(Number(u))===u&&u<e.length||wr&&i["$"+u]instanceof Symbol||(Ur.call(/[^\w$]/,u)?n.push(t(u,e)+": "+t(e[u],e)):n.push(u+": "+t(e[u],e))));if("function"==typeof Fr)for(var l=0;l<s.length;l++)Gr.call(e,s[l])&&n.push("["+t(s[l])+"]: "+t(e[s[l]],e));return n}var Kr=ir,qr=function callBoundIntrinsic(e,t){var r=ar(e,!!t);return"function"==typeof r&&ur(e,".prototype.")>-1?cr(r):r},Wr=function inspect_(e,t,r,n){var o=t||{};if(has$3(o,"quoteStyle")&&"single"!==o.quoteStyle&&"double"!==o.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(has$3(o,"maxStringLength")&&("number"==typeof o.maxStringLength?o.maxStringLength<0&&o.maxStringLength!==1/0:null!==o.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!has$3(o,"customInspect")||o.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(has$3(o,"indent")&&null!==o.indent&&"\t"!==o.indent&&!(parseInt(o.indent,10)===o.indent&&o.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(has$3(o,"numericSeparator")&&"boolean"!=typeof o.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=o.numericSeparator;if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return inspectString(e,o);if("number"==typeof e){if(0===e)return 1/0/e>0?"0":"-0";var c=String(e);return s?addNumericSeparator(e,c):c}if("bigint"==typeof e){var u=String(e)+"n";return s?addNumericSeparator(e,u):u}var l=void 0===o.depth?5:o.depth;if(void 0===r&&(r=0),r>=l&&l>0&&"object"==typeof e)return isArray$3(e)?"[Array]":"[Object]";var p=function getIndent(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;r=Dr.call(Array(e.indent+1)," ")}return{base:r,prev:Dr.call(Array(t+1),r)}}(o,r);if(void 0===n)n=[];else if(indexOf(n,e)>=0)return"[Circular]";function inspect(e,t,i){if(t&&(n=Br.call(n)).push(t),i){var s={depth:o.depth};return has$3(o,"quoteStyle")&&(s.quoteStyle=o.quoteStyle),inspect_(e,s,r+1,n)}return inspect_(e,o,r+1,n)}if("function"==typeof e&&!isRegExp$1(e)){var d=function nameOf(e){if(e.name)return e.name;var t=Cr.call(Sr.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(e),E=arrObjKeys(e,inspect);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(E.length>0?" { "+Dr.call(E,", ")+" }":"")}if(isSymbol(e)){var f=wr?Or.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):xr.call(e);return"object"!=typeof e||wr?f:markBoxed(f)}if(function isElement$1(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(e)){for(var g="<"+Pr.call(String(e.nodeName)),h=e.attributes||[],_=0;_<h.length;_++)g+=" "+h[_].name+"="+wrapQuotes(quote(h[_].value),"double",o);return g+=">",e.childNodes&&e.childNodes.length&&(g+="..."),g+="</"+Pr.call(String(e.nodeName))+">"}if(isArray$3(e)){if(0===e.length)return"[]";var m=arrObjKeys(e,inspect);return p&&!function singleLineValues(e){for(var t=0;t<e.length;t++)if(indexOf(e[t],"\n")>=0)return!1;return!0}(m)?"["+indentedJoin(m,p)+"]":"[ "+Dr.call(m,", ")+" ]"}if(function isError(e){return!("[object Error]"!==toStr(e)||kr&&"object"==typeof e&&kr in e)}(e)){var R=arrObjKeys(e,inspect);return"cause"in Error.prototype||!("cause"in e)||Gr.call(e,"cause")?0===R.length?"["+String(e)+"]":"{ ["+String(e)+"] "+Dr.call(R,", ")+" }":"{ ["+String(e)+"] "+Dr.call(Lr.call("[cause]: "+inspect(e.cause),R),", ")+" }"}if("object"==typeof e&&i){if(jr&&"function"==typeof e[jr]&&$r)return $r(e,{depth:l-r});if("symbol"!==i&&"function"==typeof e.inspect)return e.inspect()}if(function isMap(e){if(!Er||!e||"object"!=typeof e)return!1;try{Er.call(e);try{_r.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(e)){var A=[];return fr.call(e,(function(t,r){A.push(inspect(r,e,!0)+" => "+inspect(t,e))})),collectionOf("Map",Er.call(e),A,p)}if(function isSet(e){if(!_r||!e||"object"!=typeof e)return!1;try{_r.call(e);try{Er.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(e)){var y=[];return mr.call(e,(function(t){y.push(inspect(t,e))})),collectionOf("Set",_r.call(e),y,p)}if(function isWeakMap(e){if(!Rr||!e||"object"!=typeof e)return!1;try{Rr.call(e,Rr);try{Ar.call(e,Ar)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(e))return weakCollectionOf("WeakMap");if(function isWeakSet(e){if(!Ar||!e||"object"!=typeof e)return!1;try{Ar.call(e,Ar);try{Rr.call(e,Rr)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(e))return weakCollectionOf("WeakSet");if(function isWeakRef(e){if(!yr||!e||"object"!=typeof e)return!1;try{return yr.call(e),!0}catch(e){}return!1}(e))return weakCollectionOf("WeakRef");if(function isNumber(e){return!("[object Number]"!==toStr(e)||kr&&"object"==typeof e&&kr in e)}(e))return markBoxed(inspect(Number(e)));if(function isBigInt(e){if(!e||"object"!=typeof e||!vr)return!1;try{return vr.call(e),!0}catch(e){}return!1}(e))return markBoxed(inspect(vr.call(e)));if(function isBoolean(e){return!("[object Boolean]"!==toStr(e)||kr&&"object"==typeof e&&kr in e)}(e))return markBoxed(Ir.call(e));if(function isString(e){return!("[object String]"!==toStr(e)||kr&&"object"==typeof e&&kr in e)}(e))return markBoxed(inspect(String(e)));if(!function isDate(e){return!("[object Date]"!==toStr(e)||kr&&"object"==typeof e&&kr in e)}(e)&&!isRegExp$1(e)){var I=arrObjKeys(e,inspect),T=Yr?Yr(e)===Object.prototype:e instanceof Object||e.constructor===Object,S=e instanceof Object?"":"null prototype",C=!T&&kr&&Object(e)===e&&kr in e?Nr.call(toStr(e),8,-1):S?"Object":"",N=(T||"function"!=typeof e.constructor?"":e.constructor.name?e.constructor.name+" ":"")+(C||S?"["+Dr.call(Lr.call([],C||[],S||[]),": ")+"] ":"");return 0===I.length?N+"{}":p?N+"{"+indentedJoin(I,p)+"}":N+"{ "+Dr.call(I,", ")+" }"}return String(e)},Xr=Kr("%TypeError%"),zr=Kr("%WeakMap%",!0),Jr=Kr("%Map%",!0),Qr=qr("WeakMap.prototype.get",!0),Zr=qr("WeakMap.prototype.set",!0),en=qr("WeakMap.prototype.has",!0),tn=qr("Map.prototype.get",!0),rn=qr("Map.prototype.set",!0),nn=qr("Map.prototype.has",!0),listGetNode=function(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r,r},on=String.prototype.replace,sn=/%20/g,an="RFC3986",cn={default:an,formatters:{RFC1738:function(e){return on.call(e,sn,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:an},un=cn,ln=Object.prototype.hasOwnProperty,pn=Array.isArray,dn=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),En=function arrayToObject(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r},fn={arrayToObject:En,assign:function assignSingleSource(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function combine(e,t){return[].concat(e,t)},compact:function compact(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],s=Object.keys(i),c=0;c<s.length;++c){var u=s[c],l=i[u];"object"==typeof l&&null!==l&&-1===r.indexOf(l)&&(t.push({obj:i,prop:u}),r.push(l))}return function compactQueue(e){for(;e.length>1;){var t=e.pop(),r=t.obj[t.prop];if(pn(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function encode(e,t,r,n,o){if(0===e.length)return e;var i=e;if("symbol"==typeof e?i=Symbol.prototype.toString.call(e):"string"!=typeof e&&(i=String(e)),"iso-8859-1"===r)return escape(i).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var s="",c=0;c<i.length;++c){var u=i.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||o===un.RFC1738&&(40===u||41===u)?s+=i.charAt(c):u<128?s+=dn[u]:u<2048?s+=dn[192|u>>6]+dn[128|63&u]:u<55296||u>=57344?s+=dn[224|u>>12]+dn[128|u>>6&63]+dn[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&i.charCodeAt(c)),s+=dn[240|u>>18]+dn[128|u>>12&63]+dn[128|u>>6&63]+dn[128|63&u])}return s},isBuffer:function isBuffer(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function isRegExp(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function maybeMap(e,t){if(pn(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function merge(e,t,r){if(!t)return e;if("object"!=typeof t){if(pn(e))e.push(t);else{if(!e||"object"!=typeof e)return[e,t];(r&&(r.plainObjects||r.allowPrototypes)||!ln.call(Object.prototype,t))&&(e[t]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(t);var n=e;return pn(e)&&!pn(t)&&(n=En(e,r)),pn(e)&&pn(t)?(t.forEach((function(t,n){if(ln.call(e,n)){var o=e[n];o&&"object"==typeof o&&t&&"object"==typeof t?e[n]=merge(o,t,r):e.push(t)}else e[n]=t})),e):Object.keys(t).reduce((function(e,n){var o=t[n];return ln.call(e,n)?e[n]=merge(e[n],o,r):e[n]=o,e}),n)}},gn=function getSideChannel(){var e,t,r,n={assert:function(e){if(!n.has(e))throw new Xr("Side channel does not contain "+Wr(e))},get:function(n){if(zr&&n&&("object"==typeof n||"function"==typeof n)){if(e)return Qr(e,n)}else if(Jr){if(t)return tn(t,n)}else if(r)return function(e,t){var r=listGetNode(e,t);return r&&r.value}(r,n)},has:function(n){if(zr&&n&&("object"==typeof n||"function"==typeof n)){if(e)return en(e,n)}else if(Jr){if(t)return nn(t,n)}else if(r)return function(e,t){return!!listGetNode(e,t)}(r,n);return!1},set:function(n,o){zr&&n&&("object"==typeof n||"function"==typeof n)?(e||(e=new zr),Zr(e,n,o)):Jr?(t||(t=new Jr),rn(t,n,o)):(r||(r={key:{},next:null}),function(e,t,r){var n=listGetNode(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}}(r,n,o))}};return n},hn=fn,_n=cn,mn=Object.prototype.hasOwnProperty,Rn={brackets:function brackets(e){return e+"[]"},comma:"comma",indices:function indices(e,t){return e+"["+t+"]"},repeat:function repeat(e){return e}},An=Array.isArray,yn=String.prototype.split,In=Array.prototype.push,pushToArray=function(e,t){In.apply(e,An(t)?t:[t])},Tn=Date.prototype.toISOString,Sn=_n.default,Cn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:hn.encode,encodeValuesOnly:!1,format:Sn,formatter:_n.formatters[Sn],indices:!1,serializeDate:function serializeDate(e){return Tn.call(e)},skipNulls:!1,strictNullHandling:!1},Nn={},On=function stringify(e,t,r,n,o,i,s,c,u,l,p,d,E,f,g,h){for(var _=e,m=h,R=0,A=!1;void 0!==(m=m.get(Nn))&&!A;){var y=m.get(e);if(R+=1,void 0!==y){if(y===R)throw new RangeError("Cyclic object value");A=!0}void 0===m.get(Nn)&&(R=0)}if("function"==typeof c?_=c(t,_):_ instanceof Date?_=p(_):"comma"===r&&An(_)&&(_=hn.maybeMap(_,(function(e){return e instanceof Date?p(e):e}))),null===_){if(o)return s&&!f?s(t,Cn.encoder,g,"key",d):t;_=""}if(function isNonNullishPrimitive(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(_)||hn.isBuffer(_)){if(s){var I=f?t:s(t,Cn.encoder,g,"key",d);if("comma"===r&&f){for(var T=yn.call(String(_),","),S="",C=0;C<T.length;++C)S+=(0===C?"":",")+E(s(T[C],Cn.encoder,g,"value",d));return[E(I)+(n&&An(_)&&1===T.length?"[]":"")+"="+S]}return[E(I)+"="+E(s(_,Cn.encoder,g,"value",d))]}return[E(t)+"="+E(String(_))]}var N,O=[];if(void 0===_)return O;if("comma"===r&&An(_))N=[{value:_.length>0?_.join(",")||null:void 0}];else if(An(c))N=c;else{var b=Object.keys(_);N=u?b.sort(u):b}for(var P=n&&An(_)&&1===_.length?t+"[]":t,U=0;U<N.length;++U){var L=N[U],D="object"==typeof L&&void 0!==L.value?L.value:_[L];if(!i||null!==D){var B=An(_)?"function"==typeof r?r(P,L):P:P+(l?"."+L:"["+L+"]");h.set(e,R);var M=gn();M.set(Nn,h),pushToArray(O,stringify(D,B,r,n,o,i,s,c,u,l,p,d,E,f,g,M))}}return O},bn=fn,Pn=Object.prototype.hasOwnProperty,Un=Array.isArray,Ln={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:bn.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},interpretNumericEntities=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},parseArrayValue=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Dn=function parseQueryStringKeys(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,i=/(\[[^[\]]*])/g,s=r.depth>0&&/(\[[^[\]]*])/.exec(o),c=s?o.slice(0,s.index):o,u=[];if(c){if(!r.plainObjects&&Pn.call(Object.prototype,c)&&!r.allowPrototypes)return;u.push(c)}for(var l=0;r.depth>0&&null!==(s=i.exec(o))&&l<r.depth;){if(l+=1,!r.plainObjects&&Pn.call(Object.prototype,s[1].slice(1,-1))&&!r.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+o.slice(s.index)+"]"),function(e,t,r,n){for(var o=n?t:parseArrayValue(t,r),i=e.length-1;i>=0;--i){var s,c=e[i];if("[]"===c&&r.parseArrays)s=[].concat(o);else{s=r.plainObjects?Object.create(null):{};var u="["===c.charAt(0)&&"]"===c.charAt(c.length-1)?c.slice(1,-1):c,l=parseInt(u,10);r.parseArrays||""!==u?!isNaN(l)&&c!==u&&String(l)===u&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(s=[])[l]=o:"__proto__"!==u&&(s[u]=o):s={0:o}}o=s}return o}(u,t,r,n)}},stringify=function(e,t){var r,n=e,o=function normalizeStringifyOptions(e){if(!e)return Cn;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||Cn.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=_n.default;if(void 0!==e.format){if(!mn.call(_n.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=_n.formatters[r],o=Cn.filter;return("function"==typeof e.filter||An(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:Cn.addQueryPrefix,allowDots:void 0===e.allowDots?Cn.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Cn.charsetSentinel,delimiter:void 0===e.delimiter?Cn.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:Cn.encode,encoder:"function"==typeof e.encoder?e.encoder:Cn.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:Cn.encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:Cn.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:Cn.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Cn.strictNullHandling}}(t);"function"==typeof o.filter?n=(0,o.filter)("",n):An(o.filter)&&(r=o.filter);var i,s=[];if("object"!=typeof n||null===n)return"";i=t&&t.arrayFormat in Rn?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var c=Rn[i];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var u="comma"===c&&t&&t.commaRoundTrip;r||(r=Object.keys(n)),o.sort&&r.sort(o.sort);for(var l=gn(),p=0;p<r.length;++p){var d=r[p];o.skipNulls&&null===n[d]||pushToArray(s,On(n[d],d,c,u,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,l))}var E=s.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),E.length>0?f+E:""},Bn={formats:cn,parse:function(e,t){var r=function normalizeParseOptions(e){if(!e)return Ln;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?Ln.charset:e.charset;return{allowDots:void 0===e.allowDots?Ln.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:Ln.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:Ln.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:Ln.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Ln.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:Ln.comma,decoder:"function"==typeof e.decoder?e.decoder:Ln.decoder,delimiter:"string"==typeof e.delimiter||bn.isRegExp(e.delimiter)?e.delimiter:Ln.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:Ln.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:Ln.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:Ln.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:Ln.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Ln.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var n="string"==typeof e?function parseQueryStringValues(e,t){var r,n={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,i=t.parameterLimit===1/0?void 0:t.parameterLimit,s=o.split(t.delimiter,i),c=-1,u=t.charset;if(t.charsetSentinel)for(r=0;r<s.length;++r)0===s[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===s[r]?u="utf-8":"utf8=%26%2310003%3B"===s[r]&&(u="iso-8859-1"),c=r,r=s.length);for(r=0;r<s.length;++r)if(r!==c){var l,p,d=s[r],E=d.indexOf("]="),f=-1===E?d.indexOf("="):E+1;-1===f?(l=t.decoder(d,Ln.decoder,u,"key"),p=t.strictNullHandling?null:""):(l=t.decoder(d.slice(0,f),Ln.decoder,u,"key"),p=bn.maybeMap(parseArrayValue(d.slice(f+1),t),(function(e){return t.decoder(e,Ln.decoder,u,"value")}))),p&&t.interpretNumericEntities&&"iso-8859-1"===u&&(p=interpretNumericEntities(p)),d.indexOf("[]=")>-1&&(p=Un(p)?[p]:p),Pn.call(n,l)?n[l]=bn.combine(n[l],p):n[l]=p}return n}(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),s=0;s<i.length;++s){var c=i[s],u=Dn(c,n[c],r,"string"==typeof e);o=bn.merge(o,u,r)}return!0===r.allowSparse?o:bn.compact(o)},stringify:stringify};const Mn=Te("ebay:request"),vn={"Access-Control-Allow-Origin":"*","Access-Control-Allow-Headers":"X-Requested-With, Origin, Content-Type, X-Auth-Token","Access-Control-Allow-Methods":"GET, PUT, POST, DELETE"},Fn={"Content-Type":"multipart/form-data"},xn={paramsSerializer:{indexes:null}};class AxiosRequest{constructor(e={}){this.instance=me.create({headers:{...vn},...xn,...e})}get(e,t){return Mn("get: "+e,t),this.instance.get(e,t)}post(e,t,r){return Mn("post: "+e,{payload:t,config:r}),this.instance.post(e,t,r)}delete(e,t){return Mn("delete: "+e,t),this.instance.delete(e,t)}put(e,t,r){return Mn("put: "+e,{payload:t,config:r}),this.instance.put(e,t,r)}postForm(e,t,r){Mn("postForm: "+e);const n=Bn.stringify(t);return this.instance.post(e,n,r)}}class Base{constructor(e,t=new AxiosRequest(e.axiosConfig)){this.config=e,this.req=t}}var wn={},kn={};!function(e){const t=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+t+"]["+(t+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",n=new RegExp("^"+r+"$");e.isExist=function(e){return void 0!==e},e.isEmptyObject=function(e){return 0===Object.keys(e).length},e.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},e.getValue=function(t){return e.isExist(t)?t:""},e.isName=function(e){const t=n.exec(e);return!(null==t)},e.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},e.nameRegexp=r}(kn);const Gn=kn,Yn={allowBooleanAttributes:!1,unpairedTags:[]};function isWhiteSpace(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function readPI(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return getErrorObject("InvalidXml","XML declaration allowed only at the start of the document.",getLineNumberForPosition(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function readCommentAndCDATA(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}wn.validate=function(e,t){t=Object.assign({},Yn,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let s=0;s<e.length;s++)if("<"===e[s]&&"?"===e[s+1]){if(s+=2,s=readPI(e,s),s.err)return s}else{if("<"!==e[s]){if(isWhiteSpace(e[s]))continue;return getErrorObject("InvalidChar","char '"+e[s]+"' is not expected.",getLineNumberForPosition(e,s))}{let c=s;if(s++,"!"===e[s]){s=readCommentAndCDATA(e,s);continue}{let u=!1;"/"===e[s]&&(u=!0,s++);let l="";for(;s<e.length&&">"!==e[s]&&" "!==e[s]&&"\t"!==e[s]&&"\n"!==e[s]&&"\r"!==e[s];s++)l+=e[s];if(l=l.trim(),"/"===l[l.length-1]&&(l=l.substring(0,l.length-1),s--),i=l,!Gn.isName(i)){let t;return t=0===l.trim().length?"Invalid space after '<'.":"Tag '"+l+"' is an invalid name.",getErrorObject("InvalidTag",t,getLineNumberForPosition(e,s))}const p=readAttributeStr(e,s);if(!1===p)return getErrorObject("InvalidAttr","Attributes for '"+l+"' have open quote.",getLineNumberForPosition(e,s));let d=p.value;if(s=p.index,"/"===d[d.length-1]){const r=s-d.length;d=d.substring(0,d.length-1);const o=validateAttributeString(d,t);if(!0!==o)return getErrorObject(o.err.code,o.err.msg,getLineNumberForPosition(e,r+o.err.line));n=!0}else if(u){if(!p.tagClosed)return getErrorObject("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",getLineNumberForPosition(e,s));if(d.trim().length>0)return getErrorObject("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",getLineNumberForPosition(e,c));if(0===r.length)return getErrorObject("InvalidTag","Closing tag '"+l+"' has not been opened.",getLineNumberForPosition(e,c));{const t=r.pop();if(l!==t.tagName){let r=getLineNumberForPosition(e,t.tagStartPos);return getErrorObject("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+l+"'.",getLineNumberForPosition(e,c))}0==r.length&&(o=!0)}}else{const i=validateAttributeString(d,t);if(!0!==i)return getErrorObject(i.err.code,i.err.msg,getLineNumberForPosition(e,s-d.length+i.err.line));if(!0===o)return getErrorObject("InvalidXml","Multiple possible root nodes found.",getLineNumberForPosition(e,s));-1!==t.unpairedTags.indexOf(l)||r.push({tagName:l,tagStartPos:c}),n=!0}for(s++;s<e.length;s++)if("<"===e[s]){if("!"===e[s+1]){s++,s=readCommentAndCDATA(e,s);continue}if("?"!==e[s+1])break;if(s=readPI(e,++s),s.err)return s}else if("&"===e[s]){const t=validateAmpersand(e,s);if(-1==t)return getErrorObject("InvalidChar","char '&' is not expected.",getLineNumberForPosition(e,s));s=t}else if(!0===o&&!isWhiteSpace(e[s]))return getErrorObject("InvalidXml","Extra text at the end",getLineNumberForPosition(e,s));"<"===e[s]&&s--}}}var i;return n?1==r.length?getErrorObject("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",getLineNumberForPosition(e,r[0].tagStartPos)):!(r.length>0)||getErrorObject("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):getErrorObject("InvalidXml","Start tag expected.",1)};function readAttributeStr(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if('"'===e[t]||"'"===e[t])""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const $n=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function validateAttributeString(e,t){const r=Gn.getAllMatches(e,$n),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",getPositionFromMatch(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return getErrorObject("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",getPositionFromMatch(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return getErrorObject("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",getPositionFromMatch(r[e]));const o=r[e][2];if(!validateAttrName(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is an invalid name.",getPositionFromMatch(r[e]));if(n.hasOwnProperty(o))return getErrorObject("InvalidAttr","Attribute '"+o+"' is repeated.",getPositionFromMatch(r[e]));n[o]=1}return!0}function validateAmpersand(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function validateNumberAmpersand(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function getErrorObject(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function validateAttrName(e){return Gn.isName(e)}function getLineNumberForPosition(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function getPositionFromMatch(e){return e.startIndex+e[1].length}var Hn={};const jn={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};Hn.buildOptions=function(e){return Object.assign({},jn,e)},Hn.defaultOptions=jn;const Vn=kn;function readEntityExp(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let o="";for(;t<e.length&&e[t]!==n;t++)o+=e[t];return[r,o,t]}function isComment(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function isEntity(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function isElement(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function isAttlist(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function isNotation(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function validateEntityName(e){if(Vn.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}const Kn=/^[-+]?0x[a-fA-F0-9]+$/,qn=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Wn={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};var Xn=function toNumber$1(e,t={}){if(t=Object.assign({},Wn,t),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===e)return 0;if(t.hex&&Kn.test(r))return function parse_int(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r,16);if(-1!==r.search(/[eE]/)){const n=r.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(n){if(t.leadingZeros)r=(n[1]||"")+n[3];else if("0"!==n[2]||"."!==n[3][0])return e;return t.eNotation?Number(r):e}return e}{const n=qn.exec(r);if(n){const o=n[1],i=n[2];let s=function trimZeros(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(n[3]);if(!t.leadingZeros&&i.length>0&&o&&"."!==r[2])return e;if(!t.leadingZeros&&i.length>0&&!o&&"."!==r[1])return e;if(t.leadingZeros&&i===e)return 0;{const n=Number(r),c=""+n;return-1!==c.search(/[eE]/)?t.eNotation?n:e:-1!==r.indexOf(".")?"0"===c&&""===s||c===s||o&&c==="-"+s?n:e:i?s===c||o+s===c?n:e:r===c||r===o+c?n:e}}return e}};var zn=function getIgnoreAttributesFn$2(e){return"function"==typeof e?e:Array.isArray(e)?t=>{for(const r of e){if("string"==typeof r&&t===r)return!0;if(r instanceof RegExp&&r.test(t))return!0}}:()=>!1};const Jn=kn,Qn=class XmlNode{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}},Zn=function readDocType$1(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,o=!1,i=!1,s="";for(;t<e.length;t++)if("<"!==e[t]||i)if(">"===e[t]){if(i?"-"===e[t-1]&&"-"===e[t-2]&&(i=!1,n--):n--,0===n)break}else"["===e[t]?o=!0:s+=e[t];else{if(o&&isEntity(e,t)){let n,o;t+=7,[n,o,t]=readEntityExp(e,t+1),-1===o.indexOf("&")&&(r[validateEntityName(n)]={regx:RegExp(`&${n};`,"g"),val:o})}else if(o&&isElement(e,t))t+=8;else if(o&&isAttlist(e,t))t+=8;else if(o&&isNotation(e,t))t+=9;else{if(!isComment)throw new Error("Invalid DOCTYPE");i=!0}n++,s=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}},eo=Xn,to=zn;function addExternalEntities(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function parseTextData(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return parseValue(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?parseValue(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function resolveNameSpace(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const ro=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function buildAttributesMap(e,t,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const r=Jn.getAllMatches(e,ro),n=r.length,o={};for(let e=0;e<n;e++){const n=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(n,t))continue;let i=r[e][4],s=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(n,i,t);o[s]=null==e?i:typeof e!=typeof i||e!==i?e:parseValue(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const parseXml=function(e){e=e.replace(/\r\n?/g,"\n");const t=new Qn("!xml");let r=t,n="",o="";for(let i=0;i<e.length;i++){if("<"===e[i])if("/"===e[i+1]){const t=findClosingIndex(e,">",i,"Closing Tag is not closed.");let s=e.substring(i+2,t).trim();if(this.options.removeNSPrefix){const e=s.indexOf(":");-1!==e&&(s=s.substr(e+1))}this.options.transformTagName&&(s=this.options.transformTagName(s)),r&&(n=this.saveTextToParentTag(n,r,o));const c=o.substring(o.lastIndexOf(".")+1);if(s&&-1!==this.options.unpairedTags.indexOf(s))throw new Error(`Unpaired tag can not be used as closing tag: </${s}>`);let u=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(u=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):u=o.lastIndexOf("."),o=o.substring(0,u),r=this.tagsNodeStack.pop(),n="",i=t}else if("?"===e[i+1]){let t=readTagExp(e,i,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,o),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new Qn(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,o,t.tagName)),this.addChild(r,e,o)}i=t.closeIndex+1}else if("!--"===e.substr(i+1,3)){const t=findClosingIndex(e,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const s=e.substring(i+4,t-2);n=this.saveTextToParentTag(n,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:s}])}i=t}else if("!D"===e.substr(i+1,2)){const t=Zn(e,i);this.docTypeEntities=t.entities,i=t.i}else if("!["===e.substr(i+1,2)){const t=findClosingIndex(e,"]]>",i,"CDATA is not closed.")-2,s=e.substring(i+9,t);n=this.saveTextToParentTag(n,r,o);let c=this.parseTextData(s,r.tagname,o,!0,!1,!0,!0);null==c&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:s}]):r.add(this.options.textNodeName,c),i=t+2}else{let s=readTagExp(e,i,this.options.removeNSPrefix),c=s.tagName;const u=s.rawTagName;let l=s.tagExp,p=s.attrExpPresent,d=s.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,o,!1));const E=r;if(E&&-1!==this.options.unpairedTags.indexOf(E.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==t.tagname&&(o+=o?"."+c:c),this.isItStopNode(this.options.stopNodes,o,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),i=s.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))i=s.closeIndex;else{const r=this.readStopNodeData(e,u,d+1);if(!r)throw new Error(`Unexpected end of ${u}`);i=r.i,t=r.tagContent}const n=new Qn(c);c!==l&&p&&(n[":@"]=this.buildAttributesMap(l,o,c)),t&&(t=this.parseTextData(t,c,o,!0,p,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,o)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new Qn(c);c!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(r,e,o),o=o.substr(0,o.lastIndexOf("."))}else{const e=new Qn(c);this.tagsNodeStack.push(r),c!==l&&p&&(e[":@"]=this.buildAttributesMap(l,o,c)),this.addChild(r,e,o),r=e}n="",i=d}}else n+=e[i]}return t.child};function addChild(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const replaceEntitiesValue$1=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function saveTextToParentTag(e,t,r,n){return e&&(void 0===n&&(n=0===t.child.length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function isItStopNode(e,t,r){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}function findClosingIndex(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function readTagExp(e,t,r,n=">"){const o=function tagExpWithClosingIndex(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,c=i.search(/\s/);let u=i,l=!0;-1!==c&&(u=i.substring(0,c),i=i.substring(c+1).trimStart());const p=u;if(r){const e=u.indexOf(":");-1!==e&&(u=u.substr(e+1),l=u!==o.data.substr(e+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:p}}function readStopNodeData(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=findClosingIndex(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i:i};r=i}else if("?"===e[r+1]){r=findClosingIndex(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=findClosingIndex(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=findClosingIndex(e,"]]>",r,"StopNode is not closed.")-2}else{const n=readTagExp(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function parseValue(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&eo(e,r)}return Jn.isExist(e)?e:""}var no=class OrderedObjParser{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>String.fromCharCode(Number.parseInt(t,16))}},this.addExternalEntities=addExternalEntities,this.parseXml=parseXml,this.parseTextData=parseTextData,this.resolveNameSpace=resolveNameSpace,this.buildAttributesMap=buildAttributesMap,this.isItStopNode=isItStopNode,this.replaceEntitiesValue=replaceEntitiesValue$1,this.readStopNodeData=readStopNodeData,this.saveTextToParentTag=saveTextToParentTag,this.addChild=addChild,this.ignoreAttributesFn=to(this.options.ignoreAttributes)}},oo={};function compress(e,t,r){let n;const o={};for(let i=0;i<e.length;i++){const s=e[i],c=propName$1(s);let u="";if(u=void 0===r?c:r+"."+c,c===t.textNodeName)void 0===n?n=s[c]:n+=""+s[c];else{if(void 0===c)continue;if(s[c]){let e=compress(s[c],t,u);const r=isLeafTag(e,t);s[":@"]?assignAttributes(e,s[":@"],u,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==o[c]&&o.hasOwnProperty(c)?(Array.isArray(o[c])||(o[c]=[o[c]]),o[c].push(e)):t.isArray(c,u,r)?o[c]=[e]:o[c]=e}}}return"string"==typeof n?n.length>0&&(o[t.textNodeName]=n):void 0!==n&&(o[t.textNodeName]=n),o}function propName$1(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function assignAttributes(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function isLeafTag(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}oo.prettify=function prettify$1(e,t){return compress(e,t)};const{buildOptions:io}=Hn,so=no,{prettify:ao}=oo,co=wn;var uo=class XMLParser{constructor(e){this.externalEntities={},this.options=io(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=co.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new so(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:ao(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}};function arrToStr(e,t,r,n){let o="",i=!1;for(let s=0;s<e.length;s++){const c=e[s],u=propName(c);if(void 0===u)continue;let l="";if(l=0===r.length?u:`${r}.${u}`,u===t.textNodeName){let e=c[u];isStopNode(l,t)||(e=t.tagValueProcessor(u,e),e=replaceEntitiesValue(e,t)),i&&(o+=n),o+=e,i=!1;continue}if(u===t.cdataPropName){i&&(o+=n),o+=`<![CDATA[${c[u][0][t.textNodeName]}]]>`,i=!1;continue}if(u===t.commentPropName){o+=n+`\x3c!--${c[u][0][t.textNodeName]}--\x3e`,i=!0;continue}if("?"===u[0]){const e=attr_to_str(c[":@"],t),r="?xml"===u?"":n;let s=c[u][0][t.textNodeName];s=0!==s.length?" "+s:"",o+=r+`<${u}${s}${e}?>`,i=!0;continue}let p=n;""!==p&&(p+=t.indentBy);const d=n+`<${u}${attr_to_str(c[":@"],t)}`,E=arrToStr(c[u],t,l,p);-1!==t.unpairedTags.indexOf(u)?t.suppressUnpairedNode?o+=d+">":o+=d+"/>":E&&0!==E.length||!t.suppressEmptyNode?E&&E.endsWith(">")?o+=d+`>${E}${n}</${u}>`:(o+=d+">",E&&""!==n&&(E.includes("/>")||E.includes("</"))?o+=n+t.indentBy+E+n:o+=E,o+=`</${u}>`):o+=d+"/>",i=!0}return o}function propName(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function attr_to_str(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let o=t.attributeValueProcessor(n,e[n]);o=replaceEntitiesValue(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function isStopNode(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function replaceEntitiesValue(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const lo=function toXml(e,t){let r="";return t.format&&t.indentBy.length>0&&(r="\n"),arrToStr(e,t,"",r)},po=zn,Eo={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function Builder(e){this.options=Object.assign({},Eo,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=po(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=isAttribute),this.processTextOrObjNode=processTextOrObjNode,this.options.format?(this.indentate=indentate,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function processTextOrObjNode(e,t,r,n){const o=this.j2x(e,r+1,n.concat(t));return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,o.attrStr,r):this.buildObjectNode(o.val,t,o.attrStr,r)}function indentate(e){return this.options.indentBy.repeat(e)}function isAttribute(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Builder.prototype.build=function(e){return this.options.preserveOrder?lo(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},Builder.prototype.j2x=function(e,t,r){let n="",o="";const i=r.join(".");for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(void 0===e[s])this.isAttribute(s)&&(o+="");else if(null===e[s])this.isAttribute(s)||s===this.options.cdataPropName?o+="":"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if(e[s]instanceof Date)o+=this.buildTextValNode(e[s],s,"",t);else if("object"!=typeof e[s]){const r=this.isAttribute(s);if(r&&!this.ignoreAttributesFn(r,i))n+=this.buildAttrPairStr(r,""+e[s]);else if(!r)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,""+e[s]);o+=this.replaceEntitiesValue(t)}else o+=this.buildTextValNode(e[s],s,"",t)}else if(Array.isArray(e[s])){const n=e[s].length;let i="",c="";for(let u=0;u<n;u++){const n=e[s][u];if(void 0===n);else if(null===n)"?"===s[0]?o+=this.indentate(t)+"<"+s+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+s+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){const e=this.j2x(n,t+1,r.concat(s));i+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(c+=e.attrStr)}else i+=this.processTextOrObjNode(n,s,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(s,n);e=this.replaceEntitiesValue(e),i+=e}else i+=this.buildTextValNode(n,s,"",t)}this.options.oneListGroup&&(i=this.buildObjectNode(i,s,c,t)),o+=i}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){const t=Object.keys(e[s]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[s][t[o]])}else o+=this.processTextOrObjNode(e[s],s,t,r);return{attrStr:n,val:o}},Builder.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Builder.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},Builder.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Builder.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Builder.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};var fo={XMLParser:uo,XMLValidator:wn,XMLBuilder:Builder};const go=Te("ebay:error"),ho=Symbol("raw-error");class EBayError extends Error{constructor(e,t="",r={}){super(e),this.name=this.constructor.name,this.description=t,this.meta=r,Object.setPrototypeOf(this,new.target.prototype)}}class EBayNoCallError extends EBayError{constructor(e="No eBay API call defined, please invoke one."){super(e)}}class ApiEnvError extends EBayError{constructor(e){super(`Could not find ${e} in process.env.`)}}class EbayApiError extends EBayError{constructor(e,t,r,n,o){super(e,t,r),this.errorCode=n,this.firstError=o}}class EBayApiError extends EbayApiError{}class EBayAccessDenied extends EBayApiError{}class EBayInvalidGrant extends EBayApiError{}class EBayNotFound extends EBayApiError{}EBayNotFound.code=11001;class EBayInvalidAccessToken extends EBayApiError{}class EBayIAFTokenExpired extends EBayApiError{}EBayIAFTokenExpired.code=21917053;class EBayAuthTokenIsInvalid extends EBayApiError{}EBayAuthTokenIsInvalid.code=931;class EBayAuthTokenIsHardExpired extends EBayApiError{}EBayAuthTokenIsHardExpired.code=932;class EBayIAFTokenInvalid extends EBayApiError{}EBayIAFTokenInvalid.code=21916984;class EBayTokenRequired extends EBayApiError{}EBayTokenRequired.code=930;class EBayInvalidScope extends EBayApiError{}const getErrorMessage=e=>"message"in e?e.message:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ShortMessage:e.Errors.ShortMessage:"eBay API request error",getErrorDescription=(e,t)=>"description"in e?e.description:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].LongMessage:e.Errors.LongMessage:"longMessage"in e?e.longMessage:(200!==t?.status?t?.statusText:"")||"",getErrorCode=e=>"errorId"in e?e.errorId:"Errors"in e?Array.isArray(e.Errors)?e.Errors[0].ErrorCode:e.Errors.ErrorCode:void 0,extractEBayError=(e,t)=>{const r=function getEBayError(e){return e?"string"==typeof e?{message:e}:"Errors"in e?e:"error"in e&&"string"==typeof e.error?{message:e.error,description:e.error_description||""}:"errors"in e&&Array.isArray(e.errors)?e.errors[0]:"errorMessage"in e?Array.isArray(e.errorMessage?.error)?e.errorMessage.error[0]:e.errorMessage.error:{message:"Unknown eBay API Error",description:'This error response is not known. You should investigate the "meta.res.data" for more information.'}:{message:"eBay API Error",description:"No data is set in response result."}}(t||e.response?.data),n={...r,[ho]:e},o="Errors"in r?Array.isArray(r.Errors)?r.Errors[0]:r.Errors:r;return e?.response&&(n.res={status:e.response.status,statusText:e.response.statusText,headers:e.response.headers,data:e.response.data??{}}),e?.config&&(n.req={url:e.config.url,method:e.config.method,headers:e.config.headers,params:e.config.params}),{message:getErrorMessage(r),description:getErrorDescription(r,e?.response),errorCode:getErrorCode(r),meta:n,firstError:o}},handleEBayError=e=>{if(go("handleEBayError",e),e instanceof EBayError||!e.response)throw e;if("object"!=typeof e)throw new EBayError(e);const{message:t,meta:r,description:n,errorCode:o,firstError:i}=extractEBayError(e);if("domain"in r&&"ACCESS"===r.domain)throw new EBayAccessDenied(t,n,r,o,i);if("message"in r&&"invalid_grant"===r.message)throw new EBayInvalidGrant(t,n,r,o,i);if("message"in r&&"invalid_scope"===r.message)throw new EBayInvalidScope(t,n,r,o,i);if("message"in r&&"Invalid access token"===r.message)throw new EBayInvalidAccessToken(t,n,r,o,i);if(o===EBayNotFound.code)throw new EBayNotFound(t,n,r,o,i);throw new EBayApiError(t,n,r,o,i)},checkEBayTraditionalResponse=(e,t)=>{if(!t)return void go("checkEBayTraditionalResponse: No data found in response.");if(!("Errors"in t)&&!("errorMessage"in t))return;if("Errors"in t&&"Failure"!==t.Ack)return void go(`checkEBayTraditionalResponse: eBay API returned ${t.Ack}`);const{message:r,meta:n,description:o,errorCode:i,firstError:s}=extractEBayError(e,t);if(void 0===i)throw new EBayApiError(r,o,n,i,s);switch(i){case EBayIAFTokenExpired.code:throw new EBayIAFTokenExpired(r,o,n,i,s);case EBayIAFTokenInvalid.code:case 1.32:throw new EBayIAFTokenInvalid(r,o,n,i,s);case EBayTokenRequired.code:throw new EBayTokenRequired(r,o,n,i,s);case EBayAuthTokenIsHardExpired.code:throw new EBayAuthTokenIsHardExpired(r,o,n,i,s);case EBayAuthTokenIsInvalid.code:throw new EBayAuthTokenIsInvalid(r,o,n,i,s)}throw new EBayApiError(r,o,n,i,s)};var _o=Object.freeze({__proto__:null,ApiEnvError:ApiEnvError,EBayAccessDenied:EBayAccessDenied,EBayApiError:EBayApiError,EBayAuthTokenIsHardExpired:EBayAuthTokenIsHardExpired,EBayAuthTokenIsInvalid:EBayAuthTokenIsInvalid,EBayError:EBayError,EBayIAFTokenExpired:EBayIAFTokenExpired,EBayIAFTokenInvalid:EBayIAFTokenInvalid,EBayInvalidAccessToken:EBayInvalidAccessToken,EBayInvalidGrant:EBayInvalidGrant,EBayInvalidScope:EBayInvalidScope,EBayNoCallError:EBayNoCallError,EBayNotFound:EBayNotFound,EBayTokenRequired:EBayTokenRequired,EbayApiError:EbayApiError,checkEBayTraditionalResponse:checkEBayTraditionalResponse,extractEBayError:extractEBayError,handleEBayError:handleEBayError,rawError:ho});const mo=Te("ebay:xml:request"),Ro={attributeNamePrefix:"@_",textNodeName:"#value",ignoreAttributes:!1,cdataTagName:"__cdata",cdataPositionChar:"\\c",format:!1,indentBy:" ",suppressEmptyNode:!1,cdataPropName:"__cdata"},Ao={attributeNamePrefix:"",textNodeName:"value",ignoreAttributes:!1,parseAttributeValue:!0,parseNodeValue:!0,numberParseOptions:{hex:!1,leadingZeros:!1},removeNSPrefix:!0,isArray:(e,t)=>/Array$/.test(t.slice(0,-e.length-1))},yo={raw:!1,parseOptions:Ao,xmlBuilderOptions:Ro,useIaf:!0,sign:!1,headers:{},returnResponse:!1},Io={"Content-Type":"text/xml"};class XMLRequest{constructor(e,t,r,n){if(!e)throw new EBayNoCallError;this.config={...yo,...r},this.j2x=new fo.XMLBuilder({...Ro,...this.config.xmlBuilderOptions}),this.callName=e,this.fields=t||{},this.req=n}getResponseWrapper(){return`${this.callName}Response`}getCredentials(){return this.config.eBayAuthToken?{RequesterCredentials:{eBayAuthToken:this.config.eBayAuthToken}}:{}}getParseOptions(){return{...Ao,...this.config.parseOptions}}getHeaders(){return{...Io,...this.config.headers}}toJSON(e){const t=this.getParseOptions();return mo("parseOption",t),new fo.XMLParser(t).parse(e)}toXML(e){return'<?xml version="1.0" encoding="utf-8"?>'+this.j2x.build({[this.callName+"Request"]:{"@_xmlns":this.config.xmlns,...this.getCredentials(),...e}})}async request(){const e=this.toXML(this.fields);mo("xml",e);try{const{body:t,headers:r={}}=this.config.hook?.(e)??{body:e},n={headers:{...this.getHeaders(),...this.config.digitalSignatureHeaders?this.config.digitalSignatureHeaders(t):{},...r||{}}};mo("config",n);const o=await this.req.post(this.config.endpoint,t,n);if(mo("response",o),this.config.returnResponse)return o;const{data:i}=o;if(this.config.raw)return i;const s=this.xml2JSON(i);return checkEBayTraditionalResponse(o,s),s}catch(e){if(mo("error",e),e.response?.data){const t=this.toJSON(e.response.data);checkEBayTraditionalResponse(e,t[this.callName+"Response"])}throw e}}xml2JSON(e){const t=this.toJSON(e);return t[this.getResponseWrapper()]??t}}const To=Te("ebay:authNAuth");class AuthNAuth extends Base{static generateAuthUrl(e,t,r,n=!1){return[e?AuthNAuth.SIGNIN_ENDPOINT.sandbox:AuthNAuth.SIGNIN_ENDPOINT.production,"?SignIn","&RuName=",encodeURIComponent(t),"&SessID=",encodeURIComponent(r),n?"&prompt=login":""].join("")}constructor(e,t){super(e,t),this.authToken=null,this.config.authToken&&this.setAuthToken(this.config.authToken)}get apiEndpoint(){return this.config.sandbox?AuthNAuth.API_ENDPOINT.sandbox:AuthNAuth.API_ENDPOINT.production}async getSessionIdAndAuthUrl(e){if(!this.config.devId)throw new Error("DevId is required.");if(!(e=e||this.config.ruName))throw new Error("RuName is required.");const t=new XMLRequest("GetSessionID",{RuName:e},this.getRequestConfig("GetSessionID"),this.req),r=await t.request();return To("GetSessionID data",r),{sessionId:r.SessionID,url:AuthNAuth.generateAuthUrl(this.config.sandbox,e,r.SessionID)}}async mintToken(e){if(!this.config.devId)throw new Error("DevId is required.");const t=new XMLRequest("FetchToken",{SessionID:e},this.getRequestConfig("FetchToken"),this.req);try{return await t.request()}catch(e){throw To("Fetch auth token failed",e),e}}async obtainToken(e){const t=await this.mintToken(e);return To("Obtain auth token",t),this.setAuthToken(t),t}setAuthToken(e){this.authToken="string"==typeof e?{eBayAuthToken:e}:e}getAuthToken(){return this.authToken?{...this.authToken}:null}get eBayAuthToken(){return this.authToken?.eBayAuthToken??null}getRequestConfig(e){if("number"!=typeof this.config.siteId)throw new Error("\"siteId\" is required for Auth'n'Auth.");return{useIaf:!1,xmlns:"urn:ebay:apis:eBLBaseComponents",endpoint:this.apiEndpoint,headers:{"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967}}}}AuthNAuth.SIGNIN_ENDPOINT={sandbox:"https://signin.sandbox.ebay.com/ws/eBayISAPI.dll",production:"https://signin.ebay.com/ws/eBayISAPI.dll"},AuthNAuth.API_ENDPOINT={production:"https://api.ebay.com/ws/api.dll",sandbox:"https://api.sandbox.ebay.com/ws/api.dll"};let createNanoEvents=()=>({events:{},emit(e,...t){const r=this.events[e]||[];for(let e=0,n=r.length;e<n;e++)r[e](...t)},on(e,t){return this.events[e]?this.events[e].push(t):this.events[e]=[t],()=>{this.events[e]=this.events[e]?.filter((e=>t!==e))}}});const So=Te("ebay:oauth2");class OAuth2 extends Base{constructor(e,t){super(e,t),this.emitter=createNanoEvents(),this.scope=this.config.scope||OAuth2.defaultScopes}on(e,t){return this.emitter.on(e,t)}get identityEndpoint(){return this.config.sandbox?OAuth2.IDENTITY_ENDPOINT.sandbox:OAuth2.IDENTITY_ENDPOINT.production}static generateAuthUrl(e,t,r,n,o=""){return[e?OAuth2.AUTHORIZE_ENDPOINT.sandbox:OAuth2.AUTHORIZE_ENDPOINT.production,"?client_id=",encodeURIComponent(t),"&redirect_uri=",encodeURIComponent(r),"&response_type=code","&state=",encodeURIComponent(o),"&scope=",encodeURIComponent(n.join(" "))].join("")}generateAuthUrl(e,t=this.scope,r=""){if(!(e=e||this.config.ruName))throw new Error("RuName is required.");return OAuth2.generateAuthUrl(this.config.sandbox,this.config.appId,e,t,r)}async getAccessToken(){return this.getUserAccessToken()||this.getApplicationAccessToken()}getUserAccessToken(){return this._authToken?.access_token??null}async getApplicationAccessToken(){if(this._clientToken)return So("Return existing application access token: ",this._clientToken),this._clientToken.access_token;try{return(await this.obtainApplicationAccessToken()).access_token}catch(e){throw e}}getScope(){return[...this.scope]}setClientToken(e){this._clientToken=e}setScope(e){this.scope=e}async mintApplicationAccessToken(){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{return(await this.req.postForm(this.identityEndpoint,{scope:this.scope.join(" "),grant_type:"client_credentials"},{auth:{username:this.config.appId,password:this.config.certId}})).data}catch(e){throw So("Failed to mint application token",e),e}}async obtainApplicationAccessToken(){So("Obtain a new application access token with scope: ",this.scope.join(","));try{const e=await this.mintApplicationAccessToken();return So("Obtained a new application access token:",e),this.setClientToken(e),this.emitter.emit("refreshClientToken",e),e}catch(e){throw So("Failed to obtain application token",e),e}}async mintUserAccessToken(e,t=this.config.ruName){if(!this.config.appId)throw new Error("Missing App ID (Client Id)");if(!this.config.certId)throw new Error("Missing Cert Id (Client Secret)");try{const r=(await this.req.postForm(this.identityEndpoint,{grant_type:"authorization_code",code:e,redirect_uri:t},{auth:{username:this.config.appId,password:this.config.certId}})).data;return So("User Access Token",r),r}catch(e){throw So("Failed to get the token",e),e}}async getToken(e,t=this.config.ruName){return await this.mintUserAccessToken(e,t)}async refreshUserAccessToken(){if(!this._authToken||!this._authToken.refresh_token)throw So("Tried to refresh user access token before it was set."),new Error("Failed to refresh the user access token. Token or refresh_token is not set.");try{const e=(await this.req.postForm(this.identityEndpoint,{grant_type:"refresh_token",refresh_token:this._authToken.refresh_token,scope:this.scope.join(" ")},{auth:{username:this.config.appId,password:this.config.certId}})).data;So("Successfully refreshed token",e);const t={...this._authToken,...e};return this.setCredentials(t),this.emitter.emit("refreshAuthToken",t),t}catch(e){throw So("Failed to refresh the token",e),e}}async obtainToken(e){const t=await this.getToken(e);return So("Obtain user access token",t),this.setCredentials(t),t}getCredentials(){return this._authToken?{...this._authToken}:this._clientToken?{...this._clientToken}:null}setCredentials(e){this._authToken="string"==typeof e?{refresh_token:"",expires_in:7200,refresh_token_expires_in:47304e3,token_type:"User Access Token",access_token:e}:e}async refreshToken(){if(this._authToken)return await this.refreshUserAccessToken();if(this._clientToken)return await this.obtainApplicationAccessToken();throw new Error("Missing credentials. To refresh a token an application access token or user access token must be already set.")}}OAuth2.IDENTITY_ENDPOINT={production:"https://api.ebay.com/identity/v1/oauth2/token",sandbox:"https://api.sandbox.ebay.com/identity/v1/oauth2/token"},OAuth2.AUTHORIZE_ENDPOINT={production:"https://auth.ebay.com/oauth2/authorize",sandbox:"https://auth.sandbox.ebay.com/oauth2/authorize"},OAuth2.defaultScopes=["https://api.ebay.com/oauth/api_scope"];class Auth extends Base{constructor(e,t){super(e,t),this.authNAuth=new AuthNAuth(this.config,this.req),this.OAuth2=new OAuth2(this.config,this.req),this.oAuth2=this.OAuth2}async getHeaderAuthorization(e){if(this.authNAuth.eBayAuthToken)return{Authorization:"Token "+this.authNAuth.eBayAuthToken};return{Authorization:(e?"IAF ":"Bearer ")+await this.OAuth2.getAccessToken()}}}const Co="-----BEGIN PRIVATE KEY-----",getUnixTimestamp=()=>Math.floor(Date.now()/1e3),getSignatureParams=e=>[...e?["content-digest"]:[],"x-ebay-signature-key","@method","@path","@authority"],getSignatureParamsValue=e=>getSignatureParams(e).map((e=>`"${e}"`)).join(" "),generateContentDigestValue=(e,t="sha256")=>{const r=Buffer.from("string"==typeof e?e:JSON.stringify(e));return`${"sha512"===t?"sha-512":"sha-256"}=:${function createHash(){throw Error("crypto.createHash is not supported in browser.")}().update(r).digest("base64")}:`};const generateSignatureInput=(e,t=getUnixTimestamp())=>`sig1=(${getSignatureParamsValue(e)});created=${t}`;function generateSignature(e,t,r,n,o=getUnixTimestamp()){const i=function generateBaseString(e,t,r,n=getUnixTimestamp()){try{let o="";return getSignatureParams(r).forEach((r=>{if(o+=`"${r.toLowerCase()}": `,r.startsWith("@"))switch(r.toLowerCase()){case"@method":o+=t.method;break;case"@authority":o+=t.authority;break;case"@path":o+=t.path;break;default:throw new Error("Unknown pseudo header "+r)}else{if(!e[r])throw new Error("Header "+r+" not included in message");o+=e[r]}o+="\n"})),o+=`"@signature-params": (${getSignatureParamsValue(r)});created=${n}`,o}catch(e){throw new EBayError(`Error calculating signature base: ${e.message}`)}}(e,r,n,o);(t=t.trim()).startsWith(Co)||(t=Co+"\n"+t+"\n-----END PRIVATE KEY-----");return`sig1=:${function sign(){throw Error("crypto.sign is not supported in browser.")}(Buffer.from(i)).toString("base64")}:`}class Api extends Base{constructor(e,t,r){super(e,t),this.auth=r||new Auth(this.config,this.req)}getDigitalSignatureHeaders(e,t){if(!this.config.signature)return{};const r=getUnixTimestamp(),n={"x-ebay-enforce-signature":!0,"x-ebay-signature-key":this.config.signature.jwe,...t?{"content-digest":generateContentDigestValue(t,this.config.signature.cipher??"sha256")}:{},"signature-input":generateSignatureInput(t,r)};return{...n,signature:generateSignature(n,this.config.signature.privateKey,e,t,r)}}}const No={"Content-Type":"application/json","Cache-Control":"no-cache",..."undefined"==typeof window?{"Accept-Encoding":"application/gzip"}:{}},Oo={marketplaceId:"X-EBAY-C-MARKETPLACE-ID",endUserCtx:"X-EBAY-C-ENDUSERCTX",acceptLanguage:"Accept-Language",contentLanguage:"Content-Language"};class Restful extends Api{constructor(e,t,r,n={}){super(e,t,r),this.apiConfig={...this.getApiConfig(),...n}}static buildServerUrl(e,t,r,n){return`${e}${t}.${r?"sandbox.":""}${n}`}get useIaf(){return!1}get schema(){return"https://"}get subdomain(){return"api"}get apiVersionPath(){return""}getServerUrl({schema:e,subdomain:t,apiVersion:r,basePath:n,sandbox:o,tld:i}){return Restful.buildServerUrl(e,t,o,i)+r+n}getApiConfig(){return{subdomain:this.subdomain,useIaf:this.useIaf,apiVersion:this.apiVersionPath,basePath:this.basePath,schema:this.schema,sandbox:this.config.sandbox,tld:"ebay.com",headers:{},returnResponse:!1,sign:!1}}get baseUrl(){return this.getServerUrl(this.apiConfig)}api(e){return new this.constructor(this.config,this.req,this.auth,e)}get apix(){return this.api({subdomain:"apix"})}get apiz(){return this.api({subdomain:"apiz"})}get sign(){return this.api({sign:!0})}async get(e,t={},r){return this.doRequest({method:"get",path:e,config:t},r)}async delete(e,t={},r){return this.doRequest({method:"delete",path:e,config:t},r)}async post(e,t,r={},n){return this.doRequest({method:"post",path:e,data:t,config:r},n)}async put(e,t,r={},n){return this.doRequest({method:"put",path:e,data:t,config:r},n)}get additionalHeaders(){return Object.keys(Oo).filter((e=>void 0!==this.config[e])).reduce(((e,t)=>(e[Oo[t]]=this.config[t],e)),{})}async enrichRequestConfig(e,t=null,r=this.apiConfig){const n=await this.auth.getHeaderAuthorization(r.useIaf),o=r.sign?this.getDigitalSignatureHeaders({method:e.method.toUpperCase(),authority:Restful.buildServerUrl("",r.subdomain,r.sandbox,r.tld),path:r.apiVersion+r.basePath+e.path},t):{},i={...No,...this.additionalHeaders,...n,...r.headers,...o};return{...e.config,headers:{...e.config.headers||{},...i}}}async doRequest(e,t){try{return await this.request(e,t)}catch(r){if(this.shouldRefreshToken(r))return await this.request(e,t,!0);throw r}}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayInvalidAccessToken.name||(403===e?.meta?.res?.status&&"/sell/inventory/v1"===this.apiConfig.basePath||401===e?.meta?.res?.status&&"/post-order/v2"===this.apiConfig.basePath))}async request(e,t=this.apiConfig,r=!1){const{path:n,method:o,data:i}=e,s={...this.apiConfig,...t},c=this.getServerUrl(s)+n;try{r&&await this.auth.OAuth2.refreshToken();const t=await this.enrichRequestConfig(e,i,s),n=["get","delete"].includes(o)?[t]:[i,t],u=await this.req[o](c,...n);return this.apiConfig.returnResponse?u:u.data}catch(e){handleEBayError(e)}}}class Browse extends Restful{get basePath(){return"/buy/browse/v1"}search(e){return this.get("/item_summary/search",{params:e})}searchByImage(e,t){return this.post("/item_summary/search_by_image",t,{params:e})}getItems(e){return this.get("/item/",{params:e})}getItem(e,t){const r=encodeURIComponent(e);return this.get(`/item/${r}`,{params:{fieldgroups:t}})}getItemByLegacyId(e){return this.get("/item/get_item_by_legacy_id",{params:e})}getItemsByItemGroup(e){return this.get("/item/get_items_by_item_group",{params:{item_group_id:e}})}checkCompatibility(e,t){const r=encodeURIComponent(e);return this.post(`/item/${r}/check_compatibility`,t)}addItem(e){return this.post("/shopping_cart/add_item",e)}getShoppingCart(){return this.get("/shopping_cart/")}removeItem(e){return this.post("/shopping_cart/remove_item",e)}updateQuantity(e){return this.post("/shopping_cart/update_quantity",e)}}Browse.id="Browse";let bo=class Feed extends Restful{get basePath(){return"/buy/feed/v1_beta"}getItemFeed(e,t){return this.get("/item",{params:e,headers:{Range:t}})}getItemGroupFeed(e,t){return this.get("/item_group",{params:e,headers:{Range:t}})}getItemSnapshotFeed(e,t,r){return this.get("/item_snapshot",{params:{...e,snapshot_date:t},headers:{Range:r}})}getProductFeed(e,t,r){return this.get("/product",{params:{...e,snapshot_date:t},headers:{Range:r}})}};bo.id="Feed";let Po=class Marketing extends Restful{get basePath(){return"/buy/marketing/v1_beta"}getAlsoBoughtByProduct(e){return this.get("/merchandised_product/get_also_bought_products",{params:e})}getAlsoViewedByProduct(e){return this.get("/merchandised_product/get_also_viewed_products",{params:e})}getMerchandisedProducts(e){return this.get("/merchandised_product",{params:e})}};Po.id="Marketing";class Offer extends Restful{get basePath(){return"/buy/offer/v1_beta"}getBidding(e){const t=encodeURIComponent(e);return this.get(`/bidding/${t}`)}placeProxyBid(e,t){const r=encodeURIComponent(e);return this.post(`/bidding/${r}/place_proxy_bid`,t)}}Offer.id="Offer";class Order extends Restful{get basePath(){return"/buy/order/v1"}applyCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/apply_coupon`,t)}getCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/checkout_session/${e}`)}initiateCheckoutSession(e){return this.post("/checkout_session/initiate",e)}placeOrder(e){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/place_order`)}removeCoupon(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/remove_coupon`,t)}updatePaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_payment_info`,t)}updateQuantity(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}checkoutSessionId(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_quantity`,t)}updateShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_address`,t)}updateShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/checkout_session/${e}/update_shipping_option`,t)}applyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/apply_coupon`,t)}getGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/guest_checkout_session/${e}`)}initiateGuestCheckoutSession(e){return this.post("/guest_checkout_session/initiate",e)}initiateGuestPayment(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/initiate_payment`,t)}placeGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/place_order`,t)}removeGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/remove_coupon`,t)}updateGuestPaymentInfo(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_payment_info`,t)}updateGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_quantity`,t)}updateGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_address`,t)}updateGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/guest_checkout_session/${e}/update_shipping_option`,t)}applyProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/apply_coupon`,t)}getProxyGuestCheckoutSession(e){return e=encodeURIComponent(e),this.get(`/proxy_guest_checkout_session/${e}`)}initiateProxyGuestCheckoutSession(e){return this.post("/proxy_guest_checkout_session/initiate",e)}placeProxyGuestOrder(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/place_order`,t)}removeProxyGuestCoupon(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/remove_coupon`,t)}updateProxyGuestPaymentInfo(e,t,r,n,o,i){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_payment_info`,i,{headers:{Authorization:t,"X-EBAY-C-DATE":r,"X-EBAY-C-REQUEST-NONCE":n,"X-EBAY-C-SIGNATURE":o}})}updateProxyGuestQuantity(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_quantity`,t)}updateProxyGuestShippingAddress(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_address`,t)}updateProxyGuestShippingOption(e,t){return e=encodeURIComponent(e),this.post(`/proxy_guest_checkout_session/${e}/update_shipping_option`,t)}getGuestPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/guest_purchase_order/${e}`)}getPurchaseOrder(e){return e=encodeURIComponent(e),this.get(`/purchase_order/${e}`)}}Order.id="Order";class Deal extends Restful{get basePath(){return"/buy/deal/v1"}getDealItems({categoryIds:e,commissionable:t,deliveryCountry:r,limit:n,offset:o}){return this.get("/deal_item",{params:{category_ids:e,commissionable:t,delivery_country:r,limit:n,offset:o}})}getEvent(e){return e=encodeURIComponent(e),this.get(`/event/${e}`)}getEvents({limit:e,offset:t}){return this.get("/event",{params:{limit:e,offset:t}})}getEventItems(e,{categoryIds:t,deliveryCountry:r,limit:n,offset:o}={}){return this.get("/event_item",{params:{event_ids:e,limit:n,offset:o,category_ids:t,delivery_country:r}})}}Deal.id="Deal";class MarketplaceInsights extends Restful{get basePath(){return"/buy/marketplace_insights/v1_beta"}search({aspectFilter:e,categoryIds:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}){return this.get("/item_sales/search",{params:{aspect_filter:e,category_ids:t,epid:r,fieldgroups:n,filter:o,gtin:i,limit:s,offset:c,q:u,sort:l}})}}MarketplaceInsights.id="MarketplaceInsights";class Catalog extends Restful{get basePath(){return"/commerce/catalog/v1_beta"}getChangeRequest(e){return this.get(`/change_request/${e}`)}getChangeRequests({filter:e,limit:t,offset:r}={}){return this.get("/change_request",{params:{filter:e,limit:t,offset:r}})}getProduct(e){const t=encodeURIComponent(e);return this.get(`/product/${t}`)}search(e){return this.get("/product_summary/search",{params:e})}getProductMetadata(e,{otherApplicableCategoryIds:t,primaryCategoryId:r}={}){return this.get("/get_product_metadata",{params:{epid:e,other_applicable_category_ids:t,primary_category_id:r}})}getProductMetadataForCategories(e,t){return this.get("/get_product_metadata_for_categories",{params:{primary_category_id:e,other_applicable_category_ids:t}})}}Catalog.id="Catalog";class Charity extends Restful{get basePath(){return"/commerce/charity/v1"}getCharityOrg(e){return e=encodeURIComponent(e),this.get(`/charity_org/${e}`)}getCharityOrgs({limit:e,offset:t,q:r,registrationIds:n}){return this.get("/charity_org",{params:{limit:e,offset:t,q:r,registration_ids:n}})}getCharityOrgByLegacyId(e){return this.get("/charity_org/get_charity_org_by_legacy_id",{params:{legacy_charity_org_id:e}})}}Charity.id="Charity";class Identity extends Restful{get basePath(){return"/commerce/identity/v1"}get subdomain(){return"apiz"}getUser(){return this.get("/user/")}}Identity.id="Identity";class Media extends Restful{get basePath(){return"/commerce/media/v1_beta"}get subdomain(){return"apim"}async createVideo(e){return this.post("/video",e)}async getVideo(e){return e=encodeURIComponent(e),this.get(`/video/${e}`)}async uploadVideo(e,t){return e=encodeURIComponent(e),this.post(`/video/${e}/upload`,t)}}Media.id="Media";class Notification extends Restful{get basePath(){return"/commerce/notification/v1"}getPublicKey(e){return e=encodeURIComponent(e),this.get(`/public_key/${e}`)}getTopic(e){return e=encodeURIComponent(e),this.get(`/topic/${e}`)}getTopics({limit:e,continuationToken:t}){return this.get("/topic",{params:{limit:e,continuation_token:t}})}getSubscriptions({limit:e,continuationToken:t}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}createSubscription(e){return this.post("/subscription",e)}getSubscription(e){return e=encodeURIComponent(e),this.get(`/subscription/${e}`)}updateSubscription(e,t){return e=encodeURIComponent(e),this.put(`/subscription/${e}`,t)}deleteSubscription(e){return e=encodeURIComponent(e),this.delete(`/subscription/${e}`)}enableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/enable`)}disableSubscription(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/disable`)}test(e){return e=encodeURIComponent(e),this.post(`/subscription/${e}/test`)}getDestinations({limit:e,continuationToken:t}){return this.get("/destination",{params:{limit:e,continuation_token:t}})}createDestination(e){return this.post("/destination",e)}getDestination(e){return e=encodeURIComponent(e),this.get(`/destination/${e}`)}updateDestination(e,t){return e=encodeURIComponent(e),this.put(`/destination/${e}`,t)}deleteDestination(e){return e=encodeURIComponent(e),this.delete(`/destination/${e}`)}getConfig(){return this.get("/config")}updateConfig(e){return this.put("/config",e)}}Notification.id="Notification";class Taxonomy extends Restful{get basePath(){return"/commerce/taxonomy/v1"}getDefaultCategoryTreeId(e){return this.get("/get_default_category_tree_id",{params:{marketplace_id:e}})}getCategoryTree(e){const t=encodeURIComponent(e);return this.get(`/category_tree/${t}`)}getCategorySubtree(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_category_subtree`,{params:{category_id:t}})}getCategorySuggestions(e,t){return this.get(`/category_tree/${e}/get_category_suggestions`,{params:{q:t}})}getItemAspectsForCategory(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_item_aspects_for_category`,{params:{category_id:t}})}getCompatibilityProperties(e,t){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_properties`,{params:{category_id:t}})}getCompatibilityPropertyValues(e,t,r){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/get_compatibility_property_values`,{params:{category_id:t,compatibility_property:r}})}fetchItemAspects(e){return e=encodeURIComponent(e),this.get(`/category_tree/${e}/fetch_item_aspects`,{responseType:"arraybuffer"})}}Taxonomy.id="Taxonomy";class Translation extends Restful{get basePath(){return"/commerce/translation/v1_beta"}translate(e){return this.post("/translate",e)}}Translation.id="Translation";let Uo=class Analytics extends Restful{get basePath(){return"/developer/analytics/v1_beta"}getRateLimits(e,t){return this.get("/rate_limit/",{params:{api_context:e,api_name:t}})}getUserRateLimits(e,t){return this.get("/user_rate_limit/",{params:{api_context:e,api_name:t}})}};Uo.id="Analytics";class KeyManagement extends Restful{get subdomain(){return"apiz"}get basePath(){return"/developer/key_management/v1"}getSigningKeys(){return this.get("/signing_key")}createSigningKey(e){return this.post("/signing_key",{signingKeyCipher:e})}getSigningKey(e){return this.get(`/signing_key/${e}`)}}KeyManagement.id="KeyManagement";class Cancellation extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}approveCancellationRequest(e){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/approve`)}checkCancellationEligibility(e){return this.post("/cancellation/check_eligibility",{legacyOrderId:e})}confirmRefundReceived(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/confirm`,t)}createCancellation(e){return this.post("/cancellation",e)}getCancellation(e,t){return e=encodeURIComponent(e),this.get(`/cancellation/${e}`,{params:{fieldgroups:t}})}rejectCancellationRequest(e,t){return e=encodeURIComponent(e),this.post(`/cancellation/${e}/reject`,t)}search(e){return this.get("/cancellation/search",{params:e})}}Cancellation.id="Cancellation";class Case extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}appealCaseDecision(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/appeal`,t)}closeCase(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/close`,t)}getCase(e){const t=encodeURIComponent(e);return this.get(`/casemanagement/${t}`)}issueCaseRefund(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/issue_refund`,t)}provideReturnShipmentInfo(e,{shippingCarrierName:t,trackingNumber:r}){const n=encodeURIComponent(e);return this.post(`/casemanagement/${n}/provide_shipment_info`,{shippingCarrierName:t,trackingNumber:r})}providesReturnAddress(e,t){const r=encodeURIComponent(e);return this.post(`/casemanagement/${r}/provide_return_address`,t)}search(e){return this.get("/casemanagement/search",{params:e})}}Case.id="Case";class Inquiry extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}checkInquiryEligibility(e){return this.post("/inquiry/check_eligibility",e)}closeInquiry(e,t){return e=encodeURIComponent(e),"string"==typeof t?.closeReason&&(t.closeReason=t.closeReason.trim()),this.post(`/inquiry/${e}/close`,t)}confirmInquiryRefund(e){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/confirm_refund`)}createInquiry(e){return"string"==typeof e.desiredOutcome&&(e.desiredOutcome=e.desiredOutcome.trim()),this.post("/inquiry",e)}escalateInquiry(e,t){return e=encodeURIComponent(e),t.escalateInquiryReason=t.escalateInquiryReason.trim(),this.post(`/inquiry/${e}/escalate`,t)}getInquiry(e){return e=encodeURIComponent(e),this.get(`/inquiry/${e}`)}issueInquiryRefund(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/issue_refund`,t)}provideInquiryRefundInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_refund_info`,t)}provideInquiryShipmentInfo(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/provide_shipment_info`,t)}search(e){return this.get("/inquiry/search",{params:e})}sendInquiryMessage(e,t){return e=encodeURIComponent(e),this.post(`/inquiry/${e}/send_message`,t)}}Inquiry.id="Inquiry";class Return extends Restful{get basePath(){return"/post-order/v2"}get useIaf(){return!0}addShippingLabelInfo(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/add_shipping_label`,t)}cancelReturnRequest(e,t){const r=encodeURIComponent(e);return t&&t.buyerCloseReason&&(t.buyerCloseReason=t.buyerCloseReason.trim()),this.post(`/return/${r}/cancel`,t)}checkReturnEligibility(e){return this.post("/return/check_eligibility",e)}checkShippingLabelEligibility(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/check_label_print_eligibility`)}createReturnDraft(e){return this.post("/return/draft",e)}createReturnRequest(e,t){return this.post("/return",e,{params:{fieldgroups:t}})}createReturnShippingLabel(e){const t=encodeURIComponent(e);return this.post(`/return/${t}/initiate_shipping_label`)}deleteReturnDraftFile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/return/draft/${e}/file/${t}`)}escalateReturn(e,t){const r=encodeURIComponent(e);return this.post(`/return/${r}/escalate`,t)}getReturn(e,t){return e=encodeURIComponent(e),this.get(`/return/${e}`,{params:{fieldgroups:t}})}getReturnDraft(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}`)}getReturnDraftFiles(e){const t=encodeURIComponent(e);return this.get(`/return/draft/${t}/files`)}getReturnEstimate(e){return this.post("/return/estimate",e)}getReturnFiles(e){const t=encodeURIComponent(e);return this.get(`/return/${t}/files`)}getReturnPreferences(){return this.get("/return/preference")}getReturnShippingLabel(e){return e=encodeURIComponent(e),this.get(`/return/${e}/get_shipping_label`)}getShipmentTrackingInfo(e,t,r){return e=encodeURIComponent(e),this.get(`/return/${e}/tracking`,{params:{carrier_used:t,tracking_number:r}})}issueReturnRefund(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/issue_refund`,t)}markReturnReceived(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_received`,t)}markReturnRefundReceived(e){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_received`)}markReturnRefundSent(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_refund_sent`,t)}markReturnShipped(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/mark_as_shipped`,t)}processReturnRequest(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/decide`,t)}search(e){return this.get("/return/search",{params:e})}sendReturnMessage(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_message`,t)}sendReturnShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/send_shipping_label`,{},{params:{to_email_address:t}})}setReturnPreferences(e){return this.post("/return/preference",{rmaRequired:e})}submitReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/submit`,{filePurpose:t})}updateReturnDraft(e,t){return e=encodeURIComponent(e),this.put(`/return/draft/${e}`,{returnRequest:t})}updateShipmentTrackingInfo(e,t){return e=encodeURIComponent(e),this.put(`/return/${e}/update_tracking`,t)}uploadReturnDraftFile(e,t){return e=encodeURIComponent(e),this.post(`/return/draft/${e}/file/upload`,t)}uploadReturnFile(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/file/upload`,t)}voidShippingLabel(e,t){return e=encodeURIComponent(e),this.post(`/return/${e}/void_shipping_label`,t)}}Return.id="Return";class AccountV1 extends Restful{get basePath(){return"/sell/account/v1"}getCustomPolicies(e){return this.get("/custom_policy/",{params:{policy_types:e}})}createCustomPolicy(e){return this.post("/custom_policy/",e)}getCustomPolicy(e){return e=encodeURIComponent(e),this.get(`/custom_policy/${e}`)}updateCustomPolicy(e,t){return e=encodeURIComponent(e),this.put(`/custom_policy/${e}`,t)}getFulfillmentPolicies(e){return this.get("/fulfillment_policy",{params:{marketplace_id:e}})}createFulfillmentPolicy(e){return this.post("/fulfillment_policy/",e)}updateFulfillmentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/fulfillment_policy/${e}`,t)}deleteFulfillmentPolicy(e){return e=encodeURIComponent(e),this.delete(`/fulfillment_policy/${e}`)}getFulfillmentPolicy(e){return this.get(`/fulfillment_policy/${e}`)}getFulfillmentPolicyByName(e,t){return this.get("/fulfillment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentPolicies(e){return this.get("/payment_policy",{params:{marketplace_id:e}})}getPaymentPolicy(e){return e=encodeURIComponent(e),this.get(`/payment_policy/${e}`)}createPaymentPolicy(e){return this.post("/payment_policy",e)}updatePaymentPolicy(e,t){return e=encodeURIComponent(e),this.put(`/payment_policy/${e}`,t)}deletePaymentPolicy(e){return e=encodeURIComponent(e),this.delete(`/payment_policy/${e}`)}getPaymentPolicyByName(e,t){return this.get("/payment_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getPaymentsProgram(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}`)}getPaymentsProgramOnboarding(e,t){e=encodeURIComponent(e);const r=encodeURIComponent(t);return this.get(`/payments_program/${e}/${r}/onboarding`)}getPrivileges(){return this.get("/privilege")}getOptedInPrograms(){return this.get("/program/get_opted_in_programs")}optInToProgram(e){return this.post("/program/opt_in",e)}optOutOfProgram(e){return this.post("/program/opt_out",e)}getRateTables(e){return this.get("/rate_table",{params:{country_code:e}})}getReturnPolicies(e){return this.get("/return_policy",{params:{marketplace_id:e}})}getReturnPolicy(e){return e=encodeURIComponent(e),this.get(`/return_policy/${e}`)}createReturnPolicy(e){return this.post("/return_policy",e)}updateReturnPolicy(e,t){return e=encodeURIComponent(e),this.put(`/return_policy/${e}`,t)}deleteReturnPolicy(e){return e=encodeURIComponent(e),this.delete(`/return_policy/${e}`)}getReturnPolicyByName(e,t){return this.get("/return_policy/get_by_policy_name",{params:{marketplace_id:e,name:t}})}getSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/sales_tax/${e}/${t}`)}createOrReplaceSalesTax(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/sales_tax/${e}/${t}`,r)}deleteSalesTax(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/sales_tax/${e}/${t}`)}getSalesTaxes(e){return this.get("/sales_tax",{params:{country_code:e}})}getSubscription({limit:e,continuationToken:t}={}){return this.get("/subscription",{params:{limit:e,continuation_token:t}})}getKYC(){return this.get("/kyc")}getAdvertisingEligibility(e){return this.get("/advertising_eligibility",{params:{program_types:e}})}getInventoryLocation(e){return e=encodeURIComponent(e),this.get(`/location/${e}`)}createInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}`,t)}deleteInventoryLocation(e){return e=encodeURIComponent(e),this.delete(`/location/${e}`)}disableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/disable`)}enableInventoryLocation(e){return e=encodeURIComponent(e),this.post(`/location/${e}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}updateInventoryLocation(e,t){return e=encodeURIComponent(e),this.post(`/location/${e}/update_location_details`,t)}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}}AccountV1.id="AccountV1";class AccountV2 extends Restful{get basePath(){return"/sell/account/v2"}getRateTable(e){return e=encodeURIComponent(e),this.get(`/rate_table/${e}`)}updateShippingCost(e,t){return e=encodeURIComponent(e),this.post(`/rate_table/${e}/update_shipping_cost`,t)}getPayoutSettings(){return this.get("/payout_settings")}updatePayoutPercentage(e){return this.post("/payout_settings/update_percentage",e)}}AccountV2.id="AccountV2";class Analytics extends Restful{get basePath(){return"/sell/analytics/v1"}findSellerStandardsProfiles(){return this.get("/seller_standards_profile")}getSellerStandardsProfile(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/seller_standards_profile/${e}/${t}`)}getTrafficReport({dimension:e,filter:t,metric:r,sort:n}={}){return this.get("/traffic_report",{params:{dimension:e,filter:t,metric:r,sort:n}})}getCustomerServiceMetric(e,t){return this.get(`/customer_service_metric/${e}/${t}`)}}Analytics.id="Analytics";class Compliance extends Restful{get basePath(){return"/sell/compliance/v1"}getListingViolationsSummary(e){return this.get("/listing_violation_summary",{params:{compliance_type:e}})}getListingViolations({complianceType:e,offset:t,listingId:r,limit:n}={}){return this.get("/listing_violation",{params:{compliance_type:e,offset:t,listing_id:r,limit:n}})}suppressViolation(e){return this.post("/suppress_listing_violation",e)}}Compliance.id="Compliance";class Finances extends Restful{get basePath(){return"/sell/finances/v1"}get subdomain(){return"apiz"}getPayout(e){return e=encodeURIComponent(e),this.get(`/payout/${e}`)}getPayouts({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/payout",{params:{filter:e,limit:t,offset:r,sort:n}})}getPayoutSummary({filter:e}={}){return this.get("/payout_summary",{params:{filter:e}})}getTransactions({filter:e,limit:t,offset:r,sort:n}={}){return this.get("/transaction",{params:{filter:e,limit:t,offset:r,sort:n}})}getTransactionSummary({filter:e}={}){return this.get("/transaction_summary",{params:{filter:e}})}getTransfer(e){return e=encodeURIComponent(e),this.get(`/transfer/${e}`)}getSellerFundsSummary(){return this.get("/seller_funds_summary")}}Finances.id="Finances";class Fulfillment extends Restful{get basePath(){return"/sell/fulfillment/v1"}getOrder(e,{fieldGroups:t}={}){return this.get(`/order/${e}`,{params:{fieldGroups:t}})}getOrders({filter:e,limit:t,offset:r,orderIds:n,fieldGroups:o}={}){return this.get("/order",{params:{filter:e,limit:t,offset:r,orderIds:Array.isArray(n)?n.join():n,fieldGroups:o}})}issueRefund(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/issue_refund`,t)}getShippingFulfillments(e){return e=encodeURIComponent(e),this.get(`/order/${e}/shipping_fulfillment`)}createShippingFulfillment(e,t){return e=encodeURIComponent(e),this.post(`/order/${e}/shipping_fulfillment`,t)}getShippingFulfillment(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/order/${e}/shipping_fulfillment/${t}`)}getPaymentDispute(e){return this.get(`/payment_dispute/${e}`)}fetchEvidenceContent(e){return this.get(`/payment_dispute/${e}/fetch_evidence_content`)}getActivities(e){return this.get(`/payment_dispute/${e}/activity`)}getPaymentDisputeSummaries({orderId:e,buyerUsername:t,openDateFrom:r,openDateTo:n,paymentDisputeStatus:o,limit:i,offset:s}){return this.get("/payment_dispute_summary",{params:{order_id:e,buyer_username:t,open_date_from:r,open_date_to:n,payment_dispute_status:o,limit:i,offset:s}})}contestPaymentDispute(e,t){return this.post(`/payment_dispute/${e}/contest`,t)}acceptPaymentDispute(e){return this.post(`/payment_dispute/${e}/accept`)}uploadEvidenceFile(e,t){return this.post(`/payment_dispute/${e}/upload_evidence_file`,t,{headers:{...Fn}})}addEvidence(e,t){return this.post(`/payment_dispute/${e}/add_evidence`,t)}updateEvidence(e,t){return this.post(`/payment_dispute/${e}/update_evidence`,t)}}Fulfillment.id="Fulfillment";class Inventory extends Restful{get basePath(){return"/sell/inventory/v1"}getInventoryLocation(e){const t=encodeURIComponent(e);return this.get(`/location/${t}`)}disableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/disable`)}enableInventoryLocation(e){const t=encodeURIComponent(e);return this.post(`/location/${t}/enable`)}getInventoryLocations({limit:e,offset:t}={}){return this.get("/location",{params:{limit:e,offset:t}})}createInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}`,t)}deleteInventoryLocation(e){const t=encodeURIComponent(e);return this.delete(`/location/${t}`)}updateInventoryLocation(e,t){const r=encodeURIComponent(e);return this.post(`/location/${r}/update_location_details`,t)}getInventoryItem(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}`)}createOrReplaceInventoryItem(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}`,t)}deleteInventoryItem(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}`)}getInventoryItems({limit:e,offset:t}={}){return this.get("/inventory_item",{params:{limit:e,offset:t}})}bulkUpdatePriceQuantity(e){return this.post("/bulk_update_price_quantity",e)}bulkCreateOrReplaceInventoryItem(e){return this.post("/bulk_create_or_replace_inventory_item",e)}bulkGetInventoryItem(e){return this.post("/bulk_get_inventory_item",e)}getProductCompatibility(e){return e=encodeURIComponent(e),this.get(`/inventory_item/${e}/product_compatibility`)}createOrReplaceProductCompatibility(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item/${e}/product_compatibility`,t)}deleteProductCompatibility(e){return e=encodeURIComponent(e),this.delete(`/inventory_item/${e}/product_compatibility`)}getOffers({sku:e,marketplaceId:t,format:r,limit:n,offset:o}={}){return this.get("/offer",{params:{sku:e,marketplace_id:t,format:r,limit:n,offset:o}})}getOffer(e){return e=encodeURIComponent(e),this.get(`/offer/${e}`)}createOffer(e){return this.post("/offer",e)}updateOffer(e,t){return e=encodeURIComponent(e),this.put(`/offer/${e}`,t)}deleteOffer(e){return this.delete(`/offer/${e}`)}publishOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/publish`)}publishOfferByInventoryItemGroup(e){return this.post("/offer/publish_by_inventory_item_group",e)}withdrawOfferByInventoryItemGroup(e){return this.post("/offer/withdraw_by_inventory_item_group",e)}getListingFees(e){return this.post("/offer/get_listing_fees",e)}bulkCreateOffer(e){return this.post("/bulk_create_offer",e)}bulkPublishOffer(e){return this.post("/bulk_publish_offer",e)}withdrawOffer(e){const t=encodeURIComponent(e);return this.post(`/offer/${t}/withdraw`)}getInventoryItemGroup(e){return e=encodeURIComponent(e),this.get(`/inventory_item_group/${e}`)}createOrReplaceInventoryItemGroup(e,t){return e=encodeURIComponent(e),this.put(`/inventory_item_group/${e}`,t)}deleteInventoryItemGroup(e){return this.delete(`/inventory_item_group/${e}`)}bulkMigrateListing(e){return this.post("/bulk_migrate_listing",e)}getSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/listing/${e}/sku/${t}/locations`)}createOrReplaceSkuLocationMapping(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/listing/${e}/sku/${t}/locations`,r)}deleteSkuLocationMapping(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.delete(`/listing/${e}/sku/${t}/locations`)}}Inventory.id="Inventory";class Marketing extends Restful{get basePath(){return"/sell/marketing/v1"}bulkCreateAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_inventory_reference`,t)}bulkCreateAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_ads_by_listing_id`,t)}bulkDeleteAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_inventory_reference`,t)}bulkDeleteAdsByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_delete_ads_by_listing_id`,t)}bulkUpdateAdsBidByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_inventory_reference`,t)}bulkUpdateAdsBidByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_bid_by_listing_id`,t)}bulkUpdateAdsStatus(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status`,t)}bulkUpdateAdsStatusByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_ads_status_by_listing_id`,t)}launchCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/launch`)}setupQuickCampaign(e){return this.post("/ad_campaign/setup_quick_campaign",e)}getAds(e,{limit:t,listingIds:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad`,{params:{limit:t,listing_ids:r,offset:n}})}createAdByListingId(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad`,t)}createAdsByInventoryReference(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/create_ads_by_inventory_reference`,t)}getAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/ad/${t}`)}deleteAd(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.delete(`/ad_campaign/${e}/ad/${t}`)}deleteAdsByInventoryReference(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/delete_ads_by_inventory_reference`)}getAdsByInventoryReference(e,t,r){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/get_ads_by_inventory_reference`,{params:{inventory_reference_id:t,inventory_reference_type:r}})}updateBid(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.post(`/ad_campaign/${e}/ad/${t}/update_bid`,r)}getAdGroups(e,{adGroupStatus:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group`,{params:{ad_group_status:t,limit:r,offset:n}})}createAdGroup(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group`,t)}getAdGroup(e,t){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/ad_group/${t}`)}updateAdGroup(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.put(`/ad_campaign/${e}/ad_group/${t}`,r)}suggestBids(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_bids`,r)}suggestKeywords(e,t,r){return t=encodeURIComponent(t),e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/ad_group/${t}/suggest_keywords`,r)}cloneCampaign(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/clone`,t)}getCampaigns({campaignName:e,campaignStatus:t,endDateRange:r,limit:n,offset:o,startDateRange:i}={}){return this.get("/ad_campaign",{params:{campaign_name:e,campaign_status:t,end_date_range:r,limit:n,offset:o,start_date_range:i}})}getCampaign(e){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}`)}createCampaign(e){return this.post("/ad_campaign",e)}deleteCampaign(e){return e=encodeURIComponent(e),this.delete(`/ad_campaign/${e}`)}endCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/end`)}findCampaignByAdReference({inventoryReferenceId:e,inventoryReferenceType:t,listingId:r}={}){return this.get("/ad_campaign/find_campaign_by_ad_reference",{params:{inventory_reference_id:e,inventory_reference_type:t,listing_id:r}})}getCampaignByName(e){return this.get("/ad_campaign/get_campaign_by_name",{params:{campaign_name:e}})}pauseCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/pause`)}resumeCampaign(e){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/resume`)}suggestItems(e,{categoryIds:t,limit:r,offset:n}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/suggest_items`,{params:{category_ids:t,limit:r,offset:n}})}updateAdRateStrategy(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_ad_rate_strategy`,t)}updateCampaignBudget(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_budget`,t)}updateCampaignIdentification(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/update_campaign_identification`,t)}bulkCreateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_create_keyword`,t)}bulkUpdateKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/bulk_update_keyword`,t)}getKeywords(e,{adGroupIds:t,keywordStatus:r,limit:n,offset:o}={}){return e=encodeURIComponent(e),this.get(`/ad_campaign/${e}/keyword`,{params:{ad_group_ids:t,keyword_status:r,limit:n,offset:o}})}createKeyword(e,t){return e=encodeURIComponent(e),this.post(`/ad_campaign/${e}/keyword`,t)}getKeyword(e,t){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.get(`/ad_campaign/${e}/keyword/${t}`)}updateKeyword(e,t,r){return e=encodeURIComponent(e),t=encodeURIComponent(t),this.put(`/ad_campaign/${e}/keyword/${t}`,r)}bulkCreateNegativeKeyword(e){return this.post("/bulk_create_negative_keyword",e)}bulkUpdateNegativeKeyword(e){return this.post("/bulk_update_negative_keyword",e)}getNegativeKeywords({adGroupIds:e,campaignIds:t,limit:r,negativeKeywordStatus:n,offset:o}={}){return this.get("/negative_keyword",{params:{ad_group_ids:e,campaign_ids:t,limit:r,negative_keyword_status:n,offset:o}})}createNegativeKeyword(e){return this.post("/negative_keyword",e)}getNegativeKeyword(e){return e=encodeURIComponent(e),this.get(`/negative_keyword/${e}`)}updateNegativeKeyword(e,t){return e=encodeURIComponent(e),this.put(`/negative_keyword/${e}`,t)}getReport(e){return e=encodeURIComponent(e),this.get(`/ad_report/${e}`)}getReportMetadata(){return this.get("/ad_report_metadata")}getReportMetadataForReportType(e){return e=encodeURIComponent(e),this.get(`/ad_report_metadata/${e}`)}getReportTasks({limit:e,offset:t,reportTaskStatuses:r}={}){return this.get("/ad_report_task",{params:{limit:e,offset:t,report_task_statuses:r}})}getReportTask(e){return e=encodeURIComponent(e),this.get(`/ad_report_task/${e}`)}createReportTask(e){return this.post("/ad_report_task",e)}deleteReportTask(e){return e=encodeURIComponent(e),this.delete(`/ad_report_task/${e}`)}createItemPriceMarkdownPromotion(e){return this.post("/item_price_markdown",e)}updateItemPriceMarkdownPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_price_markdown/${e}`,t)}deleteItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_price_markdown/${e}`)}getItemPriceMarkdownPromotion(e){return e=encodeURIComponent(e),this.get(`/item_price_markdown/${e}`)}createItemPromotion(e){return this.post("/item_promotion",e)}updateItemPromotion(e,t){return e=encodeURIComponent(e),this.put(`/item_promotion/${e}`,t)}deleteItemPromotion(e){return e=encodeURIComponent(e),this.delete(`/item_promotion/${e}`)}getItemPromotion(e){return e=encodeURIComponent(e),this.get(`/item_promotion/${e}`)}getListingSet(e,{limit:t,offset:r,q:n,sort:o,status:i}={}){return e=encodeURIComponent(e),this.get(`/promotion/${e}/get_listing_set`,{params:{limit:t,offset:r,q:n,sort:o,status:i}})}getPromotions(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i,sort:s}={}){return this.get("/promotion",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i,sort:s}})}pausePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/pause`)}resumePromotion(e){const t=encodeURIComponent(e);return this.post(`/promotion/${t}/resume`)}getPromotionReports(e,{limit:t,offset:r,promotionStatus:n,promotionType:o,q:i}={}){return this.get("/promotion_report",{params:{marketplace_id:e,limit:t,offset:r,promotion_status:n,promotion_type:o,q:i}})}getPromotionSummaryReport(e){return this.get("/promotion_summary_report",{params:{marketplace_id:e}})}getEmailCampaign(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}`)}getEmailCampaigns({limit:e,q:t,offset:r,sort:n}={}){return this.get("/email_campaign",{params:{limit:e,offset:r,q:t,sort:n}})}createEmailCampaign(e){return this.post("/email_campaign",e)}updateEmailCampaign(e,t){return e=encodeURIComponent(e),this.put(`/email_campaign/${e}`,t)}deleteEmailCampaign(e){return e=encodeURIComponent(e),this.delete(`/email_campaign/${e}`)}getEmailPreview(e){return e=encodeURIComponent(e),this.get(`/email_campaign/${e}/email_preview`)}getAudiences(){return this.get("/email_campaign/audience")}getEmailReport(e,t){return this.get("/email_campaign/report",{params:{startDate:e,endDate:t}})}}Marketing.id="Marketing";class Metadata extends Restful{get basePath(){return"/sell/metadata/v1"}getSalesTaxJurisdictions(e){return e=encodeURIComponent(e),this.get(`/country/${e}/sales_tax_jurisdiction`)}getAutomotivePartsCompatibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_automotive_parts_compatibility_policies`,{params:{filter:t}})}getExtendedProducerResponsibilityPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_extended_producer_responsibility_policies`,{params:{filter:t}})}getItemConditionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_item_condition_policies`,{params:{filter:t}})}getListingStructurePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_listing_structure_policies`,{params:{filter:t}})}getNegotiatedPricePolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_negotiated_price_policies`,{params:{filter:t}})}getProductAdoptionPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_product_adoption_policies`,{params:{filter:t}})}getReturnPolicies(e,t){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_return_policies`,{params:{filter:t}})}getHazardousMaterialsLabels(e){return e=encodeURIComponent(e),this.get(`/marketplace/${e}/get_hazardous_materials_labels`)}}Metadata.id="Metadata";class Recommendation extends Restful{get basePath(){return"/sell/recommendation/v1"}findListingRecommendations({filter:e,limit:t,offset:r}={},n){return this.post("/find",{data:n,params:{filter:e,limit:t,offset:r}})}}Recommendation.id="Recommendation";class Feed extends Restful{get basePath(){return"/sell/feed/v1"}getOrderTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/order_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createOrderTask(e){return this.post("/order_task",e)}getOrderTask(e){return e=encodeURIComponent(e),this.get(`/order_task/${e}`)}getInventoryTasks({feedType:e,scheduleId:t,lookBackDays:r,dateRange:n,limit:o,offset:i}={}){return this.get("/inventory_task",{params:{feed_type:e,schedule_id:t,look_back_days:r,date_range:n,limit:o,offset:i}})}createInventoryTask(e){return this.post("/inventory_task",e)}getInventoryTask(e){return e=encodeURIComponent(e),this.get(`/inventory_task/${e}`)}getSchedules({feedType:e,limit:t,offset:r}={}){return this.get("/schedule",{params:{feed_type:e,limit:t,offset:r}})}createSchedule(e){return this.post("/schedule",e)}getSchedule(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}`)}updateSchedule(e,t){return e=encodeURIComponent(e),this.put(`/schedule/${e}`,t)}deleteSchedule(e){return e=encodeURIComponent(e),this.delete(`/schedule/${e}`)}getLatestResultFile(e){return e=encodeURIComponent(e),this.get(`/schedule/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getScheduleTemplate(e){return e=encodeURIComponent(e),this.get(`/schedule_template/${e}`)}getScheduleTemplates({feedType:e,limit:t,offset:r}={}){return this.get("/schedule_template",{params:{feed_type:e,limit:t,offset:r}})}getTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o,scheduleId:i}={}){return this.get("/task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o,schedule_id:i}})}createTask(e){return this.post("/task",e)}getInputFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_input_file`)}getResultFile(e){return e=encodeURIComponent(e),this.get(`/task/${e}/download_result_file`,{responseType:"arraybuffer",responseEncoding:"binary"})}getTask(e){return e=encodeURIComponent(e),this.get(`/task/${e}`)}uploadFile(e,t){return e=encodeURIComponent(e),this.post(`/task/${e}/upload_file`,t,{headers:Fn})}getCustomerServiceMetricTasks({dateRange:e,feedType:t,limit:r,lookBackDays:n,offset:o}={}){return this.get("/customer_service_metric_task",{params:{date_range:e,feed_type:t,limit:r,look_back_days:n,offset:o}})}createCustomerServiceMetricTask(e,t){return this.post("/customer_service_metric_task",t,{headers:{"accept-language":e}})}getCustomerServiceMetricTask(e){return e=encodeURIComponent(e),this.get(`/customer_service_metric_task/${e}`)}}Feed.id="Feed";class Logistics extends Restful{get basePath(){return"/sell/logistics/v1_beta"}createShippingQuote(e){return this.post("/shipping_quote",e)}getShippingQuote(e){return e=encodeURIComponent(e),this.get(`/shipping_quote/${e}`)}createFromShippingQuote(e){return this.post("/shipment/create_from_shipping_quote",e)}getShipment(e){return this.get(`/shipment/${e}`)}downloadLabelFile(e){return this.get(`/shipment/${e}/download_label_file`)}cancelShipment(e){return this.post(`/shipment/${e}/cancel`)}}Logistics.id="Logistics";class Negotiation extends Restful{get basePath(){return"/sell/negotiation/v1"}findEligibleItems({limit:e,offset:t}={}){return this.get("/find_eligible_items",{params:{limit:e,offset:t}})}sendOfferToInterestedBuyers(e){return this.post("/send_offer_to_interested_buyers",e)}}Negotiation.id="Negotiation";class Listing extends Restful{get basePath(){return"/sell/listing/v1_beta"}createItemDraft(e){return this.post("/item_draft/",e)}}var Lo,Do;Listing.id="Listing",function(e){e.AskSellerQuestion="AskSellerQuestion",e.BestOffer="BestOffer",e.BestOfferDeclined="BestOfferDeclined",e.BestOfferPlaced="BestOfferPlaced",e.BidPlaced="BidPlaced",e.BidReceived="BidReceived",e.CounterOfferReceived="CounterOfferReceived",e.CustomCode="CustomCode",e.EndOfAuction="EndOfAuction",e.FeedbackLeft="FeedbackLeft",e.FeedbackReceived="FeedbackReceived",e.FeedbackStarChanged="FeedbackStarChanged",e.FixedPriceEndOfTransaction="FixedPriceEndOfTransaction",e.FixedPriceTransaction="FixedPriceTransaction",e.ItemAddedToWatchList="ItemAddedToWatchList",e.ItemEnded="ItemEnded",e.ItemListed="ItemListed",e.ItemLost="ItemLost",e.ItemMarkedPaid="ItemMarkedPaid",e.ItemMarkedShipped="ItemMarkedShipped",e.ItemRemovedFromWatchList="ItemRemovedFromWatchList",e.ItemSold="ItemSold",e.ItemUnsold="ItemUnsold",e.ItemWon="ItemWon",e.OutBid="OutBid",e.PriceChange="PriceChange",e.SecondChanceOffer="SecondChanceOffer",e.WatchedItemEndingSoon="WatchedItemEndingSoon"}(Lo||(Lo={})),function(e){e[e.GetPublicAlerts=0]="GetPublicAlerts",e[e.GetUserAlerts=1]="GetUserAlerts",e[e.Login=2]="Login",e[e.Logout=3]="Logout"}(Do||(Do={}));var Bo,Mo=Do;!function(e){e[e.findCompletedItems=0]="findCompletedItems",e[e.findItemsAdvanced=1]="findItemsAdvanced",e[e.findItemsByCategory=2]="findItemsByCategory",e[e.findItemsByKeywords=3]="findItemsByKeywords",e[e.findItemsByProduct=4]="findItemsByProduct",e[e.findItemsIneBayStores=5]="findItemsIneBayStores",e[e.getHistograms=6]="getHistograms",e[e.getSearchKeywordsRecommendation=7]="getSearchKeywordsRecommendation",e[e.getVersion=8]="getVersion"}(Bo||(Bo={}));var vo,Fo=Bo;!function(e){e[e.getMostWatchedItems=0]="getMostWatchedItems",e[e.getRelatedCategoryItems=1]="getRelatedCategoryItems",e[e.getSimilarItems=2]="getSimilarItems",e[e.getVersion=3]="getVersion"}(vo||(vo={}));var xo,wo=vo;!function(e){e[e.FindProducts=0]="FindProducts",e[e.GetCategoryInfo=1]="GetCategoryInfo",e[e.GeteBayTime=2]="GeteBayTime",e[e.GetItemStatus=3]="GetItemStatus",e[e.GetMultipleItems=4]="GetMultipleItems",e[e.GetShippingCosts=5]="GetShippingCosts",e[e.GetSingleItem=6]="GetSingleItem",e[e.GetUserProfile=7]="GetUserProfile"}(xo||(xo={}));var ko,Go=xo;!function(e){e[e.AddDispute=0]="AddDispute",e[e.AddDisputeResponse=1]="AddDisputeResponse",e[e.AddFixedPriceItem=2]="AddFixedPriceItem",e[e.AddItem=3]="AddItem",e[e.AddItemFromSellingManagerTemplate=4]="AddItemFromSellingManagerTemplate",e[e.AddItems=5]="AddItems",e[e.AddMemberMessageAAQToPartner=6]="AddMemberMessageAAQToPartner",e[e.AddMemberMessageRTQ=7]="AddMemberMessageRTQ",e[e.AddMemberMessagesAAQToBidder=8]="AddMemberMessagesAAQToBidder",e[e.AddOrder=9]="AddOrder",e[e.AddSecondChanceItem=10]="AddSecondChanceItem",e[e.AddSellingManagerInventoryFolder=11]="AddSellingManagerInventoryFolder",e[e.AddSellingManagerProduct=12]="AddSellingManagerProduct",e[e.AddSellingManagerTemplate=13]="AddSellingManagerTemplate",e[e.AddToItemDescription=14]="AddToItemDescription",e[e.AddToWatchList=15]="AddToWatchList",e[e.AddTransactionConfirmationItem=16]="AddTransactionConfirmationItem",e[e.CompleteSale=17]="CompleteSale",e[e.ConfirmIdentity=18]="ConfirmIdentity",e[e.DeleteMyMessages=19]="DeleteMyMessages",e[e.DeleteSellingManagerInventoryFolder=20]="DeleteSellingManagerInventoryFolder",e[e.DeleteSellingManagerItemAutomationRule=21]="DeleteSellingManagerItemAutomationRule",e[e.DeleteSellingManagerProduct=22]="DeleteSellingManagerProduct",e[e.DeleteSellingManagerTemplate=23]="DeleteSellingManagerTemplate",e[e.DeleteSellingManagerTemplateAutomationRule=24]="DeleteSellingManagerTemplateAutomationRule",e[e.DisableUnpaidItemAssistance=25]="DisableUnpaidItemAssistance",e[e.EndFixedPriceItem=26]="EndFixedPriceItem",e[e.EndItem=27]="EndItem",e[e.EndItems=28]="EndItems",e[e.ExtendSiteHostedPictures=29]="ExtendSiteHostedPictures",e[e.FetchToken=30]="FetchToken",e[e.GetAccount=31]="GetAccount",e[e.GetAdFormatLeads=32]="GetAdFormatLeads",e[e.GetAllBidders=33]="GetAllBidders",e[e.GetApiAccessRules=34]="GetApiAccessRules",e[e.GetBestOffers=35]="GetBestOffers",e[e.GetBidderList=36]="GetBidderList",e[e.GetCategories=37]="GetCategories",e[e.GetCategoryFeatures=38]="GetCategoryFeatures",e[e.GetCategoryMappings=39]="GetCategoryMappings",e[e.GetCategorySpecifics=40]="GetCategorySpecifics",e[e.GetChallengeToken=41]="GetChallengeToken",e[e.GetCharities=42]="GetCharities",e[e.GetClientAlertsAuthToken=43]="GetClientAlertsAuthToken",e[e.GetContextualKeywords=44]="GetContextualKeywords",e[e.GetDescriptionTemplates=45]="GetDescriptionTemplates",e[e.GetDispute=46]="GetDispute",e[e.GeteBayDetails=47]="GeteBayDetails",e[e.GeteBayOfficialTime=48]="GeteBayOfficialTime",e[e.GetFeedback=49]="GetFeedback",e[e.GetItem=50]="GetItem",e[e.GetItemsAwaitingFeedback=51]="GetItemsAwaitingFeedback",e[e.GetItemShipping=52]="GetItemShipping",e[e.GetItemTransactions=53]="GetItemTransactions",e[e.GetMemberMessages=54]="GetMemberMessages",e[e.GetMessagePreferences=55]="GetMessagePreferences",e[e.GetMyeBayBuying=56]="GetMyeBayBuying",e[e.GetMyeBayReminders=57]="GetMyeBayReminders",e[e.GetMyeBaySelling=58]="GetMyeBaySelling",e[e.GetMyMessages=59]="GetMyMessages",e[e.GetNotificationPreferences=60]="GetNotificationPreferences",e[e.GetNotificationsUsage=61]="GetNotificationsUsage",e[e.GetOrders=62]="GetOrders",e[e.GetOrderTransactions=63]="GetOrderTransactions",e[e.GetPromotionalSaleDetails=64]="GetPromotionalSaleDetails",e[e.GetSellerDashboard=65]="GetSellerDashboard",e[e.GetSellerEvents=66]="GetSellerEvents",e[e.GetSellerList=67]="GetSellerList",e[e.GetSellerTransactions=68]="GetSellerTransactions",e[e.GetSellingManagerAlerts=69]="GetSellingManagerAlerts",e[e.GetSellingManagerEmailLog=70]="GetSellingManagerEmailLog",e[e.GetSellingManagerInventory=71]="GetSellingManagerInventory",e[e.GetSellingManagerInventoryFolder=72]="GetSellingManagerInventoryFolder",e[e.GetSellingManagerItemAutomationRule=73]="GetSellingManagerItemAutomationRule",e[e.GetSellingManagerSaleRecord=74]="GetSellingManagerSaleRecord",e[e.GetSellingManagerSoldListings=75]="GetSellingManagerSoldListings",e[e.GetSellingManagerTemplateAutomationRule=76]="GetSellingManagerTemplateAutomationRule",e[e.GetSellingManagerTemplates=77]="GetSellingManagerTemplates",e[e.GetSessionID=78]="GetSessionID",e[e.GetShippingDiscountProfiles=79]="GetShippingDiscountProfiles",e[e.GetStore=80]="GetStore",e[e.GetStoreCategoryUpdateStatus=81]="GetStoreCategoryUpdateStatus",e[e.GetStoreCustomPage=82]="GetStoreCustomPage",e[e.GetStoreOptions=83]="GetStoreOptions",e[e.GetStorePreferences=84]="GetStorePreferences",e[e.GetSuggestedCategories=85]="GetSuggestedCategories",e[e.GetTaxTable=86]="GetTaxTable",e[e.GetTokenStatus=87]="GetTokenStatus",e[e.GetUser=88]="GetUser",e[e.GetUserContactDetails=89]="GetUserContactDetails",e[e.GetUserDisputes=90]="GetUserDisputes",e[e.GetUserPreferences=91]="GetUserPreferences",e[e.GetVeROReasonCodeDetails=92]="GetVeROReasonCodeDetails",e[e.GetVeROReportStatus=93]="GetVeROReportStatus",e[e.LeaveFeedback=94]="LeaveFeedback",e[e.MoveSellingManagerInventoryFolder=95]="MoveSellingManagerInventoryFolder",e[e.PlaceOffer=96]="PlaceOffer",e[e.RelistFixedPriceItem=97]="RelistFixedPriceItem",e[e.RelistItem=98]="RelistItem",e[e.RemoveFromWatchList=99]="RemoveFromWatchList",e[e.RespondToBestOffer=100]="RespondToBestOffer",e[e.RespondToFeedback=101]="RespondToFeedback",e[e.ReviseCheckoutStatus=102]="ReviseCheckoutStatus",e[e.ReviseFixedPriceItem=103]="ReviseFixedPriceItem",e[e.ReviseInventoryStatus=104]="ReviseInventoryStatus",e[e.ReviseItem=105]="ReviseItem",e[e.ReviseMyMessages=106]="ReviseMyMessages",e[e.ReviseMyMessagesFolders=107]="ReviseMyMessagesFolders",e[e.ReviseSellingManagerInventoryFolder=108]="ReviseSellingManagerInventoryFolder",e[e.ReviseSellingManagerProduct=109]="ReviseSellingManagerProduct",e[e.ReviseSellingManagerSaleRecord=110]="ReviseSellingManagerSaleRecord",e[e.ReviseSellingManagerTemplate=111]="ReviseSellingManagerTemplate",e[e.RevokeToken=112]="RevokeToken",e[e.SaveItemToSellingManagerTemplate=113]="SaveItemToSellingManagerTemplate",e[e.SellerReverseDispute=114]="SellerReverseDispute",e[e.SendInvoice=115]="SendInvoice",e[e.SetMessagePreferences=116]="SetMessagePreferences",e[e.SetNotificationPreferences=117]="SetNotificationPreferences",e[e.SetPromotionalSale=118]="SetPromotionalSale",e[e.SetPromotionalSaleListings=119]="SetPromotionalSaleListings",e[e.SetSellingManagerFeedbackOptions=120]="SetSellingManagerFeedbackOptions",e[e.SetSellingManagerItemAutomationRule=121]="SetSellingManagerItemAutomationRule",e[e.SetSellingManagerTemplateAutomationRule=122]="SetSellingManagerTemplateAutomationRule",e[e.SetShippingDiscountProfiles=123]="SetShippingDiscountProfiles",e[e.SetStore=124]="SetStore",e[e.SetStoreCategories=125]="SetStoreCategories",e[e.SetStoreCustomPage=126]="SetStoreCustomPage",e[e.SetStorePreferences=127]="SetStorePreferences",e[e.SetTaxTable=128]="SetTaxTable",e[e.SetUserNotes=129]="SetUserNotes",e[e.SetUserPreferences=130]="SetUserPreferences",e[e.UploadSiteHostedPictures=131]="UploadSiteHostedPictures",e[e.ValidateChallengeInput=132]="ValidateChallengeInput",e[e.ValidateTestUserRegistration=133]="ValidateTestUserRegistration",e[e.VerifyAddFixedPriceItem=134]="VerifyAddFixedPriceItem",e[e.VerifyAddItem=135]="VerifyAddItem",e[e.VerifyAddSecondChanceItem=136]="VerifyAddSecondChanceItem",e[e.VerifyRelistItem=137]="VerifyRelistItem",e[e.VeROReportItems=138]="VeROReportItems"}(ko||(ko={}));var Yo,$o,Ho,jo,Vo,Ko,qo,Wo,Xo,zo,Jo,Qo,Zo,ei,ti,ri,ni,oi,ii,si,ai,ci,ui,li,pi,di,Ei,fi,gi,hi,_i,mi,Ri,Ai,yi,Ii,Ti,Si,Ci,Ni,Oi,bi,Pi,Ui,Li,Di=ko;class Traditional extends Api{constructor(){super(...arguments),this.createXMLRequest=(e,t)=>async(r,n)=>{const o={...yo,...n};try{return await this.request(o,t,e,r)}catch(n){if(this.shouldRefreshToken(n))return await this.request(o,t,e,r,!0);throw n}}}createTradingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for trading API.");return this.createTraditionalXMLApi({endpoint:{production:"api.ebay.com",sandbox:"api.sandbox.ebay.com"},path:"/ws/api.dll",calls:Di,xmlns:"urn:ebay:apis:eBLBaseComponents",headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-CERT-NAME":this.config.certId,"X-EBAY-API-APP-NAME":this.config.appId,"X-EBAY-API-DEV-NAME":this.config.devId,"X-EBAY-API-SITEID":this.config.siteId,"X-EBAY-API-COMPATIBILITY-LEVEL":967,...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createShoppingApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for shopping API.");return this.createTraditionalXMLApi({endpoint:{production:"open.api.ebay.com",sandbox:"open.api.sandbox.ebay.com"},path:"/shopping",xmlns:"urn:ebay:apis:eBLBaseComponents",calls:Go,headers:(e,t)=>({"X-EBAY-API-CALL-NAME":e,"X-EBAY-API-SITE-ID":this.config.siteId,"X-EBAY-API-VERSION":863,"X-EBAY-API-REQUEST-ENCODING":"xml",...t&&{"X-EBAY-API-IAF-TOKEN":t}})})}createFindingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/services/search/FindingService/v1",xmlns:"http://www.ebay.com/marketplace/search/v1/services",calls:Fo,headers:e=>({"X-EBAY-SOA-SECURITY-APPNAME":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createClientAlertsApi(){if("number"!=typeof this.config.siteId)throw new Error("siteId is required for client alerts API.");const e={endpoint:{production:"clientalerts.ebay.com",sandbox:"clientalerts.sandbox.ebay.com"},path:"/ws/ecasvc/ClientAlerts",calls:Mo},t=e.endpoint[this.config.sandbox?"sandbox":"production"],paramsSerializer=e=>Bn.stringify(e,{allowDots:!0}).replace(/%5B/gi,"(").replace(/%5D/gi,")"),r={appid:this.config.appId,siteid:this.config.siteId,version:643},n={};return Object.keys(e.calls).forEach((e=>{n[e]=async n=>this.req.get(t,{paramsSerializer:{serialize:paramsSerializer},params:{...r,...n,callname:e}})})),n}createMerchandisingApi(){return this.createTraditionalXMLApi({endpoint:{production:"svcs.ebay.com",sandbox:"svcs.sandbox.ebay.com"},path:"/MerchandisingService",xmlns:"http://www.ebay.com/marketplace/services",calls:wo,headers:e=>({"EBAY-SOA-CONSUMER-ID":this.config.appId,"X-EBAY-SOA-OPERATION-NAME":e})})}createBusinessPolicyManagementApi(){throw new Error("Important! This API is deprecated and will be decommissioned on January 31, 2022. We recommend that you migrate to the fulfillment_policy, payment_policy, and return_policy resources of the Account API to set up and manage all of your fulfillment, payment, and return business policies.")}shouldRefreshToken(e){return!!this.config.autoRefreshToken&&(e.name===EBayIAFTokenExpired.name||e.name===EBayIAFTokenInvalid.name||e.name===EBayAuthTokenIsHardExpired.name||e.name===EBayAuthTokenIsInvalid.name)}async request(e,t,r,n,o=!1){try{o&&await this.auth.OAuth2.refreshToken();const i=await this.getConfig(t,r,e),s=new XMLRequest(r,n,i,this.req);return await s.request()}catch(e){handleEBayError(e)}}async getConfig(e,t,r){const n=this.auth.authNAuth.eBayAuthToken,o=!n&&r.useIaf?await this.auth.OAuth2.getAccessToken():null,i=!n&&o,s=this.config.sandbox?e.endpoint.sandbox:e.endpoint.production;return{...r,xmlns:e.xmlns,endpoint:`https://${s}${e.path}`,headers:{...e.headers(t,i?o:null),...r.headers},digitalSignatureHeaders:t=>r.sign?this.getDigitalSignatureHeaders({method:"POST",authority:s,path:e.path},t):{},...i?{}:{eBayAuthToken:n}}}createTraditionalXMLApi(e){const t={};return Object.keys(e.calls).forEach((r=>{t[r]=this.createXMLRequest(r,e)})),t}}class ApiFactory extends Api{constructor(){super(...arguments),this._restful={}}createBuyApi(){return{browse:this.createRestfulApi(Browse),feed:this.createRestfulApi(bo),marketing:this.createRestfulApi(Po),offer:this.createRestfulApi(Offer),order:this.createRestfulApi(Order),deal:this.createRestfulApi(Deal),marketplaceInsights:this.createRestfulApi(MarketplaceInsights)}}createCommerceApi(){return{catalog:this.createRestfulApi(Catalog),charity:this.createRestfulApi(Charity),identity:this.createRestfulApi(Identity),notification:this.createRestfulApi(Notification),media:this.createRestfulApi(Media),translation:this.createRestfulApi(Translation),taxonomy:this.createRestfulApi(Taxonomy)}}createDeveloperApi(){return{analytics:this.createRestfulApi(Uo),keyManagement:this.createRestfulApi(KeyManagement)}}createPostOrderApi(){return{cancellation:this.createRestfulApi(Cancellation),case:this.createRestfulApi(Case),inquiry:this.createRestfulApi(Inquiry),return:this.createRestfulApi(Return)}}createSellApi(){return{account:this.createRestfulApi(AccountV1),accountV2:this.createRestfulApi(AccountV2),analytics:this.createRestfulApi(Analytics),compliance:this.createRestfulApi(Compliance),fulfillment:this.createRestfulApi(Fulfillment),inventory:this.createRestfulApi(Inventory),marketing:this.createRestfulApi(Marketing),metadata:this.createRestfulApi(Metadata),recommendation:this.createRestfulApi(Recommendation),finances:this.createRestfulApi(Finances),feed:this.createRestfulApi(Feed),logistics:this.createRestfulApi(Logistics),negotiation:this.createRestfulApi(Negotiation),listing:this.createRestfulApi(Listing)}}get traditional(){return this._traditional?this._traditional:this._traditional=new Traditional(this.config,this.req,this.auth)}createTradingApi(){return this.traditional.createTradingApi()}createShoppingApi(){return this.traditional.createShoppingApi()}createFindingApi(){return this.traditional.createFindingApi()}createClientAlertsApi(){return this.traditional.createClientAlertsApi()}createMerchandisingApi(){return this.traditional.createMerchandisingApi()}createRestfulApi(e){const t=e.id;return this._restful[t]||(this._restful[t]=new e(this.config,this.req,this.auth))}}!function(e){e[e.EBAY_US=0]="EBAY_US",e[e.EBAY_ENCA=2]="EBAY_ENCA",e[e.EBAY_GB=3]="EBAY_GB",e[e.EBAY_AU=15]="EBAY_AU",e[e.EBAY_AT=16]="EBAY_AT",e[e.EBAY_FRBE=23]="EBAY_FRBE",e[e.EBAY_FR=71]="EBAY_FR",e[e.EBAY_DE=77]="EBAY_DE",e[e.EBAY_MOTOR=100]="EBAY_MOTOR",e[e.EBAY_IT=101]="EBAY_IT",e[e.EBAY_NLBE=123]="EBAY_NLBE",e[e.EBAY_NL=146]="EBAY_NL",e[e.EBAY_ES=186]="EBAY_ES",e[e.EBAY_CH=193]="EBAY_CH",e[e.EBAY_HK=201]="EBAY_HK",e[e.EBAY_IN=203]="EBAY_IN",e[e.EBAY_IE=205]="EBAY_IE",e[e.EBAY_MY=207]="EBAY_MY",e[e.EBAY_FRCA=210]="EBAY_FRCA",e[e.EBAY_PH=211]="EBAY_PH",e[e.EBAY_PL=212]="EBAY_PL",e[e.EBAY_SG=216]="EBAY_SG"}(Yo||(Yo={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_AT="EBAY_AT",e.EBAY_AU="EBAY_AU",e.EBAY_BE="EBAY_BE",e.EBAY_CA="EBAY_CA",e.EBAY_CH="EBAY_CH",e.EBAY_DE="EBAY_DE",e.EBAY_ES="EBAY_ES",e.EBAY_FR="EBAY_FR",e.EBAY_GB="EBAY_GB",e.EBAY_HK="EBAY_HK",e.EBAY_IE="EBAY_IE",e.EBAY_IN="EBAY_IN",e.EBAY_IT="EBAY_IT",e.EBAY_MY="EBAY_MY",e.EBAY_NL="EBAY_NL",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_SG="EBAY_SG",e.EBAY_TH="EBAY_TH",e.EBAY_TW="EBAY_TW",e.EBAY_VN="EBAY_VN",e.EBAY_MOTORS_US="EBAY_MOTORS_US"}($o||($o={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Ho||(Ho={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(jo||(jo={})),function(e){e.CLOSED="CLOSED",e.CS_CLOSED="CS_CLOSED",e.ON_HOLD="ON_HOLD",e.OPEN="OPEN",e.OTHER="OTHER",e.REFUND_AGREED_BUT_FAILED="REFUND_AGREED_BUT_FAILED",e.WAITING_CS="WAITING_CS",e.WAITING_DELIVERY="WAITING_DELIVERY"}(Vo||(Vo={})),function(e){e.DEFAULT="DEFAULT",e.SUMMARY="SUMMARY"}(Ko||(Ko={})),function(e){e.CLOSED="CLOSED",e.CLOSED_WITH_ESCALATION="CLOSED_WITH_ESCALATION",e.CS_CLOSED="CS_CLOSED",e.OPEN="OPEN",e.OTHER="OTHER",e.PENDING="PENDING",e.WAITING_BUYER_RESPONSE="WAITING_BUYER_RESPONSE",e.WAITING_SELLER_RESPONSE="WAITING_SELLER_RESPONSE"}(qo||(qo={})),function(e){e.AUSTRALIA_POST="AUSTRALIA_POST",e.BARTOLINI="BARTOLINI",e.CANADA_POST="CANADA_POST",e.COLISSIMO="COLISSIMO",e.COLLECT_PLUS="COLLECT_PLUS",e.CORREOS="CORREOS",e.DEUTSCHE_POST="DEUTSCHE_POST",e.DHL="DHL",e.FEDEX="FEDEX",e.HERMES="HERMES",e.LA_POSTE="LA_POSTE",e.MONDIAL_RELAY="MONDIAL_RELAY",e.MRW="MRW",e.NEXIVE="NEXIVE",e.OTHER="OTHER",e.PARCEL_FORCE="PARCEL_FORCE",e.POSTE="POSTE",e.ROYAL_MAIL="ROYAL_MAIL",e.SEUR="SEUR",e.UNKNOWN="UNKNOWN",e.UPS="UPS",e.USPS="USPS"}(Wo||(Wo={})),function(e){e.ARRIVED_DAMAGED="ARRIVED_DAMAGED",e.ARRIVED_LATE="ARRIVED_LATE",e.BUYER_CANCEL_ORDER="BUYER_CANCEL_ORDER",e.BUYER_NO_SHOW="BUYER_NO_SHOW",e.BUYER_NOT_SCHEDULED="BUYER_NOT_SCHEDULED",e.BUYER_REFUSED_TO_PICKUP="BUYER_REFUSED_TO_PICKUP",e.DEFECTIVE_ITEM="DEFECTIVE_ITEM",e.DIFFERENT_FROM_LISTING="DIFFERENT_FROM_LISTING",e.EXPIRED_ITEM="EXPIRED_ITEM",e.FAKE_OR_COUNTERFEIT="FAKE_OR_COUNTERFEIT",e.FOUND_BETTER_PRICE="FOUND_BETTER_PRICE",e.IN_STORE_RETURN="IN_STORE_RETURN",e.MISSING_PARTS="MISSING_PARTS",e.NO_LONGER_NEED_ITEM="NO_LONGER_NEED_ITEM",e.NO_REASON="NO_REASON",e.NOT_AS_DESCRIBED="NOT_AS_DESCRIBED",e.ORDERED_ACCIDENTALLY="ORDERED_ACCIDENTALLY",e.ORDERED_DIFFERENT_ITEM="ORDERED_DIFFERENT_ITEM",e.ORDERED_WRONG_ITEM="ORDERED_WRONG_ITEM",e.OTHER="OTHER",e.OUT_OF_STOCK="OUT_OF_STOCK",e.RETURNING_GIFT="RETURNING_GIFT",e.VALET_DELIVERY_ISSUES="VALET_DELIVERY_ISSUES",e.VALET_UNAVAILABLE="VALET_UNAVAILABLE",e.WRONG_SIZE="WRONG_SIZE"}(Xo||(Xo={})),function(e){e.CREATE="CREATE",e.REQUEST="REQUEST",e.UNKNOWN="UNKNOWN"}(zo||(zo={})),function(e){e.EXCHANGE="EXCHANGE",e.MONEY_BACK="MONEY_BACK",e.REPLACEMENT="REPLACEMENT",e.UNKNOWN="UNKNOWN"}(Jo||(Jo={})),function(e){e.FULL="FULL",e.NONE="NONE",e.SUMMARY="SUMMARY"}(Qo||(Qo={})),function(e){e.BUYER_NORESPONSE="BUYER_NORESPONSE",e.BUYER_RETURNED_WRONG_ITEM="BUYER_RETURNED_WRONG_ITEM",e.DISAGREE_WITH_RETURN_REASON="DISAGREE_WITH_RETURN_REASON",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.ITEM_RECEIVED_IN_DIFFERENT_CONDITION="ITEM_RECEIVED_IN_DIFFERENT_CONDITION",e.NEW_ITEM_NOT_RECEIVED="NEW_ITEM_NOT_RECEIVED",e.NO_REFUND_FOR_RETURN_SHIPPING="NO_REFUND_FOR_RETURN_SHIPPING",e.NO_REFUND_RECEIVED="NO_REFUND_RECEIVED",e.OTHER="OTHER",e.RECEIVED_WRONG_ITEM="RECEIVED_WRONG_ITEM",e.SELLER_NO_RESPONSE="SELLER_NO_RESPONSE",e.TROUBLE_COMMUNICATION_WITH_BUYER="TROUBLE_COMMUNICATION_WITH_BUYER",e.TROUBLE_COMMUNICATION_WITH_SELLER="TROUBLE_COMMUNICATION_WITH_SELLER"}(Zo||(Zo={})),function(e){e.ACCEPT_PARTIAL_REFUND="ACCEPT_PARTIAL_REFUND",e.ACCEPT_REPLACEMENT_OFFER="ACCEPT_REPLACEMENT_OFFER",e.APPROVE="APPROVE",e.APPROVE_WITHOUT_EBAY_LABEL="APPROVE_WITHOUT_EBAY_LABEL",e.DECLINE="DECLINE",e.DECLINE_PARTIAL_REFUND="DECLINE_PARTIAL_REFUND",e.DECLINE_REPLACEMENT_OFFER="DECLINE_REPLACEMENT_OFFER",e.OFFER_PARTIAL_REFUND="OFFER_PARTIAL_REFUND",e.OFFER_REPLACEMENT="OFFER_REPLACEMENT",e.OFFER_RETURN="OFFER_RETURN",e.OFFER_RETURN_WITHOUT_LABEL="OFFER_RETURN_WITHOUT_LABEL",e.PROVIDE_RMA="PROVIDE_RMA",e.UNKNOWN="UNKNOWN"}(ei||(ei={})),function(e){e.MOTORS_VEHICLES="MOTORS_VEHICLES",e.ALL_EXCLUDING_MOTORS_VEHICLES="ALL_EXCLUDING_MOTORS_VEHICLES"}(ti||(ti={})),function(e){e.ALL_OPEN="ALL_OPEN",e.ALL_OPEN_REPLACEMENT="ALL_OPEN_REPLACEMENT",e.ALL_OPEN_RETURN="ALL_OPEN_RETURN",e.CLOSED="CLOSED",e.EBAY_PLUS="EBAY_PLUS",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_SHIPPED="ITEM_SHIPPED",e.RETURN_STARTED="RETURN_STARTED",e.SELLER_ACTION_DUE="SELLER_ACTION_DUE",e.SELLER_ACTION_OVERDUE="SELLER_ACTION_OVERDUE",e.SELLER_NO_ACTION="SELLER_NO_ACTION",e.UNKNOWN="UNKNOWN"}(ri||(ri={})),function(e){e.AUTO_REFUND_INITIATED="AUTO_REFUND_INITIATED",e.CLOSED="CLOSED",e.INITIAL="INITIAL",e.ITEM_DELIVERED="ITEM_DELIVERED",e.ITEM_KEPT="ITEM_KEPT",e.ITEM_READY_TO_SHIP="ITEM_READY_TO_SHIP",e.ITEM_SHIPPED="ITEM_SHIPPED",e.LESS_THAN_A_FULL_REFUND_ISSUED="LESS_THAN_A_FULL_REFUND_ISSUED",e.PARTIAL_REFUND_AS_PAYOUT_INITIATED="PARTIAL_REFUND_AS_PAYOUT_INITIATED",e.PARTIAL_REFUND_DECLINED="PARTIAL_REFUND_DECLINED",e.PARTIAL_REFUND_FAILED="PARTIAL_REFUND_FAILED",e.PARTIAL_REFUND_INITIATED="PARTIAL_REFUND_INITIATED",e.PARTIAL_REFUND_NON_PAYPAL_INITIATED="PARTIAL_REFUND_NON_PAYPAL_INITIATED",e.PARTIAL_REFUND_REQUESTED="PARTIAL_REFUND_REQUESTED",e.PARTIAL_REFUNDED="PARTIAL_REFUNDED",e.PAYOUT_INITIATED="PAYOUT_INITIATED",e.REFUND_AS_PAYOUT_INITIATED="REFUND_AS_PAYOUT_INITIATED",e.REFUND_FAILED="REFUND_FAILED",e.REFUND_INITIATED="REFUND_INITIATED",e.REFUND_SENT_PENDING_CONFIRMATION="REFUND_SENT_PENDING_CONFIRMATION",e.REFUND_TIMEOUT="REFUND_TIMEOUT",e.REPLACED="REPLACED",e.REPLACEMENT_CLOSED="REPLACEMENT_CLOSED",e.REPLACEMENT_DELIVERED="REPLACEMENT_DELIVERED",e.REPLACEMENT_LABEL_PENDING="REPLACEMENT_LABEL_PENDING",e.REPLACEMENT_LABEL_PENDING_TIMEOUT="REPLACEMENT_LABEL_PENDING_TIMEOUT",e.REPLACEMENT_LABEL_REQUESTED="REPLACEMENT_LABEL_REQUESTED",e.REPLACEMENT_LABEL_REQUESTED_TIMEOUT="REPLACEMENT_LABEL_REQUESTED_TIMEOUT",e.REPLACEMENT_OFFER_PENDING="REPLACEMENT_OFFER_PENDING",e.REPLACEMENT_REQUEST_TIMEOUT="REPLACEMENT_REQUEST_TIMEOUT",e.REPLACEMENT_REQUESTED="REPLACEMENT_REQUESTED",e.REPLACEMENT_RMA_PENDING="REPLACEMENT_RMA_PENDING",e.REPLACEMENT_SHIPPED="REPLACEMENT_SHIPPED",e.REPLACEMENT_STARTED="REPLACEMENT_STARTED",e.RETURN_LABEL_PENDING="RETURN_LABEL_PENDING",e.RETURN_LABEL_PENDING_TIMEOUT="RETURN_LABEL_PENDING_TIMEOUT",e.RETURN_LABEL_REQUESTED="RETURN_LABEL_REQUESTED",e.RETURN_LABEL_REQUESTED_TIMEOUT="RETURN_LABEL_REQUESTED_TIMEOUT",e.RETURN_REJECTED="RETURN_REJECTED",e.RETURN_REQUEST_TIMEOUT="RETURN_REQUEST_TIMEOUT",e.RETURN_REQUESTED="RETURN_REQUESTED",e.RMA_PENDING="RMA_PENDING",e.UNKNOWN="UNKNOWN"}(ni||(ni={})),function(e){e.ITEM_RELATED="ITEM_RELATED",e.LABEL_RELATED="LABEL_RELATED",e.REFUND_RELATED="REFUND_RELATED",e.UNKNOWN="UNKNOWN"}(oi||(oi={})),function(e){e.DOMESTIC_SHIPPING="DOMESTIC_SHIPPING",e.IMPORT_CHARGE="IMPORT_CHARGE",e.INTERNATIONAL_SHIPPING="INTERNATIONAL_SHIPPING",e.ITEM_IMPORT_TAX="ITEM_IMPORT_TAX",e.ITEM_TAX="ITEM_TAX",e.ORDER_ADJUSTMENT="ORDER_ADJUSTMENT",e.ORIGINAL_SHIPPING="ORIGINAL_SHIPPING",e.OTHER="OTHER",e.PURCHASE_PRICE="PURCHASE_PRICE",e.REFUND_FROM_PAYPAL="REFUND_FROM_PAYPAL",e.RETURN_SHIPPING="RETURN_SHIPPING",e.SHIPPING_IMPORT_TAX="SHIPPING_IMPORT_TAX",e.SHIPPING_TAX="SHIPPING_TAX"}(ii||(ii={})),function(e){e.AUTO_APPROVE_REMORSE="AUTO_APPROVE_REMORSE",e.BUYER_ACCEPT_REPLACEMENT_OFFER="BUYER_ACCEPT_REPLACEMENT_OFFER",e.BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND="BUYER_ACCEPTS_NON_PAYPAL_PARTIAL_REFUND",e.BUYER_ACCEPTS_PARTIAL_REFUND="BUYER_ACCEPTS_PARTIAL_REFUND",e.BUYER_CLOSE_RETURN="BUYER_CLOSE_RETURN",e.BUYER_CREATE_RETURN="BUYER_CREATE_RETURN",e.BUYER_DECLINE_PARTIAL_REFUND="BUYER_DECLINE_PARTIAL_REFUND",e.BUYER_DECLINE_REPLACEMENT_OFFER="BUYER_DECLINE_REPLACEMENT_OFFER",e.BUYER_ESCALATE="BUYER_ESCALATE",e.BUYER_MARK_AS_RECEIVED="BUYER_MARK_AS_RECEIVED",e.BUYER_MARK_REFUND_RECEIVED="BUYER_MARK_REFUND_RECEIVED",e.BUYER_MARK_RETURN_SHIPPED="BUYER_MARK_RETURN_SHIPPED",e.BUYER_PRINT_SHIPPING_LABEL="BUYER_PRINT_SHIPPING_LABEL",e.BUYER_PROVIDE_LABEL="BUYER_PROVIDE_LABEL",e.BUYER_PROVIDE_TRACKING_INFO="BUYER_PROVIDE_TRACKING_INFO",e.BUYER_SEND_MESSAGE="BUYER_SEND_MESSAGE",e.BUYER_UPDATE_TRACKING="BUYER_UPDATE_TRACKING",e.BUYER_VOID_LABEL="BUYER_VOID_LABEL",e.CHARGEBACK_OPEN="CHARGEBACK_OPEN",e.DELETE_FILE="DELETE_FILE",e.EMAIL_SHIPPING_LABEL="EMAIL_SHIPPING_LABEL",e.EXTERNAL_CLAIM_OPENED="EXTERNAL_CLAIM_OPENED",e.GENERAL_TIME_OUT="GENERAL_TIME_OUT",e.NOTIFIED_DELIVERED="NOTIFIED_DELIVERED",e.NOTIFIED_SHIPPED="NOTIFIED_SHIPPED",e.NOTIFY_REPLACEMENT_DELIVERED="NOTIFY_REPLACEMENT_DELIVERED",e.NOTIFY_REPLACEMENT_SHIPPED="NOTIFY_REPLACEMENT_SHIPPED",e.NOTIFY_UPDATE_REFUND_STATUS="NOTIFY_UPDATE_REFUND_STATUS",e.OTHER="OTHER",e.REMINDER_BUYER_TO_RESPOND_RE_OFFER="REMINDER_BUYER_TO_RESPOND_RE_OFFER",e.REMINDER_BUYER_TO_SHIP="REMINDER_BUYER_TO_SHIP",e.REMINDER_FOR_REFUND="REMINDER_FOR_REFUND",e.REMINDER_FOR_REFUND_NO_SHIPPING="REMINDER_FOR_REFUND_NO_SHIPPING",e.REMINDER_FOR_RMA="REMINDER_FOR_RMA",e.REMINDER_FOR_SHIPPING="REMINDER_FOR_SHIPPING",e.REMINDER_SELLER_TO_RESPOND="REMINDER_SELLER_TO_RESPOND",e.REMINDER_SELLER_TO_SHIP="REMINDER_SELLER_TO_SHIP",e.SELLER_APPROVE_REQUEST="SELLER_APPROVE_REQUEST",e.SELLER_DECLINE_REQUEST="SELLER_DECLINE_REQUEST",e.SELLER_ESCALATE="SELLER_ESCALATE",e.SELLER_ISSUE_REFUND="SELLER_ISSUE_REFUND",e.SELLER_ISSUE_STORE_CREDIT_REFUND="SELLER_ISSUE_STORE_CREDIT_REFUND",e.SELLER_MARK_AS_RECEIVED="SELLER_MARK_AS_RECEIVED",e.SELLER_MARK_REFUND_SENT="SELLER_MARK_REFUND_SENT",e.SELLER_MARK_REPLACEMENT_SHIPPED="SELLER_MARK_REPLACEMENT_SHIPPED",e.SELLER_OFFER_PARTIAL_REFUND="SELLER_OFFER_PARTIAL_REFUND",e.SELLER_OFFER_REPLACEMENT="SELLER_OFFER_REPLACEMENT",e.SELLER_OFFER_RETURNS="SELLER_OFFER_RETURNS",e.SELLER_PRINT_SHIPPING_LABEL="SELLER_PRINT_SHIPPING_LABEL",e.SELLER_PROVIDE_LABEL="SELLER_PROVIDE_LABEL",e.SELLER_PROVIDE_RMA="SELLER_PROVIDE_RMA",e.SELLER_PROVIDE_TRACKING_INFO="SELLER_PROVIDE_TRACKING_INFO",e.SELLER_RETRY_REFUND="SELLER_RETRY_REFUND",e.SELLER_SEND_MESSAGE="SELLER_SEND_MESSAGE",e.SELLER_UPDATE_TRACKING="SELLER_UPDATE_TRACKING",e.SELLER_VOID_LABEL="SELLER_VOID_LABEL",e.SUBMIT_FILE="SUBMIT_FILE",e.SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT="SYSTEM_BUYER_PARTIAL_REFUND_AS_PAYOUT",e.SYSTEM_BUYER_REFUND_AS_PAYOUT="SYSTEM_BUYER_REFUND_AS_PAYOUT",e.SYSTEM_CLOSE_RETURN="SYSTEM_CLOSE_RETURN",e.SYSTEM_CREATE_RETURN="SYSTEM_CREATE_RETURN",e.SYSTEM_IMMEDIATE_REFUND="SYSTEM_IMMEDIATE_REFUND",e.TIME_OUT_AFTER_DECLINE="TIME_OUT_AFTER_DECLINE",e.TIME_OUT_AFTER_REFUNDED="TIME_OUT_AFTER_REFUNDED",e.TIME_OUT_AFTER_REFUNDED_AS_PAYOUT="TIME_OUT_AFTER_REFUNDED_AS_PAYOUT",e.TIME_OUT_AFTER_REPLACED="TIME_OUT_AFTER_REPLACED",e.TIME_OUT_FOR_AUTHORIZE="TIME_OUT_FOR_AUTHORIZE",e.TIME_OUT_FOR_AUTO_REFUND="TIME_OUT_FOR_AUTO_REFUND",e.TIME_OUT_FOR_BUYER_RECOUP="TIME_OUT_FOR_BUYER_RECOUP",e.TIME_OUT_FOR_DELIVERY="TIME_OUT_FOR_DELIVERY",e.TIME_OUT_FOR_ESCALATION="TIME_OUT_FOR_ESCALATION",e.TIME_OUT_FOR_ESCALATION_AFTER_SMIR="TIME_OUT_FOR_ESCALATION_AFTER_SMIR",e.TIME_OUT_FOR_ITEM_REPLACED="TIME_OUT_FOR_ITEM_REPLACED",e.TIME_OUT_FOR_MARK_REFUND_RECEIVED="TIME_OUT_FOR_MARK_REFUND_RECEIVED",e.TIME_OUT_FOR_MARK_REFUND_SENT="TIME_OUT_FOR_MARK_REFUND_SENT",e.TIME_OUT_FOR_MASS_PAYOUT="TIME_OUT_FOR_MASS_PAYOUT",e.TIME_OUT_FOR_PAYOUT="TIME_OUT_FOR_PAYOUT",e.TIME_OUT_FOR_PROVIDE_LABEL="TIME_OUT_FOR_PROVIDE_LABEL",e.TIME_OUT_FOR_REFUND="TIME_OUT_FOR_REFUND",e.TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED="TIME_OUT_FOR_REPLACEMENT_DELIVERED_ITEM_NOT_RETURNED",e.TIME_OUT_FOR_REPLACEMENT_SHIPPED="TIME_OUT_FOR_REPLACEMENT_SHIPPED",e.TIME_OUT_FOR_RETURN_SHIPPING="TIME_OUT_FOR_RETURN_SHIPPING",e.TIME_OUT_FOR_RMA="TIME_OUT_FOR_RMA",e.TIME_OUT_FOR_SELLER_INVOICE="TIME_OUT_FOR_SELLER_INVOICE",e.TIME_OUT_FOR_SELLER_PAYOUT="TIME_OUT_FOR_SELLER_PAYOUT",e.TIME_OUT_FOR_SHIPMENT_TRACKING="TIME_OUT_FOR_SHIPMENT_TRACKING",e.TIME_OUT_FOR_SHIPPING="TIME_OUT_FOR_SHIPPING",e.TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE="TIME_OUT_FOR_SHIPPING_SYSTEM_CLOSE"}(si||(si={})),function(e){e.STORE="STORE",e.WAREHOUSE="WAREHOUSE"}(ai||(ai={})),function(e){e.YEAR="YEAR",e.MONTH="MONTH",e.DAY="DAY",e.HOUR="HOUR",e.CALENDAR_DAY="CALENDAR_DAY",e.BUSINESS_DAY="BUSINESS_DAY",e.MINUTE="MINUTE",e.SECOND="SECOND",e.MILLISECOND="MILLISECOND"}(ci||(ci={})),function(e){e.DOMESTIC="DOMESTIC",e.INTERNATIONAL="INTERNATIONAL"}(ui||(ui={})),function(e){e.CALCULATED="CALCULATED",e.FLAT_RATE="FLAT_RATE",e.NOT_SPECIFIED="NOT_SPECIFIED"}(li||(li={})),function(e){e.EBAY_PAYMENTS="EBAY_PAYMENTS"}(pi||(pi={})),function(e){e.OPTED_IN="OPTED_IN",e.NOT_OPTED_IN="NOT_OPTED_IN"}(di||(di={})),function(e){e.CASH_IN_PERSON="CASH_IN_PERSON",e.CASH_ON_DELIVERY="CASH_ON_DELIVERY",e.CASH_ON_PICKUP="CASH_ON_PICKUP",e.CASHIER_CHECK="CASHIER_CHECK",e.CREDIT_CARD="CREDIT_CARD",e.ESCROW="ESCROW",e.INTEGRATED_MERCHANT_CREDIT_CARD="INTEGRATED_MERCHANT_CREDIT_CARD",e.LOAN_CHECK="LOAN_CHECK",e.MONEY_ORDER="MONEY_ORDER",e.PAISA_PAY="PAISA_PAY",e.PAISA_PAY_ESCROW="PAISA_PAY_ESCROW",e.PAISA_PAY_ESCROW_EMI="PAISA_PAY_ESCROW_EMI",e.PAYPAL="PAYPAL",e.PERSONAL_CHECK="PERSONAL_CHECK",e.OTHER="OTHER"}(Ei||(Ei={})),function(e){e.PAYPAL_EMAIL="PAYPAL_EMAIL"}(fi||(fi={})),function(e){e.AD="AD",e.AE="AE",e.AF="AF",e.AG="AG",e.AI="AI",e.AL="AL",e.AM="AM",e.AN="AN",e.AO="AO",e.AQ="AQ",e.AR="AR",e.AS="AS",e.AT="AT",e.AU="AU",e.AW="AW",e.AX="AX",e.AZ="AZ",e.BA="BA",e.BB="BB",e.BD="BD",e.BE="BE",e.BF="BF",e.BG="BG",e.BH="BH",e.BI="BI",e.BJ="BJ",e.BL="BL",e.BM="BM",e.BN="BN",e.BO="BO",e.BQ="BQ",e.BR="BR",e.BS="BS",e.BT="BT",e.BV="BV",e.BW="BW",e.BY="BY",e.BZ="BZ",e.CA="CA",e.CC="CC",e.CD="CD",e.CF="CF",e.CG="CG",e.CH="CH",e.CI="CI",e.CK="CK",e.CL="CL",e.CM="CM",e.CN="CN",e.CO="CO",e.CR="CR",e.CU="CU",e.CV="CV",e.CW="CW",e.CX="CX",e.CY="CY",e.CZ="CZ",e.DE="DE",e.DJ="DJ",e.DK="DK",e.DM="DM",e.DO="DO",e.DZ="DZ",e.EC="EC",e.EE="EE",e.EG="EG",e.EH="EH",e.ER="ER",e.ES="ES",e.ET="ET",e.FI="FI",e.FJ="FJ",e.FK="FK",e.FM="FM",e.FO="FO",e.FR="FR",e.GA="GA",e.GB="GB",e.GD="GD",e.GE="GE",e.GF="GF",e.GG="GG",e.GH="GH",e.GI="GI",e.GL="GL",e.GM="GM",e.GN="GN",e.GP="GP",e.GQ="GQ",e.GR="GR",e.GS="GS",e.GT="GT",e.GU="GU",e.GW="GW",e.GY="GY",e.HK="HK",e.HM="HM",e.HN="HN",e.HR="HR",e.HT="HT",e.HU="HU",e.ID="ID",e.IE="IE",e.IL="IL",e.IM="IM",e.IN="IN",e.IO="IO",e.IQ="IQ",e.IR="IR",e.IS="IS",e.IT="IT",e.JE="JE",e.JM="JM",e.JO="JO",e.JP="JP",e.KE="KE",e.KG="KG",e.KH="KH",e.KI="KI",e.KM="KM",e.KN="KN",e.KP="KP",e.KR="KR",e.KW="KW",e.KY="KY",e.KZ="KZ",e.LA="LA",e.LB="LB",e.LC="LC",e.LI="LI",e.LK="LK",e.LR="LR",e.LS="LS",e.LT="LT",e.LU="LU",e.LV="LV",e.LY="LY",e.MA="MA",e.MC="MC",e.MD="MD",e.ME="ME",e.MF="MF",e.MG="MG",e.MH="MH",e.MK="MK",e.ML="ML",e.MM="MM",e.MN="MN",e.MO="MO",e.MP="MP",e.MQ="MQ",e.MR="MR",e.MS="MS",e.MT="MT",e.MU="MU",e.MV="MV",e.MW="MW",e.MX="MX",e.MY="MY",e.MZ="MZ",e.NA="NA",e.NC="NC",e.NE="NE",e.NF="NF",e.NG="NG",e.NI="NI",e.NL="NL",e.NO="NO",e.NP="NP",e.NR="NR",e.NU="NU",e.NZ="NZ",e.OM="OM",e.PA="PA",e.PE="PE",e.PF="PF",e.PG="PG",e.PH="PH",e.PK="PK",e.PL="PL",e.PM="PM",e.PN="PN",e.PR="PR",e.PS="PS",e.PT="PT",e.PW="PW",e.PY="PY",e.QA="QA",e.RE="RE",e.RO="RO",e.RS="RS",e.RU="RU",e.RW="RW",e.SA="SA",e.SB="SB",e.SC="SC",e.SD="SD",e.SE="SE",e.SG="SG",e.SH="SH",e.SI="SI",e.SJ="SJ",e.SK="SK",e.SL="SL",e.SM="SM",e.SN="SN",e.SO="SO",e.SR="SR",e.ST="ST",e.SV="SV",e.SX="SX",e.SY="SY",e.SZ="SZ",e.TC="TC",e.TD="TD",e.TF="TF",e.TG="TG",e.TH="TH",e.TJ="TJ",e.TK="TK",e.TL="TL",e.TM="TM",e.TN="TN",e.TO="TO",e.TR="TR",e.TT="TT",e.TV="TV",e.TW="TW",e.TZ="TZ",e.UA="UA",e.UG="UG",e.UM="UM",e.US="US",e.UY="UY",e.UZ="UZ",e.VA="VA",e.VC="VC",e.VE="VE",e.VG="VG",e.VI="VI",e.VN="VN",e.VU="VU",e.WF="WF",e.WS="WS",e.YE="YE",e.YT="YT",e.ZA="ZA",e.ZM="ZM",e.ZW="ZW"}(gi||(gi={})),function(e){e.AED="AED",e.AFN="AFN",e.ALL="ALL",e.AMD="AMD",e.ANG="ANG",e.AOA="AOA",e.ARS="ARS",e.AUD="AUD",e.AWG="AWG",e.AZN="AZN",e.BAM="BAM",e.BBD="BBD",e.BDT="BDT",e.BGN="BGN",e.BHD="BHD",e.BIF="BIF",e.BMD="BMD",e.BND="BND",e.BOB="BOB",e.BRL="BRL",e.BSD="BSD",e.BTN="BTN",e.BWP="BWP",e.BYR="BYR",e.BZD="BZD",e.CAD="CAD",e.CDF="CDF",e.CHF="CHF",e.CLP="CLP",e.CNY="CNY",e.COP="COP",e.CRC="CRC",e.CUP="CUP",e.CVE="CVE",e.CZK="CZK",e.DJF="DJF",e.DKK="DKK",e.DOP="DOP",e.DZD="DZD",e.EGP="EGP",e.ERN="ERN",e.ETB="ETB",e.EUR="EUR",e.FJD="FJD",e.FKP="FKP",e.GBP="GBP",e.GEL="GEL",e.GHS="GHS",e.GIP="GIP",e.GMD="GMD",e.GNF="GNF",e.GTQ="GTQ",e.GYD="GYD",e.HKD="HKD",e.HNL="HNL",e.HRK="HRK",e.HTG="HTG",e.HUF="HUF",e.IDR="IDR",e.ILS="ILS",e.INR="INR",e.IQD="IQD",e.IRR="IRR",e.ISK="ISK",e.JMD="JMD",e.JOD="JOD",e.JPY="JPY",e.KES="KES",e.KGS="KGS",e.KHR="KHR",e.KMF="KMF",e.KPW="KPW",e.KRW="KRW",e.KWD="KWD",e.KYD="KYD",e.KZT="KZT",e.LAK="LAK",e.LBP="LBP",e.LKR="LKR",e.LRD="LRD",e.LSL="LSL",e.LTL="LTL",e.LYD="LYD",e.MAD="MAD",e.MDL="MDL",e.MGA="MGA",e.MKD="MKD",e.MMK="MMK",e.MNT="MNT",e.MOP="MOP",e.MRO="MRO",e.MUR="MUR",e.MVR="MVR",e.MWK="MWK",e.MXN="MXN",e.MYR="MYR",e.MZN="MZN",e.NAD="NAD",e.NGN="NGN",e.NIO="NIO",e.NOK="NOK",e.NPR="NPR",e.NZD="NZD",e.OMR="OMR",e.PAB="PAB",e.PEN="PEN",e.PGK="PGK",e.PHP="PHP",e.PKR="PKR",e.PLN="PLN",e.PYG="PYG",e.QAR="QAR",e.RON="RON",e.RSD="RSD",e.RUB="RUB",e.RWF="RWF",e.SAR="SAR",e.SBD="SBD",e.SCR="SCR",e.SDG="SDG",e.SEK="SEK",e.SGD="SGD",e.SHP="SHP",e.SLL="SLL",e.SOS="SOS",e.SRD="SRD",e.STD="STD",e.SYP="SYP",e.SZL="SZL",e.THB="THB",e.TJS="TJS",e.TMT="TMT",e.TND="TND",e.TOP="TOP",e.TRY="TRY",e.TTD="TTD",e.TWD="TWD",e.TZS="TZS",e.UAH="UAH",e.UGX="UGX",e.USD="USD",e.UYU="UYU",e.UZS="UZS",e.VEF="VEF",e.VND="VND",e.VUV="VUV",e.WST="WST",e.XAF="XAF",e.XCD="XCD",e.XOF="XOF",e.XPF="XPF",e.YER="YER",e.ZAR="ZAR",e.ZMW="ZMW",e.ZWL="ZWL"}(hi||(hi={})),function(e){e.de_AT="de-AT",e.de_CH="de-CH",e.de_DE="de-DE",e.en_AU="en-AU",e.en_CA="en-CA",e.en_GB="en-GB",e.en_IE="en-IE",e.en_PH="en-PH",e.en_US="en-US",e.es_ES="es-ES",e.fr_BE="fr-BE",e.fr_CA="fr-CA",e.fr_FR="fr-FR",e.it_IT="it-IT",e.nl_BE="nl-BE",e.nl_NL="nl-NL",e.pl_PL="pl-PL",e.th_TH="th-TH",e.zh_HK="zh-HK",e.zh_TW="zh-TW"}(_i||(_i={})),function(e){e.NEW="NEW",e.LIKE_NEW="LIKE_NEW",e.NEW_OTHER="NEW_OTHER",e.NEW_WITH_DEFECTS="NEW_WITH_DEFECTS",e.MANUFACTURER_REFURBISHED="MANUFACTURER_REFURBISHED",e.SELLER_REFURBISHED="SELLER_REFURBISHED",e.USED_EXCELLENT="USED_EXCELLENT",e.USED_VERY_GOOD="USED_VERY_GOOD",e.USED_GOOD="USED_GOOD",e.USED_ACCEPTABLE="USED_ACCEPTABLE",e.FOR_PARTS_OR_NOT_WORKING="FOR_PARTS_OR_NOT_WORKING"}(mi||(mi={})),function(e){e.en_US="en_US",e.en_CA="en_CA",e.fr_CA="fr_CA",e.en_GB="en_GB",e.en_AU="en_AU",e.en_IN="en_IN",e.de_AT="de_AT",e.fr_BE="fr_BE",e.fr_FR="fr_FR",e.de_DE="de_DE",e.it_IT="it_IT",e.nl_BE="nl_BE",e.nl_NL="nl_NL",e.es_ES="es_ES",e.de_CH="de_CH",e.fi_FI="fi_FI",e.zh_HK="zh_HK",e.hu_HU="hu_HU",e.en_PH="en_PH",e.pl_PL="pl_PL",e.pt_PT="pt_PT",e.ru_RU="ru_RU",e.en_SG="en_SG",e.en_IE="en_IE",e.en_MY="en_MY"}(Ri||(Ri={})),function(e){e.EBAY_US="EBAY_US",e.EBAY_MOTORS="EBAY_MOTORS",e.EBAY_CA="EBAY_CA",e.EBAY_GB="EBAY_GB",e.EBAY_AU="EBAY_AU",e.EBAY_AT="EBAY_AT",e.EBAY_BE="EBAY_BE",e.EBAY_FR="EBAY_FR",e.EBAY_DE="EBAY_DE",e.EBAY_IT="EBAY_IT",e.EBAY_NL="EBAY_NL",e.EBAY_ES="EBAY_ES",e.EBAY_CH="EBAY_CH",e.EBAY_TW="EBAY_TW",e.EBAY_CZ="EBAY_CZ",e.EBAY_DK="EBAY_DK",e.EBAY_FI="EBAY_FI",e.EBAY_GR="EBAY_GR",e.EBAY_HK="EBAY_HK",e.EBAY_HU="EBAY_HU",e.EBAY_IN="EBAY_IN",e.EBAY_ID="EBAY_ID",e.EBAY_IE="EBAY_IE",e.EBAY_IL="EBAY_IL",e.EBAY_MY="EBAY_MY",e.EBAY_NZ="EBAY_NZ",e.EBAY_NO="EBAY_NO",e.EBAY_PH="EBAY_PH",e.EBAY_PL="EBAY_PL",e.EBAY_PT="EBAY_PT",e.EBAY_PR="EBAY_PR",e.EBAY_RU="EBAY_RU",e.EBAY_SG="EBAY_SG",e.EBAY_ZA="EBAY_ZA",e.EBAY_SE="EBAY_SE",e.EBAY_TH="EBAY_TH",e.EBAY_VN="EBAY_VN",e.EBAY_CN="EBAY_CN",e.EBAY_PE="EBAY_PE",e.EBAY_JP="EBAY_JP"}(Ai||(Ai={})),function(e){e.AUCTION="AUCTION",e.FIXED_PRICE="FIXED_PRICE"}(yi||(yi={})),function(e){e.CLICK_THROUGH_RATE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_SEARCH_RESULTS_PAGE="LISTING_IMPRESSION_SEARCH_RESULTS_PAGE",e.LISTING_IMPRESSION_STORE="CLICK_THROUGH_RATE",e.LISTING_IMPRESSION_TOTAL="LISTING_IMPRESSION_TOTAL",e.LISTING_VIEWS_SOURCE_DIRECT="LISTING_VIEWS_SOURCE_DIRECT",e.LISTING_VIEWS_SOURCE_OFF_EBAY="LISTING_VIEWS_SOURCE_OFF_EBAY",e.LISTING_VIEWS_SOURCE_OTHER_EBAY="LISTING_VIEWS_SOURCE_OTHER_EBAY",e.LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE="LISTING_VIEWS_SOURCE_SEARCH_RESULTS_PAGE",e.LISTING_VIEWS_SOURCE_STORE="LISTING_VIEWS_SOURCE_STORE",e.LISTING_VIEWS_TOTAL="LISTING_VIEWS_TOTAL",e.SALES_CONVERSION_RATE="SALES_CONVERSION_RATE",e.TOTAL_IMPRESSION_TOTAL="TOTAL_IMPRESSION_TOTAL",e.TRANSACTION="TRANSACTION"}(Ii||(Ii={})),function(e){e.MERCHANDISE_CREDIT="MERCHANDISE_CREDIT",e.MONEY_BACK="MONEY_BACK"}(Ti||(Ti={})),function(e){e.EXCHANGE="EXCHANGE",e.REPLACEMENT="REPLACEMENT"}(Si||(Si={})),function(e){e.BUYER="BUYER",e.SELLER="SELLER"}(Ci||(Ci={})),function(e){e.COUNTRY="COUNTRY",e.COUNTRY_REGION="COUNTRY_REGION",e.STATE_OR_PROVINCE="STATE_OR_PROVINCE",e.WORLD_REGION="WORLD_REGION",e.WORLDWIDE="WORLDWIDE"}(Ni||(Ni={})),function(e){e.BUYER_CANCEL="BUYER_CANCEL",e.SELLER_CANCEL="SELLER_CANCEL",e.ITEM_NOT_RECEIVED="ITEM_NOT_RECEIVED",e.BUYER_RETURN="BUYER_RETURN",e.ITEM_NOT_AS_DESCRIBED="ITEM_NOT_AS_DESCRIBED",e.OTHER_ADJUSTMENT="OTHER_ADJUSTMENT",e.SHIPPING_DISCOUNT="SHIPPING_DISCOUNT"}(Oi||(Oi={})),function(e){e.ADDRESS_ISSUES="ADDRESS_ISSUES",e.BUYER_ASKED_CANCEL="BUYER_ASKED_CANCEL",e.BUYER_CANCEL_OR_ADDRESS_ISSUE="BUYER_CANCEL_OR_ADDRESS_ISSUE",e.FOUND_CHEAPER_PRICE="FOUND_CHEAPER_PRICE",e.ORDER_MISTAKE="ORDER_MISTAKE",e.ORDER_UNPAID="ORDER_UNPAID",e.OTHER="OTHER",e.OUT_OF_STOCK_OR_CANNOT_FULFILL="OUT_OF_STOCK_OR_CANNOT_FULFILL",e.PRICE_TOO_HIGH="PRICE_TOO_HIGH",e.UNKNOWN="UNKNOWN",e.WONT_ARRIVE_IN_TIME="WONT_ARRIVE_IN_TIME",e.WRONG_PAYMENT_METHOD="WRONG_PAYMENT_METHOD",e.WRONG_SHIPPING_ADDRESS="WRONG_SHIPPING_ADDRESS",e.WRONG_SHIPPING_METHOD="WRONG_SHIPPING_METHOD"}(bi||(bi={})),function(e){e.INCH="INCH",e.FEET="FEET",e.CENTIMETER="CENTIMETER",e.METER="METER"}(Pi||(Pi={})),function(e){e.POUND="POUND",e.KILOGRAM="KILOGRAM",e.OUNCE="OUNCE",e.GRAM="GRAM"}(Ui||(Ui={})),function(e){e.LETTER="LETTER",e.BULKY_GOODS="BULKY_GOODS",e.CARAVAN="CARAVAN",e.CARS="CARS",e.EUROPALLET="EUROPALLET",e.EXPANDABLE_TOUGH_BAGS="EXPANDABLE_TOUGH_BAGS",e.EXTRA_LARGE_PACK="EXTRA_LARGE_PACK",e.FURNITURE="FURNITURE",e.INDUSTRY_VEHICLES="INDUSTRY_VEHICLES",e.LARGE_CANADA_POSTBOX="LARGE_CANADA_POSTBOX",e.LARGE_CANADA_POST_BUBBLE_MAILER="LARGE_CANADA_POST_BUBBLE_MAILER",e.LARGE_ENVELOPE="LARGE_ENVELOPE",e.MAILING_BOX="MAILING_BOX",e.MEDIUM_CANADA_POST_BOX="MEDIUM_CANADA_POST_BOX",e.MEDIUM_CANADA_POST_BUBBLE_MAILER="MEDIUM_CANADA_POST_BUBBLE_MAILER",e.MOTORBIKES="MOTORBIKES",e.ONE_WAY_PALLET="ONE_WAY_PALLET",e.PACKAGE_THICK_ENVELOPE="PACKAGE_THICK_ENVELOPE",e.PADDED_BAGS="PADDED_BAGS",e.PARCEL_OR_PADDED_ENVELOPE="PARCEL_OR_PADDED_ENVELOPE",e.ROLL="ROLL",e.SMALL_CANADA_POST_BOX="SMALL_CANADA_POST_BOX",e.SMALL_CANADA_POST_BUBBLE_MAILER="SMALL_CANADA_POST_BUBBLE_MAILER",e.TOUGH_BAGS="TOUGH_BAGS",e.UPS_LETTER="UPS_LETTER",e.USPS_FLAT_RATE_ENVELOPE="USPS_FLAT_RATE_ENVELOPE",e.USPS_LARGE_PACK="USPS_LARGE_PACK",e.VERY_LARGE_PACK="VERY_LARGE_PACK",e.WINE_PAK="WINE_PAK"}(Li||(Li={}));var Bi=Object.freeze({__proto__:null,get ActivityOption(){return si},get CancelReason(){return bi},get CaseSearchFieldGroup(){return Ko},get CaseStatusFilter(){return Vo},get CategoryType(){return ti},get Condition(){return mi},get ContentLanguage(){return _i},get CountryCode(){return gi},get CurrencyCode(){return hi},get Decision(){return ei},get EscalateReason(){return Zo},get FilePurpose(){return oi},get FormatType(){return yi},get GetReturnFieldGroupEnum(){return Qo},get InquirySearchFieldGroup(){return jo},get InquiryStatusFilter(){return qo},get LengthUnitOfMeasure(){return Pi},get Locale(){return _i},get LocaleEnum(){return Ri},get Marketplace(){return Ai},get MarketplaceId(){return $o},get Metric(){return Ii},get PackageType(){return Li},get PaymentMethodType(){return Ei},get PaymentsProgramStatus(){return di},get PaymentsProgramType(){return pi},get ReasonForRefund(){return Oi},get RecipientAccountReferenceType(){return fi},get RefundFeeType(){return ii},get RefundMethod(){return Ti},get RegionType(){return Ni},get RequestType(){return zo},get ReturnCountFilter(){return ri},get ReturnMethod(){return Si},get ReturnReason(){return Xo},get ReturnShippingCostPayer(){return Ci},get ReturnState(){return ni},get ReturnType(){return Jo},get ShippingCarrier(){return Wo},get ShippingCostType(){return li},get ShippingOptionType(){return ui},get SiteId(){return Yo},get StoreType(){return ai},get TimeDurationUnit(){return ci},get UserRoleFilter(){return Ho},get WeightUnitOfMeasure(){return Ui}}),Mi=Object.freeze({__proto__:null});const vi={sandbox:!1,autoRefreshToken:!0,siteId:Yo.EBAY_US,marketplaceId:$o.EBAY_US,acceptLanguage:_i.en_US,contentLanguage:_i.en_US};class eBayApi extends Api{static fromEnv(e){if(!process.env.EBAY_APP_ID)throw new ApiEnvError("EBAY_APP_ID");if(!process.env.EBAY_CERT_ID)throw new ApiEnvError("EBAY_CERT_ID");let t=null;return process.env.EBAY_JWE&&process.env.EBAY_PRIVATE_KEY&&(t={jwe:process.env.EBAY_JWE,privateKey:process.env.EBAY_PRIVATE_KEY}),new eBayApi({appId:process.env.EBAY_APP_ID,certId:process.env.EBAY_CERT_ID,devId:process.env.EBAY_DEV_ID,authToken:process.env.EBAY_AUTH_TOKEN,siteId:process.env.EBAY_SITE_ID?parseInt(process.env.EBAY_SITE_ID,10):Yo.EBAY_US,marketplaceId:process.env.EBAY_MARKETPLACE_ID&&process.env.EBAY_MARKETPLACE_ID in $o?$o[process.env.EBAY_MARKETPLACE_ID]:$o.EBAY_US,ruName:process.env.EBAY_RU_NAME,sandbox:"true"===process.env.EBAY_SANDBOX,signature:t},e)}constructor(e,t){super({...vi,...e},t),this.factory=new ApiFactory(this.config,this.req,this.auth),this.authNAuth=this.auth.authNAuth,this.OAuth2=this.auth.OAuth2,this.oAuth2=this.OAuth2}get buy(){return this._buy||(this._buy=this.factory.createBuyApi())}get commerce(){return this._commerce||(this._commerce=this.factory.createCommerceApi())}get developer(){return this._developer||(this._developer=this.factory.createDeveloperApi())}get postOrder(){return this._postOrder||(this._postOrder=this.factory.createPostOrderApi())}get sell(){return this._sell||(this._sell=this.factory.createSellApi())}get trading(){return this._trading||(this._trading=this.factory.createTradingApi())}get finding(){return this._finding||(this._finding=this.factory.createFindingApi())}get shopping(){return this._shopping||(this._shopping=this.factory.createShoppingApi())}get merchandising(){return this._merchandising||(this._merchandising=this.factory.createMerchandisingApi())}get clientAlerts(){return this._clientAlerts||(this._clientAlerts=this.factory.createClientAlertsApi())}setSignature(e){this.config.signature=e}}eBayApi.SiteId=Yo,eBayApi.MarketplaceId=$o,eBayApi.ContentLanguage=_i,eBayApi.Locale=_i;export{_i as ContentLanguage,_i as Locale,$o as MarketplaceId,Yo as SiteId,eBayApi as default,eBayApi,Bi as enums,_o as errors,Mi as types};