@opencloud-eu/web-pkg 5.1.0 → 6.1.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 (224) hide show
  1. package/dist/TextEditor-B0ZZfO_w.js +819 -0
  2. package/dist/assets/worker-BVTM6bn-.js +1 -0
  3. package/dist/assets/worker-C-Nrpmiq.js +24 -0
  4. package/dist/assets/worker-CzI1mBNb.js +24 -0
  5. package/dist/assets/worker-DDmV-och.js +24 -0
  6. package/dist/composables-TkULFBg4.js +20165 -0
  7. package/dist/src/apps/types.d.ts +9 -12
  8. package/dist/src/components/AppBar/AppBar.vue.d.ts +154 -96
  9. package/dist/src/components/AppBar/index.d.ts +0 -1
  10. package/dist/src/components/AppLoadingSpinner.vue.d.ts +2 -1
  11. package/dist/src/components/AppTemplates/AppWrapper.vue.d.ts +37 -33
  12. package/dist/src/components/AppTemplates/AppWrapperRoute.d.ts +1 -1
  13. package/dist/src/components/AppTemplates/PartialViews/ErrorScreen.vue.d.ts +5 -4
  14. package/dist/src/components/AppTemplates/PartialViews/LoadingScreen.vue.d.ts +2 -1
  15. package/dist/src/components/AppTopBar.vue.d.ts +13 -4
  16. package/dist/src/components/Avatars/AvatarUpload.vue.d.ts +3 -4
  17. package/dist/src/components/Avatars/UserAvatar.vue.d.ts +11 -1
  18. package/dist/src/components/BatchActions.vue.d.ts +16 -15
  19. package/dist/src/components/ContextActions/ActionMenuDropItem.vue.d.ts +11 -2
  20. package/dist/src/components/ContextActions/ActionMenuItem.vue.d.ts +9 -8
  21. package/dist/src/components/ContextActions/ContextActionMenu.vue.d.ts +41 -22
  22. package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +176 -23
  23. package/dist/src/components/CreateLinkModal.vue.d.ts +17 -7
  24. package/dist/src/components/CreateShortcutModal.vue.d.ts +233 -0
  25. package/dist/src/components/CustomComponentTarget.vue.d.ts +12 -13
  26. package/dist/src/components/FilesList/ContextActions.vue.d.ts +56 -37
  27. package/dist/src/components/FilesList/ResourceGhostElement.vue.d.ts +22 -11
  28. package/dist/src/components/FilesList/ResourceIcon.vue.d.ts +10 -1
  29. package/dist/src/components/FilesList/ResourceLink.vue.d.ts +7 -6
  30. package/dist/src/components/FilesList/ResourceListItem.vue.d.ts +13 -4
  31. package/dist/src/components/FilesList/ResourceName.vue.d.ts +10 -1
  32. package/dist/src/components/FilesList/ResourceSize.vue.d.ts +6 -5
  33. package/dist/src/components/FilesList/ResourceStatusIndicators.vue.d.ts +10 -1
  34. package/dist/src/components/FilesList/ResourceTable.vue.d.ts +51 -154
  35. package/dist/src/components/FilesList/ResourceTile.vue.d.ts +37 -153
  36. package/dist/src/components/FilesList/ResourceTiles.vue.d.ts +34 -119
  37. package/dist/src/components/Filters/DateFilter.vue.d.ts +37 -0
  38. package/dist/src/components/Filters/ItemFilterInline.vue.d.ts +6 -5
  39. package/dist/src/components/Groupware/Accounts/AccountsSwitch.vue.d.ts +3 -0
  40. package/dist/src/components/Groupware/Accounts/index.d.ts +1 -0
  41. package/dist/src/components/Groupware/index.d.ts +1 -0
  42. package/dist/src/components/ItemFilter.vue.d.ts +19 -204
  43. package/dist/src/components/ItemFilterToggle.vue.d.ts +6 -5
  44. package/dist/src/components/LinkRoleDropdown.vue.d.ts +7 -6
  45. package/dist/src/components/LoadingIndicator.vue.d.ts +5 -4
  46. package/dist/src/components/Modals/DatePickerModal.vue.d.ts +8 -7
  47. package/dist/src/components/Modals/EmojiPickerModal.vue.d.ts +6 -5
  48. package/dist/src/components/Modals/FilePickerModal.vue.d.ts +8 -7
  49. package/dist/src/components/Modals/ResourceConflictModal.vue.d.ts +9 -8
  50. package/dist/src/components/Modals/SaveAsModal.vue.d.ts +8 -7
  51. package/dist/src/components/Modals/SpaceMoveInfoModal.vue.d.ts +5 -4
  52. package/dist/src/components/Modals/UnsavedChangesModal.vue.d.ts +5 -4
  53. package/dist/src/components/Navigation/MobileNav.vue.d.ts +3 -0
  54. package/dist/src/components/Navigation/index.d.ts +1 -0
  55. package/dist/src/components/NoContentMessage.vue.d.ts +19 -13
  56. package/dist/src/components/Pagination.vue.d.ts +5 -4
  57. package/dist/src/components/QuotaSelect.vue.d.ts +7 -6
  58. package/dist/src/components/Search/ResourcePreview.vue.d.ts +10 -41
  59. package/dist/src/components/SearchBarFilter.vue.d.ts +7 -6
  60. package/dist/src/components/SideBar/CompareSaveDialog.vue.d.ts +6 -5
  61. package/dist/src/components/SideBar/FileSideBar.vue.d.ts +10 -75
  62. package/dist/src/components/SideBar/Files/FileInfo.vue.d.ts +10 -1
  63. package/dist/src/components/SideBar/SideBar.vue.d.ts +20 -21
  64. package/dist/src/components/SideBar/SideBarPanels.vue.d.ts +21 -22
  65. package/dist/src/components/SideBar/Spaces/Details/SpaceDetails.vue.d.ts +10 -1
  66. package/dist/src/components/SideBar/Spaces/Details/SpaceDetailsMultiple.vue.d.ts +10 -1
  67. package/dist/src/components/SideBar/Spaces/SpaceInfo.vue.d.ts +2 -1
  68. package/dist/src/components/SideBar/Spaces/SpaceNoSelection.vue.d.ts +2 -1
  69. package/dist/src/components/SideBar/WebDavDetails.vue.d.ts +7 -6
  70. package/dist/src/components/SpaceQuota.vue.d.ts +10 -1
  71. package/dist/src/components/Spaces/QuotaModal.vue.d.ts +13 -4
  72. package/dist/src/components/Spaces/SpaceImageModal.vue.d.ts +12 -4
  73. package/dist/src/components/TextEditor/TextEditor.vue.d.ts +22 -161
  74. package/dist/src/components/TextEditor/index.d.ts +16 -138
  75. package/dist/src/components/VersionCheck.vue.d.ts +2 -1
  76. package/dist/src/components/ViewOptions.vue.d.ts +10 -1
  77. package/dist/src/components/index.d.ts +2 -1
  78. package/dist/src/composables/actions/files/useFileActionFallbackToDownload.d.ts +1 -1
  79. package/dist/src/composables/actions/files/useFileActions.d.ts +2 -2
  80. package/dist/src/composables/actions/files/useFileActionsCopy.d.ts +1 -1
  81. package/dist/src/composables/actions/files/useFileActionsCopyPermanentLink.d.ts +1 -1
  82. package/dist/src/composables/actions/files/useFileActionsCreateLink.d.ts +1 -1
  83. package/dist/src/composables/actions/files/useFileActionsCreateNewFile.d.ts +1 -1
  84. package/dist/src/composables/actions/files/useFileActionsCreateNewFolder.d.ts +1 -1
  85. package/dist/src/composables/actions/files/useFileActionsCreateNewShortcut.d.ts +1 -1
  86. package/dist/src/composables/actions/files/useFileActionsCreateSpaceFromResource.d.ts +1 -1
  87. package/dist/src/composables/actions/files/useFileActionsDelete.d.ts +1 -1
  88. package/dist/src/composables/actions/files/useFileActionsDisableSync.d.ts +1 -1
  89. package/dist/src/composables/actions/files/useFileActionsDownloadArchive.d.ts +1 -1
  90. package/dist/src/composables/actions/files/useFileActionsDownloadFile.d.ts +1 -1
  91. package/dist/src/composables/actions/files/useFileActionsEmptyTrashBin.d.ts +1 -1
  92. package/dist/src/composables/actions/files/useFileActionsEnableSync.d.ts +1 -1
  93. package/dist/src/composables/actions/files/useFileActionsFavorite.d.ts +1 -1
  94. package/dist/src/composables/actions/files/useFileActionsMove.d.ts +1 -1
  95. package/dist/src/composables/actions/files/useFileActionsNavigate.d.ts +1 -1
  96. package/dist/src/composables/actions/files/useFileActionsOpenShortcut.d.ts +1 -1
  97. package/dist/src/composables/actions/files/useFileActionsOpenWithApp.d.ts +1 -1
  98. package/dist/src/composables/actions/files/useFileActionsOpenWithDefault.d.ts +1 -1
  99. package/dist/src/composables/actions/files/useFileActionsPaste.d.ts +1 -1
  100. package/dist/src/composables/actions/files/useFileActionsRename.d.ts +2 -2
  101. package/dist/src/composables/actions/files/useFileActionsRestore.d.ts +2 -2
  102. package/dist/src/composables/actions/files/useFileActionsSaveAs.d.ts +1 -1
  103. package/dist/src/composables/actions/files/useFileActionsSetImage.d.ts +1 -1
  104. package/dist/src/composables/actions/files/useFileActionsShowActions.d.ts +1 -1
  105. package/dist/src/composables/actions/files/useFileActionsShowDetails.d.ts +1 -1
  106. package/dist/src/composables/actions/files/useFileActionsShowShares.d.ts +1 -1
  107. package/dist/src/composables/actions/files/useFileActionsToggleHideShare.d.ts +1 -1
  108. package/dist/src/composables/actions/files/useFileActionsUndoDelete.d.ts +2 -2
  109. package/dist/src/composables/actions/helpers/useIsAppActive.d.ts +1 -1
  110. package/dist/src/composables/actions/helpers/useIsFilesAppActive.d.ts +1 -1
  111. package/dist/src/composables/actions/helpers/useIsSearchActive.d.ts +1 -1
  112. package/dist/src/composables/actions/spaces/index.d.ts +1 -0
  113. package/dist/src/composables/actions/spaces/useSpaceActionsCreate.d.ts +7 -0
  114. package/dist/src/composables/actions/spaces/useSpaceActionsDelete.d.ts +1 -1
  115. package/dist/src/composables/actions/spaces/useSpaceActionsDeleteImage.d.ts +1 -1
  116. package/dist/src/composables/actions/spaces/useSpaceActionsDisable.d.ts +1 -1
  117. package/dist/src/composables/actions/spaces/useSpaceActionsDuplicate.d.ts +1 -1
  118. package/dist/src/composables/actions/spaces/useSpaceActionsEditDescription.d.ts +1 -1
  119. package/dist/src/composables/actions/spaces/useSpaceActionsEditQuota.d.ts +1 -1
  120. package/dist/src/composables/actions/spaces/useSpaceActionsEditReadmeContent.d.ts +1 -1
  121. package/dist/src/composables/actions/spaces/useSpaceActionsNavigateToTrash.d.ts +1 -1
  122. package/dist/src/composables/actions/spaces/useSpaceActionsRename.d.ts +1 -1
  123. package/dist/src/composables/actions/spaces/useSpaceActionsRestore.d.ts +1 -1
  124. package/dist/src/composables/actions/spaces/useSpaceActionsSetIcon.d.ts +1 -1
  125. package/dist/src/composables/actions/spaces/useSpaceActionsShowMembers.d.ts +1 -1
  126. package/dist/src/composables/actions/useActionsShowDetails.d.ts +1 -1
  127. package/dist/src/composables/appDefaults/useAppConfig.d.ts +1 -1
  128. package/dist/src/composables/appDefaults/useAppDocumentTitle.d.ts +2 -1
  129. package/dist/src/composables/appDefaults/useAppFileHandling.d.ts +4 -2
  130. package/dist/src/composables/appDefaults/useAppMeta.d.ts +1 -1
  131. package/dist/src/composables/authContext/useAuthService.d.ts +3 -1
  132. package/dist/src/composables/authContext/useRequest.d.ts +2 -2
  133. package/dist/src/composables/driveResolver/useSpacesLoading.d.ts +1 -1
  134. package/dist/src/composables/embedMode/useEmbedMode.d.ts +8 -8
  135. package/dist/src/composables/eventBus/useEventBus.d.ts +1 -1
  136. package/dist/src/composables/filesList/useResourceRouteResolver.d.ts +1 -1
  137. package/dist/src/composables/folderLink/useFolderLink.d.ts +2 -2
  138. package/dist/src/composables/index.d.ts +1 -1
  139. package/dist/src/composables/isTopBarSticky/useIsTopBarSticky.d.ts +1 -1
  140. package/dist/src/composables/keyboardActions/useInterceptModifierClick.d.ts +1 -1
  141. package/dist/src/composables/links/useLinkTypes.d.ts +1 -1
  142. package/dist/src/composables/localStorage/useLocalStorage.d.ts +1 -1
  143. package/dist/src/composables/navItems/index.d.ts +1 -0
  144. package/dist/src/composables/navItems/useNavItems.d.ts +13 -0
  145. package/dist/src/composables/piniaStores/apps.d.ts +31 -31
  146. package/dist/src/composables/piniaStores/auth.d.ts +30 -24
  147. package/dist/src/composables/piniaStores/avatars.d.ts +9 -9
  148. package/dist/src/composables/piniaStores/capabilities.d.ts +160 -160
  149. package/dist/src/composables/piniaStores/clipboard.d.ts +49 -49
  150. package/dist/src/composables/piniaStores/config/config.d.ts +135 -141
  151. package/dist/src/composables/piniaStores/config/types.d.ts +6 -20
  152. package/dist/src/composables/piniaStores/extensionRegistry/extensionPreferences.d.ts +4 -4
  153. package/dist/src/composables/piniaStores/extensionRegistry/extensionRegistry.d.ts +1 -1
  154. package/dist/src/composables/piniaStores/extensionRegistry/types.d.ts +14 -1
  155. package/dist/src/composables/piniaStores/groupware/accounts.d.ts +511 -0
  156. package/dist/src/composables/piniaStores/{groupwareConfig/groupwareConfig.d.ts → groupware/config.d.ts} +107 -80
  157. package/dist/src/composables/piniaStores/groupware/index.d.ts +3 -0
  158. package/dist/src/composables/piniaStores/{groupwareConfig → groupware}/types.d.ts +30 -18
  159. package/dist/src/composables/piniaStores/index.d.ts +1 -1
  160. package/dist/src/composables/piniaStores/messages.d.ts +70 -70
  161. package/dist/src/composables/piniaStores/modals.d.ts +197 -209
  162. package/dist/src/composables/piniaStores/resources.d.ts +11 -11
  163. package/dist/src/composables/piniaStores/shares/shares.d.ts +1 -1
  164. package/dist/src/composables/piniaStores/shares/types.d.ts +2 -1
  165. package/dist/src/composables/piniaStores/sideBar.d.ts +8 -22
  166. package/dist/src/composables/piniaStores/spaces.d.ts +189 -188
  167. package/dist/src/composables/piniaStores/theme.d.ts +10 -10
  168. package/dist/src/composables/piniaStores/updates.d.ts +10 -10
  169. package/dist/src/composables/piniaStores/user.d.ts +5 -5
  170. package/dist/src/composables/piniaStores/webWorkers.d.ts +1 -1
  171. package/dist/src/composables/requestHeaders/useRequestHeaders.d.ts +1 -1
  172. package/dist/src/composables/resources/useGetResourceContext.d.ts +26 -26
  173. package/dist/src/composables/resources/useLoadPreview.d.ts +1 -1
  174. package/dist/src/composables/resources/useResourceContents.d.ts +1 -1
  175. package/dist/src/composables/resources/useResourceIndicators.d.ts +12 -1
  176. package/dist/src/composables/resources/useResourceViewContextMenu.d.ts +4 -3
  177. package/dist/src/composables/resources/useResourceViewDrag.d.ts +23 -13
  178. package/dist/src/composables/resources/useResourceViewHelpers.d.ts +30 -20
  179. package/dist/src/composables/resources/useResourceViewSelection.d.ts +2 -2
  180. package/dist/src/composables/selection/useSelectedResources.d.ts +2 -1
  181. package/dist/src/composables/spaces/useCreateSpace.d.ts +2 -1
  182. package/dist/src/composables/spaces/useSpaceHelpers.d.ts +1 -1
  183. package/dist/src/composables/webWorkers/deleteWorker/useDeleteWorker.d.ts +1 -1
  184. package/dist/src/composables/webWorkers/pasteWorker/usePasteWorker.d.ts +2 -2
  185. package/dist/src/composables/webWorkers/restoreWorker/useRestoreWorker.d.ts +1 -1
  186. package/dist/src/composables/webWorkers/tokenTimerWorker/useTokenTimerWorker.d.ts +3 -1
  187. package/dist/src/constants.d.ts +0 -6
  188. package/dist/src/extensionPoints.d.ts +3 -0
  189. package/dist/src/helpers/filesize.d.ts +0 -7
  190. package/dist/src/helpers/index.d.ts +1 -2
  191. package/dist/src/helpers/resource/conflictHandling/conflictDialog.d.ts +1 -1
  192. package/dist/src/helpers/resource/conflictHandling/transfer.d.ts +4 -4
  193. package/dist/src/helpers/resource/conflictHandling/types.d.ts +1 -1
  194. package/dist/src/helpers/share/driveItem.d.ts +1 -1
  195. package/dist/src/helpers/versions.d.ts +5 -0
  196. package/dist/src/index.d.ts +1 -0
  197. package/dist/src/router/common.d.ts +1 -1
  198. package/dist/src/router/index.d.ts +2 -1
  199. package/dist/src/router/public.d.ts +1 -1
  200. package/dist/src/router/shares.d.ts +1 -1
  201. package/dist/src/router/spaces.d.ts +1 -1
  202. package/dist/src/router/trash.d.ts +1 -1
  203. package/dist/src/services/passwordPolicy/rules.d.ts +3 -9
  204. package/dist/src/services/preview/types.d.ts +1 -1
  205. package/dist/src/services/uppy/DropTarget/plugin.d.ts +2 -1
  206. package/dist/src/services/uppy/uppyService.d.ts +3 -3
  207. package/dist/web-pkg.js +4251 -354
  208. package/package.json +36 -38
  209. package/src/index.ts +1 -0
  210. package/dist/TextEditor-CXSedGM4.js +0 -867
  211. package/dist/assets/worker-22sDKzz_.js +0 -21
  212. package/dist/assets/worker-BBQqm_-D.js +0 -1
  213. package/dist/assets/worker-BSCY2vwA.js +0 -21
  214. package/dist/assets/worker-DH8D29Kr.js +0 -21
  215. package/dist/index-CEJcEmbf.js +0 -25419
  216. package/dist/src/components/AppBar/CreateSpace.vue.d.ts +0 -18
  217. package/dist/src/components/PortalTarget.vue.d.ts +0 -2
  218. package/dist/src/composables/piniaStores/groupwareConfig/index.d.ts +0 -2
  219. package/dist/src/composables/portalTarget/eventTopics.d.ts +0 -3
  220. package/dist/src/composables/portalTarget/index.d.ts +0 -2
  221. package/dist/src/composables/portalTarget/usePortalTarget.d.ts +0 -4
  222. package/dist/src/helpers/contextMenuDropdown.d.ts +0 -7
  223. package/dist/src/helpers/statusIndicators.d.ts +0 -12
  224. package/dist/web-pkg.umd.cjs +0 -36
@@ -1,21 +0,0 @@
1
- (function(){"use strict";function Dn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ur={exports:{}},Hn;function Xo(){return Hn||(Hn=1,(function(t){var e=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,c,a){this.fn=l,this.context=c,this.once=a||!1}function s(l,c,a,h,p){if(typeof a!="function")throw new TypeError("The listener must be a function");var y=new i(a,h||l,p),g=r?r+c:c;return l._events[g]?l._events[g].fn?l._events[g]=[l._events[g],y]:l._events[g].push(y):(l._events[g]=y,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function u(){this._events=new n,this._eventsCount=0}u.prototype.eventNames=function(){var c=[],a,h;if(this._eventsCount===0)return c;for(h in a=this._events)e.call(a,h)&&c.push(r?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(a)):c},u.prototype.listeners=function(c){var a=r?r+c:c,h=this._events[a];if(!h)return[];if(h.fn)return[h.fn];for(var p=0,y=h.length,g=new Array(y);p<y;p++)g[p]=h[p].fn;return g},u.prototype.listenerCount=function(c){var a=r?r+c:c,h=this._events[a];return h?h.fn?1:h.length:0},u.prototype.emit=function(c,a,h,p,y,g){var m=r?r+c:c;if(!this._events[m])return!1;var b=this._events[m],v=arguments.length,E,T;if(b.fn){switch(b.once&&this.removeListener(c,b.fn,void 0,!0),v){case 1:return b.fn.call(b.context),!0;case 2:return b.fn.call(b.context,a),!0;case 3:return b.fn.call(b.context,a,h),!0;case 4:return b.fn.call(b.context,a,h,p),!0;case 5:return b.fn.call(b.context,a,h,p,y),!0;case 6:return b.fn.call(b.context,a,h,p,y,g),!0}for(T=1,E=new Array(v-1);T<v;T++)E[T-1]=arguments[T];b.fn.apply(b.context,E)}else{var N=b.length,S;for(T=0;T<N;T++)switch(b[T].once&&this.removeListener(c,b[T].fn,void 0,!0),v){case 1:b[T].fn.call(b[T].context);break;case 2:b[T].fn.call(b[T].context,a);break;case 3:b[T].fn.call(b[T].context,a,h);break;case 4:b[T].fn.call(b[T].context,a,h,p);break;default:if(!E)for(S=1,E=new Array(v-1);S<v;S++)E[S-1]=arguments[S];b[T].fn.apply(b[T].context,E)}}return!0},u.prototype.on=function(c,a,h){return s(this,c,a,h,!1)},u.prototype.once=function(c,a,h){return s(this,c,a,h,!0)},u.prototype.removeListener=function(c,a,h,p){var y=r?r+c:c;if(!this._events[y])return this;if(!a)return o(this,y),this;var g=this._events[y];if(g.fn)g.fn===a&&(!p||g.once)&&(!h||g.context===h)&&o(this,y);else{for(var m=0,b=[],v=g.length;m<v;m++)(g[m].fn!==a||p&&!g[m].once||h&&g[m].context!==h)&&b.push(g[m]);b.length?this._events[y]=b.length===1?b[0]:b:o(this,y)}return this},u.prototype.removeAllListeners=function(c){var a;return c?(a=r?r+c:c,this._events[a]&&o(this,a)):(this._events=new n,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=r,u.EventEmitter=u,t.exports=u})(Ur)),Ur.exports}var Zo=Xo(),Qo=Dn(Zo);class Br extends Error{name="TimeoutError";constructor(e,r){super(e,r),Error.captureStackTrace?.(this,Br)}}const qn=t=>t.reason??new DOMException("This operation was aborted.","AbortError");function ea(t,e){const{milliseconds:r,fallback:n,message:i,customTimers:s={setTimeout,clearTimeout},signal:o}=e;let u,l;const a=new Promise((h,p)=>{if(typeof r!="number"||Math.sign(r)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${r}\``);if(o?.aborted){p(qn(o));return}if(o&&(l=()=>{p(qn(o))},o.addEventListener("abort",l,{once:!0})),t.then(h,p),r===Number.POSITIVE_INFINITY)return;const y=new Br;u=s.setTimeout.call(void 0,()=>{if(n){try{h(n())}catch(g){p(g)}return}typeof t.cancel=="function"&&t.cancel(),i===!1?h():i instanceof Error?p(i):(y.message=i??`Promise timed out after ${r} milliseconds`,p(y))},r)}).finally(()=>{a.clear(),l&&o&&o.removeEventListener("abort",l)});return a.clear=()=>{s.clearTimeout.call(void 0,u),u=void 0},a}function ta(t,e,r){let n=0,i=t.length;for(;i>0;){const s=Math.trunc(i/2);let o=n+s;r(t[o],e)<=0?(n=++o,i-=s+1):i=s}return n}class ra{#e=[];enqueue(e,r){const{priority:n=0,id:i}=r??{},s={priority:n,id:i,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(s);return}const o=ta(this.#e,s,(u,l)=>l.priority-u.priority);this.#e.splice(o,0,s)}setPriority(e,r){const n=this.#e.findIndex(s=>s.id===e);if(n===-1)throw new ReferenceError(`No promise function with the id "${e}" exists in the queue.`);const[i]=this.#e.splice(n,1);this.enqueue(i.run,{priority:r,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(r=>r.priority===e.priority).map(r=>r.run)}get size(){return this.#e.length}}class na extends Qo{#e;#r;#s=0;#t;#n=!1;#d=!1;#l;#g=0;#f=0;#c;#p;#h;#o=[];#a=0;#i;#I;#u=0;#w;#m;#F=1n;#x=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:ra,strict:!1,...e},!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);if(e.strict&&e.interval===0)throw new TypeError("The `strict` option requires a non-zero `interval`");if(e.strict&&e.intervalCap===Number.POSITIVE_INFINITY)throw new TypeError("The `strict` option requires a finite `intervalCap`");if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#r=e.intervalCap===Number.POSITIVE_INFINITY||e.interval===0,this.#t=e.intervalCap,this.#l=e.interval,this.#h=e.strict,this.#i=new e.queueClass,this.#I=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw new TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#m=e.autoStart===!1,this.#M()}#E(e){for(;this.#a<this.#o.length;){const n=this.#o[this.#a];if(n!==void 0&&e-n>=this.#l)this.#a++;else break}(this.#a>100&&this.#a>this.#o.length/2||this.#a===this.#o.length)&&(this.#o=this.#o.slice(this.#a),this.#a=0)}#L(e){this.#h?this.#o.push(e):this.#s++}#_(){this.#h?this.#o.length>this.#a&&this.#o.pop():this.#s>0&&this.#s--}#v(){return this.#o.length-this.#a}get#U(){return this.#r?!0:this.#h?this.#v()<this.#t:this.#s<this.#t}get#B(){return this.#u<this.#w}#k(){this.#u--,this.#u===0&&this.emit("pendingZero"),this.#N(),this.emit("next")}#$(){this.#p=void 0,this.#C(),this.#O()}#j(e){if(this.#h){if(this.#E(e),this.#v()>=this.#t){const n=this.#o[this.#a],i=this.#l-(e-n);return this.#T(i),!0}return!1}if(this.#c===void 0){const r=this.#g-e;if(r<0){if(this.#f>0){const n=e-this.#f;if(n<this.#l)return this.#T(this.#l-n),!0}this.#s=this.#e?this.#u:0}else return this.#T(r),!0}return!1}#T(e){this.#p===void 0&&(this.#p=setTimeout(()=>{this.#$()},e))}#A(){this.#c&&(clearInterval(this.#c),this.#c=void 0)}#S(){this.#p&&(clearTimeout(this.#p),this.#p=void 0)}#N(){if(this.#i.size===0){if(this.#A(),this.emit("empty"),this.#u===0){if(this.#S(),this.#h&&this.#a>0){const r=Date.now();this.#E(r)}this.emit("idle")}return!1}let e=!1;if(!this.#m){const r=Date.now(),n=!this.#j(r);if(this.#U&&this.#B){const i=this.#i.dequeue();this.#r||(this.#L(r),this.#b()),this.emit("active"),i(),n&&this.#O(),e=!0}}return e}#O(){this.#r||this.#c!==void 0||this.#h||(this.#c=setInterval(()=>{this.#C()},this.#l),this.#g=Date.now()+this.#l)}#C(){this.#h||(this.#s===0&&this.#u===0&&this.#c&&this.#A(),this.#s=this.#e?this.#u:0),this.#P(),this.#b()}#P(){for(;this.#N(););}get concurrency(){return this.#w}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#w=e,this.#P()}setPriority(e,r){if(typeof r!="number"||!Number.isFinite(r))throw new TypeError(`Expected \`priority\` to be a finite number, got \`${r}\` (${typeof r})`);this.#i.setPriority(e,r)}async add(e,r={}){return r={timeout:this.timeout,...r,id:r.id??(this.#F++).toString()},new Promise((n,i)=>{const s=Symbol(`task-${r.id}`);this.#i.enqueue(async()=>{this.#u++,this.#x.set(s,{id:r.id,priority:r.priority??0,startTime:Date.now(),timeout:r.timeout});let o;try{try{r.signal?.throwIfAborted()}catch(c){throw this.#V(),this.#x.delete(s),c}this.#f=Date.now();let u=e({signal:r.signal});if(r.timeout&&(u=ea(Promise.resolve(u),{milliseconds:r.timeout,message:`Task timed out after ${r.timeout}ms (queue has ${this.#u} running, ${this.#i.size} waiting)`})),r.signal){const{signal:c}=r;u=Promise.race([u,new Promise((a,h)=>{o=()=>{h(c.reason)},c.addEventListener("abort",o,{once:!0})})])}const l=await u;n(l),this.emit("completed",l)}catch(u){i(u),this.emit("error",u)}finally{o&&r.signal?.removeEventListener("abort",o),this.#x.delete(s),queueMicrotask(()=>{this.#k()})}},r),this.emit("add"),this.#N()})}async addAll(e,r){return Promise.all(e.map(async n=>this.add(n,r)))}start(){return this.#m?(this.#m=!1,this.#P(),this):this}pause(){this.#m=!0}clear(){this.#i=new this.#I,this.#A(),this.#R(),this.emit("empty"),this.#u===0&&(this.#S(),this.emit("idle")),this.emit("next")}async onEmpty(){this.#i.size!==0&&await this.#y("empty")}async onSizeLessThan(e){this.#i.size<e||await this.#y("next",()=>this.#i.size<e)}async onIdle(){this.#u===0&&this.#i.size===0||await this.#y("idle")}async onPendingZero(){this.#u!==0&&await this.#y("pendingZero")}async onRateLimit(){this.isRateLimited||await this.#y("rateLimit")}async onRateLimitCleared(){this.isRateLimited&&await this.#y("rateLimitCleared")}onError(){return new Promise((e,r)=>{const n=i=>{this.off("error",n),r(i)};this.on("error",n)})}async#y(e,r){return new Promise(n=>{const i=()=>{r&&!r()||(this.off(e,i),n())};this.on(e,i)})}get size(){return this.#i.size}sizeBy(e){return this.#i.filter(e).length}get pending(){return this.#u}get isPaused(){return this.#m}#M(){this.#r||(this.on("add",()=>{this.#i.size>0&&this.#b()}),this.on("next",()=>{this.#b()}))}#b(){this.#r||this.#d||(this.#d=!0,queueMicrotask(()=>{this.#d=!1,this.#R()}))}#V(){this.#r||(this.#_(),this.#b())}#R(){const e=this.#n;if(this.#r||this.#i.size===0){e&&(this.#n=!1,this.emit("rateLimitCleared"));return}let r;if(this.#h){const i=Date.now();this.#E(i),r=this.#v()}else r=this.#s;const n=r>=this.#t;n!==e&&(this.#n=n,this.emit(n?"rateLimit":"rateLimitCleared"))}get isRateLimited(){return this.#n}get isSaturated(){return this.#u===this.#w&&this.#i.size>0||this.isRateLimited&&this.#i.size>0}get runningTasks(){return[...this.#x.values()].map(e=>({...e}))}}function ia(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var zn={exports:{}},Z=zn.exports={},Le,_e;function kr(){throw new Error("setTimeout has not been defined")}function $r(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Le=setTimeout:Le=kr}catch{Le=kr}try{typeof clearTimeout=="function"?_e=clearTimeout:_e=$r}catch{_e=$r}})();function Wn(t){if(Le===setTimeout)return setTimeout(t,0);if((Le===kr||!Le)&&setTimeout)return Le=setTimeout,setTimeout(t,0);try{return Le(t,0)}catch{try{return Le.call(null,t,0)}catch{return Le.call(this,t,0)}}}function sa(t){if(_e===clearTimeout)return clearTimeout(t);if((_e===$r||!_e)&&clearTimeout)return _e=clearTimeout,clearTimeout(t);try{return _e(t)}catch{try{return _e.call(null,t)}catch{return _e.call(this,t)}}}var je=[],dt=!1,et,Zt=-1;function oa(){!dt||!et||(dt=!1,et.length?je=et.concat(je):Zt=-1,je.length&&Gn())}function Gn(){if(!dt){var t=Wn(oa);dt=!0;for(var e=je.length;e;){for(et=je,je=[];++Zt<e;)et&&et[Zt].run();Zt=-1,e=je.length}et=null,dt=!1,sa(t)}}Z.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];je.push(new Kn(t,e)),je.length===1&&!dt&&Wn(Gn)};function Kn(t,e){this.fun=t,this.array=e}Kn.prototype.run=function(){this.fun.apply(null,this.array)},Z.title="browser",Z.browser=!0,Z.env={},Z.argv=[],Z.version="",Z.versions={};function Me(){}Z.on=Me,Z.addListener=Me,Z.once=Me,Z.off=Me,Z.removeListener=Me,Z.removeAllListeners=Me,Z.emit=Me,Z.prependListener=Me,Z.prependOnceListener=Me,Z.listeners=function(t){return[]},Z.binding=function(t){throw new Error("process.binding is not supported")},Z.cwd=function(){return"/"},Z.chdir=function(t){throw new Error("process.chdir is not supported")},Z.umask=function(){return 0};var aa=zn.exports;const Ue=ia(aa);var jr,Jn;function ua(){if(Jn)return jr;Jn=1;function t(i){if(typeof i!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(i))}function e(i,s){for(var o="",u=0,l=-1,c=0,a,h=0;h<=i.length;++h){if(h<i.length)a=i.charCodeAt(h);else{if(a===47)break;a=47}if(a===47){if(!(l===h-1||c===1))if(l!==h-1&&c===2){if(o.length<2||u!==2||o.charCodeAt(o.length-1)!==46||o.charCodeAt(o.length-2)!==46){if(o.length>2){var p=o.lastIndexOf("/");if(p!==o.length-1){p===-1?(o="",u=0):(o=o.slice(0,p),u=o.length-1-o.lastIndexOf("/")),l=h,c=0;continue}}else if(o.length===2||o.length===1){o="",u=0,l=h,c=0;continue}}s&&(o.length>0?o+="/..":o="..",u=2)}else o.length>0?o+="/"+i.slice(l+1,h):o=i.slice(l+1,h),u=h-l-1;l=h,c=0}else a===46&&c!==-1?++c:c=-1}return o}function r(i,s){var o=s.dir||s.root,u=s.base||(s.name||"")+(s.ext||"");return o?o===s.root?o+u:o+i+u:u}var n={resolve:function(){for(var s="",o=!1,u,l=arguments.length-1;l>=-1&&!o;l--){var c;l>=0?c=arguments[l]:(u===void 0&&(u=Ue.cwd()),c=u),t(c),c.length!==0&&(s=c+"/"+s,o=c.charCodeAt(0)===47)}return s=e(s,!o),o?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(s){if(t(s),s.length===0)return".";var o=s.charCodeAt(0)===47,u=s.charCodeAt(s.length-1)===47;return s=e(s,!o),s.length===0&&!o&&(s="."),s.length>0&&u&&(s+="/"),o?"/"+s:s},isAbsolute:function(s){return t(s),s.length>0&&s.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var s,o=0;o<arguments.length;++o){var u=arguments[o];t(u),u.length>0&&(s===void 0?s=u:s+="/"+u)}return s===void 0?".":n.normalize(s)},relative:function(s,o){if(t(s),t(o),s===o||(s=n.resolve(s),o=n.resolve(o),s===o))return"";for(var u=1;u<s.length&&s.charCodeAt(u)===47;++u);for(var l=s.length,c=l-u,a=1;a<o.length&&o.charCodeAt(a)===47;++a);for(var h=o.length,p=h-a,y=c<p?c:p,g=-1,m=0;m<=y;++m){if(m===y){if(p>y){if(o.charCodeAt(a+m)===47)return o.slice(a+m+1);if(m===0)return o.slice(a+m)}else c>y&&(s.charCodeAt(u+m)===47?g=m:m===0&&(g=0));break}var b=s.charCodeAt(u+m),v=o.charCodeAt(a+m);if(b!==v)break;b===47&&(g=m)}var E="";for(m=u+g+1;m<=l;++m)(m===l||s.charCodeAt(m)===47)&&(E.length===0?E+="..":E+="/..");return E.length>0?E+o.slice(a+g):(a+=g,o.charCodeAt(a)===47&&++a,o.slice(a))},_makeLong:function(s){return s},dirname:function(s){if(t(s),s.length===0)return".";for(var o=s.charCodeAt(0),u=o===47,l=-1,c=!0,a=s.length-1;a>=1;--a)if(o=s.charCodeAt(a),o===47){if(!c){l=a;break}}else c=!1;return l===-1?u?"/":".":u&&l===1?"//":s.slice(0,l)},basename:function(s,o){if(o!==void 0&&typeof o!="string")throw new TypeError('"ext" argument must be a string');t(s);var u=0,l=-1,c=!0,a;if(o!==void 0&&o.length>0&&o.length<=s.length){if(o.length===s.length&&o===s)return"";var h=o.length-1,p=-1;for(a=s.length-1;a>=0;--a){var y=s.charCodeAt(a);if(y===47){if(!c){u=a+1;break}}else p===-1&&(c=!1,p=a+1),h>=0&&(y===o.charCodeAt(h)?--h===-1&&(l=a):(h=-1,l=p))}return u===l?l=p:l===-1&&(l=s.length),s.slice(u,l)}else{for(a=s.length-1;a>=0;--a)if(s.charCodeAt(a)===47){if(!c){u=a+1;break}}else l===-1&&(c=!1,l=a+1);return l===-1?"":s.slice(u,l)}},extname:function(s){t(s);for(var o=-1,u=0,l=-1,c=!0,a=0,h=s.length-1;h>=0;--h){var p=s.charCodeAt(h);if(p===47){if(!c){u=h+1;break}continue}l===-1&&(c=!1,l=h+1),p===46?o===-1?o=h:a!==1&&(a=1):o!==-1&&(a=-1)}return o===-1||l===-1||a===0||a===1&&o===l-1&&o===u+1?"":s.slice(o,l)},format:function(s){if(s===null||typeof s!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof s);return r("/",s)},parse:function(s){t(s);var o={root:"",dir:"",base:"",ext:"",name:""};if(s.length===0)return o;var u=s.charCodeAt(0),l=u===47,c;l?(o.root="/",c=1):c=0;for(var a=-1,h=0,p=-1,y=!0,g=s.length-1,m=0;g>=c;--g){if(u=s.charCodeAt(g),u===47){if(!y){h=g+1;break}continue}p===-1&&(y=!1,p=g+1),u===46?a===-1?a=g:m!==1&&(m=1):a!==-1&&(m=-1)}return a===-1||p===-1||m===0||m===1&&a===p-1&&a===h+1?p!==-1&&(h===0&&l?o.base=o.name=s.slice(1,p):o.base=o.name=s.slice(h,p)):(h===0&&l?(o.name=s.slice(1,a),o.base=s.slice(1,p)):(o.name=s.slice(h,a),o.base=s.slice(h,p)),o.ext=s.slice(a,p)),h>0?o.dir=s.slice(0,h-1):l&&(o.dir="/"),o},sep:"/",delimiter:":",win32:null,posix:null};return n.posix=n,jr=n,jr}var Qt=ua(),Yn=Dn(Qt);const Ve=globalThis||void 0||self;function Xn(t,e){return function(){return t.apply(e,arguments)}}const{toString:la}=Object.prototype,{getPrototypeOf:Mr}=Object,{iterator:er,toStringTag:Zn}=Symbol,tr=(t=>e=>{const r=la.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Re=t=>(t=t.toLowerCase(),e=>tr(e)===t),rr=t=>e=>typeof e===t,{isArray:pt}=Array,gt=rr("undefined");function St(t){return t!==null&&!gt(t)&&t.constructor!==null&&!gt(t.constructor)&&xe(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Qn=Re("ArrayBuffer");function ca(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Qn(t.buffer),e}const fa=rr("string"),xe=rr("function"),ei=rr("number"),Ot=t=>t!==null&&typeof t=="object",ha=t=>t===!0||t===!1,nr=t=>{if(tr(t)!=="object")return!1;const e=Mr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Zn in t)&&!(er in t)},da=t=>{if(!Ot(t)||St(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},pa=Re("Date"),ga=Re("File"),ma=Re("Blob"),ya=Re("FileList"),ba=t=>Ot(t)&&xe(t.pipe),wa=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||xe(t.append)&&((e=tr(t))==="formdata"||e==="object"&&xe(t.toString)&&t.toString()==="[object FormData]"))},xa=Re("URLSearchParams"),[Ea,va,Ta,Aa]=["ReadableStream","Request","Response","Headers"].map(Re),Na=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ct(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let n,i;if(typeof t!="object"&&(t=[t]),pt(t))for(n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else{if(St(t))return;const s=r?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let u;for(n=0;n<o;n++)u=s[n],e.call(null,t[u],u,t)}}function ti(t,e){if(St(t))return null;e=e.toLowerCase();const r=Object.keys(t);let n=r.length,i;for(;n-- >0;)if(i=r[n],e===i.toLowerCase())return i;return null}const tt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:Ve,ri=t=>!gt(t)&&t!==tt;function Vr(){const{caseless:t,skipUndefined:e}=ri(this)&&this||{},r={},n=(i,s)=>{if(s==="__proto__"||s==="constructor"||s==="prototype")return;const o=t&&ti(r,s)||s;nr(r[o])&&nr(i)?r[o]=Vr(r[o],i):nr(i)?r[o]=Vr({},i):pt(i)?r[o]=i.slice():(!e||!gt(i))&&(r[o]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Ct(arguments[i],n);return r}const Pa=(t,e,r,{allOwnKeys:n}={})=>(Ct(e,(i,s)=>{r&&xe(i)?Object.defineProperty(t,s,{value:Xn(i,r),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(t,s,{value:i,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:n}),t),Ia=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Sa=(t,e,r,n)=>{t.prototype=Object.create(e.prototype,n),Object.defineProperty(t.prototype,"constructor",{value:t,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},Oa=(t,e,r,n)=>{let i,s,o;const u={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),s=i.length;s-- >0;)o=i[s],(!n||n(o,t,e))&&!u[o]&&(e[o]=t[o],u[o]=!0);t=r!==!1&&Mr(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},Ca=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const n=t.indexOf(e,r);return n!==-1&&n===r},Ra=t=>{if(!t)return null;if(pt(t))return t;let e=t.length;if(!ei(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},Fa=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Mr(Uint8Array)),La=(t,e)=>{const n=(t&&t[er]).call(t);let i;for(;(i=n.next())&&!i.done;){const s=i.value;e.call(t,s[0],s[1])}},_a=(t,e)=>{let r;const n=[];for(;(r=t.exec(e))!==null;)n.push(r);return n},Ua=Re("HTMLFormElement"),Ba=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ni=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ka=Re("RegExp"),ii=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),n={};Ct(r,(i,s)=>{let o;(o=e(i,s,t))!==!1&&(n[s]=o||i)}),Object.defineProperties(t,n)},$a=t=>{ii(t,(e,r)=>{if(xe(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=t[r];if(xe(n)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ja=(t,e)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return pt(t)?n(t):n(String(t).split(e)),r},Ma=()=>{},Va=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Da(t){return!!(t&&xe(t.append)&&t[Zn]==="FormData"&&t[er])}const Ha=t=>{const e=new Array(10),r=(n,i)=>{if(Ot(n)){if(e.indexOf(n)>=0)return;if(St(n))return n;if(!("toJSON"in n)){e[i]=n;const s=pt(n)?[]:{};return Ct(n,(o,u)=>{const l=r(o,i+1);!gt(l)&&(s[u]=l)}),e[i]=void 0,s}}return n};return r(t,0)},qa=Re("AsyncFunction"),za=t=>t&&(Ot(t)||xe(t))&&xe(t.then)&&xe(t.catch),si=((t,e)=>t?setImmediate:e?((r,n)=>(tt.addEventListener("message",({source:i,data:s})=>{i===tt&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),tt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",xe(tt.postMessage)),Wa=typeof queueMicrotask<"u"?queueMicrotask.bind(tt):typeof Ue<"u"&&Ue.nextTick||si;var I={isArray:pt,isArrayBuffer:Qn,isBuffer:St,isFormData:wa,isArrayBufferView:ca,isString:fa,isNumber:ei,isBoolean:ha,isObject:Ot,isPlainObject:nr,isEmptyObject:da,isReadableStream:Ea,isRequest:va,isResponse:Ta,isHeaders:Aa,isUndefined:gt,isDate:pa,isFile:ga,isBlob:ma,isRegExp:ka,isFunction:xe,isStream:ba,isURLSearchParams:xa,isTypedArray:Fa,isFileList:ya,forEach:Ct,merge:Vr,extend:Pa,trim:Na,stripBOM:Ia,inherits:Sa,toFlatObject:Oa,kindOf:tr,kindOfTest:Re,endsWith:Ca,toArray:Ra,forEachEntry:La,matchAll:_a,isHTMLForm:Ua,hasOwnProperty:ni,hasOwnProp:ni,reduceDescriptors:ii,freezeMethods:$a,toObjectSet:ja,toCamelCase:Ba,noop:Ma,toFiniteNumber:Va,findKey:ti,global:tt,isContextDefined:ri,isSpecCompliantForm:Da,toJSONObject:Ha,isAsyncFn:qa,isThenable:za,setImmediate:si,asap:Wa,isIterable:t=>t!=null&&xe(t[er])},oi={},ir={};ir.byteLength=Ja,ir.toByteArray=Xa,ir.fromByteArray=eu;for(var Be=[],Ie=[],Ga=typeof Uint8Array<"u"?Uint8Array:Array,Dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mt=0,Ka=Dr.length;mt<Ka;++mt)Be[mt]=Dr[mt],Ie[Dr.charCodeAt(mt)]=mt;Ie[45]=62,Ie[95]=63;function ai(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");r===-1&&(r=e);var n=r===e?0:4-r%4;return[r,n]}function Ja(t){var e=ai(t),r=e[0],n=e[1];return(r+n)*3/4-n}function Ya(t,e,r){return(e+r)*3/4-r}function Xa(t){var e,r=ai(t),n=r[0],i=r[1],s=new Ga(Ya(t,n,i)),o=0,u=i>0?n-4:n,l;for(l=0;l<u;l+=4)e=Ie[t.charCodeAt(l)]<<18|Ie[t.charCodeAt(l+1)]<<12|Ie[t.charCodeAt(l+2)]<<6|Ie[t.charCodeAt(l+3)],s[o++]=e>>16&255,s[o++]=e>>8&255,s[o++]=e&255;return i===2&&(e=Ie[t.charCodeAt(l)]<<2|Ie[t.charCodeAt(l+1)]>>4,s[o++]=e&255),i===1&&(e=Ie[t.charCodeAt(l)]<<10|Ie[t.charCodeAt(l+1)]<<4|Ie[t.charCodeAt(l+2)]>>2,s[o++]=e>>8&255,s[o++]=e&255),s}function Za(t){return Be[t>>18&63]+Be[t>>12&63]+Be[t>>6&63]+Be[t&63]}function Qa(t,e,r){for(var n,i=[],s=e;s<r;s+=3)n=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(t[s+2]&255),i.push(Za(n));return i.join("")}function eu(t){for(var e,r=t.length,n=r%3,i=[],s=16383,o=0,u=r-n;o<u;o+=s)i.push(Qa(t,o,o+s>u?u:o+s));return n===1?(e=t[r-1],i.push(Be[e>>2]+Be[e<<4&63]+"==")):n===2&&(e=(t[r-2]<<8)+t[r-1],i.push(Be[e>>10]+Be[e>>4&63]+Be[e<<2&63]+"=")),i.join("")}var Hr={};Hr.read=function(t,e,r,n,i){var s,o,u=i*8-n-1,l=(1<<u)-1,c=l>>1,a=-7,h=r?i-1:0,p=r?-1:1,y=t[e+h];for(h+=p,s=y&(1<<-a)-1,y>>=-a,a+=u;a>0;s=s*256+t[e+h],h+=p,a-=8);for(o=s&(1<<-a)-1,s>>=-a,a+=n;a>0;o=o*256+t[e+h],h+=p,a-=8);if(s===0)s=1-c;else{if(s===l)return o?NaN:(y?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(y?-1:1)*o*Math.pow(2,s-n)},Hr.write=function(t,e,r,n,i,s){var o,u,l,c=s*8-i-1,a=(1<<c)-1,h=a>>1,p=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,y=n?0:s-1,g=n?1:-1,m=e<0||e===0&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(u=isNaN(e)?1:0,o=a):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?e+=p/l:e+=p*Math.pow(2,1-h),e*l>=2&&(o++,l/=2),o+h>=a?(u=0,o=a):o+h>=1?(u=(e*l-1)*Math.pow(2,i),o=o+h):(u=e*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;t[r+y]=u&255,y+=g,u/=256,i-=8);for(o=o<<i|u,c+=i;c>0;t[r+y]=o&255,y+=g,o/=256,c-=8);t[r+y-g]|=m*128};(function(t){const e=ir,r=Hr,n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=a,t.SlowBuffer=S,t.INSPECT_MAX_BYTES=50;const i=2147483647;t.kMaxLength=i;const{Uint8Array:s,ArrayBuffer:o,SharedArrayBuffer:u}=globalThis;a.TYPED_ARRAY_SUPPORT=l(),!a.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function l(){try{const w=new s(1),f={foo:function(){return 42}};return Object.setPrototypeOf(f,s.prototype),Object.setPrototypeOf(w,f),w.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function c(w){if(w>i)throw new RangeError('The value "'+w+'" is invalid for option "size"');const f=new s(w);return Object.setPrototypeOf(f,a.prototype),f}function a(w,f,d){if(typeof w=="number"){if(typeof f=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return g(w)}return h(w,f,d)}a.poolSize=8192;function h(w,f,d){if(typeof w=="string")return m(w,f);if(o.isView(w))return v(w);if(w==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w);if($e(w,o)||w&&$e(w.buffer,o)||typeof u<"u"&&($e(w,u)||w&&$e(w.buffer,u)))return E(w,f,d);if(typeof w=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=w.valueOf&&w.valueOf();if(x!=null&&x!==w)return a.from(x,f,d);const A=T(w);if(A)return A;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof w[Symbol.toPrimitive]=="function")return a.from(w[Symbol.toPrimitive]("string"),f,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof w)}a.from=function(w,f,d){return h(w,f,d)},Object.setPrototypeOf(a.prototype,s.prototype),Object.setPrototypeOf(a,s);function p(w){if(typeof w!="number")throw new TypeError('"size" argument must be of type number');if(w<0)throw new RangeError('The value "'+w+'" is invalid for option "size"')}function y(w,f,d){return p(w),w<=0?c(w):f!==void 0?typeof d=="string"?c(w).fill(f,d):c(w).fill(f):c(w)}a.alloc=function(w,f,d){return y(w,f,d)};function g(w){return p(w),c(w<0?0:N(w)|0)}a.allocUnsafe=function(w){return g(w)},a.allocUnsafeSlow=function(w){return g(w)};function m(w,f){if((typeof f!="string"||f==="")&&(f="utf8"),!a.isEncoding(f))throw new TypeError("Unknown encoding: "+f);const d=F(w,f)|0;let x=c(d);const A=x.write(w,f);return A!==d&&(x=x.slice(0,A)),x}function b(w){const f=w.length<0?0:N(w.length)|0,d=c(f);for(let x=0;x<f;x+=1)d[x]=w[x]&255;return d}function v(w){if($e(w,s)){const f=new s(w);return E(f.buffer,f.byteOffset,f.byteLength)}return b(w)}function E(w,f,d){if(f<0||w.byteLength<f)throw new RangeError('"offset" is outside of buffer bounds');if(w.byteLength<f+(d||0))throw new RangeError('"length" is outside of buffer bounds');let x;return f===void 0&&d===void 0?x=new s(w):d===void 0?x=new s(w,f):x=new s(w,f,d),Object.setPrototypeOf(x,a.prototype),x}function T(w){if(a.isBuffer(w)){const f=N(w.length)|0,d=c(f);return d.length===0||w.copy(d,0,0,f),d}if(w.length!==void 0)return typeof w.length!="number"||Vn(w.length)?c(0):b(w);if(w.type==="Buffer"&&Array.isArray(w.data))return b(w.data)}function N(w){if(w>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return w|0}function S(w){return+w!=w&&(w=0),a.alloc(+w)}a.isBuffer=function(f){return f!=null&&f._isBuffer===!0&&f!==a.prototype},a.compare=function(f,d){if($e(f,s)&&(f=a.from(f,f.offset,f.byteLength)),$e(d,s)&&(d=a.from(d,d.offset,d.byteLength)),!a.isBuffer(f)||!a.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(f===d)return 0;let x=f.length,A=d.length;for(let P=0,O=Math.min(x,A);P<O;++P)if(f[P]!==d[P]){x=f[P],A=d[P];break}return x<A?-1:A<x?1:0},a.isEncoding=function(f){switch(String(f).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(f,d){if(!Array.isArray(f))throw new TypeError('"list" argument must be an Array of Buffers');if(f.length===0)return a.alloc(0);let x;if(d===void 0)for(d=0,x=0;x<f.length;++x)d+=f[x].length;const A=a.allocUnsafe(d);let P=0;for(x=0;x<f.length;++x){let O=f[x];if($e(O,s))P+O.length>A.length?(a.isBuffer(O)||(O=a.from(O)),O.copy(A,P)):s.prototype.set.call(A,O,P);else if(a.isBuffer(O))O.copy(A,P);else throw new TypeError('"list" argument must be an Array of Buffers');P+=O.length}return A};function F(w,f){if(a.isBuffer(w))return w.length;if(o.isView(w)||$e(w,o))return w.byteLength;if(typeof w!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof w);const d=w.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&d===0)return 0;let A=!1;for(;;)switch(f){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return Mn(w).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Ko(w).length;default:if(A)return x?-1:Mn(w).length;f=(""+f).toLowerCase(),A=!0}}a.byteLength=F;function L(w,f,d){let x=!1;if((f===void 0||f<0)&&(f=0),f>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,f>>>=0,d<=f))return"";for(w||(w="utf8");;)switch(w){case"hex":return ce(this,f,d);case"utf8":case"utf-8":return ae(this,f,d);case"ascii":return Xe(this,f,d);case"latin1":case"binary":return re(this,f,d);case"base64":return J(this,f,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ze(this,f,d);default:if(x)throw new TypeError("Unknown encoding: "+w);w=(w+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function U(w,f,d){const x=w[f];w[f]=w[d],w[d]=x}a.prototype.swap16=function(){const f=this.length;if(f%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<f;d+=2)U(this,d,d+1);return this},a.prototype.swap32=function(){const f=this.length;if(f%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<f;d+=4)U(this,d,d+3),U(this,d+1,d+2);return this},a.prototype.swap64=function(){const f=this.length;if(f%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<f;d+=8)U(this,d,d+7),U(this,d+1,d+6),U(this,d+2,d+5),U(this,d+3,d+4);return this},a.prototype.toString=function(){const f=this.length;return f===0?"":arguments.length===0?ae(this,0,f):L.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(f){if(!a.isBuffer(f))throw new TypeError("Argument must be a Buffer");return this===f?!0:a.compare(this,f)===0},a.prototype.inspect=function(){let f="";const d=t.INSPECT_MAX_BYTES;return f=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(f+=" ... "),"<Buffer "+f+">"},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(f,d,x,A,P){if($e(f,s)&&(f=a.from(f,f.offset,f.byteLength)),!a.isBuffer(f))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof f);if(d===void 0&&(d=0),x===void 0&&(x=f?f.length:0),A===void 0&&(A=0),P===void 0&&(P=this.length),d<0||x>f.length||A<0||P>this.length)throw new RangeError("out of range index");if(A>=P&&d>=x)return 0;if(A>=P)return-1;if(d>=x)return 1;if(d>>>=0,x>>>=0,A>>>=0,P>>>=0,this===f)return 0;let O=P-A,k=x-d;const Y=Math.min(O,k),z=this.slice(A,P),X=f.slice(d,x);for(let V=0;V<Y;++V)if(z[V]!==X[V]){O=z[V],k=X[V];break}return O<k?-1:k<O?1:0};function _(w,f,d,x,A){if(w.length===0)return-1;if(typeof d=="string"?(x=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,Vn(d)&&(d=A?0:w.length-1),d<0&&(d=w.length+d),d>=w.length){if(A)return-1;d=w.length-1}else if(d<0)if(A)d=0;else return-1;if(typeof f=="string"&&(f=a.from(f,x)),a.isBuffer(f))return f.length===0?-1:j(w,f,d,x,A);if(typeof f=="number")return f=f&255,typeof s.prototype.indexOf=="function"?A?s.prototype.indexOf.call(w,f,d):s.prototype.lastIndexOf.call(w,f,d):j(w,[f],d,x,A);throw new TypeError("val must be string, number or Buffer")}function j(w,f,d,x,A){let P=1,O=w.length,k=f.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(w.length<2||f.length<2)return-1;P=2,O/=2,k/=2,d/=2}function Y(X,V){return P===1?X[V]:X.readUInt16BE(V*P)}let z;if(A){let X=-1;for(z=d;z<O;z++)if(Y(w,z)===Y(f,X===-1?0:z-X)){if(X===-1&&(X=z),z-X+1===k)return X*P}else X!==-1&&(z-=z-X),X=-1}else for(d+k>O&&(d=O-k),z=d;z>=0;z--){let X=!0;for(let V=0;V<k;V++)if(Y(w,z+V)!==Y(f,V)){X=!1;break}if(X)return z}return-1}a.prototype.includes=function(f,d,x){return this.indexOf(f,d,x)!==-1},a.prototype.indexOf=function(f,d,x){return _(this,f,d,x,!0)},a.prototype.lastIndexOf=function(f,d,x){return _(this,f,d,x,!1)};function pe(w,f,d,x){d=Number(d)||0;const A=w.length-d;x?(x=Number(x),x>A&&(x=A)):x=A;const P=f.length;x>P/2&&(x=P/2);let O;for(O=0;O<x;++O){const k=parseInt(f.substr(O*2,2),16);if(Vn(k))return O;w[d+O]=k}return O}function oe(w,f,d,x){return _r(Mn(f,w.length-d),w,d,x)}function R(w,f,d,x){return _r(Vg(f),w,d,x)}function le(w,f,d,x){return _r(Ko(f),w,d,x)}function Pe(w,f,d,x){return _r(Dg(f,w.length-d),w,d,x)}a.prototype.write=function(f,d,x,A){if(d===void 0)A="utf8",x=this.length,d=0;else if(x===void 0&&typeof d=="string")A=d,x=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(x)?(x=x>>>0,A===void 0&&(A="utf8")):(A=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const P=this.length-d;if((x===void 0||x>P)&&(x=P),f.length>0&&(x<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");let O=!1;for(;;)switch(A){case"hex":return pe(this,f,d,x);case"utf8":case"utf-8":return oe(this,f,d,x);case"ascii":case"latin1":case"binary":return R(this,f,d,x);case"base64":return le(this,f,d,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,f,d,x);default:if(O)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),O=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(w,f,d){return f===0&&d===w.length?e.fromByteArray(w):e.fromByteArray(w.slice(f,d))}function ae(w,f,d){d=Math.min(w.length,d);const x=[];let A=f;for(;A<d;){const P=w[A];let O=null,k=P>239?4:P>223?3:P>191?2:1;if(A+k<=d){let Y,z,X,V;switch(k){case 1:P<128&&(O=P);break;case 2:Y=w[A+1],(Y&192)===128&&(V=(P&31)<<6|Y&63,V>127&&(O=V));break;case 3:Y=w[A+1],z=w[A+2],(Y&192)===128&&(z&192)===128&&(V=(P&15)<<12|(Y&63)<<6|z&63,V>2047&&(V<55296||V>57343)&&(O=V));break;case 4:Y=w[A+1],z=w[A+2],X=w[A+3],(Y&192)===128&&(z&192)===128&&(X&192)===128&&(V=(P&15)<<18|(Y&63)<<12|(z&63)<<6|X&63,V>65535&&V<1114112&&(O=V))}}O===null?(O=65533,k=1):O>65535&&(O-=65536,x.push(O>>>10&1023|55296),O=56320|O&1023),x.push(O),A+=k}return ke(x)}const K=4096;function ke(w){const f=w.length;if(f<=K)return String.fromCharCode.apply(String,w);let d="",x=0;for(;x<f;)d+=String.fromCharCode.apply(String,w.slice(x,x+=K));return d}function Xe(w,f,d){let x="";d=Math.min(w.length,d);for(let A=f;A<d;++A)x+=String.fromCharCode(w[A]&127);return x}function re(w,f,d){let x="";d=Math.min(w.length,d);for(let A=f;A<d;++A)x+=String.fromCharCode(w[A]);return x}function ce(w,f,d){const x=w.length;(!f||f<0)&&(f=0),(!d||d<0||d>x)&&(d=x);let A="";for(let P=f;P<d;++P)A+=Hg[w[P]];return A}function Ze(w,f,d){const x=w.slice(f,d);let A="";for(let P=0;P<x.length-1;P+=2)A+=String.fromCharCode(x[P]+x[P+1]*256);return A}a.prototype.slice=function(f,d){const x=this.length;f=~~f,d=d===void 0?x:~~d,f<0?(f+=x,f<0&&(f=0)):f>x&&(f=x),d<0?(d+=x,d<0&&(d=0)):d>x&&(d=x),d<f&&(d=f);const A=this.subarray(f,d);return Object.setPrototypeOf(A,a.prototype),A};function D(w,f,d){if(w%1!==0||w<0)throw new RangeError("offset is not uint");if(w+f>d)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=this[f],P=1,O=0;for(;++O<d&&(P*=256);)A+=this[f+O]*P;return A},a.prototype.readUintBE=a.prototype.readUIntBE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=this[f+--d],P=1;for(;d>0&&(P*=256);)A+=this[f+--d]*P;return A},a.prototype.readUint8=a.prototype.readUInt8=function(f,d){return f=f>>>0,d||D(f,1,this.length),this[f]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(f,d){return f=f>>>0,d||D(f,2,this.length),this[f]|this[f+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(f,d){return f=f>>>0,d||D(f,2,this.length),this[f]<<8|this[f+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(f,d){return f=f>>>0,d||D(f,4,this.length),(this[f]|this[f+1]<<8|this[f+2]<<16)+this[f+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(f,d){return f=f>>>0,d||D(f,4,this.length),this[f]*16777216+(this[f+1]<<16|this[f+2]<<8|this[f+3])},a.prototype.readBigUInt64LE=Qe(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=d+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24,P=this[++f]+this[++f]*2**8+this[++f]*2**16+x*2**24;return BigInt(A)+(BigInt(P)<<BigInt(32))}),a.prototype.readBigUInt64BE=Qe(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=d*2**24+this[++f]*2**16+this[++f]*2**8+this[++f],P=this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x;return(BigInt(A)<<BigInt(32))+BigInt(P)}),a.prototype.readIntLE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=this[f],P=1,O=0;for(;++O<d&&(P*=256);)A+=this[f+O]*P;return P*=128,A>=P&&(A-=Math.pow(2,8*d)),A},a.prototype.readIntBE=function(f,d,x){f=f>>>0,d=d>>>0,x||D(f,d,this.length);let A=d,P=1,O=this[f+--A];for(;A>0&&(P*=256);)O+=this[f+--A]*P;return P*=128,O>=P&&(O-=Math.pow(2,8*d)),O},a.prototype.readInt8=function(f,d){return f=f>>>0,d||D(f,1,this.length),this[f]&128?(255-this[f]+1)*-1:this[f]},a.prototype.readInt16LE=function(f,d){f=f>>>0,d||D(f,2,this.length);const x=this[f]|this[f+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(f,d){f=f>>>0,d||D(f,2,this.length);const x=this[f+1]|this[f]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(f,d){return f=f>>>0,d||D(f,4,this.length),this[f]|this[f+1]<<8|this[f+2]<<16|this[f+3]<<24},a.prototype.readInt32BE=function(f,d){return f=f>>>0,d||D(f,4,this.length),this[f]<<24|this[f+1]<<16|this[f+2]<<8|this[f+3]},a.prototype.readBigInt64LE=Qe(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=this[f+4]+this[f+5]*2**8+this[f+6]*2**16+(x<<24);return(BigInt(A)<<BigInt(32))+BigInt(d+this[++f]*2**8+this[++f]*2**16+this[++f]*2**24)}),a.prototype.readBigInt64BE=Qe(function(f){f=f>>>0,It(f,"offset");const d=this[f],x=this[f+7];(d===void 0||x===void 0)&&Xt(f,this.length-8);const A=(d<<24)+this[++f]*2**16+this[++f]*2**8+this[++f];return(BigInt(A)<<BigInt(32))+BigInt(this[++f]*2**24+this[++f]*2**16+this[++f]*2**8+x)}),a.prototype.readFloatLE=function(f,d){return f=f>>>0,d||D(f,4,this.length),r.read(this,f,!0,23,4)},a.prototype.readFloatBE=function(f,d){return f=f>>>0,d||D(f,4,this.length),r.read(this,f,!1,23,4)},a.prototype.readDoubleLE=function(f,d){return f=f>>>0,d||D(f,8,this.length),r.read(this,f,!0,52,8)},a.prototype.readDoubleBE=function(f,d){return f=f>>>0,d||D(f,8,this.length),r.read(this,f,!1,52,8)};function q(w,f,d,x,A,P){if(!a.isBuffer(w))throw new TypeError('"buffer" argument must be a Buffer instance');if(f>A||f<P)throw new RangeError('"value" argument is out of bounds');if(d+x>w.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(f,d,x,A){if(f=+f,d=d>>>0,x=x>>>0,!A){const k=Math.pow(2,8*x)-1;q(this,f,d,x,k,0)}let P=1,O=0;for(this[d]=f&255;++O<x&&(P*=256);)this[d+O]=f/P&255;return d+x},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(f,d,x,A){if(f=+f,d=d>>>0,x=x>>>0,!A){const k=Math.pow(2,8*x)-1;q(this,f,d,x,k,0)}let P=x-1,O=1;for(this[d+P]=f&255;--P>=0&&(O*=256);)this[d+P]=f/O&255;return d+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,1,255,0),this[d]=f&255,d+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,2,65535,0),this[d]=f&255,this[d+1]=f>>>8,d+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,2,65535,0),this[d]=f>>>8,this[d+1]=f&255,d+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,4,4294967295,0),this[d+3]=f>>>24,this[d+2]=f>>>16,this[d+1]=f>>>8,this[d]=f&255,d+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,4,4294967295,0),this[d]=f>>>24,this[d+1]=f>>>16,this[d+2]=f>>>8,this[d+3]=f&255,d+4};function Lr(w,f,d,x,A){Go(f,x,A,w,d,7);let P=Number(f&BigInt(4294967295));w[d++]=P,P=P>>8,w[d++]=P,P=P>>8,w[d++]=P,P=P>>8,w[d++]=P;let O=Number(f>>BigInt(32)&BigInt(4294967295));return w[d++]=O,O=O>>8,w[d++]=O,O=O>>8,w[d++]=O,O=O>>8,w[d++]=O,d}function Do(w,f,d,x,A){Go(f,x,A,w,d,7);let P=Number(f&BigInt(4294967295));w[d+7]=P,P=P>>8,w[d+6]=P,P=P>>8,w[d+5]=P,P=P>>8,w[d+4]=P;let O=Number(f>>BigInt(32)&BigInt(4294967295));return w[d+3]=O,O=O>>8,w[d+2]=O,O=O>>8,w[d+1]=O,O=O>>8,w[d]=O,d+8}a.prototype.writeBigUInt64LE=Qe(function(f,d=0){return Lr(this,f,d,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Qe(function(f,d=0){return Do(this,f,d,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(f,d,x,A){if(f=+f,d=d>>>0,!A){const Y=Math.pow(2,8*x-1);q(this,f,d,x,Y-1,-Y)}let P=0,O=1,k=0;for(this[d]=f&255;++P<x&&(O*=256);)f<0&&k===0&&this[d+P-1]!==0&&(k=1),this[d+P]=(f/O>>0)-k&255;return d+x},a.prototype.writeIntBE=function(f,d,x,A){if(f=+f,d=d>>>0,!A){const Y=Math.pow(2,8*x-1);q(this,f,d,x,Y-1,-Y)}let P=x-1,O=1,k=0;for(this[d+P]=f&255;--P>=0&&(O*=256);)f<0&&k===0&&this[d+P+1]!==0&&(k=1),this[d+P]=(f/O>>0)-k&255;return d+x},a.prototype.writeInt8=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,1,127,-128),f<0&&(f=255+f+1),this[d]=f&255,d+1},a.prototype.writeInt16LE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,2,32767,-32768),this[d]=f&255,this[d+1]=f>>>8,d+2},a.prototype.writeInt16BE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,2,32767,-32768),this[d]=f>>>8,this[d+1]=f&255,d+2},a.prototype.writeInt32LE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,4,2147483647,-2147483648),this[d]=f&255,this[d+1]=f>>>8,this[d+2]=f>>>16,this[d+3]=f>>>24,d+4},a.prototype.writeInt32BE=function(f,d,x){return f=+f,d=d>>>0,x||q(this,f,d,4,2147483647,-2147483648),f<0&&(f=4294967295+f+1),this[d]=f>>>24,this[d+1]=f>>>16,this[d+2]=f>>>8,this[d+3]=f&255,d+4},a.prototype.writeBigInt64LE=Qe(function(f,d=0){return Lr(this,f,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Qe(function(f,d=0){return Do(this,f,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ho(w,f,d,x,A,P){if(d+x>w.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function qo(w,f,d,x,A){return f=+f,d=d>>>0,A||Ho(w,f,d,4),r.write(w,f,d,x,23,4),d+4}a.prototype.writeFloatLE=function(f,d,x){return qo(this,f,d,!0,x)},a.prototype.writeFloatBE=function(f,d,x){return qo(this,f,d,!1,x)};function zo(w,f,d,x,A){return f=+f,d=d>>>0,A||Ho(w,f,d,8),r.write(w,f,d,x,52,8),d+8}a.prototype.writeDoubleLE=function(f,d,x){return zo(this,f,d,!0,x)},a.prototype.writeDoubleBE=function(f,d,x){return zo(this,f,d,!1,x)},a.prototype.copy=function(f,d,x,A){if(!a.isBuffer(f))throw new TypeError("argument should be a Buffer");if(x||(x=0),!A&&A!==0&&(A=this.length),d>=f.length&&(d=f.length),d||(d=0),A>0&&A<x&&(A=x),A===x||f.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(x<0||x>=this.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("sourceEnd out of bounds");A>this.length&&(A=this.length),f.length-d<A-x&&(A=f.length-d+x);const P=A-x;return this===f&&typeof s.prototype.copyWithin=="function"?this.copyWithin(d,x,A):s.prototype.set.call(f,this.subarray(x,A),d),P},a.prototype.fill=function(f,d,x,A){if(typeof f=="string"){if(typeof d=="string"?(A=d,d=0,x=this.length):typeof x=="string"&&(A=x,x=this.length),A!==void 0&&typeof A!="string")throw new TypeError("encoding must be a string");if(typeof A=="string"&&!a.isEncoding(A))throw new TypeError("Unknown encoding: "+A);if(f.length===1){const O=f.charCodeAt(0);(A==="utf8"&&O<128||A==="latin1")&&(f=O)}}else typeof f=="number"?f=f&255:typeof f=="boolean"&&(f=Number(f));if(d<0||this.length<d||this.length<x)throw new RangeError("Out of range index");if(x<=d)return this;d=d>>>0,x=x===void 0?this.length:x>>>0,f||(f=0);let P;if(typeof f=="number")for(P=d;P<x;++P)this[P]=f;else{const O=a.isBuffer(f)?f:a.from(f,A),k=O.length;if(k===0)throw new TypeError('The value "'+f+'" is invalid for argument "value"');for(P=0;P<x-d;++P)this[P+d]=O[P%k]}return this};const Pt={};function jn(w,f,d){Pt[w]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:f.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${w}]`,this.stack,delete this.name}get code(){return w}set code(A){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:A,writable:!0})}toString(){return`${this.name} [${w}]: ${this.message}`}}}jn("ERR_BUFFER_OUT_OF_BOUNDS",function(w){return w?`${w} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),jn("ERR_INVALID_ARG_TYPE",function(w,f){return`The "${w}" argument must be of type number. Received type ${typeof f}`},TypeError),jn("ERR_OUT_OF_RANGE",function(w,f,d){let x=`The value of "${w}" is out of range.`,A=d;return Number.isInteger(d)&&Math.abs(d)>2**32?A=Wo(String(d)):typeof d=="bigint"&&(A=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(A=Wo(A)),A+="n"),x+=` It must be ${f}. Received ${A}`,x},RangeError);function Wo(w){let f="",d=w.length;const x=w[0]==="-"?1:0;for(;d>=x+4;d-=3)f=`_${w.slice(d-3,d)}${f}`;return`${w.slice(0,d)}${f}`}function $g(w,f,d){It(f,"offset"),(w[f]===void 0||w[f+d]===void 0)&&Xt(f,w.length-(d+1))}function Go(w,f,d,x,A,P){if(w>d||w<f){const O=typeof f=="bigint"?"n":"";let k;throw f===0||f===BigInt(0)?k=`>= 0${O} and < 2${O} ** ${(P+1)*8}${O}`:k=`>= -(2${O} ** ${(P+1)*8-1}${O}) and < 2 ** ${(P+1)*8-1}${O}`,new Pt.ERR_OUT_OF_RANGE("value",k,w)}$g(x,A,P)}function It(w,f){if(typeof w!="number")throw new Pt.ERR_INVALID_ARG_TYPE(f,"number",w)}function Xt(w,f,d){throw Math.floor(w)!==w?(It(w,d),new Pt.ERR_OUT_OF_RANGE("offset","an integer",w)):f<0?new Pt.ERR_BUFFER_OUT_OF_BOUNDS:new Pt.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${f}`,w)}const jg=/[^+/0-9A-Za-z-_]/g;function Mg(w){if(w=w.split("=")[0],w=w.trim().replace(jg,""),w.length<2)return"";for(;w.length%4!==0;)w=w+"=";return w}function Mn(w,f){f=f||1/0;let d;const x=w.length;let A=null;const P=[];for(let O=0;O<x;++O){if(d=w.charCodeAt(O),d>55295&&d<57344){if(!A){if(d>56319){(f-=3)>-1&&P.push(239,191,189);continue}else if(O+1===x){(f-=3)>-1&&P.push(239,191,189);continue}A=d;continue}if(d<56320){(f-=3)>-1&&P.push(239,191,189),A=d;continue}d=(A-55296<<10|d-56320)+65536}else A&&(f-=3)>-1&&P.push(239,191,189);if(A=null,d<128){if((f-=1)<0)break;P.push(d)}else if(d<2048){if((f-=2)<0)break;P.push(d>>6|192,d&63|128)}else if(d<65536){if((f-=3)<0)break;P.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((f-=4)<0)break;P.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return P}function Vg(w){const f=[];for(let d=0;d<w.length;++d)f.push(w.charCodeAt(d)&255);return f}function Dg(w,f){let d,x,A;const P=[];for(let O=0;O<w.length&&!((f-=2)<0);++O)d=w.charCodeAt(O),x=d>>8,A=d%256,P.push(A),P.push(x);return P}function Ko(w){return e.toByteArray(Mg(w))}function _r(w,f,d,x){let A;for(A=0;A<x&&!(A+d>=f.length||A>=w.length);++A)f[A+d]=w[A];return A}function $e(w,f){return w instanceof f||w!=null&&w.constructor!=null&&w.constructor.name!=null&&w.constructor.name===f.name}function Vn(w){return w!==w}const Hg=(function(){const w="0123456789abcdef",f=new Array(256);for(let d=0;d<16;++d){const x=d*16;for(let A=0;A<16;++A)f[x+A]=w[d]+w[A]}return f})();function Qe(w){return typeof BigInt>"u"?qg:w}function qg(){throw new Error("BigInt not supported")}})(oi);const ui=oi.Buffer;let B=class Jo extends Error{static from(e,r,n,i,s,o){const u=new Jo(e.message,r||e.code,n,i,s);return u.cause=e,u.name=e.name,o&&Object.assign(u,o),u}constructor(e,r,n,i,s){super(e),this.name="AxiosError",this.isAxiosError=!0,r&&(this.code=r),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status)}toJSON(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:I.toJSONObject(this.config),code:this.code,status:this.status}}};B.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",B.ERR_BAD_OPTION="ERR_BAD_OPTION",B.ECONNABORTED="ECONNABORTED",B.ETIMEDOUT="ETIMEDOUT",B.ERR_NETWORK="ERR_NETWORK",B.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",B.ERR_DEPRECATED="ERR_DEPRECATED",B.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",B.ERR_BAD_REQUEST="ERR_BAD_REQUEST",B.ERR_CANCELED="ERR_CANCELED",B.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",B.ERR_INVALID_URL="ERR_INVALID_URL";var tu=null;function qr(t){return I.isPlainObject(t)||I.isArray(t)}function li(t){return I.endsWith(t,"[]")?t.slice(0,-2):t}function ci(t,e,r){return t?t.concat(e).map(function(i,s){return i=li(i),!r&&s?"["+i+"]":i}).join(r?".":""):e}function ru(t){return I.isArray(t)&&!t.some(qr)}const nu=I.toFlatObject(I,{},null,function(e){return/^is[A-Z]/.test(e)});function sr(t,e,r){if(!I.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=I.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,b){return!I.isUndefined(b[m])});const n=r.metaTokens,i=r.visitor||a,s=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&I.isSpecCompliantForm(e);if(!I.isFunction(i))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(I.isDate(g))return g.toISOString();if(I.isBoolean(g))return g.toString();if(!l&&I.isBlob(g))throw new B("Blob is not supported. Use a Buffer instead.");return I.isArrayBuffer(g)||I.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):ui.from(g):g}function a(g,m,b){let v=g;if(g&&!b&&typeof g=="object"){if(I.endsWith(m,"{}"))m=n?m:m.slice(0,-2),g=JSON.stringify(g);else if(I.isArray(g)&&ru(g)||(I.isFileList(g)||I.endsWith(m,"[]"))&&(v=I.toArray(g)))return m=li(m),v.forEach(function(T,N){!(I.isUndefined(T)||T===null)&&e.append(o===!0?ci([m],N,s):o===null?m:m+"[]",c(T))}),!1}return qr(g)?!0:(e.append(ci(b,m,s),c(g)),!1)}const h=[],p=Object.assign(nu,{defaultVisitor:a,convertValue:c,isVisitable:qr});function y(g,m){if(!I.isUndefined(g)){if(h.indexOf(g)!==-1)throw Error("Circular reference detected in "+m.join("."));h.push(g),I.forEach(g,function(v,E){(!(I.isUndefined(v)||v===null)&&i.call(e,v,I.isString(E)?E.trim():E,m,p))===!0&&y(v,m?m.concat(E):[E])}),h.pop()}}if(!I.isObject(t))throw new TypeError("data must be an object");return y(t),e}function fi(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(n){return e[n]})}function zr(t,e){this._pairs=[],t&&sr(t,this,e)}const hi=zr.prototype;hi.append=function(e,r){this._pairs.push([e,r])},hi.toString=function(e){const r=e?function(n){return e.call(this,n,fi)}:fi;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function iu(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function di(t,e,r){if(!e)return t;const n=r&&r.encode||iu,i=I.isFunction(r)?{serialize:r}:r,s=i&&i.serialize;let o;if(s?o=s(e,i):o=I.isURLSearchParams(e)?e.toString():new zr(e,i).toString(n),o){const u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+o}return t}class pi{constructor(){this.handlers=[]}use(e,r,n){return this.handlers.push({fulfilled:e,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){I.forEach(this.handlers,function(n){n!==null&&e(n)})}}var Wr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},su=typeof URLSearchParams<"u"?URLSearchParams:zr,ou=typeof FormData<"u"?FormData:null,au=typeof Blob<"u"?Blob:null,uu={isBrowser:!0,classes:{URLSearchParams:su,FormData:ou,Blob:au},protocols:["http","https","file","blob","url","data"]};const Gr=typeof window<"u"&&typeof document<"u",Kr=typeof navigator=="object"&&navigator||void 0,lu=Gr&&(!Kr||["ReactNative","NativeScript","NS"].indexOf(Kr.product)<0),cu=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",fu=Gr&&window.location.href||"http://localhost";var hu=Object.freeze({__proto__:null,hasBrowserEnv:Gr,hasStandardBrowserEnv:lu,hasStandardBrowserWebWorkerEnv:cu,navigator:Kr,origin:fu}),fe={...hu,...uu};function du(t,e){return sr(t,new fe.classes.URLSearchParams,{visitor:function(r,n,i,s){return fe.isNode&&I.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...e})}function pu(t){return I.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gu(t){const e={},r=Object.keys(t);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],e[s]=t[s];return e}function gi(t){function e(r,n,i,s){let o=r[s++];if(o==="__proto__")return!0;const u=Number.isFinite(+o),l=s>=r.length;return o=!o&&I.isArray(i)?i.length:o,l?(I.hasOwnProp(i,o)?i[o]=[i[o],n]:i[o]=n,!u):((!i[o]||!I.isObject(i[o]))&&(i[o]=[]),e(r,n,i[o],s)&&I.isArray(i[o])&&(i[o]=gu(i[o])),!u)}if(I.isFormData(t)&&I.isFunction(t.entries)){const r={};return I.forEachEntry(t,(n,i)=>{e(pu(n),i,r,0)}),r}return null}function mu(t,e,r){if(I.isString(t))try{return(e||JSON.parse)(t),I.trim(t)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(t)}const Rt={transitional:Wr,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=I.isObject(e);if(s&&I.isHTMLForm(e)&&(e=new FormData(e)),I.isFormData(e))return i?JSON.stringify(gi(e)):e;if(I.isArrayBuffer(e)||I.isBuffer(e)||I.isStream(e)||I.isFile(e)||I.isBlob(e)||I.isReadableStream(e))return e;if(I.isArrayBufferView(e))return e.buffer;if(I.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return du(e,this.formSerializer).toString();if((u=I.isFileList(e))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return sr(u?{"files[]":e}:e,l&&new l,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),mu(e)):e}],transformResponse:[function(e){const r=this.transitional||Rt.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(I.isResponse(e)||I.isReadableStream(e))return e;if(e&&I.isString(e)&&(n&&!this.responseType||i)){const o=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(u){if(o)throw u.name==="SyntaxError"?B.from(u,B.ERR_BAD_RESPONSE,this,null,this.response):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};I.forEach(["delete","get","head","post","put","patch"],t=>{Rt.headers[t]={}});const yu=I.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"]);var bu=t=>{const e={};let r,n,i;return t&&t.split(`
2
- `).forEach(function(o){i=o.indexOf(":"),r=o.substring(0,i).trim().toLowerCase(),n=o.substring(i+1).trim(),!(!r||e[r]&&yu[r])&&(r==="set-cookie"?e[r]?e[r].push(n):e[r]=[n]:e[r]=e[r]?e[r]+", "+n:n)}),e};const mi=Symbol("internals");function Ft(t){return t&&String(t).trim().toLowerCase()}function or(t){return t===!1||t==null?t:I.isArray(t)?t.map(or):String(t)}function wu(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(t);)e[n[1]]=n[2];return e}const xu=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Jr(t,e,r,n,i){if(I.isFunction(n))return n.call(this,e,r);if(i&&(e=r),!!I.isString(e)){if(I.isString(n))return e.indexOf(n)!==-1;if(I.isRegExp(n))return n.test(e)}}function Eu(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,n)=>r.toUpperCase()+n)}function vu(t,e){const r=I.toCamelCase(" "+e);["get","set","has"].forEach(n=>{Object.defineProperty(t,n+r,{value:function(i,s,o){return this[n].call(this,e,i,s,o)},configurable:!0})})}let Ee=class{constructor(e){e&&this.set(e)}set(e,r,n){const i=this;function s(u,l,c){const a=Ft(l);if(!a)throw new Error("header name must be a non-empty string");const h=I.findKey(i,a);(!h||i[h]===void 0||c===!0||c===void 0&&i[h]!==!1)&&(i[h||l]=or(u))}const o=(u,l)=>I.forEach(u,(c,a)=>s(c,a,l));if(I.isPlainObject(e)||e instanceof this.constructor)o(e,r);else if(I.isString(e)&&(e=e.trim())&&!xu(e))o(bu(e),r);else if(I.isObject(e)&&I.isIterable(e)){let u={},l,c;for(const a of e){if(!I.isArray(a))throw TypeError("Object iterator must return a key-value pair");u[c=a[0]]=(l=u[c])?I.isArray(l)?[...l,a[1]]:[l,a[1]]:a[1]}o(u,r)}else e!=null&&s(r,e,n);return this}get(e,r){if(e=Ft(e),e){const n=I.findKey(this,e);if(n){const i=this[n];if(!r)return i;if(r===!0)return wu(i);if(I.isFunction(r))return r.call(this,i,n);if(I.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=Ft(e),e){const n=I.findKey(this,e);return!!(n&&this[n]!==void 0&&(!r||Jr(this,this[n],n,r)))}return!1}delete(e,r){const n=this;let i=!1;function s(o){if(o=Ft(o),o){const u=I.findKey(n,o);u&&(!r||Jr(n,n[u],u,r))&&(delete n[u],i=!0)}}return I.isArray(e)?e.forEach(s):s(e),i}clear(e){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!e||Jr(this,this[s],s,e,!0))&&(delete this[s],i=!0)}return i}normalize(e){const r=this,n={};return I.forEach(this,(i,s)=>{const o=I.findKey(n,s);if(o){r[o]=or(i),delete r[s];return}const u=e?Eu(s):String(s).trim();u!==s&&delete r[s],r[u]=or(i),n[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return I.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=e&&I.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(`
3
- `)}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,...r){const n=new this(e);return r.forEach(i=>n.set(i)),n}static accessor(e){const n=(this[mi]=this[mi]={accessors:{}}).accessors,i=this.prototype;function s(o){const u=Ft(o);n[u]||(vu(i,o),n[u]=!0)}return I.isArray(e)?e.forEach(s):s(e),this}};Ee.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),I.reduceDescriptors(Ee.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(n){this[r]=n}}}),I.freezeMethods(Ee);function Yr(t,e){const r=this||Rt,n=e||r,i=Ee.from(n.headers);let s=n.data;return I.forEach(t,function(u){s=u.call(r,s,i.normalize(),e?e.status:void 0)}),i.normalize(),s}function yi(t){return!!(t&&t.__CANCEL__)}let Lt=class extends B{constructor(e,r,n){super(e??"canceled",B.ERR_CANCELED,r,n),this.name="CanceledError",this.__CANCEL__=!0}};function bi(t,e,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?t(r):e(new B("Request failed with status code "+r.status,[B.ERR_BAD_REQUEST,B.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Tu(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Au(t,e){t=t||10;const r=new Array(t),n=new Array(t);let i=0,s=0,o;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),a=n[s];o||(o=c),r[i]=l,n[i]=c;let h=s,p=0;for(;h!==i;)p+=r[h++],h=h%t;if(i=(i+1)%t,i===s&&(s=(s+1)%t),c-o<e)return;const y=a&&c-a;return y?Math.round(p*1e3/y):void 0}}function Nu(t,e){let r=0,n=1e3/e,i,s;const o=(c,a=Date.now())=>{r=a,i=null,s&&(clearTimeout(s),s=null),t(...c)};return[(...c)=>{const a=Date.now(),h=a-r;h>=n?o(c,a):(i=c,s||(s=setTimeout(()=>{s=null,o(i)},n-h)))},()=>i&&o(i)]}const ar=(t,e,r=3)=>{let n=0;const i=Au(50,250);return Nu(s=>{const o=s.loaded,u=s.lengthComputable?s.total:void 0,l=o-n,c=i(l),a=o<=u;n=o;const h={loaded:o,total:u,progress:u?o/u:void 0,bytes:l,rate:c||void 0,estimated:c&&u&&a?(u-o)/c:void 0,event:s,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(h)},r)},wi=(t,e)=>{const r=t!=null;return[n=>e[0]({lengthComputable:r,total:t,loaded:n}),e[1]]},xi=t=>(...e)=>I.asap(()=>t(...e));var Pu=fe.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,fe.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Iu=fe.hasStandardBrowserEnv?{write(t,e,r,n,i,s,o){if(typeof document>"u")return;const u=[`${t}=${encodeURIComponent(e)}`];I.isNumber(r)&&u.push(`expires=${new Date(r).toUTCString()}`),I.isString(n)&&u.push(`path=${n}`),I.isString(i)&&u.push(`domain=${i}`),s===!0&&u.push("secure"),I.isString(o)&&u.push(`SameSite=${o}`),document.cookie=u.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Su(t){return typeof t!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ou(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ei(t,e,r){let n=!Su(e);return t&&(n||r==!1)?Ou(t,e):e}const vi=t=>t instanceof Ee?{...t}:t;function rt(t,e){e=e||{};const r={};function n(c,a,h,p){return I.isPlainObject(c)&&I.isPlainObject(a)?I.merge.call({caseless:p},c,a):I.isPlainObject(a)?I.merge({},a):I.isArray(a)?a.slice():a}function i(c,a,h,p){if(I.isUndefined(a)){if(!I.isUndefined(c))return n(void 0,c,h,p)}else return n(c,a,h,p)}function s(c,a){if(!I.isUndefined(a))return n(void 0,a)}function o(c,a){if(I.isUndefined(a)){if(!I.isUndefined(c))return n(void 0,c)}else return n(void 0,a)}function u(c,a,h){if(h in e)return n(c,a);if(h in t)return n(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u,headers:(c,a,h)=>i(vi(c),vi(a),h,!0)};return I.forEach(Object.keys({...t,...e}),function(a){if(a==="__proto__"||a==="constructor"||a==="prototype")return;const h=I.hasOwnProp(l,a)?l[a]:i,p=h(t[a],e[a],a);I.isUndefined(p)&&h!==u||(r[a]=p)}),r}var Ti=t=>{const e=rt({},t);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:o,auth:u}=e;if(e.headers=o=Ee.from(o),e.url=di(Ei(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),u&&o.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):""))),I.isFormData(r)){if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(I.isFunction(r.getHeaders)){const l=r.getHeaders(),c=["content-type","content-length"];Object.entries(l).forEach(([a,h])=>{c.includes(a.toLowerCase())&&o.set(a,h)})}}if(fe.hasStandardBrowserEnv&&(n&&I.isFunction(n)&&(n=n(e)),n||n!==!1&&Pu(e.url))){const l=i&&s&&Iu.read(s);l&&o.set(i,l)}return e},Cu=typeof XMLHttpRequest<"u"&&function(t){return new Promise(function(r,n){const i=Ti(t);let s=i.data;const o=Ee.from(i.headers).normalize();let{responseType:u,onUploadProgress:l,onDownloadProgress:c}=i,a,h,p,y,g;function m(){y&&y(),g&&g(),i.cancelToken&&i.cancelToken.unsubscribe(a),i.signal&&i.signal.removeEventListener("abort",a)}let b=new XMLHttpRequest;b.open(i.method.toUpperCase(),i.url,!0),b.timeout=i.timeout;function v(){if(!b)return;const T=Ee.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:T,config:t,request:b};bi(function(L){r(L),m()},function(L){n(L),m()},S),b=null}"onloadend"in b?b.onloadend=v:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(v)},b.onabort=function(){b&&(n(new B("Request aborted",B.ECONNABORTED,t,b)),b=null)},b.onerror=function(N){const S=N&&N.message?N.message:"Network Error",F=new B(S,B.ERR_NETWORK,t,b);F.event=N||null,n(F),b=null},b.ontimeout=function(){let N=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const S=i.transitional||Wr;i.timeoutErrorMessage&&(N=i.timeoutErrorMessage),n(new B(N,S.clarifyTimeoutError?B.ETIMEDOUT:B.ECONNABORTED,t,b)),b=null},s===void 0&&o.setContentType(null),"setRequestHeader"in b&&I.forEach(o.toJSON(),function(N,S){b.setRequestHeader(S,N)}),I.isUndefined(i.withCredentials)||(b.withCredentials=!!i.withCredentials),u&&u!=="json"&&(b.responseType=i.responseType),c&&([p,g]=ar(c,!0),b.addEventListener("progress",p)),l&&b.upload&&([h,y]=ar(l),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(a=T=>{b&&(n(!T||T.type?new Lt(null,t,b):T),b.abort(),b=null)},i.cancelToken&&i.cancelToken.subscribe(a),i.signal&&(i.signal.aborted?a():i.signal.addEventListener("abort",a)));const E=Tu(i.url);if(E&&fe.protocols.indexOf(E)===-1){n(new B("Unsupported protocol "+E+":",B.ERR_BAD_REQUEST,t));return}b.send(s||null)})};const Ru=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let n=new AbortController,i;const s=function(c){if(!i){i=!0,u();const a=c instanceof Error?c:this.reason;n.abort(a instanceof B?a:new Lt(a instanceof Error?a.message:a))}};let o=e&&setTimeout(()=>{o=null,s(new B(`timeout of ${e}ms exceeded`,B.ETIMEDOUT))},e);const u=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(c=>{c.unsubscribe?c.unsubscribe(s):c.removeEventListener("abort",s)}),t=null)};t.forEach(c=>c.addEventListener("abort",s));const{signal:l}=n;return l.unsubscribe=()=>I.asap(u),l}},Fu=function*(t,e){let r=t.byteLength;if(r<e){yield t;return}let n=0,i;for(;n<r;)i=n+e,yield t.slice(n,i),n=i},Lu=async function*(t,e){for await(const r of _u(t))yield*Fu(r,e)},_u=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:r,value:n}=await e.read();if(r)break;yield n}}finally{await e.cancel()}},Ai=(t,e,r,n)=>{const i=Lu(t,e);let s=0,o,u=l=>{o||(o=!0,n&&n(l))};return new ReadableStream({async pull(l){try{const{done:c,value:a}=await i.next();if(c){u(),l.close();return}let h=a.byteLength;if(r){let p=s+=h;r(p)}l.enqueue(new Uint8Array(a))}catch(c){throw u(c),c}},cancel(l){return u(l),i.return()}},{highWaterMark:2})},Ni=64*1024,{isFunction:ur}=I,Uu=(({Request:t,Response:e})=>({Request:t,Response:e}))(I.global),{ReadableStream:Pi,TextEncoder:Ii}=I.global,Si=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Bu=t=>{t=I.merge.call({skipUndefined:!0},Uu,t);const{fetch:e,Request:r,Response:n}=t,i=e?ur(e):typeof fetch=="function",s=ur(r),o=ur(n);if(!i)return!1;const u=i&&ur(Pi),l=i&&(typeof Ii=="function"?(g=>m=>g.encode(m))(new Ii):async g=>new Uint8Array(await new r(g).arrayBuffer())),c=s&&u&&Si(()=>{let g=!1;const m=new r(fe.origin,{body:new Pi,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!m}),a=o&&u&&Si(()=>I.isReadableStream(new n("").body)),h={stream:a&&(g=>g.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!h[g]&&(h[g]=(m,b)=>{let v=m&&m[g];if(v)return v.call(m);throw new B(`Response type '${g}' is not supported`,B.ERR_NOT_SUPPORT,b)})});const p=async g=>{if(g==null)return 0;if(I.isBlob(g))return g.size;if(I.isSpecCompliantForm(g))return(await new r(fe.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(I.isArrayBufferView(g)||I.isArrayBuffer(g))return g.byteLength;if(I.isURLSearchParams(g)&&(g=g+""),I.isString(g))return(await l(g)).byteLength},y=async(g,m)=>{const b=I.toFiniteNumber(g.getContentLength());return b??p(m)};return async g=>{let{url:m,method:b,data:v,signal:E,cancelToken:T,timeout:N,onDownloadProgress:S,onUploadProgress:F,responseType:L,headers:U,withCredentials:_="same-origin",fetchOptions:j}=Ti(g),pe=e||fetch;L=L?(L+"").toLowerCase():"text";let oe=Ru([E,T&&T.toAbortSignal()],N),R=null;const le=oe&&oe.unsubscribe&&(()=>{oe.unsubscribe()});let Pe;try{if(F&&c&&b!=="get"&&b!=="head"&&(Pe=await y(U,v))!==0){let re=new r(m,{method:"POST",body:v,duplex:"half"}),ce;if(I.isFormData(v)&&(ce=re.headers.get("content-type"))&&U.setContentType(ce),re.body){const[Ze,D]=wi(Pe,ar(xi(F)));v=Ai(re.body,Ni,Ze,D)}}I.isString(_)||(_=_?"include":"omit");const J=s&&"credentials"in r.prototype,ae={...j,signal:oe,method:b.toUpperCase(),headers:U.normalize().toJSON(),body:v,duplex:"half",credentials:J?_:void 0};R=s&&new r(m,ae);let K=await(s?pe(R,j):pe(m,ae));const ke=a&&(L==="stream"||L==="response");if(a&&(S||ke&&le)){const re={};["status","statusText","headers"].forEach(q=>{re[q]=K[q]});const ce=I.toFiniteNumber(K.headers.get("content-length")),[Ze,D]=S&&wi(ce,ar(xi(S),!0))||[];K=new n(Ai(K.body,Ni,Ze,()=>{D&&D(),le&&le()}),re)}L=L||"text";let Xe=await h[I.findKey(h,L)||"text"](K,g);return!ke&&le&&le(),await new Promise((re,ce)=>{bi(re,ce,{data:Xe,headers:Ee.from(K.headers),status:K.status,statusText:K.statusText,config:g,request:R})})}catch(J){throw le&&le(),J&&J.name==="TypeError"&&/Load failed|fetch/i.test(J.message)?Object.assign(new B("Network Error",B.ERR_NETWORK,g,R,J&&J.response),{cause:J.cause||J}):B.from(J,J&&J.code,g,R,J&&J.response)}}},ku=new Map,Oi=t=>{let e=t&&t.env||{};const{fetch:r,Request:n,Response:i}=e,s=[n,i,r];let o=s.length,u=o,l,c,a=ku;for(;u--;)l=s[u],c=a.get(l),c===void 0&&a.set(l,c=u?new Map:Bu(e)),a=c;return c};Oi();const Xr={http:tu,xhr:Cu,fetch:{get:Oi}};I.forEach(Xr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Ci=t=>`- ${t}`,$u=t=>I.isFunction(t)||t===null||t===!1;function ju(t,e){t=I.isArray(t)?t:[t];const{length:r}=t;let n,i;const s={};for(let o=0;o<r;o++){n=t[o];let u;if(i=n,!$u(n)&&(i=Xr[(u=String(n)).toLowerCase()],i===void 0))throw new B(`Unknown adapter '${u}'`);if(i&&(I.isFunction(i)||(i=i.get(e))))break;s[u||"#"+o]=i}if(!i){const o=Object.entries(s).map(([l,c])=>`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let u=r?o.length>1?`since :
4
- `+o.map(Ci).join(`
5
- `):" "+Ci(o[0]):"as no adapter specified";throw new B("There is no suitable adapter to dispatch the request "+u,"ERR_NOT_SUPPORT")}return i}var Ri={getAdapter:ju,adapters:Xr};function Zr(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Lt(null,t)}function Fi(t){return Zr(t),t.headers=Ee.from(t.headers),t.data=Yr.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Ri.getAdapter(t.adapter||Rt.adapter,t)(t).then(function(n){return Zr(t),n.data=Yr.call(t,t.transformResponse,n),n.headers=Ee.from(n.headers),n},function(n){return yi(n)||(Zr(t),n&&n.response&&(n.response.data=Yr.call(t,t.transformResponse,n.response),n.response.headers=Ee.from(n.response.headers))),Promise.reject(n)})}const Li="1.13.5",lr={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{lr[t]=function(n){return typeof n===t||"a"+(e<1?"n ":" ")+t}});const _i={};lr.transitional=function(e,r,n){function i(s,o){return"[Axios v"+Li+"] Transitional option '"+s+"'"+o+(n?". "+n:"")}return(s,o,u)=>{if(e===!1)throw new B(i(o," has been removed"+(r?" in "+r:"")),B.ERR_DEPRECATED);return r&&!_i[o]&&(_i[o]=!0,console.warn(i(o," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(s,o,u):!0}},lr.spelling=function(e){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Mu(t,e,r){if(typeof t!="object")throw new B("options must be an object",B.ERR_BAD_OPTION_VALUE);const n=Object.keys(t);let i=n.length;for(;i-- >0;){const s=n[i],o=e[s];if(o){const u=t[s],l=u===void 0||o(u,s,t);if(l!==!0)throw new B("option "+s+" must be "+l,B.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new B("Unknown option "+s,B.ERR_BAD_OPTION)}}var cr={assertOptions:Mu,validators:lr};const Se=cr.validators;let nt=class{constructor(e){this.defaults=e||{},this.interceptors={request:new pi,response:new pi}}async request(e,r){try{return await this._request(e,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+s):n.stack=s}catch{}}throw n}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=rt(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&cr.assertOptions(n,{silentJSONParsing:Se.transitional(Se.boolean),forcedJSONParsing:Se.transitional(Se.boolean),clarifyTimeoutError:Se.transitional(Se.boolean),legacyInterceptorReqResOrdering:Se.transitional(Se.boolean)},!1),i!=null&&(I.isFunction(i)?r.paramsSerializer={serialize:i}:cr.assertOptions(i,{encode:Se.function,serialize:Se.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),cr.assertOptions(r,{baseUrl:Se.spelling("baseURL"),withXsrfToken:Se.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=s&&I.merge(s.common,s[r.method]);s&&I.forEach(["delete","get","head","post","put","patch","common"],g=>{delete s[g]}),r.headers=Ee.concat(o,s);const u=[];let l=!0;this.interceptors.request.forEach(function(m){if(typeof m.runWhen=="function"&&m.runWhen(r)===!1)return;l=l&&m.synchronous;const b=r.transitional||Wr;b&&b.legacyInterceptorReqResOrdering?u.unshift(m.fulfilled,m.rejected):u.push(m.fulfilled,m.rejected)});const c=[];this.interceptors.response.forEach(function(m){c.push(m.fulfilled,m.rejected)});let a,h=0,p;if(!l){const g=[Fi.bind(this),void 0];for(g.unshift(...u),g.push(...c),p=g.length,a=Promise.resolve(r);h<p;)a=a.then(g[h++],g[h++]);return a}p=u.length;let y=r;for(;h<p;){const g=u[h++],m=u[h++];try{y=g(y)}catch(b){m.call(this,b);break}}try{a=Fi.call(this,y)}catch(g){return Promise.reject(g)}for(h=0,p=c.length;h<p;)a=a.then(c[h++],c[h++]);return a}getUri(e){e=rt(this.defaults,e);const r=Ei(e.baseURL,e.url,e.allowAbsoluteUrls);return di(r,e.params,e.paramsSerializer)}};I.forEach(["delete","get","head","options"],function(e){nt.prototype[e]=function(r,n){return this.request(rt(n||{},{method:e,url:r,data:(n||{}).data}))}}),I.forEach(["post","put","patch"],function(e){function r(n){return function(s,o,u){return this.request(rt(u||{},{method:e,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}nt.prototype[e]=r(),nt.prototype[e+"Form"]=r(!0)});let Vu=class Yo{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(u=>{n.subscribe(u),s=u}).then(i);return o.cancel=function(){n.unsubscribe(s)},o},e(function(s,o,u){n.reason||(n.reason=new Lt(s,o,u),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=n=>{e.abort(n)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Yo(function(i){e=i}),cancel:e}}};function Du(t){return function(r){return t.apply(null,r)}}function Hu(t){return I.isObject(t)&&t.isAxiosError===!0}const Qr={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Qr).forEach(([t,e])=>{Qr[e]=t});function Ui(t){const e=new nt(t),r=Xn(nt.prototype.request,e);return I.extend(r,nt.prototype,e,{allOwnKeys:!0}),I.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return Ui(rt(t,i))},r}const Q=Ui(Rt);Q.Axios=nt,Q.CanceledError=Lt,Q.CancelToken=Vu,Q.isCancel=yi,Q.VERSION=Li,Q.toFormData=sr,Q.AxiosError=B,Q.Cancel=Q.CanceledError,Q.all=function(e){return Promise.all(e)},Q.spread=Du,Q.isAxiosError=Hu,Q.mergeConfig=rt,Q.AxiosHeaders=Ee,Q.formToJSON=t=>gi(I.isHTMLForm(t)?new FormData(t):t),Q.getAdapter=Ri.getAdapter,Q.HttpStatusCode=Qr,Q.default=Q;const{Axios:Gg,AxiosError:Kg,CanceledError:Jg,isCancel:Yg,CancelToken:Xg,VERSION:Zg,all:Qg,Cancel:e0,isAxiosError:t0,spread:r0,toFormData:n0,AxiosHeaders:i0,HttpStatusCode:s0,formToJSON:o0,getAdapter:a0,mergeConfig:u0}=Q,fr=t=>encodeURIComponent(t).split("%2F").join("/"),qu=/^(\w+:\/\/[^/?]+)?(.*?)$/,zu=t=>t.filter(e=>typeof e=="string"||typeof e=="number").map(e=>`${e}`).filter(e=>e),Wu=t=>{const e=t.join("/"),[,r="",n=""]=e.match(qu)||[];return{prefix:r,pathname:{parts:n.split("/").filter(i=>i!==""),hasLeading:/^\/+/.test(n),hasTrailing:/\/+$/.test(n)}}},Gu=(t,e)=>{const{prefix:r,pathname:n}=t,{parts:i,hasLeading:s,hasTrailing:o}=n,{leadingSlash:u,trailingSlash:l}=e,c=u===!0||u==="keep"&&s,a=l===!0||l==="keep"&&o;let h=r;return i.length>0&&((h||c)&&(h+="/"),h+=i.join("/")),a&&(h+="/"),!h&&c&&(h+="/"),h},$=(...t)=>{const e=t[t.length-1];let r;e&&typeof e=="object"&&(r=e,t=t.slice(0,-1)),r={leadingSlash:!0,trailingSlash:!1,...r},t=zu(t);const n=Wu(t);return Gu(n,r)};class Bi extends Error{response;statusCode;constructor(e,r,n=null){super(e),this.response=r,this.statusCode=n}}class Ku extends Bi{errorCode;constructor(e,r,n,i=null){super(e,n,i),this.errorCode=r}}function Ju(t,e=""){return`/public-files/${t}/${e}`.split("/").filter(Boolean).join("/")}function Yu(t,e=""){return`/ocm/${t}/${e}`.split("/").filter(Boolean).join("/")}class Fe{static Shared="S";static Shareable="R";static Mounted="M";static Deletable="D";static Renameable="N";static Moveable="V";static Updateable="NV";static FileUpdateable="W";static FolderCreateable="CK";static Deny="Z";static SecureView="X"}var De=(t=>(t.copy="COPY",t.delete="DELETE",t.lock="LOCK",t.mkcol="MKCOL",t.move="MOVE",t.propfind="PROPFIND",t.proppatch="PROPPATCH",t.put="PUT",t.report="REPORT",t.unlock="UNLOCK",t))(De||{});const hr=t=>({value:t,type:null}),Xu=t=>hr(t),M=t=>hr(t),dr=t=>hr(t),Zu=t=>hr(t),Qu={Permissions:M("permissions"),IsFavorite:dr("favorite"),FileId:M("fileid"),FileParent:M("file-parent"),Name:M("name"),OwnerId:M("owner-id"),OwnerDisplayName:M("owner-display-name"),PrivateLink:M("privatelink"),ContentLength:dr("getcontentlength"),ContentSize:dr("size"),LastModifiedDate:M("getlastmodified"),Tags:Xu("tags"),Audio:{value:"audio",type:null},Location:{value:"location",type:null},Image:{value:"image",type:null},Photo:{value:"photo",type:null},ETag:M("getetag"),MimeType:M("getcontenttype"),ResourceType:Zu("resourcetype"),LockDiscovery:{value:"lockdiscovery",type:null},LockOwner:M("owner"),LockTime:M("locktime"),ActiveLock:{value:"activelock",type:null},DownloadURL:M("downloadURL"),Highlights:M("highlights"),MetaPathForUser:M("meta-path-for-user"),RemoteItemId:M("remote-item-id"),HasPreview:dr("has-preview"),ShareId:M("shareid"),ShareRoot:M("shareroot"),ShareTypes:{value:"share-types",type:null},SharePermissions:M("share-permissions"),TrashbinOriginalFilename:M("trashbin-original-filename"),TrashbinOriginalLocation:M("trashbin-original-location"),TrashbinDeletedDate:M("trashbin-delete-datetime"),PublicLinkItemType:M("public-link-item-type"),PublicLinkPermission:M("public-link-permission"),PublicLinkExpiration:M("public-link-expiration"),PublicLinkShareDate:M("public-link-share-datetime"),PublicLinkShareOwner:M("public-link-share-owner")},C=Object.fromEntries(Object.entries(Qu).map(([t,e])=>[t,e.value]));class it{static Default=[C.Permissions,C.IsFavorite,C.FileId,C.FileParent,C.Name,C.LockDiscovery,C.ActiveLock,C.OwnerId,C.OwnerDisplayName,C.RemoteItemId,C.ShareRoot,C.ShareTypes,C.PrivateLink,C.ContentLength,C.ContentSize,C.LastModifiedDate,C.ETag,C.MimeType,C.ResourceType,C.Tags,C.Audio,C.Location,C.Image,C.Photo,C.HasPreview];static PublicLink=it.Default.concat([C.PublicLinkItemType,C.PublicLinkPermission,C.PublicLinkExpiration,C.PublicLinkShareDate,C.PublicLinkShareOwner]);static Trashbin=[C.ContentLength,C.ResourceType,C.TrashbinOriginalLocation,C.TrashbinOriginalFilename,C.TrashbinDeletedDate,C.Permissions,C.FileParent];static DavNamespace=[C.ContentLength,C.LastModifiedDate,C.ETag,C.MimeType,C.ResourceType,C.LockDiscovery,C.ActiveLock]}var el=typeof Ve=="object"&&Ve&&Ve.Object===Object&&Ve,tl=typeof self=="object"&&self&&self.Object===Object&&self,en=el||tl||Function("return this")(),yt=en.Symbol,ki=Object.prototype,rl=ki.hasOwnProperty,nl=ki.toString,_t=yt?yt.toStringTag:void 0;function il(t){var e=rl.call(t,_t),r=t[_t];try{t[_t]=void 0;var n=!0}catch{}var i=nl.call(t);return n&&(e?t[_t]=r:delete t[_t]),i}var sl=Object.prototype,ol=sl.toString;function al(t){return ol.call(t)}var ul="[object Null]",ll="[object Undefined]",$i=yt?yt.toStringTag:void 0;function ji(t){return t==null?t===void 0?ll:ul:$i&&$i in Object(t)?il(t):al(t)}function cl(t){return t!=null&&typeof t=="object"}var fl="[object Symbol]";function tn(t){return typeof t=="symbol"||cl(t)&&ji(t)==fl}function hl(t,e){for(var r=-1,n=t==null?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}var rn=Array.isArray,Mi=yt?yt.prototype:void 0,Vi=Mi?Mi.toString:void 0;function Di(t){if(typeof t=="string")return t;if(rn(t))return hl(t,Di)+"";if(tn(t))return Vi?Vi.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Hi(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var dl="[object AsyncFunction]",pl="[object Function]",gl="[object GeneratorFunction]",ml="[object Proxy]";function yl(t){if(!Hi(t))return!1;var e=ji(t);return e==pl||e==gl||e==dl||e==ml}var nn=en["__core-js_shared__"],qi=(function(){var t=/[^.]+$/.exec(nn&&nn.keys&&nn.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""})();function bl(t){return!!qi&&qi in t}var wl=Function.prototype,xl=wl.toString;function El(t){if(t!=null){try{return xl.call(t)}catch{}try{return t+""}catch{}}return""}var vl=/[\\^$.*+?()[\]{}|]/g,Tl=/^\[object .+?Constructor\]$/,Al=Function.prototype,Nl=Object.prototype,Pl=Al.toString,Il=Nl.hasOwnProperty,Sl=RegExp("^"+Pl.call(Il).replace(vl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ol(t){if(!Hi(t)||bl(t))return!1;var e=yl(t)?Sl:Tl;return e.test(El(t))}function Cl(t,e){return t?.[e]}function zi(t,e){var r=Cl(t,e);return Ol(r)?r:void 0}function Rl(t,e){return t===e||t!==t&&e!==e}var Fl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ll=/^\w*$/;function _l(t,e){if(rn(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||tn(t)?!0:Ll.test(t)||!Fl.test(t)||e!=null&&t in Object(e)}var Ut=zi(Object,"create");function Ul(){this.__data__=Ut?Ut(null):{},this.size=0}function Bl(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var kl="__lodash_hash_undefined__",$l=Object.prototype,jl=$l.hasOwnProperty;function Ml(t){var e=this.__data__;if(Ut){var r=e[t];return r===kl?void 0:r}return jl.call(e,t)?e[t]:void 0}var Vl=Object.prototype,Dl=Vl.hasOwnProperty;function Hl(t){var e=this.__data__;return Ut?e[t]!==void 0:Dl.call(e,t)}var ql="__lodash_hash_undefined__";function zl(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ut&&e===void 0?ql:e,this}function st(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}st.prototype.clear=Ul,st.prototype.delete=Bl,st.prototype.get=Ml,st.prototype.has=Hl,st.prototype.set=zl;function Wl(){this.__data__=[],this.size=0}function pr(t,e){for(var r=t.length;r--;)if(Rl(t[r][0],e))return r;return-1}var Gl=Array.prototype,Kl=Gl.splice;function Jl(t){var e=this.__data__,r=pr(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Kl.call(e,r,1),--this.size,!0}function Yl(t){var e=this.__data__,r=pr(e,t);return r<0?void 0:e[r][1]}function Xl(t){return pr(this.__data__,t)>-1}function Zl(t,e){var r=this.__data__,n=pr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function bt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}bt.prototype.clear=Wl,bt.prototype.delete=Jl,bt.prototype.get=Yl,bt.prototype.has=Xl,bt.prototype.set=Zl;var Ql=zi(en,"Map");function ec(){this.size=0,this.__data__={hash:new st,map:new(Ql||bt),string:new st}}function tc(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function gr(t,e){var r=t.__data__;return tc(e)?r[typeof e=="string"?"string":"hash"]:r.map}function rc(t){var e=gr(this,t).delete(t);return this.size-=e?1:0,e}function nc(t){return gr(this,t).get(t)}function ic(t){return gr(this,t).has(t)}function sc(t,e){var r=gr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ot(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ot.prototype.clear=ec,ot.prototype.delete=rc,ot.prototype.get=nc,ot.prototype.has=ic,ot.prototype.set=sc;var oc="Expected a function";function sn(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(oc);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=r.cache;if(s.has(i))return s.get(i);var o=t.apply(this,n);return r.cache=s.set(i,o)||s,o};return r.cache=new(sn.Cache||ot),r}sn.Cache=ot;var ac=500;function uc(t){var e=sn(t,function(n){return r.size===ac&&r.clear(),n}),r=e.cache;return e}var lc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cc=/\\(\\)?/g,fc=uc(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(lc,function(r,n,i,s){e.push(i?s.replace(cc,"$1"):n||r)}),e});function Bt(t){return t==null?"":Di(t)}function hc(t,e){return rn(t)?t:_l(t,e)?[t]:fc(Bt(t))}function dc(t){if(typeof t=="string"||tn(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function pc(t,e){e=hc(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[dc(e[r++])];return r&&r==n?t:void 0}function gc(t,e,r){var n=t==null?void 0:pc(t,e);return n===void 0?r:n}function mc(t,e,r){var n=-1,i=t.length;e<0&&(e=-e>i?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var s=Array(i);++n<i;)s[n]=t[n+e];return s}function yc(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:mc(t,e,r)}var bc="\\ud800-\\udfff",wc="\\u0300-\\u036f",xc="\\ufe20-\\ufe2f",Ec="\\u20d0-\\u20ff",vc=wc+xc+Ec,Tc="\\ufe0e\\ufe0f",Ac="\\u200d",Nc=RegExp("["+Ac+bc+vc+Tc+"]");function Wi(t){return Nc.test(t)}function Pc(t){return t.split("")}var Gi="\\ud800-\\udfff",Ic="\\u0300-\\u036f",Sc="\\ufe20-\\ufe2f",Oc="\\u20d0-\\u20ff",Cc=Ic+Sc+Oc,Rc="\\ufe0e\\ufe0f",Fc="["+Gi+"]",on="["+Cc+"]",an="\\ud83c[\\udffb-\\udfff]",Lc="(?:"+on+"|"+an+")",Ki="[^"+Gi+"]",Ji="(?:\\ud83c[\\udde6-\\uddff]){2}",Yi="[\\ud800-\\udbff][\\udc00-\\udfff]",_c="\\u200d",Xi=Lc+"?",Zi="["+Rc+"]?",Uc="(?:"+_c+"(?:"+[Ki,Ji,Yi].join("|")+")"+Zi+Xi+")*",Bc=Zi+Xi+Uc,kc="(?:"+[Ki+on+"?",on,Ji,Yi,Fc].join("|")+")",$c=RegExp(an+"(?="+an+")|"+kc+Bc,"g");function jc(t){return t.match($c)||[]}function Mc(t){return Wi(t)?jc(t):Pc(t)}function Vc(t){return function(e){e=Bt(e);var r=Wi(e)?Mc(e):void 0,n=r?r[0]:e.charAt(0),i=r?yc(r,1).join(""):e.slice(1);return n[t]()+i}}var Dc=Vc("toUpperCase");function Hc(t){return Dc(Bt(t).toLowerCase())}function qc(t,e,r,n){for(var i=-1,s=t==null?0:t.length;++i<s;)r=e(r,t[i],i,t);return r}function zc(t){return function(e){return t?.[e]}}var Wc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Gc=zc(Wc),Kc=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jc="\\u0300-\\u036f",Yc="\\ufe20-\\ufe2f",Xc="\\u20d0-\\u20ff",Zc=Jc+Yc+Xc,Qc="["+Zc+"]",ef=RegExp(Qc,"g");function tf(t){return t=Bt(t),t&&t.replace(Kc,Gc).replace(ef,"")}var rf=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function nf(t){return t.match(rf)||[]}var sf=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function of(t){return sf.test(t)}var Qi="\\ud800-\\udfff",af="\\u0300-\\u036f",uf="\\ufe20-\\ufe2f",lf="\\u20d0-\\u20ff",cf=af+uf+lf,es="\\u2700-\\u27bf",ts="a-z\\xdf-\\xf6\\xf8-\\xff",ff="\\xac\\xb1\\xd7\\xf7",hf="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",df="\\u2000-\\u206f",pf=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",rs="A-Z\\xc0-\\xd6\\xd8-\\xde",gf="\\ufe0e\\ufe0f",ns=ff+hf+df+pf,is="['’]",ss="["+ns+"]",mf="["+cf+"]",os="\\d+",yf="["+es+"]",as="["+ts+"]",us="[^"+Qi+ns+os+es+ts+rs+"]",bf="\\ud83c[\\udffb-\\udfff]",wf="(?:"+mf+"|"+bf+")",xf="[^"+Qi+"]",ls="(?:\\ud83c[\\udde6-\\uddff]){2}",cs="[\\ud800-\\udbff][\\udc00-\\udfff]",wt="["+rs+"]",Ef="\\u200d",fs="(?:"+as+"|"+us+")",vf="(?:"+wt+"|"+us+")",hs="(?:"+is+"(?:d|ll|m|re|s|t|ve))?",ds="(?:"+is+"(?:D|LL|M|RE|S|T|VE))?",ps=wf+"?",gs="["+gf+"]?",Tf="(?:"+Ef+"(?:"+[xf,ls,cs].join("|")+")"+gs+ps+")*",Af="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nf="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Pf=gs+ps+Tf,If="(?:"+[yf,ls,cs].join("|")+")"+Pf,Sf=RegExp([wt+"?"+as+"+"+hs+"(?="+[ss,wt,"$"].join("|")+")",vf+"+"+ds+"(?="+[ss,wt+fs,"$"].join("|")+")",wt+"?"+fs+"+"+hs,wt+"+"+ds,Nf,Af,os,If].join("|"),"g");function Of(t){return t.match(Sf)||[]}function Cf(t,e,r){return t=Bt(t),e=e,e===void 0?of(t)?Of(t):nf(t):t.match(e)||[]}var Rf="['’]",Ff=RegExp(Rf,"g");function Lf(t){return function(e){return qc(Cf(tf(e).replace(Ff,"")),t,"")}}var _f=Lf(function(t,e,r){return e=e.toLowerCase(),t+(r?Hc(e):e)});const Uf={complex:["tar.bz2","tar.gz","tar.xz"]},un=t=>t.replace(/[^A-Za-z0-9\-_]/g,""),ms=(t,e)=>!t||typeof t!="string"?"":t.indexOf("!")>=0?t.split("!")[e]:"",Bf=t=>ms(t,0),ys=t=>ms(t,1),bs=t=>{const r=t.name.split(".");if(r.length>2)for(let n=0;n<r.length;n++){const i=r.slice(n,r.length).join(".");if(Uf.complex.includes(i))return i}return r.length<2?"":r[r.length-1]},mr=t=>{if(!t)return t;const e={};return Object.keys(t).forEach(r=>{e[_f(r)]=t[r]}),e};function xt(t,e=[]){const r=t.props[C.Name]?.toString()||Qt.basename(t.filename),n=t.props[C.FileId],i=t.type==="directory";let s;t.filename.startsWith("/files")||t.filename.startsWith("/space")?s=t.filename.split("/").slice(3).join("/"):s=t.filename,s.startsWith("/")||(s=`/${s}`);const o=bs({...t,name:r}),u=t.props[C.LockDiscovery];let l,c,a;u&&(l=u[C.ActiveLock],c=l[C.LockOwner],a=l[C.LockTime]);let h=[];t.props[C.ShareTypes]&&(h=t.props[C.ShareTypes]["share-type"],Array.isArray(h)||(h=[h]));const p={};for(const g of e||[]){const m=g.split(":").pop();t.props[m]&&(p[g]=t.props[m])}const y={id:n,fileId:n,storageId:Bf(n),parentFolderId:t.props[C.FileParent],mimeType:t.props[C.MimeType],name:r,extension:o,path:s,webDavPath:t.filename,type:i?"folder":t.type,isFolder:i,locked:!!l,lockOwner:c,lockTime:a,processing:t.processing||!1,mdate:t.props[C.LastModifiedDate],size:i?t.props[C.ContentSize]?.toString()||"0":t.props[C.ContentLength]?.toString()||"0",permissions:t.props[C.Permissions]||"",starred:t.props[C.IsFavorite]!==0,etag:t.props[C.ETag],shareTypes:h,privateLink:t.props[C.PrivateLink],downloadURL:t.props[C.DownloadURL],remoteItemId:t.props[C.RemoteItemId],remoteItemPath:t.props[C.ShareRoot],owner:{id:t.props[C.OwnerId],displayName:t.props[C.OwnerDisplayName]},tags:(t.props[C.Tags]||"").toString().split(",").filter(Boolean),audio:mr(t.props[C.Audio]),location:mr(t.props[C.Location]),image:mr(t.props[C.Image]),photo:mr(t.props[C.Photo]),extraProps:p,hasPreview:()=>t.props[C.HasPreview]===1,canUpload:function(){return this.permissions.indexOf(Fe.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(Fe.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(Fe.Deletable)>=0},canRename:function(){return this.permissions.indexOf(Fe.Renameable)>=0},canShare:function({ability:g}){return g.can("create-all","Share")&&this.permissions.indexOf(Fe.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(Fe.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(Fe.Updateable)>=0||this.permissions.indexOf(Fe.FileUpdateable)>=0||this.permissions.indexOf(Fe.FolderCreateable)>=0},isMounted:function(){return this.permissions.indexOf(Fe.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(Fe.Shared)>=0},isShareRoot(){return t.props[C.ShareRoot]?t.filename.split("/").length===3:!1},getDomSelector:()=>un(n)};return Object.defineProperty(y,"nodeId",{get(){return ys(this.id)}}),y}function kf(t){const e=t.type==="directory",r=t.props[C.TrashbinOriginalFilename]?.toString(),n=bs({name:r,type:t.type}),i=Yn.basename(t.filename);return{type:e?"folder":t.type,isFolder:e,ddate:t.props[C.TrashbinDeletedDate],name:Yn.basename(r),extension:n,path:$(t.props[C.TrashbinOriginalLocation],{leadingSlash:!0}),id:i,parentFolderId:t.props[C.FileParent],webDavPath:"",canUpload:()=>!1,canDownload:()=>!1,canBeDeleted:()=>!0,canBeRestored:function(){return!0},canRename:()=>!1,canShare:()=>!1,canCreate:()=>!1,isMounted:()=>!1,isReceivedShare:()=>!1,hasPreview:()=>!1,isShareRoot:()=>!1,getDomSelector:()=>un(i)}}var Ne=(t=>(t.createUpload="libre.graph/driveItem/upload/create",t.createPermissions="libre.graph/driveItem/permissions/create",t.createChildren="libre.graph/driveItem/children/create",t.readBasic="libre.graph/driveItem/basic/read",t.readPath="libre.graph/driveItem/path/read",t.readQuota="libre.graph/driveItem/quota/read",t.readContent="libre.graph/driveItem/content/read",t.readChildren="libre.graph/driveItem/children/read",t.readDeleted="libre.graph/driveItem/deleted/read",t.readPermissions="libre.graph/driveItem/permissions/read",t.readVersions="libre.graph/driveItem/versions/read",t.updatePath="libre.graph/driveItem/path/update",t.updateDeleted="libre.graph/driveItem/deleted/update",t.updatePermissions="libre.graph/driveItem/permissions/update",t.updateVersions="libre.graph/driveItem/versions/update",t.deleteStandard="libre.graph/driveItem/standard/delete",t.deleteDeleted="libre.graph/driveItem/deleted/delete",t.deletePermissions="libre.graph/driveItem/permissions/delete",t))(Ne||{});const ln=t=>t?.driveType==="personal",cn=t=>t?.driveType==="public";function $f(t,e){return $("spaces",t,e,{leadingSlash:!0})}function fn(t,e=""){return $("spaces","trash-bin",t,e,{leadingSlash:!0})}function jf(t){const e=t.publicLinkPassword,r=t.props?.[C.FileId],n=t.props?.[C.PublicLinkItemType],i=t.props?.[C.PublicLinkPermission],s=t.props?.[C.PublicLinkExpiration],o=t.props?.[C.PublicLinkShareDate],u=t.props?.[C.PublicLinkShareOwner],l=t.publicLinkType;let c,a;return l==="ocm"?(c=`ocm/${t.id}`,a=Yu(t.id)):(c=`public/${t.id}`,a=Ju(t.id)),Object.assign(Mf({...t,driveType:"public",driveAlias:c,webDavPath:a}),{...r&&{fileId:r},...e&&{publicLinkPassword:e},...n&&{publicLinkItemType:n},...i&&{publicLinkPermission:parseInt(i)},...s&&{publicLinkExpiration:s},...o&&{publicLinkShareDate:o},...u&&{publicLinkShareOwner:u},publicLinkType:l})}function Mf(t){let e,r;t.special&&(e=t.special.find(c=>c.specialFolder.name==="image"),r=t.special.find(c=>c.specialFolder.name==="readme"),e&&(e.webDavUrl=decodeURI(e.webDavUrl)),r&&(r.webDavUrl=decodeURI(r.webDavUrl)));const n=t.root?.deleted?.state==="trashed",i=$(t.webDavPath||$f(t.id),{leadingSlash:!0}),s=$(t.serverUrl,"remote.php/dav",i),o=$(t.webDavTrashPath||fn(t.id),{leadingSlash:!0}),u=$(t.serverUrl,"remote.php/dav",o),l={id:t.id,fileId:t.id,storageId:t.id,mimeType:"",name:t.name,description:t.description,extension:"",path:"/",webDavPath:i,webDavTrashPath:o,driveAlias:t.driveAlias,driveType:t.driveType,type:"space",isFolder:!0,mdate:t.lastModifiedDateTime,size:t.quota?.used||0,tags:[],permissions:"",starred:!1,etag:"",shareTypes:[],privateLink:t.webUrl,downloadURL:"",owner:t.owner?.user,disabled:n,root:t.root,spaceQuota:t.quota,spaceImageData:e,spaceReadmeData:r,hasTrashedItems:t["@libre.graph.hasTrashedItems"]||!1,graphPermissions:void 0,canUpload:function({user:c}={}){return ln(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:c}={}){return this.disabled?c?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions):!1},canRename:function({ability:c}={}){return c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canEditDescription:function({ability:c}={}){return c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canRestore:function({ability:c}={}){return this.disabled?c?.can("update-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions):!1},canDisable:function({ability:c}={}){return this.disabled?!1:c?.can("delete-all","Drive")?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canShare:function(){return this.graphPermissions?.includes(Ne.createPermissions)},canEditImage:function(){return this.disabled?!1:this.graphPermissions?.includes(Ne.deletePermissions)},canEditReadme:function(){return this.disabled?!1:this.graphPermissions?.includes(Ne.deletePermissions)},canRestoreFromTrashbin:function(){return this.graphPermissions?.includes(Ne.updateDeleted)},canDeleteFromTrashBin:function({user:c}={}){return ln(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.deletePermissions)},canListVersions:function({user:c}={}){return ln(this)&&this.isOwner(c)?!0:this.graphPermissions?.includes(Ne.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return["share","mountpoint","public"].includes(t.driveType)},getDomSelector:()=>un(t.id),getDriveAliasAndItem({path:c}){return $(this.driveAlias,c,{leadingSlash:!1})},getWebDavUrl({path:c}){return $(s,c)},getWebDavTrashUrl({path:c}){return $(u,c)},isOwner(c){return c?.id===this.owner?.id}};return Object.defineProperty(l,"nodeId",{get(){return ys(this.id)}}),l}const Vf=(t,e)=>{const r=new URL(t);r.pathname=[...r.pathname.split("/"),"cloud","capabilities"].filter(Boolean).join("/"),r.searchParams.append("format","json");const n=r.href;return{async getCapabilities(){const i=await e.get(n);return gc(i,"data.ocs.data",{capabilities:null,version:null})}}};function Df(t){return t instanceof Uint8Array||ArrayBuffer.isView(t)&&t.constructor.name==="Uint8Array"}function kt(t,e=""){if(!Number.isSafeInteger(t)||t<0){const r=e&&`"${e}" `;throw new Error(`${r}expected integer >= 0, got ${t}`)}}function $t(t,e,r=""){const n=Df(t),i=t?.length,s=e!==void 0;if(!n||s&&i!==e){const o=r&&`"${r}" `,u=s?` of length ${e}`:"",l=n?`length=${i}`:`type=${typeof t}`;throw new Error(o+"expected Uint8Array"+u+", got "+l)}return t}function ws(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash must wrapped by utils.createHasher");kt(t.outputLen),kt(t.blockLen)}function yr(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function Hf(t,e){$t(t,void 0,"digestInto() output");const r=e.outputLen;if(t.length<r)throw new Error('"digestInto() output" expected to be of length >='+r)}function jt(...t){for(let e=0;e<t.length;e++)t[e].fill(0)}function br(t){return new DataView(t.buffer,t.byteOffset,t.byteLength)}function qf(t){if(typeof t!="string")throw new Error("string expected");return new Uint8Array(new TextEncoder().encode(t))}function xs(t,e=""){return typeof t=="string"?qf(t):$t(t,void 0,e)}function zf(t,e){if(e!==void 0&&{}.toString.call(e)!=="[object Object]")throw new Error("options must be object or undefined");return Object.assign(t,e)}function Wf(t,e={}){const r=(i,s)=>t(s).update(i).digest(),n=t(void 0);return r.outputLen=n.outputLen,r.blockLen=n.blockLen,r.create=i=>t(i),Object.assign(r,e),Object.freeze(r)}const Gf=t=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,t])});class Es{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,r){if(ws(e),$t(r,void 0,"key"),this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const n=this.blockLen,i=new Uint8Array(n);i.set(r.length>n?e.create().update(r).digest():r);for(let s=0;s<i.length;s++)i[s]^=54;this.iHash.update(i),this.oHash=e.create();for(let s=0;s<i.length;s++)i[s]^=106;this.oHash.update(i),jt(i)}update(e){return yr(this),this.iHash.update(e),this}digestInto(e){yr(this),$t(e,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});const{oHash:r,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:u}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=u,e.oHash=r._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const vs=(t,e,r)=>new Es(t,e).update(r).digest();vs.create=(t,e)=>new Es(t,e);function Kf(t,e,r,n){ws(t);const i=zf({dkLen:32,asyncTick:10},n),{c:s,dkLen:o,asyncTick:u}=i;if(kt(s,"c"),kt(o,"dkLen"),kt(u,"asyncTick"),s<1)throw new Error("iterations (c) must be >= 1");const l=xs(e,"password"),c=xs(r,"salt"),a=new Uint8Array(o),h=vs.create(t,l),p=h._cloneInto().update(c);return{c:s,dkLen:o,asyncTick:u,DK:a,PRF:h,PRFSalt:p}}function Jf(t,e,r,n,i){return t.destroy(),e.destroy(),n&&n.destroy(),jt(i),r}function Yf(t,e,r,n){const{c:i,dkLen:s,DK:o,PRF:u,PRFSalt:l}=Kf(t,e,r,n);let c;const a=new Uint8Array(4),h=br(a),p=new Uint8Array(u.outputLen);for(let y=1,g=0;g<s;y++,g+=u.outputLen){const m=o.subarray(g,g+u.outputLen);h.setInt32(0,y,!1),(c=l._cloneInto(c)).update(a).digestInto(p),m.set(p.subarray(0,m.length));for(let b=1;b<i;b++){u._cloneInto(c).update(p).digestInto(p);for(let v=0;v<m.length;v++)m[v]^=p[v]}}return Jf(u,l,o,c,p)}class Xf{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,r,n,i){this.blockLen=e,this.outputLen=r,this.padOffset=n,this.isLE=i,this.buffer=new Uint8Array(e),this.view=br(this.buffer)}update(e){yr(this),$t(e);const{view:r,buffer:n,blockLen:i}=this,s=e.length;for(let o=0;o<s;){const u=Math.min(i-this.pos,s-o);if(u===i){const l=br(e);for(;i<=s-o;o+=i)this.process(l,o);continue}n.set(e.subarray(o,o+u),this.pos),this.pos+=u,o+=u,this.pos===i&&(this.process(r,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){yr(this),Hf(e,this),this.finished=!0;const{buffer:r,view:n,blockLen:i,isLE:s}=this;let{pos:o}=this;r[o++]=128,jt(this.buffer.subarray(o)),this.padOffset>i-o&&(this.process(n,0),o=0);for(let h=o;h<i;h++)r[h]=0;n.setBigUint64(i-8,BigInt(this.length*8),s),this.process(n,0);const u=br(e),l=this.outputLen;if(l%4)throw new Error("_sha2: outputLen must be aligned to 32bit");const c=l/4,a=this.get();if(c>a.length)throw new Error("_sha2: outputLen bigger than state");for(let h=0;h<c;h++)u.setUint32(4*h,a[h],s)}digest(){const{buffer:e,outputLen:r}=this;this.digestInto(e);const n=e.slice(0,r);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());const{blockLen:r,buffer:n,length:i,finished:s,destroyed:o,pos:u}=this;return e.destroyed=o,e.finished=s,e.length=i,e.pos=u,i%r&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const he=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),wr=BigInt(2**32-1),Ts=BigInt(32);function Zf(t,e=!1){return e?{h:Number(t&wr),l:Number(t>>Ts&wr)}:{h:Number(t>>Ts&wr)|0,l:Number(t&wr)|0}}function Qf(t,e=!1){const r=t.length;let n=new Uint32Array(r),i=new Uint32Array(r);for(let s=0;s<r;s++){const{h:o,l:u}=Zf(t[s],e);[n[s],i[s]]=[o,u]}return[n,i]}const As=(t,e,r)=>t>>>r,Ns=(t,e,r)=>t<<32-r|e>>>r,Et=(t,e,r)=>t>>>r|e<<32-r,vt=(t,e,r)=>t<<32-r|e>>>r,xr=(t,e,r)=>t<<64-r|e>>>r-32,Er=(t,e,r)=>t>>>r-32|e<<64-r;function He(t,e,r,n){const i=(e>>>0)+(n>>>0);return{h:t+r+(i/2**32|0)|0,l:i|0}}const eh=(t,e,r)=>(t>>>0)+(e>>>0)+(r>>>0),th=(t,e,r,n)=>e+r+n+(t/2**32|0)|0,rh=(t,e,r,n)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0),nh=(t,e,r,n,i)=>e+r+n+i+(t/2**32|0)|0,ih=(t,e,r,n,i)=>(t>>>0)+(e>>>0)+(r>>>0)+(n>>>0)+(i>>>0),sh=(t,e,r,n,i,s)=>e+r+n+i+s+(t/2**32|0)|0,Ps=Qf(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(t=>BigInt(t))),oh=Ps[0],ah=Ps[1],Ge=new Uint32Array(80),Ke=new Uint32Array(80);class uh extends Xf{constructor(e){super(128,e,16,!1)}get(){const{Ah:e,Al:r,Bh:n,Bl:i,Ch:s,Cl:o,Dh:u,Dl:l,Eh:c,El:a,Fh:h,Fl:p,Gh:y,Gl:g,Hh:m,Hl:b}=this;return[e,r,n,i,s,o,u,l,c,a,h,p,y,g,m,b]}set(e,r,n,i,s,o,u,l,c,a,h,p,y,g,m,b){this.Ah=e|0,this.Al=r|0,this.Bh=n|0,this.Bl=i|0,this.Ch=s|0,this.Cl=o|0,this.Dh=u|0,this.Dl=l|0,this.Eh=c|0,this.El=a|0,this.Fh=h|0,this.Fl=p|0,this.Gh=y|0,this.Gl=g|0,this.Hh=m|0,this.Hl=b|0}process(e,r){for(let T=0;T<16;T++,r+=4)Ge[T]=e.getUint32(r),Ke[T]=e.getUint32(r+=4);for(let T=16;T<80;T++){const N=Ge[T-15]|0,S=Ke[T-15]|0,F=Et(N,S,1)^Et(N,S,8)^As(N,S,7),L=vt(N,S,1)^vt(N,S,8)^Ns(N,S,7),U=Ge[T-2]|0,_=Ke[T-2]|0,j=Et(U,_,19)^xr(U,_,61)^As(U,_,6),pe=vt(U,_,19)^Er(U,_,61)^Ns(U,_,6),oe=rh(L,pe,Ke[T-7],Ke[T-16]),R=nh(oe,F,j,Ge[T-7],Ge[T-16]);Ge[T]=R|0,Ke[T]=oe|0}let{Ah:n,Al:i,Bh:s,Bl:o,Ch:u,Cl:l,Dh:c,Dl:a,Eh:h,El:p,Fh:y,Fl:g,Gh:m,Gl:b,Hh:v,Hl:E}=this;for(let T=0;T<80;T++){const N=Et(h,p,14)^Et(h,p,18)^xr(h,p,41),S=vt(h,p,14)^vt(h,p,18)^Er(h,p,41),F=h&y^~h&m,L=p&g^~p&b,U=ih(E,S,L,ah[T],Ke[T]),_=sh(U,v,N,F,oh[T],Ge[T]),j=U|0,pe=Et(n,i,28)^xr(n,i,34)^xr(n,i,39),oe=vt(n,i,28)^Er(n,i,34)^Er(n,i,39),R=n&s^n&u^s&u,le=i&o^i&l^o&l;v=m|0,E=b|0,m=y|0,b=g|0,y=h|0,g=p|0,{h,l:p}=He(c|0,a|0,_|0,j|0),c=u|0,a=l|0,u=s|0,l=o|0,s=n|0,o=i|0;const Pe=eh(j,oe,le);n=th(Pe,_,pe,R),i=Pe|0}({h:n,l:i}=He(this.Ah|0,this.Al|0,n|0,i|0)),{h:s,l:o}=He(this.Bh|0,this.Bl|0,s|0,o|0),{h:u,l}=He(this.Ch|0,this.Cl|0,u|0,l|0),{h:c,l:a}=He(this.Dh|0,this.Dl|0,c|0,a|0),{h,l:p}=He(this.Eh|0,this.El|0,h|0,p|0),{h:y,l:g}=He(this.Fh|0,this.Fl|0,y|0,g|0),{h:m,l:b}=He(this.Gh|0,this.Gl|0,m|0,b|0),{h:v,l:E}=He(this.Hh|0,this.Hl|0,v|0,E|0),this.set(n,i,s,o,u,l,c,a,h,p,y,g,m,b,v,E)}roundClean(){jt(Ge,Ke)}destroy(){jt(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class lh extends uh{Ah=he[0]|0;Al=he[1]|0;Bh=he[2]|0;Bl=he[3]|0;Ch=he[4]|0;Cl=he[5]|0;Dh=he[6]|0;Dl=he[7]|0;Eh=he[8]|0;El=he[9]|0;Fh=he[10]|0;Fl=he[11]|0;Gh=he[12]|0;Gl=he[13]|0;Hh=he[14]|0;Hl=he[15]|0;constructor(){super(64)}}const ch=Wf(()=>new lh,Gf(3)),fh=(t,e,r,n)=>ui.from(Yf(ch,t,e,{c:r,dkLen:n})),Is=":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",hh=Is+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",dh="["+Is+"]["+hh+"]*",ph=new RegExp("^"+dh+"$");function Ss(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let o=0;o<s;o++)i.push(n[o]);r.push(i),n=e.exec(t)}return r}const vr=function(t){const e=ph.exec(t);return!(e===null||typeof e>"u")};function gh(t){return typeof t<"u"}const mh={allowBooleanAttributes:!1,unpairedTags:[]};function yh(t,e){e=Object.assign({},mh,e);const r=[];let n=!1,i=!1;t[0]==="\uFEFF"&&(t=t.substr(1));for(let s=0;s<t.length;s++)if(t[s]==="<"&&t[s+1]==="?"){if(s+=2,s=Cs(t,s),s.err)return s}else if(t[s]==="<"){let o=s;if(s++,t[s]==="!"){s=Rs(t,s);continue}else{let u=!1;t[s]==="/"&&(u=!0,s++);let l="";for(;s<t.length&&t[s]!==">"&&t[s]!==" "&&t[s]!==" "&&t[s]!==`
7
- `&&t[s]!=="\r";s++)l+=t[s];if(l=l.trim(),l[l.length-1]==="/"&&(l=l.substring(0,l.length-1),s--),!Nh(l)){let h;return l.trim().length===0?h="Invalid space after '<'.":h="Tag '"+l+"' is an invalid name.",ee("InvalidTag",h,ge(t,s))}const c=xh(t,s);if(c===!1)return ee("InvalidAttr","Attributes for '"+l+"' have open quote.",ge(t,s));let a=c.value;if(s=c.index,a[a.length-1]==="/"){const h=s-a.length;a=a.substring(0,a.length-1);const p=Fs(a,e);if(p===!0)n=!0;else return ee(p.err.code,p.err.msg,ge(t,h+p.err.line))}else if(u)if(c.tagClosed){if(a.trim().length>0)return ee("InvalidTag","Closing tag '"+l+"' can't have attributes or invalid starting.",ge(t,o));if(r.length===0)return ee("InvalidTag","Closing tag '"+l+"' has not been opened.",ge(t,o));{const h=r.pop();if(l!==h.tagName){let p=ge(t,h.tagStartPos);return ee("InvalidTag","Expected closing tag '"+h.tagName+"' (opened in line "+p.line+", col "+p.col+") instead of closing tag '"+l+"'.",ge(t,o))}r.length==0&&(i=!0)}}else return ee("InvalidTag","Closing tag '"+l+"' doesn't have proper closing.",ge(t,s));else{const h=Fs(a,e);if(h!==!0)return ee(h.err.code,h.err.msg,ge(t,s-a.length+h.err.line));if(i===!0)return ee("InvalidXml","Multiple possible root nodes found.",ge(t,s));e.unpairedTags.indexOf(l)!==-1||r.push({tagName:l,tagStartPos:o}),n=!0}for(s++;s<t.length;s++)if(t[s]==="<")if(t[s+1]==="!"){s++,s=Rs(t,s);continue}else if(t[s+1]==="?"){if(s=Cs(t,++s),s.err)return s}else break;else if(t[s]==="&"){const h=Th(t,s);if(h==-1)return ee("InvalidChar","char '&' is not expected.",ge(t,s));s=h}else if(i===!0&&!Os(t[s]))return ee("InvalidXml","Extra text at the end",ge(t,s));t[s]==="<"&&s--}}else{if(Os(t[s]))continue;return ee("InvalidChar","char '"+t[s]+"' is not expected.",ge(t,s))}if(n){if(r.length==1)return ee("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",ge(t,r[0].tagStartPos));if(r.length>0)return ee("InvalidXml","Invalid '"+JSON.stringify(r.map(s=>s.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return ee("InvalidXml","Start tag expected.",1);return!0}function Os(t){return t===" "||t===" "||t===`
8
- `||t==="\r"}function Cs(t,e){const r=e;for(;e<t.length;e++)if(t[e]=="?"||t[e]==" "){const n=t.substr(r,e-r);if(e>5&&n==="xml")return ee("InvalidXml","XML declaration allowed only at the start of the document.",ge(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}else continue}return e}function Rs(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}const bh='"',wh="'";function xh(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]===bh||t[e]===wh)n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){i=!0;break}r+=t[e]}return n!==""?!1:{value:r,index:e,tagClosed:i}}const Eh=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function Fs(t,e){const r=Ss(t,Eh),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return ee("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",Mt(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return ee("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",Mt(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return ee("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",Mt(r[i]));const s=r[i][2];if(!Ah(s))return ee("InvalidAttr","Attribute '"+s+"' is an invalid name.",Mt(r[i]));if(!n.hasOwnProperty(s))n[s]=1;else return ee("InvalidAttr","Attribute '"+s+"' is repeated.",Mt(r[i]))}return!0}function vh(t,e){let r=/\d/;for(t[e]==="x"&&(e++,r=/[\da-fA-F]/);e<t.length;e++){if(t[e]===";")return e;if(!t[e].match(r))break}return-1}function Th(t,e){if(e++,t[e]===";")return-1;if(t[e]==="#")return e++,vh(t,e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function ee(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function Ah(t){return vr(t)}function Nh(t){return vr(t)}function ge(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Mt(t){return t.startIndex+t[1].length}const Ph={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(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1},Ih=function(t){return Object.assign({},Ph,t)};let Tr;typeof Symbol!="function"?Tr="@@xmlMetadata":Tr=Symbol("XML Node Metadata");class at{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][Tr]={startIndex:r})}static getMetaDataSymbol(){return Tr}}class Sh{constructor(e){this.suppressValidationErr=!e}readDocType(e,r){const n={};if(e[r+3]==="O"&&e[r+4]==="C"&&e[r+5]==="T"&&e[r+6]==="Y"&&e[r+7]==="P"&&e[r+8]==="E"){r=r+9;let i=1,s=!1,o=!1,u="";for(;r<e.length;r++)if(e[r]==="<"&&!o){if(s&&ut(e,"!ENTITY",r)){r+=7;let l,c;if([l,c,r]=this.readEntityExp(e,r+1,this.suppressValidationErr),c.indexOf("&")===-1){const a=l.replace(/[.\-+*:]/g,"\\.");n[l]={regx:RegExp(`&${a};`,"g"),val:c}}}else if(s&&ut(e,"!ELEMENT",r)){r+=8;const{index:l}=this.readElementExp(e,r+1);r=l}else if(s&&ut(e,"!ATTLIST",r))r+=8;else if(s&&ut(e,"!NOTATION",r)){r+=9;const{index:l}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=l}else if(ut(e,"!--",r))o=!0;else throw new Error("Invalid DOCTYPE");i++,u=""}else if(e[r]===">"){if(o?e[r-1]==="-"&&e[r-2]==="-"&&(o=!1,i--):i--,i===0)break}else e[r]==="["?s=!0:u+=e[r];if(i!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:n,i:r}}readEntityExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r])&&e[r]!=='"'&&e[r]!=="'";)n+=e[r],r++;if(Vt(n),r=ve(e,r),!this.suppressValidationErr){if(e.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(e,r,"entity"),r--,[n,i,r]}readNotationExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;!this.suppressValidationErr&&Vt(n),r=ve(e,r);const i=e.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=ve(e,r);let s=null,o=null;if(i==="PUBLIC")[r,s]=this.readIdentifierVal(e,r,"publicIdentifier"),r=ve(e,r),(e[r]==='"'||e[r]==="'")&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:o,index:--r}}readIdentifierVal(e,r,n){let i="";const s=e[r];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);for(r++;r<e.length&&e[r]!==s;)i+=e[r],r++;if(e[r]!==s)throw new Error(`Unterminated ${n} value`);return r++,[r,i]}readElementExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;if(!this.suppressValidationErr&&!vr(n))throw new Error(`Invalid element name: "${n}"`);r=ve(e,r);let i="";if(e[r]==="E"&&ut(e,"MPTY",r))r+=4;else if(e[r]==="A"&&ut(e,"NY",r))r+=2;else if(e[r]==="("){for(r++;r<e.length&&e[r]!==")";)i+=e[r],r++;if(e[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[r]}"`);return{elementName:n,contentModel:i.trim(),index:r}}readAttlistExp(e,r){r=ve(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;Vt(n),r=ve(e,r);let i="";for(;r<e.length&&!/\s/.test(e[r]);)i+=e[r],r++;if(!Vt(i))throw new Error(`Invalid attribute name: "${i}"`);r=ve(e,r);let s="";if(e.substring(r,r+8).toUpperCase()==="NOTATION"){if(s="NOTATION",r+=8,r=ve(e,r),e[r]!=="(")throw new Error(`Expected '(', found "${e[r]}"`);r++;let u=[];for(;r<e.length&&e[r]!==")";){let l="";for(;r<e.length&&e[r]!=="|"&&e[r]!==")";)l+=e[r],r++;if(l=l.trim(),!Vt(l))throw new Error(`Invalid notation name: "${l}"`);u.push(l),e[r]==="|"&&(r++,r=ve(e,r))}if(e[r]!==")")throw new Error("Unterminated list of notations");r++,s+=" ("+u.join("|")+")"}else{for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;const u=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!u.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}r=ve(e,r);let o="";return e.substring(r,r+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",r+=8):e.substring(r,r+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",r+=7):[r,o]=this.readIdentifierVal(e,r,"ATTLIST"),{elementName:n,attributeName:i,attributeType:s,defaultValue:o,index:r}}}const ve=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function ut(t,e,r){for(let n=0;n<e.length;n++)if(e[n]!==t[r+n+1])return!1;return!0}function Vt(t){if(vr(t))return t;throw new Error(`Invalid entity name ${t}`)}const Oh=/^[-+]?0x[a-fA-F0-9]+$/,Ch=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Rh={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function Fh(t,e={}){if(e=Object.assign({},Rh,e),!t||typeof t!="string")return t;let r=t.trim();if(e.skipLike!==void 0&&e.skipLike.test(r))return t;if(t==="0")return 0;if(e.hex&&Oh.test(r))return Bh(r,16);if(r.includes("e")||r.includes("E"))return _h(t,r,e);{const n=Ch.exec(r);if(n){const i=n[1]||"",s=n[2];let o=Uh(n[3]);const u=i?t[s.length+1]===".":t[s.length]===".";if(!e.leadingZeros&&(s.length>1||s.length===1&&!u))return t;{const l=Number(r),c=String(l);if(l===0)return l;if(c.search(/[eE]/)!==-1)return e.eNotation?l:t;if(r.indexOf(".")!==-1)return c==="0"||c===o||c===`${i}${o}`?l:t;let a=s?o:r;return s?a===c||i+a===c?l:t:a===c||a===i+c?l:t}}else return t}}const Lh=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function _h(t,e,r){if(!r.eNotation)return t;const n=e.match(Lh);if(n){let i=n[1]||"";const s=n[3].indexOf("e")===-1?"E":"e",o=n[2],u=i?t[o.length+1]===s:t[o.length]===s;return o.length>1&&u?t:o.length===1&&(n[3].startsWith(`.${s}`)||n[3][0]===s)?Number(e):r.leadingZeros&&!u?(e=(n[1]||"")+n[3],Number(e)):t}else return t}function Uh(t){return t&&t.indexOf(".")!==-1&&(t=t.replace(/0+$/,""),t==="."?t="0":t[0]==="."?t="0"+t:t[t.length-1]==="."&&(t=t.substring(0,t.length-1))),t}function Bh(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function Ls(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}class kh{constructor(e){if(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:(r,n)=>_s(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>_s(n,16,"&#x")}},this.addExternalEntities=$h,this.parseXml=Hh,this.parseTextData=jh,this.resolveNameSpace=Mh,this.buildAttributesMap=Dh,this.isItStopNode=Gh,this.replaceEntitiesValue=zh,this.readStopNodeData=Jh,this.saveTextToParentTag=Wh,this.addChild=qh,this.ignoreAttributesFn=Ls(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let r=0;r<this.options.stopNodes.length;r++){const n=this.options.stopNodes[r];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function $h(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r],i=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+i+";","g"),val:t[n]}}}function jh(t,e,r,n,i,s,o){if(t!==void 0&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const u=this.options.tagValueProcessor(e,t,r,i,s);return u==null?t:typeof u!=typeof t||u!==t?u:this.options.trimValues?dn(t,this.options.parseTagValue,this.options.numberParseOptions):t.trim()===t?dn(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function Mh(t){if(this.options.removeNSPrefix){const e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}const Vh=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Dh(t,e){if(this.options.ignoreAttributes!==!0&&typeof t=="string"){const r=Ss(t,Vh),n=r.length,i={};for(let s=0;s<n;s++){const o=this.resolveNameSpace(r[s][1]);if(this.ignoreAttributesFn(o,e))continue;let u=r[s][4],l=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),u!==void 0){this.options.trimValues&&(u=u.trim()),u=this.replaceEntitiesValue(u);const c=this.options.attributeValueProcessor(o,u,e);c==null?i[l]=u:typeof c!=typeof u||c!==u?i[l]=c:i[l]=dn(u,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[l]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const s={};return s[this.options.attributesGroupName]=i,s}return i}}const Hh=function(t){t=t.replace(/\r\n?/g,`
9
- `);const e=new at("!xml");let r=e,n="",i="";const s=new Sh(this.options.processEntities);for(let o=0;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="/"){const l=lt(t,">",o,"Closing Tag is not closed.");let c=t.substring(o+2,l).trim();if(this.options.removeNSPrefix){const p=c.indexOf(":");p!==-1&&(c=c.substr(p+1))}this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&(n=this.saveTextToParentTag(n,r,i));const a=i.substring(i.lastIndexOf(".")+1);if(c&&this.options.unpairedTags.indexOf(c)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${c}>`);let h=0;a&&this.options.unpairedTags.indexOf(a)!==-1?(h=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):h=i.lastIndexOf("."),i=i.substring(0,h),r=this.tagsNodeStack.pop(),n="",o=l}else if(t[o+1]==="?"){let l=hn(t,o,!1,"?>");if(!l)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&l.tagName==="?xml"||this.options.ignorePiTags)){const c=new at(l.tagName);c.add(this.options.textNodeName,""),l.tagName!==l.tagExp&&l.attrExpPresent&&(c[":@"]=this.buildAttributesMap(l.tagExp,i)),this.addChild(r,c,i,o)}o=l.closeIndex+1}else if(t.substr(o+1,3)==="!--"){const l=lt(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const c=t.substring(o+4,l-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:c}])}o=l}else if(t.substr(o+1,2)==="!D"){const l=s.readDocType(t,o);this.docTypeEntities=l.entities,o=l.i}else if(t.substr(o+1,2)==="!["){const l=lt(t,"]]>",o,"CDATA is not closed.")-2,c=t.substring(o+9,l);n=this.saveTextToParentTag(n,r,i);let a=this.parseTextData(c,r.tagname,i,!0,!1,!0,!0);a==null&&(a=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:c}]):r.add(this.options.textNodeName,a),o=l+2}else{let l=hn(t,o,this.options.removeNSPrefix),c=l.tagName;const a=l.rawTagName;let h=l.tagExp,p=l.attrExpPresent,y=l.closeIndex;if(this.options.transformTagName){const b=this.options.transformTagName(c);h===c&&(h=b),c=b}r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));const g=r;g&&this.options.unpairedTags.indexOf(g.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),c!==e.tagname&&(i+=i?"."+c:c);const m=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,c)){let b="";if(h.length>0&&h.lastIndexOf("/")===h.length-1)c[c.length-1]==="/"?(c=c.substr(0,c.length-1),i=i.substr(0,i.length-1),h=c):h=h.substr(0,h.length-1),o=l.closeIndex;else if(this.options.unpairedTags.indexOf(c)!==-1)o=l.closeIndex;else{const E=this.readStopNodeData(t,a,y+1);if(!E)throw new Error(`Unexpected end of ${a}`);o=E.i,b=E.tagContent}const v=new at(c);c!==h&&p&&(v[":@"]=this.buildAttributesMap(h,i)),b&&(b=this.parseTextData(b,c,i,!0,p,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),v.add(this.options.textNodeName,b),this.addChild(r,v,i,m)}else{if(h.length>0&&h.lastIndexOf("/")===h.length-1){if(c[c.length-1]==="/"?(c=c.substr(0,c.length-1),i=i.substr(0,i.length-1),h=c):h=h.substr(0,h.length-1),this.options.transformTagName){const v=this.options.transformTagName(c);h===c&&(h=v),c=v}const b=new at(c);c!==h&&p&&(b[":@"]=this.buildAttributesMap(h,i)),this.addChild(r,b,i,m),i=i.substr(0,i.lastIndexOf("."))}else{const b=new at(c);this.tagsNodeStack.push(r),c!==h&&p&&(b[":@"]=this.buildAttributesMap(h,i)),this.addChild(r,b,i,m),r=b}n="",o=y}}else n+=t[o];return e.child};function qh(t,e,r,n){this.options.captureMetaData||(n=void 0);const i=this.options.updateTag(e.tagname,r,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}const zh=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Wh(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),t=this.parseTextData(t,e.tagname,r,!1,e[":@"]?Object.keys(e[":@"]).length!==0:!1,n),t!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function Gh(t,e,r,n){return!!(e&&e.has(n)||t&&t.has(r))}function Kh(t,e,r=">"){let n,i="";for(let s=e;s<t.length;s++){let o=t[s];if(n)o===n&&(n="");else if(o==='"'||o==="'")n=o;else if(o===r[0])if(r[1]){if(t[s+1]===r[1])return{data:i,index:s}}else return{data:i,index:s};else o===" "&&(o=" ");i+=o}}function lt(t,e,r,n){const i=t.indexOf(e,r);if(i===-1)throw new Error(n);return i+e.length-1}function hn(t,e,r,n=">"){const i=Kh(t,e+1,n);if(!i)return;let s=i.data;const o=i.index,u=s.search(/\s/);let l=s,c=!0;u!==-1&&(l=s.substring(0,u),s=s.substring(u+1).trimStart());const a=l;if(r){const h=l.indexOf(":");h!==-1&&(l=l.substr(h+1),c=l!==i.data.substr(h+1))}return{tagName:l,tagExp:s,closeIndex:o,attrExpPresent:c,rawTagName:a}}function Jh(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){const s=lt(t,">",r,`${e} is not closed`);if(t.substring(r+2,s).trim()===e&&(i--,i===0))return{tagContent:t.substring(n,r),i:s};r=s}else if(t[r+1]==="?")r=lt(t,"?>",r+1,"StopNode is not closed.");else if(t.substr(r+1,3)==="!--")r=lt(t,"-->",r+3,"StopNode is not closed.");else if(t.substr(r+1,2)==="![")r=lt(t,"]]>",r,"StopNode is not closed.")-2;else{const s=hn(t,r,">");s&&((s&&s.tagName)===e&&s.tagExp[s.tagExp.length-1]!=="/"&&i++,r=s.closeIndex)}}function dn(t,e,r){if(e&&typeof t=="string"){const n=t.trim();return n==="true"?!0:n==="false"?!1:Fh(t,r)}else return gh(t)?t:""}function _s(t,e,r){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):r+t+";"}const pn=at.getMetaDataSymbol();function Yh(t,e){return Us(t,e)}function Us(t,e,r){let n;const i={};for(let s=0;s<t.length;s++){const o=t[s],u=Xh(o);let l="";if(r===void 0?l=u:l=r+"."+u,u===e.textNodeName)n===void 0?n=o[u]:n+=""+o[u];else{if(u===void 0)continue;if(o[u]){let c=Us(o[u],e,l);const a=Qh(c,e);o[pn]!==void 0&&(c[pn]=o[pn]),o[":@"]?Zh(c,o[":@"],l,e):Object.keys(c).length===1&&c[e.textNodeName]!==void 0&&!e.alwaysCreateTextNode?c=c[e.textNodeName]:Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""),i[u]!==void 0&&i.hasOwnProperty(u)?(Array.isArray(i[u])||(i[u]=[i[u]]),i[u].push(c)):e.isArray(u,l,a)?i[u]=[c]:i[u]=c}}}return typeof n=="string"?n.length>0&&(i[e.textNodeName]=n):n!==void 0&&(i[e.textNodeName]=n),i}function Xh(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(n!==":@")return n}}function Zh(t,e,r,n){if(e){const i=Object.keys(e),s=i.length;for(let o=0;o<s;o++){const u=i[o];n.isArray(u,r+"."+u,!0,!0)?t[u]=[e[u]]:t[u]=e[u]}}}function Qh(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return!!(n===0||n===1&&(t[r]||typeof t[r]=="boolean"||t[r]===0))}class Bs{constructor(e){this.externalEntities={},this.options=Ih(e)}parse(e,r){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const s=yh(e,r);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const n=new kh(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||i===void 0?i:Yh(i,this.options)}addEntity(e,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=r}static getMetaDataSymbol(){return at.getMetaDataSymbol()}}const ed=`
10
- `;function td(t,e){let r="";return e.format&&e.indentBy.length>0&&(r=ed),ks(t,e,"",r)}function ks(t,e,r,n){let i="",s=!1;for(let o=0;o<t.length;o++){const u=t[o],l=rd(u);if(l===void 0)continue;let c="";if(r.length===0?c=l:c=`${r}.${l}`,l===e.textNodeName){let g=u[l];nd(c,e)||(g=e.tagValueProcessor(l,g),g=js(g,e)),s&&(i+=n),i+=g,s=!1;continue}else if(l===e.cdataPropName){s&&(i+=n),i+=`<![CDATA[${u[l][0][e.textNodeName]}]]>`,s=!1;continue}else if(l===e.commentPropName){i+=n+`<!--${u[l][0][e.textNodeName]}-->`,s=!0;continue}else if(l[0]==="?"){const g=$s(u[":@"],e),m=l==="?xml"?"":n;let b=u[l][0][e.textNodeName];b=b.length!==0?" "+b:"",i+=m+`<${l}${b}${g}?>`,s=!0;continue}let a=n;a!==""&&(a+=e.indentBy);const h=$s(u[":@"],e),p=n+`<${l}${h}`,y=ks(u[l],e,c,a);e.unpairedTags.indexOf(l)!==-1?e.suppressUnpairedNode?i+=p+">":i+=p+"/>":(!y||y.length===0)&&e.suppressEmptyNode?i+=p+"/>":y&&y.endsWith(">")?i+=p+`>${y}${n}</${l}>`:(i+=p+">",y&&n!==""&&(y.includes("/>")||y.includes("</"))?i+=n+e.indentBy+y+n:i+=y,i+=`</${l}>`),s=!0}return i}function rd(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(t.hasOwnProperty(n)&&n!==":@")return n}}function $s(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let i=e.attributeValueProcessor(n,t[n]);i=js(i,e),i===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function nd(t,e){t=t.substr(0,t.length-e.textNodeName.length-1);let r=t.substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function js(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}const id={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},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 qe(t){this.options=Object.assign({},id,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Ls(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ad),this.processTextOrObjNode=sd,this.options.format?(this.indentate=od,this.tagEndChar=`>
11
- `,this.newLine=`
12
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}qe.prototype.build=function(t){return this.options.preserveOrder?td(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},qe.prototype.j2x=function(t,e,r){let n="",i="";const s=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(typeof t[o]>"u")this.isAttribute(o)&&(i+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+="":o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){const u=this.isAttribute(o);if(u&&!this.ignoreAttributesFn(u,s))n+=this.buildAttrPairStr(u,""+t[o]);else if(!u)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(l)}else i+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const u=t[o].length;let l="",c="";for(let a=0;a<u;a++){const h=t[o][a];if(!(typeof h>"u"))if(h===null)o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){const p=this.j2x(h,e+1,r.concat(o));l+=p.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(c+=p.attrStr)}else l+=this.processTextOrObjNode(h,o,e,r);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(o,h);p=this.replaceEntitiesValue(p),l+=p}else l+=this.buildTextValNode(h,o,"",e)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,e)),i+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const u=Object.keys(t[o]),l=u.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(u[c],""+t[o][u[c]])}else i+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:n,val:i}},qe.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'};function sd(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}qe.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return e[0]==="?"&&(s="?",i=""),(r||r==="")&&t.indexOf("<")===-1?this.indentate(n)+"<"+e+r+s+">"+t+i:this.options.commentPropName!==!1&&e===this.options.commentPropName&&s.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+s+this.tagEndChar+t+this.indentate(n)+i}},qe.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):this.options.suppressEmptyNode?e="/":e=`></${t}`,e},qe.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},qe.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};function od(t){return this.options.indentBy.repeat(t)}function ad(t){return t.startsWith(this.options.attributeNamePrefix)&&t!==this.options.textNodeName?t.substr(this.attrPrefixLen):!1}class ud{axiosClient;baseURI;xmlParser;signingKey;ALGORITHM="sha512";TTL=1200;HASH_LENGTH=32;ITERATION_COUNT=1e4;constructor({axiosClient:e,baseURI:r}){this.axiosClient=e,this.baseURI=r,this.xmlParser=new Bs}async signUrl(e,r){const n=new URL(e);n.searchParams.set("OC-Credential",r),n.searchParams.set("OC-Date",new Date().toISOString()),n.searchParams.set("OC-Expires",this.TTL.toString()),n.searchParams.set("OC-Verb","GET");const i=await this.createHashedKey(n.toString());return n.searchParams.set("OC-Algo",`PBKDF2/${this.ITERATION_COUNT}-SHA512`),n.searchParams.set("OC-Signature",i),n.toString()}async getSignKey(){if(this.signingKey)return this.signingKey;const e=await this.axiosClient.get($(this.baseURI,"ocs/v1.php/cloud/user/signing-key"),{headers:{"Content-Type":"application/x-www-form-urlencoded"}}),r=this.xmlParser.parse(e.data);return this.signingKey=r.ocs.data["signing-key"],this.signingKey}async createHashedKey(e){const r=await this.getSignKey();return fh(e,r,this.ITERATION_COUNT,this.HASH_LENGTH,this.ALGORITHM).toString("hex")}}const ld=(t,e)=>{const r=new URL(t);r.pathname=[...r.pathname.split("/"),"ocs","v1.php"].filter(Boolean).join("/");const n=r.href,i=Vf(n,e),s=new ud({baseURI:t,axiosClient:e});return{getCapabilities:()=>i.getCapabilities(),signUrl:(o,u)=>s.signUrl(o,u)}},ze=(t,{fileId:e,path:r,name:n})=>{if(r!==void 0)return $(t.webDavPath,r);if(e!==void 0){if(cn(t))throw new Error("public spaces need a path provided");return $("spaces",e,n||"")}return t.webDavPath},cd=(t,e)=>({copyFiles(r,{path:n,fileId:i},s,{path:o,parentFolderId:u,name:l},{overwrite:c,...a}={}){const h=ze(r,{fileId:i,path:n}),p=ze(s,{fileId:u,path:o,name:l});return t.copy(h,p,{overwrite:c||!1,...a})}}),fd=(t,e,r)=>({async createFolder(n,{path:i,parentFolderId:s,folderName:o,fetchFolder:u=!0,...l}){const c=ze(n,{fileId:s,path:i,name:o});if(await t.mkcol(c),u)return e.getFileInfo(n,{path:i},l)}}),hd=(t,{axiosClient:e})=>({async getFileContents(r,{fileId:n,path:i},{responseType:s="text",noCache:o=!0,headers:u,...l}={}){try{const c=ze(r,{fileId:n,path:i}),a=await e.get(t.getFileUrl(c),{responseType:s,headers:{...o&&{"Cache-Control":"no-cache"},...u||{}},...l});return{response:a,body:a.data,headers:{ETag:a.headers.etag,"OC-ETag":a.headers["oc-etag"],"OC-FileId":a.headers["oc-fileid"]}}}catch(c){const{message:a,response:h}=c;throw new Bi(a,h,h.status)}}}),dd=(t,e)=>({async getFileInfo(r,n,i){return(await t.listFiles(r,n,{depth:0,...i})).resource}}),pd=(t,e,r,{axiosClient:n,baseUrl:i})=>({async getFileUrl(s,o,{disposition:u="attachment",version:l=null,username:c="",...a}){if(u==="inline"){const p=await e.getFileContents(s,o,{responseType:"blob",...a});return URL.createObjectURL(p.body)}if(l){if(!c)throw new Error("username is required for URL signing");const p=t.getFileUrl($("meta",o.fileId,"v",l));return await ld(i,n).signUrl(p,c)}if(o.downloadURL)return o.downloadURL;const{downloadURL:h}=await r.getFileInfo(s,o,{davProperties:[C.DownloadURL]});return h},revokeUrl:s=>{s&&s.startsWith("blob:")&&URL.revokeObjectURL(s)}}),gd=(t,e)=>({getPublicFileUrl(r,n){return t.getFileUrl($("public-files",n))}}),md=(t,e,r)=>({async listFiles(n,{path:i,fileId:s}={},{depth:o=1,davProperties:u,isTrash:l=!1,...c}={}){let a;if(cn(n)){a=await t.propfind($(n.webDavPath,i),{depth:o,properties:u||it.PublicLink,...c}),a.forEach(g=>{g.filename=g.filename.split("/").slice(1).join("/")}),a.length===1&&(a[0].filename=$(n.id,i,{leadingSlash:!0})),a.forEach(g=>{g.filename=g.filename.split("/").slice(2).join("/")});const p=n.driveAlias.startsWith("ocm/")?"ocm":"public-link";if((!i||i==="/")&&o>0&&p==="ocm"&&a[0].props[C.PublicLinkItemType]==="file"&&(a=[{basename:n.fileId,type:"directory",filename:"",props:{}},...a]),!i){const[g,...m]=a;return{resource:jf({...g,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:p}),children:m.map(b=>xt(b,t.extraProps))}}const y=a.map(g=>xt(g,t.extraProps));return{resource:y[0],children:y.slice(1)}}const h=async()=>{const p=await e.getPathForFileId(s);return this.listFiles(n,{path:p},{depth:o,davProperties:u})};try{let p="";if(l?p=fn(n.id):p=ze(n,{fileId:s,path:i}),a=await t.propfind(p,{depth:o,properties:u||it.Default,...c}),l)return{resource:xt(a[0],t.extraProps),children:a.slice(1).map(kf)};const y=a.map(m=>xt(m,t.extraProps)),g=s===n.id;return s&&!g&&y[0].fileId&&s!==y[0].fileId?h():{resource:y[0],children:y.slice(1)}}catch(p){if(p.statusCode===404&&s)return h();throw p}}}),yd=(t,e)=>({moveFiles(r,{path:n,fileId:i},s,{path:o,parentFolderId:u,name:l},{overwrite:c,...a}={}){const h=ze(r,{fileId:i,path:n}),p=ze(s,{fileId:u,path:o,name:l});return t.move(h,p,{overwrite:c||!1,...a})}}),bd=(t,e,r)=>({async putFileContents(n,{fileName:i,path:s,parentFolderId:o,content:u="",previousEntityTag:l="",overwrite:c,onUploadProgress:a=null,...h}){const p=ze(n,{fileId:o,name:i,path:s}),{result:y}=await t.put(p,u,{previousEntityTag:l,overwrite:c,onUploadProgress:a,...h});return e.getFileInfo(n,{fileId:y.headers.get("Oc-Fileid"),path:s})}}),wd=(t,e)=>({deleteFile(r,{path:n,...i}){return t.delete($(r.webDavPath,n),i)}}),xd=(t,e)=>({restoreFile(r,{id:n},{path:i},{overwrite:s,...o}={}){if(cn(r))return;const u=$(r.webDavPath,i);return t.move($(r.webDavTrashPath,n),u,{overwrite:s,...o})}}),Ed=(t,e)=>({restoreFileVersion(r,{parentFolderId:n,name:i,path:s},o,u={}){const l=ze(r,{path:s,fileId:n,name:i}),c=$("meta",n,"v",o,{leadingSlash:!0}),a=$("files",l,{leadingSlash:!0});return t.copy(c,a,u)}}),vd=(t,e)=>({clearTrashBin(r,{id:n,...i}={}){let s=fn(r.id);return n&&(s=$(s,n)),t.delete(s,i)}}),Td=(t,e)=>({async search(r,{davProperties:n=it.Default,searchLimit:i,...s}){const o="/spaces/",{range:u,results:l}=await t.report(o,{pattern:r,limit:i,properties:n,...s});return{resources:l.map(c=>({...xt(c,t.extraProps),highlights:c.props[C.Highlights]||""})),totalResults:u?parseInt(u?.split("/")[1]):null}}}),Ad=(t,e)=>({async getPathForFileId(r,n={}){return(await t.propfind($("meta",r,{leadingSlash:!0}),{properties:[C.MetaPathForUser],...n}))[0].props[C.MetaPathForUser]}});var Nd={2:t=>{function e(i,s,o){i instanceof RegExp&&(i=r(i,o)),s instanceof RegExp&&(s=r(s,o));var u=n(i,s,o);return u&&{start:u[0],end:u[1],pre:o.slice(0,u[0]),body:o.slice(u[0]+i.length,u[1]),post:o.slice(u[1]+s.length)}}function r(i,s){var o=s.match(i);return o?o[0]:null}function n(i,s,o){var u,l,c,a,h,p=o.indexOf(i),y=o.indexOf(s,p+1),g=p;if(p>=0&&y>0){for(u=[],c=o.length;g>=0&&!h;)g==p?(u.push(g),p=o.indexOf(i,g+1)):u.length==1?h=[u.pop(),y]:((l=u.pop())<c&&(c=l,a=y),y=o.indexOf(s,g+1)),g=p<y&&p>=0?p:y;u.length&&(h=[c,a])}return h}t.exports=e,e.range=n},47:(t,e,r)=>{var n=r(410),i=function(c){return typeof c=="string"};function s(c,a){for(var h=[],p=0;p<c.length;p++){var y=c[p];y&&y!=="."&&(y===".."?h.length&&h[h.length-1]!==".."?h.pop():a&&h.push(".."):h.push(y))}return h}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,u={};function l(c){return o.exec(c).slice(1)}u.resolve=function(){for(var c="",a=!1,h=arguments.length-1;h>=-1&&!a;h--){var p=h>=0?arguments[h]:Ue.cwd();if(!i(p))throw new TypeError("Arguments to path.resolve must be strings");p&&(c=p+"/"+c,a=p.charAt(0)==="/")}return(a?"/":"")+(c=s(c.split("/"),!a).join("/"))||"."},u.normalize=function(c){var a=u.isAbsolute(c),h=c.substr(-1)==="/";return(c=s(c.split("/"),!a).join("/"))||a||(c="."),c&&h&&(c+="/"),(a?"/":"")+c},u.isAbsolute=function(c){return c.charAt(0)==="/"},u.join=function(){for(var c="",a=0;a<arguments.length;a++){var h=arguments[a];if(!i(h))throw new TypeError("Arguments to path.join must be strings");h&&(c+=c?"/"+h:h)}return u.normalize(c)},u.relative=function(c,a){function h(E){for(var T=0;T<E.length&&E[T]==="";T++);for(var N=E.length-1;N>=0&&E[N]==="";N--);return T>N?[]:E.slice(T,N+1)}c=u.resolve(c).substr(1),a=u.resolve(a).substr(1);for(var p=h(c.split("/")),y=h(a.split("/")),g=Math.min(p.length,y.length),m=g,b=0;b<g;b++)if(p[b]!==y[b]){m=b;break}var v=[];for(b=m;b<p.length;b++)v.push("..");return(v=v.concat(y.slice(m))).join("/")},u._makeLong=function(c){return c},u.dirname=function(c){var a=l(c),h=a[0],p=a[1];return h||p?(p&&(p=p.substr(0,p.length-1)),h+p):"."},u.basename=function(c,a){var h=l(c)[2];return a&&h.substr(-1*a.length)===a&&(h=h.substr(0,h.length-a.length)),h},u.extname=function(c){return l(c)[3]},u.format=function(c){if(!n.isObject(c))throw new TypeError("Parameter 'pathObject' must be an object, not "+typeof c);var a=c.root||"";if(!i(a))throw new TypeError("'pathObject.root' must be a string or undefined, not "+typeof c.root);return(c.dir?c.dir+u.sep:"")+(c.base||"")},u.parse=function(c){if(!i(c))throw new TypeError("Parameter 'pathString' must be a string, not "+typeof c);var a=l(c);if(!a||a.length!==4)throw new TypeError("Invalid path '"+c+"'");return a[1]=a[1]||"",a[2]=a[2]||"",a[3]=a[3]||"",{root:a[0],dir:a[0]+a[1].slice(0,a[1].length-1),base:a[2],ext:a[3],name:a[2].slice(0,a[2].length-a[3].length)}},u.sep="/",u.delimiter=":",t.exports=u},101:function(t,e,r){var n;t=r.nmd(t),(function(){var i=(t&&t.exports,typeof Ve=="object"&&Ve);i.global!==i&&i.window;var s=function(a){this.message=a};(s.prototype=new Error).name="InvalidCharacterError";var o=function(a){throw new s(a)},u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,c={encode:function(a){a=String(a),/[^\0-\xFF]/.test(a)&&o("The string to be encoded contains characters outside of the Latin1 range.");for(var h,p,y,g,m=a.length%3,b="",v=-1,E=a.length-m;++v<E;)h=a.charCodeAt(v)<<16,p=a.charCodeAt(++v)<<8,y=a.charCodeAt(++v),b+=u.charAt((g=h+p+y)>>18&63)+u.charAt(g>>12&63)+u.charAt(g>>6&63)+u.charAt(63&g);return m==2?(h=a.charCodeAt(v)<<8,p=a.charCodeAt(++v),b+=u.charAt((g=h+p)>>10)+u.charAt(g>>4&63)+u.charAt(g<<2&63)+"="):m==1&&(g=a.charCodeAt(v),b+=u.charAt(g>>2)+u.charAt(g<<4&63)+"=="),b},decode:function(a){var h=(a=String(a).replace(l,"")).length;h%4==0&&(h=(a=a.replace(/==?$/,"")).length),(h%4==1||/[^+a-zA-Z0-9/]/.test(a))&&o("Invalid character: the string to be decoded is not correctly encoded.");for(var p,y,g=0,m="",b=-1;++b<h;)y=u.indexOf(a.charAt(b)),p=g%4?64*p+y:y,g++%4&&(m+=String.fromCharCode(255&p>>(-2*g&6)));return m},version:"1.0.0"};(n=(function(){return c}).call(e,r,e,t))===void 0||(t.exports=n)})()},135:t=>{function e(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}t.exports=function(r){return r!=null&&(e(r)||(function(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&e(n.slice(0,0))})(r)||!!r._isBuffer)}},172:(t,e)=>{e.d=function(r){if(!r)return 0;for(var n=(r=r.toString()).length,i=r.length;i--;){var s=r.charCodeAt(i);56320<=s&&s<=57343&&i--,127<s&&s<=2047?n++:2047<s&&s<=65535&&(n+=2)}return n}},285:(t,e,r)=>{var n=r(2);t.exports=function(v){return v?(v.substr(0,2)==="{}"&&(v="\\{\\}"+v.substr(2)),b((function(E){return E.split("\\\\").join(i).split("\\{").join(s).split("\\}").join(o).split("\\,").join(u).split("\\.").join(l)})(v),!0).map(a)):[]};var i="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",o="\0CLOSE"+Math.random()+"\0",u="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function c(v){return parseInt(v,10)==v?parseInt(v,10):v.charCodeAt(0)}function a(v){return v.split(i).join("\\").split(s).join("{").split(o).join("}").split(u).join(",").split(l).join(".")}function h(v){if(!v)return[""];var E=[],T=n("{","}",v);if(!T)return v.split(",");var N=T.pre,S=T.body,F=T.post,L=N.split(",");L[L.length-1]+="{"+S+"}";var U=h(F);return F.length&&(L[L.length-1]+=U.shift(),L.push.apply(L,U)),E.push.apply(E,L),E}function p(v){return"{"+v+"}"}function y(v){return/^-?0\d/.test(v)}function g(v,E){return v<=E}function m(v,E){return v>=E}function b(v,E){var T=[],N=n("{","}",v);if(!N)return[v];var S=N.pre,F=N.post.length?b(N.post,!1):[""];if(/\$$/.test(N.pre))for(var L=0;L<F.length;L++){var U=S+"{"+N.body+"}"+F[L];T.push(U)}else{var _,j,pe=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(N.body),oe=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(N.body),R=pe||oe,le=N.body.indexOf(",")>=0;if(!R&&!le)return N.post.match(/,(?!,).*\}/)?b(v=N.pre+"{"+N.body+o+N.post):[v];if(R)_=N.body.split(/\.\./);else if((_=h(N.body)).length===1&&(_=b(_[0],!1).map(p)).length===1)return F.map((function(Lr){return N.pre+_[0]+Lr}));if(R){var Pe=c(_[0]),J=c(_[1]),ae=Math.max(_[0].length,_[1].length),K=_.length==3?Math.abs(c(_[2])):1,ke=g;J<Pe&&(K*=-1,ke=m);var Xe=_.some(y);j=[];for(var re=Pe;ke(re,J);re+=K){var ce;if(oe)(ce=String.fromCharCode(re))==="\\"&&(ce="");else if(ce=String(re),Xe){var Ze=ae-ce.length;if(Ze>0){var D=new Array(Ze+1).join("0");ce=re<0?"-"+D+ce.slice(1):D+ce}}j.push(ce)}}else{j=[];for(var q=0;q<_.length;q++)j.push.apply(j,b(_[q],!1))}for(q=0;q<j.length;q++)for(L=0;L<F.length;L++)U=S+j[q]+F[L],(!E||R||U)&&T.push(U)}return T}},298:t=>{var e,r;e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(n,i){return n<<i|n>>>32-i},rotr:function(n,i){return n<<32-i|n>>>i},endian:function(n){if(n.constructor==Number)return 16711935&r.rotl(n,8)|4278255360&r.rotl(n,24);for(var i=0;i<n.length;i++)n[i]=r.endian(n[i]);return n},randomBytes:function(n){for(var i=[];n>0;n--)i.push(Math.floor(256*Math.random()));return i},bytesToWords:function(n){for(var i=[],s=0,o=0;s<n.length;s++,o+=8)i[o>>>5]|=n[s]<<24-o%32;return i},wordsToBytes:function(n){for(var i=[],s=0;s<32*n.length;s+=8)i.push(n[s>>>5]>>>24-s%32&255);return i},bytesToHex:function(n){for(var i=[],s=0;s<n.length;s++)i.push((n[s]>>>4).toString(16)),i.push((15&n[s]).toString(16));return i.join("")},hexToBytes:function(n){for(var i=[],s=0;s<n.length;s+=2)i.push(parseInt(n.substr(s,2),16));return i},bytesToBase64:function(n){for(var i=[],s=0;s<n.length;s+=3)for(var o=n[s]<<16|n[s+1]<<8|n[s+2],u=0;u<4;u++)8*s+6*u<=8*n.length?i.push(e.charAt(o>>>6*(3-u)&63)):i.push("=");return i.join("")},base64ToBytes:function(n){n=n.replace(/[^A-Z0-9+\/]/gi,"");for(var i=[],s=0,o=0;s<n.length;o=++s%4)o!=0&&i.push((e.indexOf(n.charAt(s-1))&Math.pow(2,-2*o+8)-1)<<2*o|e.indexOf(n.charAt(s))>>>6-2*o);return i}},t.exports=r},345:()=>{},388:()=>{},410:()=>{},526:t=>{var e={utf8:{stringToBytes:function(r){return e.bin.stringToBytes(unescape(encodeURIComponent(r)))},bytesToString:function(r){return decodeURIComponent(escape(e.bin.bytesToString(r)))}},bin:{stringToBytes:function(r){for(var n=[],i=0;i<r.length;i++)n.push(255&r.charCodeAt(i));return n},bytesToString:function(r){for(var n=[],i=0;i<r.length;i++)n.push(String.fromCharCode(r[i]));return n.join("")}}};t.exports=e},542:(t,e,r)=>{(function(){var n=r(298),i=r(526).utf8,s=r(135),o=r(526).bin,u=function(l,c){l.constructor==String?l=c&&c.encoding==="binary"?o.stringToBytes(l):i.stringToBytes(l):s(l)?l=Array.prototype.slice.call(l,0):Array.isArray(l)||l.constructor===Uint8Array||(l=l.toString());for(var a=n.bytesToWords(l),h=8*l.length,p=1732584193,y=-271733879,g=-1732584194,m=271733878,b=0;b<a.length;b++)a[b]=16711935&(a[b]<<8|a[b]>>>24)|4278255360&(a[b]<<24|a[b]>>>8);a[h>>>5]|=128<<h%32,a[14+(h+64>>>9<<4)]=h;var v=u._ff,E=u._gg,T=u._hh,N=u._ii;for(b=0;b<a.length;b+=16){var S=p,F=y,L=g,U=m;p=v(p,y,g,m,a[b+0],7,-680876936),m=v(m,p,y,g,a[b+1],12,-389564586),g=v(g,m,p,y,a[b+2],17,606105819),y=v(y,g,m,p,a[b+3],22,-1044525330),p=v(p,y,g,m,a[b+4],7,-176418897),m=v(m,p,y,g,a[b+5],12,1200080426),g=v(g,m,p,y,a[b+6],17,-1473231341),y=v(y,g,m,p,a[b+7],22,-45705983),p=v(p,y,g,m,a[b+8],7,1770035416),m=v(m,p,y,g,a[b+9],12,-1958414417),g=v(g,m,p,y,a[b+10],17,-42063),y=v(y,g,m,p,a[b+11],22,-1990404162),p=v(p,y,g,m,a[b+12],7,1804603682),m=v(m,p,y,g,a[b+13],12,-40341101),g=v(g,m,p,y,a[b+14],17,-1502002290),p=E(p,y=v(y,g,m,p,a[b+15],22,1236535329),g,m,a[b+1],5,-165796510),m=E(m,p,y,g,a[b+6],9,-1069501632),g=E(g,m,p,y,a[b+11],14,643717713),y=E(y,g,m,p,a[b+0],20,-373897302),p=E(p,y,g,m,a[b+5],5,-701558691),m=E(m,p,y,g,a[b+10],9,38016083),g=E(g,m,p,y,a[b+15],14,-660478335),y=E(y,g,m,p,a[b+4],20,-405537848),p=E(p,y,g,m,a[b+9],5,568446438),m=E(m,p,y,g,a[b+14],9,-1019803690),g=E(g,m,p,y,a[b+3],14,-187363961),y=E(y,g,m,p,a[b+8],20,1163531501),p=E(p,y,g,m,a[b+13],5,-1444681467),m=E(m,p,y,g,a[b+2],9,-51403784),g=E(g,m,p,y,a[b+7],14,1735328473),p=T(p,y=E(y,g,m,p,a[b+12],20,-1926607734),g,m,a[b+5],4,-378558),m=T(m,p,y,g,a[b+8],11,-2022574463),g=T(g,m,p,y,a[b+11],16,1839030562),y=T(y,g,m,p,a[b+14],23,-35309556),p=T(p,y,g,m,a[b+1],4,-1530992060),m=T(m,p,y,g,a[b+4],11,1272893353),g=T(g,m,p,y,a[b+7],16,-155497632),y=T(y,g,m,p,a[b+10],23,-1094730640),p=T(p,y,g,m,a[b+13],4,681279174),m=T(m,p,y,g,a[b+0],11,-358537222),g=T(g,m,p,y,a[b+3],16,-722521979),y=T(y,g,m,p,a[b+6],23,76029189),p=T(p,y,g,m,a[b+9],4,-640364487),m=T(m,p,y,g,a[b+12],11,-421815835),g=T(g,m,p,y,a[b+15],16,530742520),p=N(p,y=T(y,g,m,p,a[b+2],23,-995338651),g,m,a[b+0],6,-198630844),m=N(m,p,y,g,a[b+7],10,1126891415),g=N(g,m,p,y,a[b+14],15,-1416354905),y=N(y,g,m,p,a[b+5],21,-57434055),p=N(p,y,g,m,a[b+12],6,1700485571),m=N(m,p,y,g,a[b+3],10,-1894986606),g=N(g,m,p,y,a[b+10],15,-1051523),y=N(y,g,m,p,a[b+1],21,-2054922799),p=N(p,y,g,m,a[b+8],6,1873313359),m=N(m,p,y,g,a[b+15],10,-30611744),g=N(g,m,p,y,a[b+6],15,-1560198380),y=N(y,g,m,p,a[b+13],21,1309151649),p=N(p,y,g,m,a[b+4],6,-145523070),m=N(m,p,y,g,a[b+11],10,-1120210379),g=N(g,m,p,y,a[b+2],15,718787259),y=N(y,g,m,p,a[b+9],21,-343485551),p=p+S>>>0,y=y+F>>>0,g=g+L>>>0,m=m+U>>>0}return n.endian([p,y,g,m])};u._ff=function(l,c,a,h,p,y,g){var m=l+(c&a|~c&h)+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._gg=function(l,c,a,h,p,y,g){var m=l+(c&h|a&~h)+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._hh=function(l,c,a,h,p,y,g){var m=l+(c^a^h)+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._ii=function(l,c,a,h,p,y,g){var m=l+(a^(c|~h))+(p>>>0)+g;return(m<<y|m>>>32-y)+c},u._blocksize=16,u._digestsize=16,t.exports=function(l,c){if(l==null)throw new Error("Illegal argument "+l);var a=n.wordsToBytes(u(l,c));return c&&c.asBytes?a:c&&c.asString?o.bytesToString(a):n.bytesToHex(a)}})()},647:(t,e)=>{var r=Object.prototype.hasOwnProperty;function n(s){try{return decodeURIComponent(s.replace(/\+/g," "))}catch{return null}}function i(s){try{return encodeURIComponent(s)}catch{return null}}e.stringify=function(s,o){o=o||"";var u,l,c=[];for(l in typeof o!="string"&&(o="?"),s)if(r.call(s,l)){if((u=s[l])||u!=null&&!isNaN(u)||(u=""),l=i(l),u=i(u),l===null||u===null)continue;c.push(l+"="+u)}return c.length?o+c.join("&"):""},e.parse=function(s){for(var o,u=/([^=?#&]+)=?([^&]*)/g,l={};o=u.exec(s);){var c=n(o[1]),a=n(o[2]);c===null||a===null||c in l||(l[c]=a)}return l}},670:t=>{t.exports=function(e,r){if(r=r.split(":")[0],!(e=+e))return!1;switch(r){case"http":case"ws":return e!==80;case"https":case"wss":return e!==443;case"ftp":return e!==21;case"gopher":return e!==70;case"file":return!1}return e!==0}},737:(t,e,r)=>{var n=r(670),i=r(647),s=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,u=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,a=/^[a-zA-Z]:/;function h(E){return(E||"").toString().replace(s,"")}var p=[["#","hash"],["?","query"],function(E,T){return m(T.protocol)?E.replace(/\\/g,"/"):E},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],y={hash:1,query:1};function g(E){var T,N=(typeof window<"u"?window:typeof Ve<"u"?Ve:typeof self<"u"?self:{}).location||{},S={},F=typeof(E=E||N);if(E.protocol==="blob:")S=new v(unescape(E.pathname),{});else if(F==="string")for(T in S=new v(E,{}),y)delete S[T];else if(F==="object"){for(T in E)T in y||(S[T]=E[T]);S.slashes===void 0&&(S.slashes=u.test(E.href))}return S}function m(E){return E==="file:"||E==="ftp:"||E==="http:"||E==="https:"||E==="ws:"||E==="wss:"}function b(E,T){E=(E=h(E)).replace(o,""),T=T||{};var N,S=c.exec(E),F=S[1]?S[1].toLowerCase():"",L=!!S[2],U=!!S[3],_=0;return L?U?(N=S[2]+S[3]+S[4],_=S[2].length+S[3].length):(N=S[2]+S[4],_=S[2].length):U?(N=S[3]+S[4],_=S[3].length):N=S[4],F==="file:"?_>=2&&(N=N.slice(2)):m(F)?N=S[4]:F?L&&(N=N.slice(2)):_>=2&&m(T.protocol)&&(N=S[4]),{protocol:F,slashes:L||m(F),slashesCount:_,rest:N}}function v(E,T,N){if(E=(E=h(E)).replace(o,""),!(this instanceof v))return new v(E,T,N);var S,F,L,U,_,j,pe=p.slice(),oe=typeof T,R=this,le=0;for(oe!=="object"&&oe!=="string"&&(N=T,T=null),N&&typeof N!="function"&&(N=i.parse),S=!(F=b(E||"",T=g(T))).protocol&&!F.slashes,R.slashes=F.slashes||S&&T.slashes,R.protocol=F.protocol||T.protocol||"",E=F.rest,(F.protocol==="file:"&&(F.slashesCount!==2||a.test(E))||!F.slashes&&(F.protocol||F.slashesCount<2||!m(R.protocol)))&&(pe[3]=[/(.*)/,"pathname"]);le<pe.length;le++)typeof(U=pe[le])!="function"?(L=U[0],j=U[1],L!=L?R[j]=E:typeof L=="string"?~(_=L==="@"?E.lastIndexOf(L):E.indexOf(L))&&(typeof U[2]=="number"?(R[j]=E.slice(0,_),E=E.slice(_+U[2])):(R[j]=E.slice(_),E=E.slice(0,_))):(_=L.exec(E))&&(R[j]=_[1],E=E.slice(0,_.index)),R[j]=R[j]||S&&U[3]&&T[j]||"",U[4]&&(R[j]=R[j].toLowerCase())):E=U(E,R);N&&(R.query=N(R.query)),S&&T.slashes&&R.pathname.charAt(0)!=="/"&&(R.pathname!==""||T.pathname!=="")&&(R.pathname=(function(Pe,J){if(Pe==="")return J;for(var ae=(J||"/").split("/").slice(0,-1).concat(Pe.split("/")),K=ae.length,ke=ae[K-1],Xe=!1,re=0;K--;)ae[K]==="."?ae.splice(K,1):ae[K]===".."?(ae.splice(K,1),re++):re&&(K===0&&(Xe=!0),ae.splice(K,1),re--);return Xe&&ae.unshift(""),ke!=="."&&ke!==".."||ae.push(""),ae.join("/")})(R.pathname,T.pathname)),R.pathname.charAt(0)!=="/"&&m(R.protocol)&&(R.pathname="/"+R.pathname),n(R.port,R.protocol)||(R.host=R.hostname,R.port=""),R.username=R.password="",R.auth&&(~(_=R.auth.indexOf(":"))?(R.username=R.auth.slice(0,_),R.username=encodeURIComponent(decodeURIComponent(R.username)),R.password=R.auth.slice(_+1),R.password=encodeURIComponent(decodeURIComponent(R.password))):R.username=encodeURIComponent(decodeURIComponent(R.auth)),R.auth=R.password?R.username+":"+R.password:R.username),R.origin=R.protocol!=="file:"&&m(R.protocol)&&R.host?R.protocol+"//"+R.host:"null",R.href=R.toString()}v.prototype={set:function(E,T,N){var S=this;switch(E){case"query":typeof T=="string"&&T.length&&(T=(N||i.parse)(T)),S[E]=T;break;case"port":S[E]=T,n(T,S.protocol)?T&&(S.host=S.hostname+":"+T):(S.host=S.hostname,S[E]="");break;case"hostname":S[E]=T,S.port&&(T+=":"+S.port),S.host=T;break;case"host":S[E]=T,l.test(T)?(T=T.split(":"),S.port=T.pop(),S.hostname=T.join(":")):(S.hostname=T,S.port="");break;case"protocol":S.protocol=T.toLowerCase(),S.slashes=!N;break;case"pathname":case"hash":if(T){var F=E==="pathname"?"/":"#";S[E]=T.charAt(0)!==F?F+T:T}else S[E]=T;break;case"username":case"password":S[E]=encodeURIComponent(T);break;case"auth":var L=T.indexOf(":");~L?(S.username=T.slice(0,L),S.username=encodeURIComponent(decodeURIComponent(S.username)),S.password=T.slice(L+1),S.password=encodeURIComponent(decodeURIComponent(S.password))):S.username=encodeURIComponent(decodeURIComponent(T))}for(var U=0;U<p.length;U++){var _=p[U];_[4]&&(S[_[1]]=S[_[1]].toLowerCase())}return S.auth=S.password?S.username+":"+S.password:S.username,S.origin=S.protocol!=="file:"&&m(S.protocol)&&S.host?S.protocol+"//"+S.host:"null",S.href=S.toString(),S},toString:function(E){E&&typeof E=="function"||(E=i.stringify);var T,N=this,S=N.host,F=N.protocol;F&&F.charAt(F.length-1)!==":"&&(F+=":");var L=F+(N.protocol&&N.slashes||m(N.protocol)?"//":"");return N.username?(L+=N.username,N.password&&(L+=":"+N.password),L+="@"):N.password?(L+=":"+N.password,L+="@"):N.protocol!=="file:"&&m(N.protocol)&&!S&&N.pathname!=="/"&&(L+="@"),(S[S.length-1]===":"||l.test(N.hostname)&&!N.port)&&(S+=":"),L+=S+N.pathname,(T=typeof N.query=="object"?E(N.query):N.query)&&(L+=T.charAt(0)!=="?"?"?"+T:T),N.hash&&(L+=N.hash),L}},v.extractProtocol=b,v.location=g,v.trimLeft=h,v.qs=i,t.exports=v},800:()=>{},805:()=>{},829:t=>{function e(c){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},e(c)}function r(c){var a=typeof Map=="function"?new Map:void 0;return r=function(h){if(h===null||(p=h,Function.toString.call(p).indexOf("[native code]")===-1))return h;var p;if(typeof h!="function")throw new TypeError("Super expression must either be null or a function");if(a!==void 0){if(a.has(h))return a.get(h);a.set(h,y)}function y(){return n(h,arguments,s(this).constructor)}return y.prototype=Object.create(h.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),i(y,h)},r(c)}function n(c,a,h){return n=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch{return!1}})()?Reflect.construct:function(p,y,g){var m=[null];m.push.apply(m,y);var b=new(Function.bind.apply(p,m));return g&&i(b,g.prototype),b},n.apply(null,arguments)}function i(c,a){return i=Object.setPrototypeOf||function(h,p){return h.__proto__=p,h},i(c,a)}function s(c){return s=Object.setPrototypeOf?Object.getPrototypeOf:function(a){return a.__proto__||Object.getPrototypeOf(a)},s(c)}var o=(function(c){function a(h){var p;return(function(y,g){if(!(y instanceof g))throw new TypeError("Cannot call a class as a function")})(this,a),(p=(function(y,g){return!g||e(g)!=="object"&&typeof g!="function"?(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(y):g})(this,s(a).call(this,h))).name="ObjectPrototypeMutationError",p}return(function(h,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(p&&p.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),p&&i(h,p)})(a,c),a})(r(Error));function u(c,a){for(var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},p=a.split("."),y=p.length,g=function(v){var E=p[v];if(!c)return{v:void 0};if(E==="+"){if(Array.isArray(c))return{v:c.map((function(N,S){var F=p.slice(v+1);return F.length>0?u(N,F.join("."),h):h(c,S,p,v)}))};var T=p.slice(0,v).join(".");throw new Error("Object at wildcard (".concat(T,") is not an array"))}c=h(c,E,p,v)},m=0;m<y;m++){var b=g(m);if(e(b)==="object")return b.v}return c}function l(c,a){return c.length===a+1}t.exports={set:function(c,a,h){if(e(c)!="object"||c===null||a===void 0)return c;if(typeof a=="number")return c[a]=h,c[a];try{return u(c,a,(function(p,y,g,m){if(p===Reflect.getPrototypeOf({}))throw new o("Attempting to mutate Object.prototype");if(!p[y]){var b=Number.isInteger(Number(g[m+1])),v=g[m+1]==="+";p[y]=b||v?[]:{}}return l(g,m)&&(p[y]=h),p[y]}))}catch(p){if(p instanceof o)throw p;return c}},get:function(c,a){if(e(c)!="object"||c===null||a===void 0)return c;if(typeof a=="number")return c[a];try{return u(c,a,(function(h,p){return h[p]}))}catch{return c}},has:function(c,a){var h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e(c)!="object"||c===null||a===void 0)return!1;if(typeof a=="number")return a in c;try{var p=!1;return u(c,a,(function(y,g,m,b){if(!l(m,b))return y&&y[g];p=h.own?y.hasOwnProperty(g):g in y})),p}catch{return!1}},hasOwn:function(c,a,h){return this.has(c,a,h||{own:!0})},isIn:function(c,a,h){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(e(c)!="object"||c===null||a===void 0)return!1;try{var y=!1,g=!1;return u(c,a,(function(m,b,v,E){return y=y||m===h||!!m&&m[b]===h,g=l(v,E)&&e(m)==="object"&&b in m,m&&m[b]})),p.validPath?y&&g:y}catch{return!1}},ObjectPrototypeMutationError:o}}},Ms={};function H(t){var e=Ms[t];if(e!==void 0)return e.exports;var r=Ms[t]={id:t,loaded:!1,exports:{}};return Nd[t].call(r.exports,r,r.exports,H),r.loaded=!0,r.exports}H.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return H.d(e,{a:e}),e},H.d=(t,e)=>{for(var r in e)H.o(e,r)&&!H.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},H.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),H.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var Pd=H(737),Id=H.n(Pd);function gn(t){if(!mn(t))throw new Error("Parameter was not an error")}function mn(t){return!!t&&typeof t=="object"&&(e=t,Object.prototype.toString.call(e)==="[object Error]")||t instanceof Error;var e}class me extends Error{constructor(e,r){const n=[...arguments],{options:i,shortMessage:s}=(function(u){let l,c="";if(u.length===0)l={};else if(mn(u[0]))l={cause:u[0]},c=u.slice(1).join(" ")||"";else if(u[0]&&typeof u[0]=="object")l=Object.assign({},u[0]),c=u.slice(1).join(" ")||"";else{if(typeof u[0]!="string")throw new Error("Invalid arguments passed to Layerr");l={},c=c=u.join(" ")||""}return{options:l,shortMessage:c}})(n);let o=s;if(i.cause&&(o=`${o}: ${i.cause.message}`),super(o),this.message=o,i.name&&typeof i.name=="string"?this.name=i.name:this.name="Layerr",i.cause&&Object.defineProperty(this,"_cause",{value:i.cause}),Object.defineProperty(this,"_info",{value:{}}),i.info&&typeof i.info=="object"&&Object.assign(this._info,i.info),Error.captureStackTrace){const u=i.constructorOpt||this.constructor;Error.captureStackTrace(this,u)}}static cause(e){return gn(e),e._cause&&mn(e._cause)?e._cause:null}static fullStack(e){gn(e);const r=me.cause(e);return r?`${e.stack}
13
- caused by: ${me.fullStack(r)}`:e.stack??""}static info(e){gn(e);const r={},n=me.cause(e);return n&&Object.assign(r,me.info(n)),e._info&&Object.assign(r,e._info),r}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}}var Sd=H(47),Ar=H.n(Sd);const Vs="__PATH_SEPARATOR_POSIX__",Ds="__PATH_SEPARATOR_WINDOWS__";function W(t){try{const e=t.replace(/\//g,Vs).replace(/\\\\/g,Ds);return encodeURIComponent(e).split(Ds).join("\\\\").split(Vs).join("/")}catch(e){throw new me(e,"Failed encoding path")}}function Hs(t){return t.startsWith("/")?t:"/"+t}function Dt(t){let e=t;return e[0]!=="/"&&(e="/"+e),/^.+\/$/.test(e)&&(e=e.substr(0,e.length-1)),e}function Od(t){let e=new(Id())(t).pathname;return e.length<=0&&(e="/"),Dt(e)}function G(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return(function(){return(function(n){var i=[];if(n.length===0)return"";if(typeof n[0]!="string")throw new TypeError("Url must be a string. Received "+n[0]);if(n[0].match(/^[^/:]+:\/*$/)&&n.length>1){var s=n.shift();n[0]=s+n[0]}n[0].match(/^file:\/\/\//)?n[0]=n[0].replace(/^([^/:]+):\/*/,"$1:///"):n[0]=n[0].replace(/^([^/:]+):\/*/,"$1://");for(var o=0;o<n.length;o++){var u=n[o];if(typeof u!="string")throw new TypeError("Url must be a string. Received "+u);u!==""&&(o>0&&(u=u.replace(/^[\/]+/,"")),u=o<n.length-1?u.replace(/[\/]+$/,""):u.replace(/[\/]+$/,"/"),i.push(u))}var l=i.join("/"),c=(l=l.replace(/\/(\?|&|#[^!])/g,"$1")).split("?");return c.shift()+(c.length>0?"?":"")+c.join("&")})(typeof arguments[0]=="object"?arguments[0]:[].slice.call(arguments))})(e.reduce(((n,i,s)=>((s===0||i!=="/"||i==="/"&&n[n.length-1]!=="/")&&n.push(i),n)),[]))}var Cd=H(542),Ht=H.n(Cd);function qs(t,e){const r=t.url.replace("//",""),n=r.indexOf("/")==-1?"/":r.slice(r.indexOf("/")),i=t.method?t.method.toUpperCase():"GET",s=!!/(^|,)\s*auth\s*($|,)/.test(e.qop)&&"auth",o=`00000000${e.nc}`.slice(-8),u=(function(p,y,g,m,b,v,E){const T=E||Ht()(`${y}:${g}:${m}`);return p&&p.toLowerCase()==="md5-sess"?Ht()(`${T}:${b}:${v}`):T})(e.algorithm,e.username,e.realm,e.password,e.nonce,e.cnonce,e.ha1),l=Ht()(`${i}:${n}`),c=s?Ht()(`${u}:${e.nonce}:${o}:${e.cnonce}:${s}:${l}`):Ht()(`${u}:${e.nonce}:${l}`),a={username:e.username,realm:e.realm,nonce:e.nonce,uri:n,qop:s,response:c,nc:o,cnonce:e.cnonce,algorithm:e.algorithm,opaque:e.opaque},h=[];for(const p in a)a[p]&&(p==="qop"||p==="nc"||p==="algorithm"?h.push(`${p}=${a[p]}`):h.push(`${p}="${a[p]}"`));return`Digest ${h.join(", ")}`}function zs(t){return(t.headers&&t.headers.get("www-authenticate")||"").split(/\s/)[0].toLowerCase()==="digest"}var Rd=H(101),Ws=H.n(Rd);function Gs(t){return Ws().decode(t)}function Ks(t,e){var r;return`Basic ${r=`${t}:${e}`,Ws().encode(r)}`}const Js=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:typeof window<"u"?window:globalThis,Fd=Js.fetch.bind(Js);let Te=(function(t){return t.Auto="auto",t.Digest="digest",t.None="none",t.Password="password",t.Token="token",t})({}),Je=(function(t){return t.DataTypeNoLength="data-type-no-length",t.InvalidAuthType="invalid-auth-type",t.InvalidOutputFormat="invalid-output-format",t.LinkUnsupportedAuthType="link-unsupported-auth",t.InvalidUpdateRange="invalid-update-range",t.NotSupported="not-supported",t})({});function Ys(t,e,r,n,i){switch(t.authType){case Te.Auto:e&&r&&(t.headers.Authorization=Ks(e,r));break;case Te.Digest:t.digest=(function(o,u,l){return{username:o,password:u,ha1:l,nc:0,algorithm:"md5",hasDigestAuth:!1}})(e,r,i);break;case Te.None:break;case Te.Password:t.headers.Authorization=Ks(e,r);break;case Te.Token:t.headers.Authorization=`${(s=n).token_type} ${s.access_token}`;break;default:throw new me({info:{code:Je.InvalidAuthType}},`Invalid auth type: ${t.authType}`)}var s}H(345),H(800);const Xs="@@HOTPATCHER",Ld=()=>{};function yn(t){return{original:t,methods:[t],final:!1}}class _d{constructor(){this._configuration={registry:{},getEmptyAction:"null"},this.__type__=Xs}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let r=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==Xs)throw new Error("Failed taking control of target HotPatcher instance: Invalid type or object");return Object.keys(e.configuration.registry).forEach((n=>{this.configuration.registry.hasOwnProperty(n)?r&&(this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])):this.configuration.registry[n]=Object.assign({},e.configuration.registry[n])})),e._configuration=this.configuration,this}execute(e){const r=this.get(e)||Ld;for(var n=arguments.length,i=new Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];return r(...i)}get(e){const r=this.configuration.registry[e];if(!r)switch(this.getEmptyAction){case"null":return null;case"throw":throw new Error(`Failed handling method request: No method provided for override: ${e}`);default:throw new Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return(function(){for(var n=arguments.length,i=new Array(n),s=0;s<n;s++)i[s]=arguments[s];if(i.length===0)throw new Error("Failed creating sequence: No functions provided");return function(){for(var o=arguments.length,u=new Array(o),l=0;l<o;l++)u[l]=arguments[l];let c=u;const a=this;for(;i.length>0;)c=[i.shift().apply(a,c)];return c[0]}})(...r.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{chain:i=!1}=n;if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw new Error(`Failed patching '${e}': Method marked as being final`);if(typeof r!="function")throw new Error(`Failed patching '${e}': Provided method is not a function`);if(i)this.configuration.registry[e]?this.configuration.registry[e].methods.push(r):this.configuration.registry[e]=yn(r);else if(this.isPatched(e)){const{original:s}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(yn(r),{original:s})}else this.configuration.registry[e]=yn(r);return this}patchInline(e,r){this.isPatched(e)||this.patch(e,r);for(var n=arguments.length,i=new Array(n>2?n-2:0),s=2;s<n;s++)i[s-2]=arguments[s];return this.execute(e,...i)}plugin(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return n.forEach((s=>{this.patch(e,s,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw new Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!="function")throw new Error(`Failed restoring method: Original method not found or of invalid type for key: ${e}`);return this.configuration.registry[e].methods=[this.configuration.registry[e].original],this}setFinal(e){if(!this.configuration.registry.hasOwnProperty(e))throw new Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}}let bn=null;function Ud(){return bn||(bn=new _d),bn}function Nr(t){return(function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let r=e;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r})(t)?Object.assign({},t):Object.setPrototypeOf(Object.assign({},t),Object.getPrototypeOf(t))}function Zs(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];let n=null,i=[...e];for(;i.length>0;){const s=i.shift();n=n?Qs(n,s):Nr(s)}return n}function Qs(t,e){const r=Nr(t);return Object.keys(e).forEach((n=>{r.hasOwnProperty(n)?Array.isArray(e[n])?r[n]=Array.isArray(r[n])?[...r[n],...e[n]]:[...e[n]]:typeof e[n]=="object"&&e[n]?r[n]=typeof r[n]=="object"&&r[n]?Qs(r[n],e[n]):Nr(e[n]):r[n]=e[n]:r[n]=e[n]})),r}function Bd(t){const e={};for(const r of t.keys())e[r]=t.get(r);return e}function wn(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];if(e.length===0)return{};const n={};return e.reduce(((i,s)=>(Object.keys(s).forEach((o=>{const u=o.toLowerCase();n.hasOwnProperty(u)?i[n[u]]=s[o]:(n[u]=o,i[o]=s[o])})),i)),{})}H(805);const kd=typeof ArrayBuffer=="function",{toString:$d}=Object.prototype;function eo(t){return kd&&(t instanceof ArrayBuffer||$d.call(t)==="[object ArrayBuffer]")}function to(t){return t!=null&&t.constructor!=null&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function xn(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}function En(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const ro=xn((function(t){const e=t._digest;return delete t._digest,e.hasDigestAuth&&(t=Zs(t,{headers:{Authorization:qs(t,e)}})),En(Pr(t),(function(r){let n=!1;return i=function(o){return n?o:r},(s=(function(){if(r.status==401)return e.hasDigestAuth=(function(o,u){if(!zs(o))return!1;const l=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){const c=o.headers&&o.headers.get("www-authenticate")||"",a=l.exec(c);if(!a)break;u[a[1]]=a[2]||a[3]}return u.nc+=1,u.cnonce=(function(){let c="";for(let a=0;a<32;++a)c=`${c}${"abcdef0123456789"[Math.floor(16*Math.random())]}`;return c})(),!0})(r,e),(function(){if(e.hasDigestAuth)return En(Pr(t=Zs(t,{headers:{Authorization:qs(t,e)}})),(function(o){return o.status==401?e.hasDigestAuth=!1:e.nc++,n=!0,o}))})();e.nc++})())&&s.then?s.then(i):i(s);var i,s}))})),jd=xn((function(t,e){return En(Pr(t),(function(r){return r.ok?(e.authType=Te.Password,r):r.status==401&&zs(r)?(e.authType=Te.Digest,Ys(e,e.username,e.password,void 0,void 0),t._digest=e.digest,ro(t)):r}))})),ne=xn((function(t,e){return e.authType===Te.Auto?jd(t,e):t._digest?ro(t):Pr(t)}));function ie(t,e,r){const n=Nr(t);return n.headers=wn(e.headers,n.headers||{},r.headers||{}),r.data!==void 0&&(n.data=r.data),r.signal&&(n.signal=r.signal),e.httpAgent&&(n.httpAgent=e.httpAgent),e.httpsAgent&&(n.httpsAgent=e.httpsAgent),e.digest&&(n._digest=e.digest),typeof e.withCredentials=="boolean"&&(n.withCredentials=e.withCredentials),n}function Pr(t){const e=Ud();return e.patchInline("request",(r=>e.patchInline("fetch",Fd,r.url,(function(n){let i={};const s={method:n.method};if(n.headers&&(i=wn(i,n.headers)),n.data!==void 0){const[o,u]=(function(l){if(typeof l=="string")return[l,{}];if(to(l))return[l,{}];if(eo(l))return[l,{}];if(l&&typeof l=="object")return[JSON.stringify(l),{"content-type":"application/json"}];throw new Error("Unable to convert request body: Unexpected body type: "+typeof l)})(n.data);s.body=o,i=wn(i,u)}return n.signal&&(s.signal=n.signal),n.withCredentials&&(s.credentials="include"),s.headers=i,s})(r))),t)}var Md=H(285);const Ir=t=>{if(typeof t!="string")throw new TypeError("invalid pattern");if(t.length>65536)throw new TypeError("pattern is too long")},Vd={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},qt=t=>t.replace(/[[\]\\-]/g,"\\$&"),no=t=>t.join(""),Dd=(t,e)=>{const r=e;if(t.charAt(r)!=="[")throw new Error("not in a brace expression");const n=[],i=[];let s=r+1,o=!1,u=!1,l=!1,c=!1,a=r,h="";e:for(;s<t.length;){const m=t.charAt(s);if(m!=="!"&&m!=="^"||s!==r+1){if(m==="]"&&o&&!l){a=s+1;break}if(o=!0,m!=="\\"||l){if(m==="["&&!l){for(const[b,[v,E,T]]of Object.entries(Vd))if(t.startsWith(b,s)){if(h)return["$.",!1,t.length-r,!0];s+=b.length,T?i.push(v):n.push(v),u=u||E;continue e}}l=!1,h?(m>h?n.push(qt(h)+"-"+qt(m)):m===h&&n.push(qt(m)),h="",s++):t.startsWith("-]",s+1)?(n.push(qt(m+"-")),s+=2):t.startsWith("-",s+1)?(h=m,s+=2):(n.push(qt(m)),s++)}else l=!0,s++}else c=!0,s++}if(a<s)return["",!1,0,!1];if(!n.length&&!i.length)return["$.",!1,t.length-r,!0];if(i.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c)return[(p=n[0].length===2?n[0].slice(-1):n[0],p.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")),!1,a-r,!1];var p;const y="["+(c?"^":"")+no(n)+"]",g="["+(c?"":"^")+no(i)+"]";return[n.length&&i.length?"("+y+"|"+g+")":n.length?y:g,u,a-r,!0]},zt=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?t.replace(/\[([^\/\\])\]/g,"$1"):t.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1")},Hd=new Set(["!","?","+","*","@"]),io=t=>Hd.has(t),vn="(?!\\.)",qd=new Set(["[","."]),zd=new Set(["..","."]),Wd=new Set("().*{}+?[]^$\\!"),Tn="[^/]",so=Tn+"*?",oo=Tn+"+?";class ye{type;#e;#r;#s=!1;#t=[];#n;#d;#l;#g=!1;#f;#c;#p=!1;constructor(e,r){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&(this.#r=!0),this.#n=r,this.#e=this.#n?this.#n.#e:this,this.#f=this.#e===this?n:this.#e.#f,this.#l=this.#e===this?[]:this.#e.#l,e!=="!"||this.#e.#g||this.#l.push(this),this.#d=this.#n?this.#n.#t.length:0}get hasMagic(){if(this.#r!==void 0)return this.#r;for(const e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#r=!0;return this.#r}toString(){return this.#c!==void 0?this.#c:this.type?this.#c=this.type+"("+this.#t.map((e=>String(e))).join("|")+")":this.#c=this.#t.map((e=>String(e))).join("")}#h(){if(this!==this.#e)throw new Error("should only call on root");if(this.#g)return this;let e;for(this.toString(),this.#g=!0;e=this.#l.pop();){if(e.type!=="!")continue;let r=e,n=r.#n;for(;n;){for(let i=r.#d+1;!n.type&&i<n.#t.length;i++)for(const s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[i])}r=n,n=r.#n}}return this}push(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(const i of r)if(i!==""){if(typeof i!="string"&&!(i instanceof ye&&i.#n===this))throw new Error("invalid part: "+i);this.#t.push(i)}}toJSON(){const e=this.type===null?this.#t.slice().map((r=>typeof r=="string"?r:r.toJSON())):[this.type,...this.#t.map((r=>r.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#g&&this.#n?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#n?.isStart())return!1;if(this.#d===0)return!0;const e=this.#n;for(let r=0;r<this.#d;r++){const n=e.#t[r];if(!(n instanceof ye&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#n?.type==="!")return!0;if(!this.#n?.isEnd())return!1;if(!this.type)return this.#n?.isEnd();const e=this.#n?this.#n.#t.length:0;return this.#d===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){const r=new ye(this.type,e);for(const n of this.#t)r.copyIn(n);return r}static#o(e,r,n,i){let s=!1,o=!1,u=-1,l=!1;if(r.type===null){let y=n,g="";for(;y<e.length;){const m=e.charAt(y++);if(s||m==="\\")s=!s,g+=m;else if(o)y===u+1?m!=="^"&&m!=="!"||(l=!0):m!=="]"||y===u+2&&l||(o=!1),g+=m;else if(m!=="[")if(i.noext||!io(m)||e.charAt(y)!=="(")g+=m;else{r.push(g),g="";const b=new ye(m,r);y=ye.#o(e,b,y,i),r.push(b)}else o=!0,u=y,l=!1,g+=m}return r.push(g),y}let c=n+1,a=new ye(null,r);const h=[];let p="";for(;c<e.length;){const y=e.charAt(c++);if(s||y==="\\")s=!s,p+=y;else if(o)c===u+1?y!=="^"&&y!=="!"||(l=!0):y!=="]"||c===u+2&&l||(o=!1),p+=y;else if(y!=="[")if(io(y)&&e.charAt(c)==="("){a.push(p),p="";const g=new ye(y,a);a.push(g),c=ye.#o(e,g,c,i)}else if(y!=="|"){if(y===")")return p===""&&r.#t.length===0&&(r.#p=!0),a.push(p),p="",r.push(...h,a),c;p+=y}else a.push(p),p="",h.push(a),a=new ye(null,r);else o=!0,u=c,l=!1,p+=y}return r.type=null,r.#r=void 0,r.#t=[e.substring(n-1)],c}static fromGlob(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=new ye(null,void 0,r);return ye.#o(e,n,0,r),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();const e=this.toString(),[r,n,i,s]=this.toRegExpSource();if(!(i||this.#r||this.#f.nocase&&!this.#f.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;const o=(this.#f.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${r}$`,o),{_src:r,_glob:e})}get options(){return this.#f}toRegExpSource(e){const r=e??!!this.#f.dot;if(this.#e===this&&this.#h(),!this.type){const l=this.isStart()&&this.isEnd(),c=this.#t.map((p=>{const[y,g,m,b]=typeof p=="string"?ye.#i(p,this.#r,l):p.toRegExpSource(e);return this.#r=this.#r||m,this.#s=this.#s||b,y})).join("");let a="";if(this.isStart()&&typeof this.#t[0]=="string"&&(this.#t.length!==1||!zd.has(this.#t[0]))){const p=qd,y=r&&p.has(c.charAt(0))||c.startsWith("\\.")&&p.has(c.charAt(2))||c.startsWith("\\.\\.")&&p.has(c.charAt(4)),g=!r&&!e&&p.has(c.charAt(0));a=y?"(?!(?:^|/)\\.\\.?(?:$|/))":g?vn:""}let h="";return this.isEnd()&&this.#e.#g&&this.#n?.type==="!"&&(h="(?:$|\\/)"),[a+c+h,zt(c),this.#r=!!this.#r,this.#s]}const n=this.type==="*"||this.type==="+",i=this.type==="!"?"(?:(?!(?:":"(?:";let s=this.#a(r);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){const l=this.toString();return this.#t=[l],this.type=null,this.#r=void 0,[l,zt(this.toString()),!1,!1]}let o=!n||e||r?"":this.#a(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let u="";return u=this.type==="!"&&this.#p?(this.isStart()&&!r?vn:"")+oo:i+s+(this.type==="!"?"))"+(!this.isStart()||r||e?"":vn)+so+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`),[u,zt(s),this.#r=!!this.#r,this.#s]}#a(e){return this.#t.map((r=>{if(typeof r=="string")throw new Error("string type in extglob ast??");const[n,i,s,o]=r.toRegExpSource(e);return this.#s=this.#s||o,n})).filter((r=>!(this.isStart()&&this.isEnd()&&!r))).join("|")}static#i(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=!1,s="",o=!1;for(let u=0;u<e.length;u++){const l=e.charAt(u);if(i)i=!1,s+=(Wd.has(l)?"\\":"")+l;else if(l!=="\\"){if(l==="["){const[c,a,h,p]=Dd(e,u);if(h){s+=c,o=o||a,u+=h-1,r=r||p;continue}}l!=="*"?l!=="?"?s+=l.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):(s+=Tn,r=!0):(s+=n&&e==="*"?oo:so,r=!0)}else u===e.length-1?s+="\\\\":i=!0}return[s,zt(e),!!r,o]}}const de=function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Ir(e),!(!r.nocomment&&e.charAt(0)==="#")&&new Sr(e,r).match(t)},Gd=/^\*+([^+@!?\*\[\(]*)$/,Kd=t=>e=>!e.startsWith(".")&&e.endsWith(t),Jd=t=>e=>e.endsWith(t),Yd=t=>(t=t.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(t)),Xd=t=>(t=t.toLowerCase(),e=>e.toLowerCase().endsWith(t)),Zd=/^\*+\.\*+$/,Qd=t=>!t.startsWith(".")&&t.includes("."),ep=t=>t!=="."&&t!==".."&&t.includes("."),tp=/^\.\*+$/,rp=t=>t!=="."&&t!==".."&&t.startsWith("."),np=/^\*+$/,ip=t=>t.length!==0&&!t.startsWith("."),sp=t=>t.length!==0&&t!=="."&&t!=="..",op=/^\?+([^+@!?\*\[\(]*)?$/,ap=t=>{let[e,r=""]=t;const n=ao([e]);return r?(r=r.toLowerCase(),i=>n(i)&&i.toLowerCase().endsWith(r)):n},up=t=>{let[e,r=""]=t;const n=uo([e]);return r?(r=r.toLowerCase(),i=>n(i)&&i.toLowerCase().endsWith(r)):n},lp=t=>{let[e,r=""]=t;const n=uo([e]);return r?i=>n(i)&&i.endsWith(r):n},cp=t=>{let[e,r=""]=t;const n=ao([e]);return r?i=>n(i)&&i.endsWith(r):n},ao=t=>{let[e]=t;const r=e.length;return n=>n.length===r&&!n.startsWith(".")},uo=t=>{let[e]=t;const r=e.length;return n=>n.length===r&&n!=="."&&n!==".."},lo=typeof Ue=="object"&&Ue?typeof Ue.env=="object"&&Ue.env&&Ue.env.__MINIMATCH_TESTING_PLATFORM__||Ue.platform:"posix";de.sep=lo==="win32"?"\\":"/";const Oe=Symbol("globstar **");de.GLOBSTAR=Oe,de.filter=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r=>de(r,t,e)};const Ce=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},t,e)};de.defaults=t=>{if(!t||typeof t!="object"||!Object.keys(t).length)return de;const e=de;return Object.assign((function(r,n){return e(r,n,Ce(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends e.Minimatch{constructor(r){super(r,Ce(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(r){return e.defaults(Ce(t,r)).Minimatch}},AST:class extends e.AST{constructor(r,n){super(r,n,Ce(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.AST.fromGlob(r,Ce(t,n))}},unescape:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.unescape(r,Ce(t,n))},escape:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.escape(r,Ce(t,n))},filter:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.filter(r,Ce(t,n))},defaults:r=>e.defaults(Ce(t,r)),makeRe:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.makeRe(r,Ce(t,n))},braceExpand:function(r){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e.braceExpand(r,Ce(t,n))},match:function(r,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return e.match(r,n,Ce(t,i))},sep:e.sep,GLOBSTAR:Oe})};const co=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Ir(t),e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)?[t]:Md(t)};de.braceExpand=co,de.makeRe=function(t){return new Sr(t,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},de.match=function(t,e){const r=new Sr(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return t=t.filter((n=>r.match(n))),r.options.nonull&&!t.length&&t.push(e),t};const fo=/[?*]|[+@!]\(.*?\)|\[|\]/;class Sr{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Ir(e),r=r||{},this.options=r,this.pattern=e,this.platform=r.platform||lo,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!r.windowsPathsNoEscape||r.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!r.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!r.nonegate,this.comment=!1,this.empty=!1,this.partial=!!r.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=r.windowsNoMagicRoot!==void 0?r.windowsNoMagicRoot:!(!this.isWindows||!this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const e of this.set)for(const r of e)if(typeof r!="string")return!0;return!1}debug(){}make(){const e=this.pattern,r=this.options;if(!r.nocomment&&e.charAt(0)==="#")return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],r.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);const n=this.globSet.map((s=>this.slashSplit(s)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let i=this.globParts.map(((s,o,u)=>{if(this.isWindows&&this.windowsNoMagicRoot){const l=!(s[0]!==""||s[1]!==""||s[2]!=="?"&&fo.test(s[2])||fo.test(s[3])),c=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map((a=>this.parse(a)))];if(c)return[s[0],...s.slice(1).map((a=>this.parse(a)))]}return s.map((l=>this.parse(l)))}));if(this.debug(this.pattern,i),this.set=i.filter((s=>s.indexOf(!1)===-1)),this.isWindows)for(let s=0;s<this.set.length;s++){const o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n=0;n<e.length;n++)for(let i=0;i<e[n].length;i++)e[n][i]==="**"&&(e[n][i]="*");const{optimizationLevel:r=1}=this.options;return r>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=r>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((r=>{let n=-1;for(;(n=r.indexOf("**",n+1))!==-1;){let i=n;for(;r[i+1]==="**";)i++;i!==n&&r.splice(n,i-n)}return r}))}levelOneOptimize(e){return e.map((r=>(r=r.reduce(((n,i)=>{const s=n[n.length-1];return i==="**"&&s==="**"?n:i===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(i),n)}),[])).length===0?[""]:r))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let r=!1;do{if(r=!1,!this.preserveMultipleSlashes){for(let i=1;i<e.length-1;i++){const s=e[i];i===1&&s===""&&e[0]===""||s!=="."&&s!==""||(r=!0,e.splice(i,1),i--)}e[0]!=="."||e.length!==2||e[1]!=="."&&e[1]!==""||(r=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){const i=e[n-1];i&&i!=="."&&i!==".."&&i!=="**"&&(r=!0,e.splice(n-1,2),n-=2)}}while(r);return e.length===0?[""]:e}firstPhasePreProcess(e){let r=!1;do{r=!1;for(let n of e){let i=-1;for(;(i=n.indexOf("**",i+1))!==-1;){let o=i;for(;n[o+1]==="**";)o++;o>i&&n.splice(i+1,o-i);let u=n[i+1];const l=n[i+2],c=n[i+3];if(u!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;r=!0,n.splice(i,1);const a=n.slice(0);a[i]="**",e.push(a),i--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){const u=n[o];o===1&&u===""&&n[0]===""||u!=="."&&u!==""||(r=!0,n.splice(o,1),o--)}n[0]!=="."||n.length!==2||n[1]!=="."&&n[1]!==""||(r=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){const o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){r=!0;const u=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...u),n.length===0&&n.push(""),s-=2}}}}while(r);return e}secondPhasePreProcess(e){for(let r=0;r<e.length-1;r++)for(let n=r+1;n<e.length;n++){const i=this.partsMatch(e[r],e[n],!this.preserveMultipleSlashes);if(i){e[r]=[],e[n]=i;break}}return e.filter((r=>r.length))}partsMatch(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],i=0,s=0,o=[],u="";for(;i<e.length&&s<r.length;)if(e[i]===r[s])o.push(u==="b"?r[s]:e[i]),i++,s++;else if(n&&e[i]==="**"&&r[s]===e[i+1])o.push(e[i]),i++;else if(n&&r[s]==="**"&&e[i]===r[s+1])o.push(r[s]),s++;else if(e[i]!=="*"||!r[s]||!this.options.dot&&r[s].startsWith(".")||r[s]==="**"){if(r[s]!=="*"||!e[i]||!this.options.dot&&e[i].startsWith(".")||e[i]==="**"||u==="a")return!1;u="b",o.push(r[s]),i++,s++}else{if(u==="b")return!1;u="a",o.push(e[i]),i++,s++}return e.length===r.length&&o}parseNegate(){if(this.nonegate)return;const e=this.pattern;let r=!1,n=0;for(let i=0;i<e.length&&e.charAt(i)==="!";i++)r=!r,n++;n&&(this.pattern=e.slice(n)),this.negate=r}matchOne(e,r){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const i=this.options;if(this.isWindows){const m=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),b=!m&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),v=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),E=b?3:m?0:void 0,T=!v&&r[0]===""&&r[1]===""&&r[2]==="?"&&typeof r[3]=="string"&&/^[a-z]:$/i.test(r[3])?3:v?0:void 0;if(typeof E=="number"&&typeof T=="number"){const[N,S]=[e[E],r[T]];N.toLowerCase()===S.toLowerCase()&&(r[T]=N,T>E?r=r.slice(T):E>T&&(e=e.slice(E)))}}const{optimizationLevel:s=1}=this.options;s>=2&&(e=this.levelTwoFileOptimize(e)),this.debug("matchOne",this,{file:e,pattern:r}),this.debug("matchOne",e.length,r.length);for(var o=0,u=0,l=e.length,c=r.length;o<l&&u<c;o++,u++){this.debug("matchOne loop");var a=r[u],h=e[o];if(this.debug(r,a,h),a===!1)return!1;if(a===Oe){this.debug("GLOBSTAR",[r,a,h]);var p=o,y=u+1;if(y===c){for(this.debug("** at the end");o<l;o++)if(e[o]==="."||e[o]===".."||!i.dot&&e[o].charAt(0)===".")return!1;return!0}for(;p<l;){var g=e[p];if(this.debug(`
14
- globstar while`,e,p,r,y,g),this.matchOne(e.slice(p),r.slice(y),n))return this.debug("globstar found match!",p,l,g),!0;if(g==="."||g===".."||!i.dot&&g.charAt(0)==="."){this.debug("dot detected!",e,p,r,y);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug(`
15
- >>> no match, partial?`,e,p,r,y),p!==l))}let m;if(typeof a=="string"?(m=h===a,this.debug("string match",a,h,m)):(m=a.test(h),this.debug("pattern match",a,h,m)),!m)return!1}if(o===l&&u===c)return!0;if(o===l)return n;if(u===c)return o===l-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return co(this.pattern,this.options)}parse(e){Ir(e);const r=this.options;if(e==="**")return Oe;if(e==="")return"";let n,i=null;(n=e.match(np))?i=r.dot?sp:ip:(n=e.match(Gd))?i=(r.nocase?r.dot?Xd:Yd:r.dot?Jd:Kd)(n[1]):(n=e.match(op))?i=(r.nocase?r.dot?up:ap:r.dot?lp:cp)(n):(n=e.match(Zd))?i=r.dot?ep:Qd:(n=e.match(tp))&&(i=rp);const s=ye.fromGlob(e,this.options).toMMPattern();return i&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:i}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const e=this.set;if(!e.length)return this.regexp=!1,this.regexp;const r=this.options,n=r.noglobstar?"[^/]*?":r.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",i=new Set(r.nocase?["i"]:[]);let s=e.map((l=>{const c=l.map((a=>{if(a instanceof RegExp)for(const h of a.flags.split(""))i.add(h);return typeof a=="string"?a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):a===Oe?Oe:a._src}));return c.forEach(((a,h)=>{const p=c[h+1],y=c[h-1];a===Oe&&y!==Oe&&(y===void 0?p!==void 0&&p!==Oe?c[h+1]="(?:\\/|"+n+"\\/)?"+p:c[h]=n:p===void 0?c[h-1]=y+"(?:\\/|"+n+")?":p!==Oe&&(c[h-1]=y+"(?:\\/|\\/"+n+"\\/)"+p,c[h+1]=Oe))})),c.filter((a=>a!==Oe)).join("/")})).join("|");const[o,u]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+u+"$",this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...i].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.partial;if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&r)return!0;const n=this.options;this.isWindows&&(e=e.split("\\").join("/"));const i=this.slashSplit(e);this.debug(this.pattern,"split",i);const s=this.set;this.debug(this.pattern,"set",s);let o=i[i.length-1];if(!o)for(let u=i.length-2;!o&&u>=0;u--)o=i[u];for(let u=0;u<s.length;u++){const l=s[u];let c=i;if(n.matchBase&&l.length===1&&(c=[o]),this.matchOne(c,l,r))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return de.defaults(e).Minimatch}}function An(t){const e=new Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:""}Invalid response: ${t.status} ${t.statusText}`);return e.status=t.status,e.response=t,e}function se(t,e){const{status:r}=e;if(r===401&&t.digest)return e;if(r>=400)throw An(e);return e}function Tt(t,e){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:e,headers:t.headers?Bd(t.headers):{},status:t.status,statusText:t.statusText}:e}de.AST=ye,de.Minimatch=Sr,de.escape=function(t){let{windowsPathsNoEscape:e=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return e?t.replace(/[?*()[\]]/g,"[$&]"):t.replace(/[?*()[\]\\]/g,"\\$&")},de.unescape=zt;const fp=(ho=function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"COPY",headers:{Destination:G(t.remoteURL,W(r)),Overwrite:n.overwrite===!1?"F":"T",Depth:n.shallow?"0":"infinity"}},t,n);return o=function(u){se(t,u)},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o},function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];try{return Promise.resolve(ho.apply(this,t))}catch(r){return Promise.reject(r)}});var ho;const hp={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(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,r){return t},captureMetaData:!1},po=":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",dp=new RegExp("^["+po+"]["+po+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function go(t,e){const r=[];let n=e.exec(t);for(;n;){const i=[];i.startIndex=e.lastIndex-n[0].length;const s=n.length;for(let o=0;o<s;o++)i.push(n[o]);r.push(i),n=e.exec(t)}return r}const Or=function(t){return dp.exec(t)!=null};let Nn;Nn=typeof Symbol!="function"?"@@xmlMetadata":Symbol("XML Node Metadata");class ct{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,r){e==="__proto__"&&(e="#__proto__"),this.child.push({[e]:r})}addChild(e,r){e.tagname==="__proto__"&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),r!==void 0&&(this.child[this.child.length-1][Nn]={startIndex:r})}static getMetaDataSymbol(){return Nn}}class pp{constructor(e){this.suppressValidationErr=!e}readDocType(e,r){const n={};if(e[r+3]!=="O"||e[r+4]!=="C"||e[r+5]!=="T"||e[r+6]!=="Y"||e[r+7]!=="P"||e[r+8]!=="E")throw new Error("Invalid Tag instead of DOCTYPE");{r+=9;let i=1,s=!1,o=!1,u="";for(;r<e.length;r++)if(e[r]!=="<"||o)if(e[r]===">"){if(o?e[r-1]==="-"&&e[r-2]==="-"&&(o=!1,i--):i--,i===0)break}else e[r]==="["?s=!0:u+=e[r];else{if(s&&ft(e,"!ENTITY",r)){let l,c;r+=7,[l,c,r]=this.readEntityExp(e,r+1,this.suppressValidationErr),c.indexOf("&")===-1&&(n[l]={regx:RegExp(`&${l};`,"g"),val:c})}else if(s&&ft(e,"!ELEMENT",r)){r+=8;const{index:l}=this.readElementExp(e,r+1);r=l}else if(s&&ft(e,"!ATTLIST",r))r+=8;else if(s&&ft(e,"!NOTATION",r)){r+=9;const{index:l}=this.readNotationExp(e,r+1,this.suppressValidationErr);r=l}else{if(!ft(e,"!--",r))throw new Error("Invalid DOCTYPE");o=!0}i++,u=""}if(i!==0)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:r}}readEntityExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r])&&e[r]!=='"'&&e[r]!=="'";)n+=e[r],r++;if(Wt(n),r=Ae(e,r),!this.suppressValidationErr){if(e.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[r]==="%")throw new Error("Parameter entities are not supported")}let i="";return[r,i]=this.readIdentifierVal(e,r,"entity"),[n,i,--r]}readNotationExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;!this.suppressValidationErr&&Wt(n),r=Ae(e,r);const i=e.substring(r,r+6).toUpperCase();if(!this.suppressValidationErr&&i!=="SYSTEM"&&i!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${i}"`);r+=i.length,r=Ae(e,r);let s=null,o=null;if(i==="PUBLIC")[r,s]=this.readIdentifierVal(e,r,"publicIdentifier"),e[r=Ae(e,r)]!=='"'&&e[r]!=="'"||([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"));else if(i==="SYSTEM"&&([r,o]=this.readIdentifierVal(e,r,"systemIdentifier"),!this.suppressValidationErr&&!o))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:s,systemIdentifier:o,index:--r}}readIdentifierVal(e,r,n){let i="";const s=e[r];if(s!=='"'&&s!=="'")throw new Error(`Expected quoted string, found "${s}"`);for(r++;r<e.length&&e[r]!==s;)i+=e[r],r++;if(e[r]!==s)throw new Error(`Unterminated ${n} value`);return[++r,i]}readElementExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;if(!this.suppressValidationErr&&!Or(n))throw new Error(`Invalid element name: "${n}"`);let i="";if(e[r=Ae(e,r)]==="E"&&ft(e,"MPTY",r))r+=4;else if(e[r]==="A"&&ft(e,"NY",r))r+=2;else if(e[r]==="("){for(r++;r<e.length&&e[r]!==")";)i+=e[r],r++;if(e[r]!==")")throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[r]}"`);return{elementName:n,contentModel:i.trim(),index:r}}readAttlistExp(e,r){r=Ae(e,r);let n="";for(;r<e.length&&!/\s/.test(e[r]);)n+=e[r],r++;Wt(n),r=Ae(e,r);let i="";for(;r<e.length&&!/\s/.test(e[r]);)i+=e[r],r++;if(!Wt(i))throw new Error(`Invalid attribute name: "${i}"`);r=Ae(e,r);let s="";if(e.substring(r,r+8).toUpperCase()==="NOTATION"){if(s="NOTATION",e[r=Ae(e,r+=8)]!=="(")throw new Error(`Expected '(', found "${e[r]}"`);r++;let u=[];for(;r<e.length&&e[r]!==")";){let l="";for(;r<e.length&&e[r]!=="|"&&e[r]!==")";)l+=e[r],r++;if(l=l.trim(),!Wt(l))throw new Error(`Invalid notation name: "${l}"`);u.push(l),e[r]==="|"&&(r++,r=Ae(e,r))}if(e[r]!==")")throw new Error("Unterminated list of notations");r++,s+=" ("+u.join("|")+")"}else{for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;const u=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!u.includes(s.toUpperCase()))throw new Error(`Invalid attribute type: "${s}"`)}r=Ae(e,r);let o="";return e.substring(r,r+8).toUpperCase()==="#REQUIRED"?(o="#REQUIRED",r+=8):e.substring(r,r+7).toUpperCase()==="#IMPLIED"?(o="#IMPLIED",r+=7):[r,o]=this.readIdentifierVal(e,r,"ATTLIST"),{elementName:n,attributeName:i,attributeType:s,defaultValue:o,index:r}}}const Ae=(t,e)=>{for(;e<t.length&&/\s/.test(t[e]);)e++;return e};function ft(t,e,r){for(let n=0;n<e.length;n++)if(e[n]!==t[r+n+1])return!1;return!0}function Wt(t){if(Or(t))return t;throw new Error(`Invalid entity name ${t}`)}const gp=/^[-+]?0x[a-fA-F0-9]+$/,mp=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,yp={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},bp=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function mo(t){return typeof t=="function"?t:Array.isArray(t)?e=>{for(const r of t)if(typeof r=="string"&&e===r||r instanceof RegExp&&r.test(e))return!0}:()=>!1}class wp{constructor(e){if(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:(r,n)=>bo(n,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(r,n)=>bo(n,16,"&#x")}},this.addExternalEntities=xp,this.parseXml=Np,this.parseTextData=Ep,this.resolveNameSpace=vp,this.buildAttributesMap=Ap,this.isItStopNode=Op,this.replaceEntitiesValue=Ip,this.readStopNodeData=Cp,this.saveTextToParentTag=Sp,this.addChild=Pp,this.ignoreAttributesFn=mo(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let r=0;r<this.options.stopNodes.length;r++){const n=this.options.stopNodes[r];typeof n=="string"&&(n.startsWith("*.")?this.stopNodesWildcard.add(n.substring(2)):this.stopNodesExact.add(n))}}}}function xp(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:t[n]}}}function Ep(t,e,r,n,i,s,o){if(t!==void 0&&(this.options.trimValues&&!n&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const u=this.options.tagValueProcessor(e,t,r,i,s);return u==null?t:typeof u!=typeof t||u!==t?u:this.options.trimValues||t.trim()===t?yo(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function vp(t){if(this.options.removeNSPrefix){const e=t.split(":"),r=t.charAt(0)==="/"?"/":"";if(e[0]==="xmlns")return"";e.length===2&&(t=r+e[1])}return t}const Tp=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Ap(t,e){if(this.options.ignoreAttributes!==!0&&typeof t=="string"){const r=go(t,Tp),n=r.length,i={};for(let s=0;s<n;s++){const o=this.resolveNameSpace(r[s][1]);if(this.ignoreAttributesFn(o,e))continue;let u=r[s][4],l=this.options.attributeNamePrefix+o;if(o.length)if(this.options.transformAttributeName&&(l=this.options.transformAttributeName(l)),l==="__proto__"&&(l="#__proto__"),u!==void 0){this.options.trimValues&&(u=u.trim()),u=this.replaceEntitiesValue(u);const c=this.options.attributeValueProcessor(o,u,e);i[l]=c==null?u:typeof c!=typeof u||c!==u?c:yo(u,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[l]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const s={};return s[this.options.attributesGroupName]=i,s}return i}}const Np=function(t){t=t.replace(/\r\n?/g,`
16
- `);const e=new ct("!xml");let r=e,n="",i="";const s=new pp(this.options.processEntities);for(let o=0;o<t.length;o++)if(t[o]==="<")if(t[o+1]==="/"){const u=ht(t,">",o,"Closing Tag is not closed.");let l=t.substring(o+2,u).trim();if(this.options.removeNSPrefix){const h=l.indexOf(":");h!==-1&&(l=l.substr(h+1))}this.options.transformTagName&&(l=this.options.transformTagName(l)),r&&(n=this.saveTextToParentTag(n,r,i));const c=i.substring(i.lastIndexOf(".")+1);if(l&&this.options.unpairedTags.indexOf(l)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${l}>`);let a=0;c&&this.options.unpairedTags.indexOf(c)!==-1?(a=i.lastIndexOf(".",i.lastIndexOf(".")-1),this.tagsNodeStack.pop()):a=i.lastIndexOf("."),i=i.substring(0,a),r=this.tagsNodeStack.pop(),n="",o=u}else if(t[o+1]==="?"){let u=Pn(t,o,!1,"?>");if(!u)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,i),!(this.options.ignoreDeclaration&&u.tagName==="?xml"||this.options.ignorePiTags)){const l=new ct(u.tagName);l.add(this.options.textNodeName,""),u.tagName!==u.tagExp&&u.attrExpPresent&&(l[":@"]=this.buildAttributesMap(u.tagExp,i)),this.addChild(r,l,i,o)}o=u.closeIndex+1}else if(t.substr(o+1,3)==="!--"){const u=ht(t,"-->",o+4,"Comment is not closed.");if(this.options.commentPropName){const l=t.substring(o+4,u-2);n=this.saveTextToParentTag(n,r,i),r.add(this.options.commentPropName,[{[this.options.textNodeName]:l}])}o=u}else if(t.substr(o+1,2)==="!D"){const u=s.readDocType(t,o);this.docTypeEntities=u.entities,o=u.i}else if(t.substr(o+1,2)==="!["){const u=ht(t,"]]>",o,"CDATA is not closed.")-2,l=t.substring(o+9,u);n=this.saveTextToParentTag(n,r,i);let c=this.parseTextData(l,r.tagname,i,!0,!1,!0,!0);c==null&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:l}]):r.add(this.options.textNodeName,c),o=u+2}else{let u=Pn(t,o,this.options.removeNSPrefix),l=u.tagName;const c=u.rawTagName;let a=u.tagExp,h=u.attrExpPresent,p=u.closeIndex;if(this.options.transformTagName){const m=this.options.transformTagName(l);a===l&&(a=m),l=m}r&&n&&r.tagname!=="!xml"&&(n=this.saveTextToParentTag(n,r,i,!1));const y=r;y&&this.options.unpairedTags.indexOf(y.tagname)!==-1&&(r=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf("."))),l!==e.tagname&&(i+=i?"."+l:l);const g=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,l)){let m="";if(a.length>0&&a.lastIndexOf("/")===a.length-1)l[l.length-1]==="/"?(l=l.substr(0,l.length-1),i=i.substr(0,i.length-1),a=l):a=a.substr(0,a.length-1),o=u.closeIndex;else if(this.options.unpairedTags.indexOf(l)!==-1)o=u.closeIndex;else{const v=this.readStopNodeData(t,c,p+1);if(!v)throw new Error(`Unexpected end of ${c}`);o=v.i,m=v.tagContent}const b=new ct(l);l!==a&&h&&(b[":@"]=this.buildAttributesMap(a,i)),m&&(m=this.parseTextData(m,l,i,!0,h,!0,!0)),i=i.substr(0,i.lastIndexOf(".")),b.add(this.options.textNodeName,m),this.addChild(r,b,i,g)}else{if(a.length>0&&a.lastIndexOf("/")===a.length-1){if(l[l.length-1]==="/"?(l=l.substr(0,l.length-1),i=i.substr(0,i.length-1),a=l):a=a.substr(0,a.length-1),this.options.transformTagName){const b=this.options.transformTagName(l);a===l&&(a=b),l=b}const m=new ct(l);l!==a&&h&&(m[":@"]=this.buildAttributesMap(a,i)),this.addChild(r,m,i,g),i=i.substr(0,i.lastIndexOf("."))}else{const m=new ct(l);this.tagsNodeStack.push(r),l!==a&&h&&(m[":@"]=this.buildAttributesMap(a,i)),this.addChild(r,m,i,g),r=m}n="",o=p}}else n+=t[o];return e.child};function Pp(t,e,r,n){this.options.captureMetaData||(n=void 0);const i=this.options.updateTag(e.tagname,r,e[":@"]);i===!1||(typeof i=="string"&&(e.tagname=i),t.addChild(e,n))}const Ip=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const r=this.docTypeEntities[e];t=t.replace(r.regx,r.val)}for(let e in this.lastEntities){const r=this.lastEntities[e];t=t.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const r=this.htmlEntities[e];t=t.replace(r.regex,r.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function Sp(t,e,r,n){return t&&(n===void 0&&(n=e.child.length===0),(t=this.parseTextData(t,e.tagname,r,!1,!!e[":@"]&&Object.keys(e[":@"]).length!==0,n))!==void 0&&t!==""&&e.add(this.options.textNodeName,t),t=""),t}function Op(t,e,r,n){return!(!e||!e.has(n))||!(!t||!t.has(r))}function ht(t,e,r,n){const i=t.indexOf(e,r);if(i===-1)throw new Error(n);return i+e.length-1}function Pn(t,e,r){const n=(function(a,h){let p,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:">",g="";for(let m=h;m<a.length;m++){let b=a[m];if(p)b===p&&(p="");else if(b==='"'||b==="'")p=b;else if(b===y[0]){if(!y[1])return{data:g,index:m};if(a[m+1]===y[1])return{data:g,index:m}}else b===" "&&(b=" ");g+=b}})(t,e+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:">");if(!n)return;let i=n.data;const s=n.index,o=i.search(/\s/);let u=i,l=!0;o!==-1&&(u=i.substring(0,o),i=i.substring(o+1).trimStart());const c=u;if(r){const a=u.indexOf(":");a!==-1&&(u=u.substr(a+1),l=u!==n.data.substr(a+1))}return{tagName:u,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:c}}function Cp(t,e,r){const n=r;let i=1;for(;r<t.length;r++)if(t[r]==="<")if(t[r+1]==="/"){const s=ht(t,">",r,`${e} is not closed`);if(t.substring(r+2,s).trim()===e&&(i--,i===0))return{tagContent:t.substring(n,r),i:s};r=s}else if(t[r+1]==="?")r=ht(t,"?>",r+1,"StopNode is not closed.");else if(t.substr(r+1,3)==="!--")r=ht(t,"-->",r+3,"StopNode is not closed.");else if(t.substr(r+1,2)==="![")r=ht(t,"]]>",r,"StopNode is not closed.")-2;else{const s=Pn(t,r,">");s&&((s&&s.tagName)===e&&s.tagExp[s.tagExp.length-1]!=="/"&&i++,r=s.closeIndex)}}function yo(t,e,r){if(e&&typeof t=="string"){const n=t.trim();return n==="true"||n!=="false"&&(function(i){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(s=Object.assign({},yp,s),!i||typeof i!="string")return i;let o=i.trim();if(s.skipLike!==void 0&&s.skipLike.test(o))return i;if(i==="0")return 0;if(s.hex&&gp.test(o))return(function(l){if(parseInt)return parseInt(l,16);if(Number.parseInt)return Number.parseInt(l,16);if(window&&window.parseInt)return window.parseInt(l,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")})(o);if(o.includes("e")||o.includes("E"))return(function(l,c,a){if(!a.eNotation)return l;const h=c.match(bp);if(h){let p=h[1]||"";const y=h[3].indexOf("e")===-1?"E":"e",g=h[2],m=p?l[g.length+1]===y:l[g.length]===y;return g.length>1&&m?l:g.length!==1||!h[3].startsWith(`.${y}`)&&h[3][0]!==y?a.leadingZeros&&!m?(c=(h[1]||"")+h[3],Number(c)):l:Number(c)}return l})(i,o,s);{const l=mp.exec(o);if(l){const c=l[1]||"",a=l[2];let h=((u=l[3])&&u.indexOf(".")!==-1&&((u=u.replace(/0+$/,""))==="."?u="0":u[0]==="."?u="0"+u:u[u.length-1]==="."&&(u=u.substring(0,u.length-1))),u);const p=c?i[a.length+1]===".":i[a.length]===".";if(!s.leadingZeros&&(a.length>1||a.length===1&&!p))return i;{const y=Number(o),g=String(y);if(y===0)return y;if(g.search(/[eE]/)!==-1)return s.eNotation?y:i;if(o.indexOf(".")!==-1)return g==="0"||g===h||g===`${c}${h}`?y:i;let m=a?h:o;return a?m===g||c+m===g?y:i:m===g||m===c+g?y:i}}return i}var u})(t,r)}return t!==void 0?t:""}function bo(t,e,r){const n=Number.parseInt(t,e);return n>=0&&n<=1114111?String.fromCodePoint(n):r+t+";"}const In=ct.getMetaDataSymbol();function Rp(t,e){return wo(t,e)}function wo(t,e,r){let n;const i={};for(let s=0;s<t.length;s++){const o=t[s],u=Fp(o);let l="";if(l=r===void 0?u:r+"."+u,u===e.textNodeName)n===void 0?n=o[u]:n+=""+o[u];else{if(u===void 0)continue;if(o[u]){let c=wo(o[u],e,l);const a=_p(c,e);o[In]!==void 0&&(c[In]=o[In]),o[":@"]?Lp(c,o[":@"],l,e):Object.keys(c).length!==1||c[e.textNodeName]===void 0||e.alwaysCreateTextNode?Object.keys(c).length===0&&(e.alwaysCreateTextNode?c[e.textNodeName]="":c=""):c=c[e.textNodeName],i[u]!==void 0&&i.hasOwnProperty(u)?(Array.isArray(i[u])||(i[u]=[i[u]]),i[u].push(c)):e.isArray(u,l,a)?i[u]=[c]:i[u]=c}}}return typeof n=="string"?n.length>0&&(i[e.textNodeName]=n):n!==void 0&&(i[e.textNodeName]=n),i}function Fp(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(n!==":@")return n}}function Lp(t,e,r,n){if(e){const i=Object.keys(e),s=i.length;for(let o=0;o<s;o++){const u=i[o];n.isArray(u,r+"."+u,!0,!0)?t[u]=[e[u]]:t[u]=e[u]}}}function _p(t,e){const{textNodeName:r}=e,n=Object.keys(t).length;return n===0||!(n!==1||!t[r]&&typeof t[r]!="boolean"&&t[r]!==0)}const Up={allowBooleanAttributes:!1,unpairedTags:[]};function xo(t){return t===" "||t===" "||t===`
17
- `||t==="\r"}function Eo(t,e){const r=e;for(;e<t.length;e++)if(!(t[e]!="?"&&t[e]!=" ")){const n=t.substr(r,e-r);if(e>5&&n==="xml")return te("InvalidXml","XML declaration allowed only at the start of the document.",be(t,e));if(t[e]=="?"&&t[e+1]==">"){e++;break}}return e}function vo(t,e){if(t.length>e+5&&t[e+1]==="-"&&t[e+2]==="-"){for(e+=3;e<t.length;e++)if(t[e]==="-"&&t[e+1]==="-"&&t[e+2]===">"){e+=2;break}}else if(t.length>e+8&&t[e+1]==="D"&&t[e+2]==="O"&&t[e+3]==="C"&&t[e+4]==="T"&&t[e+5]==="Y"&&t[e+6]==="P"&&t[e+7]==="E"){let r=1;for(e+=8;e<t.length;e++)if(t[e]==="<")r++;else if(t[e]===">"&&(r--,r===0))break}else if(t.length>e+9&&t[e+1]==="["&&t[e+2]==="C"&&t[e+3]==="D"&&t[e+4]==="A"&&t[e+5]==="T"&&t[e+6]==="A"&&t[e+7]==="["){for(e+=8;e<t.length;e++)if(t[e]==="]"&&t[e+1]==="]"&&t[e+2]===">"){e+=2;break}}return e}function Bp(t,e){let r="",n="",i=!1;for(;e<t.length;e++){if(t[e]==='"'||t[e]==="'")n===""?n=t[e]:n!==t[e]||(n="");else if(t[e]===">"&&n===""){i=!0;break}r+=t[e]}return n===""&&{value:r,index:e,tagClosed:i}}const kp=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function To(t,e){const r=go(t,kp),n={};for(let i=0;i<r.length;i++){if(r[i][1].length===0)return te("InvalidAttr","Attribute '"+r[i][2]+"' has no space in starting.",Gt(r[i]));if(r[i][3]!==void 0&&r[i][4]===void 0)return te("InvalidAttr","Attribute '"+r[i][2]+"' is without value.",Gt(r[i]));if(r[i][3]===void 0&&!e.allowBooleanAttributes)return te("InvalidAttr","boolean attribute '"+r[i][2]+"' is not allowed.",Gt(r[i]));const s=r[i][2];if(!jp(s))return te("InvalidAttr","Attribute '"+s+"' is an invalid name.",Gt(r[i]));if(n.hasOwnProperty(s))return te("InvalidAttr","Attribute '"+s+"' is repeated.",Gt(r[i]));n[s]=1}return!0}function $p(t,e){if(t[++e]===";")return-1;if(t[e]==="#")return(function(n,i){let s=/\d/;for(n[i]==="x"&&(i++,s=/[\da-fA-F]/);i<n.length;i++){if(n[i]===";")return i;if(!n[i].match(s))break}return-1})(t,++e);let r=0;for(;e<t.length;e++,r++)if(!(t[e].match(/\w/)&&r<20)){if(t[e]===";")break;return-1}return e}function te(t,e,r){return{err:{code:t,msg:e,line:r.line||r,col:r.col}}}function jp(t){return Or(t)}function be(t,e){const r=t.substring(0,e).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function Gt(t){return t.startIndex+t[1].length}class Ao{constructor(e){this.externalEntities={},this.options=(function(r){return Object.assign({},hp,r)})(e)}parse(e,r){if(typeof e!="string"&&e.toString)e=e.toString();else if(typeof e!="string")throw new Error("XML data is accepted in String or Bytes[] form.");if(r){r===!0&&(r={});const s=(function(o,u){u=Object.assign({},Up,u);const l=[];let c=!1,a=!1;o[0]==="\uFEFF"&&(o=o.substr(1));for(let h=0;h<o.length;h++)if(o[h]==="<"&&o[h+1]==="?"){if(h+=2,h=Eo(o,h),h.err)return h}else{if(o[h]!=="<"){if(xo(o[h]))continue;return te("InvalidChar","char '"+o[h]+"' is not expected.",be(o,h))}{let p=h;if(h++,o[h]==="!"){h=vo(o,h);continue}{let y=!1;o[h]==="/"&&(y=!0,h++);let g="";for(;h<o.length&&o[h]!==">"&&o[h]!==" "&&o[h]!==" "&&o[h]!==`
18
- `&&o[h]!=="\r";h++)g+=o[h];if(g=g.trim(),g[g.length-1]==="/"&&(g=g.substring(0,g.length-1),h--),!Or(g)){let v;return v=g.trim().length===0?"Invalid space after '<'.":"Tag '"+g+"' is an invalid name.",te("InvalidTag",v,be(o,h))}const m=Bp(o,h);if(m===!1)return te("InvalidAttr","Attributes for '"+g+"' have open quote.",be(o,h));let b=m.value;if(h=m.index,b[b.length-1]==="/"){const v=h-b.length;b=b.substring(0,b.length-1);const E=To(b,u);if(E!==!0)return te(E.err.code,E.err.msg,be(o,v+E.err.line));c=!0}else if(y){if(!m.tagClosed)return te("InvalidTag","Closing tag '"+g+"' doesn't have proper closing.",be(o,h));if(b.trim().length>0)return te("InvalidTag","Closing tag '"+g+"' can't have attributes or invalid starting.",be(o,p));if(l.length===0)return te("InvalidTag","Closing tag '"+g+"' has not been opened.",be(o,p));{const v=l.pop();if(g!==v.tagName){let E=be(o,v.tagStartPos);return te("InvalidTag","Expected closing tag '"+v.tagName+"' (opened in line "+E.line+", col "+E.col+") instead of closing tag '"+g+"'.",be(o,p))}l.length==0&&(a=!0)}}else{const v=To(b,u);if(v!==!0)return te(v.err.code,v.err.msg,be(o,h-b.length+v.err.line));if(a===!0)return te("InvalidXml","Multiple possible root nodes found.",be(o,h));u.unpairedTags.indexOf(g)!==-1||l.push({tagName:g,tagStartPos:p}),c=!0}for(h++;h<o.length;h++)if(o[h]==="<"){if(o[h+1]==="!"){h++,h=vo(o,h);continue}if(o[h+1]!=="?")break;if(h=Eo(o,++h),h.err)return h}else if(o[h]==="&"){const v=$p(o,h);if(v==-1)return te("InvalidChar","char '&' is not expected.",be(o,h));h=v}else if(a===!0&&!xo(o[h]))return te("InvalidXml","Extra text at the end",be(o,h));o[h]==="<"&&h--}}}return c?l.length==1?te("InvalidTag","Unclosed tag '"+l[0].tagName+"'.",be(o,l[0].tagStartPos)):!(l.length>0)||te("InvalidXml","Invalid '"+JSON.stringify(l.map((h=>h.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):te("InvalidXml","Start tag expected.",1)})(e,r);if(s!==!0)throw Error(`${s.err.msg}:${s.err.line}:${s.err.col}`)}const n=new wp(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(e);return this.options.preserveOrder||i===void 0?i:Rp(i,this.options)}addEntity(e,r){if(r.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(e.indexOf("&")!==-1||e.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(r==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=r}static getMetaDataSymbol(){return ct.getMetaDataSymbol()}}var Mp=H(829),We=H.n(Mp),At=(function(t){return t.Array="array",t.Object="object",t.Original="original",t})(At||{});function No(t,e){if(!t.endsWith("propstat.prop.displayname"))return e}function Cr(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:At.Original;const n=We().get(t,e);return r==="array"&&Array.isArray(n)===!1?[n]:r==="object"&&Array.isArray(n)?n[0]:n}function Kt(t,e){return e=e??{attributeNamePrefix:"@",attributeParsers:[],tagParsers:[No]},new Promise((r=>{r((function(n){const{multistatus:i}=n;if(i==="")return{multistatus:{response:[]}};if(!i)throw new Error("Invalid response: No root multistatus found");const s={multistatus:Array.isArray(i)?i[0]:i};return We().set(s,"multistatus.response",Cr(s,"multistatus.response",At.Array)),We().set(s,"multistatus.response",We().get(s,"multistatus.response").map((o=>(function(u){const l=Object.assign({},u);return l.status?We().set(l,"status",Cr(l,"status",At.Object)):(We().set(l,"propstat",Cr(l,"propstat",At.Object)),We().set(l,"propstat.prop",Cr(l,"propstat.prop",At.Object))),l})(o)))),s})((function(n){let{attributeNamePrefix:i,attributeParsers:s,tagParsers:o}=n;return new Ao({allowBooleanAttributes:!0,attributeNamePrefix:i,textNodeName:"text",ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(u,l,c){for(const a of s)try{const h=a(c,l);if(h!==l)return h}catch{}return l},tagValueProcessor(u,l,c){for(const a of o)try{const h=a(c,l);if(h!==l)return h}catch{}return l}})})(e).parse(t)))}))}function Rr(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2];const{getlastmodified:n=null,getcontentlength:i="0",resourcetype:s=null,getcontenttype:o=null,getetag:u=null}=t,l=s&&typeof s=="object"&&s.collection!==void 0?"directory":"file",c={filename:e,basename:Ar().basename(e),lastmod:n,size:parseInt(i,10),type:l,etag:typeof u=="string"?u.replace(/"/g,""):null};return l==="file"&&(c.mime=o&&typeof o=="string"?o.split(";")[0]:""),r&&(t.displayname!==void 0&&(t.displayname=String(t.displayname)),c.props=t),c}function Vp(t,e){let r=arguments.length>2&&arguments[2]!==void 0&&arguments[2],n=null;try{t.multistatus.response[0].propstat&&(n=t.multistatus.response[0])}catch{}if(!n)throw new Error("Failed getting item stat: bad response");const{propstat:{prop:i,status:s}}=n,[o,u,l]=s.split(" ",3),c=parseInt(u,10);if(c>=400){const a=new Error(`Invalid response: ${c} ${l}`);throw a.status=c,a}return Rr(i,Dt(e),r)}function Dp(t){switch(String(t)){case"-3":return"unlimited";case"-2":case"-1":return"unknown";default:return parseInt(String(t),10)}}function Sn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const On=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=r,i=ie({url:G(t.remoteURL,W(e)),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,r);return Sn(ne(i,t),(function(s){return se(t,s),Sn(s.text(),(function(o){return Sn(Kt(o,t.parsing),(function(u){const l=Vp(u,e,n);return Tt(s,l,n)}))}))}))}));function Po(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Hp=Io((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=(function(s){if(!s||s==="/")return[];let o=s;const u=[];do u.push(o),o=Ar().dirname(o);while(o&&o!=="/");return u})(Dt(e));n.sort(((s,o)=>s.length>o.length?1:o.length>s.length?-1:0));let i=!1;return(function(s,o,u){if(typeof s[Oo]=="function"){let m=function(b){try{for(;!(l=h.next()).done;)if((b=o(l.value))&&b.then){if(!Co(b))return void b.then(m,a||(a=we.bind(null,c=new Nt,2)));b=b.v}c?we(c,1,b):c=b}catch(v){we(c||(c=new Nt),2,v)}};var l,c,a,h=s[Oo]();if(m(),h.return){var p=function(b){try{l.done||h.return()}catch{}return b};if(c&&c.then)return c.then(p,(function(b){throw p(b)}));p()}return c}if(!("length"in s))throw new TypeError("Object is not iterable");for(var y=[],g=0;g<s.length;g++)y.push(s[g]);return(function(m,b,v){var E,T,N=-1;return(function S(F){try{for(;++N<m.length&&(!v||!v());)if((F=b(N))&&F.then){if(!Co(F))return void F.then(S,T||(T=we.bind(null,E=new Nt,2)));F=F.v}E?we(E,1,F):E=F}catch(L){we(E||(E=new Nt),2,L)}})(),E})(y,(function(m){return o(y[m])}),u)})(n,(function(s){return o=function(){return(function(l,c){try{var a=Po(On(t,s),(function(h){if(h.type!=="directory")throw new Error(`Path includes a file: ${e}`)}))}catch(h){return c(h)}return a&&a.then?a.then(void 0,c):a})(0,(function(l){const c=l;return(function(){if(c.status===404)return i=!0,So(Cn(t,s,{...r,recursive:!1}));throw l})()}))},(u=(function(){if(i)return So(Cn(t,s,{...r,recursive:!1}))})())&&u.then?u.then(o):o();var o,u}),(function(){return!1}))}));function Io(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}function qp(){}function So(t,e){return t&&t.then?t.then(qp):Promise.resolve()}const Oo=typeof Symbol<"u"?Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator")):"@@iterator";function we(t,e,r){if(!t.s){if(r instanceof Nt){if(!r.s)return void(r.o=we.bind(null,t,e));1&e&&(e=r.s),r=r.v}if(r&&r.then)return void r.then(we.bind(null,t,e),we.bind(null,t,2));t.s=e,t.v=r;const n=t.o;n&&n(t)}}const Nt=(function(){function t(){}return t.prototype.then=function(e,r){const n=new t,i=this.s;if(i){const s=1&i?e:r;if(s){try{we(n,1,s(this.v))}catch(o){we(n,2,o)}return n}return this}return this.o=function(s){try{const o=s.v;1&s.s?we(n,1,e?e(o):o):r?we(n,1,r(o)):we(n,2,o)}catch(o){we(n,2,o)}},n},t})();function Co(t){return t instanceof Nt&&1&t.s}const Cn=Io((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(r.recursive===!0)return Hp(t,e,r);const n=ie({url:G(t.remoteURL,(i=W(e),i.endsWith("/")?i:i+"/")),method:"MKCOL"},t,r);var i;return Po(ne(n,t),(function(s){se(t,s)}))}));var zp=H(388),Ro=H.n(zp);const Wp=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n={};if(typeof r.range=="object"&&typeof r.range.start=="number"){let u=`bytes=${r.range.start}-`;typeof r.range.end=="number"&&(u=`${u}${r.range.end}`),n.Range=u}const i=ie({url:G(t.remoteURL,W(e)),method:"GET",headers:n},t,r);return o=function(u){if(se(t,u),n.Range&&u.status!==206){const l=new Error(`Invalid response code for partial request: ${u.status}`);throw l.status=u.status,l}return r.callback&&setTimeout((()=>{r.callback(u)}),0),u.body},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o})),Gp=()=>{},Kp=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){r.url||(r.url=G(t.remoteURL,W(e)));const n=ie(r,t,{});return s=function(o){return se(t,o),o},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s})),Jp=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"DELETE"},t,r);return s=function(o){se(t,o)},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s})),Yp=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return(function(n,i){try{var s=(o=On(t,e,r),u=function(){return!0},l?u?u(o):o:(o&&o.then||(o=Promise.resolve(o)),u?o.then(u):o))}catch(c){return i(c)}var o,u,l;return s&&s.then?s.then(void 0,i):s})(0,(function(n){if(n.status===404)return!1;throw n}))}));function Rn(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Xp=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e),"/"),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:r.deep?"infinity":"1"}},t,r);return Rn(ne(n,t),(function(i){return se(t,i),Rn(i.text(),(function(s){if(!s)throw new Error("Failed parsing directory contents: Empty response");return Rn(Kt(s,t.parsing),(function(o){const u=Hs(e);let l=(function(c,a,h){let p=arguments.length>3&&arguments[3]!==void 0&&arguments[3],y=arguments.length>4&&arguments[4]!==void 0&&arguments[4];const g=Ar().join(a,"/"),{multistatus:{response:m}}=c,b=m.map((v=>{const E=(function(N){try{return N.replace(/^https?:\/\/[^\/]+/,"")}catch(S){throw new me(S,"Failed normalising HREF")}})(v.href),{propstat:{prop:T}}=v;return Rr(T,g==="/"?decodeURIComponent(Dt(E)):Dt(Ar().relative(decodeURIComponent(g),decodeURIComponent(E))),p)}));return y?b:b.filter((v=>v.basename&&(v.type==="file"||v.filename!==h.replace(/\/$/,""))))})(o,Hs(t.remoteBasePath||t.remotePath),u,r.details,r.includeSelf);return r.glob&&(l=(function(c,a){return c.filter((h=>de(h.filename,a,{matchBase:!0})))})(l,r.glob)),Tt(i,l,r.details)}))}))}))}));function Fn(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}const Zp=Fn((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"GET",headers:{Accept:"text/plain"},transformResponse:[tg]},t,r);return Fr(ne(n,t),(function(i){return se(t,i),Fr(i.text(),(function(s){return Tt(i,s,r.details)}))}))}));function Fr(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const Qp=Fn((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"GET"},t,r);return Fr(ne(n,t),(function(i){let s;return se(t,i),(function(o,u){var l=o();return l&&l.then?l.then(u):u()})((function(){return Fr(i.arrayBuffer(),(function(o){s=o}))}),(function(){return Tt(i,s,r.details)}))}))})),eg=Fn((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{format:n="binary"}=r;if(n!=="binary"&&n!=="text")throw new me({info:{code:Je.InvalidOutputFormat}},`Invalid output format: ${n}`);return n==="text"?Zp(t,e,r):Qp(t,e,r)})),tg=t=>t;function rg(t,e){let r="";return e.format&&e.indentBy.length>0&&(r=`
19
- `),Fo(t,e,"",r)}function Fo(t,e,r,n){let i="",s=!1;for(let o=0;o<t.length;o++){const u=t[o],l=ng(u);if(l===void 0)continue;let c="";if(c=r.length===0?l:`${r}.${l}`,l===e.textNodeName){let y=u[l];ig(c,e)||(y=e.tagValueProcessor(l,y),y=_o(y,e)),s&&(i+=n),i+=y,s=!1;continue}if(l===e.cdataPropName){s&&(i+=n),i+=`<![CDATA[${u[l][0][e.textNodeName]}]]>`,s=!1;continue}if(l===e.commentPropName){i+=n+`<!--${u[l][0][e.textNodeName]}-->`,s=!0;continue}if(l[0]==="?"){const y=Lo(u[":@"],e),g=l==="?xml"?"":n;let m=u[l][0][e.textNodeName];m=m.length!==0?" "+m:"",i+=g+`<${l}${m}${y}?>`,s=!0;continue}let a=n;a!==""&&(a+=e.indentBy);const h=n+`<${l}${Lo(u[":@"],e)}`,p=Fo(u[l],e,c,a);e.unpairedTags.indexOf(l)!==-1?e.suppressUnpairedNode?i+=h+">":i+=h+"/>":p&&p.length!==0||!e.suppressEmptyNode?p&&p.endsWith(">")?i+=h+`>${p}${n}</${l}>`:(i+=h+">",p&&n!==""&&(p.includes("/>")||p.includes("</"))?i+=n+e.indentBy+p+n:i+=p,i+=`</${l}>`):i+=h+"/>",s=!0}return i}function ng(t){const e=Object.keys(t);for(let r=0;r<e.length;r++){const n=e[r];if(t.hasOwnProperty(n)&&n!==":@")return n}}function Lo(t,e){let r="";if(t&&!e.ignoreAttributes)for(let n in t){if(!t.hasOwnProperty(n))continue;let i=e.attributeValueProcessor(n,t[n]);i=_o(i,e),i===!0&&e.suppressBooleanAttributes?r+=` ${n.substr(e.attributeNamePrefix.length)}`:r+=` ${n.substr(e.attributeNamePrefix.length)}="${i}"`}return r}function ig(t,e){let r=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let n in e.stopNodes)if(e.stopNodes[n]===t||e.stopNodes[n]==="*."+r)return!0;return!1}function _o(t,e){if(t&&t.length>0&&e.processEntities)for(let r=0;r<e.entities.length;r++){const n=e.entities[r];t=t.replace(n.regex,n.val)}return t}const sg={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},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 Ye(t){this.options=Object.assign({},sg,t),this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=mo(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ug),this.processTextOrObjNode=og,this.options.format?(this.indentate=ag,this.tagEndChar=`>
20
- `,this.newLine=`
21
- `):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function og(t,e,r,n){const i=this.j2x(t,r+1,n.concat(e));return t[this.options.textNodeName]!==void 0&&Object.keys(t).length===1?this.buildTextValNode(t[this.options.textNodeName],e,i.attrStr,r):this.buildObjectNode(i.val,e,i.attrStr,r)}function ag(t){return this.options.indentBy.repeat(t)}function ug(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}function lg(t){return new Ye({attributeNamePrefix:"@_",format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(Uo({lockinfo:{"@_xmlns:d":"DAV:",lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:t}}},"d"))}function Uo(t,e){const r={...t};for(const n in r)r.hasOwnProperty(n)&&(r[n]&&typeof r[n]=="object"&&n.indexOf(":")===-1?(r[`${e}:${n}`]=Uo(r[n],e),delete r[n]):/^@_/.test(n)===!1&&(r[`${e}:${n}`]=r[n],delete r[n]));return r}function Ln(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Bo(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}Ye.prototype.build=function(t){return this.options.preserveOrder?rg(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},Ye.prototype.j2x=function(t,e,r){let n="",i="";const s=r.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(t[o]===void 0)this.isAttribute(o)&&(i+="");else if(t[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+="":o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)i+=this.buildTextValNode(t[o],o,"",e);else if(typeof t[o]!="object"){const u=this.isAttribute(o);if(u&&!this.ignoreAttributesFn(u,s))n+=this.buildAttrPairStr(u,""+t[o]);else if(!u)if(o===this.options.textNodeName){let l=this.options.tagValueProcessor(o,""+t[o]);i+=this.replaceEntitiesValue(l)}else i+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const u=t[o].length;let l="",c="";for(let a=0;a<u;a++){const h=t[o][a];if(h!==void 0)if(h===null)o[0]==="?"?i+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:i+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(typeof h=="object")if(this.options.oneListGroup){const p=this.j2x(h,e+1,r.concat(o));l+=p.val,this.options.attributesGroupName&&h.hasOwnProperty(this.options.attributesGroupName)&&(c+=p.attrStr)}else l+=this.processTextOrObjNode(h,o,e,r);else if(this.options.oneListGroup){let p=this.options.tagValueProcessor(o,h);p=this.replaceEntitiesValue(p),l+=p}else l+=this.buildTextValNode(h,o,"",e)}this.options.oneListGroup&&(l=this.buildObjectNode(l,o,c,e)),i+=l}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const u=Object.keys(t[o]),l=u.length;for(let c=0;c<l;c++)n+=this.buildAttrPairStr(u[c],""+t[o][u[c]])}else i+=this.processTextOrObjNode(t[o],o,e,r);return{attrStr:n,val:i}},Ye.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&e==="true"?" "+t:" "+t+'="'+e+'"'},Ye.prototype.buildObjectNode=function(t,e,r,n){if(t==="")return e[0]==="?"?this.indentate(n)+"<"+e+r+"?"+this.tagEndChar:this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar;{let i="</"+e+this.tagEndChar,s="";return e[0]==="?"&&(s="?",i=""),!r&&r!==""||t.indexOf("<")!==-1?this.options.commentPropName!==!1&&e===this.options.commentPropName&&s.length===0?this.indentate(n)+`<!--${t}-->`+this.newLine:this.indentate(n)+"<"+e+r+s+this.tagEndChar+t+this.indentate(n)+i:this.indentate(n)+"<"+e+r+s+">"+t+i}},Ye.prototype.closeTag=function(t){let e="";return this.options.unpairedTags.indexOf(t)!==-1?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},Ye.prototype.buildTextValNode=function(t,e,r,n){if(this.options.cdataPropName!==!1&&e===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${t}]]>`+this.newLine;if(this.options.commentPropName!==!1&&e===this.options.commentPropName)return this.indentate(n)+`<!--${t}-->`+this.newLine;if(e[0]==="?")return this.indentate(n)+"<"+e+r+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(e,t);return i=this.replaceEntitiesValue(i),i===""?this.indentate(n)+"<"+e+r+this.closeTag(e)+this.tagEndChar:this.indentate(n)+"<"+e+r+">"+i+"</"+e+this.tagEndChar}},Ye.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const r=this.options.entities[e];t=t.replace(r.regex,r.val)}return t};const cg=Bo((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"UNLOCK",headers:{"Lock-Token":r}},t,n);return Ln(ne(i,t),(function(s){if(se(t,s),s.status!==204&&s.status!==200)throw An(s)}))})),fg=Bo((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{refreshToken:n,timeout:i=hg}=r,s={Accept:"text/plain,application/xml",Timeout:i};n&&(s.If=n);const o=ie({url:G(t.remoteURL,W(e)),method:"LOCK",headers:s,data:lg(t.contactHref)},t,r);return Ln(ne(o,t),(function(u){return se(t,u),Ln(u.text(),(function(l){const c=(p=l,new Ao({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(p)),a=We().get(c,"prop.lockdiscovery.activelock.locktoken.href"),h=We().get(c,"prop.lockdiscovery.activelock.timeout");var p;if(!a)throw An(u,"No lock token received: ");return{token:a,serverTimeout:h}}))}))})),hg="Infinite, Second-4100000000";function _n(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const dg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=e.path||"/",n=ie({url:G(t.remoteURL,r),method:"PROPFIND",headers:{Accept:"text/plain,application/xml",Depth:"0"}},t,e);return _n(ne(n,t),(function(i){return se(t,i),_n(i.text(),(function(s){return _n(Kt(s,t.parsing),(function(o){const u=(function(l){try{const[c]=l.multistatus.response,{propstat:{prop:{"quota-used-bytes":a,"quota-available-bytes":h}}}=c;return a!==void 0&&h!==void 0?{used:parseInt(String(a),10),available:Dp(h)}:null}catch{}return null})(o);return Tt(i,u,e.details)}))}))}))}));function Un(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const pg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const{details:n=!1}=r,i=ie({url:G(t.remoteURL,W(e)),method:"SEARCH",headers:{Accept:"text/plain,application/xml","Content-Type":t.headers["Content-Type"]||"application/xml; charset=utf-8"}},t,r);return Un(ne(i,t),(function(s){return se(t,s),Un(s.text(),(function(o){return Un(Kt(o,t.parsing),(function(u){const l=(function(c,a,h){const p={truncated:!1,results:[]};return p.truncated=c.multistatus.response.some((y=>(y.status||y.propstat?.status).split(" ",3)?.[1]==="507"&&y.href.replace(/\/$/,"").endsWith(W(a).replace(/\/$/,"")))),c.multistatus.response.forEach((y=>{if(y.propstat===void 0)return;const g=y.href.split("/").map(decodeURIComponent).join("/");p.results.push(Rr(y.propstat.prop,g,h))})),p})(u,e,n);return Tt(s,l,n)}))}))}))})),gg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const i=ie({url:G(t.remoteURL,W(e)),method:"MOVE",headers:{Destination:G(t.remoteURL,W(r)),Overwrite:n.overwrite===!1?"F":"T"}},t,n);return o=function(u){se(t,u)},(s=ne(i,t))&&s.then||(s=Promise.resolve(s)),o?s.then(o):s;var s,o}));var mg=H(172);function yg(t){if(eo(t))return t.byteLength;if(to(t))return t.length;if(typeof t=="string")return(0,mg.d)(t);throw new me({info:{code:Je.DataTypeNoLength}},"Cannot calculate data length: Invalid type")}const bg=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e,r){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const{contentLength:i=!0,overwrite:s=!0}=n,o={"Content-Type":"application/octet-stream"};i===!1||(o["Content-Length"]=typeof i=="number"?`${i}`:`${yg(r)}`),s||(o["If-None-Match"]="*");const u=ie({url:G(t.remoteURL,W(e)),method:"PUT",headers:o,data:r},t,n);return c=function(a){try{se(t,a)}catch(h){const p=h;if(p.status!==412||s)throw p;return!1}return!0},(l=ne(u,t))&&l.then||(l=Promise.resolve(l)),c?l.then(c):l;var l,c})),ko=(function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}})((function(t,e){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const n=ie({url:G(t.remoteURL,W(e)),method:"OPTIONS"},t,r);return s=function(o){try{se(t,o)}catch(u){throw u}return{compliance:(o.headers.get("DAV")??"").split(",").map((u=>u.trim())),server:o.headers.get("Server")??""}},(i=ne(n,t))&&i.then||(i=Promise.resolve(i)),s?i.then(s):i;var i,s}));function Jt(t,e,r){return r?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}const wg=Bn((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new me({info:{code:Je.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const o={"Content-Type":"application/octet-stream","Content-Length":""+(n-r+1),"Content-Range":`bytes ${r}-${n}/*`},u=ie({url:G(t.remoteURL,W(e)),method:"PUT",headers:o,data:i},t,s);return Jt(ne(u,t),(function(l){se(t,l)}))}));function $o(t,e){var r=t();return r&&r.then?r.then(e):e(r)}const xg=Bn((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(r>n||r<0)throw new me({info:{code:Je.InvalidUpdateRange}},`Invalid update range ${r} for partial update`);const o={"Content-Type":"application/x-sabredav-partialupdate","Content-Length":""+(n-r+1),"X-Update-Range":`bytes=${r}-${n}`},u=ie({url:G(t.remoteURL,W(e)),method:"PATCH",headers:o,data:i},t,s);return Jt(ne(u,t),(function(l){se(t,l)}))}));function Bn(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];try{return Promise.resolve(t.apply(this,e))}catch(n){return Promise.reject(n)}}}const Eg=Bn((function(t,e,r,n,i){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return Jt(ko(t,e,s),(function(o){let u=!1;return $o((function(){if(o.compliance.includes("sabredav-partialupdate"))return Jt(xg(t,e,r,n,i,s),(function(l){return u=!0,l}))}),(function(l){let c=!1;return u?l:$o((function(){if(o.server.includes("Apache")&&o.compliance.includes("<http://apache.org/dav/propset/fs/1>"))return Jt(wg(t,e,r,n,i,s),(function(a){return c=!0,a}))}),(function(a){if(c)return a;throw new me({info:{code:Je.NotSupported}},"Not supported")}))}))}))})),vg="https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md";function Tg(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{authType:r=null,remoteBasePath:n,contactHref:i=vg,ha1:s,headers:o={},httpAgent:u,httpsAgent:l,password:c,token:a,username:h,withCredentials:p}=e;let y=r;y||(y=h||c?Te.Password:Te.None);const g={authType:y,remoteBasePath:n,contactHref:i,ha1:s,headers:Object.assign({},o),httpAgent:u,httpsAgent:l,password:c,parsing:{attributeNamePrefix:e.attributeNamePrefix??"@",attributeParsers:[],tagParsers:[No]},remotePath:Od(t),remoteURL:t,token:a,username:h,withCredentials:p};return Ys(g,h,c,a,s),{copyFile:(m,b,v)=>fp(g,m,b,v),createDirectory:(m,b)=>Cn(g,m,b),createReadStream:(m,b)=>(function(v,E){let T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const N=new(Ro()).PassThrough;return Wp(v,E,T).then((S=>{S.pipe(N)})).catch((S=>{N.emit("error",S)})),N})(g,m,b),createWriteStream:(m,b,v)=>(function(E,T){let N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},S=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Gp;const F=new(Ro()).PassThrough,L={};N.overwrite===!1&&(L["If-None-Match"]="*");const U=ie({url:G(E.remoteURL,W(T)),method:"PUT",headers:L,data:F,maxRedirects:0},E,N);return ne(U,E).then((_=>se(E,_))).then((_=>{setTimeout((()=>{S(_)}),0)})).catch((_=>{F.emit("error",_)})),F})(g,m,b,v),customRequest:(m,b)=>Kp(g,m,b),deleteFile:(m,b)=>Jp(g,m,b),exists:(m,b)=>Yp(g,m,b),getDirectoryContents:(m,b)=>Xp(g,m,b),getFileContents:(m,b)=>eg(g,m,b),getFileDownloadLink:m=>(function(b,v){let E=G(b.remoteURL,W(v));const T=/^https:/i.test(E)?"https":"http";switch(b.authType){case Te.None:break;case Te.Password:{const N=Gs(b.headers.Authorization.replace(/^Basic /i,"").trim());E=E.replace(/^https?:\/\//,`${T}://${N}@`);break}default:throw new me({info:{code:Je.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${b.authType}`)}return E})(g,m),getFileUploadLink:m=>(function(b,v){let E=`${G(b.remoteURL,W(v))}?Content-Type=application/octet-stream`;const T=/^https:/i.test(E)?"https":"http";switch(b.authType){case Te.None:break;case Te.Password:{const N=Gs(b.headers.Authorization.replace(/^Basic /i,"").trim());E=E.replace(/^https?:\/\//,`${T}://${N}@`);break}default:throw new me({info:{code:Je.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${b.authType}`)}return E})(g,m),getHeaders:()=>Object.assign({},g.headers),getQuota:m=>dg(g,m),lock:(m,b)=>fg(g,m,b),moveFile:(m,b,v)=>gg(g,m,b,v),putFileContents:(m,b,v)=>bg(g,m,b,v),partialUpdateFileContents:(m,b,v,E,T)=>Eg(g,m,b,v,E,T),getDAVCompliance:m=>ko(g,m),search:(m,b)=>pg(g,m,b),setHeaders:m=>{g.headers=Object.assign({},m)},stat:(m,b)=>On(g,m,b),unlock:(m,b,v)=>cg(g,m,b,v),registerAttributeParser:m=>{g.parsing.attributeParsers.push(m)},registerTagParser:m=>{g.parsing.tagParsers.push(m)}}}const ue=[];for(let t=0;t<256;++t)ue.push((t+256).toString(16).slice(1));function Ag(t,e=0){return(ue[t[e+0]]+ue[t[e+1]]+ue[t[e+2]]+ue[t[e+3]]+"-"+ue[t[e+4]]+ue[t[e+5]]+"-"+ue[t[e+6]]+ue[t[e+7]]+"-"+ue[t[e+8]]+ue[t[e+9]]+"-"+ue[t[e+10]]+ue[t[e+11]]+ue[t[e+12]]+ue[t[e+13]]+ue[t[e+14]]+ue[t[e+15]]).toLowerCase()}let kn;const Ng=new Uint8Array(16);function Pg(){if(!kn){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");kn=crypto.getRandomValues.bind(crypto)}return kn(Ng)}var jo={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ig(t,e,r){t=t||{};const n=t.random??t.rng?.()??Pg();if(n.length<16)throw new Error("Random bytes length must be >= 16");return n[6]=n[6]&15|64,n[8]=n[8]&63|128,Ag(n)}function Sg(t,e,r){return jo.randomUUID&&!t?jo.randomUUID():Ig(t)}const $n=(t,e)=>Object.fromEntries(Object.entries(t).map(([r,n])=>e.includes(r)?[r,n||""]:[it.DavNamespace.includes(r)?`d:${r}`:`oc:${r}`,n||""])),Mo=(t=[],{pattern:e,filterRules:r,limit:n=0,extraProps:i=[]})=>{let s="d:propfind";e&&(s="oc:search-files"),r&&(s="oc:filter-files");const o=t.reduce((a,h)=>Object.assign(a,{[h]:null}),{}),u=$n(o,i),l={[s]:{"d:prop":u,"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns",...e&&{"oc:search":{"oc:pattern":e,"oc:limit":n}},...r&&{"oc:filter-rules":$n(r,[])}}};return new qe({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(l)},Og=t=>{const e={"d:propertyupdate":{"d:set":{"d:prop":$n(t,[])},"@@xmlns:d":"DAV:","@@xmlns:oc":"http://owncloud.org/ns"}};return new qe({format:!0,ignoreAttributes:!1,attributeNamePrefix:"@@",suppressEmptyNode:!0}).build(e)},Cg=t=>{const e={},r=t.get("tus-version");return r?(e.version=r.split(","),t.get("tus-extension")&&(e.extension=t.get("tus-extension").split(",")),t.get("tus-resumable")&&(e.resumable=t.get("tus-resumable")),t.get("tus-max-size")&&(e.maxSize=parseInt(t.get("tus-max-size"),10)),e):null},Rg=async t=>{const e=n=>{const i=decodeURIComponent(n);return n?.startsWith("/remote.php/dav/")?$(i.replace("/remote.php/dav/",""),{leadingSlash:!0,trailingSlash:!1}):i};return(await Kt(t)).multistatus.response.map(({href:n,propstat:i})=>{const s={...Rr(i.prop,e(n),!0),processing:i.status==="HTTP/1.1 425 TOO EARLY"};return s.props.name&&(s.props.name=s.props.name.toString()),s})},Fg=t=>{const e=new Bs,r={message:"Unknown error",errorCode:void 0};try{const n=e.parse(t);if(!n["d:error"])return r;if(n["d:error"]["s:message"]){const i=n["d:error"]["s:message"];typeof i=="string"&&(r.message=i)}if(n["d:error"]["s:errorcode"]){const i=n["d:error"]["s:errorcode"];typeof i=="string"&&(r.errorCode=i)}}catch{return r}return r};class Lg{client;davPath;headers;extraProps;constructor({baseUrl:e,headers:r}){this.davPath=$(e,"remote.php/dav"),this.client=Tg(this.davPath,{}),this.headers=r,this.extraProps=[]}mkcol(e,r={}){return this.request(e,{method:De.mkcol,...r})}async propfind(e,{depth:r=1,properties:n=[],headers:i={},...s}={}){const o={...i,Depth:r.toString()},{body:u,result:l}=await this.request(e,{method:De.propfind,data:Mo(n,{extraProps:this.extraProps}),headers:o,...s});return u?.length&&(u[0].tusSupport=Cg(l.headers)),u}async report(e,{pattern:r="",filterRules:n=null,limit:i=30,properties:s,...o}={}){const{body:u,result:l}=await this.request(e,{method:De.report,data:Mo(s,{pattern:r,filterRules:n,limit:i,extraProps:this.extraProps}),...o});return{results:u,range:l.headers.get("content-range")}}copy(e,r,{overwrite:n=!1,headers:i={},...s}={}){const o=$(this.davPath,fr(r));return this.request(e,{method:De.copy,headers:{...i,Destination:o,overwrite:n?"T":"F"},...s})}move(e,r,{overwrite:n=!1,headers:i={},...s}={}){const o=$(this.davPath,fr(r));return this.request(e,{method:De.move,headers:{...i,Destination:o,overwrite:n?"T":"F"},...s})}put(e,r,{headers:n={},onUploadProgress:i,previousEntityTag:s,overwrite:o,...u}={}){const l={...n};return s?l["If-Match"]=s:o||(l["If-None-Match"]="*"),this.request(e,{method:De.put,data:r,headers:l,onUploadProgress:i,...u})}delete(e,r={}){return this.request(e,{method:De.delete,...r})}propPatch(e,r,n={}){const i=Og(r);return this.request(e,{method:De.proppatch,data:i,...n})}getFileUrl(e){return $(this.davPath,fr(e))}buildHeaders(e={}){return{"Content-Type":"application/xml; charset=utf-8","X-Requested-With":"XMLHttpRequest","X-Request-ID":Sg(),...this.headers&&{...this.headers()},...e}}async request(e,r){const n=$(this.davPath,fr(e),{leadingSlash:!0}),i={...r,url:n,headers:this.buildHeaders(r.headers||{})};try{const s=await this.client.customRequest("",i);let o;if(s.status===207){const u=await s.text();o=await Rg(u)}return{body:o,status:s.status,result:s}}catch(s){const{response:o}=s,u=await o.text(),l=Fg(u);throw new Ku(l.message,l.errorCode,o,o.status)}}}const _g=(t,e)=>({async listFileVersions(r,n={}){const[i,...s]=await t.propfind($("meta",r,"v",{leadingSlash:!0}),n);return s.map(o=>xt(o,t.extraProps))}}),Ug=(t,e)=>({setFavorite(r,{path:n},i,s={}){const o={[C.IsFavorite]:i?"true":"false"};return t.propPatch($(r.webDavPath,n),o,s)}}),Bg=(t,e)=>({listFavoriteFiles({davProperties:r=it.Default,username:n="",...i}={}){return t.report($("files",n),{properties:r,filterRules:{favorite:1},...i})}}),kg=(t,e)=>{const r=Q.create();e&&r.interceptors.request.use(R=>(Object.assign(R.headers,e()),R));const n={axiosClient:r,baseUrl:t},i=new Lg({baseUrl:t,headers:e}),s=R=>{i.extraProps.push(R)},o=Ad(i),{getPathForFileId:u}=o,l=md(i,o),{listFiles:c}=l,a=dd(l),{getFileInfo:h}=a,{createFolder:p}=fd(i,a),y=hd(i,n),{getFileContents:g}=y,{putFileContents:m}=bd(i,a),{getFileUrl:b,revokeUrl:v}=pd(i,y,a,n),{getPublicFileUrl:E}=gd(i),{copyFiles:T}=cd(i),{moveFiles:N}=yd(i),{deleteFile:S}=wd(i),{restoreFile:F}=xd(i),{listFileVersions:L}=_g(i),{restoreFileVersion:U}=Ed(i),{clearTrashBin:_}=vd(i),{search:j}=Td(i),{listFavoriteFiles:pe}=Bg(i),{setFavorite:oe}=Ug(i);return{copyFiles:T,createFolder:p,deleteFile:S,restoreFile:F,restoreFileVersion:U,getFileContents:g,getFileInfo:h,getFileUrl:b,getPublicFileUrl:E,getPathForFileId:u,listFiles:c,listFileVersions:L,moveFiles:N,putFileContents:m,revokeUrl:v,clearTrashBin:_,search:j,listFavoriteFiles:pe,setFavorite:oe,registerExtraProp:s}};var Vo=(t=>(t[t.COPY=0]="COPY",t[t.MOVE=1]="MOVE",t))(Vo||{});let Yt;self.onmessage=async t=>{const{topic:e,data:r}=JSON.parse(t.data);if(e==="tokenUpdate"&&Yt){Yt.Authorization?.toString().startsWith("Bearer")&&(Yt.Authorization=r.accessToken);return}const{baseUrl:n,headers:i,transferData:s}=r;Yt=i;const o=kg(n,()=>Yt),u=[],l=[],c=new na({concurrency:4}),a=y=>o.copyFiles(y.sourceSpace,y.resource,y.targetSpace,{path:y.path},{overwrite:y.overwrite}),h=y=>o.moveFiles(y.sourceSpace,y.resource,y.targetSpace,{path:y.path},{overwrite:y.overwrite}),p=s.map(y=>c.add(async()=>{const g=y.resource;try{y.transferType===Vo.COPY?(await a(y),g.id=void 0,g.fileId=void 0):await h(y),g.path=Qt.join(y.targetFolder.path,g.name),g.webDavPath=Qt.join(y.targetFolder.webDavPath,g.name),u.push(g)}catch(m){console.error(m),l.push({resourceName:g.name,message:m.message,statusCode:m.statusCode,xReqId:m.response.headers?.get("x-request-id")})}}));await Promise.allSettled(p),postMessage(JSON.stringify({successful:u,failed:l}))}})();