@opencloud-eu/web-pkg 6.0.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.
- package/dist/TextEditor-B0ZZfO_w.js +819 -0
- package/dist/assets/worker-BVTM6bn-.js +1 -0
- package/dist/assets/worker-C-Nrpmiq.js +24 -0
- package/dist/assets/worker-CzI1mBNb.js +24 -0
- package/dist/assets/worker-DDmV-och.js +24 -0
- package/dist/composables-TkULFBg4.js +20165 -0
- package/dist/src/apps/types.d.ts +9 -9
- package/dist/src/components/AppBar/AppBar.vue.d.ts +154 -97
- package/dist/src/components/AppLoadingSpinner.vue.d.ts +2 -1
- package/dist/src/components/AppTemplates/AppWrapper.vue.d.ts +37 -33
- package/dist/src/components/AppTemplates/AppWrapperRoute.d.ts +1 -1
- package/dist/src/components/AppTemplates/PartialViews/ErrorScreen.vue.d.ts +5 -4
- package/dist/src/components/AppTemplates/PartialViews/LoadingScreen.vue.d.ts +2 -1
- package/dist/src/components/AppTopBar.vue.d.ts +13 -4
- package/dist/src/components/Avatars/AvatarUpload.vue.d.ts +3 -4
- package/dist/src/components/Avatars/UserAvatar.vue.d.ts +11 -1
- package/dist/src/components/BatchActions.vue.d.ts +16 -15
- package/dist/src/components/ContextActions/ActionMenuDropItem.vue.d.ts +11 -2
- package/dist/src/components/ContextActions/ActionMenuItem.vue.d.ts +9 -8
- package/dist/src/components/ContextActions/ContextActionMenu.vue.d.ts +41 -22
- package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +143 -388
- package/dist/src/components/CreateLinkModal.vue.d.ts +17 -7
- package/dist/src/components/CreateShortcutModal.vue.d.ts +160 -149
- package/dist/src/components/CustomComponentTarget.vue.d.ts +10 -1
- package/dist/src/components/FilesList/ContextActions.vue.d.ts +56 -37
- package/dist/src/components/FilesList/ResourceGhostElement.vue.d.ts +22 -11
- package/dist/src/components/FilesList/ResourceIcon.vue.d.ts +10 -1
- package/dist/src/components/FilesList/ResourceLink.vue.d.ts +7 -6
- package/dist/src/components/FilesList/ResourceListItem.vue.d.ts +13 -4
- package/dist/src/components/FilesList/ResourceName.vue.d.ts +10 -1
- package/dist/src/components/FilesList/ResourceSize.vue.d.ts +6 -5
- package/dist/src/components/FilesList/ResourceStatusIndicators.vue.d.ts +10 -1
- package/dist/src/components/FilesList/ResourceTable.vue.d.ts +51 -154
- package/dist/src/components/FilesList/ResourceTile.vue.d.ts +37 -153
- package/dist/src/components/FilesList/ResourceTiles.vue.d.ts +34 -119
- package/dist/src/components/Filters/DateFilter.vue.d.ts +32 -495
- package/dist/src/components/Filters/ItemFilterInline.vue.d.ts +6 -5
- package/dist/src/components/Groupware/Accounts/AccountsSwitch.vue.d.ts +3 -0
- package/dist/src/components/Groupware/Accounts/index.d.ts +1 -0
- package/dist/src/components/Groupware/index.d.ts +1 -0
- package/dist/src/components/ItemFilter.vue.d.ts +19 -204
- package/dist/src/components/ItemFilterToggle.vue.d.ts +6 -5
- package/dist/src/components/LinkRoleDropdown.vue.d.ts +7 -6
- package/dist/src/components/LoadingIndicator.vue.d.ts +5 -4
- package/dist/src/components/Modals/DatePickerModal.vue.d.ts +8 -7
- package/dist/src/components/Modals/EmojiPickerModal.vue.d.ts +6 -5
- package/dist/src/components/Modals/FilePickerModal.vue.d.ts +8 -7
- package/dist/src/components/Modals/ResourceConflictModal.vue.d.ts +9 -8
- package/dist/src/components/Modals/SaveAsModal.vue.d.ts +8 -7
- package/dist/src/components/Modals/SpaceMoveInfoModal.vue.d.ts +5 -4
- package/dist/src/components/Modals/UnsavedChangesModal.vue.d.ts +5 -4
- package/dist/src/components/Navigation/MobileNav.vue.d.ts +2 -1
- package/dist/src/components/NoContentMessage.vue.d.ts +17 -12
- package/dist/src/components/Pagination.vue.d.ts +5 -4
- package/dist/src/components/QuotaSelect.vue.d.ts +7 -6
- package/dist/src/components/Search/ResourcePreview.vue.d.ts +10 -41
- package/dist/src/components/SearchBarFilter.vue.d.ts +7 -6
- package/dist/src/components/SideBar/CompareSaveDialog.vue.d.ts +6 -5
- package/dist/src/components/SideBar/FileSideBar.vue.d.ts +10 -76
- package/dist/src/components/SideBar/Files/FileInfo.vue.d.ts +10 -1
- package/dist/src/components/SideBar/SideBar.vue.d.ts +20 -21
- package/dist/src/components/SideBar/SideBarPanels.vue.d.ts +21 -22
- package/dist/src/components/SideBar/Spaces/Details/SpaceDetails.vue.d.ts +10 -1
- package/dist/src/components/SideBar/Spaces/Details/SpaceDetailsMultiple.vue.d.ts +10 -1
- package/dist/src/components/SideBar/Spaces/SpaceInfo.vue.d.ts +2 -1
- package/dist/src/components/SideBar/Spaces/SpaceNoSelection.vue.d.ts +2 -1
- package/dist/src/components/SideBar/WebDavDetails.vue.d.ts +7 -6
- package/dist/src/components/SpaceQuota.vue.d.ts +10 -1
- package/dist/src/components/Spaces/QuotaModal.vue.d.ts +13 -4
- package/dist/src/components/Spaces/SpaceImageModal.vue.d.ts +12 -4
- package/dist/src/components/TextEditor/TextEditor.vue.d.ts +26 -0
- package/dist/src/components/TextEditor/index.d.ts +39 -0
- package/dist/src/components/VersionCheck.vue.d.ts +2 -1
- package/dist/src/components/ViewOptions.vue.d.ts +10 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/composables/actions/files/useFileActionFallbackToDownload.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActions.d.ts +2 -2
- package/dist/src/composables/actions/files/useFileActionsCopy.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsCopyPermanentLink.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsCreateLink.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsCreateNewFile.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsCreateNewFolder.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsCreateNewShortcut.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsCreateSpaceFromResource.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsDelete.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsDisableSync.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsDownloadArchive.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsDownloadFile.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsEmptyTrashBin.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsEnableSync.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsFavorite.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsMove.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsNavigate.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsOpenShortcut.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsOpenWithApp.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsOpenWithDefault.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsPaste.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsRename.d.ts +2 -2
- package/dist/src/composables/actions/files/useFileActionsRestore.d.ts +2 -2
- package/dist/src/composables/actions/files/useFileActionsSaveAs.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsSetImage.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsShowActions.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsShowDetails.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsShowShares.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsToggleHideShare.d.ts +1 -1
- package/dist/src/composables/actions/files/useFileActionsUndoDelete.d.ts +2 -2
- package/dist/src/composables/actions/helpers/useIsAppActive.d.ts +1 -1
- package/dist/src/composables/actions/helpers/useIsFilesAppActive.d.ts +1 -1
- package/dist/src/composables/actions/helpers/useIsSearchActive.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsCreate.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsDelete.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsDeleteImage.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsDisable.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsDuplicate.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsEditDescription.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsEditQuota.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsEditReadmeContent.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsNavigateToTrash.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsRename.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsRestore.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsSetIcon.d.ts +1 -1
- package/dist/src/composables/actions/spaces/useSpaceActionsShowMembers.d.ts +1 -1
- package/dist/src/composables/actions/useActionsShowDetails.d.ts +1 -1
- package/dist/src/composables/appDefaults/useAppConfig.d.ts +1 -1
- package/dist/src/composables/appDefaults/useAppDocumentTitle.d.ts +2 -1
- package/dist/src/composables/appDefaults/useAppFileHandling.d.ts +4 -2
- package/dist/src/composables/appDefaults/useAppMeta.d.ts +1 -1
- package/dist/src/composables/authContext/useAuthService.d.ts +3 -1
- package/dist/src/composables/authContext/useRequest.d.ts +2 -2
- package/dist/src/composables/driveResolver/useSpacesLoading.d.ts +1 -1
- package/dist/src/composables/embedMode/useEmbedMode.d.ts +8 -8
- package/dist/src/composables/eventBus/useEventBus.d.ts +1 -1
- package/dist/src/composables/filesList/useResourceRouteResolver.d.ts +1 -1
- package/dist/src/composables/folderLink/useFolderLink.d.ts +2 -2
- package/dist/src/composables/isTopBarSticky/useIsTopBarSticky.d.ts +1 -1
- package/dist/src/composables/keyboardActions/useInterceptModifierClick.d.ts +1 -1
- package/dist/src/composables/links/useLinkTypes.d.ts +1 -1
- package/dist/src/composables/localStorage/useLocalStorage.d.ts +1 -1
- package/dist/src/composables/navItems/useNavItems.d.ts +1 -1
- package/dist/src/composables/piniaStores/apps.d.ts +31 -31
- package/dist/src/composables/piniaStores/auth.d.ts +25 -25
- package/dist/src/composables/piniaStores/avatars.d.ts +9 -9
- package/dist/src/composables/piniaStores/capabilities.d.ts +160 -160
- package/dist/src/composables/piniaStores/clipboard.d.ts +49 -49
- package/dist/src/composables/piniaStores/config/config.d.ts +135 -141
- package/dist/src/composables/piniaStores/config/types.d.ts +6 -20
- package/dist/src/composables/piniaStores/extensionRegistry/extensionPreferences.d.ts +4 -4
- package/dist/src/composables/piniaStores/extensionRegistry/extensionRegistry.d.ts +1 -1
- package/dist/src/composables/piniaStores/groupware/accounts.d.ts +511 -0
- package/dist/src/composables/piniaStores/{groupwareConfig/groupwareConfig.d.ts → groupware/config.d.ts} +107 -80
- package/dist/src/composables/piniaStores/groupware/index.d.ts +3 -0
- package/dist/src/composables/piniaStores/{groupwareConfig → groupware}/types.d.ts +30 -18
- package/dist/src/composables/piniaStores/index.d.ts +1 -1
- package/dist/src/composables/piniaStores/messages.d.ts +70 -70
- package/dist/src/composables/piniaStores/modals.d.ts +197 -209
- package/dist/src/composables/piniaStores/resources.d.ts +11 -11
- package/dist/src/composables/piniaStores/shares/shares.d.ts +1 -1
- package/dist/src/composables/piniaStores/shares/types.d.ts +2 -1
- package/dist/src/composables/piniaStores/sideBar.d.ts +7 -7
- package/dist/src/composables/piniaStores/spaces.d.ts +189 -188
- package/dist/src/composables/piniaStores/theme.d.ts +10 -10
- package/dist/src/composables/piniaStores/updates.d.ts +10 -10
- package/dist/src/composables/piniaStores/user.d.ts +5 -5
- package/dist/src/composables/piniaStores/webWorkers.d.ts +1 -1
- package/dist/src/composables/requestHeaders/useRequestHeaders.d.ts +1 -1
- package/dist/src/composables/resources/useGetResourceContext.d.ts +26 -26
- package/dist/src/composables/resources/useLoadPreview.d.ts +1 -1
- package/dist/src/composables/resources/useResourceContents.d.ts +1 -1
- package/dist/src/composables/resources/useResourceIndicators.d.ts +12 -1
- package/dist/src/composables/resources/useResourceViewDrag.d.ts +23 -13
- package/dist/src/composables/resources/useResourceViewHelpers.d.ts +30 -20
- package/dist/src/composables/resources/useResourceViewSelection.d.ts +2 -2
- package/dist/src/composables/selection/useSelectedResources.d.ts +2 -1
- package/dist/src/composables/spaces/useCreateSpace.d.ts +1 -1
- package/dist/src/composables/spaces/useSpaceHelpers.d.ts +1 -1
- package/dist/src/composables/webWorkers/deleteWorker/useDeleteWorker.d.ts +1 -1
- package/dist/src/composables/webWorkers/pasteWorker/usePasteWorker.d.ts +2 -2
- package/dist/src/composables/webWorkers/restoreWorker/useRestoreWorker.d.ts +1 -1
- package/dist/src/composables/webWorkers/tokenTimerWorker/useTokenTimerWorker.d.ts +3 -1
- package/dist/src/extensionPoints.d.ts +1 -1
- package/dist/src/helpers/resource/conflictHandling/conflictDialog.d.ts +1 -1
- package/dist/src/helpers/resource/conflictHandling/transfer.d.ts +4 -4
- package/dist/src/helpers/resource/conflictHandling/types.d.ts +1 -1
- package/dist/src/helpers/share/driveItem.d.ts +1 -1
- package/dist/src/router/common.d.ts +1 -1
- package/dist/src/router/index.d.ts +2 -1
- package/dist/src/router/public.d.ts +1 -1
- package/dist/src/router/shares.d.ts +1 -1
- package/dist/src/router/spaces.d.ts +1 -1
- package/dist/src/router/trash.d.ts +1 -1
- package/dist/src/services/passwordPolicy/rules.d.ts +63 -0
- package/dist/src/services/preview/types.d.ts +1 -1
- package/dist/src/services/uppy/DropTarget/plugin.d.ts +2 -1
- package/dist/src/services/uppy/uppyService.d.ts +3 -3
- package/dist/web-pkg.js +4251 -352
- package/package.json +36 -37
- package/dist/TextEditor-D-HQDUkm.js +0 -865
- package/dist/assets/worker-BBQqm_-D.js +0 -1
- package/dist/assets/worker-CVwKToFD.js +0 -21
- package/dist/assets/worker-DJbU-qfq.js +0 -21
- package/dist/assets/worker-DyU7W9CZ.js +0 -21
- package/dist/index-OU30YA6H.js +0 -25032
- package/dist/src/composables/piniaStores/groupwareConfig/index.d.ts +0 -2
- package/dist/web-pkg.umd.cjs +0 -16
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=l(o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=`~`;function i(){}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1));function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,t,n,i,o){if(typeof n!=`function`)throw TypeError(`The listener must be a function`);var s=new a(n,i||e,o),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function s(e,t){--e._eventsCount===0?e._events=new i:delete e._events[t]}function c(){this._events=new i,this._eventsCount=0}c.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)n.call(t,i)&&e.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,a=n.length,o=Array(a);i<a;i++)o[i]=n[i].fn;return o},c.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},c.prototype.emit=function(e,t,n,i,a,o){var s=r?r+e:e;if(!this._events[s])return!1;var c=this._events[s],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,a),!0;case 6:return c.fn.call(c.context,t,n,i,a,o),!0}for(d=1,u=Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,p;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(p=1,u=Array(l-1);p<l;p++)u[p-1]=arguments[p];c[d].fn.apply(c[d].context,u)}}return!0},c.prototype.on=function(e,t,n){return o(this,e,t,n,!1)},c.prototype.once=function(e,t,n){return o(this,e,t,n,!0)},c.prototype.removeListener=function(e,t,n,i){var a=r?r+e:e;if(!this._events[a])return this;if(!t)return s(this,a),this;var o=this._events[a];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&s(this,a);else{for(var c=0,l=[],u=o.length;c<u;c++)(o[c].fn!==t||i&&!o[c].once||n&&o[c].context!==n)&&l.push(o[c]);l.length?this._events[a]=l.length===1?l[0]:l:s(this,a)}return this},c.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,t!==void 0&&(t.exports=c)}))(),1),d=class e extends Error{name=`TimeoutError`;constructor(t,n){super(t,n),Error.captureStackTrace?.(this,e)}};let f=e=>e.reason??new DOMException(`This operation was aborted.`,`AbortError`);function p(e,t){let{milliseconds:n,fallback:r,message:i,customTimers:a={setTimeout,clearTimeout},signal:o}=t,s,c,l=new Promise((t,l)=>{if(typeof n!=`number`||Math.sign(n)!==1)throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(o?.aborted){l(f(o));return}if(o&&(c=()=>{l(f(o))},o.addEventListener(`abort`,c,{once:!0})),e.then(t,l),n===1/0)return;let u=new d;s=a.setTimeout.call(void 0,()=>{if(r){try{t(r())}catch(e){l(e)}return}typeof e.cancel==`function`&&e.cancel(),i===!1?t():i instanceof Error?l(i):(u.message=i??`Promise timed out after ${n} milliseconds`,l(u))},n)}).finally(()=>{l.clear(),c&&o&&o.removeEventListener(`abort`,c)});return l.clear=()=>{a.clearTimeout.call(void 0,s),s=void 0},l}function m(e,t,n){let r=0,i=e.length;for(;i>0;){let a=Math.trunc(i/2),o=r+a;n(e[o],t)<=0?(r=++o,i-=a+1):i=a}return r}var h=class{#e=[];enqueue(e,t){let{priority:n=0,id:r}=t??{},i={priority:n,id:r,run:e};if(this.size===0||this.#e[this.size-1].priority>=n){this.#e.push(i);return}let a=m(this.#e,i,(e,t)=>t.priority-e.priority);this.#e.splice(a,0,i)}setPriority(e,t){let n=this.#e.findIndex(t=>t.id===e);if(n===-1)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[r]=this.#e.splice(n,1);this.enqueue(r.run,{priority:t,id:e})}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(e=>e.run)}get size(){return this.#e.length}},g=class extends u.default{#e;#t;#n=0;#r;#i=!1;#a=!1;#o;#s=0;#c=0;#l;#u;#d;#f=[];#p=0;#m;#h;#g=0;#_;#v;#y=1n;#b=new Map;timeout;constructor(e){if(super(),e={carryoverIntervalCount:!1,intervalCap:1/0,interval:0,concurrency:1/0,autoStart:!0,queueClass:h,strict:!1,...e},!(typeof e.intervalCap==`number`&&e.intervalCap>=1))throw 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 TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??``}\` (${typeof e.interval})`);if(e.strict&&e.interval===0)throw TypeError("The `strict` option requires a non-zero `interval`");if(e.strict&&e.intervalCap===1/0)throw TypeError("The `strict` option requires a finite `intervalCap`");if(this.#e=e.carryoverIntervalCount??e.carryoverConcurrencyCount??!1,this.#t=e.intervalCap===1/0||e.interval===0,this.#r=e.intervalCap,this.#o=e.interval,this.#d=e.strict,this.#m=new e.queueClass,this.#h=e.queueClass,this.concurrency=e.concurrency,e.timeout!==void 0&&!(Number.isFinite(e.timeout)&&e.timeout>0))throw TypeError(`Expected \`timeout\` to be a positive finite number, got \`${e.timeout}\` (${typeof e.timeout})`);this.timeout=e.timeout,this.#v=e.autoStart===!1,this.#R()}#x(e){for(;this.#p<this.#f.length;){let t=this.#f[this.#p];if(t!==void 0&&e-t>=this.#o)this.#p++;else break}(this.#p>100&&this.#p>this.#f.length/2||this.#p===this.#f.length)&&(this.#f=this.#f.slice(this.#p),this.#p=0)}#S(e){this.#d?this.#f.push(e):this.#n++}#C(){this.#d?this.#f.length>this.#p&&this.#f.pop():this.#n>0&&this.#n--}#w(){return this.#f.length-this.#p}get#T(){return this.#t?!0:this.#d?this.#w()<this.#r:this.#n<this.#r}get#E(){return this.#g<this.#_}#D(){this.#g--,this.#g===0&&this.emit(`pendingZero`),this.#N(),this.emit(`next`)}#O(){this.#u=void 0,this.#F(),this.#P()}#k(e){if(this.#d){if(this.#x(e),this.#w()>=this.#r){let t=this.#f[this.#p],n=this.#o-(e-t);return this.#A(n),!0}return!1}if(this.#l===void 0){let t=this.#s-e;if(t<0){if(this.#c>0){let t=e-this.#c;if(t<this.#o)return this.#A(this.#o-t),!0}this.#n=this.#e?this.#g:0}else return this.#A(t),!0}return!1}#A(e){this.#u===void 0&&(this.#u=setTimeout(()=>{this.#O()},e))}#j(){this.#l&&=(clearInterval(this.#l),void 0)}#M(){this.#u&&=(clearTimeout(this.#u),void 0)}#N(){if(this.#m.size===0){if(this.#j(),this.emit(`empty`),this.#g===0){if(this.#M(),this.#d&&this.#p>0){let e=Date.now();this.#x(e)}this.emit(`idle`)}return!1}let e=!1;if(!this.#v){let t=Date.now(),n=!this.#k(t);if(this.#T&&this.#E){let r=this.#m.dequeue();this.#t||(this.#S(t),this.#z()),this.emit(`active`),r(),n&&this.#P(),e=!0}}return e}#P(){this.#t||this.#l!==void 0||this.#d||(this.#l=setInterval(()=>{this.#F()},this.#o),this.#s=Date.now()+this.#o)}#F(){this.#d||(this.#n===0&&this.#g===0&&this.#l&&this.#j(),this.#n=this.#e?this.#g:0),this.#I(),this.#z()}#I(){for(;this.#N(););}get concurrency(){return this.#_}set concurrency(e){if(!(typeof e==`number`&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#_=e,this.#I()}setPriority(e,t){if(typeof t!=`number`||!Number.isFinite(t))throw TypeError(`Expected \`priority\` to be a finite number, got \`${t}\` (${typeof t})`);this.#m.setPriority(e,t)}async add(e,t={}){return t={timeout:this.timeout,...t,id:t.id??(this.#y++).toString()},new Promise((n,r)=>{let i=Symbol(`task-${t.id}`);this.#m.enqueue(async()=>{this.#g++,this.#b.set(i,{id:t.id,priority:t.priority??0,startTime:Date.now(),timeout:t.timeout});let a;try{try{t.signal?.throwIfAborted()}catch(e){throw this.#B(),this.#b.delete(i),e}this.#c=Date.now();let r=e({signal:t.signal});if(t.timeout&&(r=p(Promise.resolve(r),{milliseconds:t.timeout,message:`Task timed out after ${t.timeout}ms (queue has ${this.#g} running, ${this.#m.size} waiting)`})),t.signal){let{signal:e}=t;r=Promise.race([r,new Promise((t,n)=>{a=()=>{n(e.reason)},e.addEventListener(`abort`,a,{once:!0})})])}let o=await r;n(o),this.emit(`completed`,o)}catch(e){r(e),this.emit(`error`,e)}finally{a&&t.signal?.removeEventListener(`abort`,a),this.#b.delete(i),queueMicrotask(()=>{this.#D()})}},t),this.emit(`add`),this.#N()})}async addAll(e,t){return Promise.all(e.map(async e=>this.add(e,t)))}start(){return this.#v?(this.#v=!1,this.#I(),this):this}pause(){this.#v=!0}clear(){this.#m=new this.#h,this.#j(),this.#V(),this.emit(`empty`),this.#g===0&&(this.#M(),this.emit(`idle`)),this.emit(`next`)}async onEmpty(){this.#m.size!==0&&await this.#L(`empty`)}async onSizeLessThan(e){this.#m.size<e||await this.#L(`next`,()=>this.#m.size<e)}async onIdle(){this.#g===0&&this.#m.size===0||await this.#L(`idle`)}async onPendingZero(){this.#g!==0&&await this.#L(`pendingZero`)}async onRateLimit(){this.isRateLimited||await this.#L(`rateLimit`)}async onRateLimitCleared(){this.isRateLimited&&await this.#L(`rateLimitCleared`)}onError(){return new Promise((e,t)=>{let n=e=>{this.off(`error`,n),t(e)};this.on(`error`,n)})}async#L(e,t){return new Promise(n=>{let r=()=>{t&&!t()||(this.off(e,r),n())};this.on(e,r)})}get size(){return this.#m.size}sizeBy(e){return this.#m.filter(e).length}get pending(){return this.#g}get isPaused(){return this.#v}#R(){this.#t||(this.on(`add`,()=>{this.#m.size>0&&this.#z()}),this.on(`next`,()=>{this.#z()}))}#z(){this.#t||this.#a||(this.#a=!0,queueMicrotask(()=>{this.#a=!1,this.#V()}))}#B(){this.#t||(this.#C(),this.#z())}#V(){let e=this.#i;if(this.#t||this.#m.size===0){e&&(this.#i=!1,this.emit(`rateLimitCleared`));return}let t;if(this.#d){let e=Date.now();this.#x(e),t=this.#w()}else t=this.#n;let n=t>=this.#r;n!==e&&(this.#i=n,this.emit(n?`rateLimit`:`rateLimitCleared`))}get isRateLimited(){return this.#i}get isSaturated(){return this.#g===this.#_&&this.#m.size>0||this.isRateLimited&&this.#m.size>0}get runningTasks(){return[...this.#b.values()].map(e=>({...e}))}};function _(e,t){return function(){return e.apply(t,arguments)}}let{toString:v}=Object.prototype,{getPrototypeOf:y}=Object,{iterator:b,toStringTag:x}=Symbol,S=(e=>t=>{let n=v.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),C=e=>(e=e.toLowerCase(),t=>S(t)===e),w=e=>t=>typeof t===e,{isArray:ee}=Array,te=w(`undefined`);function ne(e){return e!==null&&!te(e)&&e.constructor!==null&&!te(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let re=C(`ArrayBuffer`);function ie(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&re(e.buffer),t}let ae=w(`string`),T=w(`function`),oe=w(`number`),E=e=>typeof e==`object`&&!!e,se=e=>e===!0||e===!1,ce=e=>{if(S(e)!==`object`)return!1;let t=y(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(x in e)&&!(b in e)},le=e=>{if(!E(e)||ne(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},ue=C(`Date`),de=C(`File`),fe=e=>!!(e&&e.uri!==void 0),pe=e=>e&&e.getParts!==void 0,me=C(`Blob`),he=C(`FileList`),ge=e=>E(e)&&T(e.pipe);function _e(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}let ve=_e(),ye=ve.FormData===void 0?void 0:ve.FormData,be=e=>{let t;return e&&(ye&&e instanceof ye||T(e.append)&&((t=S(e))===`formdata`||t===`object`&&T(e.toString)&&e.toString()===`[object FormData]`))},xe=C(`URLSearchParams`),[Se,Ce,we,Te]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(C),Ee=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function De(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),ee(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(ne(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function Oe(e,t){if(ne(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}let ke=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Ae=e=>!te(e)&&e!==ke;function je(){let{caseless:e,skipUndefined:t}=Ae(this)&&this||{},n={},r=(r,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=e&&Oe(n,i)||i;ce(n[a])&&ce(r)?n[a]=je(n[a],r):ce(r)?n[a]=je({},r):ee(r)?n[a]=r.slice():(!t||!te(r))&&(n[a]=r)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&De(arguments[e],r);return n}let Me=(e,t,n,{allOwnKeys:r}={})=>(De(t,(t,r)=>{n&&T(t)?Object.defineProperty(e,r,{value:_(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),Ne=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pe=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,`constructor`,{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,`super`,{value:t.prototype}),n&&Object.assign(e.prototype,n)},Fe=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&y(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ie=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Le=e=>{if(!e)return null;if(ee(e))return e;let t=e.length;if(!oe(t))return null;let n=Array(t);for(;t-- >0;)n[t]=e[t];return n},Re=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&y(Uint8Array)),ze=(e,t)=>{let n=(e&&e[b]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Be=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Ve=C(`HTMLFormElement`),He=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),Ue=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),We=C(`RegExp`),Ge=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};De(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},Ke=e=>{Ge(e,(t,n)=>{if(T(e)&&[`arguments`,`caller`,`callee`].indexOf(n)!==-1)return!1;let r=e[n];if(T(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},qe=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return ee(e)?r(e):r(String(e).split(t)),n},Je=()=>{},Ye=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Xe(e){return!!(e&&T(e.append)&&e[x]===`FormData`&&e[b])}let Ze=e=>{let t=Array(10),n=(e,r)=>{if(E(e)){if(t.indexOf(e)>=0)return;if(ne(e))return e;if(!(`toJSON`in e)){t[r]=e;let i=ee(e)?[]:{};return De(e,(e,t)=>{let a=n(e,r+1);!te(a)&&(i[t]=a)}),t[r]=void 0,i}}return e};return n(e,0)},Qe=C(`AsyncFunction`),$e=e=>e&&(E(e)||T(e))&&T(e.then)&&T(e.catch),et=((e,t)=>e?setImmediate:t?((e,t)=>(ke.addEventListener(`message`,({source:n,data:r})=>{n===ke&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),ke.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,T(ke.postMessage));var D={isArray:ee,isArrayBuffer:re,isBuffer:ne,isFormData:be,isArrayBufferView:ie,isString:ae,isNumber:oe,isBoolean:se,isObject:E,isPlainObject:ce,isEmptyObject:le,isReadableStream:Se,isRequest:Ce,isResponse:we,isHeaders:Te,isUndefined:te,isDate:ue,isFile:de,isReactNativeBlob:fe,isReactNative:pe,isBlob:me,isRegExp:We,isFunction:T,isStream:ge,isURLSearchParams:xe,isTypedArray:Re,isFileList:he,forEach:De,merge:je,extend:Me,trim:Ee,stripBOM:Ne,inherits:Pe,toFlatObject:Fe,kindOf:S,kindOfTest:C,endsWith:Ie,toArray:Le,forEachEntry:ze,matchAll:Be,isHTMLForm:Ve,hasOwnProperty:Ue,hasOwnProp:Ue,reduceDescriptors:Ge,freezeMethods:Ke,toObjectSet:qe,toCamelCase:He,noop:Je,toFiniteNumber:Ye,findKey:Oe,global:ke,isContextDefined:Ae,isSpecCompliantForm:Xe,toJSONObject:Ze,isAsyncFn:Qe,isThenable:$e,setImmediate:et,asap:typeof queueMicrotask<`u`?queueMicrotask.bind(ke):typeof process<`u`&&process.nextTick||et,isIterable:e=>e!=null&&T(e[b])},O=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return s.cause=t,s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,`message`,{value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.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:D.toJSONObject(this.config),code:this.code,status:this.status}}};O.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,O.ERR_BAD_OPTION=`ERR_BAD_OPTION`,O.ECONNABORTED=`ECONNABORTED`,O.ETIMEDOUT=`ETIMEDOUT`,O.ERR_NETWORK=`ERR_NETWORK`,O.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,O.ERR_DEPRECATED=`ERR_DEPRECATED`,O.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,O.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,O.ERR_CANCELED=`ERR_CANCELED`,O.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,O.ERR_INVALID_URL=`ERR_INVALID_URL`;function tt(e){return D.isPlainObject(e)||D.isArray(e)}function nt(e){return D.endsWith(e,`[]`)?e.slice(0,-2):e}function rt(e,t,n){return e?e.concat(t).map(function(e,t){return e=nt(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function it(e){return D.isArray(e)&&!e.some(tt)}let at=D.toFlatObject(D,{},null,function(e){return/^is[A-Z]/.test(e)});function ot(e,t,n){if(!D.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!D.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||l,a=n.dots,o=n.indexes,s=(n.Blob||typeof Blob<`u`&&Blob)&&D.isSpecCompliantForm(t);if(!D.isFunction(i))throw TypeError(`visitor must be a function`);function c(e){if(e===null)return``;if(D.isDate(e))return e.toISOString();if(D.isBoolean(e))return e.toString();if(!s&&D.isBlob(e))throw new O(`Blob is not supported. Use a Buffer instead.`);return D.isArrayBuffer(e)||D.isTypedArray(e)?s&&typeof Blob==`function`?new Blob([e]):Buffer.from(e):e}function l(e,n,i){let s=e;if(D.isReactNative(t)&&D.isReactNativeBlob(e))return t.append(rt(i,n,a),c(e)),!1;if(e&&!i&&typeof e==`object`){if(D.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(D.isArray(e)&&it(e)||(D.isFileList(e)||D.endsWith(n,`[]`))&&(s=D.toArray(e)))return n=nt(n),s.forEach(function(e,r){!(D.isUndefined(e)||e===null)&&t.append(o===!0?rt([n],r,a):o===null?n:n+`[]`,c(e))}),!1}return tt(e)?!0:(t.append(rt(i,n,a),c(e)),!1)}let u=[],d=Object.assign(at,{defaultVisitor:l,convertValue:c,isVisitable:tt});function f(e,n){if(!D.isUndefined(e)){if(u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),D.forEach(e,function(e,r){(!(D.isUndefined(e)||e===null)&&i.call(t,e,D.isString(r)?r.trim():r,n,d))===!0&&f(e,n?n.concat(r):[r])}),u.pop()}}if(!D.isObject(e))throw TypeError(`data must be an object`);return f(e),t}function st(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`,"%00":`\0`};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ct(e,t){this._pairs=[],e&&ot(e,this,t)}let lt=ct.prototype;lt.append=function(e,t){this._pairs.push([e,t])},lt.toString=function(e){let t=e?function(t){return e.call(this,t,st)}:st;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function ut(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function dt(e,t,n){if(!t)return e;let r=n&&n.encode||ut,i=D.isFunction(n)?{serialize:n}:n,a=i&&i.serialize,o;if(o=a?a(t,i):D.isURLSearchParams(t)?t.toString():new ct(t,i).toString(r),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var ft=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,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&&=[]}forEach(e){D.forEach(this.handlers,function(t){t!==null&&e(t)})}},pt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},mt={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:ct,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},ht=s({hasBrowserEnv:()=>gt,hasStandardBrowserEnv:()=>vt,hasStandardBrowserWebWorkerEnv:()=>yt,navigator:()=>_t,origin:()=>bt});let gt=typeof window<`u`&&typeof document<`u`,_t=typeof navigator==`object`&&navigator||void 0,vt=gt&&(!_t||[`ReactNative`,`NativeScript`,`NS`].indexOf(_t.product)<0),yt=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,bt=gt&&window.location.href||`http://localhost`;var k={...ht,...mt};function xt(e,t){return ot(e,new k.classes.URLSearchParams,{visitor:function(e,t,n,r){return k.isNode&&D.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}function St(e){return D.matchAll(/\w+|\[(\w*)]/g,e).map(e=>e[0]===`[]`?``:e[1]||e[0])}function Ct(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function wt(e){function t(e,n,r,i){let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&D.isArray(r)?r.length:a,s?(D.hasOwnProp(r,a)?r[a]=[r[a],n]:r[a]=n,!o):((!r[a]||!D.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&D.isArray(r[a])&&(r[a]=Ct(r[a])),!o)}if(D.isFormData(e)&&D.isFunction(e.entries)){let n={};return D.forEachEntry(e,(e,r)=>{t(St(e),r,n,0)}),n}return null}function Tt(e,t,n){if(D.isString(e))try{return(t||JSON.parse)(e),D.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}let Et={transitional:pt,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=D.isObject(e);if(i&&D.isHTMLForm(e)&&(e=new FormData(e)),D.isFormData(e))return r?JSON.stringify(wt(e)):e;if(D.isArrayBuffer(e)||D.isBuffer(e)||D.isStream(e)||D.isFile(e)||D.isBlob(e)||D.isReadableStream(e))return e;if(D.isArrayBufferView(e))return e.buffer;if(D.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return xt(e,this.formSerializer).toString();if((a=D.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let t=this.env&&this.env.FormData;return ot(a?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||r?(t.setContentType(`application/json`,!1),Tt(e)):e}],transformResponse:[function(e){let t=this.transitional||Et.transitional,n=t&&t.forcedJSONParsing,r=this.responseType===`json`;if(D.isResponse(e)||D.isReadableStream(e))return e;if(e&&D.isString(e)&&(n&&!this.responseType||r)){let n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n)throw e.name===`SyntaxError`?O.from(e,O.ERR_BAD_RESPONSE,this,null,this.response):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:k.classes.FormData,Blob:k.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};D.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`],e=>{Et.headers[e]={}});let Dt=D.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 Ot=e=>{let t={},n,r,i;return e&&e.split(`
|
|
2
|
+
`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Dt[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};let kt=Symbol(`internals`);function At(e){return e&&String(e).trim().toLowerCase()}function jt(e){return e===!1||e==null?e:D.isArray(e)?e.map(jt):String(e)}function Mt(e){let t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}let Nt=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Pt(e,t,n,r,i){if(D.isFunction(r))return r.call(this,t,n);if(i&&(t=n),D.isString(t)){if(D.isString(r))return t.indexOf(r)!==-1;if(D.isRegExp(r))return r.test(t)}}function Ft(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function It(e,t){let n=D.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var A=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=At(t);if(!i)throw Error(`header name must be a non-empty string`);let a=D.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=jt(e))}let a=(e,t)=>D.forEach(e,(e,n)=>i(e,n,t));if(D.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(D.isString(e)&&(e=e.trim())&&!Nt(e))a(Ot(e),t);else if(D.isObject(e)&&D.isIterable(e)){let n={},r,i;for(let t of e){if(!D.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);n[i=t[0]]=(r=n[i])?D.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=At(e),e){let n=D.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return Mt(e);if(D.isFunction(t))return t.call(this,e,n);if(D.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=At(e),e){let n=D.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||Pt(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=At(e),e){let i=D.findKey(n,e);i&&(!t||Pt(n,n[i],i,t))&&(delete n[i],r=!0)}}return D.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||Pt(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return D.forEach(this,(r,i)=>{let a=D.findKey(n,i);if(a){t[a]=jt(r),delete t[i];return}let o=e?Ft(i):String(i).trim();o!==i&&delete t[i],t[o]=jt(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return D.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&D.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).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,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[kt]=this[kt]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=At(e);t[r]||(It(n,e),t[r]=!0)}return D.isArray(e)?e.forEach(r):r(e),this}};A.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),D.reduceDescriptors(A.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),D.freezeMethods(A);function Lt(e,t){let n=this||Et,r=t||n,i=A.from(r.headers),a=r.data;return D.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Rt(e){return!!(e&&e.__CANCEL__)}var zt=class extends O{constructor(e,t,n){super(e??`canceled`,O.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Bt(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new O(`Request failed with status code `+n.status,[O.ERR_BAD_REQUEST,O.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Vt(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||``}function Ht(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function Ut(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}let Wt=(e,t,n=3)=>{let r=0,i=Ht(50,250);return Ut(n=>{let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=a-r,c=i(s),l=a<=o;r=a,e({loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:c||void 0,estimated:c&&o&&l?(o-a)/c:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},Gt=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kt=e=>(...t)=>D.asap(()=>e(...t));var qt=k.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,k.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(k.origin),k.navigator&&/(msie|trident)/i.test(k.navigator.userAgent)):()=>!0,Jt=k.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];D.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),D.isString(r)&&s.push(`path=${r}`),D.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),D.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.match(RegExp(`(?:^|; )`+e+`=([^;]*)`));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function Yt(e){return typeof e==`string`?/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e):!1}function Xt(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}function Zt(e,t,n){let r=!Yt(t);return e&&(r||n==0)?Xt(e,t):t}let Qt=e=>e instanceof A?{...e}:e;function $t(e,t){t||={};let n={};function r(e,t,n,r){return D.isPlainObject(e)&&D.isPlainObject(t)?D.merge.call({caseless:r},e,t):D.isPlainObject(t)?D.merge({},t):D.isArray(t)?t.slice():t}function i(e,t,n,i){if(!D.isUndefined(t))return r(e,t,n,i);if(!D.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!D.isUndefined(t))return r(void 0,t)}function o(e,t){if(!D.isUndefined(t))return r(void 0,t);if(!D.isUndefined(e))return r(void 0,e)}function s(n,i,a){if(a in t)return r(n,i);if(a in e)return r(void 0,n)}let c={url:a,method:a,data:a,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:s,headers:(e,t,n)=>i(Qt(e),Qt(t),n,!0)};return D.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=D.hasOwnProp(c,r)?c[r]:i,o=a(e[r],t[r],r);D.isUndefined(o)&&a!==s||(n[r]=o)}),n}var en=e=>{let t=$t({},e),{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:o,auth:s}=t;if(t.headers=o=A.from(o),t.url=dt(Zt(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&o.set(`Authorization`,`Basic `+btoa((s.username||``)+`:`+(s.password?unescape(encodeURIComponent(s.password)):``))),D.isFormData(n)){if(k.hasStandardBrowserEnv||k.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if(D.isFunction(n.getHeaders)){let e=n.getHeaders(),t=[`content-type`,`content-length`];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&o.set(e,n)})}}if(k.hasStandardBrowserEnv&&(r&&D.isFunction(r)&&(r=r(t)),r||r!==!1&&qt(t.url))){let e=i&&a&&Jt.read(a);e&&o.set(i,e)}return t},tn=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=en(e),i=r.data,a=A.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=A.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Bt(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf(`file:`)===0)||setTimeout(g)},h.onabort=function(){h&&=(n(new O(`Request aborted`,O.ECONNABORTED,e,h)),null)},h.onerror=function(t){let r=new O(t&&t.message?t.message:`Network Error`,O.ERR_NETWORK,e,h);r.event=t||null,n(r),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||pt;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new O(t,i.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&D.forEach(a.toJSON(),function(e,t){h.setRequestHeader(t,e)}),D.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=Wt(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=Wt(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new zt(null,e,h):t),h.abort(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Vt(r.url);if(_&&k.protocols.indexOf(_)===-1){n(new O(`Unsupported protocol `+_+`:`,O.ERR_BAD_REQUEST,e));return}h.send(i||null)})};let nn=(e,t)=>{let{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n=new AbortController,r,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof O?t:new zt(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new O(`timeout of ${t}ms exceeded`,O.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i));let{signal:s}=n;return s.unsubscribe=()=>D.asap(o),s}},rn=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},an=async function*(e,t){for await(let n of on(e))yield*rn(n,t)},on=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},sn=(e,t,n,r)=>{let i=an(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},cn=64*1024,{isFunction:ln}=D,un=(({Request:e,Response:t})=>({Request:e,Response:t}))(D.global),{ReadableStream:dn,TextEncoder:fn}=D.global,pn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},mn=e=>{e=D.merge.call({skipUndefined:!0},un,e);let{fetch:t,Request:n,Response:r}=e,i=t?ln(t):typeof fetch==`function`,a=ln(n),o=ln(r);if(!i)return!1;let s=i&&ln(dn),c=i&&(typeof fn==`function`?(e=>t=>e.encode(t))(new fn):async e=>new Uint8Array(await new n(e).arrayBuffer())),l=a&&s&&pn(()=>{let e=!1,t=new n(k.origin,{body:new dn,method:`POST`,get duplex(){return e=!0,`half`}}).headers.has(`Content-Type`);return e&&!t}),u=o&&s&&pn(()=>D.isReadableStream(new r(``).body)),d={stream:u&&(e=>e.body)};i&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new O(`Response type '${e}' is not supported`,O.ERR_NOT_SUPPORT,n)})});let f=async e=>{if(e==null)return 0;if(D.isBlob(e))return e.size;if(D.isSpecCompliantForm(e))return(await new n(k.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(D.isArrayBufferView(e)||D.isArrayBuffer(e))return e.byteLength;if(D.isURLSearchParams(e)&&(e+=``),D.isString(e))return(await c(e)).byteLength},p=async(e,t)=>D.toFiniteNumber(e.getContentLength())??f(t);return async e=>{let{url:i,method:o,data:s,signal:c,cancelToken:f,timeout:m,onDownloadProgress:h,onUploadProgress:g,responseType:_,headers:v,withCredentials:y=`same-origin`,fetchOptions:b}=en(e),x=t||fetch;_=_?(_+``).toLowerCase():`text`;let S=nn([c,f&&f.toAbortSignal()],m),C=null,w=S&&S.unsubscribe&&(()=>{S.unsubscribe()}),ee;try{if(g&&l&&o!==`get`&&o!==`head`&&(ee=await p(v,s))!==0){let e=new n(i,{method:`POST`,body:s,duplex:`half`}),t;if(D.isFormData(s)&&(t=e.headers.get(`content-type`))&&v.setContentType(t),e.body){let[t,n]=Gt(ee,Wt(Kt(g)));s=sn(e.body,cn,t,n)}}D.isString(y)||(y=y?`include`:`omit`);let t=a&&`credentials`in n.prototype,c={...b,signal:S,method:o.toUpperCase(),headers:v.normalize().toJSON(),body:s,duplex:`half`,credentials:t?y:void 0};C=a&&new n(i,c);let f=await(a?x(C,b):x(i,c)),m=u&&(_===`stream`||_===`response`);if(u&&(h||m&&w)){let e={};[`status`,`statusText`,`headers`].forEach(t=>{e[t]=f[t]});let t=D.toFiniteNumber(f.headers.get(`content-length`)),[n,i]=h&&Gt(t,Wt(Kt(h),!0))||[];f=new r(sn(f.body,cn,n,()=>{i&&i(),w&&w()}),e)}_||=`text`;let te=await d[D.findKey(d,_)||`text`](f,e);return!m&&w&&w(),await new Promise((t,n)=>{Bt(t,n,{data:te,headers:A.from(f.headers),status:f.status,statusText:f.statusText,config:e,request:C})})}catch(t){throw w&&w(),t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)?Object.assign(new O(`Network Error`,O.ERR_NETWORK,e,C,t&&t.response),{cause:t.cause||t}):O.from(t,t&&t.code,e,C,t&&t.response)}}},hn=new Map,gn=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=hn;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:mn(t)),l=c;return c};gn();let _n={http:null,xhr:tn,fetch:{get:gn}};D.forEach(_n,(e,t)=>{if(e){try{Object.defineProperty(e,`name`,{value:t})}catch{}Object.defineProperty(e,`adapterName`,{value:t})}});let vn=e=>`- ${e}`,yn=e=>D.isFunction(e)||e===null||e===!1;function bn(e,t){e=D.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!yn(r)&&(i=_n[(n=String(r)).toLowerCase()],i===void 0))throw new O(`Unknown adapter '${n}'`);if(i&&(D.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new O(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since :
|
|
4
|
+
`+e.map(vn).join(`
|
|
5
|
+
`):` `+vn(e[0]):`as no adapter specified`),`ERR_NOT_SUPPORT`)}return i}var xn={getAdapter:bn,adapters:_n};function Sn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new zt(null,e)}function Cn(e){return Sn(e),e.headers=A.from(e.headers),e.data=Lt.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),xn.getAdapter(e.adapter||Et.adapter,e)(e).then(function(t){return Sn(e),t.data=Lt.call(e,e.transformResponse,t),t.headers=A.from(t.headers),t},function(t){return Rt(t)||(Sn(e),t&&t.response&&(t.response.data=Lt.call(e,e.transformResponse,t.response),t.response.headers=A.from(t.response.headers))),Promise.reject(t)})}let wn=`1.13.6`,Tn={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Tn[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});let En={};Tn.transitional=function(e,t,n){function r(e,t){return`[Axios v`+wn+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new O(r(i,` has been removed`+(t?` in `+t:``)),O.ERR_DEPRECATED);return t&&!En[i]&&(En[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),e?e(n,i,a):!0}},Tn.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function Dn(e,t,n){if(typeof e!=`object`)throw new O(`options must be an object`,O.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-- >0;){let a=r[i],o=t[a];if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new O(`option `+a+` must be `+n,O.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new O(`Unknown option `+a,O.ERR_BAD_OPTION)}}var On={assertOptions:Dn,validators:Tn};let kn=On.validators;var An=class{constructor(e){this.defaults=e||{},this.interceptors={request:new ft,response:new ft}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=t.stack?t.stack.replace(/^.+\n/,``):``;try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,``))&&(e.stack+=`
|
|
6
|
+
`+n):e.stack=n}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=$t(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&On.assertOptions(n,{silentJSONParsing:kn.transitional(kn.boolean),forcedJSONParsing:kn.transitional(kn.boolean),clarifyTimeoutError:kn.transitional(kn.boolean),legacyInterceptorReqResOrdering:kn.transitional(kn.boolean)},!1),r!=null&&(D.isFunction(r)?t.paramsSerializer={serialize:r}:On.assertOptions(r,{encode:kn.function,serialize:kn.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),On.assertOptions(t,{baseUrl:kn.spelling(`baseURL`),withXsrfToken:kn.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&D.merge(i.common,i[t.method]);i&&D.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`common`],e=>{delete i[e]}),t.headers=A.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||pt;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Cn.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Cn.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=$t(this.defaults,e),dt(Zt(e.baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}};D.forEach([`delete`,`get`,`head`,`options`],function(e){An.prototype[e]=function(t,n){return this.request($t(n||{},{method:e,url:t,data:(n||{}).data}))}}),D.forEach([`post`,`put`,`patch`],function(e){function t(t){return function(n,r,i){return this.request($t(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}An.prototype[e]=t(),An.prototype[e+`Form`]=t(!0)});var jn=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new zt(e,r,i),t(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;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Mn(e){return function(t){return e.apply(null,t)}}function Nn(e){return D.isObject(e)&&e.isAxiosError===!0}let Pn={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(Pn).forEach(([e,t])=>{Pn[t]=e});function Fn(e){let t=new An(e),n=_(An.prototype.request,t);return D.extend(n,An.prototype,t,{allOwnKeys:!0}),D.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Fn($t(e,t))},n}let j=Fn(Et);j.Axios=An,j.CanceledError=zt,j.CancelToken=jn,j.isCancel=Rt,j.VERSION=wn,j.toFormData=ot,j.AxiosError=O,j.Cancel=j.CanceledError,j.all=function(e){return Promise.all(e)},j.spread=Mn,j.isAxiosError=Nn,j.mergeConfig=$t,j.AxiosHeaders=A,j.formToJSON=e=>wt(D.isHTMLForm(e)?new FormData(e):e),j.getAdapter=xn.getAdapter,j.HttpStatusCode=Pn,j.default=j,`https://localhost:9200/graph`.replace(/\/+$/,``);let In=e=>encodeURIComponent(e).split(`%2F`).join(`/`),Ln=/^(\w+:\/\/[^/?]+)?(.*?)$/,Rn=e=>e.filter(e=>typeof e==`string`||typeof e==`number`).map(e=>`${e}`).filter(e=>e),zn=e=>{let[,t=``,n=``]=e.join(`/`).match(Ln)||[];return{prefix:t,pathname:{parts:n.split(`/`).filter(e=>e!==``),hasLeading:/^\/+/.test(n),hasTrailing:/\/+$/.test(n)}}},Bn=(e,t)=>{let{prefix:n,pathname:r}=e,{parts:i,hasLeading:a,hasTrailing:o}=r,{leadingSlash:s,trailingSlash:c}=t,l=s===!0||s===`keep`&&a,u=c===!0||c===`keep`&&o,d=n;return i.length>0&&((d||l)&&(d+=`/`),d+=i.join(`/`)),u&&(d+=`/`),!d&&l&&(d+=`/`),d},M=(...e)=>{let t=e[e.length-1],n;return t&&typeof t==`object`&&(n=t,e=e.slice(0,-1)),n={leadingSlash:!0,trailingSlash:!1,...n},e=Rn(e),Bn(zn(e),n)};var Vn=class extends Error{response;statusCode;constructor(e,t,n=null){super(e),this.response=t,this.statusCode=n}},Hn=class extends Vn{errorCode;constructor(e,t,n,r=null){super(e,n,r),this.errorCode=t}};function Un(e,t=``){return`/public-files/${e}/${t}`.split(`/`).filter(Boolean).join(`/`)}function Wn(e,t=``){return`/ocm/${e}/${t}`.split(`/`).filter(Boolean).join(`/`)}var Gn=l(o(((e,t)=>{function n(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}function r(e,t){for(var n=``,r=0,i=-1,a=0,o,s=0;s<=e.length;++s){if(s<e.length)o=e.charCodeAt(s);else if(o===47)break;else o=47;if(o===47){if(!(i===s-1||a===1))if(i!==s-1&&a===2){if(n.length<2||r!==2||n.charCodeAt(n.length-1)!==46||n.charCodeAt(n.length-2)!==46){if(n.length>2){var c=n.lastIndexOf(`/`);if(c!==n.length-1){c===-1?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=s,a=0;continue}}else if(n.length===2||n.length===1){n=``,r=0,i=s,a=0;continue}}t&&(n.length>0?n+=`/..`:n=`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,s):n=e.slice(i+1,s),r=s-i-1;i=s,a=0}else o===46&&a!==-1?++a:a=-1}return n}function i(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+e+r:r}var a={resolve:function(){for(var e=``,t=!1,i,a=arguments.length-1;a>=-1&&!t;a--){var o;a>=0?o=arguments[a]:(i===void 0&&(i=process.cwd()),o=i),n(o),o.length!==0&&(e=o+`/`+e,t=o.charCodeAt(0)===47)}return e=r(e,!t),t?e.length>0?`/`+e:`/`:e.length>0?e:`.`},normalize:function(e){if(n(e),e.length===0)return`.`;var t=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return e=r(e,!t),e.length===0&&!t&&(e=`.`),e.length>0&&i&&(e+=`/`),t?`/`+e:e},isAbsolute:function(e){return n(e),e.length>0&&e.charCodeAt(0)===47},join:function(){if(arguments.length===0)return`.`;for(var e,t=0;t<arguments.length;++t){var r=arguments[t];n(r),r.length>0&&(e===void 0?e=r:e+=`/`+r)}return e===void 0?`.`:a.normalize(e)},relative:function(e,t){if(n(e),n(t),e===t||(e=a.resolve(e),t=a.resolve(t),e===t))return``;for(var r=1;r<e.length&&e.charCodeAt(r)===47;++r);for(var i=e.length,o=i-r,s=1;s<t.length&&t.charCodeAt(s)===47;++s);for(var c=t.length-s,l=o<c?o:c,u=-1,d=0;d<=l;++d){if(d===l){if(c>l){if(t.charCodeAt(s+d)===47)return t.slice(s+d+1);if(d===0)return t.slice(s+d)}else o>l&&(e.charCodeAt(r+d)===47?u=d:d===0&&(u=0));break}var f=e.charCodeAt(r+d);if(f!==t.charCodeAt(s+d))break;f===47&&(u=d)}var p=``;for(d=r+u+1;d<=i;++d)(d===i||e.charCodeAt(d)===47)&&(p.length===0?p+=`..`:p+=`/..`);return p.length>0?p+t.slice(s+u):(s+=u,t.charCodeAt(s)===47&&++s,t.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(n(e),e.length===0)return`.`;for(var t=e.charCodeAt(0),r=t===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if(t=e.charCodeAt(o),t===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},basename:function(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);n(e);var r=0,i=-1,a=!0,o;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t.length===e.length&&t===e)return``;var s=t.length-1,c=-1;for(o=e.length-1;o>=0;--o){var l=e.charCodeAt(o);if(l===47){if(!a){r=o+1;break}}else c===-1&&(a=!1,c=o+1),s>=0&&(l===t.charCodeAt(s)?--s===-1&&(i=o):(s=-1,i=c))}return r===i?i=c:i===-1&&(i=e.length),e.slice(r,i)}else{for(o=e.length-1;o>=0;--o)if(e.charCodeAt(o)===47){if(!a){r=o+1;break}}else i===-1&&(a=!1,i=o+1);return i===-1?``:e.slice(r,i)}},extname:function(e){n(e);for(var t=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var c=e.charCodeAt(s);if(c===47){if(!a){r=s+1;break}continue}i===-1&&(a=!1,i=s+1),c===46?t===-1?t=s:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||i===-1||o===0||o===1&&t===i-1&&t===r+1?``:e.slice(t,i)},format:function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return i(`/`,e)},parse:function(e){n(e);var t={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return t;var r=e.charCodeAt(0),i=r===47,a;i?(t.root=`/`,a=1):a=0;for(var o=-1,s=0,c=-1,l=!0,u=e.length-1,d=0;u>=a;--u){if(r=e.charCodeAt(u),r===47){if(!l){s=u+1;break}continue}c===-1&&(l=!1,c=u+1),r===46?o===-1?o=u:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||c===-1||d===0||d===1&&o===c-1&&o===s+1?c!==-1&&(s===0&&i?t.base=t.name=e.slice(1,c):t.base=t.name=e.slice(s,c)):(s===0&&i?(t.name=e.slice(1,o),t.base=e.slice(1,c)):(t.name=e.slice(s,o),t.base=e.slice(s,c)),t.ext=e.slice(o,c)),s>0?t.dir=e.slice(0,s-1):i&&(t.dir=`/`),t},sep:`/`,delimiter:`:`,win32:null,posix:null};a.posix=a,t.exports=a}))(),1),Kn=class{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`};let qn=function(e){return e.copy=`COPY`,e.delete=`DELETE`,e.lock=`LOCK`,e.mkcol=`MKCOL`,e.move=`MOVE`,e.propfind=`PROPFIND`,e.proppatch=`PROPPATCH`,e.put=`PUT`,e.report=`REPORT`,e.unlock=`UNLOCK`,e}({}),Jn=e=>({value:e,type:null}),Yn=e=>Jn(e),N=e=>Jn(e),Xn=e=>Jn(e),Zn={Permissions:N(`permissions`),IsFavorite:Xn(`favorite`),FileId:N(`fileid`),FileParent:N(`file-parent`),Name:N(`name`),OwnerId:N(`owner-id`),OwnerDisplayName:N(`owner-display-name`),PrivateLink:N(`privatelink`),ContentLength:Xn(`getcontentlength`),ContentSize:Xn(`size`),LastModifiedDate:N(`getlastmodified`),Tags:Yn(`tags`),Audio:{value:`audio`,type:null},Location:{value:`location`,type:null},Image:{value:`image`,type:null},Photo:{value:`photo`,type:null},ETag:N(`getetag`),MimeType:N(`getcontenttype`),ResourceType:(e=>Jn(e))(`resourcetype`),LockDiscovery:{value:`lockdiscovery`,type:null},LockOwner:N(`owner`),LockTime:N(`locktime`),ActiveLock:{value:`activelock`,type:null},DownloadURL:N(`downloadURL`),Highlights:N(`highlights`),MetaPathForUser:N(`meta-path-for-user`),RemoteItemId:N(`remote-item-id`),HasPreview:Xn(`has-preview`),ShareId:N(`shareid`),ShareRoot:N(`shareroot`),ShareTypes:{value:`share-types`,type:null},SharePermissions:N(`share-permissions`),TrashbinOriginalFilename:N(`trashbin-original-filename`),TrashbinOriginalLocation:N(`trashbin-original-location`),TrashbinDeletedDate:N(`trashbin-delete-datetime`),PublicLinkItemType:N(`public-link-item-type`),PublicLinkPermission:N(`public-link-permission`),PublicLinkExpiration:N(`public-link-expiration`),PublicLinkShareDate:N(`public-link-share-datetime`),PublicLinkShareOwner:N(`public-link-share-owner`)},P=Object.fromEntries(Object.entries(Zn).map(([e,t])=>[e,t.value]));var Qn=class e{static Default=[P.Permissions,P.IsFavorite,P.FileId,P.FileParent,P.Name,P.LockDiscovery,P.ActiveLock,P.OwnerId,P.OwnerDisplayName,P.RemoteItemId,P.ShareRoot,P.ShareTypes,P.PrivateLink,P.ContentLength,P.ContentSize,P.LastModifiedDate,P.ETag,P.MimeType,P.ResourceType,P.Tags,P.Audio,P.Location,P.Image,P.Photo,P.HasPreview];static PublicLink=e.Default.concat([P.PublicLinkItemType,P.PublicLinkPermission,P.PublicLinkExpiration,P.PublicLinkShareDate,P.PublicLinkShareOwner]);static Trashbin=[P.ContentLength,P.ResourceType,P.TrashbinOriginalLocation,P.TrashbinOriginalFilename,P.TrashbinDeletedDate,P.Permissions,P.FileParent];static DavNamespace=[P.ContentLength,P.LastModifiedDate,P.ETag,P.MimeType,P.ResourceType,P.LockDiscovery,P.ActiveLock]},$n=typeof global==`object`&&global&&global.Object===Object&&global,er=typeof self==`object`&&self&&self.Object===Object&&self,tr=$n||er||Function(`return this`)(),nr=tr.Symbol,rr=Object.prototype,ir=rr.hasOwnProperty,ar=rr.toString,or=nr?nr.toStringTag:void 0;function sr(e){var t=ir.call(e,or),n=e[or];try{e[or]=void 0;var r=!0}catch{}var i=ar.call(e);return r&&(t?e[or]=n:delete e[or]),i}var cr=Object.prototype.toString;function lr(e){return cr.call(e)}var ur=`[object Null]`,dr=`[object Undefined]`,fr=nr?nr.toStringTag:void 0;function pr(e){return e==null?e===void 0?dr:ur:fr&&fr in Object(e)?sr(e):lr(e)}function mr(e){return typeof e==`object`&&!!e}var hr=`[object Symbol]`;function gr(e){return typeof e==`symbol`||mr(e)&&pr(e)==hr}function _r(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var vr=Array.isArray,yr=1/0,br=nr?nr.prototype:void 0,xr=br?br.toString:void 0;function Sr(e){if(typeof e==`string`)return e;if(vr(e))return _r(e,Sr)+``;if(gr(e))return xr?xr.call(e):``;var t=e+``;return t==`0`&&1/e==-yr?`-0`:t}function Cr(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function wr(e){return e}var Tr=`[object AsyncFunction]`,Er=`[object Function]`,Dr=`[object GeneratorFunction]`,Or=`[object Proxy]`;function kr(e){if(!Cr(e))return!1;var t=pr(e);return t==Er||t==Dr||t==Tr||t==Or}var Ar=tr[`__core-js_shared__`],jr=function(){var e=/[^.]+$/.exec(Ar&&Ar.keys&&Ar.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}();function Mr(e){return!!jr&&jr in e}var Nr=Function.prototype.toString;function Pr(e){if(e!=null){try{return Nr.call(e)}catch{}try{return e+``}catch{}}return``}var Fr=/[\\^$.*+?()[\]{}|]/g,Ir=/^\[object .+?Constructor\]$/,Lr=Function.prototype,Rr=Object.prototype,zr=Lr.toString,Br=Rr.hasOwnProperty,Vr=RegExp(`^`+zr.call(Br).replace(Fr,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function Hr(e){return!Cr(e)||Mr(e)?!1:(kr(e)?Vr:Ir).test(Pr(e))}function Ur(e,t){return e?.[t]}function Wr(e,t){var n=Ur(e,t);return Hr(n)?n:void 0}function Gr(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Kr=800,qr=16,Jr=Date.now;function Yr(e){var t=0,n=0;return function(){var r=Jr(),i=qr-(r-n);if(n=r,i>0){if(++t>=Kr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Xr(e){return function(){return e}}var Zr=function(){try{var e=Wr(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),Qr=Yr(Zr?function(e,t){return Zr(e,`toString`,{configurable:!0,enumerable:!1,value:Xr(t),writable:!0})}:wr);function $r(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function ei(e){return e!==e}function ti(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function ni(e,t,n){return t===t?ti(e,t,n):$r(e,ei,n)}function ri(e,t){return!!(e!=null&&e.length)&&ni(e,t,0)>-1}function ii(e,t){return e===t||e!==e&&t!==t}var ai=Math.max;function oi(e,t,n){return t=ai(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=ai(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Gr(e,this,s)}}function si(e,t){return Qr(oi(e,t,wr),e+``)}var ci=9007199254740991;function li(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=ci}function ui(e){return e!=null&&li(e.length)&&!kr(e)}function di(e){return function(t){return e(t)}}var fi=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,pi=/^\w*$/;function mi(e,t){if(vr(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||gr(e)?!0:pi.test(e)||!fi.test(e)||t!=null&&e in Object(t)}var hi=Wr(Object,`create`);function gi(){this.__data__=hi?hi(null):{},this.size=0}function _i(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vi=`__lodash_hash_undefined__`,yi=Object.prototype.hasOwnProperty;function bi(e){var t=this.__data__;if(hi){var n=t[e];return n===vi?void 0:n}return yi.call(t,e)?t[e]:void 0}var xi=Object.prototype.hasOwnProperty;function Si(e){var t=this.__data__;return hi?t[e]!==void 0:xi.call(t,e)}var Ci=`__lodash_hash_undefined__`;function wi(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=hi&&t===void 0?Ci:t,this}function Ti(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ti.prototype.clear=gi,Ti.prototype.delete=_i,Ti.prototype.get=bi,Ti.prototype.has=Si,Ti.prototype.set=wi;function Ei(){this.__data__=[],this.size=0}function Di(e,t){for(var n=e.length;n--;)if(ii(e[n][0],t))return n;return-1}var Oi=Array.prototype.splice;function ki(e){var t=this.__data__,n=Di(t,e);return n<0?!1:(n==t.length-1?t.pop():Oi.call(t,n,1),--this.size,!0)}function Ai(e){var t=this.__data__,n=Di(t,e);return n<0?void 0:t[n][1]}function ji(e){return Di(this.__data__,e)>-1}function Mi(e,t){var n=this.__data__,r=Di(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Ni(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ni.prototype.clear=Ei,Ni.prototype.delete=ki,Ni.prototype.get=Ai,Ni.prototype.has=ji,Ni.prototype.set=Mi;var Pi=Wr(tr,`Map`);function Fi(){this.size=0,this.__data__={hash:new Ti,map:new(Pi||Ni),string:new Ti}}function Ii(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function Li(e,t){var n=e.__data__;return Ii(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function Ri(e){var t=Li(this,e).delete(e);return this.size-=t?1:0,t}function zi(e){return Li(this,e).get(e)}function Bi(e){return Li(this,e).has(e)}function Vi(e,t){var n=Li(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Hi(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Hi.prototype.clear=Fi,Hi.prototype.delete=Ri,Hi.prototype.get=zi,Hi.prototype.has=Bi,Hi.prototype.set=Vi;var Ui=`Expected a function`;function Wi(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Ui);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Wi.Cache||Hi),n}Wi.Cache=Hi;var Gi=500;function Ki(e){var t=Wi(e,function(e){return n.size===Gi&&n.clear(),e}),n=t.cache;return t}var qi=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ji=/\\(\\)?/g,Yi=Ki(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(qi,function(e,n,r,i){t.push(r?i.replace(Ji,`$1`):n||e)}),t});function Xi(e){return e==null?``:Sr(e)}function Zi(e,t){return vr(e)?e:mi(e,t)?[e]:Yi(Xi(e))}var Qi=1/0;function $i(e){if(typeof e==`string`||gr(e))return e;var t=e+``;return t==`0`&&1/e==-Qi?`-0`:t}function ea(e,t){t=Zi(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$i(t[n++])];return n&&n==r?e:void 0}function ta(e,t,n){var r=e==null?void 0:ea(e,t);return r===void 0?n:r}function na(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function ra(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:na(e,t,n)}var ia=RegExp(`[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]`);function aa(e){return ia.test(e)}function oa(e){return e.split(``)}var sa=`\\ud800-\\udfff`,ca=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,la=`\\ufe0e\\ufe0f`,ua=`[`+sa+`]`,da=`[`+ca+`]`,fa=`\\ud83c[\\udffb-\\udfff]`,pa=`(?:`+da+`|`+fa+`)`,ma=`[^`+sa+`]`,ha=`(?:\\ud83c[\\udde6-\\uddff]){2}`,ga=`[\\ud800-\\udbff][\\udc00-\\udfff]`,_a=`\\u200d`,va=pa+`?`,ya=`[`+la+`]?`,ba=`(?:`+_a+`(?:`+[ma,ha,ga].join(`|`)+`)`+ya+va+`)*`,xa=ya+va+ba,Sa=`(?:`+[ma+da+`?`,da,ha,ga,ua].join(`|`)+`)`,Ca=RegExp(fa+`(?=`+fa+`)|`+Sa+xa,`g`);function wa(e){return e.match(Ca)||[]}function Ta(e){return aa(e)?wa(e):oa(e)}function Ea(e){return function(t){t=Xi(t);var n=aa(t)?Ta(t):void 0,r=n?n[0]:t.charAt(0),i=n?ra(n,1).join(``):t.slice(1);return r[e]()+i}}var Da=Ea(`toUpperCase`);function Oa(e){return Da(Xi(e).toLowerCase())}function ka(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Aa(e){return function(t){return e?.[t]}}var ja=Aa({À:`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`}),Ma=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Na=RegExp(`[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]`,`g`);function Pa(e){return e=Xi(e),e&&e.replace(Ma,ja).replace(Na,``)}var Fa=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ia(e){return e.match(Fa)||[]}var La=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Ra(e){return La.test(e)}var za=`\\ud800-\\udfff`,Ba=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,Va=`\\u2700-\\u27bf`,Ha=`a-z\\xdf-\\xf6\\xf8-\\xff`,Ua=`\\xac\\xb1\\xd7\\xf7`,Wa=`\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf`,Ga=`\\u2000-\\u206f`,Ka=` \\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`,qa=`A-Z\\xc0-\\xd6\\xd8-\\xde`,Ja=`\\ufe0e\\ufe0f`,Ya=Ua+Wa+Ga+Ka,Xa=`['’]`,Za=`[`+Ya+`]`,Qa=`[`+Ba+`]`,$a=`\\d+`,eo=`[`+Va+`]`,to=`[`+Ha+`]`,no=`[^`+za+Ya+$a+Va+Ha+qa+`]`,ro=`(?:`+Qa+`|\\ud83c[\\udffb-\\udfff])`,io=`[^`+za+`]`,ao=`(?:\\ud83c[\\udde6-\\uddff]){2}`,oo=`[\\ud800-\\udbff][\\udc00-\\udfff]`,so=`[`+qa+`]`,co=`\\u200d`,lo=`(?:`+to+`|`+no+`)`,uo=`(?:`+so+`|`+no+`)`,fo=`(?:`+Xa+`(?:d|ll|m|re|s|t|ve))?`,po=`(?:`+Xa+`(?:D|LL|M|RE|S|T|VE))?`,mo=ro+`?`,ho=`[`+Ja+`]?`,go=`(?:`+co+`(?:`+[io,ao,oo].join(`|`)+`)`+ho+mo+`)*`,_o=`\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])`,vo=`\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])`,yo=ho+mo+go,bo=`(?:`+[eo,ao,oo].join(`|`)+`)`+yo,xo=RegExp([so+`?`+to+`+`+fo+`(?=`+[Za,so,`$`].join(`|`)+`)`,uo+`+`+po+`(?=`+[Za,so+lo,`$`].join(`|`)+`)`,so+`?`+lo+`+`+fo,so+`+`+po,vo,_o,$a,bo].join(`|`),`g`);function So(e){return e.match(xo)||[]}function Co(e,t,n){return e=Xi(e),t=n?void 0:t,t===void 0?Ra(e)?So(e):Ia(e):e.match(t)||[]}var wo=RegExp(`['’]`,`g`);function To(e){return function(t){return ka(Co(Pa(t).replace(wo,``)),e,``)}}var Eo=To(function(e,t,n){return t=t.toLowerCase(),e+(n?Oa(t):t)}),Do=`__lodash_hash_undefined__`;function Oo(e){return this.__data__.set(e,Do),this}function ko(e){return this.__data__.has(e)}function Ao(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new Hi;++t<n;)this.add(e[t])}Ao.prototype.add=Ao.prototype.push=Oo,Ao.prototype.has=ko;function jo(e,t){return e.has(t)}function Mo(e){return mr(e)&&ui(e)}function No(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var Po=Math.min;function Fo(e,t,n){for(var r=n?No:ri,i=e[0].length,a=e.length,o=a,s=Array(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=_r(u,di(t))),c=Po(u.length,c),s[o]=!n&&(t||i>=120&&u.length>=120)?new Ao(o&&u):void 0}u=e[0];var d=-1,f=s[0];outer:for(;++d<i&&l.length<c;){var p=u[d],m=t?t(p):p;if(p=n||p!==0?p:0,!(f?jo(f,m):r(l,m,n))){for(o=a;--o;){var h=s[o];if(!(h?jo(h,m):r(e[o],m,n)))continue outer}f&&f.push(m),l.push(p)}}return l}function Io(e){return Mo(e)?e:[]}var Lo=si(function(e){var t=_r(e,Io);return t.length&&t[0]===e[0]?Fo(t):[]});let Ro={complex:[`tar.bz2`,`tar.gz`,`tar.xz`]},zo=e=>e.replace(/[^A-Za-z0-9\-_]/g,``),Bo=(e,t)=>!e||typeof e!=`string`?``:e.indexOf(`!`)>=0?e.split(`!`)[t]:``,Vo=e=>Bo(e,0),Ho=e=>Bo(e,1),Uo=e=>{let t=e.name.split(`.`);if(t.length>2)for(let e=0;e<t.length;e++){let n=t.slice(e,t.length).join(`.`);if(Ro.complex.includes(n))return n}return t.length<2?``:t[t.length-1]},Wo=e=>{if(!e)return e;let t={};return Object.keys(e).forEach(n=>{t[Eo(n)]=e[n]}),t};function Go(e,t=[]){let n=e.props[P.Name]?.toString()||(0,Gn.basename)(e.filename),r=e.props[P.FileId],i=e.type===`directory`,a;a=e.filename.startsWith(`/files`)||e.filename.startsWith(`/space`)?e.filename.split(`/`).slice(3).join(`/`):e.filename,a.startsWith(`/`)||(a=`/${a}`);let o=Uo({...e,id:r,name:n,path:a}),s=e.props[P.LockDiscovery],c,l,u;s&&(c=s[P.ActiveLock],l=c[P.LockOwner],u=c[P.LockTime]);let d=[];e.props[P.ShareTypes]&&(d=e.props[P.ShareTypes][`share-type`],Array.isArray(d)||(d=[d]));let f={};for(let n of t||[]){let t=n.split(`:`).pop();e.props[t]&&(f[n]=e.props[t])}let p={id:r,fileId:r,storageId:Vo(r),parentFolderId:e.props[P.FileParent],mimeType:e.props[P.MimeType],name:n,extension:o,path:a,webDavPath:e.filename,type:i?`folder`:e.type,isFolder:i,locked:!!c,lockOwner:l,lockTime:u,processing:e.processing||!1,mdate:e.props[P.LastModifiedDate],size:i?e.props[P.ContentSize]?.toString()||`0`:e.props[P.ContentLength]?.toString()||`0`,permissions:e.props[P.Permissions]||``,starred:e.props[P.IsFavorite]===1,etag:e.props[P.ETag],shareTypes:d,privateLink:e.props[P.PrivateLink],downloadURL:e.props[P.DownloadURL],remoteItemId:e.props[P.RemoteItemId],remoteItemPath:e.props[P.ShareRoot],owner:{id:e.props[P.OwnerId],displayName:e.props[P.OwnerDisplayName]},tags:(e.props[P.Tags]||``).toString().split(`,`).filter(Boolean),audio:Wo(e.props[P.Audio]),location:Wo(e.props[P.Location]),image:Wo(e.props[P.Image]),photo:Wo(e.props[P.Photo]),extraProps:f,hasPreview:()=>e.props[P.HasPreview]===1,canUpload:function(){return this.permissions.indexOf(Kn.FolderCreateable)>=0},canDownload:function(){return this.permissions.indexOf(Kn.SecureView)===-1},canBeDeleted:function(){return this.permissions.indexOf(Kn.Deletable)>=0},canRename:function(){return this.permissions.indexOf(Kn.Renameable)>=0},canShare:function({ability:e}){return e.can(`create-all`,`Share`)&&this.permissions.indexOf(Kn.Shareable)>=0},canCreate:function(){return this.permissions.indexOf(Kn.FolderCreateable)>=0},canEditTags:function(){return this.permissions.indexOf(Kn.Updateable)>=0||this.permissions.indexOf(Kn.FileUpdateable)>=0||this.permissions.indexOf(Kn.FolderCreateable)>=0},isMounted:function(){return this.permissions.indexOf(Kn.Mounted)>=0},isReceivedShare:function(){return this.permissions.indexOf(Kn.Shared)>=0},isShareRoot(){return e.props[P.ShareRoot]?e.filename.split(`/`).length===3:!1},getDomSelector:()=>zo(r)};return Object.defineProperty(p,`nodeId`,{get(){return Ho(this.id)}}),p}function Ko(e){let t=e.type===`directory`,n=e.props[P.TrashbinOriginalFilename]?.toString(),r=Uo({name:n,type:e.type}),i=Gn.default.basename(e.filename);return{type:t?`folder`:e.type,isFolder:t,ddate:e.props[P.TrashbinDeletedDate],name:Gn.default.basename(n),extension:r,path:M(e.props[P.TrashbinOriginalLocation],{leadingSlash:!0}),id:i,parentFolderId:e.props[P.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:()=>zo(i)}}let F=function(e){return e.createUpload=`libre.graph/driveItem/upload/create`,e.createPermissions=`libre.graph/driveItem/permissions/create`,e.createChildren=`libre.graph/driveItem/children/create`,e.readBasic=`libre.graph/driveItem/basic/read`,e.readPath=`libre.graph/driveItem/path/read`,e.readQuota=`libre.graph/driveItem/quota/read`,e.readContent=`libre.graph/driveItem/content/read`,e.readChildren=`libre.graph/driveItem/children/read`,e.readDeleted=`libre.graph/driveItem/deleted/read`,e.readPermissions=`libre.graph/driveItem/permissions/read`,e.readVersions=`libre.graph/driveItem/versions/read`,e.updatePath=`libre.graph/driveItem/path/update`,e.updateDeleted=`libre.graph/driveItem/deleted/update`,e.updatePermissions=`libre.graph/driveItem/permissions/update`,e.updateVersions=`libre.graph/driveItem/versions/update`,e.deleteStandard=`libre.graph/driveItem/standard/delete`,e.deleteDeleted=`libre.graph/driveItem/deleted/delete`,e.deletePermissions=`libre.graph/driveItem/permissions/delete`,e}({}),qo=e=>e;var Jo=class{_key;_value;_label;_icon;constructor(e,t,n,r){this._key=e,this._value=t,this._label=n,this._icon=r}get key(){return this._key}get value(){return this._value}get label(){return this._label}get icon(){return this._icon}};(class{static user=new Jo(`user`,0,qo(`User`),`user`);static group=new Jo(`group`,1,qo(`Group`),`group`);static link=new Jo(`link`,3,qo(`Link`),`link`);static guest=new Jo(`guest`,4,qo(`Guest`),`global`);static remote=new Jo(`remote`,6,qo(`External`),`earth`);static individuals=[this.user,this.guest,this.remote];static collectives=[this.group];static unauthenticated=[this.link];static authenticated=[this.user,this.group,this.guest,this.remote];static all=[this.user,this.group,this.link,this.guest,this.remote];static isIndividual(e){return this.individuals.includes(e)}static isCollective(e){return this.collectives.includes(e)}static isUnauthenticated(e){return this.unauthenticated.includes(e)}static isAuthenticated(e){return this.authenticated.includes(e)}static getByValue(e){return this.all.find(t=>t.value===e)}static getByValues(e){return e.map(e=>this.getByValue(e))}static getByKeys(e){return e.map(e=>this.all.find(t=>t.key===e))}static getValues(e){return e.map(e=>e.value)}static containsAnyValue(e,t){return Lo(this.getValues(e),t).length>0}});let Yo=e=>e?.driveType===`personal`,Xo=e=>e?.driveType===`public`;function Zo(e,t){return M(`spaces`,e,t,{leadingSlash:!0})}function Qo(e,t=``){return M(`spaces`,`trash-bin`,e,t,{leadingSlash:!0})}function $o(e){let t=e.publicLinkPassword,n=e.props?.[P.FileId],r=e.props?.[P.PublicLinkItemType],i=e.props?.[P.PublicLinkPermission],a=e.props?.[P.PublicLinkExpiration],o=e.props?.[P.PublicLinkShareDate],s=e.props?.[P.PublicLinkShareOwner],c=e.publicLinkType,l,u;return c===`ocm`?(l=`ocm/${e.id}`,u=Wn(e.id)):(l=`public/${e.id}`,u=Un(e.id)),Object.assign(es({...e,driveType:`public`,driveAlias:l,webDavPath:u}),{...n&&{fileId:n},...t&&{publicLinkPassword:t},...r&&{publicLinkItemType:r},...i&&{publicLinkPermission:parseInt(i)},...a&&{publicLinkExpiration:a},...o&&{publicLinkShareDate:o},...s&&{publicLinkShareOwner:s},publicLinkType:c})}function es(e){let t,n;e.special&&(t=e.special.find(e=>e.specialFolder.name===`image`),n=e.special.find(e=>e.specialFolder.name===`readme`),t&&(t.webDavUrl=decodeURI(t.webDavUrl)),n&&(n.webDavUrl=decodeURI(n.webDavUrl)));let r=e.root?.deleted?.state===`trashed`,i=M(e.webDavPath||Zo(e.id),{leadingSlash:!0}),a=M(e.serverUrl,`remote.php/dav`,i),o=M(e.webDavTrashPath||Qo(e.id),{leadingSlash:!0}),s=M(e.serverUrl,`remote.php/dav`,o),c={id:e.id,fileId:e.id,storageId:e.id,mimeType:``,name:e.name,description:e.description,extension:``,path:`/`,webDavPath:i,webDavTrashPath:o,driveAlias:e.driveAlias,driveType:e.driveType,type:`space`,isFolder:!0,mdate:e.lastModifiedDateTime,size:e.quota?.used||0,tags:[],permissions:``,starred:!1,etag:``,shareTypes:[],privateLink:e.webUrl,downloadURL:``,owner:e.owner?.user,disabled:r,root:e.root,spaceQuota:e.quota,spaceImageData:t,spaceReadmeData:n,hasTrashedItems:e[`@libre.graph.hasTrashedItems`]||!1,graphPermissions:void 0,canUpload:function({user:e}={}){return Yo(this)&&this.isOwner(e)?!0:this.graphPermissions?.includes(F.createUpload)},canDownload:function(){return!0},canBeDeleted:function({ability:e}={}){return this.disabled?e?.can(`delete-all`,`Drive`)?!0:this.graphPermissions?.includes(F.deletePermissions):!1},canRename:function({ability:e}={}){return e?.can(`update-all`,`Drive`)?!0:this.graphPermissions?.includes(F.deletePermissions)},canEditDescription:function({ability:e}={}){return e?.can(`update-all`,`Drive`)?!0:this.graphPermissions?.includes(F.deletePermissions)},canRestore:function({ability:e}={}){return this.disabled?e?.can(`update-all`,`Drive`)?!0:this.graphPermissions?.includes(F.deletePermissions):!1},canDisable:function({ability:e}={}){return this.disabled?!1:e?.can(`delete-all`,`Drive`)?!0:this.graphPermissions?.includes(F.deletePermissions)},canShare:function(){return this.graphPermissions?.includes(F.createPermissions)},canEditImage:function(){return this.disabled?!1:this.graphPermissions?.includes(F.deletePermissions)},canEditReadme:function(){return this.disabled?!1:this.graphPermissions?.includes(F.deletePermissions)},canRestoreFromTrashbin:function(){return this.graphPermissions?.includes(F.updateDeleted)},canDeleteFromTrashBin:function({user:e}={}){return Yo(this)&&this.isOwner(e)?!0:this.graphPermissions?.includes(F.deletePermissions)},canListVersions:function({user:e}={}){return Yo(this)&&this.isOwner(e)?!0:this.graphPermissions?.includes(F.readVersions)},canCreate:function(){return!0},canEditTags:function(){return!1},isMounted:function(){return!0},isReceivedShare:function(){return!1},isShareRoot:function(){return[`share`,`mountpoint`,`public`].includes(e.driveType)},getDomSelector:()=>zo(e.id),getDriveAliasAndItem({path:e}){return M(this.driveAlias,e,{leadingSlash:!1})},getWebDavUrl({path:e}){return M(a,e)},getWebDavTrashUrl({path:e}){return M(s,e)},isOwner(e){return e?.id===this.owner?.id}};return Object.defineProperty(c,`nodeId`,{get(){return Ho(this.id)}}),c}let ts=(e,t)=>{let n=new URL(e);n.pathname=[...n.pathname.split(`/`),`cloud`,`capabilities`].filter(Boolean).join(`/`),n.searchParams.append(`format`,`json`);let r=n.href;return{async getCapabilities(){return ta(await t.get(r),`data.ocs.data`,{capabilities:null,version:null})}}};
|
|
7
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
8
|
+
function ns(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function rs(e,t=``){if(!Number.isSafeInteger(e)||e<0){let n=t&&`"${t}" `;throw Error(`${n}expected integer >= 0, got ${e}`)}}function is(e,t,n=``){let r=ns(e),i=e?.length,a=t!==void 0;if(!r||a&&i!==t){let o=n&&`"${n}" `,s=a?` of length ${t}`:``,c=r?`length=${i}`:`type=${typeof e}`;throw Error(o+`expected Uint8Array`+s+`, got `+c)}return e}function as(e){if(typeof e!=`function`||typeof e.create!=`function`)throw Error(`Hash must wrapped by utils.createHasher`);rs(e.outputLen),rs(e.blockLen)}function os(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function ss(e,t){is(e,void 0,`digestInto() output`);let n=t.outputLen;if(e.length<n)throw Error(`"digestInto() output" expected to be of length >=`+n)}function cs(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function ls(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}new Uint8Array(new Uint32Array([287454020]).buffer)[0],typeof Uint8Array.from([]).toHex==`function`&&Uint8Array.fromHex;function us(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function ds(e,t=``){return typeof e==`string`?us(e):is(e,void 0,t)}function fs(e,t){if(t!==void 0&&{}.toString.call(t)!==`[object Object]`)throw Error(`options must be object or undefined`);return Object.assign(e,t)}function ps(e,t={}){let n=(t,n)=>e(n).update(t).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.create=t=>e(t),Object.assign(n,t),Object.freeze(n)}let ms=e=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,e])});var hs=class{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(e,t){if(as(e),is(t,void 0,`key`),this.iHash=e.create(),typeof this.iHash.update!=`function`)throw Error(`Expected instance of class which extends utils.Hash`);this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let n=this.blockLen,r=new Uint8Array(n);r.set(t.length>n?e.create().update(t).digest():t);for(let e=0;e<r.length;e++)r[e]^=54;this.iHash.update(r),this.oHash=e.create();for(let e=0;e<r.length;e++)r[e]^=106;this.oHash.update(r),cs(r)}update(e){return os(this),this.iHash.update(e),this}digestInto(e){os(this),is(e,this.outputLen,`output`),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||=Object.create(Object.getPrototypeOf(this),{});let{oHash:t,iHash:n,finished:r,destroyed:i,blockLen:a,outputLen:o}=this;return e=e,e.finished=r,e.destroyed=i,e.blockLen=a,e.outputLen=o,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}};let gs=(e,t,n)=>new hs(e,t).update(n).digest();gs.create=(e,t)=>new hs(e,t);function _s(e,t,n,r){as(e);let{c:i,dkLen:a,asyncTick:o}=fs({dkLen:32,asyncTick:10},r);if(rs(i,`c`),rs(a,`dkLen`),rs(o,`asyncTick`),i<1)throw Error(`iterations (c) must be >= 1`);let s=ds(t,`password`),c=ds(n,`salt`),l=new Uint8Array(a),u=gs.create(e,s);return{c:i,dkLen:a,asyncTick:o,DK:l,PRF:u,PRFSalt:u._cloneInto().update(c)}}function vs(e,t,n,r,i){return e.destroy(),t.destroy(),r&&r.destroy(),cs(i),n}function ys(e,t,n,r){let{c:i,dkLen:a,DK:o,PRF:s,PRFSalt:c}=_s(e,t,n,r),l,u=new Uint8Array(4),d=ls(u),f=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){let n=o.subarray(t,t+s.outputLen);d.setInt32(0,e,!1),(l=c._cloneInto(l)).update(u).digestInto(f),n.set(f.subarray(0,n.length));for(let e=1;e<i;e++){s._cloneInto(l).update(f).digestInto(f);for(let e=0;e<n.length;e++)n[e]^=f[e]}}return vs(s,c,o,l,f)}var bs=class{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(e,t,n,r){this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=ls(this.buffer)}update(e){os(this),is(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=ls(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){os(this),ss(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,cs(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;n.setBigUint64(r-8,BigInt(this.length*8),i),this.process(n,0);let o=ls(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen must be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}};let I=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),xs=BigInt(2**32-1),Ss=BigInt(32);function Cs(e,t=!1){return t?{h:Number(e&xs),l:Number(e>>Ss&xs)}:{h:Number(e>>Ss&xs)|0,l:Number(e&xs)|0}}function ws(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=Cs(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}let Ts=(e,t,n)=>e>>>n,Es=(e,t,n)=>e<<32-n|t>>>n,Ds=(e,t,n)=>e>>>n|t<<32-n,Os=(e,t,n)=>e<<32-n|t>>>n,ks=(e,t,n)=>e<<64-n|t>>>n-32,As=(e,t,n)=>e>>>n-32|t<<64-n;function js(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}let Ms=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Ns=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Ps=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Fs=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,Is=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),Ls=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,Rs=ws(`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`.split(`.`).map(e=>BigInt(e))),zs=Rs[0],Bs=Rs[1],Vs=new Uint32Array(80),Hs=new Uint32Array(80);var Us=class extends bs{constructor(e){super(128,e,16,!1)}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)Vs[n]=e.getUint32(t),Hs[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=Vs[e-15]|0,n=Hs[e-15]|0,r=Ds(t,n,1)^Ds(t,n,8)^Ts(t,n,7),i=Os(t,n,1)^Os(t,n,8)^Es(t,n,7),a=Vs[e-2]|0,o=Hs[e-2]|0,s=Ds(a,o,19)^ks(a,o,61)^Ts(a,o,6),c=Ps(i,Os(a,o,19)^As(a,o,61)^Es(a,o,6),Hs[e-7],Hs[e-16]);Vs[e]=Fs(c,r,s,Vs[e-7],Vs[e-16])|0,Hs[e]=c|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=Ds(u,d,14)^Ds(u,d,18)^ks(u,d,41),v=Os(u,d,14)^Os(u,d,18)^As(u,d,41),y=u&f^~u&m,b=d&p^~d&h,x=Is(_,v,b,Bs[e],Hs[e]),S=Ls(x,g,t,y,zs[e],Vs[e]),C=x|0,w=Ds(n,r,28)^ks(n,r,34)^ks(n,r,39),ee=Os(n,r,28)^As(n,r,34)^As(n,r,39),te=n&i^n&o^i&o,ne=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=js(c|0,l|0,S|0,C|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let re=Ms(C,ee,ne);n=Ns(re,S,w,te),r=re|0}({h:n,l:r}=js(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=js(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=js(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=js(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=js(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=js(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=js(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=js(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){cs(Vs,Hs)}destroy(){cs(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},Ws=class extends Us{Ah=I[0]|0;Al=I[1]|0;Bh=I[2]|0;Bl=I[3]|0;Ch=I[4]|0;Cl=I[5]|0;Dh=I[6]|0;Dl=I[7]|0;Eh=I[8]|0;El=I[9]|0;Fh=I[10]|0;Fl=I[11]|0;Gh=I[12]|0;Gl=I[13]|0;Hh=I[14]|0;Hl=I[15]|0;constructor(){super(64)}};let Gs=ps(()=>new Ws,ms(3)),Ks=(e,t,n,r)=>Buffer.from(ys(Gs,e,t,{c:n,dkLen:r})),qs=`: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`;qs+``,``+qs;let Js=RegExp(`^[: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][: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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function Ys(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e<a;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n}let Xs=function(e){return Js.exec(e)!=null};function Zs(e){return e!==void 0}let Qs=[`hasOwnProperty`,`toString`,`valueOf`,`__defineGetter__`,`__defineSetter__`,`__lookupGetter__`,`__lookupSetter__`],$s=[`__proto__`,`constructor`,`prototype`],ec={allowBooleanAttributes:!1,unpairedTags:[]};function tc(e,t){t=Object.assign({},ec,t);let n=[],r=!1,i=!1;e[0]===``&&(e=e.substr(1));for(let a=0;a<e.length;a++)if(e[a]===`<`&&e[a+1]===`?`){if(a+=2,a=rc(e,a),a.err)return a}else if(e[a]===`<`){let o=a;if(a++,e[a]===`!`){a=ic(e,a);continue}else{let s=!1;e[a]===`/`&&(s=!0,a++);let c=``;for(;a<e.length&&e[a]!==`>`&&e[a]!==` `&&e[a]!==` `&&e[a]!==`
|
|
9
|
+
`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!dc(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,L(`InvalidTag`,t,R(e,a))}let l=ac(e,a);if(l===!1)return L(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,R(e,a));let u=l.value;if(a=l.index,u[u.length-1]===`/`){let n=a-u.length;u=u.substring(0,u.length-1);let i=sc(u,t);if(i===!0)r=!0;else return L(i.err.code,i.err.msg,R(e,n+i.err.line))}else if(s){if(!l.tagClosed)return L(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,R(e,a));if(u.trim().length>0)return L(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,R(e,o));if(n.length===0)return L(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,R(e,o));{let t=n.pop();if(c!==t.tagName){let n=R(e,t.tagStartPos);return L(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,R(e,o))}n.length==0&&(i=!0)}}else{let s=sc(u,t);if(s!==!0)return L(s.err.code,s.err.msg,R(e,a-u.length+s.err.line));if(i===!0)return L(`InvalidXml`,`Multiple possible root nodes found.`,R(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a<e.length;a++)if(e[a]===`<`)if(e[a+1]===`!`){a++,a=ic(e,a);continue}else if(e[a+1]===`?`){if(a=rc(e,++a),a.err)return a}else break;else if(e[a]===`&`){let t=lc(e,a);if(t==-1)return L(`InvalidChar`,`char '&' is not expected.`,R(e,a));a=t}else if(i===!0&&!nc(e[a]))return L(`InvalidXml`,`Extra text at the end`,R(e,a));e[a]===`<`&&a--}}else{if(nc(e[a]))continue;return L(`InvalidChar`,`char '`+e[a]+`' is not expected.`,R(e,a))}return r?n.length==1?L(`InvalidTag`,`Unclosed tag '`+n[0].tagName+`'.`,R(e,n[0].tagStartPos)):n.length>0?L(`InvalidXml`,`Invalid '`+JSON.stringify(n.map(e=>e.tagName),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):!0:L(`InvalidXml`,`Start tag expected.`,1)}function nc(e){return e===` `||e===` `||e===`
|
|
10
|
+
`||e===`\r`}function rc(e,t){let n=t;for(;t<e.length;t++)if(e[t]==`?`||e[t]==` `){let r=e.substr(n,t-n);if(t>5&&r===`xml`)return L(`InvalidXml`,`XML declaration allowed only at the start of the document.`,R(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}else continue}return t}function ic(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t<e.length;t++)if(e[t]===`-`&&e[t+1]===`-`&&e[t+2]===`>`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t<e.length;t++)if(e[t]===`<`)n++;else if(e[t]===`>`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t<e.length;t++)if(e[t]===`]`&&e[t+1]===`]`&&e[t+2]===`>`){t+=2;break}}return t}function ac(e,t){let n=``,r=``,i=!1;for(;t<e.length;t++){if(e[t]===`"`||e[t]===`'`)r===``?r=e[t]:r!==e[t]||(r=``);else if(e[t]===`>`&&r===``){i=!0;break}n+=e[t]}return r===``?{value:n,index:t,tagClosed:i}:!1}let oc=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function sc(e,t){let n=Ys(e,oc),r={};for(let e=0;e<n.length;e++){if(n[e][1].length===0)return L(`InvalidAttr`,`Attribute '`+n[e][2]+`' has no space in starting.`,fc(n[e]));if(n[e][3]!==void 0&&n[e][4]===void 0)return L(`InvalidAttr`,`Attribute '`+n[e][2]+`' is without value.`,fc(n[e]));if(n[e][3]===void 0&&!t.allowBooleanAttributes)return L(`InvalidAttr`,`boolean attribute '`+n[e][2]+`' is not allowed.`,fc(n[e]));let i=n[e][2];if(!uc(i))return L(`InvalidAttr`,`Attribute '`+i+`' is an invalid name.`,fc(n[e]));if(!Object.prototype.hasOwnProperty.call(r,i))r[i]=1;else return L(`InvalidAttr`,`Attribute '`+i+`' is repeated.`,fc(n[e]))}return!0}function cc(e,t){let n=/\d/;for(e[t]===`x`&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(e[t]===`;`)return t;if(!e[t].match(n))break}return-1}function lc(e,t){if(t++,e[t]===`;`)return-1;if(e[t]===`#`)return t++,cc(e,t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===`;`)break;return-1}return t}function L(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function uc(e){return Xs(e)}function dc(e){return Xs(e)}function R(e,t){let n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function fc(e){return e.startIndex+e[1].length}let pc=e=>Qs.includes(e)?`__`+e:e,mc={preserveOrder:!1,attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:pc};function hc(e,t){if(typeof e!=`string`)return;let n=e.toLowerCase();if(Qs.some(e=>n===e.toLowerCase())||$s.some(e=>n===e.toLowerCase()))throw Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function gc(e){return typeof e==`boolean`?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:typeof e==`object`&&e?{enabled:e.enabled!==!1,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??10),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1e3),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??100),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:gc(!0)}let _c=function(e){let t=Object.assign({},mc,e),n=[{value:t.attributeNamePrefix,name:`attributeNamePrefix`},{value:t.attributesGroupName,name:`attributesGroupName`},{value:t.textNodeName,name:`textNodeName`},{value:t.cdataPropName,name:`cdataPropName`},{value:t.commentPropName,name:`commentPropName`}];for(let{value:e,name:t}of n)e&&hc(e,t);return t.onDangerousProperty===null&&(t.onDangerousProperty=pc),t.processEntities=gc(t.processEntities),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),t},vc;vc=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var yc=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]=Object.create(null)}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][vc]={startIndex:t})}static getMetaDataSymbol(){return vc}},bc=class{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){let n=Object.create(null),r=0;if(e[t+3]===`O`&&e[t+4]===`C`&&e[t+5]===`T`&&e[t+6]===`Y`&&e[t+7]===`P`&&e[t+8]===`E`){t+=9;let i=1,a=!1,o=!1,s=``;for(;t<e.length;t++)if(e[t]===`<`&&!o){if(a&&xc(e,`!ENTITY`,t)){t+=7;let i,a;if([i,a,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),a.indexOf(`&`)===-1){if(this.options.enabled!==!1&&this.options.maxEntityCount!=null&&r>=this.options.maxEntityCount)throw Error(`Entity count (${r+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);let e=i.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);n[i]={regx:RegExp(`&${e};`,`g`),val:a},r++}}else if(a&&xc(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(a&&xc(e,`!ATTLIST`,t))t+=8;else if(a&&xc(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else if(xc(e,`!--`,t))o=!0;else throw Error(`Invalid DOCTYPE`);i++,s=``}else if(e[t]===`>`){if(o?e[t-1]===`-`&&e[t-2]===`-`&&(o=!1,i--):i--,i===0)break}else e[t]===`[`?a=!0:s+=e[t];if(i!==0)throw Error(`Unclosed DOCTYPE`)}else throw Error(`Invalid Tag instead of DOCTYPE`);return{entities:n,i:t}}readEntityExp(e,t){t=z(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!==`"`&&e[t]!==`'`;)t++;let r=e.substring(n,t);if(Sc(r),t=z(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()===`SYSTEM`)throw Error(`External entities are not supported`);if(e[t]===`%`)throw Error(`Parameter entities are not supported`)}let i=``;if([t,i]=this.readIdentifierVal(e,t,`entity`),this.options.enabled!==!1&&this.options.maxEntitySize!=null&&i.length>this.options.maxEntitySize)throw Error(`Entity "${r}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return t--,[r,i,t]}readNotationExp(e,t){t=z(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);!this.suppressValidationErr&&Sc(r),t=z(e,t);let i=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&i!==`SYSTEM`&&i!==`PUBLIC`)throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);t+=i.length,t=z(e,t);let a=null,o=null;if(i===`PUBLIC`)[t,a]=this.readIdentifierVal(e,t,`publicIdentifier`),t=z(e,t),(e[t]===`"`||e[t]===`'`)&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`));else if(i===`SYSTEM`&&([t,o]=this.readIdentifierVal(e,t,`systemIdentifier`),!this.suppressValidationErr&&!o))throw Error(`Missing mandatory system identifier for SYSTEM notation`);return{notationName:r,publicIdentifier:a,systemIdentifier:o,index:--t}}readIdentifierVal(e,t,n){let r=``,i=e[t];if(i!==`"`&&i!==`'`)throw Error(`Expected quoted string, found "${i}"`);t++;let a=t;for(;t<e.length&&e[t]!==i;)t++;if(r=e.substring(a,t),e[t]!==i)throw Error(`Unterminated ${n} value`);return t++,[t,r]}readElementExp(e,t){t=z(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);if(!this.suppressValidationErr&&!Xs(r))throw Error(`Invalid element name: "${r}"`);t=z(e,t);let i=``;if(e[t]===`E`&&xc(e,`MPTY`,t))t+=4;else if(e[t]===`A`&&xc(e,`NY`,t))t+=2;else if(e[t]===`(`){t++;let n=t;for(;t<e.length&&e[t]!==`)`;)t++;if(i=e.substring(n,t),e[t]!==`)`)throw Error(`Unterminated content model`)}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:r,contentModel:i.trim(),index:t}}readAttlistExp(e,t){t=z(e,t);let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;let r=e.substring(n,t);for(Sc(r),t=z(e,t),n=t;t<e.length&&!/\s/.test(e[t]);)t++;let i=e.substring(n,t);if(!Sc(i))throw Error(`Invalid attribute name: "${i}"`);t=z(e,t);let a=``;if(e.substring(t,t+8).toUpperCase()===`NOTATION`){if(a=`NOTATION`,t+=8,t=z(e,t),e[t]!==`(`)throw Error(`Expected '(', found "${e[t]}"`);t++;let n=[];for(;t<e.length&&e[t]!==`)`;){let r=t;for(;t<e.length&&e[t]!==`|`&&e[t]!==`)`;)t++;let i=e.substring(r,t);if(i=i.trim(),!Sc(i))throw Error(`Invalid notation name: "${i}"`);n.push(i),e[t]===`|`&&(t++,t=z(e,t))}if(e[t]!==`)`)throw Error(`Unterminated list of notations`);t++,a+=` (`+n.join(`|`)+`)`}else{let n=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;if(a+=e.substring(n,t),!this.suppressValidationErr&&![`CDATA`,`ID`,`IDREF`,`IDREFS`,`ENTITY`,`ENTITIES`,`NMTOKEN`,`NMTOKENS`].includes(a.toUpperCase()))throw Error(`Invalid attribute type: "${a}"`)}t=z(e,t);let o=``;return e.substring(t,t+8).toUpperCase()===`#REQUIRED`?(o=`#REQUIRED`,t+=8):e.substring(t,t+7).toUpperCase()===`#IMPLIED`?(o=`#IMPLIED`,t+=7):[t,o]=this.readIdentifierVal(e,t,`ATTLIST`),{elementName:r,attributeName:i,attributeType:a,defaultValue:o,index:t}}};let z=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function xc(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function Sc(e){if(Xs(e))return e;throw Error(`Invalid entity name ${e}`)}let Cc=/^[-+]?0x[a-fA-F0-9]+$/,wc=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Tc={hex:!0,leadingZeros:!0,decimalPoint:`.`,eNotation:!0,infinity:`original`};function Ec(e,t={}){if(t=Object.assign({},Tc,t),!e||typeof e!=`string`)return e;let n=e.trim();if(n.length===0||t.skipLike!==void 0&&t.skipLike.test(n))return e;if(n===`0`)return 0;if(t.hex&&Cc.test(n))return Ac(n,16);if(!isFinite(n))return jc(e,Number(n),t);if(n.includes(`e`)||n.includes(`E`))return Oc(e,n,t);{let r=wc.exec(n);if(r){let i=r[1]||``,a=r[2],o=kc(r[3]),s=i?e[a.length+1]===`.`:e[a.length]===`.`;if(!t.leadingZeros&&(a.length>1||a.length===1&&!s))return e;{let r=Number(n),s=String(r);if(r===0)return r;if(s.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return s===`0`||s===o||s===`${i}${o}`?r:e;let c=a?o:n;return a?c===s||i+c===s?r:e:c===s||c===i+s?r:e}}else return e}}let Dc=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Oc(e,t,n){if(!n.eNotation)return e;let r=t.match(Dc);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length===1&&(r[3].startsWith(`.${a}`)||r[3][0]===a)?Number(t):o.length>0?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}else return e}function kc(e){return e&&e.indexOf(`.`)!==-1?(e=e.replace(/0+$/,``),e===`.`?e=`0`:e[0]===`.`?e=`0`+e:e[e.length-1]===`.`&&(e=e.substring(0,e.length-1)),e):e}function Ac(e,t){if(parseInt)return parseInt(e,t);if(Number.parseInt)return Number.parseInt(e,t);if(window&&window.parseInt)return window.parseInt(e,t);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}function jc(e,t,n){let r=t===1/0;switch(n.infinity.toLowerCase()){case`null`:return null;case`infinity`:return t;case`string`:return r?`Infinity`:`-Infinity`;default:return e}}function Mc(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var Nc=class{constructor(e,t={}){this.pattern=e,this.separator=t.separator||`.`,this.segments=this._parse(e),this._hasDeepWildcard=this.segments.some(e=>e.type===`deep-wildcard`),this._hasAttributeCondition=this.segments.some(e=>e.attrName!==void 0),this._hasPositionSelector=this.segments.some(e=>e.position!==void 0)}_parse(e){let t=[],n=0,r=``;for(;n<e.length;)e[n]===this.separator?n+1<e.length&&e[n+1]===this.separator?(r.trim()&&(t.push(this._parseSegment(r.trim())),r=``),t.push({type:`deep-wildcard`}),n+=2):(r.trim()&&t.push(this._parseSegment(r.trim())),r=``,n++):(r+=e[n],n++);return r.trim()&&t.push(this._parseSegment(r.trim())),t}_parseSegment(e){let t={type:`tag`},n=null,r=e,i=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(i&&(r=i[1]+i[3],i[2])){let e=i[2].slice(1,-1);e&&(n=e)}let a,o=r;if(r.includes(`::`)){let t=r.indexOf(`::`);if(a=r.substring(0,t).trim(),o=r.substring(t+2).trim(),!a)throw Error(`Invalid namespace in pattern: ${e}`)}let s,c=null;if(o.includes(`:`)){let e=o.lastIndexOf(`:`),t=o.substring(0,e).trim(),n=o.substring(e+1).trim();[`first`,`last`,`odd`,`even`].includes(n)||/^nth\(\d+\)$/.test(n)?(s=t,c=n):s=o}else s=o;if(!s)throw Error(`Invalid segment pattern: ${e}`);if(t.tag=s,a&&(t.namespace=a),n)if(n.includes(`=`)){let e=n.indexOf(`=`);t.attrName=n.substring(0,e).trim(),t.attrValue=n.substring(e+1).trim()}else t.attrName=n.trim();if(c){let e=c.match(/^nth\((\d+)\)$/);e?(t.position=`nth`,t.positionValue=parseInt(e[1],10)):t.position=c}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}};let Pc=new Set([`push`,`pop`,`reset`,`updateCurrent`,`restore`]);var Fc=class{constructor(e={}){this.separator=e.separator||`.`,this.path=[],this.siblingStacks=[]}push(e,t=null,n=null){if(this.path.length>0){let e=this.path[this.path.length-1];e.values=void 0}let r=this.path.length;this.siblingStacks[r]||(this.siblingStacks[r]=new Map);let i=this.siblingStacks[r],a=n?`${n}:${e}`:e,o=i.get(a)||0,s=0;for(let e of i.values())s+=e;i.set(a,o+1);let c={tag:e,position:s,counter:o};n!=null&&(c.namespace=n),t!=null&&(c.values=t),this.path.push(c)}pop(){if(this.path.length===0)return;let e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){let t=this.path[this.path.length-1];e!=null&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(this.path.length!==0)return this.path[this.path.length-1].values?.[e]}hasAttr(e){if(this.path.length===0)return!1;let t=this.path[this.path.length-1];return t.values!==void 0&&e in t.values}getPosition(){return this.path.length===0?-1:this.path[this.path.length-1].position??0}getCounter(){return this.path.length===0?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){let n=e||this.separator;return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(n)}toArray(){return this.path.map(e=>e.tag)}reset(){this.path=[],this.siblingStacks=[]}matches(e){let t=e.segments;return t.length===0?!1:e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t)}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++){let n=e[t],r=this.path[t],i=t===this.path.length-1;if(!this._matchSegment(n,r,i))return!1}return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,n=e.length-1;for(;n>=0&&t>=0;){let r=e[n];if(r.type===`deep-wildcard`){if(n--,n<0)return!0;let r=e[n],i=!1;for(let e=t;e>=0;e--){let a=e===this.path.length-1;if(this._matchSegment(r,this.path[e],a)){t=e-1,n--,i=!0;break}}if(!i)return!1}else{let e=t===this.path.length-1;if(!this._matchSegment(r,this.path[t],e))return!1;t--,n--}}return n<0}_matchSegment(e,t,n){if(e.tag!==`*`&&e.tag!==t.tag||e.namespace!==void 0&&e.namespace!==`*`&&e.namespace!==t.namespace)return!1;if(e.attrName!==void 0){if(!n||!t.values||!(e.attrName in t.values))return!1;if(e.attrValue!==void 0){let n=t.values[e.attrName];if(String(n)!==String(e.attrValue))return!1}}if(e.position!==void 0){if(!n)return!1;let r=t.counter??0;if(e.position===`first`&&r!==0||e.position===`odd`&&r%2!=1||e.position===`even`&&r%2!=0||e.position===`nth`&&r!==e.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return new Proxy(this,{get(e,t,n){if(Pc.has(t))return()=>{throw TypeError(`Cannot call '${t}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};let r=Reflect.get(e,t,n);return t===`path`||t===`siblingStacks`?Object.freeze(Array.isArray(r)?r.map(e=>e instanceof Map?Object.freeze(new Map(e)):Object.freeze({...e})):r):typeof r==`function`?r.bind(e):r},set(e,t){throw TypeError(`Cannot set property '${String(t)}' on a read-only Matcher.`)},deleteProperty(e,t){throw TypeError(`Cannot delete property '${String(t)}' from a read-only Matcher.`)}})}};function Ic(e,t){if(!e)return{};let n=t.attributesGroupName?e[t.attributesGroupName]:e;if(!n)return{};let r={};for(let e in n)if(e.startsWith(t.attributeNamePrefix)){let i=e.substring(t.attributeNamePrefix.length);r[i]=n[e]}else r[e]=n[e];return r}function Lc(e){if(!e||typeof e!=`string`)return;let t=e.indexOf(`:`);if(t!==-1&&t>0){let n=e.substring(0,t);if(n!==`xmlns`)return n}}var Rc=class{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:(e,t)=>el(t,10,`&#`)},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>el(t,16,`&#x`)}},this.addExternalEntities=zc,this.parseXml=Wc,this.parseTextData=Bc,this.resolveNameSpace=Vc,this.buildAttributesMap=Uc,this.isItStopNode=Jc,this.replaceEntitiesValue=Kc,this.readStopNodeData=Qc,this.saveTextToParentTag=qc,this.addChild=Gc,this.ignoreAttributesFn=Mc(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new Fc,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let e=0;e<this.options.stopNodes.length;e++){let t=this.options.stopNodes[e];typeof t==`string`?this.stopNodeExpressions.push(new Nc(t)):t instanceof Nc&&this.stopNodeExpressions.push(t)}}}};function zc(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n],i=r.replace(/[.\-+*:]/g,`\\.`);this.lastEntities[r]={regex:RegExp(`&`+i+`;`,`g`),val:e[r]}}}function Bc(e,t,n,r,i,a,o){if(e!==void 0&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e,t,n));let r=this.options.jPath?n.toString():n,s=this.options.tagValueProcessor(t,e,r,i,a);return s==null?e:typeof s!=typeof e||s!==e?s:this.options.trimValues||e.trim()===e?$c(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Vc(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}let Hc=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function Uc(e,t,n){if(this.options.ignoreAttributes!==!0&&typeof e==`string`){let r=Ys(e,Hc),i=r.length,a={},o={};for(let e=0;e<i;e++){let t=this.resolveNameSpace(r[e][1]),i=r[e][4];if(t.length&&i!==void 0){let e=i;this.options.trimValues&&(e=e.trim()),e=this.replaceEntitiesValue(e,n,this.readonlyMatcher),o[t]=e}}Object.keys(o).length>0&&typeof t==`object`&&t.updateCurrent&&t.updateCurrent(o);for(let e=0;e<i;e++){let i=this.resolveNameSpace(r[e][1]),o=this.options.jPath?t.toString():this.readonlyMatcher;if(this.ignoreAttributesFn(i,o))continue;let s=r[e][4],c=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(c=this.options.transformAttributeName(c)),c=nl(c,this.options),s!==void 0){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s,n,this.readonlyMatcher);let e=this.options.jPath?t.toString():this.readonlyMatcher,r=this.options.attributeValueProcessor(i,s,e);r==null?a[c]=s:typeof r!=typeof s||r!==s?a[c]=r:a[c]=$c(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(a[c]=!0)}if(!Object.keys(a).length)return;if(this.options.attributesGroupName){let e={};return e[this.options.attributesGroupName]=a,e}return a}}let Wc=function(e){e=e.replace(/\r\n?/g,`
|
|
11
|
+
`);let t=new yc(`!xml`),n=t,r=``;this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;let i=new bc(this.options.processEntities);for(let a=0;a<e.length;a++)if(e[a]===`<`)if(e[a+1]===`/`){let t=Xc(e,`>`,a,`Closing Tag is not closed.`),i=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){let e=i.indexOf(`:`);e!==-1&&(i=i.substr(e+1))}i=tl(this.options.transformTagName,i,``,this.options).tagName,n&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher));let o=this.matcher.getCurrentTag();if(i&&this.options.unpairedTags.indexOf(i)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${i}>`);o&&this.options.unpairedTags.indexOf(o)!==-1&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,n=this.tagsNodeStack.pop(),r=``,a=t}else if(e[a+1]===`?`){let t=Zc(e,a,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);if(r=this.saveTextToParentTag(r,n,this.readonlyMatcher),!(this.options.ignoreDeclaration&&t.tagName===`?xml`||this.options.ignorePiTags)){let e=new yc(t.tagName);e.add(this.options.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[`:@`]=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName)),this.addChild(n,e,this.readonlyMatcher,a)}a=t.closeIndex+1}else if(e.substr(a+1,3)===`!--`){let t=Xc(e,`-->`,a+4,`Comment is not closed.`);if(this.options.commentPropName){let i=e.substring(a+4,t-2);r=this.saveTextToParentTag(r,n,this.readonlyMatcher),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=t}else if(e.substr(a+1,2)===`!D`){let t=i.readDocType(e,a);this.docTypeEntities=t.entities,a=t.i}else if(e.substr(a+1,2)===`![`){let t=Xc(e,`]]>`,a,`CDATA is not closed.`)-2,i=e.substring(a+9,t);r=this.saveTextToParentTag(r,n,this.readonlyMatcher);let o=this.parseTextData(i,n.tagname,this.readonlyMatcher,!0,!1,!0,!0);o??=``,this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]):n.add(this.options.textNodeName,o),a=t+2}else{let i=Zc(e,a,this.options.removeNSPrefix);if(!i){let t=e.substring(Math.max(0,a-50),Math.min(e.length,a+50));throw Error(`readTagExp returned undefined at position ${a}. Context: "${t}"`)}let o=i.tagName,s=i.rawTagName,c=i.tagExp,l=i.attrExpPresent,u=i.closeIndex;if({tagName:o,tagExp:c}=tl(this.options.transformTagName,o,c,this.options),this.options.strictReservedNames&&(o===this.options.commentPropName||o===this.options.cdataPropName||o===this.options.textNodeName||o===this.options.attributesGroupName))throw Error(`Invalid tag name: ${o}`);n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,this.readonlyMatcher,!1));let d=n;d&&this.options.unpairedTags.indexOf(d.tagname)!==-1&&(n=this.tagsNodeStack.pop(),this.matcher.pop());let f=!1;c.length>0&&c.lastIndexOf(`/`)===c.length-1&&(f=!0,o[o.length-1]===`/`?(o=o.substr(0,o.length-1),c=o):c=c.substr(0,c.length-1),l=o!==c);let p=null,m;m=Lc(s),o!==t.tagname&&this.matcher.push(o,{},m),o!==c&&l&&(p=this.buildAttributesMap(c,this.matcher,o),p&&Ic(p,this.options)),o!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));let h=a;if(this.isCurrentNodeStopNode){let t=``;if(f)a=i.closeIndex;else if(this.options.unpairedTags.indexOf(o)!==-1)a=i.closeIndex;else{let n=this.readStopNodeData(e,s,u+1);if(!n)throw Error(`Unexpected end of ${s}`);a=n.i,t=n.tagContent}let r=new yc(o);p&&(r[`:@`]=p),r.add(this.options.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(n,r,this.readonlyMatcher,h)}else{if(f){({tagName:o,tagExp:c}=tl(this.options.transformTagName,o,c,this.options));let e=new yc(o);p&&(e[`:@`]=p),this.addChild(n,e,this.readonlyMatcher,h),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else if(this.options.unpairedTags.indexOf(o)!==-1){let e=new yc(o);p&&(e[`:@`]=p),this.addChild(n,e,this.readonlyMatcher,h),this.matcher.pop(),this.isCurrentNodeStopNode=!1,a=i.closeIndex;continue}else{let e=new yc(o);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);this.tagsNodeStack.push(n),p&&(e[`:@`]=p),this.addChild(n,e,this.readonlyMatcher,h),n=e}r=``,a=u}}else r+=e[a];return t.child};function Gc(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.jPath?n.toString():n,a=this.options.updateTag(t.tagname,i,t[`:@`]);a===!1||(typeof a==`string`&&(t.tagname=a),e.addChild(t,r))}function Kc(e,t,n){let r=this.options.processEntities;if(!r||!r.enabled)return e;if(r.allowedTags){let i=this.options.jPath?n.toString():n;if(!(Array.isArray(r.allowedTags)?r.allowedTags.includes(t):r.allowedTags(t,i)))return e}if(r.tagFilter){let i=this.options.jPath?n.toString():n;if(!r.tagFilter(t,i))return e}for(let t of Object.keys(this.docTypeEntities)){let n=this.docTypeEntities[t],i=e.match(n.regx);if(i){if(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions)throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);let t=e.length;if(e=e.replace(n.regx,n.val),r.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>r.maxExpandedLength))throw Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${r.maxExpandedLength}`)}}for(let t of Object.keys(this.lastEntities)){let n=this.lastEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}if(e.indexOf(`&`)===-1)return e;if(this.options.htmlEntities)for(let t of Object.keys(this.htmlEntities)){let n=this.htmlEntities[t],i=e.match(n.regex);if(i&&(this.entityExpansionCount+=i.length,r.maxTotalExpansions&&this.entityExpansionCount>r.maxTotalExpansions))throw Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${r.maxTotalExpansions}`);e=e.replace(n.regex,n.val)}return e=e.replace(this.ampEntity.regex,this.ampEntity.val),e}function qc(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),e=this.parseTextData(e,t.tagname,n,!1,t[`:@`]?Object.keys(t[`:@`]).length!==0:!1,r),e!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function Jc(e,t){if(!e||e.length===0)return!1;for(let n=0;n<e.length;n++)if(t.matches(e[n]))return!0;return!1}function Yc(e,t,n=`>`){let r,i=``;for(let a=t;a<e.length;a++){let t=e[a];if(r)t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===n[0])if(n[1]){if(e[a+1]===n[1])return{data:i,index:a}}else return{data:i,index:a};else t===` `&&(t=` `);i+=t}}function Xc(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function Zc(e,t,n,r=`>`){let i=Yc(e,t+1,r);if(!i)return;let a=i.data,o=i.index,s=a.search(/\s/),c=a,l=!0;s!==-1&&(c=a.substring(0,s),a=a.substring(s+1).trimStart());let u=c;if(n){let e=c.indexOf(`:`);e!==-1&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:a,closeIndex:o,attrExpPresent:l,rawTagName:u}}function Qc(e,t,n){let r=n,i=1;for(;n<e.length;n++)if(e[n]===`<`)if(e[n+1]===`/`){let a=Xc(e,`>`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(e[n+1]===`?`)n=Xc(e,`?>`,n+1,`StopNode is not closed.`);else if(e.substr(n+1,3)===`!--`)n=Xc(e,`-->`,n+3,`StopNode is not closed.`);else if(e.substr(n+1,2)===`![`)n=Xc(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=Zc(e,n,`>`);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}function $c(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`?!0:t===`false`?!1:Ec(e,n)}else if(Zs(e))return e;else return``}function el(e,t,n){let r=Number.parseInt(e,t);return r>=0&&r<=1114111?String.fromCodePoint(r):n+e+`;`}function tl(e,t,n,r){if(e){let r=e(t);n===t&&(n=r),t=r}return t=nl(t,r),{tagName:t,tagExp:n}}function nl(e,t){if($s.includes(e))throw Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return Qs.includes(e)?t.onDangerousProperty(e):e}let rl=yc.getMetaDataSymbol();function il(e,t){if(!e||typeof e!=`object`)return{};if(!t)return e;let n={};for(let r in e)if(r.startsWith(t)){let i=r.substring(t.length);n[i]=e[r]}else n[r]=e[r];return n}function al(e,t,n,r){return ol(e,t,n,r)}function ol(e,t,n,r){let i,a={};for(let o=0;o<e.length;o++){let s=e[o],c=sl(s);if(c!==void 0&&c!==t.textNodeName){let e=il(s[`:@`]||{},t.attributeNamePrefix);n.push(c,e)}if(c===t.textNodeName)i===void 0?i=s[c]:i+=``+s[c];else if(c===void 0)continue;else if(s[c]){let e=ol(s[c],t,n,r),i=ll(e,t);if(s[`:@`]?cl(e,s[`:@`],r,t):Object.keys(e).length===1&&e[t.textNodeName]!==void 0&&!t.alwaysCreateTextNode?e=e[t.textNodeName]:Object.keys(e).length===0&&(t.alwaysCreateTextNode?e[t.textNodeName]=``:e=``),s[rl]!==void 0&&typeof e==`object`&&e&&(e[rl]=s[rl]),a[c]!==void 0&&Object.prototype.hasOwnProperty.call(a,c))Array.isArray(a[c])||(a[c]=[a[c]]),a[c].push(e);else{let n=t.jPath?r.toString():r;t.isArray(c,n,i)?a[c]=[e]:a[c]=e}c!==void 0&&c!==t.textNodeName&&n.pop()}}return typeof i==`string`?i.length>0&&(a[t.textNodeName]=i):i!==void 0&&(a[t.textNodeName]=i),a}function sl(e){let t=Object.keys(e);for(let e=0;e<t.length;e++){let n=t[e];if(n!==`:@`)return n}}function cl(e,t,n,r){if(t){let i=Object.keys(t),a=i.length;for(let o=0;o<a;o++){let a=i[o],s=a.startsWith(r.attributeNamePrefix)?a.substring(r.attributeNamePrefix.length):a,c=r.jPath?n.toString()+`.`+s:n;r.isArray(a,c,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function ll(e,t){let{textNodeName:n}=t,r=Object.keys(e).length;return!!(r===0||r===1&&(e[n]||typeof e[n]==`boolean`||e[n]===0))}var ul=class{constructor(e){this.externalEntities={},this.options=_c(e)}parse(e,t){if(typeof e!=`string`&&e.toString)e=e.toString();else if(typeof e!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(t){t===!0&&(t={});let n=tc(e,t);if(n!==!0)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let n=new Rc(this.options);n.addExternalEntities(this.externalEntities);let r=n.parseXml(e);return this.options.preserveOrder||r===void 0?r:al(r,this.options,n.matcher,n.readonlyMatcher)}addEntity(e,t){if(t.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(e.indexOf(`&`)!==-1||e.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '
'`);if(t===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[e]=t}static getMetaDataSymbol(){return yc.getMetaDataSymbol()}};function dl(e,t){let n=``;t.format&&t.indentBy.length>0&&(n=`
|
|
12
|
+
`);let r=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;e<t.stopNodes.length;e++){let n=t.stopNodes[e];typeof n==`string`?r.push(new Nc(n)):n instanceof Nc&&r.push(n)}let i=new Fc;return fl(e,t,n,i,r)}function fl(e,t,n,r,i){let a=``,o=!1;if(t.maxNestedTags&&r.getDepth()>t.maxNestedTags)throw Error(`Maximum nested tags exceeded`);if(!Array.isArray(e)){if(e!=null){let n=e.toString();return n=yl(n,t),n}return``}for(let s=0;s<e.length;s++){let c=e[s],l=gl(c);if(l===void 0)continue;let u=pl(c[`:@`],t);r.push(l,u);let d=vl(r,i);if(l===t.textNodeName){let e=c[l];d||(e=t.tagValueProcessor(l,e),e=yl(e,t)),o&&(a+=n),a+=e,o=!1,r.pop();continue}else if(l===t.cdataPropName){o&&(a+=n),a+=`<![CDATA[${c[l][0][t.textNodeName]}]]>`,o=!1,r.pop();continue}else if(l===t.commentPropName){a+=n+`<!--${c[l][0][t.textNodeName]}-->`,o=!0,r.pop();continue}else if(l[0]===`?`){let e=_l(c[`:@`],t,d),i=l===`?xml`?``:n,s=c[l][0][t.textNodeName];s=s.length===0?``:` `+s,a+=i+`<${l}${s}${e}?>`,o=!0,r.pop();continue}let f=n;f!==``&&(f+=t.indentBy);let p=n+`<${l}${_l(c[`:@`],t,d)}`,m;m=d?ml(c[l],t):fl(c[l],t,f,r,i),t.unpairedTags.indexOf(l)===-1?(!m||m.length===0)&&t.suppressEmptyNode?a+=p+`/>`:m&&m.endsWith(`>`)?a+=p+`>${m}${n}</${l}>`:(a+=p+`>`,m&&n!==``&&(m.includes(`/>`)||m.includes(`</`))?a+=n+t.indentBy+m+n:a+=m,a+=`</${l}>`):t.suppressUnpairedNode?a+=p+`>`:a+=p+`/>`,o=!0,r.pop()}return a}function pl(e,t){if(!e||t.ignoreAttributes)return null;let n={},r=!1;for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a=i.startsWith(t.attributeNamePrefix)?i.substr(t.attributeNamePrefix.length):i;n[a]=e[i],r=!0}return r?n:null}function ml(e,t){if(!Array.isArray(e))return e==null?``:e.toString();let n=``;for(let r=0;r<e.length;r++){let i=e[r],a=gl(i);if(a===t.textNodeName)n+=i[a];else if(a===t.cdataPropName)n+=i[a][0][t.textNodeName];else if(a===t.commentPropName)n+=i[a][0][t.textNodeName];else if(a&&a[0]===`?`)continue;else if(a){let e=hl(i[`:@`],t),r=ml(i[a],t);!r||r.length===0?n+=`<${a}${e}/>`:n+=`<${a}${e}>${r}</${a}>`}}return n}function hl(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=e[r];i===!0&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function gl(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n];if(Object.prototype.hasOwnProperty.call(e,r)&&r!==`:@`)return r}}function _l(e,t,n){let r=``;if(e&&!t.ignoreAttributes)for(let i in e){if(!Object.prototype.hasOwnProperty.call(e,i))continue;let a;n?a=e[i]:(a=t.attributeValueProcessor(i,e[i]),a=yl(a,t)),a===!0&&t.suppressBooleanAttributes?r+=` ${i.substr(t.attributeNamePrefix.length)}`:r+=` ${i.substr(t.attributeNamePrefix.length)}="${a}"`}return r}function vl(e,t){if(!t||t.length===0)return!1;for(let n=0;n<t.length;n++)if(e.matches(t[n]))return!0;return!1}function yl(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){let r=t.entities[n];e=e.replace(r.regex,r.val)}return e}function bl(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}let xl={attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:` `,suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp(`&`,`g`),val:`&`},{regex:RegExp(`>`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function B(e){if(this.options=Object.assign({},xl,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>typeof e==`string`&&e.startsWith(`*.`)?`..`+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){let t=this.options.stopNodes[e];typeof t==`string`?this.stopNodeExpressions.push(new Nc(t)):t instanceof Nc&&this.stopNodeExpressions.push(t)}this.options.ignoreAttributes===!0||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=bl(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=wl),this.processTextOrObjNode=Sl,this.options.format?(this.indentate=Cl,this.tagEndChar=`>
|
|
13
|
+
`,this.newLine=`
|
|
14
|
+
`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}B.prototype.build=function(e){if(this.options.preserveOrder)return dl(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});let t=new Fc;return this.j2x(e,0,t).val}},B.prototype.j2x=function(e,t,n){let r=``,i=``;if(this.options.maxNestedTags&&n.getDepth()>=this.options.maxNestedTags)throw Error(`Maximum nested tags exceeded`);let a=this.options.jPath?n.toString():n,o=this.checkStopNode(n);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s))if(e[s]===void 0)this.isAttribute(s)&&(i+=``);else if(e[s]===null)this.isAttribute(s)||s===this.options.cdataPropName?i+=``:s[0]===`?`?i+=this.indentate(t)+`<`+s+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+s+`/`+this.tagEndChar;else if(e[s]instanceof Date)i+=this.buildTextValNode(e[s],s,``,t,n);else if(typeof e[s]!=`object`){let c=this.isAttribute(s);if(c&&!this.ignoreAttributesFn(c,a))r+=this.buildAttrPairStr(c,``+e[s],o);else if(!c)if(s===this.options.textNodeName){let t=this.options.tagValueProcessor(s,``+e[s]);i+=this.replaceEntitiesValue(t)}else{n.push(s);let r=this.checkStopNode(n);if(n.pop(),r){let n=``+e[s];n===``?i+=this.indentate(t)+`<`+s+this.closeTag(s)+this.tagEndChar:i+=this.indentate(t)+`<`+s+`>`+n+`</`+s+this.tagEndChar}else i+=this.buildTextValNode(e[s],s,``,t,n)}}else if(Array.isArray(e[s])){let r=e[s].length,a=``,o=``;for(let c=0;c<r;c++){let r=e[s][c];if(r!==void 0)if(r===null)s[0]===`?`?i+=this.indentate(t)+`<`+s+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+s+`/`+this.tagEndChar;else if(typeof r==`object`)if(this.options.oneListGroup){n.push(s);let e=this.j2x(r,t+1,n);n.pop(),a+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(o+=e.attrStr)}else a+=this.processTextOrObjNode(r,s,t,n);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(s,r);e=this.replaceEntitiesValue(e),a+=e}else{n.push(s);let e=this.checkStopNode(n);if(n.pop(),e){let e=``+r;e===``?a+=this.indentate(t)+`<`+s+this.closeTag(s)+this.tagEndChar:a+=this.indentate(t)+`<`+s+`>`+e+`</`+s+this.tagEndChar}else a+=this.buildTextValNode(r,s,``,t,n)}}this.options.oneListGroup&&(a=this.buildObjectNode(a,s,o,t)),i+=a}else if(this.options.attributesGroupName&&s===this.options.attributesGroupName){let t=Object.keys(e[s]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],``+e[s][t[i]],o)}else i+=this.processTextOrObjNode(e[s],s,t,n);return{attrStr:r,val:i}},B.prototype.buildAttrPairStr=function(e,t,n){return n||(t=this.options.attributeValueProcessor(e,``+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&t===`true`?` `+e:` `+e+`="`+t+`"`};function Sl(e,t,n,r){let i=this.extractAttributes(e);if(r.push(t,i),this.checkStopNode(r)){let i=this.buildRawContent(e),a=this.buildAttributesForStopNode(e);return r.pop(),this.buildObjectNode(i,t,a,n)}let a=this.j2x(e,n+1,r);return r.pop(),e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,a.attrStr,n,r):this.buildObjectNode(a.val,t,a.attrStr,n)}B.prototype.extractAttributes=function(e){if(!e||typeof e!=`object`)return null;let t={},n=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;let i=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e;t[i]=r[e],n=!0}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;let i=this.isAttribute(r);i&&(t[i]=e[r],n=!0)}return n?t:null},B.prototype.buildRawContent=function(e){if(typeof e==`string`)return e;if(typeof e!=`object`||!e)return String(e);if(e[this.options.textNodeName]!==void 0)return e[this.options.textNodeName];let t=``;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n)||this.isAttribute(n)||this.options.attributesGroupName&&n===this.options.attributesGroupName)continue;let r=e[n];if(n===this.options.textNodeName)t+=r;else if(Array.isArray(r)){for(let e of r)if(typeof e==`string`||typeof e==`number`)t+=`<${n}>${e}</${n}>`;else if(typeof e==`object`&&e){let r=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);r===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${r}</${n}>`}}else if(typeof r==`object`&&r){let e=this.buildRawContent(r),i=this.buildAttributesForStopNode(r);e===``?t+=`<${n}${i}/>`:t+=`<${n}${i}>${e}</${n}>`}else t+=`<${n}>${r}</${n}>`}return t},B.prototype.buildAttributesForStopNode=function(e){if(!e||typeof e!=`object`)return``;let t=``;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){let n=e[this.options.attributesGroupName];for(let e in n){if(!Object.prototype.hasOwnProperty.call(n,e))continue;let r=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,i=n[e];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let r=this.isAttribute(n);if(r){let i=e[n];i===!0&&this.options.suppressBooleanAttributes?t+=` `+r:t+=` `+r+`="`+i+`"`}}return t},B.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;{let i=`</`+t+this.tagEndChar,a=``;return t[0]===`?`&&(a=`?`,i=``),(n||n===``)&&e.indexOf(`<`)===-1?this.indentate(r)+`<`+t+n+a+`>`+e+i:this.options.commentPropName!==!1&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+`<!--${e}-->`+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i}},B.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`></${e}`:this.options.suppressUnpairedNode||(t=`/`),t},B.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||this.stopNodeExpressions.length===0)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},B.prototype.buildTextValNode=function(e,t,n,r,i){if(this.options.cdataPropName!==!1&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(this.options.commentPropName!==!1&&t===this.options.commentPropName)return this.indentate(r)+`<!--${e}-->`+this.newLine;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`</`+t+this.tagEndChar}},B.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};function Cl(e){return this.options.indentBy.repeat(e)}function wl(e){return e.startsWith(this.options.attributeNamePrefix)&&e!==this.options.textNodeName?e.substr(this.attrPrefixLen):!1}var Tl=B,El=class{axiosClient;baseURI;xmlParser;signingKey;ALGORITHM=`sha512`;TTL=1200;HASH_LENGTH=32;ITERATION_COUNT=1e4;constructor({axiosClient:e,baseURI:t}){this.axiosClient=e,this.baseURI=t,this.xmlParser=new ul}async signUrl(e,t){let n=new URL(e);n.searchParams.set(`OC-Credential`,t),n.searchParams.set(`OC-Date`,new Date().toISOString()),n.searchParams.set(`OC-Expires`,this.TTL.toString()),n.searchParams.set(`OC-Verb`,`GET`);let r=await this.createHashedKey(n.toString());return n.searchParams.set(`OC-Algo`,`PBKDF2/${this.ITERATION_COUNT}-SHA512`),n.searchParams.set(`OC-Signature`,r),n.toString()}async getSignKey(){if(this.signingKey)return this.signingKey;let e=await this.axiosClient.get(M(this.baseURI,`ocs/v1.php/cloud/user/signing-key`),{headers:{"Content-Type":`application/x-www-form-urlencoded`}});return this.signingKey=this.xmlParser.parse(e.data).ocs.data[`signing-key`],this.signingKey}async createHashedKey(e){return Ks(e,await this.getSignKey(),this.ITERATION_COUNT,this.HASH_LENGTH,this.ALGORITHM).toString(`hex`)}};let Dl=(e,t)=>{let n=new URL(e);n.pathname=[...n.pathname.split(`/`),`ocs`,`v1.php`].filter(Boolean).join(`/`);let r=n.href,i=ts(r,t),a=new El({baseURI:e,axiosClient:t});return{getCapabilities:()=>i.getCapabilities(),signUrl:(e,t)=>a.signUrl(e,t)}},Ol=(e,{fileId:t,path:n,name:r})=>{if(n!==void 0)return M(e.webDavPath,n);if(t!==void 0){if(Xo(e))throw Error(`public spaces need a path provided`);return M(`spaces`,t,r||``)}return e.webDavPath},kl=(e,t)=>({copyFiles(t,{path:n,fileId:r},i,{path:a,parentFolderId:o,name:s},{overwrite:c,...l}={}){let u=Ol(t,{fileId:r,path:n}),d=Ol(i,{fileId:o,path:a,name:s});return e.copy(u,d,{overwrite:c||!1,...l})}}),Al=(e,t,n)=>({async createFolder(n,{path:r,parentFolderId:i,folderName:a,fetchFolder:o=!0,...s}){let c=Ol(n,{fileId:i,path:r,name:a});if(await e.mkcol(c),o)return t.getFileInfo(n,{path:r},s)}}),jl=(e,{axiosClient:t})=>({async getFileContents(n,{fileId:r,path:i},{responseType:a=`text`,noCache:o=!0,headers:s,...c}={}){try{let l=Ol(n,{fileId:r,path:i}),u=await t.get(e.getFileUrl(l),{responseType:a,headers:{...o&&{"Cache-Control":`no-cache`},...s||{}},...c});return{response:u,body:u.data,headers:{ETag:u.headers.etag,"OC-ETag":u.headers[`oc-etag`],"OC-FileId":u.headers[`oc-fileid`]}}}catch(e){let{message:t,response:n}=e;throw new Vn(t,n,n.status)}}}),Ml=(e,t)=>({async getFileInfo(t,n,r){return(await e.listFiles(t,n,{depth:0,...r})).resource}}),Nl=(e,t,n,{axiosClient:r,baseUrl:i})=>({async getFileUrl(a,o,{disposition:s=`attachment`,version:c=null,username:l=``,...u}){if(s===`inline`){let e=await t.getFileContents(a,o,{responseType:`blob`,...u});return URL.createObjectURL(e.body)}if(c){if(!l)throw Error(`username is required for URL signing`);let t=e.getFileUrl(M(`meta`,o.fileId,`v`,c));return await Dl(i,r).signUrl(t,l)}if(o.downloadURL)return o.downloadURL;let{downloadURL:d}=await n.getFileInfo(a,o,{davProperties:[P.DownloadURL]});return d},revokeUrl:e=>{e&&e.startsWith(`blob:`)&&URL.revokeObjectURL(e)}}),Pl=(e,t)=>({getPublicFileUrl(t,n){return e.getFileUrl(M(`public-files`,n))}}),Fl=(e,t,n)=>({async listFiles(n,{path:r,fileId:i}={},{depth:a=1,davProperties:o,isTrash:s=!1,...c}={}){let l;if(Xo(n)){l=await e.propfind(M(n.webDavPath,r),{depth:a,properties:o||Qn.PublicLink,...c}),l.forEach(e=>{e.filename=e.filename.split(`/`).slice(1).join(`/`)}),l.length===1&&(l[0].filename=M(n.id,r,{leadingSlash:!0})),l.forEach(e=>{e.filename=e.filename.split(`/`).slice(2).join(`/`)});let t=n.driveAlias.startsWith(`ocm/`)?`ocm`:`public-link`;if((!r||r===`/`)&&a>0&&t===`ocm`&&l[0].props[P.PublicLinkItemType]===`file`&&(l=[{basename:n.fileId,type:`directory`,filename:``,props:{}},...l]),!r){let[r,...i]=l;return{resource:$o({...r,id:n.id,driveAlias:n.driveAlias,webDavPath:n.webDavPath,publicLinkType:t}),children:i.map(t=>Go(t,e.extraProps))}}let i=l.map(t=>Go(t,e.extraProps));return{resource:i[0],children:i.slice(1)}}let u=async()=>{let e=await t.getPathForFileId(i);return this.listFiles(n,{path:e},{depth:a,davProperties:o})};try{let t=``;if(t=s?Qo(n.id):Ol(n,{fileId:i,path:r}),l=await e.propfind(t,{depth:a,properties:o||Qn.Default,...c}),s)return{resource:Go(l[0],e.extraProps),children:l.slice(1).map(Ko)};let d=l.map(t=>Go(t,e.extraProps)),f=i===n.id;return i&&!f&&d[0].fileId&&i!==d[0].fileId?u():{resource:d[0],children:d.slice(1)}}catch(e){if(e.statusCode===404&&i)return u();throw e}}}),Il=(e,t)=>({moveFiles(t,{path:n,fileId:r},i,{path:a,parentFolderId:o,name:s},{overwrite:c,...l}={}){let u=Ol(t,{fileId:r,path:n}),d=Ol(i,{fileId:o,path:a,name:s});return e.move(u,d,{overwrite:c||!1,...l})}}),Ll=(e,t,n)=>({async putFileContents(n,{fileName:r,path:i,parentFolderId:a,content:o=``,previousEntityTag:s=``,overwrite:c,onUploadProgress:l=null,...u}){let d=Ol(n,{fileId:a,name:r,path:i}),{result:f}=await e.put(d,o,{previousEntityTag:s,overwrite:c,onUploadProgress:l,...u});return t.getFileInfo(n,{fileId:f.headers.get(`Oc-Fileid`),path:i})}}),Rl=(e,t)=>({deleteFile(t,{path:n,...r}){return e.delete(M(t.webDavPath,n),r)}}),zl=(e,t)=>({restoreFile(t,{id:n},{path:r},{overwrite:i,...a}={}){if(Xo(t))return;let o=M(t.webDavPath,r);return e.move(M(t.webDavTrashPath,n),o,{overwrite:i,...a})}}),Bl=(e,t)=>({restoreFileVersion(t,{parentFolderId:n,name:r,path:i},a,o={}){let s=Ol(t,{path:i,fileId:n,name:r}),c=M(`meta`,n,`v`,a,{leadingSlash:!0}),l=M(`files`,s,{leadingSlash:!0});return e.copy(c,l,o)}}),Vl=(e,t)=>({clearTrashBin(t,{id:n,...r}={}){let i=Qo(t.id);return n&&(i=M(i,n)),e.delete(i,r)}}),Hl=(e,t)=>({async search(t,{davProperties:n=Qn.Default,searchLimit:r,...i}){let{range:a,results:o}=await e.report(`/spaces/`,{pattern:t,limit:r,properties:n,...i});return{resources:o.map(t=>({...Go(t,e.extraProps),highlights:t.props[P.Highlights]||``})),totalResults:a?parseInt(a?.split(`/`)[1]):null}}}),Ul=(e,t)=>({async getPathForFileId(t,n={}){return(await e.propfind(M(`meta`,t,{leadingSlash:!0}),{properties:[P.MetaPathForUser],...n}))[0].props[P.MetaPathForUser]}});
|
|
15
|
+
/*! For license information please see index.js.LICENSE.txt */
|
|
16
|
+
var Wl={2:e=>{function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var a=r(e,t,i);return a&&{start:a[0],end:a[1],pre:i.slice(0,a[0]),body:i.slice(a[0]+e.length,a[1]),post:i.slice(a[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,a,o,s,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){for(r=[],a=n.length;u>=0&&!s;)u==c?(r.push(u),c=n.indexOf(e,u+1)):r.length==1?s=[r.pop(),l]:((i=r.pop())<a&&(a=i,o=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(s=[a,o])}return s}e.exports=t,t.range=r},47:(e,t,n)=>{var r=n(410),i=function(e){return typeof e==`string`};function a(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];i&&i!==`.`&&(i===`..`?n.length&&n[n.length-1]!==`..`?n.pop():t&&n.push(`..`):n.push(i))}return n}var o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,s={};function c(e){return o.exec(e).slice(1)}s.resolve=function(){for(var e=``,t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(!i(r))throw TypeError(`Arguments to path.resolve must be strings`);r&&(e=r+`/`+e,t=r.charAt(0)===`/`)}return(t?`/`:``)+(e=a(e.split(`/`),!t).join(`/`))||`.`},s.normalize=function(e){var t=s.isAbsolute(e),n=e.substr(-1)===`/`;return(e=a(e.split(`/`),!t).join(`/`))||t||(e=`.`),e&&n&&(e+=`/`),(t?`/`:``)+e},s.isAbsolute=function(e){return e.charAt(0)===`/`},s.join=function(){for(var e=``,t=0;t<arguments.length;t++){var n=arguments[t];if(!i(n))throw TypeError(`Arguments to path.join must be strings`);n&&(e+=e?`/`+n:n)}return s.normalize(e)},s.relative=function(e,t){function n(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)}e=s.resolve(e).substr(1),t=s.resolve(t).substr(1);for(var r=n(e.split(`/`)),i=n(t.split(`/`)),a=Math.min(r.length,i.length),o=a,c=0;c<a;c++)if(r[c]!==i[c]){o=c;break}var l=[];for(c=o;c<r.length;c++)l.push(`..`);return(l=l.concat(i.slice(o))).join(`/`)},s._makeLong=function(e){return e},s.dirname=function(e){var t=c(e),n=t[0],r=t[1];return n||r?(r&&=r.substr(0,r.length-1),n+r):`.`},s.basename=function(e,t){var n=c(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},s.extname=function(e){return c(e)[3]},s.format=function(e){if(!r.isObject(e))throw TypeError(`Parameter 'pathObject' must be an object, not `+typeof e);if(!i(e.root||``))throw TypeError(`'pathObject.root' must be a string or undefined, not `+typeof e.root);return(e.dir?e.dir+s.sep:``)+(e.base||``)},s.parse=function(e){if(!i(e))throw TypeError(`Parameter 'pathString' must be a string, not `+typeof e);var t=c(e);if(!t||t.length!==4)throw TypeError(`Invalid path '`+e+`'`);return t[1]=t[1]||``,t[2]=t[2]||``,t[3]=t[3]||``,{root:t[0],dir:t[0]+t[1].slice(0,t[1].length-1),base:t[2],ext:t[3],name:t[2].slice(0,t[2].length-t[3].length)}},s.sep=`/`,s.delimiter=`:`,e.exports=s},101:function(e,t,n){var r;e=n.nmd(e),function(){var i=(e&&e.exports,typeof global==`object`&&global);i.global!==i&&i.window;var a=function(e){this.message=e};(a.prototype=Error()).name=`InvalidCharacterError`;var o=function(e){throw new a(e)},s=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,c=/[\t\n\f\r ]/g,l={encode:function(e){e=String(e),/[^\0-\xFF]/.test(e)&&o(`The string to be encoded contains characters outside of the Latin1 range.`);for(var t,n,r,i,a=e.length%3,c=``,l=-1,u=e.length-a;++l<u;)t=e.charCodeAt(l)<<16,n=e.charCodeAt(++l)<<8,r=e.charCodeAt(++l),c+=s.charAt((i=t+n+r)>>18&63)+s.charAt(i>>12&63)+s.charAt(i>>6&63)+s.charAt(63&i);return a==2?(t=e.charCodeAt(l)<<8,n=e.charCodeAt(++l),c+=s.charAt((i=t+n)>>10)+s.charAt(i>>4&63)+s.charAt(i<<2&63)+`=`):a==1&&(i=e.charCodeAt(l),c+=s.charAt(i>>2)+s.charAt(i<<4&63)+`==`),c},decode:function(e){var t=(e=String(e).replace(c,``)).length;t%4==0&&(t=(e=e.replace(/==?$/,``)).length),(t%4==1||/[^+a-zA-Z0-9/]/.test(e))&&o(`Invalid character: the string to be decoded is not correctly encoded.`);for(var n,r,i=0,a=``,l=-1;++l<t;)r=s.indexOf(e.charAt(l)),n=i%4?64*n+r:r,i++%4&&(a+=String.fromCharCode(255&n>>(-2*i&6)));return a},version:`1.0.0`};(r=function(){return l}.call(t,n,t,e))===void 0||(e.exports=r)}()},135:e=>{function t(e){return!!e.constructor&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e)}e.exports=function(e){return e!=null&&(t(e)||function(e){return typeof e.readFloatLE==`function`&&typeof e.slice==`function`&&t(e.slice(0,0))}(e)||!!e._isBuffer)}},172:(e,t)=>{t.d=function(e){if(!e)return 0;for(var t=(e=e.toString()).length,n=e.length;n--;){var r=e.charCodeAt(n);56320<=r&&r<=57343&&n--,127<r&&r<=2047?t++:2047<r&&r<=65535&&(t+=2)}return t}},285:(e,t,n)=>{var r=n(2);e.exports=function(e){return e?(e.substr(0,2)===`{}`&&(e=`\\{\\}`+e.substr(2)),g(function(e){return e.split(`\\\\`).join(i).split(`\\{`).join(a).split(`\\}`).join(o).split(`\\,`).join(s).split(`\\.`).join(c)}(e),!0).map(u)):[]};var i=`\0SLASH`+Math.random()+`\0`,a=`\0OPEN`+Math.random()+`\0`,o=`\0CLOSE`+Math.random()+`\0`,s=`\0COMMA`+Math.random()+`\0`,c=`\0PERIOD`+Math.random()+`\0`;function l(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function u(e){return e.split(i).join(`\\`).split(a).join(`{`).split(o).join(`}`).split(s).join(`,`).split(c).join(`.`)}function d(e){if(!e)return[``];var t=[],n=r(`{`,`}`,e);if(!n)return e.split(`,`);var i=n.pre,a=n.body,o=n.post,s=i.split(`,`);s[s.length-1]+=`{`+a+`}`;var c=d(o);return o.length&&(s[s.length-1]+=c.shift(),s.push.apply(s,c)),t.push.apply(t,s),t}function f(e){return`{`+e+`}`}function p(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function h(e,t){return e>=t}function g(e,t){var n=[],i=r(`{`,`}`,e);if(!i)return[e];var a=i.pre,s=i.post.length?g(i.post,!1):[``];if(/\$$/.test(i.pre))for(var c=0;c<s.length;c++){var u=a+`{`+i.body+`}`+s[c];n.push(u)}else{var _,v,y=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body),b=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body),x=y||b,S=i.body.indexOf(`,`)>=0;if(!x&&!S)return i.post.match(/,(?!,).*\}/)?g(e=i.pre+`{`+i.body+o+i.post):[e];if(x)_=i.body.split(/\.\./);else if((_=d(i.body)).length===1&&(_=g(_[0],!1).map(f)).length===1)return s.map((function(e){return i.pre+_[0]+e}));if(x){var C=l(_[0]),w=l(_[1]),ee=Math.max(_[0].length,_[1].length),te=_.length==3?Math.abs(l(_[2])):1,ne=m;w<C&&(te*=-1,ne=h);var re=_.some(p);v=[];for(var ie=C;ne(ie,w);ie+=te){var ae;if(b)(ae=String.fromCharCode(ie))===`\\`&&(ae=``);else if(ae=String(ie),re){var T=ee-ae.length;if(T>0){var oe=Array(T+1).join(`0`);ae=ie<0?`-`+oe+ae.slice(1):oe+ae}}v.push(ae)}}else{v=[];for(var E=0;E<_.length;E++)v.push.apply(v,g(_[E],!1))}for(E=0;E<v.length;E++)for(c=0;c<s.length;c++)u=a+v[E]+s[c],(!t||x||u)&&n.push(u)}return n}},298:e=>{var t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,n={rotl:function(e,t){return e<<t|e>>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t<e.length;t++)e[t]=n.endian(e[t]);return e},randomBytes:function(e){for(var t=[];e>0;e--)t.push(Math.floor(256*Math.random()));return t},bytesToWords:function(e){for(var t=[],n=0,r=0;n<e.length;n++,r+=8)t[r>>>5]|=e[n]<<24-r%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n<e.length;n++)t.push((e[n]>>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join(``)},hexToBytes:function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(parseInt(e.substr(n,2),16));return t},bytesToBase64:function(e){for(var n=[],r=0;r<e.length;r+=3)for(var i=e[r]<<16|e[r+1]<<8|e[r+2],a=0;a<4;a++)8*r+6*a<=8*e.length?n.push(t.charAt(i>>>6*(3-a)&63)):n.push(`=`);return n.join(``)},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,``);for(var n=[],r=0,i=0;r<e.length;i=++r%4)i!=0&&n.push((t.indexOf(e.charAt(r-1))&2**(-2*i+8)-1)<<2*i|t.indexOf(e.charAt(r))>>>6-2*i);return n}};e.exports=n},345:()=>{},388:()=>{},410:()=>{},526:e=>{var t={utf8:{stringToBytes:function(e){return t.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(t.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n<e.length;n++)t.push(255&e.charCodeAt(n));return t},bytesToString:function(e){for(var t=[],n=0;n<e.length;n++)t.push(String.fromCharCode(e[n]));return t.join(``)}}};e.exports=t},542:(e,t,n)=>{(function(){var t=n(298),r=n(526).utf8,i=n(135),a=n(526).bin,o=function(e,n){e.constructor==String?e=n&&n.encoding===`binary`?a.stringToBytes(e):r.stringToBytes(e):i(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),c=8*e.length,l=1732584193,u=-271733879,d=-1732584194,f=271733878,p=0;p<s.length;p++)s[p]=16711935&(s[p]<<8|s[p]>>>24)|4278255360&(s[p]<<24|s[p]>>>8);s[c>>>5]|=128<<c%32,s[14+(c+64>>>9<<4)]=c;var m=o._ff,h=o._gg,g=o._hh,_=o._ii;for(p=0;p<s.length;p+=16){var v=l,y=u,b=d,x=f;l=m(l,u,d,f,s[p+0],7,-680876936),f=m(f,l,u,d,s[p+1],12,-389564586),d=m(d,f,l,u,s[p+2],17,606105819),u=m(u,d,f,l,s[p+3],22,-1044525330),l=m(l,u,d,f,s[p+4],7,-176418897),f=m(f,l,u,d,s[p+5],12,1200080426),d=m(d,f,l,u,s[p+6],17,-1473231341),u=m(u,d,f,l,s[p+7],22,-45705983),l=m(l,u,d,f,s[p+8],7,1770035416),f=m(f,l,u,d,s[p+9],12,-1958414417),d=m(d,f,l,u,s[p+10],17,-42063),u=m(u,d,f,l,s[p+11],22,-1990404162),l=m(l,u,d,f,s[p+12],7,1804603682),f=m(f,l,u,d,s[p+13],12,-40341101),d=m(d,f,l,u,s[p+14],17,-1502002290),l=h(l,u=m(u,d,f,l,s[p+15],22,1236535329),d,f,s[p+1],5,-165796510),f=h(f,l,u,d,s[p+6],9,-1069501632),d=h(d,f,l,u,s[p+11],14,643717713),u=h(u,d,f,l,s[p+0],20,-373897302),l=h(l,u,d,f,s[p+5],5,-701558691),f=h(f,l,u,d,s[p+10],9,38016083),d=h(d,f,l,u,s[p+15],14,-660478335),u=h(u,d,f,l,s[p+4],20,-405537848),l=h(l,u,d,f,s[p+9],5,568446438),f=h(f,l,u,d,s[p+14],9,-1019803690),d=h(d,f,l,u,s[p+3],14,-187363961),u=h(u,d,f,l,s[p+8],20,1163531501),l=h(l,u,d,f,s[p+13],5,-1444681467),f=h(f,l,u,d,s[p+2],9,-51403784),d=h(d,f,l,u,s[p+7],14,1735328473),l=g(l,u=h(u,d,f,l,s[p+12],20,-1926607734),d,f,s[p+5],4,-378558),f=g(f,l,u,d,s[p+8],11,-2022574463),d=g(d,f,l,u,s[p+11],16,1839030562),u=g(u,d,f,l,s[p+14],23,-35309556),l=g(l,u,d,f,s[p+1],4,-1530992060),f=g(f,l,u,d,s[p+4],11,1272893353),d=g(d,f,l,u,s[p+7],16,-155497632),u=g(u,d,f,l,s[p+10],23,-1094730640),l=g(l,u,d,f,s[p+13],4,681279174),f=g(f,l,u,d,s[p+0],11,-358537222),d=g(d,f,l,u,s[p+3],16,-722521979),u=g(u,d,f,l,s[p+6],23,76029189),l=g(l,u,d,f,s[p+9],4,-640364487),f=g(f,l,u,d,s[p+12],11,-421815835),d=g(d,f,l,u,s[p+15],16,530742520),l=_(l,u=g(u,d,f,l,s[p+2],23,-995338651),d,f,s[p+0],6,-198630844),f=_(f,l,u,d,s[p+7],10,1126891415),d=_(d,f,l,u,s[p+14],15,-1416354905),u=_(u,d,f,l,s[p+5],21,-57434055),l=_(l,u,d,f,s[p+12],6,1700485571),f=_(f,l,u,d,s[p+3],10,-1894986606),d=_(d,f,l,u,s[p+10],15,-1051523),u=_(u,d,f,l,s[p+1],21,-2054922799),l=_(l,u,d,f,s[p+8],6,1873313359),f=_(f,l,u,d,s[p+15],10,-30611744),d=_(d,f,l,u,s[p+6],15,-1560198380),u=_(u,d,f,l,s[p+13],21,1309151649),l=_(l,u,d,f,s[p+4],6,-145523070),f=_(f,l,u,d,s[p+11],10,-1120210379),d=_(d,f,l,u,s[p+2],15,718787259),u=_(u,d,f,l,s[p+9],21,-343485551),l=l+v>>>0,u=u+y>>>0,d=d+b>>>0,f=f+x>>>0}return t.endian([l,u,d,f])};o._ff=function(e,t,n,r,i,a,o){var s=e+(t&n|~t&r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._gg=function(e,t,n,r,i,a,o){var s=e+(t&r|n&~r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._hh=function(e,t,n,r,i,a,o){var s=e+(t^n^r)+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._ii=function(e,t,n,r,i,a,o){var s=e+(n^(t|~r))+(i>>>0)+o;return(s<<a|s>>>32-a)+t},o._blocksize=16,o._digestsize=16,e.exports=function(e,n){if(e==null)throw Error(`Illegal argument `+e);var r=t.wordsToBytes(o(e,n));return n&&n.asBytes?r:n&&n.asString?a.bytesToString(r):t.bytesToHex(r)}})()},647:(e,t)=>{var n=Object.prototype.hasOwnProperty;function r(e){try{return decodeURIComponent(e.replace(/\+/g,` `))}catch{return null}}function i(e){try{return encodeURIComponent(e)}catch{return null}}t.stringify=function(e,t){t||=``;var r,a,o=[];for(a in typeof t!=`string`&&(t=`?`),e)if(n.call(e,a)){if((r=e[a])||r!=null&&!isNaN(r)||(r=``),a=i(a),r=i(r),a===null||r===null)continue;o.push(a+`=`+r)}return o.length?t+o.join(`&`):``},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,i={};t=n.exec(e);){var a=r(t[1]),o=r(t[2]);a===null||o===null||a in i||(i[a]=o)}return i}},670:e=>{e.exports=function(e,t){if(t=t.split(`:`)[0],!(e=+e))return!1;switch(t){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:(e,t,n)=>{var r=n(670),i=n(647),a=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,o=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,c=/:\d+$/,l=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function d(e){return(e||``).toString().replace(a,``)}var f=[[`#`,`hash`],[`?`,`query`],function(e,t){return h(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]],p={hash:1,query:1};function m(e){var t,n=(typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{}).location||{},r={},i=typeof(e||=n);if(e.protocol===`blob:`)r=new _(unescape(e.pathname),{});else if(i===`string`)for(t in r=new _(e,{}),p)delete r[t];else if(i===`object`){for(t in e)t in p||(r[t]=e[t]);r.slashes===void 0&&(r.slashes=s.test(e.href))}return r}function h(e){return e===`file:`||e===`ftp:`||e===`http:`||e===`https:`||e===`ws:`||e===`wss:`}function g(e,t){e=(e=d(e)).replace(o,``),t||={};var n,r=l.exec(e),i=r[1]?r[1].toLowerCase():``,a=!!r[2],s=!!r[3],c=0;return a?s?(n=r[2]+r[3]+r[4],c=r[2].length+r[3].length):(n=r[2]+r[4],c=r[2].length):s?(n=r[3]+r[4],c=r[3].length):n=r[4],i===`file:`?c>=2&&(n=n.slice(2)):h(i)?n=r[4]:i?a&&(n=n.slice(2)):c>=2&&h(t.protocol)&&(n=r[4]),{protocol:i,slashes:a||h(i),slashesCount:c,rest:n}}function _(e,t,n){if(e=(e=d(e)).replace(o,``),!(this instanceof _))return new _(e,t,n);var a,s,c,l,p,v,y=f.slice(),b=typeof t,x=this,S=0;for(b!==`object`&&b!==`string`&&(n=t,t=null),n&&typeof n!=`function`&&(n=i.parse),a=!(s=g(e||``,t=m(t))).protocol&&!s.slashes,x.slashes=s.slashes||a&&t.slashes,x.protocol=s.protocol||t.protocol||``,e=s.rest,(s.protocol===`file:`&&(s.slashesCount!==2||u.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!h(x.protocol)))&&(y[3]=[/(.*)/,`pathname`]);S<y.length;S++)typeof(l=y[S])==`function`?e=l(e,x):(c=l[0],v=l[1],c==c?typeof c==`string`?~(p=c===`@`?e.lastIndexOf(c):e.indexOf(c))&&(typeof l[2]==`number`?(x[v]=e.slice(0,p),e=e.slice(p+l[2])):(x[v]=e.slice(p),e=e.slice(0,p))):(p=c.exec(e))&&(x[v]=p[1],e=e.slice(0,p.index)):x[v]=e,x[v]=x[v]||a&&l[3]&&t[v]||``,l[4]&&(x[v]=x[v].toLowerCase()));n&&(x.query=n(x.query)),a&&t.slashes&&x.pathname.charAt(0)!==`/`&&(x.pathname!==``||t.pathname!==``)&&(x.pathname=function(e,t){if(e===``)return t;for(var n=(t||`/`).split(`/`).slice(0,-1).concat(e.split(`/`)),r=n.length,i=n[r-1],a=!1,o=0;r--;)n[r]===`.`?n.splice(r,1):n[r]===`..`?(n.splice(r,1),o++):o&&(r===0&&(a=!0),n.splice(r,1),o--);return a&&n.unshift(``),i!==`.`&&i!==`..`||n.push(``),n.join(`/`)}(x.pathname,t.pathname)),x.pathname.charAt(0)!==`/`&&h(x.protocol)&&(x.pathname=`/`+x.pathname),r(x.port,x.protocol)||(x.host=x.hostname,x.port=``),x.username=x.password=``,x.auth&&=(~(p=x.auth.indexOf(`:`))?(x.username=x.auth.slice(0,p),x.username=encodeURIComponent(decodeURIComponent(x.username)),x.password=x.auth.slice(p+1),x.password=encodeURIComponent(decodeURIComponent(x.password))):x.username=encodeURIComponent(decodeURIComponent(x.auth)),x.password?x.username+`:`+x.password:x.username),x.origin=x.protocol!==`file:`&&h(x.protocol)&&x.host?x.protocol+`//`+x.host:`null`,x.href=x.toString()}_.prototype={set:function(e,t,n){var a=this;switch(e){case`query`:typeof t==`string`&&t.length&&(t=(n||i.parse)(t)),a[e]=t;break;case`port`:a[e]=t,r(t,a.protocol)?t&&(a.host=a.hostname+`:`+t):(a.host=a.hostname,a[e]=``);break;case`hostname`:a[e]=t,a.port&&(t+=`:`+a.port),a.host=t;break;case`host`:a[e]=t,c.test(t)?(t=t.split(`:`),a.port=t.pop(),a.hostname=t.join(`:`)):(a.hostname=t,a.port=``);break;case`protocol`:a.protocol=t.toLowerCase(),a.slashes=!n;break;case`pathname`:case`hash`:if(t){var o=e===`pathname`?`/`:`#`;a[e]=t.charAt(0)===o?t:o+t}else a[e]=t;break;case`username`:case`password`:a[e]=encodeURIComponent(t);break;case`auth`:var s=t.indexOf(`:`);~s?(a.username=t.slice(0,s),a.username=encodeURIComponent(decodeURIComponent(a.username)),a.password=t.slice(s+1),a.password=encodeURIComponent(decodeURIComponent(a.password))):a.username=encodeURIComponent(decodeURIComponent(t))}for(var l=0;l<f.length;l++){var u=f[l];u[4]&&(a[u[1]]=a[u[1]].toLowerCase())}return a.auth=a.password?a.username+`:`+a.password:a.username,a.origin=a.protocol!==`file:`&&h(a.protocol)&&a.host?a.protocol+`//`+a.host:`null`,a.href=a.toString(),a},toString:function(e){e&&typeof e==`function`||(e=i.stringify);var t,n=this,r=n.host,a=n.protocol;a&&a.charAt(a.length-1)!==`:`&&(a+=`:`);var o=a+(n.protocol&&n.slashes||h(n.protocol)?`//`:``);return n.username?(o+=n.username,n.password&&(o+=`:`+n.password),o+=`@`):n.password?(o+=`:`+n.password,o+=`@`):n.protocol!==`file:`&&h(n.protocol)&&!r&&n.pathname!==`/`&&(o+=`@`),(r[r.length-1]===`:`||c.test(n.hostname)&&!n.port)&&(r+=`:`),o+=r+n.pathname,(t=typeof n.query==`object`?e(n.query):n.query)&&(o+=t.charAt(0)===`?`?t:`?`+t),n.hash&&(o+=n.hash),o}},_.extractProtocol=g,_.location=m,_.trimLeft=d,_.qs=i,e.exports=_},800:()=>{},805:()=>{},829:e=>{function t(e){return t=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},t(e)}function n(e){var t=typeof Map==`function`?new Map:void 0;return n=function(e){if(e===null||(n=e,Function.toString.call(n).indexOf(`[native code]`)===-1))return e;var n;if(typeof e!=`function`)throw TypeError(`Super expression must either be null or a function`);if(t!==void 0){if(t.has(e))return t.get(e);t.set(e,o)}function o(){return r(e,arguments,a(this).constructor)}return o.prototype=Object.create(e.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i(o,e)},n(e)}function r(e,t,n){return r=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(e,t,n){var r=[null];r.push.apply(r,t);var a=new(Function.bind.apply(e,r));return n&&i(a,n.prototype),a},r.apply(null,arguments)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}var o=function(e){function n(e){var r;return function(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}(this,n),(r=function(e,n){return!n||t(n)!==`object`&&typeof n!=`function`?function(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}(e):n}(this,a(n).call(this,e))).name=`ObjectPrototypeMutationError`,r}return function(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Super expression must either be null or a function`);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t)}(n,e),n}(n(Error));function s(e,n){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},i=n.split(`.`),a=i.length,o=function(t){var n=i[t];if(!e)return{v:void 0};if(n===`+`){if(Array.isArray(e))return{v:e.map((function(n,a){var o=i.slice(t+1);return o.length>0?s(n,o.join(`.`),r):r(e,a,i,t)}))};var a=i.slice(0,t).join(`.`);throw Error(`Object at wildcard (${a}) is not an array`)}e=r(e,n,i,t)},c=0;c<a;c++){var l=o(c);if(t(l)===`object`)return l.v}return e}function c(e,t){return e.length===t+1}e.exports={set:function(e,n,r){if(t(e)!=`object`||e===null||n===void 0)return e;if(typeof n==`number`)return e[n]=r,e[n];try{return s(e,n,(function(e,t,n,i){if(e===Reflect.getPrototypeOf({}))throw new o(`Attempting to mutate Object.prototype`);if(!e[t]){var a=Number.isInteger(Number(n[i+1])),s=n[i+1]===`+`;e[t]=a||s?[]:{}}return c(n,i)&&(e[t]=r),e[t]}))}catch(t){if(t instanceof o)throw t;return e}},get:function(e,n){if(t(e)!=`object`||e===null||n===void 0)return e;if(typeof n==`number`)return e[n];try{return s(e,n,(function(e,t){return e[t]}))}catch{return e}},has:function(e,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(t(e)!=`object`||e===null||n===void 0)return!1;if(typeof n==`number`)return n in e;try{var i=!1;return s(e,n,(function(e,t,n,a){if(!c(n,a))return e&&e[t];i=r.own?e.hasOwnProperty(t):t in e})),i}catch{return!1}},hasOwn:function(e,t,n){return this.has(e,t,n||{own:!0})},isIn:function(e,n,r){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};if(t(e)!=`object`||e===null||n===void 0)return!1;try{var a=!1,o=!1;return s(e,n,(function(e,n,i,s){return a=a||e===r||!!e&&e[n]===r,o=c(i,s)&&t(e)===`object`&&n in e,e&&e[n]})),i.validPath?a&&o:a}catch{return!1}},ObjectPrototypeMutationError:o}}},Gl={};function V(e){var t=Gl[e];if(t!==void 0)return t.exports;var n=Gl[e]={id:e,loaded:!1,exports:{}};return Wl[e].call(n.exports,n,n.exports,V),n.loaded=!0,n.exports}V.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return V.d(t,{a:t}),t},V.d=(e,t)=>{for(var n in t)V.o(t,n)&&!V.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},V.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),V.nmd=e=>(e.paths=[],e.children||=[],e);var Kl=V(737),ql=V.n(Kl);function Jl(e){if(!Yl(e))throw Error(`Parameter was not an error`)}function Yl(e){return!!e&&typeof e==`object`&&(t=e,Object.prototype.toString.call(t))===`[object Error]`||e instanceof Error;var t}var Xl=class e extends Error{constructor(e,t){let{options:n,shortMessage:r}=function(e){let t,n=``;if(e.length===0)t={};else if(Yl(e[0]))t={cause:e[0]},n=e.slice(1).join(` `)||``;else if(e[0]&&typeof e[0]==`object`)t=Object.assign({},e[0]),n=e.slice(1).join(` `)||``;else{if(typeof e[0]!=`string`)throw Error(`Invalid arguments passed to Layerr`);t={},n=n=e.join(` `)||``}return{options:t,shortMessage:n}}([...arguments]),i=r;if(n.cause&&(i=`${i}: ${n.cause.message}`),super(i),this.message=i,n.name&&typeof n.name==`string`?this.name=n.name:this.name=`Layerr`,n.cause&&Object.defineProperty(this,`_cause`,{value:n.cause}),Object.defineProperty(this,`_info`,{value:{}}),n.info&&typeof n.info==`object`&&Object.assign(this._info,n.info),Error.captureStackTrace){let e=n.constructorOpt||this.constructor;Error.captureStackTrace(this,e)}}static cause(e){return Jl(e),e._cause&&Yl(e._cause)?e._cause:null}static fullStack(t){Jl(t);let n=e.cause(t);return n?`${t.stack}\ncaused by: ${e.fullStack(n)}`:t.stack??``}static info(t){Jl(t);let n={},r=e.cause(t);return r&&Object.assign(n,e.info(r)),t._info&&Object.assign(n,t._info),n}toString(){let e=this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e=`${e}: ${this.message}`),e}},Zl=V(47),Ql=V.n(Zl);let $l=`__PATH_SEPARATOR_POSIX__`,eu=`__PATH_SEPARATOR_WINDOWS__`;function H(e){try{let t=e.replace(/\//g,$l).replace(/\\\\/g,eu);return encodeURIComponent(t).split(eu).join(`\\\\`).split($l).join(`/`)}catch(e){throw new Xl(e,`Failed encoding path`)}}function tu(e){return e.startsWith(`/`)?e:`/`+e}function nu(e){let t=e;return t[0]!==`/`&&(t=`/`+t),/^.+\/$/.test(t)&&(t=t.substr(0,t.length-1)),t}function ru(e){let t=new(ql())(e).pathname;return t.length<=0&&(t=`/`),nu(t)}function U(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(){return function(e){var t=[];if(e.length===0)return``;if(typeof e[0]!=`string`)throw TypeError(`Url must be a string. Received `+e[0]);e[0].match(/^[^/:]+:\/*$/)&&e.length>1&&(e[0]=e.shift()+e[0]),e[0].match(/^file:\/\/\//)?e[0]=e[0].replace(/^([^/:]+):\/*/,`$1:///`):e[0]=e[0].replace(/^([^/:]+):\/*/,`$1://`);for(var n=0;n<e.length;n++){var r=e[n];if(typeof r!=`string`)throw TypeError(`Url must be a string. Received `+r);r!==``&&(n>0&&(r=r.replace(/^[\/]+/,``)),r=n<e.length-1?r.replace(/[\/]+$/,``):r.replace(/[\/]+$/,`/`),t.push(r))}var i=t.join(`/`),a=(i=i.replace(/\/(\?|&|#[^!])/g,`$1`)).split(`?`);return a.shift()+(a.length>0?`?`:``)+a.join(`&`)}(typeof arguments[0]==`object`?arguments[0]:[].slice.call(arguments))}(t.reduce(((e,t,n)=>((n===0||t!==`/`||t===`/`&&e[e.length-1]!==`/`)&&e.push(t),e)),[]))}var iu=V(542),au=V.n(iu);function ou(e,t){let n=e.url.replace(`//`,``),r=n.indexOf(`/`)==-1?`/`:n.slice(n.indexOf(`/`)),i=e.method?e.method.toUpperCase():`GET`,a=!!/(^|,)\s*auth\s*($|,)/.test(t.qop)&&`auth`,o=`00000000${t.nc}`.slice(-8),s=function(e,t,n,r,i,a,o){let s=o||au()(`${t}:${n}:${r}`);return e&&e.toLowerCase()===`md5-sess`?au()(`${s}:${i}:${a}`):s}(t.algorithm,t.username,t.realm,t.password,t.nonce,t.cnonce,t.ha1),c=au()(`${i}:${r}`),l=a?au()(`${s}:${t.nonce}:${o}:${t.cnonce}:${a}:${c}`):au()(`${s}:${t.nonce}:${c}`),u={username:t.username,realm:t.realm,nonce:t.nonce,uri:r,qop:a,response:l,nc:o,cnonce:t.cnonce,algorithm:t.algorithm,opaque:t.opaque},d=[];for(let e in u)u[e]&&(e===`qop`||e===`nc`||e===`algorithm`?d.push(`${e}=${u[e]}`):d.push(`${e}="${u[e]}"`));return`Digest ${d.join(`, `)}`}function su(e){return(e.headers&&e.headers.get(`www-authenticate`)||``).split(/\s/)[0].toLowerCase()===`digest`}var cu=V(101),lu=V.n(cu);function uu(e){return lu().decode(e)}function du(e,t){var n;return`Basic ${n=`${e}:${t}`,lu().encode(n)}`}let fu=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope?self:typeof window<`u`?window:globalThis,pu=fu.fetch.bind(fu);fu.Headers,fu.Request,fu.Response;let W=function(e){return e.Auto=`auto`,e.Digest=`digest`,e.None=`none`,e.Password=`password`,e.Token=`token`,e}({}),mu=function(e){return e.DataTypeNoLength=`data-type-no-length`,e.InvalidAuthType=`invalid-auth-type`,e.InvalidOutputFormat=`invalid-output-format`,e.LinkUnsupportedAuthType=`link-unsupported-auth`,e.InvalidUpdateRange=`invalid-update-range`,e.NotSupported=`not-supported`,e}({});function hu(e,t,n,r,i){switch(e.authType){case W.Auto:t&&n&&(e.headers.Authorization=du(t,n));break;case W.Digest:e.digest=function(e,t,n){return{username:e,password:t,ha1:n,nc:0,algorithm:`md5`,hasDigestAuth:!1}}(t,n,i);break;case W.None:break;case W.Password:e.headers.Authorization=du(t,n);break;case W.Token:e.headers.Authorization=`${(a=r).token_type} ${a.access_token}`;break;default:throw new Xl({info:{code:mu.InvalidAuthType}},`Invalid auth type: ${e.authType}`)}var a}V(345),V(800);let gu=`@@HOTPATCHER`,_u=()=>{};function vu(e){return{original:e,methods:[e],final:!1}}var yu=class{constructor(){this._configuration={registry:{},getEmptyAction:`null`},this.__type__=gu}get configuration(){return this._configuration}get getEmptyAction(){return this.configuration.getEmptyAction}set getEmptyAction(e){this.configuration.getEmptyAction=e}control(e){let t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(!e||e.__type__!==gu)throw 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)?t&&(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){return(this.get(e)||_u)(...[...arguments].slice(1))}get(e){let t=this.configuration.registry[e];if(!t)switch(this.getEmptyAction){case`null`:return null;case`throw`:throw Error(`Failed handling method request: No method provided for override: ${e}`);default:throw Error(`Failed handling request which resulted in an empty method: Invalid empty-action specified: ${this.getEmptyAction}`)}return function(){var e=[...arguments];if(e.length===0)throw Error(`Failed creating sequence: No functions provided`);return function(){let t=[...arguments],n=this;for(;e.length>0;)t=[e.shift().apply(n,t)];return t[0]}}(...t.methods)}isPatched(e){return!!this.configuration.registry[e]}patch(e,t){let{chain:n=!1}=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.configuration.registry[e]&&this.configuration.registry[e].final)throw Error(`Failed patching '${e}': Method marked as being final`);if(typeof t!=`function`)throw Error(`Failed patching '${e}': Provided method is not a function`);if(n)this.configuration.registry[e]?this.configuration.registry[e].methods.push(t):this.configuration.registry[e]=vu(t);else if(this.isPatched(e)){let{original:n}=this.configuration.registry[e];this.configuration.registry[e]=Object.assign(vu(t),{original:n})}else this.configuration.registry[e]=vu(t);return this}patchInline(e,t){this.isPatched(e)||this.patch(e,t);var n=[...arguments].slice(2);return this.execute(e,...n)}plugin(e){return[...arguments].slice(1).forEach((t=>{this.patch(e,t,{chain:!0})})),this}restore(e){if(!this.isPatched(e))throw Error(`Failed restoring method: No method present for key: ${e}`);if(typeof this.configuration.registry[e].original!=`function`)throw 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 Error(`Failed marking '${e}' as final: No method found for key`);return this.configuration.registry[e].final=!0,this}};let bu=null;function xu(){return bu||=new yu,bu}function Su(e){return function(e){if(typeof e!=`object`||!e||Object.prototype.toString.call(e)!=`[object Object]`)return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e)?Object.assign({},e):Object.setPrototypeOf(Object.assign({},e),Object.getPrototypeOf(e))}function Cu(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=null,i=[...t];for(;i.length>0;){let e=i.shift();r=r?wu(r,e):Su(e)}return r}function wu(e,t){let n=Su(e);return Object.keys(t).forEach((e=>{n.hasOwnProperty(e)?Array.isArray(t[e])?n[e]=Array.isArray(n[e])?[...n[e],...t[e]]:[...t[e]]:typeof t[e]==`object`&&t[e]?n[e]=typeof n[e]==`object`&&n[e]?wu(n[e],t[e]):Su(t[e]):n[e]=t[e]:n[e]=t[e]})),n}function Tu(e){let t={};for(let n of e.keys())t[n]=e.get(n);return t}function Eu(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];if(t.length===0)return{};let r={};return t.reduce(((e,t)=>(Object.keys(t).forEach((n=>{let i=n.toLowerCase();r.hasOwnProperty(i)?e[r[i]]=t[n]:(r[i]=n,e[n]=t[n])})),e)),{})}V(805);let Du=typeof ArrayBuffer==`function`,{toString:Ou}=Object.prototype;function ku(e){return Du&&(e instanceof ArrayBuffer||Ou.call(e)===`[object ArrayBuffer]`)}function Au(e){return e!=null&&e.constructor!=null&&typeof e.constructor.isBuffer==`function`&&e.constructor.isBuffer(e)}function ju(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function Mu(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Nu=ju((function(e){let t=e._digest;return delete e._digest,t.hasDigestAuth&&(e=Cu(e,{headers:{Authorization:ou(e,t)}})),Mu(Fu(e),(function(n){let r=!1;return i=function(e){return r?e:n},(a=function(){if(n.status==401)return t.hasDigestAuth=function(e,t){if(!su(e))return!1;let n=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;for(;;){let r=e.headers&&e.headers.get(`www-authenticate`)||``,i=n.exec(r);if(!i)break;t[i[1]]=i[2]||i[3]}return t.nc+=1,t.cnonce=function(){let e=``;for(let t=0;t<32;++t)e=`${e}${`abcdef0123456789`[Math.floor(16*Math.random())]}`;return e}(),!0}(n,t),function(){if(t.hasDigestAuth)return Mu(Fu(e=Cu(e,{headers:{Authorization:ou(e,t)}})),(function(e){return e.status==401?t.hasDigestAuth=!1:t.nc++,r=!0,e}))}();t.nc++}())&&a.then?a.then(i):i(a);var i,a}))})),Pu=ju((function(e,t){return Mu(Fu(e),(function(n){return n.ok?(t.authType=W.Password,n):n.status==401&&su(n)?(t.authType=W.Digest,hu(t,t.username,t.password,void 0,void 0),e._digest=t.digest,Nu(e)):n}))})),G=ju((function(e,t){return t.authType===W.Auto?Pu(e,t):e._digest?Nu(e):Fu(e)}));function K(e,t,n){let r=Su(e);return r.headers=Eu(t.headers,r.headers||{},n.headers||{}),n.data!==void 0&&(r.data=n.data),n.signal&&(r.signal=n.signal),t.httpAgent&&(r.httpAgent=t.httpAgent),t.httpsAgent&&(r.httpsAgent=t.httpsAgent),t.digest&&(r._digest=t.digest),typeof t.withCredentials==`boolean`&&(r.withCredentials=t.withCredentials),r}function Fu(e){let t=xu();return t.patchInline(`request`,(e=>t.patchInline(`fetch`,pu,e.url,function(e){let t={},n={method:e.method};if(e.headers&&(t=Eu(t,e.headers)),e.data!==void 0){let[r,i]=function(e){if(typeof e==`string`||Au(e)||ku(e))return[e,{}];if(e&&typeof e==`object`)return[JSON.stringify(e),{"content-type":`application/json`}];throw Error(`Unable to convert request body: Unexpected body type: `+typeof e)}(e.data);n.body=r,t=Eu(t,i)}return e.signal&&(n.signal=e.signal),e.withCredentials&&(n.credentials=`include`),n.headers=t,n}(e))),e)}var Iu=V(285);let Lu=e=>{if(typeof e!=`string`)throw TypeError(`invalid pattern`);if(e.length>65536)throw TypeError(`pattern is too long`)},Ru={"[: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]},zu=e=>e.replace(/[[\]\\-]/g,`\\$&`),Bu=e=>e.join(``),Vu=(e,t)=>{let n=t;if(e.charAt(n)!==`[`)throw Error(`not in a brace expression`);let r=[],i=[],a=n+1,o=!1,s=!1,c=!1,l=!1,u=n,d=``;t:for(;a<e.length;){let t=e.charAt(a);if(t!==`!`&&t!==`^`||a!==n+1){if(t===`]`&&o&&!c){u=a+1;break}if(o=!0,t!==`\\`||c){if(t===`[`&&!c){for(let[t,[o,c,l]]of Object.entries(Ru))if(e.startsWith(t,a)){if(d)return[`$.`,!1,e.length-n,!0];a+=t.length,l?i.push(o):r.push(o),s||=c;continue t}}c=!1,d?(t>d?r.push(zu(d)+`-`+zu(t)):t===d&&r.push(zu(t)),d=``,a++):e.startsWith(`-]`,a+1)?(r.push(zu(t+`-`)),a+=2):e.startsWith(`-`,a+1)?(d=t,a+=2):(r.push(zu(t)),a++)}else c=!0,a++}else l=!0,a++}if(u<a)return[``,!1,0,!1];if(!r.length&&!i.length)return[`$.`,!1,e.length-n,!0];if(i.length===0&&r.length===1&&/^\\?.$/.test(r[0])&&!l)return[(f=r[0].length===2?r[0].slice(-1):r[0],f.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)),!1,u-n,!1];var f;let p=`[`+(l?`^`:``)+Bu(r)+`]`,m=`[`+(l?``:`^`)+Bu(i)+`]`;return[r.length&&i.length?`(`+p+`|`+m+`)`:r.length?p:m,s,u-n,!0]},Hu=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/\[([^\/\\])\]/g,`$1`):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,`$1$2`).replace(/\\([^\/])/g,`$1`)},Uu=new Set([`!`,`?`,`+`,`*`,`@`]),Wu=e=>Uu.has(e),Gu=`(?!\\.)`,Ku=new Set([`[`,`.`]),qu=new Set([`..`,`.`]),Ju=new Set(`().*{}+?[]^$\\!`),Yu=`[^/]`,Xu=Yu+`*?`,Zu=Yu+`+?`;var Qu=class e{type;#e;#t;#n=!1;#r=[];#i;#a;#o;#s=!1;#c;#l;#u=!1;constructor(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.type=e,e&&(this.#t=!0),this.#i=t,this.#e=this.#i?this.#i.#e:this,this.#c=this.#e===this?n:this.#e.#c,this.#o=this.#e===this?[]:this.#e.#o,e!==`!`||this.#e.#s||this.#o.push(this),this.#a=this.#i?this.#i.#r.length:0}get hasMagic(){if(this.#t!==void 0)return this.#t;for(let e of this.#r)if(typeof e!=`string`&&(e.type||e.hasMagic))return this.#t=!0;return this.#t}toString(){return this.#l===void 0?this.type?this.#l=this.type+`(`+this.#r.map((e=>String(e))).join(`|`)+`)`:this.#l=this.#r.map((e=>String(e))).join(``):this.#l}#d(){if(this!==this.#e)throw Error(`should only call on root`);if(this.#s)return this;let e;for(this.toString(),this.#s=!0;e=this.#o.pop();){if(e.type!==`!`)continue;let t=e,n=t.#i;for(;n;){for(let r=t.#a+1;!n.type&&r<n.#r.length;r++)for(let t of e.#r){if(typeof t==`string`)throw Error(`string part in extglob AST??`);t.copyIn(n.#r[r])}t=n,n=t.#i}}return this}push(){var t=[...arguments];for(let n of t)if(n!==``){if(typeof n!=`string`&&!(n instanceof e&&n.#i===this))throw Error(`invalid part: `+n);this.#r.push(n)}}toJSON(){let e=this.type===null?this.#r.slice().map((e=>typeof e==`string`?e:e.toJSON())):[this.type,...this.#r.map((e=>e.toJSON()))];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#s&&this.#i?.type===`!`)&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#i?.isStart())return!1;if(this.#a===0)return!0;let t=this.#i;for(let n=0;n<this.#a;n++){let r=t.#r[n];if(!(r instanceof e&&r.type===`!`))return!1}return!0}isEnd(){if(this.#e===this||this.#i?.type===`!`)return!0;if(!this.#i?.isEnd())return!1;if(!this.type)return this.#i?.isEnd();let e=this.#i?this.#i.#r.length:0;return this.#a===e-1}copyIn(e){typeof e==`string`?this.push(e):this.push(e.clone(this))}clone(t){let n=new e(this.type,t);for(let e of this.#r)n.copyIn(e);return n}static#f(t,n,r,i){let a=!1,o=!1,s=-1,c=!1;if(n.type===null){let l=r,u=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,u+=r;else if(o)l===s+1?r!==`^`&&r!==`!`||(c=!0):r!==`]`||l===s+2&&c||(o=!1),u+=r;else if(r!==`[`)if(i.noext||!Wu(r)||t.charAt(l)!==`(`)u+=r;else{n.push(u),u=``;let a=new e(r,n);l=e.#f(t,a,l,i),n.push(a)}else o=!0,s=l,c=!1,u+=r}return n.push(u),l}let l=r+1,u=new e(null,n),d=[],f=``;for(;l<t.length;){let r=t.charAt(l++);if(a||r===`\\`)a=!a,f+=r;else if(o)l===s+1?r!==`^`&&r!==`!`||(c=!0):r!==`]`||l===s+2&&c||(o=!1),f+=r;else if(r!==`[`)if(Wu(r)&&t.charAt(l)===`(`){u.push(f),f=``;let n=new e(r,u);u.push(n),l=e.#f(t,n,l,i)}else if(r!==`|`){if(r===`)`)return f===``&&n.#r.length===0&&(n.#u=!0),u.push(f),f=``,n.push(...d,u),l;f+=r}else u.push(f),f=``,d.push(u),u=new e(null,n);else o=!0,s=l,c=!1,f+=r}return n.type=null,n.#t=void 0,n.#r=[t.substring(r-1)],l}static fromGlob(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new e(null,void 0,n);return e.#f(t,r,0,n),r}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,i]=this.toRegExpSource();if(!(r||this.#t||this.#c.nocase&&!this.#c.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#c.nocase?`i`:``)+(i?`u`:``);return Object.assign(RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#c}toRegExpSource(t){let n=t??!!this.#c.dot;if(this.#e===this&&this.#d(),!this.type){let r=this.isStart()&&this.isEnd(),i=this.#r.map((n=>{let[i,a,o,s]=typeof n==`string`?e.#m(n,this.#t,r):n.toRegExpSource(t);return this.#t=this.#t||o,this.#n=this.#n||s,i})).join(``),a=``;if(this.isStart()&&typeof this.#r[0]==`string`&&(this.#r.length!==1||!qu.has(this.#r[0]))){let e=Ku,r=n&&e.has(i.charAt(0))||i.startsWith(`\\.`)&&e.has(i.charAt(2))||i.startsWith(`\\.\\.`)&&e.has(i.charAt(4)),o=!n&&!t&&e.has(i.charAt(0));a=r?`(?!(?:^|/)\\.\\.?(?:$|/))`:o?Gu:``}let o=``;return this.isEnd()&&this.#e.#s&&this.#i?.type===`!`&&(o=`(?:$|\\/)`),[a+i+o,Hu(i),this.#t=!!this.#t,this.#n]}let r=this.type===`*`||this.type===`+`,i=this.type===`!`?`(?:(?!(?:`:`(?:`,a=this.#p(n);if(this.isStart()&&this.isEnd()&&!a&&this.type!==`!`){let e=this.toString();return this.#r=[e],this.type=null,this.#t=void 0,[e,Hu(this.toString()),!1,!1]}let o=!r||t||n?``:this.#p(!0);o===a&&(o=``),o&&(a=`(?:${a})(?:${o})*?`);let s=``;return s=this.type===`!`&&this.#u?(this.isStart()&&!n?Gu:``)+Zu:i+a+(this.type===`!`?`))`+(!this.isStart()||n||t?``:Gu)+Xu+`)`:this.type===`@`?`)`:this.type===`?`?`)?`:this.type===`+`&&o?`)`:this.type===`*`&&o?`)?`:`)${this.type}`),[s,Hu(a),this.#t=!!this.#t,this.#n]}#p(e){return this.#r.map((t=>{if(typeof t==`string`)throw Error(`string type in extglob ast??`);let[n,r,i,a]=t.toRegExpSource(e);return this.#n=this.#n||a,n})).filter((e=>!(this.isStart()&&this.isEnd()&&!e))).join(`|`)}static#m(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=!1,i=``,a=!1;for(let o=0;o<e.length;o++){let s=e.charAt(o);if(r)r=!1,i+=(Ju.has(s)?`\\`:``)+s;else if(s!==`\\`){if(s===`[`){let[n,r,s,c]=Vu(e,o);if(s){i+=n,a||=r,o+=s-1,t||=c;continue}}s===`*`?(i+=n&&e===`*`?Zu:Xu,t=!0):s===`?`?(i+=Yu,t=!0):i+=s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`)}else o===e.length-1?i+=`\\\\`:r=!0}return[i,Hu(e),!!t,a]}};let q=function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Lu(t),!(!n.nocomment&&t.charAt(0)===`#`)&&new wd(t,n).match(e)},$u=/^\*+([^+@!?\*\[\(]*)$/,ed=e=>t=>!t.startsWith(`.`)&&t.endsWith(e),td=e=>t=>t.endsWith(e),nd=e=>(e=e.toLowerCase(),t=>!t.startsWith(`.`)&&t.toLowerCase().endsWith(e)),rd=e=>(e=e.toLowerCase(),t=>t.toLowerCase().endsWith(e)),id=/^\*+\.\*+$/,ad=e=>!e.startsWith(`.`)&&e.includes(`.`),od=e=>e!==`.`&&e!==`..`&&e.includes(`.`),sd=/^\.\*+$/,cd=e=>e!==`.`&&e!==`..`&&e.startsWith(`.`),ld=/^\*+$/,ud=e=>e.length!==0&&!e.startsWith(`.`),dd=e=>e.length!==0&&e!==`.`&&e!==`..`,fd=/^\?+([^+@!?\*\[\(]*)?$/,pd=e=>{let[t,n=``]=e,r=_d([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},md=e=>{let[t,n=``]=e,r=vd([t]);return n?(n=n.toLowerCase(),e=>r(e)&&e.toLowerCase().endsWith(n)):r},hd=e=>{let[t,n=``]=e,r=vd([t]);return n?e=>r(e)&&e.endsWith(n):r},gd=e=>{let[t,n=``]=e,r=_d([t]);return n?e=>r(e)&&e.endsWith(n):r},_d=e=>{let[t]=e,n=t.length;return e=>e.length===n&&!e.startsWith(`.`)},vd=e=>{let[t]=e,n=t.length;return e=>e.length===n&&e!==`.`&&e!==`..`},yd=typeof process==`object`&&process?typeof process.env==`object`&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:`posix`;q.sep=yd===`win32`?`\\`:`/`;let bd=Symbol(`globstar **`);q.GLOBSTAR=bd,q.filter=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return n=>q(n,e,t)};let xd=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.assign({},e,t)};q.defaults=e=>{if(!e||typeof e!=`object`||!Object.keys(e).length)return q;let t=q;return Object.assign((function(n,r){return t(n,r,xd(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}),{Minimatch:class extends t.Minimatch{constructor(t){super(t,xd(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}))}static defaults(n){return t.defaults(xd(e,n)).Minimatch}},AST:class extends t.AST{constructor(t,n){super(t,n,xd(e,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}))}static fromGlob(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.AST.fromGlob(n,xd(e,r))}},unescape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.unescape(n,xd(e,r))},escape:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.escape(n,xd(e,r))},filter:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.filter(n,xd(e,r))},defaults:n=>t.defaults(xd(e,n)),makeRe:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.makeRe(n,xd(e,r))},braceExpand:function(n){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.braceExpand(n,xd(e,r))},match:function(n,r){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return t.match(n,r,xd(e,i))},sep:t.sep,GLOBSTAR:bd})};let Sd=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Lu(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:Iu(e)};q.braceExpand=Sd,q.makeRe=function(e){return new wd(e,arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).makeRe()},q.match=function(e,t){let n=new wd(t,arguments.length>2&&arguments[2]!==void 0?arguments[2]:{});return e=e.filter((e=>n.match(e))),n.options.nonull&&!e.length&&e.push(t),e};let Cd=/[?*]|[+@!]\(.*?\)|\[|\]/;var wd=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;regexp;constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Lu(e),t||={},this.options=t,this.pattern=e,this.platform=t.platform||yd,this.isWindows=this.platform===`win32`,this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||!1===t.allowWindowsEscape,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,`/`)),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot===void 0?!(!this.isWindows||!this.nocase):t.windowsNoMagicRoot,this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!=`string`)return!0;return!1}debug(){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)===`#`)return void(this.comment=!0);if(!e)return void(this.empty=!0);this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=function(){return console.error(...arguments)}),this.debug(this.pattern,this.globSet);let n=this.globSet.map((e=>this.slashSplit(e)));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map(((e,t,n)=>{if(this.isWindows&&this.windowsNoMagicRoot){let t=!(e[0]!==``||e[1]!==``||e[2]!==`?`&&Cd.test(e[2])||Cd.test(e[3])),n=/^[a-z]:/i.test(e[0]);if(t)return[...e.slice(0,4),...e.slice(4).map((e=>this.parse(e)))];if(n)return[e[0],...e.slice(1).map((e=>this.parse(e)))]}return e.map((e=>this.parse(e)))}));if(this.debug(this.pattern,r),this.set=r.filter((e=>e.indexOf(!1)===-1)),this.isWindows)for(let e=0;e<this.set.length;e++){let t=this.set[e];t[0]===``&&t[1]===``&&this.globParts[e][2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])&&(t[2]=`?`)}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let t=0;t<e.length;t++)for(let n=0;n<e[t].length;n++)e[t][n]===`**`&&(e[t][n]=`*`);let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):e=t>=1?this.levelOneOptimize(e):this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map((e=>{let t=-1;for(;(t=e.indexOf(`**`,t+1))!==-1;){let n=t;for(;e[n+1]===`**`;)n++;n!==t&&e.splice(t,n-t)}return e}))}levelOneOptimize(e){return e.map((e=>(e=e.reduce(((e,t)=>{let n=e[e.length-1];return t===`**`&&n===`**`?e:t===`..`&&n&&n!==`..`&&n!==`.`&&n!==`**`?(e.pop(),e):(e.push(t),e)}),[])).length===0?[``]:e))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let n=1;n<e.length-1;n++){let r=e[n];n===1&&r===``&&e[0]===``||r!==`.`&&r!==``||(t=!0,e.splice(n,1),n--)}e[0]!==`.`||e.length!==2||e[1]!==`.`&&e[1]!==``||(t=!0,e.pop())}let n=0;for(;(n=e.indexOf(`..`,n+1))!==-1;){let r=e[n-1];r&&r!==`.`&&r!==`..`&&r!==`**`&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[``]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf(`**`,r+1))!==-1;){let i=r;for(;n[i+1]===`**`;)i++;i>r&&n.splice(r+1,i-r);let a=n[r+1],o=n[r+2],s=n[r+3];if(a!==`..`||!o||o===`.`||o===`..`||!s||s===`.`||s===`..`)continue;t=!0,n.splice(r,1);let c=n.slice(0);c[r]=`**`,e.push(c),r--}if(!this.preserveMultipleSlashes){for(let e=1;e<n.length-1;e++){let r=n[e];e===1&&r===``&&n[0]===``||r!==`.`&&r!==``||(t=!0,n.splice(e,1),e--)}n[0]!==`.`||n.length!==2||n[1]!==`.`&&n[1]!==``||(t=!0,n.pop())}let i=0;for(;(i=n.indexOf(`..`,i+1))!==-1;){let e=n[i-1];if(e&&e!==`.`&&e!==`..`&&e!==`**`){t=!0;let e=i===1&&n[i+1]===`**`?[`.`]:[];n.splice(i-1,2,...e),n.length===0&&n.push(``),i-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter((e=>e.length))}partsMatch(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=0,i=0,a=[],o=``;for(;r<e.length&&i<t.length;)if(e[r]===t[i])a.push(o===`b`?t[i]:e[r]),r++,i++;else if(n&&e[r]===`**`&&t[i]===e[r+1])a.push(e[r]),r++;else if(n&&t[i]===`**`&&e[r]===t[i+1])a.push(t[i]),i++;else if(e[r]!==`*`||!t[i]||!this.options.dot&&t[i].startsWith(`.`)||t[i]===`**`){if(t[i]!==`*`||!e[r]||!this.options.dot&&e[r].startsWith(`.`)||e[r]===`**`||o===`a`)return!1;o=`b`,a.push(t[i]),r++,i++}else{if(o===`b`)return!1;o=`a`,a.push(e[r]),r++,i++}return e.length===t.length&&a}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)===`!`;r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=this.options;if(this.isWindows){let n=typeof e[0]==`string`&&/^[a-z]:$/i.test(e[0]),r=!n&&e[0]===``&&e[1]===``&&e[2]===`?`&&/^[a-z]:$/i.test(e[3]),i=typeof t[0]==`string`&&/^[a-z]:$/i.test(t[0]),a=r?3:n?0:void 0,o=!i&&t[0]===``&&t[1]===``&&t[2]===`?`&&typeof t[3]==`string`&&/^[a-z]:$/i.test(t[3])?3:i?0:void 0;if(typeof a==`number`&&typeof o==`number`){let[n,r]=[e[a],t[o]];n.toLowerCase()===r.toLowerCase()&&(t[o]=n,o>a?t=t.slice(o):a>o&&(e=e.slice(a)))}}let{optimizationLevel:i=1}=this.options;i>=2&&(e=this.levelTwoFileOptimize(e)),this.debug(`matchOne`,this,{file:e,pattern:t}),this.debug(`matchOne`,e.length,t.length);for(var a=0,o=0,s=e.length,c=t.length;a<s&&o<c;a++,o++){this.debug(`matchOne loop`);var l=t[o],u=e[a];if(this.debug(t,l,u),!1===l)return!1;if(l===bd){this.debug(`GLOBSTAR`,[t,l,u]);var d=a,f=o+1;if(f===c){for(this.debug(`** at the end`);a<s;a++)if(e[a]===`.`||e[a]===`..`||!r.dot&&e[a].charAt(0)===`.`)return!1;return!0}for(;d<s;){var p=e[d];if(this.debug(`
|
|
17
|
+
globstar while`,e,d,t,f,p),this.matchOne(e.slice(d),t.slice(f),n))return this.debug(`globstar found match!`,d,s,p),!0;if(p===`.`||p===`..`||!r.dot&&p.charAt(0)===`.`){this.debug(`dot detected!`,e,d,t,f);break}this.debug(`globstar swallow a segment, and continue`),d++}return!(!n||(this.debug(`
|
|
18
|
+
>>> no match, partial?`,e,d,t,f),d!==s))}let i;if(typeof l==`string`?(i=u===l,this.debug(`string match`,l,u,i)):(i=l.test(u),this.debug(`pattern match`,l,u,i)),!i)return!1}if(a===s&&o===c)return!0;if(a===s)return n;if(o===c)return a===s-1&&e[a]===``;throw Error(`wtf?`)}braceExpand(){return Sd(this.pattern,this.options)}parse(e){Lu(e);let t=this.options;if(e===`**`)return bd;if(e===``)return``;let n,r=null;(n=e.match(ld))?r=t.dot?dd:ud:(n=e.match($u))?r=(t.nocase?t.dot?rd:nd:t.dot?td:ed)(n[1]):(n=e.match(fd))?r=(t.nocase?t.dot?md:pd:t.dot?hd:gd)(n):(n=e.match(id))?r=t.dot?od:ad:(n=e.match(sd))&&(r=cd);let i=Qu.fromGlob(e,this.options).toMMPattern();return r&&typeof i==`object`&&Reflect.defineProperty(i,`test`,{value:r}),i}makeRe(){if(this.regexp||!1===this.regexp)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?`[^/]*?`:t.dot?`(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?`:`(?:(?!(?:\\/|^)\\.).)*?`,r=new Set(t.nocase?[`i`]:[]),i=e.map((e=>{let t=e.map((e=>{if(e instanceof RegExp)for(let t of e.flags.split(``))r.add(t);return typeof e==`string`?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,`\\$&`):e===bd?bd:e._src}));return t.forEach(((e,r)=>{let i=t[r+1],a=t[r-1];e===bd&&a!==bd&&(a===void 0?i!==void 0&&i!==bd?t[r+1]=`(?:\\/|`+n+`\\/)?`+i:t[r]=n:i===void 0?t[r-1]=a+`(?:\\/|`+n+`)?`:i!==bd&&(t[r-1]=a+`(?:\\/|\\/`+n+`\\/)`+i,t[r+1]=bd))})),t.filter((e=>e!==bd)).join(`/`)})).join(`|`),[a,o]=e.length>1?[`(?:`,`)`]:[``,``];i=`^`+a+i+o+`$`,this.negate&&(i=`^(?!`+i+`).+$`);try{this.regexp=new RegExp(i,[...r].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 t=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===`/`&&t)return!0;let n=this.options;this.isWindows&&(e=e.split(`\\`).join(`/`));let r=this.slashSplit(e);this.debug(this.pattern,`split`,r);let i=this.set;this.debug(this.pattern,`set`,i);let a=r[r.length-1];if(!a)for(let e=r.length-2;!a&&e>=0;e--)a=r[e];for(let e=0;e<i.length;e++){let o=i[e],s=r;if(n.matchBase&&o.length===1&&(s=[a]),this.matchOne(s,o,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate}static defaults(e){return q.defaults(e).Minimatch}};function Td(e){let t=Error(`${arguments.length>1&&arguments[1]!==void 0?arguments[1]:``}Invalid response: ${e.status} ${e.statusText}`);return t.status=e.status,t.response=e,t}function J(e,t){let{status:n}=t;if(n===401&&e.digest)return t;if(n>=400)throw Td(t);return t}function Ed(e,t){return arguments.length>2&&arguments[2]!==void 0&&arguments[2]?{data:t,headers:e.headers?Tu(e.headers):{},status:e.status,statusText:e.statusText}:t}q.AST=Qu,q.Minimatch=wd,q.escape=function(e){let{windowsPathsNoEscape:t=!1}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t?e.replace(/[?*()[\]]/g,`[$&]`):e.replace(/[?*()[\]\\]/g,`\\$&`)},q.unescape=Hu;let Dd=(Od=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=K({url:U(e.remoteURL,H(t)),method:`COPY`,headers:{Destination:U(e.remoteURL,H(n)),Overwrite:!1===r.overwrite?`F`:`T`,Depth:r.shallow?`0`:`infinity`}},e,r);return o=function(t){J(e,t)},(a=G(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o},function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{return Promise.resolve(Od.apply(this,e))}catch(e){return Promise.reject(e)}});var Od;let kd={preserveOrder:!1,attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e},captureMetaData:!1},Ad=RegExp(`^[: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][: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\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`);function jd(e,t){let n=[],r=t.exec(e);for(;r;){let i=[];i.startIndex=t.lastIndex-r[0].length;let a=r.length;for(let e=0;e<a;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n}let Md=function(e){return Ad.exec(e)!=null},Nd;Nd=typeof Symbol==`function`?Symbol(`XML Node Metadata`):`@@xmlMetadata`;var Pd=class{constructor(e){this.tagname=e,this.child=[],this[`:@`]={}}add(e,t){e===`__proto__`&&(e=`#__proto__`),this.child.push({[e]:t})}addChild(e,t){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}),t!==void 0&&(this.child[this.child.length-1][Nd]={startIndex:t})}static getMetaDataSymbol(){return Nd}},Fd=class{constructor(e){this.suppressValidationErr=!e}readDocType(e,t){let n={};if(e[t+3]!==`O`||e[t+4]!==`C`||e[t+5]!==`T`||e[t+6]!==`Y`||e[t+7]!==`P`||e[t+8]!==`E`)throw Error(`Invalid Tag instead of DOCTYPE`);{t+=9;let r=1,i=!1,a=!1,o=``;for(;t<e.length;t++)if(e[t]!==`<`||a)if(e[t]===`>`){if(a?e[t-1]===`-`&&e[t-2]===`-`&&(a=!1,r--):r--,r===0)break}else e[t]===`[`?i=!0:o+=e[t];else{if(i&&Id(e,`!ENTITY`,t)){let r,i;t+=7,[r,i,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),i.indexOf(`&`)===-1&&(n[r]={regx:RegExp(`&${r};`,`g`),val:i})}else if(i&&Id(e,`!ELEMENT`,t)){t+=8;let{index:n}=this.readElementExp(e,t+1);t=n}else if(i&&Id(e,`!ATTLIST`,t))t+=8;else if(i&&Id(e,`!NOTATION`,t)){t+=9;let{index:n}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=n}else{if(!Id(e,`!--`,t))throw Error(`Invalid DOCTYPE`);a=!0}r++,o=``}if(r!==0)throw Error(`Unclosed DOCTYPE`)}return{entities:n,i:t}}readEntityExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t])&&e[t]!==`"`&&e[t]!==`'`;)n+=e[t],t++;if(Ld(n),t=Y(e,t),!this.suppressValidationErr){if(e.substring(t,t+6).toUpperCase()===`SYSTEM`)throw Error(`External entities are not supported`);if(e[t]===`%`)throw Error(`Parameter entities are not supported`)}let r=``;return[t,r]=this.readIdentifierVal(e,t,`entity`),[n,r,--t]}readNotationExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;!this.suppressValidationErr&&Ld(n),t=Y(e,t);let r=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&r!==`SYSTEM`&&r!==`PUBLIC`)throw Error(`Expected SYSTEM or PUBLIC, found "${r}"`);t+=r.length,t=Y(e,t);let i=null,a=null;if(r===`PUBLIC`)[t,i]=this.readIdentifierVal(e,t,`publicIdentifier`),e[t=Y(e,t)]!==`"`&&e[t]!==`'`||([t,a]=this.readIdentifierVal(e,t,`systemIdentifier`));else if(r===`SYSTEM`&&([t,a]=this.readIdentifierVal(e,t,`systemIdentifier`),!this.suppressValidationErr&&!a))throw Error(`Missing mandatory system identifier for SYSTEM notation`);return{notationName:n,publicIdentifier:i,systemIdentifier:a,index:--t}}readIdentifierVal(e,t,n){let r=``,i=e[t];if(i!==`"`&&i!==`'`)throw Error(`Expected quoted string, found "${i}"`);for(t++;t<e.length&&e[t]!==i;)r+=e[t],t++;if(e[t]!==i)throw Error(`Unterminated ${n} value`);return[++t,r]}readElementExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;if(!this.suppressValidationErr&&!Md(n))throw Error(`Invalid element name: "${n}"`);let r=``;if(e[t=Y(e,t)]===`E`&&Id(e,`MPTY`,t))t+=4;else if(e[t]===`A`&&Id(e,`NY`,t))t+=2;else if(e[t]===`(`){for(t++;t<e.length&&e[t]!==`)`;)r+=e[t],t++;if(e[t]!==`)`)throw Error(`Unterminated content model`)}else if(!this.suppressValidationErr)throw Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:n,contentModel:r.trim(),index:t}}readAttlistExp(e,t){t=Y(e,t);let n=``;for(;t<e.length&&!/\s/.test(e[t]);)n+=e[t],t++;Ld(n),t=Y(e,t);let r=``;for(;t<e.length&&!/\s/.test(e[t]);)r+=e[t],t++;if(!Ld(r))throw Error(`Invalid attribute name: "${r}"`);t=Y(e,t);let i=``;if(e.substring(t,t+8).toUpperCase()===`NOTATION`){if(i=`NOTATION`,e[t=Y(e,t+=8)]!==`(`)throw Error(`Expected '(', found "${e[t]}"`);t++;let n=[];for(;t<e.length&&e[t]!==`)`;){let r=``;for(;t<e.length&&e[t]!==`|`&&e[t]!==`)`;)r+=e[t],t++;if(r=r.trim(),!Ld(r))throw Error(`Invalid notation name: "${r}"`);n.push(r),e[t]===`|`&&(t++,t=Y(e,t))}if(e[t]!==`)`)throw Error(`Unterminated list of notations`);t++,i+=` (`+n.join(`|`)+`)`}else{for(;t<e.length&&!/\s/.test(e[t]);)i+=e[t],t++;if(!this.suppressValidationErr&&![`CDATA`,`ID`,`IDREF`,`IDREFS`,`ENTITY`,`ENTITIES`,`NMTOKEN`,`NMTOKENS`].includes(i.toUpperCase()))throw Error(`Invalid attribute type: "${i}"`)}t=Y(e,t);let a=``;return e.substring(t,t+8).toUpperCase()===`#REQUIRED`?(a=`#REQUIRED`,t+=8):e.substring(t,t+7).toUpperCase()===`#IMPLIED`?(a=`#IMPLIED`,t+=7):[t,a]=this.readIdentifierVal(e,t,`ATTLIST`),{elementName:n,attributeName:r,attributeType:i,defaultValue:a,index:t}}};let Y=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function Id(e,t,n){for(let r=0;r<t.length;r++)if(t[r]!==e[n+r+1])return!1;return!0}function Ld(e){if(Md(e))return e;throw Error(`Invalid entity name ${e}`)}let Rd=/^[-+]?0x[a-fA-F0-9]+$/,zd=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,Bd={hex:!0,leadingZeros:!0,decimalPoint:`.`,eNotation:!0},Vd=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function Hd(e){return typeof e==`function`?e:Array.isArray(e)?t=>{for(let n of e)if(typeof n==`string`&&t===n||n instanceof RegExp&&n.test(t))return!0}:()=>!1}var Ud=class{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:(e,t)=>af(t,10,`&#`)},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>af(t,16,`&#x`)}},this.addExternalEntities=Wd,this.parseXml=Yd,this.parseTextData=Gd,this.resolveNameSpace=Kd,this.buildAttributesMap=Jd,this.isItStopNode=$d,this.replaceEntitiesValue=Zd,this.readStopNodeData=nf,this.saveTextToParentTag=Qd,this.addChild=Xd,this.ignoreAttributesFn=Hd(this.options.ignoreAttributes),this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let e=0;e<this.options.stopNodes.length;e++){let t=this.options.stopNodes[e];typeof t==`string`&&(t.startsWith(`*.`)?this.stopNodesWildcard.add(t.substring(2)):this.stopNodesExact.add(t))}}}};function Wd(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n];this.lastEntities[r]={regex:RegExp(`&`+r+`;`,`g`),val:e[r]}}}function Gd(e,t,n,r,i,a,o){if(e!==void 0&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){o||(e=this.replaceEntitiesValue(e));let r=this.options.tagValueProcessor(t,e,n,i,a);return r==null?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?rf(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Kd(e){if(this.options.removeNSPrefix){let t=e.split(`:`),n=e.charAt(0)===`/`?`/`:``;if(t[0]===`xmlns`)return``;t.length===2&&(e=n+t[1])}return e}let qd=RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,`gm`);function Jd(e,t){if(!0!==this.options.ignoreAttributes&&typeof e==`string`){let n=jd(e,qd),r=n.length,i={};for(let e=0;e<r;e++){let r=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(r,t))continue;let a=n[e][4],o=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),o===`__proto__`&&(o=`#__proto__`),a!==void 0){this.options.trimValues&&(a=a.trim()),a=this.replaceEntitiesValue(a);let e=this.options.attributeValueProcessor(r,a,t);i[o]=e==null?a:typeof e!=typeof a||e!==a?e:rf(a,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[o]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){let e={};return e[this.options.attributesGroupName]=i,e}return i}}let Yd=function(e){e=e.replace(/\r\n?/g,`
|
|
19
|
+
`);let t=new Pd(`!xml`),n=t,r=``,i=``,a=new Fd(this.options.processEntities);for(let o=0;o<e.length;o++)if(e[o]===`<`)if(e[o+1]===`/`){let t=ef(e,`>`,o,`Closing Tag is not closed.`),a=e.substring(o+2,t).trim();if(this.options.removeNSPrefix){let e=a.indexOf(`:`);e!==-1&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&(r=this.saveTextToParentTag(r,n,i));let s=i.substring(i.lastIndexOf(`.`)+1);if(a&&this.options.unpairedTags.indexOf(a)!==-1)throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);let c=0;s&&this.options.unpairedTags.indexOf(s)!==-1?(c=i.lastIndexOf(`.`,i.lastIndexOf(`.`)-1),this.tagsNodeStack.pop()):c=i.lastIndexOf(`.`),i=i.substring(0,c),n=this.tagsNodeStack.pop(),r=``,o=t}else if(e[o+1]===`?`){let t=tf(e,o,!1,`?>`);if(!t)throw Error(`Pi Tag is not closed.`);if(r=this.saveTextToParentTag(r,n,i),!(this.options.ignoreDeclaration&&t.tagName===`?xml`||this.options.ignorePiTags)){let e=new Pd(t.tagName);e.add(this.options.textNodeName,``),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[`:@`]=this.buildAttributesMap(t.tagExp,i)),this.addChild(n,e,i,o)}o=t.closeIndex+1}else if(e.substr(o+1,3)===`!--`){let t=ef(e,`-->`,o+4,`Comment is not closed.`);if(this.options.commentPropName){let a=e.substring(o+4,t-2);r=this.saveTextToParentTag(r,n,i),n.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}o=t}else if(e.substr(o+1,2)===`!D`){let t=a.readDocType(e,o);this.docTypeEntities=t.entities,o=t.i}else if(e.substr(o+1,2)===`![`){let t=ef(e,`]]>`,o,`CDATA is not closed.`)-2,a=e.substring(o+9,t);r=this.saveTextToParentTag(r,n,i);let s=this.parseTextData(a,n.tagname,i,!0,!1,!0,!0);s??=``,this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):n.add(this.options.textNodeName,s),o=t+2}else{let a=tf(e,o,this.options.removeNSPrefix),s=a.tagName,c=a.rawTagName,l=a.tagExp,u=a.attrExpPresent,d=a.closeIndex;if(this.options.transformTagName){let e=this.options.transformTagName(s);l===s&&(l=e),s=e}n&&r&&n.tagname!==`!xml`&&(r=this.saveTextToParentTag(r,n,i,!1));let f=n;f&&this.options.unpairedTags.indexOf(f.tagname)!==-1&&(n=this.tagsNodeStack.pop(),i=i.substring(0,i.lastIndexOf(`.`))),s!==t.tagname&&(i+=i?`.`+s:s);let p=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,i,s)){let t=``;if(l.length>0&&l.lastIndexOf(`/`)===l.length-1)s[s.length-1]===`/`?(s=s.substr(0,s.length-1),i=i.substr(0,i.length-1),l=s):l=l.substr(0,l.length-1),o=a.closeIndex;else if(this.options.unpairedTags.indexOf(s)!==-1)o=a.closeIndex;else{let n=this.readStopNodeData(e,c,d+1);if(!n)throw Error(`Unexpected end of ${c}`);o=n.i,t=n.tagContent}let r=new Pd(s);s!==l&&u&&(r[`:@`]=this.buildAttributesMap(l,i)),t&&=this.parseTextData(t,s,i,!0,u,!0,!0),i=i.substr(0,i.lastIndexOf(`.`)),r.add(this.options.textNodeName,t),this.addChild(n,r,i,p)}else{if(l.length>0&&l.lastIndexOf(`/`)===l.length-1){if(s[s.length-1]===`/`?(s=s.substr(0,s.length-1),i=i.substr(0,i.length-1),l=s):l=l.substr(0,l.length-1),this.options.transformTagName){let e=this.options.transformTagName(s);l===s&&(l=e),s=e}let e=new Pd(s);s!==l&&u&&(e[`:@`]=this.buildAttributesMap(l,i)),this.addChild(n,e,i,p),i=i.substr(0,i.lastIndexOf(`.`))}else{let e=new Pd(s);this.tagsNodeStack.push(n),s!==l&&u&&(e[`:@`]=this.buildAttributesMap(l,i)),this.addChild(n,e,i,p),n=e}r=``,o=d}}else r+=e[o];return t.child};function Xd(e,t,n,r){this.options.captureMetaData||(r=void 0);let i=this.options.updateTag(t.tagname,n,t[`:@`]);!1===i||(typeof i==`string`&&(t.tagname=i),e.addChild(t,r))}let Zd=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){let n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){let n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){let n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Qd(e,t,n,r){return e&&=(r===void 0&&(r=t.child.length===0),(e=this.parseTextData(e,t.tagname,n,!1,!!t[`:@`]&&Object.keys(t[`:@`]).length!==0,r))!==void 0&&e!==``&&t.add(this.options.textNodeName,e),``),e}function $d(e,t,n,r){return!(!t||!t.has(r))||!(!e||!e.has(n))}function ef(e,t,n,r){let i=e.indexOf(t,n);if(i===-1)throw Error(r);return i+t.length-1}function tf(e,t,n){let r=function(e,t){let n,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:`>`,i=``;for(let a=t;a<e.length;a++){let t=e[a];if(n)t===n&&(n=``);else if(t===`"`||t===`'`)n=t;else if(t===r[0]){if(!r[1]||e[a+1]===r[1])return{data:i,index:a}}else t===` `&&(t=` `);i+=t}}(e,t+1,arguments.length>3&&arguments[3]!==void 0?arguments[3]:`>`);if(!r)return;let i=r.data,a=r.index,o=i.search(/\s/),s=i,c=!0;o!==-1&&(s=i.substring(0,o),i=i.substring(o+1).trimStart());let l=s;if(n){let e=s.indexOf(`:`);e!==-1&&(s=s.substr(e+1),c=s!==r.data.substr(e+1))}return{tagName:s,tagExp:i,closeIndex:a,attrExpPresent:c,rawTagName:l}}function nf(e,t,n){let r=n,i=1;for(;n<e.length;n++)if(e[n]===`<`)if(e[n+1]===`/`){let a=ef(e,`>`,n,`${t} is not closed`);if(e.substring(n+2,a).trim()===t&&(i--,i===0))return{tagContent:e.substring(r,n),i:a};n=a}else if(e[n+1]===`?`)n=ef(e,`?>`,n+1,`StopNode is not closed.`);else if(e.substr(n+1,3)===`!--`)n=ef(e,`-->`,n+3,`StopNode is not closed.`);else if(e.substr(n+1,2)===`![`)n=ef(e,`]]>`,n,`StopNode is not closed.`)-2;else{let r=tf(e,n,`>`);r&&((r&&r.tagName)===t&&r.tagExp[r.tagExp.length-1]!==`/`&&i++,n=r.closeIndex)}}function rf(e,t,n){if(t&&typeof e==`string`){let t=e.trim();return t===`true`||t!==`false`&&function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t=Object.assign({},Bd,t),!e||typeof e!=`string`)return e;let n=e.trim();if(t.skipLike!==void 0&&t.skipLike.test(n))return e;if(e===`0`)return 0;if(t.hex&&Rd.test(n))return function(e){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,16);throw Error(`parseInt, Number.parseInt, window.parseInt are not supported`)}(n);if(n.includes(`e`)||n.includes(`E`))return function(e,t,n){if(!n.eNotation)return e;let r=t.match(Vd);if(r){let i=r[1]||``,a=r[3].indexOf(`e`)===-1?`E`:`e`,o=r[2],s=i?e[o.length+1]===a:e[o.length]===a;return o.length>1&&s?e:o.length!==1||!r[3].startsWith(`.${a}`)&&r[3][0]!==a?n.leadingZeros&&!s?(t=(r[1]||``)+r[3],Number(t)):e:Number(t)}return e}(e,n,t);{let i=zd.exec(n);if(i){let a=i[1]||``,o=i[2],s=((r=i[3])&&r.indexOf(`.`)!==-1&&((r=r.replace(/0+$/,``))===`.`?r=`0`:r[0]===`.`?r=`0`+r:r[r.length-1]===`.`&&(r=r.substring(0,r.length-1))),r),c=a?e[o.length+1]===`.`:e[o.length]===`.`;if(!t.leadingZeros&&(o.length>1||o.length===1&&!c))return e;{let r=Number(n),i=String(r);if(r===0)return r;if(i.search(/[eE]/)!==-1)return t.eNotation?r:e;if(n.indexOf(`.`)!==-1)return i===`0`||i===s||i===`${a}${s}`?r:e;let c=o?s:n;return o?c===i||a+c===i?r:e:c===i||c===a+i?r:e}}return e}var r}(e,n)}return e===void 0?``:e}function af(e,t,n){let r=Number.parseInt(e,t);return r>=0&&r<=1114111?String.fromCodePoint(r):n+e+`;`}let of=Pd.getMetaDataSymbol();function sf(e,t){return cf(e,t)}function cf(e,t,n){let r,i={};for(let a=0;a<e.length;a++){let o=e[a],s=lf(o),c=``;if(c=n===void 0?s:n+`.`+s,s===t.textNodeName)r===void 0?r=o[s]:r+=``+o[s];else{if(s===void 0)continue;if(o[s]){let e=cf(o[s],t,c),n=df(e,t);o[of]!==void 0&&(e[of]=o[of]),o[`:@`]?uf(e,o[`:@`],c,t):Object.keys(e).length!==1||e[t.textNodeName]===void 0||t.alwaysCreateTextNode?Object.keys(e).length===0&&(t.alwaysCreateTextNode?e[t.textNodeName]=``:e=``):e=e[t.textNodeName],i[s]!==void 0&&i.hasOwnProperty(s)?(Array.isArray(i[s])||(i[s]=[i[s]]),i[s].push(e)):t.isArray(s,c,n)?i[s]=[e]:i[s]=e}}}return typeof r==`string`?r.length>0&&(i[t.textNodeName]=r):r!==void 0&&(i[t.textNodeName]=r),i}function lf(e){let t=Object.keys(e);for(let e=0;e<t.length;e++){let n=t[e];if(n!==`:@`)return n}}function uf(e,t,n,r){if(t){let i=Object.keys(t),a=i.length;for(let o=0;o<a;o++){let a=i[o];r.isArray(a,n+`.`+a,!0,!0)?e[a]=[t[a]]:e[a]=t[a]}}}function df(e,t){let{textNodeName:n}=t,r=Object.keys(e).length;return r===0||!(r!==1||!e[n]&&typeof e[n]!=`boolean`&&e[n]!==0)}let ff={allowBooleanAttributes:!1,unpairedTags:[]};function pf(e){return e===` `||e===` `||e===`
|
|
20
|
+
`||e===`\r`}function mf(e,t){let n=t;for(;t<e.length;t++)if(!(e[t]!=`?`&&e[t]!=` `)){let r=e.substr(n,t-n);if(t>5&&r===`xml`)return X(`InvalidXml`,`XML declaration allowed only at the start of the document.`,Z(e,t));if(e[t]==`?`&&e[t+1]==`>`){t++;break}}return t}function hf(e,t){if(e.length>t+5&&e[t+1]===`-`&&e[t+2]===`-`){for(t+=3;t<e.length;t++)if(e[t]===`-`&&e[t+1]===`-`&&e[t+2]===`>`){t+=2;break}}else if(e.length>t+8&&e[t+1]===`D`&&e[t+2]===`O`&&e[t+3]===`C`&&e[t+4]===`T`&&e[t+5]===`Y`&&e[t+6]===`P`&&e[t+7]===`E`){let n=1;for(t+=8;t<e.length;t++)if(e[t]===`<`)n++;else if(e[t]===`>`&&(n--,n===0))break}else if(e.length>t+9&&e[t+1]===`[`&&e[t+2]===`C`&&e[t+3]===`D`&&e[t+4]===`A`&&e[t+5]===`T`&&e[t+6]===`A`&&e[t+7]===`[`){for(t+=8;t<e.length;t++)if(e[t]===`]`&&e[t+1]===`]`&&e[t+2]===`>`){t+=2;break}}return t}function gf(e,t){let n=``,r=``,i=!1;for(;t<e.length;t++){if(e[t]===`"`||e[t]===`'`)r===``?r=e[t]:r!==e[t]||(r=``);else if(e[t]===`>`&&r===``){i=!0;break}n+=e[t]}return r===``&&{value:n,index:t,tagClosed:i}}let _f=RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,`g`);function vf(e,t){let n=jd(e,_f),r={};for(let e=0;e<n.length;e++){if(n[e][1].length===0)return X(`InvalidAttr`,`Attribute '`+n[e][2]+`' has no space in starting.`,xf(n[e]));if(n[e][3]!==void 0&&n[e][4]===void 0)return X(`InvalidAttr`,`Attribute '`+n[e][2]+`' is without value.`,xf(n[e]));if(n[e][3]===void 0&&!t.allowBooleanAttributes)return X(`InvalidAttr`,`boolean attribute '`+n[e][2]+`' is not allowed.`,xf(n[e]));let i=n[e][2];if(!bf(i))return X(`InvalidAttr`,`Attribute '`+i+`' is an invalid name.`,xf(n[e]));if(r.hasOwnProperty(i))return X(`InvalidAttr`,`Attribute '`+i+`' is repeated.`,xf(n[e]));r[i]=1}return!0}function yf(e,t){if(e[++t]===`;`)return-1;if(e[t]===`#`)return function(e,t){let n=/\d/;for(e[t]===`x`&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(e[t]===`;`)return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(e[t]===`;`)break;return-1}return t}function X(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function bf(e){return Md(e)}function Z(e,t){let n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function xf(e){return e.startIndex+e[1].length}var Sf=class{constructor(e){this.externalEntities={},this.options=function(e){return Object.assign({},kd,e)}(e)}parse(e,t){if(typeof e!=`string`&&e.toString)e=e.toString();else if(typeof e!=`string`)throw Error(`XML data is accepted in String or Bytes[] form.`);if(t){!0===t&&(t={});let n=function(e,t){t=Object.assign({},ff,t);let n=[],r=!1,i=!1;e[0]===``&&(e=e.substr(1));for(let a=0;a<e.length;a++)if(e[a]===`<`&&e[a+1]===`?`){if(a+=2,a=mf(e,a),a.err)return a}else{if(e[a]!==`<`){if(pf(e[a]))continue;return X(`InvalidChar`,`char '`+e[a]+`' is not expected.`,Z(e,a))}{let o=a;if(a++,e[a]===`!`){a=hf(e,a);continue}{let s=!1;e[a]===`/`&&(s=!0,a++);let c=``;for(;a<e.length&&e[a]!==`>`&&e[a]!==` `&&e[a]!==` `&&e[a]!==`
|
|
21
|
+
`&&e[a]!==`\r`;a++)c+=e[a];if(c=c.trim(),c[c.length-1]===`/`&&(c=c.substring(0,c.length-1),a--),!Md(c)){let t;return t=c.trim().length===0?`Invalid space after '<'.`:`Tag '`+c+`' is an invalid name.`,X(`InvalidTag`,t,Z(e,a))}let l=gf(e,a);if(!1===l)return X(`InvalidAttr`,`Attributes for '`+c+`' have open quote.`,Z(e,a));let u=l.value;if(a=l.index,u[u.length-1]===`/`){let n=a-u.length;u=u.substring(0,u.length-1);let i=vf(u,t);if(!0!==i)return X(i.err.code,i.err.msg,Z(e,n+i.err.line));r=!0}else if(s){if(!l.tagClosed)return X(`InvalidTag`,`Closing tag '`+c+`' doesn't have proper closing.`,Z(e,a));if(u.trim().length>0)return X(`InvalidTag`,`Closing tag '`+c+`' can't have attributes or invalid starting.`,Z(e,o));if(n.length===0)return X(`InvalidTag`,`Closing tag '`+c+`' has not been opened.`,Z(e,o));{let t=n.pop();if(c!==t.tagName){let n=Z(e,t.tagStartPos);return X(`InvalidTag`,`Expected closing tag '`+t.tagName+`' (opened in line `+n.line+`, col `+n.col+`) instead of closing tag '`+c+`'.`,Z(e,o))}n.length==0&&(i=!0)}}else{let s=vf(u,t);if(!0!==s)return X(s.err.code,s.err.msg,Z(e,a-u.length+s.err.line));if(!0===i)return X(`InvalidXml`,`Multiple possible root nodes found.`,Z(e,a));t.unpairedTags.indexOf(c)!==-1||n.push({tagName:c,tagStartPos:o}),r=!0}for(a++;a<e.length;a++)if(e[a]===`<`){if(e[a+1]===`!`){a++,a=hf(e,a);continue}if(e[a+1]!==`?`)break;if(a=mf(e,++a),a.err)return a}else if(e[a]===`&`){let t=yf(e,a);if(t==-1)return X(`InvalidChar`,`char '&' is not expected.`,Z(e,a));a=t}else if(!0===i&&!pf(e[a]))return X(`InvalidXml`,`Extra text at the end`,Z(e,a));e[a]===`<`&&a--}}}return r?n.length==1?X(`InvalidTag`,`Unclosed tag '`+n[0].tagName+`'.`,Z(e,n[0].tagStartPos)):!(n.length>0)||X(`InvalidXml`,`Invalid '`+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,``)+`' found.`,{line:1,col:1}):X(`InvalidXml`,`Start tag expected.`,1)}(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}let n=new Ud(this.options);n.addExternalEntities(this.externalEntities);let r=n.parseXml(e);return this.options.preserveOrder||r===void 0?r:sf(r,this.options)}addEntity(e,t){if(t.indexOf(`&`)!==-1)throw Error(`Entity value can't have '&'`);if(e.indexOf(`&`)!==-1||e.indexOf(`;`)!==-1)throw Error(`An entity must be set without '&' and ';'. Eg. use '#xD' for '
'`);if(t===`&`)throw Error(`An entity with value '&' is not permitted`);this.externalEntities[e]=t}static getMetaDataSymbol(){return Pd.getMetaDataSymbol()}},Cf=V(829),wf=V.n(Cf),Tf=function(e){return e.Array=`array`,e.Object=`object`,e.Original=`original`,e}(Tf||{});function Ef(e,t){if(!e.endsWith(`propstat.prop.displayname`))return t}function Df(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tf.Original,r=wf().get(e,t);return n===`array`&&!1===Array.isArray(r)?[r]:n===`object`&&Array.isArray(r)?r[0]:r}function Of(e,t){return t??={attributeNamePrefix:`@`,attributeParsers:[],tagParsers:[Ef]},new Promise((n=>{n(function(e){let{multistatus:t}=e;if(t===``)return{multistatus:{response:[]}};if(!t)throw Error(`Invalid response: No root multistatus found`);let n={multistatus:Array.isArray(t)?t[0]:t};return wf().set(n,`multistatus.response`,Df(n,`multistatus.response`,Tf.Array)),wf().set(n,`multistatus.response`,wf().get(n,`multistatus.response`).map((e=>function(e){let t=Object.assign({},e);return t.status?wf().set(t,`status`,Df(t,`status`,Tf.Object)):(wf().set(t,`propstat`,Df(t,`propstat`,Tf.Object)),wf().set(t,`propstat.prop`,Df(t,`propstat.prop`,Tf.Object))),t}(e)))),n}(function(e){let{attributeNamePrefix:t,attributeParsers:n,tagParsers:r}=e;return new Sf({allowBooleanAttributes:!0,attributeNamePrefix:t,textNodeName:`text`,ignoreAttributes:!1,removeNSPrefix:!0,numberParseOptions:{hex:!0,leadingZeros:!1},attributeValueProcessor(e,t,r){for(let e of n)try{let n=e(r,t);if(n!==t)return n}catch{}return t},tagValueProcessor(e,t,n){for(let e of r)try{let r=e(n,t);if(r!==t)return r}catch{}return t}})}(t).parse(e)))}))}function kf(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],{getlastmodified:r=null,getcontentlength:i=`0`,resourcetype:a=null,getcontenttype:o=null,getetag:s=null}=e,c=a&&typeof a==`object`&&a.collection!==void 0?`directory`:`file`,l={filename:t,basename:Ql().basename(t),lastmod:r,size:parseInt(i,10),type:c,etag:typeof s==`string`?s.replace(/"/g,``):null};return c===`file`&&(l.mime=o&&typeof o==`string`?o.split(`;`)[0]:``),n&&(e.displayname!==void 0&&(e.displayname=String(e.displayname)),l.props=e),l}function Af(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=null;try{e.multistatus.response[0].propstat&&(r=e.multistatus.response[0])}catch{}if(!r)throw Error(`Failed getting item stat: bad response`);let{propstat:{prop:i,status:a}}=r,[o,s,c]=a.split(` `,3),l=parseInt(s,10);if(l>=400){let e=Error(`Invalid response: ${l} ${c}`);throw e.status=l,e}return kf(i,nu(t),n)}function jf(e){switch(String(e)){case`-3`:return`unlimited`;case`-2`:case`-1`:return`unknown`;default:return parseInt(String(e),10)}}function Mf(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Nf=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{details:r=!1}=n;return Mf(G(K({url:U(e.remoteURL,H(t)),method:`PROPFIND`,headers:{Accept:`text/plain,application/xml`,Depth:`0`}},e,n),e),(function(n){return J(e,n),Mf(n.text(),(function(i){return Mf(Of(i,e.parsing),(function(e){return Ed(n,Af(e,t,r),r)}))}))}))}));function Pf(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Ff=If((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=function(e){if(!e||e===`/`)return[];let t=e,n=[];do n.push(t),t=Ql().dirname(t);while(t&&t!==`/`);return n}(nu(t));r.sort(((e,t)=>e.length>t.length?1:t.length>e.length?-1:0));let i=!1;return function(e,t,n){if(typeof e[zf]==`function`){var r,i,a,o=e[zf]();function n(e){try{for(;!(r=o.next()).done;)if((e=t(r.value))&&e.then){if(!Vf(e))return void e.then(n,a||=Q.bind(null,i=new Bf,2));e=e.v}i?Q(i,1,e):i=e}catch(e){Q(i||=new Bf,2,e)}}if(n(),o.return){var s=function(e){try{r.done||o.return()}catch{}return e};if(i&&i.then)return i.then(s,(function(e){throw s(e)}));s()}return i}if(!(`length`in e))throw TypeError(`Object is not iterable`);for(var c=[],l=0;l<e.length;l++)c.push(e[l]);return function(e,t,n){var r,i,a=-1;return function o(s){try{for(;++a<e.length&&(!n||!n());)if((s=t(a))&&s.then){if(!Vf(s))return void s.then(o,i||=Q.bind(null,r=new Bf,2));s=s.v}r?Q(r,1,s):r=s}catch(e){Q(r||=new Bf,2,e)}}(),r}(c,(function(e){return t(c[e])}),n)}(r,(function(r){return a=function(){return function(n,i){try{var a=Pf(Nf(e,r),(function(e){if(e.type!==`directory`)throw Error(`Path includes a file: ${t}`)}))}catch(e){return i(e)}return a&&a.then?a.then(void 0,i):a}(0,(function(t){let a=t;return function(){if(a.status===404)return i=!0,Rf(Hf(e,r,{...n,recursive:!1}));throw t}()}))},(o=function(){if(i)return Rf(Hf(e,r,{...n,recursive:!1}))}())&&o.then?o.then(a):a();var a,o}),(function(){return!1}))}));function If(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}function Lf(){}function Rf(e,t){if(!t)return e&&e.then?e.then(Lf):Promise.resolve()}let zf=typeof Symbol<`u`?Symbol.iterator||(Symbol.iterator=Symbol(`Symbol.iterator`)):`@@iterator`;function Q(e,t,n){if(!e.s){if(n instanceof Bf){if(!n.s)return void(n.o=Q.bind(null,e,t));1&t&&(t=n.s),n=n.v}if(n&&n.then)return void n.then(Q.bind(null,e,t),Q.bind(null,e,2));e.s=t,e.v=n;let r=e.o;r&&r(e)}}let Bf=function(){function e(){}return e.prototype.then=function(t,n){let r=new e,i=this.s;if(i){let e=1&i?t:n;if(e){try{Q(r,1,e(this.v))}catch(e){Q(r,2,e)}return r}return this}return this.o=function(e){try{let i=e.v;1&e.s?Q(r,1,t?t(i):i):n?Q(r,1,n(i)):Q(r,2,i)}catch(e){Q(r,2,e)}},r},e}();function Vf(e){return e instanceof Bf&&1&e.s}let Hf=If((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!0===n.recursive)return Ff(e,t,n);let r=K({url:U(e.remoteURL,(i=H(t),i.endsWith(`/`)?i:i+`/`)),method:`MKCOL`},e,n);var i;return Pf(G(r,e),(function(t){J(e,t)}))}));var Uf=V(388),Wf=V.n(Uf);let Gf=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r={};if(typeof n.range==`object`&&typeof n.range.start==`number`){let e=`bytes=${n.range.start}-`;typeof n.range.end==`number`&&(e=`${e}${n.range.end}`),r.Range=e}let i=K({url:U(e.remoteURL,H(t)),method:`GET`,headers:r},e,n);return o=function(t){if(J(e,t),r.Range&&t.status!==206){let e=Error(`Invalid response code for partial request: ${t.status}`);throw e.status=t.status,e}return n.callback&&setTimeout((()=>{n.callback(t)}),0),t.body},(a=G(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o})),Kf=()=>{},qf=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,n){n.url||=U(e.remoteURL,H(t));let r=K(n,e,{});return a=function(t){return J(e,t),t},(i=G(r,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a})),Jf=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=K({url:U(e.remoteURL,H(t)),method:`DELETE`},e,n);return a=function(t){J(e,t)},(i=G(r,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a})),Yf=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return function(r,i){try{var a=(o=Nf(e,t,n),s=function(){return!0},c?s?s(o):o:(o&&o.then||(o=Promise.resolve(o)),s?o.then(s):o))}catch(e){return i(e)}var o,s,c;return a&&a.then?a.then(void 0,i):a}(0,(function(e){if(e.status===404)return!1;throw e}))}));function Xf(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Zf=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Xf(G(K({url:U(e.remoteURL,H(t),`/`),method:`PROPFIND`,headers:{Accept:`text/plain,application/xml`,Depth:n.deep?`infinity`:`1`}},e,n),e),(function(r){return J(e,r),Xf(r.text(),(function(i){if(!i)throw Error(`Failed parsing directory contents: Empty response`);return Xf(Of(i,e.parsing),(function(i){let a=tu(t),o=function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3],i=arguments.length>4&&arguments[4]!==void 0&&arguments[4],a=Ql().join(t,`/`),{multistatus:{response:o}}=e,s=o.map((e=>{let t=function(e){try{return e.replace(/^https?:\/\/[^\/]+/,``)}catch(e){throw new Xl(e,`Failed normalising HREF`)}}(e.href),{propstat:{prop:n}}=e;return kf(n,a===`/`?decodeURIComponent(nu(t)):nu(Ql().relative(decodeURIComponent(a),decodeURIComponent(t))),r)}));return i?s:s.filter((e=>e.basename&&(e.type===`file`||e.filename!==n.replace(/\/$/,``))))}(i,tu(e.remoteBasePath||e.remotePath),a,n.details,n.includeSelf);return n.glob&&(o=function(e,t){return e.filter((e=>q(e.filename,t,{matchBase:!0})))}(o,n.glob)),Ed(r,o,n.details)}))}))}))}));function Qf(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}let $f=Qf((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ep(G(K({url:U(e.remoteURL,H(t)),method:`GET`,headers:{Accept:`text/plain`},transformResponse:[rp]},e,n),e),(function(t){return J(e,t),ep(t.text(),(function(e){return Ed(t,e,n.details)}))}))}));function ep(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let tp=Qf((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return ep(G(K({url:U(e.remoteURL,H(t)),method:`GET`},e,n),e),(function(t){let r;return J(e,t),function(e,t){var n=e();return n&&n.then?n.then(t):t()}((function(){return ep(t.arrayBuffer(),(function(e){r=e}))}),(function(){return Ed(t,r,n.details)}))}))})),np=Qf((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{format:r=`binary`}=n;if(r!==`binary`&&r!==`text`)throw new Xl({info:{code:mu.InvalidOutputFormat}},`Invalid output format: ${r}`);return r===`text`?$f(e,t,n):tp(e,t,n)})),rp=e=>e;function ip(e,t){let n=``;return t.format&&t.indentBy.length>0&&(n=`
|
|
22
|
+
`),ap(e,t,``,n)}function ap(e,t,n,r){let i=``,a=!1;for(let o=0;o<e.length;o++){let s=e[o],c=op(s);if(c===void 0)continue;let l=``;if(l=n.length===0?c:`${n}.${c}`,c===t.textNodeName){let e=s[c];cp(l,t)||(e=t.tagValueProcessor(c,e),e=lp(e,t)),a&&(i+=r),i+=e,a=!1;continue}if(c===t.cdataPropName){a&&(i+=r),i+=`<![CDATA[${s[c][0][t.textNodeName]}]]>`,a=!1;continue}if(c===t.commentPropName){i+=r+`\x3c!--${s[c][0][t.textNodeName]}--\x3e`,a=!0;continue}if(c[0]===`?`){let e=sp(s[`:@`],t),n=c===`?xml`?``:r,o=s[c][0][t.textNodeName];o=o.length===0?``:` `+o,i+=n+`<${c}${o}${e}?>`,a=!0;continue}let u=r;u!==``&&(u+=t.indentBy);let d=r+`<${c}${sp(s[`:@`],t)}`,f=ap(s[c],t,l,u);t.unpairedTags.indexOf(c)===-1?f&&f.length!==0||!t.suppressEmptyNode?f&&f.endsWith(`>`)?i+=d+`>${f}${r}</${c}>`:(i+=d+`>`,f&&r!==``&&(f.includes(`/>`)||f.includes(`</`))?i+=r+t.indentBy+f+r:i+=f,i+=`</${c}>`):i+=d+`/>`:t.suppressUnpairedNode?i+=d+`>`:i+=d+`/>`,a=!0}return i}function op(e){let t=Object.keys(e);for(let n=0;n<t.length;n++){let r=t[n];if(e.hasOwnProperty(r)&&r!==`:@`)return r}}function sp(e,t){let n=``;if(e&&!t.ignoreAttributes)for(let r in e){if(!e.hasOwnProperty(r))continue;let i=t.attributeValueProcessor(r,e[r]);i=lp(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function cp(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(`.`)+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]===`*.`+n)return!0;return!1}function lp(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){let r=t.entities[n];e=e.replace(r.regex,r.val)}return e}let up={attributeNamePrefix:`@_`,attributesGroupName:!1,textNodeName:`#text`,ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:` `,suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:RegExp(`&`,`g`),val:`&`},{regex:RegExp(`>`,`g`),val:`>`},{regex:RegExp(`<`,`g`),val:`<`},{regex:RegExp(`'`,`g`),val:`'`},{regex:RegExp(`"`,`g`),val:`"`}],processEntities:!0,stopNodes:[],oneListGroup:!1};function dp(e){this.options=Object.assign({},up,e),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=Hd(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=mp),this.processTextOrObjNode=fp,this.options.format?(this.indentate=pp,this.tagEndChar=`>
|
|
23
|
+
`,this.newLine=`
|
|
24
|
+
`):(this.indentate=function(){return``},this.tagEndChar=`>`,this.newLine=``)}function fp(e,t,n,r){let i=this.j2x(e,n+1,r.concat(t));return e[this.options.textNodeName]!==void 0&&Object.keys(e).length===1?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,n):this.buildObjectNode(i.val,t,i.attrStr,n)}function pp(e){return this.options.indentBy.repeat(e)}function mp(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}function hp(e){return new dp({attributeNamePrefix:`@_`,format:!0,ignoreAttributes:!1,suppressEmptyNode:!0}).build(gp({lockinfo:{"@_xmlns:d":`DAV:`,lockscope:{exclusive:{}},locktype:{write:{}},owner:{href:e}}},`d`))}function gp(e,t){let n={...e};for(let e in n)n.hasOwnProperty(e)&&(n[e]&&typeof n[e]==`object`&&e.indexOf(`:`)===-1?(n[`${t}:${e}`]=gp(n[e],t),delete n[e]):!1===/^@_/.test(e)&&(n[`${t}:${e}`]=n[e],delete n[e]));return n}function _p(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}function vp(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}dp.prototype.build=function(e){return this.options.preserveOrder?ip(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0,[]).val)},dp.prototype.j2x=function(e,t,n){let r=``,i=``,a=n.join(`.`);for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(e[o]===void 0)this.isAttribute(o)&&(i+=``);else if(e[o]===null)this.isAttribute(o)||o===this.options.cdataPropName?i+=``:o[0]===`?`?i+=this.indentate(t)+`<`+o+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+o+`/`+this.tagEndChar;else if(e[o]instanceof Date)i+=this.buildTextValNode(e[o],o,``,t);else if(typeof e[o]!=`object`){let n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,a))r+=this.buildAttrPairStr(n,``+e[o]);else if(!n)if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,``+e[o]);i+=this.replaceEntitiesValue(t)}else i+=this.buildTextValNode(e[o],o,``,t)}else if(Array.isArray(e[o])){let r=e[o].length,a=``,s=``;for(let c=0;c<r;c++){let r=e[o][c];if(r!==void 0)if(r===null)o[0]===`?`?i+=this.indentate(t)+`<`+o+`?`+this.tagEndChar:i+=this.indentate(t)+`<`+o+`/`+this.tagEndChar;else if(typeof r==`object`)if(this.options.oneListGroup){let e=this.j2x(r,t+1,n.concat(o));a+=e.val,this.options.attributesGroupName&&r.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else a+=this.processTextOrObjNode(r,o,t,n);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(o,r);e=this.replaceEntitiesValue(e),a+=e}else a+=this.buildTextValNode(r,o,``,t)}this.options.oneListGroup&&(a=this.buildObjectNode(a,o,s,t)),i+=a}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){let t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],``+e[o][t[i]])}else i+=this.processTextOrObjNode(e[o],o,t,n);return{attrStr:r,val:i}},dp.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,``+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&t===`true`?` `+e:` `+e+`="`+t+`"`},dp.prototype.buildObjectNode=function(e,t,n,r){if(e===``)return t[0]===`?`?this.indentate(r)+`<`+t+n+`?`+this.tagEndChar:this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar;{let i=`</`+t+this.tagEndChar,a=``;return t[0]===`?`&&(a=`?`,i=``),!n&&n!==``||e.indexOf(`<`)!==-1?!1!==this.options.commentPropName&&t===this.options.commentPropName&&a.length===0?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+`<`+t+n+a+this.tagEndChar+e+this.indentate(r)+i:this.indentate(r)+`<`+t+n+a+`>`+e+i}},dp.prototype.closeTag=function(e){let t=``;return this.options.unpairedTags.indexOf(e)===-1?t=this.options.suppressEmptyNode?`/`:`></${e}`:this.options.suppressUnpairedNode||(t=`/`),t},dp.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if(t[0]===`?`)return this.indentate(r)+`<`+t+n+`?`+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),i===``?this.indentate(r)+`<`+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+`<`+t+n+`>`+i+`</`+t+this.tagEndChar}},dp.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){let n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e};let yp=vp((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return _p(G(K({url:U(e.remoteURL,H(t)),method:`UNLOCK`,headers:{"Lock-Token":n}},e,r),e),(function(t){if(J(e,t),t.status!==204&&t.status!==200)throw Td(t)}))})),bp=vp((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{refreshToken:r,timeout:i=xp}=n,a={Accept:`text/plain,application/xml`,Timeout:i};return r&&(a.If=r),_p(G(K({url:U(e.remoteURL,H(t)),method:`LOCK`,headers:a,data:hp(e.contactHref)},e,n),e),(function(t){return J(e,t),_p(t.text(),(function(e){let n=(a=e,new Sf({removeNSPrefix:!0,parseAttributeValue:!0,parseTagValue:!0}).parse(a)),r=wf().get(n,`prop.lockdiscovery.activelock.locktoken.href`),i=wf().get(n,`prop.lockdiscovery.activelock.timeout`);var a;if(!r)throw Td(t,`No lock token received: `);return{token:r,serverTimeout:i}}))}))})),xp=`Infinite, Second-4100000000`;function Sp(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Cp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.path||`/`;return Sp(G(K({url:U(e.remoteURL,n),method:`PROPFIND`,headers:{Accept:`text/plain,application/xml`,Depth:`0`}},e,t),e),(function(n){return J(e,n),Sp(n.text(),(function(r){return Sp(Of(r,e.parsing),(function(e){return Ed(n,function(e){try{let[t]=e.multistatus.response,{propstat:{prop:{"quota-used-bytes":n,"quota-available-bytes":r}}}=t;return n!==void 0&&r!==void 0?{used:parseInt(String(n),10),available:jf(r)}:null}catch{}return null}(e),t.details)}))}))}))}));function wp(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Tp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},{details:r=!1}=n;return wp(G(K({url:U(e.remoteURL,H(t)),method:`SEARCH`,headers:{Accept:`text/plain,application/xml`,"Content-Type":e.headers[`Content-Type`]||`application/xml; charset=utf-8`}},e,n),e),(function(n){return J(e,n),wp(n.text(),(function(i){return wp(Of(i,e.parsing),(function(e){return Ed(n,function(e,t,n){let r={truncated:!1,results:[]};return r.truncated=e.multistatus.response.some((e=>(e.status||e.propstat?.status).split(` `,3)?.[1]===`507`&&e.href.replace(/\/$/,``).endsWith(H(t).replace(/\/$/,``)))),e.multistatus.response.forEach((e=>{if(e.propstat===void 0)return;let t=e.href.split(`/`).map(decodeURIComponent).join(`/`);r.results.push(kf(e.propstat.prop,t,n))})),r}(e,t,r),r)}))}))}))})),Ep=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},i=K({url:U(e.remoteURL,H(t)),method:`MOVE`,headers:{Destination:U(e.remoteURL,H(n)),Overwrite:!1===r.overwrite?`F`:`T`}},e,r);return o=function(t){J(e,t)},(a=G(i,e))&&a.then||(a=Promise.resolve(a)),o?a.then(o):a;var a,o}));var Dp=V(172);function Op(e){if(ku(e))return e.byteLength;if(Au(e))return e.length;if(typeof e==`string`)return(0,Dp.d)(e);throw new Xl({info:{code:mu.DataTypeNoLength}},`Cannot calculate data length: Invalid type`)}let kp=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},{contentLength:i=!0,overwrite:a=!0}=r,o={"Content-Type":`application/octet-stream`};!1===i||(o[`Content-Length`]=typeof i==`number`?`${i}`:`${Op(n)}`),a||(o[`If-None-Match`]=`*`);let s=K({url:U(e.remoteURL,H(t)),method:`PUT`,headers:o,data:n},e,r);return l=function(t){try{J(e,t)}catch(e){let t=e;if(t.status!==412||a)throw t;return!1}return!0},(c=G(s,e))&&c.then||(c=Promise.resolve(c)),l?c.then(l):c;var c,l})),Ap=function(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}((function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=K({url:U(e.remoteURL,H(t)),method:`OPTIONS`},e,n);return a=function(t){try{J(e,t)}catch(e){throw e}return{compliance:(t.headers.get(`DAV`)??``).split(`,`).map((e=>e.trim())),server:t.headers.get(`Server`)??``}},(i=G(r,e))&&i.then||(i=Promise.resolve(i)),a?i.then(a):i;var i,a}));function jp(e,t,n){return n?t?t(e):e:(e&&e.then||(e=Promise.resolve(e)),t?e.then(t):e)}let Mp=Fp((function(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new Xl({info:{code:mu.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);let o={"Content-Type":`application/octet-stream`,"Content-Length":``+(r-n+1),"Content-Range":`bytes ${n}-${r}/*`};return jp(G(K({url:U(e.remoteURL,H(t)),method:`PUT`,headers:o,data:i},e,a),e),(function(t){J(e,t)}))}));function Np(e,t){var n=e();return n&&n.then?n.then(t):t(n)}let Pp=Fp((function(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};if(n>r||n<0)throw new Xl({info:{code:mu.InvalidUpdateRange}},`Invalid update range ${n} for partial update`);let o={"Content-Type":`application/x-sabredav-partialupdate`,"Content-Length":``+(r-n+1),"X-Update-Range":`bytes=${n}-${r}`};return jp(G(K({url:U(e.remoteURL,H(t)),method:`PATCH`,headers:o,data:i},e,a),e),(function(t){J(e,t)}))}));function Fp(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];try{return Promise.resolve(e.apply(this,t))}catch(e){return Promise.reject(e)}}}let Ip=Fp((function(e,t,n,r,i){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{};return jp(Ap(e,t,a),(function(o){let s=!1;return Np((function(){if(o.compliance.includes(`sabredav-partialupdate`))return jp(Pp(e,t,n,r,i,a),(function(e){return s=!0,e}))}),(function(c){let l=!1;return s?c:Np((function(){if(o.server.includes(`Apache`)&&o.compliance.includes(`<http://apache.org/dav/propset/fs/1>`))return jp(Mp(e,t,n,r,i,a),(function(e){return l=!0,e}))}),(function(e){if(l)return e;throw new Xl({info:{code:mu.NotSupported}},`Not supported`)}))}))}))}));function Lp(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},{authType:n=null,remoteBasePath:r,contactHref:i=`https://github.com/perry-mitchell/webdav-client/blob/master/LOCK_CONTACT.md`,ha1:a,headers:o={},httpAgent:s,httpsAgent:c,password:l,token:u,username:d,withCredentials:f}=t,p=n;p||=d||l?W.Password:W.None;let m={authType:p,remoteBasePath:r,contactHref:i,ha1:a,headers:Object.assign({},o),httpAgent:s,httpsAgent:c,password:l,parsing:{attributeNamePrefix:t.attributeNamePrefix??`@`,attributeParsers:[],tagParsers:[Ef]},remotePath:ru(e),remoteURL:e,token:u,username:d,withCredentials:f};return hu(m,d,l,u,a),{copyFile:(e,t,n)=>Dd(m,e,t,n),createDirectory:(e,t)=>Hf(m,e,t),createReadStream:(e,t)=>function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=new(Wf()).PassThrough;return Gf(e,t,n).then((e=>{e.pipe(r)})).catch((e=>{r.emit(`error`,e)})),r}(m,e,t),createWriteStream:(e,t,n)=>function(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Kf,i=new(Wf()).PassThrough,a={};return!1===n.overwrite&&(a[`If-None-Match`]=`*`),G(K({url:U(e.remoteURL,H(t)),method:`PUT`,headers:a,data:i,maxRedirects:0},e,n),e).then((t=>J(e,t))).then((e=>{setTimeout((()=>{r(e)}),0)})).catch((e=>{i.emit(`error`,e)})),i}(m,e,t,n),customRequest:(e,t)=>qf(m,e,t),deleteFile:(e,t)=>Jf(m,e,t),exists:(e,t)=>Yf(m,e,t),getDirectoryContents:(e,t)=>Zf(m,e,t),getFileContents:(e,t)=>np(m,e,t),getFileDownloadLink:e=>function(e,t){let n=U(e.remoteURL,H(t)),r=/^https:/i.test(n)?`https`:`http`;switch(e.authType){case W.None:break;case W.Password:{let t=uu(e.headers.Authorization.replace(/^Basic /i,``).trim());n=n.replace(/^https?:\/\//,`${r}://${t}@`);break}default:throw new Xl({info:{code:mu.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${e.authType}`)}return n}(m,e),getFileUploadLink:e=>function(e,t){let n=`${U(e.remoteURL,H(t))}?Content-Type=application/octet-stream`,r=/^https:/i.test(n)?`https`:`http`;switch(e.authType){case W.None:break;case W.Password:{let t=uu(e.headers.Authorization.replace(/^Basic /i,``).trim());n=n.replace(/^https?:\/\//,`${r}://${t}@`);break}default:throw new Xl({info:{code:mu.LinkUnsupportedAuthType}},`Unsupported auth type for file link: ${e.authType}`)}return n}(m,e),getHeaders:()=>Object.assign({},m.headers),getQuota:e=>Cp(m,e),lock:(e,t)=>bp(m,e,t),moveFile:(e,t,n)=>Ep(m,e,t,n),putFileContents:(e,t,n)=>kp(m,e,t,n),partialUpdateFileContents:(e,t,n,r,i)=>Ip(m,e,t,n,r,i),getDAVCompliance:e=>Ap(m,e),search:(e,t)=>Tp(m,e,t),setHeaders:e=>{m.headers=Object.assign({},e)},stat:(e,t)=>Nf(m,e,t),unlock:(e,t,n)=>yp(m,e,t,n),registerAttributeParser:e=>{m.parsing.attributeParsers.push(e)},registerTagParser:e=>{m.parsing.tagParsers.push(e)}}}let $=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Rp(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}let zp,Bp=new Uint8Array(16);function Vp(){if(!zp){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);zp=crypto.getRandomValues.bind(crypto)}return zp(Bp)}var Hp={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Up(e,t,n){e||={};let r=e.random??e.rng?.()??Vp();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Rp(r)}function Wp(e,t,n){return Hp.randomUUID&&!t&&!e?Hp.randomUUID():Up(e,t,n)}let Gp=(e,t)=>Object.fromEntries(Object.entries(e).map(([e,n])=>t.includes(e)?[e,n||``]:[Qn.DavNamespace.includes(e)?`d:${e}`:`oc:${e}`,n||``])),Kp=(e=[],{pattern:t,filterRules:n,limit:r=0,extraProps:i=[]})=>{let a=`d:propfind`;t&&(a=`oc:search-files`),n&&(a=`oc:filter-files`);let o=Gp(e.reduce((e,t)=>Object.assign(e,{[t]:null}),{}),i),s={[a]:{"d:prop":o,"@@xmlns:d":`DAV:`,"@@xmlns:oc":`http://owncloud.org/ns`,...t&&{"oc:search":{"oc:pattern":t,"oc:limit":r}},...n&&{"oc:filter-rules":Gp(n,[])}}};return new Tl({format:!0,ignoreAttributes:!1,attributeNamePrefix:`@@`,suppressEmptyNode:!0}).build(s)},qp=e=>{let t={"d:propertyupdate":{"d:set":{"d:prop":Gp(e,[])},"@@xmlns:d":`DAV:`,"@@xmlns:oc":`http://owncloud.org/ns`}};return new Tl({format:!0,ignoreAttributes:!1,attributeNamePrefix:`@@`,suppressEmptyNode:!0}).build(t)},Jp=e=>{let t={},n=e.get(`tus-version`);return n?(t.version=n.split(`,`),e.get(`tus-extension`)&&(t.extension=e.get(`tus-extension`).split(`,`)),e.get(`tus-resumable`)&&(t.resumable=e.get(`tus-resumable`)),e.get(`tus-max-size`)&&(t.maxSize=parseInt(e.get(`tus-max-size`),10)),t):null},Yp=async e=>{let t=e=>{let t=decodeURIComponent(e);return e?.startsWith(`/remote.php/dav/`)?M(t.replace(`/remote.php/dav/`,``),{leadingSlash:!0,trailingSlash:!1}):t};return(await Of(e)).multistatus.response.map(({href:e,propstat:n})=>{let r={...kf(n.prop,t(e),!0),processing:n.status===`HTTP/1.1 425 TOO EARLY`};return r.props.name&&(r.props.name=r.props.name.toString()),r})},Xp=e=>{let t=new ul,n={message:`Unknown error`,errorCode:void 0};try{let r=t.parse(e);if(!r[`d:error`])return n;if(r[`d:error`][`s:message`]){let e=r[`d:error`][`s:message`];typeof e==`string`&&(n.message=e)}if(r[`d:error`][`s:errorcode`]){let e=r[`d:error`][`s:errorcode`];typeof e==`string`&&(n.errorCode=e)}}catch{return n}return n};var Zp=class{client;davPath;headers;extraProps;constructor({baseUrl:e,headers:t}){this.davPath=M(e,`remote.php/dav`),this.client=Lp(this.davPath,{}),this.headers=t,this.extraProps=[]}mkcol(e,t={}){return this.request(e,{method:qn.mkcol,...t})}async propfind(e,{depth:t=1,properties:n=[],headers:r={},...i}={}){let a={...r,Depth:t.toString()},{body:o,result:s}=await this.request(e,{method:qn.propfind,data:Kp(n,{extraProps:this.extraProps}),headers:a,...i});return o?.length&&(o[0].tusSupport=Jp(s.headers)),o}async report(e,{pattern:t=``,filterRules:n=null,limit:r=30,properties:i,...a}={}){let{body:o,result:s}=await this.request(e,{method:qn.report,data:Kp(i,{pattern:t,filterRules:n,limit:r,extraProps:this.extraProps}),...a});return{results:o,range:s.headers.get(`content-range`)}}copy(e,t,{overwrite:n=!1,headers:r={},...i}={}){let a=M(this.davPath,In(t));return this.request(e,{method:qn.copy,headers:{...r,Destination:a,overwrite:n?`T`:`F`},...i})}move(e,t,{overwrite:n=!1,headers:r={},...i}={}){let a=M(this.davPath,In(t));return this.request(e,{method:qn.move,headers:{...r,Destination:a,overwrite:n?`T`:`F`},...i})}put(e,t,{headers:n={},onUploadProgress:r,previousEntityTag:i,overwrite:a,...o}={}){let s={...n};return i?s[`If-Match`]=i:a||(s[`If-None-Match`]=`*`),this.request(e,{method:qn.put,data:t,headers:s,onUploadProgress:r,...o})}delete(e,t={}){return this.request(e,{method:qn.delete,...t})}propPatch(e,t,n={}){let r=qp(t);return this.request(e,{method:qn.proppatch,data:r,...n})}getFileUrl(e){return M(this.davPath,In(e))}buildHeaders(e={}){return{"Content-Type":`application/xml; charset=utf-8`,"X-Requested-With":`XMLHttpRequest`,"X-Request-ID":Wp(),...this.headers&&{...this.headers()},...e}}async request(e,t){let n=M(this.davPath,In(e),{leadingSlash:!0}),r={...t,url:n,headers:this.buildHeaders(t.headers||{})};try{let e=await this.client.customRequest(``,r),t;return e.status===207&&(t=await Yp(await e.text())),{body:t,status:e.status,result:e}}catch(e){let{response:t}=e,n=Xp(await t.text());throw new Hn(n.message,n.errorCode,t,t.status)}}};let Qp=(e,t)=>({async listFileVersions(t,n={}){let[r,...i]=await e.propfind(M(`meta`,t,`v`,{leadingSlash:!0}),n);return i.map(t=>Go(t,e.extraProps))}}),$p=(e,t)=>({setFavorite(t,{path:n},r,i={}){let a={[P.IsFavorite]:r?`true`:`false`};return e.propPatch(M(t.webDavPath,n),a,i)}}),em=(e,t)=>{let n=j.create();t&&n.interceptors.request.use(e=>(Object.assign(e.headers,t()),e));let r={axiosClient:n,baseUrl:e,headers:t},i=new Zp({baseUrl:e,headers:t}),a=e=>{i.extraProps.push(e)},o=Ul(i,r),{getPathForFileId:s}=o,c=Fl(i,o,r),{listFiles:l}=c,u=Ml(c,r),{getFileInfo:d}=u,{createFolder:f}=Al(i,u,r),p=jl(i,r),{getFileContents:m}=p,{putFileContents:h}=Ll(i,u,r),{getFileUrl:g,revokeUrl:_}=Nl(i,p,u,r),{getPublicFileUrl:v}=Pl(i,r),{copyFiles:y}=kl(i,r),{moveFiles:b}=Il(i,r),{deleteFile:x}=Rl(i,r),{restoreFile:S}=zl(i,r),{listFileVersions:C}=Qp(i,r),{restoreFileVersion:w}=Bl(i,r),{clearTrashBin:ee}=Vl(i,r),{search:te}=Hl(i,r),{setFavorite:ne}=$p(i,r);return{copyFiles:y,createFolder:f,deleteFile:x,restoreFile:S,restoreFileVersion:w,getFileContents:m,getFileInfo:d,getFileUrl:g,getPublicFileUrl:v,getPathForFileId:s,listFiles:l,listFileVersions:C,moveFiles:b,putFileContents:h,revokeUrl:_,clearTrashBin:ee,search:te,setFavorite:ne,registerExtraProp:a}},tm;self.onmessage=async e=>{let{topic:t,data:n}=JSON.parse(e.data);if(t===`tokenUpdate`&&tm){tm.Authorization?.toString().startsWith(`Bearer`)&&(tm.Authorization=n.accessToken);return}let{baseUrl:r,headers:i,space:a,resources:o,concurrentRequests:s}=n;tm=i;let c=em(r,()=>tm),l=[],u=[],d=new g({concurrency:s}),f=e=>t===`fileListDelete`?c.deleteFile(a,{path:e.path}):c.clearTrashBin(a,{id:e.id}),p=o.map(e=>d.add(async()=>{try{let{status:t}=await f(e);if(t===204){l.push(e);return}if(t===423){let{status:t}=await f(e);if(t===204){l.push(e);return}}}catch(t){console.error(t),u.push({resource:e,message:t.message,statusCode:t.statusCode,xReqId:t.response.headers?.get(`x-request-id`)})}}));await Promise.allSettled(p),postMessage(JSON.stringify({successful:l,failed:u}))}})();
|